.ws-header-back {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
}
.ws-header-back svg { width: 14px; height: 14px; transform: rotate(180deg); }
.ws-header-back:hover { border-color: var(--text); color: var(--text); }

.ws-intro { padding: 36px 0 24px; }
.ws-intro h1 {
  max-width: 760px;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.ws-shell { padding: 32px 0 96px; }
.ws-shell .container {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.ws-sidebar {
  flex: 0 0 248px;
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 4px;
}
.ws-sidebar-hint {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.ws-nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}
.ws-nav-group:last-child { margin-bottom: 0; }
.ws-nav-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0 0 8px 10px;
}
.ws-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.ws-nav-link .icon-box {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg-alt);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ws-nav-link .icon-box svg { width: 15px; height: 15px; }
.ws-nav-link:hover { background: var(--bg-alt); color: var(--text); }
.ws-nav-link[aria-current="true"] {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-color: var(--accent-soft);
}
.ws-nav-link[aria-current="true"] .icon-box { background: var(--surface); color: var(--accent); }

.ws-sidebar-note {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
}
.ws-sidebar-note a { color: var(--accent); font-weight: 700; }

.ws-main { flex: 1; min-width: 0; }
.ws-category { margin-bottom: 52px; }
.ws-category:last-child { margin-bottom: 0; }
.ws-category-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 18px;
}
.ws-category-head h2 { font-size: 19px; font-weight: 800; }
.ws-category-head span {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.ws-panel {
  scroll-margin-top: 96px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.ws-panel:last-child { margin-bottom: 0; }

.ws-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.ws-panel-head .icon-box {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ws-panel-head .icon-box svg { width: 22px; height: 22px; }
.ws-panel-body { flex: 1; min-width: 200px; }
.ws-panel-body h2 {
  font-size: 17px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ws-panel-body p { margin-top: 5px; font-size: 13.5px; color: var(--text-secondary); max-width: 640px; }
.ws-panel-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.ws-panel-open {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.ws-panel-open svg { width: 13px; height: 13px; }
.ws-panel-open:hover { text-decoration: underline; }

.ws-demo-host {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}
.ws-demo-host .tool-demo {
  max-width: 100%;
}

.ws-demo-host .convert-actions {
  background: transparent;
}

@media (max-width: 1024px) {
  .ws-shell .container {
    flex-direction: column;

    align-items: stretch;
  }
  .ws-sidebar {

    flex: none;
    position: sticky;
    top: 72px;
    z-index: 40;
    width: auto;
    min-width: 0;
    max-height: none;

    overflow: visible;

    margin: -8px -24px 16px;
    padding: 12px 24px;
    background: rgba(250, 249, 246, 0.94);
    backdrop-filter: saturate(1.1) blur(8px);
    border-bottom: 1px solid var(--border);
  }
  .ws-sidebar-hint { display: none; }
  .ws-nav-group { display: contents; }
  .ws-nav-title { display: none; }
  .ws-sidebar-note { display: none; }
  .ws-sidebar-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    touch-action: pan-x;
  }
  .ws-sidebar-nav::-webkit-scrollbar { display: none; }
  .ws-nav-link {
    flex: 0 0 auto;
    flex-direction: row-reverse;
    padding: 8px 14px 8px 8px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    white-space: nowrap;
  }
  .ws-nav-link[aria-current="true"] { border-color: var(--accent); }
}

@media (max-width: 640px) {
  .ws-panel { padding: 18px; }
  .ws-panel-head { gap: 12px; }
  .ws-panel-actions { flex-basis: 100%; margin-left: 0; }
  .ws-demo-host { padding: 14px; border: 0;}
}

@media (max-width: 480px) {
  .ws-sidebar { top: 64px; }
}

@media (max-width: 420px) {
  .ws-header-back span { display: none; }
  .ws-header-back { padding: 8px; }
}
