:root {
  --bg: #0e0c14;
  --surface: #17141f;
  --surface2: #201c2c;
  --border: #2e2840;
  --accent: #c084fc;
  --accent2: #fb923c;
  --accent3: #34d399;
  --accent4: #60a5fa;
  --accent5: #f472b6;
  --text: #f0ebff;
  --muted: #8b82a8;
  --card: #1c1829;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  padding-top: 64px;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.03;
  background-image:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><text x="10" y="30" font-size="24" fill="%23c084fc" opacity="0.3">♪</text><text x="60" y="70" font-size="20" fill="%2360a5fa" opacity="0.25">♫</text><text x="25" y="85" font-size="18" fill="%2334d399" opacity="0.2">♬</text></svg>'),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 80px,
      rgba(192, 132, 252, 0.02) 80px,
      rgba(192, 132, 252, 0.02) 81px
    );
  background-size:
    200px 200px,
    100% 100%;
  background-position:
    0 0,
    0 0;
}

/* STICKY TOP NAV — matches page theme (surface, border, accent, TOC-style links) */
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.topnav-brand {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 1.15rem;
  background: linear-gradient(
    135deg,
    #f0ebff 0%,
    var(--accent) 60%,
    var(--accent2) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.topnav-brand:hover {
  opacity: 0.9;
}
.topnav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.topnav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  font-family: "DM Sans", sans-serif;
  transition: color 0.2s;
  position: relative;
}
.topnav-links a:hover {
  color: var(--accent);
}
.topnav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.2s;
}
.topnav-links a:hover::after {
  transform: scaleX(1);
}

/* HERO */
.hero {
  padding: 80px 40px 20px;
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(
    ellipse,
    rgba(192, 132, 252, 0.12) 0%,
    transparent 70%
  );
  pointer-events: none;
}
.badge {
  display: inline-block;
  background: rgba(192, 132, 252, 0.15);
  border: 1px solid rgba(192, 132, 252, 0.3);
  color: var(--accent);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.hero h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  background: linear-gradient(
    135deg,
    #f0ebff 0%,
    var(--accent) 60%,
    var(--accent2) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}
.hero p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 40px;
}

/* TOC */
.toc {
  max-width: 960px;
  margin: 0 auto 60px;
  padding: 20px 40px 0;
}
.toc-group {
  margin-bottom: 28px;
}
.toc-group:last-child {
  margin-bottom: 0;
}
.toc-group-title {
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
  padding-left: 2px;
}
.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.toc-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
  cursor: pointer;
}
.toc-item:hover {
  border-color: var(--accent);
  background: var(--surface2);
  transform: translateY(-2px);
}
.toc-icon {
  font-size: 1.2rem;
}

/* SECTION */
.section {
  max-width: 960px;
  margin: 0 auto 88px;
  padding: 0 40px;
  scroll-margin-top: 88px;
}

/* FULL-BLEED SECTION DIVIDER */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--border) 15%,
    var(--border) 85%,
    transparent 100%
  );
  margin: 48px 0 32px;
}
.section-divider-band {
  width: 100%;
  padding: 32px 24px;
  background: linear-gradient(
    180deg,
    rgba(192, 132, 252, 0.04) 0%,
    transparent 100%
  );
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 56px 0 40px;
}
.section-divider-band-first {
  margin-top: 96px;
}
.section-divider-band .section-divider-title {
  max-width: 960px;
  margin: 0 auto;
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(
    135deg,
    #f0ebff 0%,
    var(--accent) 50%,
    var(--accent2) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.section-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.section-header h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  font-weight: 700;
}
.section-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 2px;
}

/* CARDS */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  align-items: start;
  grid-auto-flow: row dense;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  transition:
    border-color 0.2s,
    transform 0.2s;
  position: relative;
  overflow: hidden;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.card-split {
  align-items: start;
  grid-column: 1 / -1;
}
.card-split .card-term-row {
  margin-bottom: 14px;
}
.card-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.card-split-col {
  min-width: 0;
  position: relative;
  padding-right: 12px;
}
.card-split-col:last-child {
  padding-right: 0;
  padding-left: 12px;
}
.card-split-col:first-child::after {
  content: "";
  position: absolute;
  top: 4px;
  right: -9px;
  width: 1px;
  height: calc(100% - 8px);
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(46, 40, 64, 0.95) 12%,
    rgba(46, 40, 64, 0.95) 88%,
    transparent 100%
  );
}
.card-split-col > * + * {
  margin-top: 10px;
}
.card-split-col h3 {
  margin-bottom: 8px;
}
.card-split-col p {
  max-width: 72ch;
}
.card-term {
  font-family: "DM Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 500;
}
.card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}
.visual {
  margin-top: 14px;
  padding: 12px;
  background: var(--surface);
  border-radius: 10px;
  font-size: 0.82rem;
  color: var(--text);
  border-left: 3px solid;
}
.visual-label {
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

/* PROMPT PILL */
.prompt {
  display: inline-block;
  background: rgba(192, 132, 252, 0.1);
  border: 1px solid rgba(192, 132, 252, 0.25);
  color: var(--accent);
  font-family: "DM Mono", monospace;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 6px;
  margin-top: 10px;
}
.copyable-prompt {
  position: relative;
  padding-right: 38px;
}
.copyable-prompt .prompt-copy-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: 1px solid rgba(192, 132, 252, 0.22);
  border-radius: 6px;
  background: rgba(14, 12, 20, 0.82);
  color: var(--accent);
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}
.copyable-prompt:hover .prompt-copy-btn,
.copyable-prompt:focus-within .prompt-copy-btn {
  opacity: 1;
  pointer-events: auto;
}
.copyable-prompt .prompt-copy-btn:hover {
  border-color: rgba(192, 132, 252, 0.4);
  background: rgba(32, 28, 44, 0.96);
  transform: translateY(-50%) scale(1.04);
}
.copyable-prompt .prompt-copy-btn:focus-visible {
  opacity: 1;
  pointer-events: auto;
  outline: 2px solid rgba(192, 132, 252, 0.45);
  outline-offset: 2px;
}
.copyable-prompt .prompt-copy-btn.copied {
  color: var(--accent3);
  border-color: rgba(52, 211, 153, 0.4);
}
.prompt-example.copyable-prompt,
.studio-prompt.copyable-prompt,
.inst-prompt.copyable-prompt,
.ti-cell .suno-tip.copyable-prompt {
  display: block;
}
.prompt-example.copyable-prompt {
  padding-right: 46px;
}
.studio-prompt.copyable-prompt,
.inst-prompt.copyable-prompt,
.ti-cell .suno-tip.copyable-prompt {
  padding-right: 36px;
}

/* SPEED BAR */
.speed-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.speed-track {
  flex: 1;
  height: 6px;
  background: var(--surface);
  border-radius: 100px;
  overflow: hidden;
}
.speed-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--accent4), var(--accent5));
}
.speed-label {
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
}

/* VOLUME BAR */
.vol-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.8rem;
}
.vol-dots {
  display: flex;
  gap: 3px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--border);
}
.dot.on {
  background: var(--accent3);
}
.dot.half {
  background: var(--accent4);
}

/* WAVEFORM */
.wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 28px;
  margin-top: 10px;
}
.wave-bar {
  width: 4px;
  border-radius: 2px;
  background: var(--accent);
}

/* TIMELINE */
.timeline {
  display: flex;
  gap: 0;
  margin-top: 10px;
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.72rem;
  font-family: "DM Mono", monospace;
}
.tl-seg {
  flex: 1;
  padding: 7px 5px;
  text-align: center;
  border-right: 1px solid var(--bg);
  font-weight: 500;
}
.tl-seg:last-child {
  border-right: none;
}

/* CHORD VIZ */
.chord-viz {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.note-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "DM Mono", monospace;
  font-size: 0.75rem;
  font-weight: 500;
  border: 2px solid;
}

/* BIG PROMPT BOX */
.prompt-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-top: 16px;
}
.prompt-box h4 {
  font-family: "DM Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.prompt-example {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  font-family: "DM Mono", monospace;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 10px;
  line-height: 1.6;
}
.prompt-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.pb-tag {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-family: "DM Mono", monospace;
  border: 1px solid;
}
.prompt-recipes {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}
.prompt-faq {
  margin-top: 0;
  padding: 0;
  overflow: hidden;
}
.prompt-faq-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  cursor: pointer;
}
.prompt-faq-summary::-webkit-details-marker {
  display: none;
}
.prompt-faq-title {
  font-family: "DM Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text);
}
.prompt-faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "DM Mono", monospace;
  font-size: 1rem;
  color: var(--accent);
  background: rgba(192, 132, 252, 0.08);
  flex-shrink: 0;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}
.prompt-faq[open] .prompt-faq-icon {
  transform: rotate(45deg);
  border-color: rgba(192, 132, 252, 0.35);
  background: rgba(192, 132, 252, 0.14);
}
.prompt-faq-body {
  padding: 0 24px 24px;
  border-top: 1px solid var(--border);
}
.prompt-faq-body .prompt-example {
  margin-top: 18px;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 40px;
  color: var(--muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

/* BACK TO TOP */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity 0.25s,
    visibility 0.25s,
    transform 0.25s,
    border-color 0.2s,
    background 0.2s;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  border-color: var(--accent);
  background: rgba(192, 132, 252, 0.12);
}
.back-to-top:active {
  transform: translateY(0) scale(0.96);
}

/* Play demo on card — Tone.js demos */
.card-term-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.card-term-row .card-term {
  margin-bottom: 0;
}
.card-play {
  display: flex;
  align-items: center;
  gap: 4px;
}
.card-play-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  font-size: 0.7rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.15s;
}
.card-play-btn:hover {
  border-color: var(--accent);
  background: rgba(192, 132, 252, 0.15);
}
.card-play-btn:active {
  transform: scale(0.95);
}
.card-play-btn.playing {
  border-color: var(--accent);
  background: rgba(192, 132, 252, 0.25);
  color: #e9d5ff;
  animation: play-pulse 0.8s ease-in-out infinite;
}
.card-play-btn[title] {
  cursor: help;
}

/* Playing indicator: sound wave bars */
.card-play-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-play-wave {
  display: none !important;
}
@keyframes play-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(192, 132, 252, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(192, 132, 252, 0);
  }
}

/* COLOR ACCENTS PER SECTION */
.c1 {
  color: #60a5fa;
}
.c2 {
  color: #34d399;
}
.c3 {
  color: #c084fc;
}
.c4 {
  color: #f472b6;
}
.c5 {
  color: #fb923c;
}
.c6 {
  color: #fbbf24;
}
.c7 {
  color: #a78bfa;
}
.c8 {
  color: #2dd4bf;
}

.bg1 {
  background: rgba(96, 165, 250, 0.15);
}
.bg2 {
  background: rgba(52, 211, 153, 0.15);
}
.bg3 {
  background: rgba(192, 132, 252, 0.15);
}
.bg4 {
  background: rgba(244, 114, 182, 0.15);
}
.bg5 {
  background: rgba(251, 146, 60, 0.15);
}
.bg6 {
  background: rgba(251, 191, 36, 0.15);
}
.bg7 {
  background: rgba(167, 139, 250, 0.15);
}
.bg8 {
  background: rgba(45, 212, 180, 0.15);
}

.b1 {
  border-color: #60a5fa;
}
.b2 {
  border-color: #34d399;
}
.b3 {
  border-color: #c084fc;
}
.b4 {
  border-color: #f472b6;
}
.b5 {
  border-color: #fb923c;
}
.b6 {
  border-color: #fbbf24;
}
.b7 {
  border-color: #a78bfa;
}
.b8 {
  border-color: #2dd4bf;
}

/* SONG EXAMPLES */
.song-eg {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(251, 191, 36, 0.07);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 8px;
  font-size: 0.78rem;
}
.song-eg-label {
  font-family: "DM Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fbbf24;
  margin-bottom: 4px;
}
.song-eg span {
  color: var(--muted);
  display: block;
  line-height: 1.5;
}
.song-link {
  color: #fbbf24;
  font-style: italic;
}

/* INSTRUMENT CARDS */
.inst-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.inst-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.inst-header {
  padding: 18px 22px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border);
}
.inst-header .inst-title-wrap {
  flex: 1;
  min-width: 0;
}
.inst-header .card-play-wrap {
  flex-shrink: 0;
}
.inst-play-btn {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}
.inst-emoji {
  font-size: 2rem;
  line-height: 1;
}
.inst-name {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.inst-type {
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.inst-body {
  padding: 16px 22px 20px;
}
.inst-spec {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.6;
  font-family: "DM Mono", monospace;
}
.inst-spec strong {
  color: var(--text);
  font-weight: 500;
}
.inst-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.inst-tag {
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 100px;
  border: 1px solid;
  font-family: "DM Mono", monospace;
}
.inst-where {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.6;
}
.inst-where strong {
  color: var(--text);
}
.inst-prompt {
  display: inline-block;
  background: rgba(192, 132, 252, 0.1);
  border: 1px solid rgba(192, 132, 252, 0.25);
  color: var(--accent);
  font-family: "DM Mono", monospace;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  margin-top: 6px;
  display: block;
}

/* TEMPO × INSTRUMENT SECTION */
.tempo-inst-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 28px;
}
.ti-label-col {
  background: var(--surface2);
  border-right: 1px solid var(--border);
  padding: 0;
}
.ti-label {
  padding: 16px 14px;
  border-bottom: 1px solid var(--border);
  font-family: "DM Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ti-label:last-child {
  border-bottom: none;
}
.ti-label .tempo-name {
  color: var(--text);
  font-weight: 500;
}
.ti-label .tempo-bpm {
  color: var(--muted);
  font-size: 0.68rem;
}
.ti-cells-col {
  overflow-x: auto;
}
.ti-header-row {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.ti-inst-head {
  min-width: 140px;
  flex: 1;
  padding: 12px 14px;
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  border-right: 1px solid var(--border);
  text-align: center;
}
.ti-inst-head:last-child {
  border-right: none;
}
.ti-row {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.ti-row:last-child {
  border-bottom: none;
}
.ti-cell {
  min-width: 140px;
  flex: 1;
  padding: 14px;
  padding-top: 14px;
  padding-right: 52px;
  border-right: 1px solid var(--border);
  font-size: 0.79rem;
  color: var(--muted);
  line-height: 1.5;
  vertical-align: top;
  position: relative;
}
.ti-cell:last-child {
  border-right: none;
}
.ti-play-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  font-size: 0.62rem;
}
.ti-cell .feel {
  color: var(--text);
  font-size: 0.78rem;
  font-style: italic;
  margin-bottom: 4px;
}
.ti-cell .eg {
  font-size: 0.72rem;
  color: #fbbf24;
  margin-top: 4px;
}
.ti-cell .suno-tip {
  font-family: "DM Mono", monospace;
  font-size: 0.68rem;
  color: var(--accent);
  margin-top: 6px;
  padding: 3px 7px;
  background: rgba(192, 132, 252, 0.08);
  border-radius: 4px;
  display: inline-block;
}

/* INSTRUMENT FAMILY TABS */
.inst-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.inst-tab {
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}
.inst-tab.active,
.inst-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(192, 132, 252, 0.1);
}
.inst-family {
  display: none;
}
.inst-family.active {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* ── WAVEFORM SVG VISUALIZER ─────────────────────── */
.waveform-wrap {
  margin-top: 12px;
  padding: 10px 12px 8px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.waveform-label {
  font-family: "DM Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.waveform-wrap svg {
  width: 100%;
  height: 48px;
  display: block;
  overflow: visible;
}
.waveform-caption {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
  font-style: italic;
}

/* ── SUNO STUDIO TRACKS ───────────────────────────── */
.studio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.studio-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  transition:
    border-color 0.2s,
    transform 0.2s;
  position: relative;
}
.studio-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.studio-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
  display: block;
}
.studio-name {
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 4px;
}
.studio-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.studio-card p {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 8px;
}
.studio-wave {
  margin: 8px 0;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg);
}
.studio-wave svg {
  width: 100%;
  height: 100%;
}
.studio-prompts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}
.studio-prompt {
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  color: var(--accent);
  background: rgba(192, 132, 252, 0.08);
  border: 1px solid rgba(192, 132, 252, 0.2);
  border-radius: 5px;
  padding: 3px 8px;
  display: block;
}
.studio-when {
  font-size: 0.75rem;
  color: #34d399;
  margin-top: 4px;
  padding: 3px 8px;
  background: rgba(52, 211, 153, 0.07);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 5px;
}

/* ── LAYOUT FIXES ─────────────────────────────────── */
.cards {
  align-items: start; /* prevent cards stretching to match tallest */
}
.inst-tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  padding: 12px 0 8px;
  margin-bottom: 20px;
}

@media (max-width: 700px) {
  body {
    padding-top: 56px;
  }
  .topnav {
    padding: 0 12px;
    height: 56px;
    gap: 12px;
  }
  .topnav-brand {
    font-size: 1rem;
  }
  .topnav-links a {
    padding: 6px 10px;
    font-size: 0.78rem;
  }
  .section {
    scroll-margin-top: 64px;
  }
  .hero,
  .section,
  .toc {
    padding: 0 16px;
  }
  .hero {
    padding: 50px 16px 32px;
  }
  .copyable-prompt {
    padding-right: 34px;
  }
  .copyable-prompt .prompt-copy-btn {
    opacity: 1;
    pointer-events: auto;
    width: 20px;
    height: 20px;
    right: 6px;
    font-size: 0.68rem;
  }
  .prompt-example.copyable-prompt {
    padding-right: 38px;
  }
  .prompt-faq-summary {
    padding: 18px 18px;
    gap: 12px;
  }
  .prompt-faq-title {
    font-size: 0.72rem;
    letter-spacing: 1.2px;
  }
  .prompt-faq-body {
    padding: 0 18px 18px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .card-split-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .card-split-col,
  .card-split-col:last-child {
    padding: 0;
  }
  .card-split-col:first-child::after {
    display: none;
  }
  .studio-grid {
    grid-template-columns: 1fr;
  }
  .timeline {
    flex-wrap: wrap;
  }
  .tl-seg {
    min-width: 60px;
  }
  .tempo-inst-grid {
    grid-template-columns: 100px 1fr;
  }
  .ti-label {
    padding: 10px 8px;
    font-size: 0.65rem;
  }
  .ti-cell {
    min-width: 120px;
    padding: 10px;
    padding-right: 40px;
  }
  .ti-play-btn {
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
  }
  .inst-tabs {
    flex-wrap: wrap;
    gap: 6px;
  }
  table {
    font-size: 0.75rem;
  }
}

/* Index page: 2-col page links */
.toc-grid.page-links {
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.toc-item.page-link {
  padding: 20px 22px;
  align-items: flex-start;
  gap: 14px;
}
.toc-item.page-link .toc-icon {
  font-size: 1.5rem;
  margin-top: 2px;
}
.toc-item.page-link strong {
  display: block;
  margin-bottom: 4px;
}
.toc-item.page-link small {
  font-size: 0.8rem;
  line-height: 1.5;
}
@media (max-width: 700px) {
  .toc-grid.page-links {
    grid-template-columns: 1fr;
  }
}

/* PIANO MOCKUP */
.piano-section {
  max-width: none;
  margin: 0 0 32px;
  padding: 0;
}
.piano-section-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px 20px;
}
.piano-title {
  font-family: "Playfair Display", serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.piano-desc {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.5;
}
.piano-wrap {
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.piano {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 480px;
  height: 140px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}
.piano-key {
  border: none;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.piano-note-label {
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  user-select: none;
  pointer-events: none;
}
.piano-key.white {
  flex: 1;
  min-width: 28px;
  background: linear-gradient(180deg, #f8f6ff 0%, #e8e4f0 50%, #d4cee0 100%);
  border-right: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 0 0 6px 6px;
  transition: background 0.05s;
  color: rgba(42, 37, 50, 0.58);
  padding-bottom: 10px;
}
.piano-key.white:hover,
.piano-key.white:focus-visible {
  background: linear-gradient(180deg, #fff 0%, #eee 50%, #ddd 100%);
}
.piano-key.white:active,
.piano-key.white.pressed {
  background: linear-gradient(180deg, #d4cee0 0%, #c8c2d4 100%);
}
.piano-key.black {
  position: absolute;
  width: 10%;
  max-width: 32px;
  min-width: 20px;
  height: 88px;
  top: 0;
  background: linear-gradient(180deg, #2a2532 0%, #1a1620 100%);
  border: 1px solid rgba(0, 0, 0, 0.4);
  border-radius: 0 0 4px 4px;
  z-index: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: background 0.05s;
  color: rgba(240, 235, 255, 0.72);
  padding-bottom: 8px;
}
.piano-key.black:hover,
.piano-key.black:focus-visible {
  background: linear-gradient(180deg, #3a3542 0%, #2a2532 100%);
}
.piano-key.black:active,
.piano-key.black.pressed {
  background: linear-gradient(180deg, #1a1620 0%, #0e0c14 100%);
}
@media (max-width: 700px) {
  .piano-section {
    padding: 0;
  }
  .piano-section-inner {
    padding: 18px 12px 14px;
  }
  .piano {
    height: 120px;
    min-width: 360px;
  }
  .piano-key.white {
    min-width: 22px;
  }
  .piano-note-label {
    font-size: 0.54rem;
  }
  .piano-key.white {
    padding-bottom: 8px;
  }
  .piano-key.black {
    padding-bottom: 6px;
  }
}
