/* ==========================================================================
   Echo Web Audio Studio & Interactive How-To Design System
   Grounded in docs/design.md · Deep navy night-sky canvas (#0F1024)
   Accessible violet foreground (#BA97FA = 7.94:1), teal (#34D7D7), pink (#E87AFF)
   Motion calibrated to animate skill (cubic-bezier(0.23, 1, 0.32, 1), GPU props only)
   ========================================================================== */

:root {
  --studio-canvas: #0f1024;
  --studio-canvas-deep: #090a18;
  --studio-surface: #151736;
  --studio-surface-2: #1c1f48;
  --studio-surface-3: #24285a;
  --studio-ink: #f5f6ff;
  --studio-muted: #b6b9d6;
  --studio-dim: #8a8fb5;
  --studio-violet-fill: #6634f0;
  --studio-violet-fg: #ba97fa;
  --studio-teal: #34d7d7;
  --studio-pink: #e87aff;
  --studio-amber: #ffd341;
  --studio-danger: #ff6b7a;
  --studio-border: rgba(245, 246, 255, 0.12);
  --studio-border-strong: rgba(186, 151, 250, 0.36);
  --studio-cta-grad: linear-gradient(95deg, #4b1fd6 0%, #107b82 100%);
  --studio-accent-grad: linear-gradient(95deg, #6634f0 0%, #34d7d7 100%);
  --studio-font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --studio-font-display: "Avenir Next", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  --studio-font-body: "Avenir Next", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  --studio-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --radius-card: 18px;
  --radius-control: 12px;
  --radius-pill: 999px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--studio-canvas);
  color: var(--studio-ink);
  font-family: var(--studio-font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.studio-page {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(620px 420px at 12% 4%, rgba(102, 52, 240, 0.22), transparent 70%),
    radial-gradient(560px 420px at 88% 8%, rgba(52, 215, 215, 0.14), transparent 70%),
    var(--studio-canvas);
  color: var(--studio-ink);
  overflow-x: clip;
}

body.studio-page.season-holiday {
  background:
    radial-gradient(680px 440px at 14% 2%, rgba(102, 52, 240, 0.24), transparent 70%),
    radial-gradient(620px 420px at 86% 6%, rgba(52, 215, 215, 0.18), transparent 70%),
    radial-gradient(420px 320px at 52% 0%, rgba(255, 211, 65, 0.08), transparent 68%),
    var(--studio-canvas);
}

a {
  color: var(--studio-teal);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--studio-teal);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -120px;
  left: 16px;
  z-index: 999;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--studio-teal);
  color: #090b1a;
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Navigation ---------- */
.studio-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 16, 36, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--studio-border);
}

.studio-nav__inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.studio-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--studio-ink);
  font-family: var(--studio-font-body);
  font-weight: 650;
  font-size: 1.3rem;
  letter-spacing: -0.05em;
  text-decoration: none;
}

.studio-brand:hover {
  text-decoration: none;
}

.studio-brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.studio-nav__links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.studio-nav__links a {
  color: var(--studio-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 160ms var(--ease-out);
}

.studio-nav__links a[aria-current="page"],
.studio-nav__links a:hover {
  color: var(--studio-ink);
  text-decoration: none;
}

.studio-nav__links a[aria-current="page"] {
  color: var(--studio-teal);
}

.studio-nav__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.studio-nav .switcher {
  position: relative;
}

.studio-nav .switcher summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--studio-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--studio-muted);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  transition: border-color 160ms var(--ease-out), color 160ms var(--ease-out);
}

.studio-nav .switcher summary::-webkit-details-marker {
  display: none;
}

.studio-nav .switcher summary:hover,
.studio-nav .switcher[open] summary {
  color: var(--studio-ink);
  border-color: var(--studio-border-strong);
}

.studio-nav .switcher ul {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 8px;
  list-style: none;
  min-width: 160px;
  max-width: calc(100vw - 24px);
  background: #17183a;
  border: 1px solid rgba(248, 248, 255, 0.16);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(4, 5, 18, 0.65);
  z-index: 65;
}

.studio-nav .switcher a {
  display: block;
  padding: 8px 10px;
  text-decoration: none;
  color: var(--studio-ink);
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: 8px;
  white-space: nowrap;
}

.studio-nav .switcher a[aria-current="true"],
.studio-nav .switcher a:hover {
  background: rgba(52, 215, 215, 0.14);
  color: var(--studio-teal);
  text-decoration: none;
}

.studio-nav__toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--studio-border);
  background: var(--studio-surface);
  color: var(--studio-ink);
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.s-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--studio-font-body);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 150ms var(--ease-out), opacity 150ms var(--ease-out), border-color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}

.s-btn:hover {
  text-decoration: none;
}

.s-btn:active {
  transform: scale(0.98);
}

.s-btn--primary {
  /* Deepened gradient guarantees >= 4.5:1 white text contrast across every stop */
  background: var(--studio-cta-grad);
  color: #ffffff;
  border-color: rgba(52, 215, 215, 0.45);
  box-shadow: 0 8px 24px rgba(75, 31, 214, 0.34);
}

.s-btn--teal {
  background: var(--studio-teal);
  color: #090b1a;
}

.s-btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--studio-ink);
  border-color: var(--studio-border);
}

.s-btn--ghost:hover {
  border-color: var(--studio-teal);
}

.s-btn--danger {
  background: rgba(255, 107, 122, 0.14);
  color: #ff949f;
  border-color: rgba(255, 107, 122, 0.4);
}

.s-btn--record {
  background: linear-gradient(135deg, #f03861 0%, #c91d4a 100%);
  color: #ffffff;
  border-color: rgba(255, 122, 150, 0.55);
  box-shadow: 0 10px 28px rgba(240, 56, 97, 0.36);
}

.s-btn--record.is-recording {
  animation: studio-rec-pulse 1.4s ease-in-out infinite;
}

@keyframes studio-rec-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240, 56, 97, 0.55), 0 10px 28px rgba(240, 56, 97, 0.36); }
  50% { box-shadow: 0 0 0 10px rgba(240, 56, 97, 0), 0 10px 28px rgba(240, 56, 97, 0.55); }
}

.mic-stage {
  border: 1.5px solid rgba(240, 56, 97, 0.36);
  border-radius: 16px;
  padding: 26px 22px;
  text-align: center;
  background:
    radial-gradient(420px 180px at 50% 0%, rgba(240, 56, 97, 0.14), transparent 72%),
    rgba(15, 16, 36, 0.72);
}

.mic-stage__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.mic-stage__meter {
  max-width: 680px;
  margin: 18px auto 0;
  text-align: left;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--studio-border);
}

.mic-stage__meter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--studio-muted);
}

.mic-stage__secondary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--studio-border);
  font-size: 0.84rem;
  color: var(--studio-muted);
}

.s-btn--sm {
  min-height: 36px;
  padding: 7px 14px;
  font-size: 0.84rem;
}

.s-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

@media (hover: hover) and (pointer: fine) {
  .s-btn--primary:hover:not([disabled]),
  .s-btn--teal:hover:not([disabled]) {
    transform: translateY(-1px);
  }
  .tool-card:hover,
  .guide-card:hover {
    transform: translateY(-3px);
    border-color: rgba(52, 215, 215, 0.5);
  }
}

/* ---------- Layout Containers ---------- */
.studio-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 84px;
}

.studio-wrap--narrow {
  width: min(920px, calc(100% - 32px));
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-size: 0.84rem;
  color: var(--studio-dim);
}

.breadcrumbs a {
  color: var(--studio-muted);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(186, 151, 250, 0.12);
  border: 1px solid rgba(186, 151, 250, 0.34);
  color: var(--studio-violet-fg);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-kicker--holiday {
  background: rgba(255, 211, 65, 0.12);
  border-color: rgba(255, 211, 65, 0.38);
  color: var(--studio-amber);
}

.studio-title {
  margin: 14px 0 12px;
  font-family: var(--studio-font-serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 4.4vw, 3.45rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--studio-ink);
}

.studio-title em {
  font-style: italic;
  color: var(--studio-teal);
}

.studio-lede {
  max-width: 720px;
  margin: 0 0 24px;
  font-size: 1.06rem;
  color: var(--studio-muted);
}

/* ---------- Luminous Conic-Border Hardware Deck ---------- */
.deck-portal {
  position: relative;
  padding: 2px;
  border-radius: calc(var(--radius-card) + 2px);
  background: conic-gradient(from 130deg at 50% 50%, rgba(52, 215, 215, 0.65), rgba(102, 52, 240, 0.65), rgba(232, 122, 255, 0.55), rgba(52, 215, 215, 0.65));
  box-shadow: 0 24px 64px rgba(4, 5, 16, 0.65);
  margin-bottom: 36px;
}

.deck {
  background: linear-gradient(160deg, rgba(21, 23, 54, 0.98) 0%, rgba(13, 15, 36, 0.99) 100%);
  border-radius: var(--radius-card);
  padding: clamp(18px, 3vw, 30px);
}

.deck-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.deck-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.deck-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--studio-border);
  font-family: var(--studio-font-mono);
  font-size: 0.78rem;
  color: var(--studio-muted);
}

.deck-pill strong {
  color: var(--studio-teal);
}

.dropzone {
  border: 1.5px dashed rgba(186, 151, 250, 0.45);
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
  background: rgba(15, 16, 36, 0.55);
  cursor: pointer;
  transition: border-color 180ms var(--ease-out), background-color 180ms var(--ease-out);
}

.dropzone.is-dragover,
.dropzone:hover {
  border-color: var(--studio-teal);
  background: rgba(52, 215, 215, 0.06);
}

.dropzone__title {
  margin: 0 0 6px;
  font-family: var(--studio-font-display);
  font-size: 1.18rem;
  color: var(--studio-ink);
}

.dropzone__sub {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--studio-muted);
}

.dropzone__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* ---------- Waveform Stage & Transport ---------- */
.wave-stage {
  margin-top: 18px;
  padding: 16px;
  border-radius: 14px;
  background: var(--studio-canvas-deep);
  border: 1px solid var(--studio-border);
}

.wave-canvas {
  display: block;
  width: 100%;
  height: 124px;
  border-radius: 10px;
  cursor: pointer;
  touch-action: none;
}

.transport-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.transport-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timecode {
  font-family: var(--studio-font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
  color: var(--studio-muted);
}

.timecode strong {
  color: var(--studio-ink);
}

/* ---------- Tool Controls Grid ---------- */
.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.ctrl-box {
  padding: 14px 16px;
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--studio-border);
}

.ctrl-box label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--studio-muted);
}

.ctrl-box label output,
.ctrl-box label span.val {
  font-family: var(--studio-font-mono);
  color: var(--studio-teal);
  font-weight: 700;
}

.ctrl-box input[type="range"] {
  width: 100%;
  accent-color: var(--studio-teal);
  cursor: pointer;
}

.ctrl-box select,
.ctrl-box input[type="text"],
.ctrl-box input[type="number"] {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--studio-border);
  background: var(--studio-canvas);
  color: var(--studio-ink);
  font-family: var(--studio-font-body);
  font-size: 0.9rem;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip-btn {
  min-height: 36px;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--studio-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--studio-muted);
  font-family: var(--studio-font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 150ms var(--ease-out), color 150ms var(--ease-out), background-color 150ms var(--ease-out);
}

.chip-btn.is-active,
.chip-btn:hover {
  border-color: var(--studio-teal);
  color: var(--studio-ink);
  background: rgba(52, 215, 215, 0.12);
}

/* ---------- Status / Alert / Progress ---------- */
.status-banner {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--studio-border);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
  color: var(--studio-ink);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.status-banner--warn {
  border-color: rgba(255, 211, 65, 0.45);
  background: rgba(255, 211, 65, 0.09);
  color: #ffe89e;
}

.status-banner--error {
  border-color: rgba(255, 107, 122, 0.5);
  background: rgba(255, 107, 122, 0.11);
  color: #ffb8c0;
}

.status-banner--ok {
  border-color: rgba(52, 215, 215, 0.45);
  background: rgba(52, 215, 215, 0.09);
  color: #c5ffff;
}

/* ---------- Export Bar & Cross-Tool Handoff Dock ---------- */
.export-bar {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--studio-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.export-bar__left,
.export-bar__right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.handoff-dock {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(186, 151, 250, 0.07);
  border: 1px solid rgba(186, 151, 250, 0.24);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.handoff-dock__label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--studio-violet-fg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Readout Cards (BPM/Key, LUFS, Merger) ---------- */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.metric-tile {
  padding: 16px;
  border-radius: 14px;
  background: var(--studio-canvas-deep);
  border: 1px solid var(--studio-border);
}

.metric-tile__label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--studio-dim);
}

.metric-tile__value {
  margin-top: 6px;
  font-family: var(--studio-font-mono);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--studio-teal);
}

.metric-tile__sub {
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--studio-muted);
}

/* ---------- 10-Band EQ Sliders ---------- */
.eq-rack {
  display: grid;
  grid-template-columns: repeat(10, minmax(44px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding: 14px;
  border-radius: 14px;
  background: var(--studio-canvas-deep);
  border: 1px solid var(--studio-border);
  margin-top: 16px;
}

.eq-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.eq-band input[type="range"] {
  writing-mode: vertical-lr;
  direction: rtl;
  height: 118px;
  width: 24px;
  accent-color: var(--studio-pink);
}

.eq-band small {
  font-family: var(--studio-font-mono);
  font-size: 0.72rem;
  color: var(--studio-muted);
}

/* ---------- Visualizer Canvas ---------- */
.vis-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 20px;
  margin-top: 16px;
  align-items: start;
}

.vis-preview-frame {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  border-radius: 14px;
  background: var(--studio-canvas-deep);
  border: 1px solid var(--studio-border);
}

.vis-preview-frame canvas {
  max-width: 100%;
  max-height: 440px;
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
}

/* ---------- Merger Track List ---------- */
.track-queue {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.track-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--studio-border);
}

.track-row__meta {
  font-family: var(--studio-font-mono);
  font-size: 0.82rem;
  color: var(--studio-muted);
}

/* ---------- Hubs: Tool & Guide Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.tool-card,
.guide-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-card);
  background: linear-gradient(160deg, rgba(28, 31, 72, 0.85), rgba(15, 16, 36, 0.96));
  border: 1px solid var(--studio-border);
  overflow: hidden;
  text-decoration: none;
  color: var(--studio-ink);
  transition: transform 180ms var(--ease-out), border-color 180ms var(--ease-out);
}

.tool-card:hover,
.guide-card:hover {
  text-decoration: none;
}

.tool-card__body,
.guide-card__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.card-badge {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(186, 151, 250, 0.14);
  color: var(--studio-violet-fg);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card-badge--holiday {
  background: rgba(255, 211, 65, 0.14);
  color: var(--studio-amber);
}

.tool-card h3,
.guide-card h3 {
  margin: 0;
  font-family: var(--studio-font-display);
  font-size: 1.2rem;
  line-height: 1.25;
}

.tool-card p,
.guide-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--studio-muted);
  flex: 1;
}

.tool-card__foot,
.guide-card__foot {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--studio-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--studio-teal);
  white-space: nowrap;
}

.guide-card__thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top center;
  display: block;
  background: var(--studio-canvas-deep);
  border-bottom: 1px solid var(--studio-border);
}

.tool-card__cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--studio-canvas-deep);
  border-bottom: 1px solid var(--studio-border);
}

.tool-card__cover-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 44%;
  background: linear-gradient(to top, rgba(15, 16, 36, 0.85), transparent);
  pointer-events: none;
}

.tool-card__cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 320ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .tool-card:hover .tool-card__cover {
    transform: scale(1.045);
  }
}

.tool-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 10px;
}

.tool-hero-art {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid rgba(186, 151, 250, 0.3);
  background: var(--studio-canvas-deep);
  box-shadow: 0 18px 44px rgba(8, 9, 24, 0.55), 0 0 32px rgba(102, 52, 240, 0.16);
}

.tool-hero-art img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

@media (max-width: 860px) {
  .tool-hero-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .tool-hero-art {
    max-width: 440px;
  }
}

/* ---------- SEO-AGI Article & Tool Guide Prose ---------- */
.seo-body {
  margin-top: 42px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.seo-panel {
  padding: clamp(20px, 3vw, 30px);
  border-radius: var(--radius-card);
  background: rgba(21, 23, 54, 0.74);
  border: 1px solid var(--studio-border);
}

.seo-panel h2 {
  margin: 0 0 12px;
  font-family: var(--studio-font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.2;
}

.seo-panel h3 {
  margin: 18px 0 8px;
  font-size: 1.08rem;
  color: var(--studio-violet-fg);
}

.seo-panel p,
.seo-panel li {
  color: var(--studio-muted);
  font-size: 0.98rem;
}

.seo-panel strong {
  color: var(--studio-ink);
}

.fast-scan {
  padding: 20px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(102, 52, 240, 0.14), rgba(52, 215, 215, 0.08));
  border: 1px solid rgba(52, 215, 215, 0.3);
}

.fast-scan h2 {
  margin: 0 0 10px;
  font-family: var(--studio-font-display);
  font-size: 1.15rem;
  color: var(--studio-teal);
}

.fast-scan ul {
  margin: 0;
  padding-left: 20px;
}

.fast-scan li {
  margin-bottom: 6px;
  color: var(--studio-ink);
}

.table-scroll {
  overflow-x: auto;
  margin-top: 12px;
}

.seo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.seo-table th,
.seo-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--studio-border);
}

.seo-table th {
  color: var(--studio-violet-fg);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.03);
}

.seo-table td {
  color: var(--studio-muted);
}

.not-for-you {
  padding: 20px 24px;
  border-radius: 16px;
  background: rgba(255, 107, 122, 0.07);
  border: 1px solid rgba(255, 107, 122, 0.28);
}

.not-for-you h2 {
  margin: 0 0 8px;
  font-family: var(--studio-font-display);
  font-size: 1.25rem;
  color: #ffb8c0;
}

.step-figure {
  margin: 18px 0;
  padding: 10px;
  border-radius: 14px;
  background: var(--studio-canvas-deep);
  border: 1px solid var(--studio-border);
}

.step-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.step-figure figcaption {
  margin-top: 8px;
  font-size: 0.84rem;
  color: var(--studio-dim);
  text-align: center;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-list details {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--studio-border);
  padding: 14px 18px;
}

.faq-list summary {
  font-weight: 700;
  color: var(--studio-ink);
  cursor: pointer;
}

.faq-list details p {
  margin: 10px 0 0;
}

.app-cta-card {
  padding: 26px;
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, rgba(102, 52, 240, 0.25), rgba(52, 215, 215, 0.14));
  border: 1px solid rgba(186, 151, 250, 0.4);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.app-cta-card h2 {
  margin: 0 0 6px;
  font-family: var(--studio-font-display);
  font-size: 1.45rem;
}

.app-cta-card p {
  margin: 0;
  max-width: 580px;
  color: var(--studio-muted);
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.studio-footer {
  border-top: 1px solid var(--studio-border);
  padding: 32px 0 48px;
  color: var(--studio-dim);
  font-size: 0.85rem;
}

.studio-footer__inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.studio-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.studio-footer__links a {
  color: var(--studio-muted);
}

/* ---------- Declarative Guide Widgets ---------- */
.guide-widget {
  margin: 22px 0 28px;
  padding: 22px;
  border-radius: var(--radius-card);
  background: linear-gradient(155deg, rgba(28, 31, 72, 0.94), rgba(13, 15, 36, 0.98));
  border: 1px solid rgba(52, 215, 215, 0.34);
  box-shadow: 0 18px 44px rgba(3, 4, 15, 0.55);
}

.guide-widget__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.guide-widget__title {
  margin: 0;
  font-family: var(--studio-font-display);
  font-size: 1.2rem;
  color: var(--studio-ink);
}

.guide-widget__output {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--studio-canvas-deep);
  border: 1px solid var(--studio-border);
  font-family: var(--studio-font-mono);
  font-size: 0.9rem;
  color: var(--studio-teal);
}

.camelot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(66px, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.camelot-cell {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--studio-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--studio-ink);
  font-family: var(--studio-font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.camelot-cell.is-selected {
  background: var(--studio-teal);
  color: #090b1a;
  border-color: var(--studio-teal);
}

.camelot-cell.is-match {
  background: rgba(186, 151, 250, 0.22);
  border-color: var(--studio-violet-fg);
  color: var(--studio-ink);
}

.prompt-box {
  width: 100%;
  min-height: 110px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--studio-border);
  background: var(--studio-canvas-deep);
  color: var(--studio-ink);
  font-family: var(--studio-font-mono);
  font-size: 0.86rem;
  line-height: 1.5;
  resize: vertical;
}

@media (max-width: 820px) {
  .studio-nav__inner {
    width: calc(100% - 24px);
    gap: 8px;
  }
  .studio-nav__actions {
    gap: 6px;
  }
  .studio-nav__actions .s-btn--sm {
    min-height: 36px;
    padding: 7px 11px;
    font-size: 0.76rem;
    white-space: nowrap;
  }
  .studio-nav .switcher summary {
    padding: 6px 9px;
    font-size: 0.76rem;
  }
  .studio-nav__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .studio-nav__links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 70px;
    padding: 18px 20px;
    flex-direction: column;
    align-items: flex-start;
    background: rgba(15, 16, 36, 0.98);
    border-bottom: 1px solid var(--studio-border);
    z-index: 55;
  }
  .studio-nav__links.is-open {
    display: flex;
  }
  .vis-stage {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
