/*
 * The one real copy lives here in sangeet-yatra/css/; every room's copy is a
 * symlink to it. Edit this file — never a room's.
 * Audio Engines Owner — one product look across Sangeet Yatra.
 *
 * Default = practice parchment (singing / madal / tabla / piano interiors).
 * Add class "theme-journey" on <html> or <body> for hub / room landing pages.
 */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Literata:ital,opsz,wght@0,7..72,400;0,7..72,600;0,7..72,700;1,7..72,400&display=swap");

:root {
  /* Parchment */
  --bg: #fdf6e9;
  --panel: #fffaf0;
  --ink: #2c221a;
  --muted: #6e5e50;
  --terra: #b5451d;
  --terra-soft: #c8663a;
  --ochre: #b57c1e;
  --green: #5c7a4a;
  --blue: #3a6ea5;
  --line: #e7d8bf;
  --shadow: 0 6px 24px rgba(90, 60, 30, 0.10);
  --radius: 14px;

  /* Aliases so older piano CSS (--accent / --warm) maps onto parchment */
  --accent: #b5451d;
  --accent-soft: #c8663a;
  --warm: #b57c1e;

  /* Journey tokens (also available on parchment pages if needed) */
  --mist: #e8f0ec;
  --sand: #c4a574;
  --leaf: #2f6b5a;
  --leaf-deep: #1e463b;
  --glow: #f0d9a8;

  /* Occasional accents (piano quest CTA, etc.) */
  --sun: #f0b429;
  --sky: #3d8fd1;

  --font-sans: "Inter", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Literata", "Noto Serif Devanagari", Georgia, serif;
}

/* Dark. The same warm browns the reading pages use in the dark (home/atlas.css),
   so a reader moving between a book and a room does not change palette. Every
   colour a page reads is a token above, so this block is the whole switch; a page
   that writes a literal colour has to be moved onto a token. The hub and room
   landing pages (theme-journey) are already dark and keep their own. */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1c1612;
  --panel: #2a221c;
  --ink: #f3e6d4;
  --muted: #bdafa3;
  --terra: #f0b089;
  --terra-soft: #ffd0a8;
  --ochre: #e0b25a;
  --green: #8fb87a;
  --blue: #7fb0e0;
  --line: rgba(243, 230, 212, 0.18);
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  --accent: #f0b089;
  --accent-soft: #ffd0a8;
  --warm: #e0b25a;
  --mist: #2a3a34;
  --sand: #c4a574;
  --leaf: #7fc4ae;
  --leaf-deep: #a6dccb;
  --glow: #4a3b22;
  --sun: #f0b429;
  --sky: #7fb8e8;
  --hover: #3a2f26;
  --on-accent: #1c1612;
}
:root { --hover: #f3e6cf; --on-accent: #ffffff; }

/* Staves and diagrams are drawn in black on cream with colours written into the
   SVG itself, so there is no token to swap. In the dark they are inverted: black
   becomes white, and hue-rotate turns the inverted colours (a playhead, a
   highlighted note) back to their own. */
html[data-theme="dark"] svg:has(.vf-stave),
html[data-theme="dark"] svg.staff,
html[data-theme="dark"] .gstaff-wrap svg,
html[data-theme="dark"] .sr-fig-host svg,
html[data-theme="dark"] .sr-vex svg,
html[data-theme="dark"] #hn-staff svg,
html[data-theme="dark"] #diagram svg {
  filter: invert(1) hue-rotate(180deg);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.62;
}

a { color: var(--terra); }
a:hover { color: var(--terra-soft); }

h1, h2, .brand-display {
  font-family: var(--font-display);
  font-weight: 600;
}

/* —— Journey / landing (hub + room homes) —— */
html.theme-journey,
html.theme-journey body,
body.theme-journey {
  --ink: #1a2e28;
  --mist: #e8f0ec;
  --sand: #c4a574;
  --leaf: #2f6b5a;
  --leaf-deep: #1e463b;
  --glow: #f0d9a8;
  --line: rgba(232, 240, 236, 0.12);
  color: var(--mist);
  background:
    radial-gradient(ellipse 90% 70% at 15% 12%, rgba(47, 107, 90, 0.45), transparent 55%),
    radial-gradient(ellipse 70% 60% at 90% 80%, rgba(196, 165, 116, 0.16), transparent 50%),
    linear-gradient(165deg, #0c1814 0%, #152820 42%, #0a1411 100%);
  min-height: 100vh;
  line-height: 1.55;
}

html.theme-journey a,
body.theme-journey a {
  color: var(--glow);
}
html.theme-journey a:hover,
body.theme-journey a:hover {
  color: var(--sand);
}

/* —— Page shell ——
   Sidebar, main column and footer: the frame every book page is drawn in. It was
   written out in all 26 places that style a page — eight rooms' shared.css plus
   the singing, theory and tools pages, which carry theirs inline — and had
   drifted into two dialects, one 200px wide and one 230–240px. That is the same
   navigation on every page, so it is declared here once.

   Descendants are written `:where(.wrap) > nav a`, which carries exactly the
   specificity the rooms' own `nav a` did — one class-free ancestor, two type
   selectors — while matching only the sidebar. The scoping matters in both
   directions. A bare `nav a` would reach the hub index and room landing pages,
   whose navs are page content with their own styling. A plain `.wrap > nav a`
   would outrank `.sy-home` and the book-index accordion below and capture their
   links. And putting the whole thing inside :where() drops it to a single type
   selector, which then loses to any later `a` or `h2` rule — the accordion's
   links turned terracotta and the sidebar's headings grew to content size. */
.wrap {
  display: flex;
  max-width: 1180px;
  margin: 0 auto;
}

/* No top padding: the pinned hub link below holds that space itself. A sticky
   child parks below its container's padding, so padding here would be a strip
   above the pinned link that scrolling links show through. */
.wrap > nav {
  align-self: flex-start;
  position: sticky;
  top: 0;
  width: 200px;
  min-width: 200px;
  height: 100vh;
  overflow-y: auto;
  padding: 0 12px 18px;
  background: var(--panel);
  border-right: 1px solid var(--line);
}
body:has(> header.top) .wrap > nav {
  top: 48px;
  height: calc(100vh - 48px);
  transition: top 0.28s cubic-bezier(0.16, 1, 0.3, 1), height 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
body:has(> header.top.is-unpinned) .wrap > nav {
  top: 0;
  height: 100vh;
}

/* The top line sits above the left menu. The menu itself is unchanged; it
   just starts below that line so the two do not cover each other. */
body.sy-has-bar:not(.sy-front) > header.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
body.sy-has-bar:not(.sy-front) > header.top .lib-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.35rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.4rem 14px;
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--muted);
}
body.sy-has-bar:not(.sy-front) > header.top .lib-bar a {
  color: var(--terra);
  font-weight: 700;
  text-decoration: none;
}
body.sy-has-bar:not(.sy-front) > header.top .lib-bar a[aria-current="page"] {
  color: var(--ink);
}
body.sy-has-bar .wrap > nav {
  top: 2.7rem;
  height: calc(100vh - 2.7rem);
}
@media (max-width: 820px) {
  body.sy-has-bar:not(.sy-front) > header.top .lib-bar { padding-left: 6.4rem; }
  body.sy-has-bar .wrap > nav { top: 0; height: 100%; }
}

:where(.wrap) > nav .brand {
  display: block;
  margin: 0 0 6px;
  padding: 0 8px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--terra);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none;
}
:where(.wrap) > nav .brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
:where(.wrap) > nav .brand:hover { color: var(--terra-soft); }

:where(.wrap) > nav h2 {
  font-family: var(--font-sans);
  margin: 15px 0 4px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

:where(.wrap) > nav a {
  display: block;
  padding: 4px 8px;
  border-radius: 7px;
  color: var(--ink);
  font-size: 0.875rem;
  line-height: 1.3;
  text-decoration: none;
}
:where(.wrap) > nav a:hover { background: var(--hover); }
:where(.wrap) > nav a.sub {
  padding: 2px 8px 2px 18px;
  color: var(--muted);
  font-size: 0.78rem;
}
:where(.wrap) > nav a.sub:hover { color: var(--ink); }
:where(.wrap) > nav a.top { margin-top: 4px; font-weight: 600; }

main {
  flex: 1;
  min-width: 0;
  padding: 40px clamp(20px, 5vw, 56px);
}

footer {
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.sy-rooms-foot { margin-top: 0.75rem; font-size: 0.88rem; }
.sy-rooms-foot a { color: var(--terra); text-decoration: none; }
.sy-rooms-foot a:hover { color: var(--terra-soft, var(--terra)); }
.sy-foot-label {
  font-weight: 800;
  color: var(--ink);
  margin-right: 0.35rem;
}
.sy-rooms-foot .sy-foot-label:not(:first-of-type) { margin-left: 0.9rem; }

/* Rooms and tools, parked at the bottom of the sidebar until opened.
   Closed, it stays in view under the pinned home link. Open, it scrolls
   with the book so the lists are not a second card on top of the page. */
.sy-site-switcher {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 18px 0 0;
  background: var(--panel);
  border-top: 1px solid var(--line);
}
.sy-site-switcher[open] { position: static; }
.sy-switcher-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 8px 12px;
  cursor: pointer;
  list-style: none;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}
.sy-switcher-summary::-webkit-details-marker { display: none; }
.sy-switcher-summary::before {
  content: "\25B8";
  width: 10px;
  font-size: 9px;
  color: var(--muted);
}
.sy-site-switcher[open] > .sy-switcher-summary::before { content: "\25BE"; }
.sy-switcher-summary:hover { color: var(--terra); }
.sy-switcher-body { padding: 0 0 8px; }
.sy-switcher-group { margin: 0; }
.sy-switcher-label {
  margin: 8px 0 2px;
  padding: 0 8px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}
:where(.wrap) > nav .sy-switcher-group a {
  padding-top: 3px;
  padding-bottom: 3px;
}

/* Below this the sidebar becomes the drawer sangeet-mobile-nav.js builds, which
   reveals it again with `display: block !important`. Scoped to the sidebar so the
   hub index and room landing pages keep their own navs. */
@media (max-width: 820px) {
  .wrap > nav { display: none; }
}

/* —— Pinned hub link (left nav) ——
   The sidebar is its own scroll container, so `top: 0` pins this to the sidebar
   rather than to the page: home stays in reach from the bottom of a long book
   index. */
.sy-home {
  position: sticky;
  top: 0;
  z-index: 2;
  display: block;
  margin: 0 0 10px;
  padding: 18px 0 7px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--terra);
  text-decoration: none;
}
.sy-home:hover { color: var(--terra-soft); }

/* Sidebar controls: a zero-height sticky row over the right end of the pinned
   home link, so the switches cost the book index no room. The two buttons stack,
   because the home link's own name leaves room for one column, not two. */
.sy-controls {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 0;
  overflow: visible;
}
.sy-theme {
  position: absolute;
  top: 4px;
  right: 2px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.sy-lang {
  position: absolute;
  top: 34px;
  right: 2px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.sy-lang:hover { color: var(--terra); border-color: var(--terra); }
.sy-lang:focus-visible { outline: 2px solid var(--terra); outline-offset: 2px; }
/* A front page has no sidebar, so its language switch floats at the corner. */
.sy-lang-fab { position: fixed; top: 12px; right: 12px; z-index: 20; }
.sy-lang-fab .sy-lang { position: static; }
/* The line at the top of a lesson page that has no Nepali body yet. */
.sy-ne-note {
  margin: 0 0 1rem;
  padding: .55rem .8rem;
  border-left: 3px solid var(--ochre);
  background: var(--panel);
  color: var(--muted);
  font-size: .9rem;
}
.sy-theme:hover { color: var(--terra); border-color: var(--terra); }
.sy-theme:focus-visible { outline: 2px solid var(--terra); outline-offset: 2px; }
.sy-home:focus-visible { outline: 2px solid var(--terra); outline-offset: 2px; }

/* —— Book-index accordion (left nav) —— */
#sy-book-index { margin-top: 2px; }
.sy-book-theory { margin: 0; }
.sy-book-sec { margin-top: 6px; }
/* A one-page chapter is the page itself, lined up with the section titles. */
#sy-book-index a.sy-book-solo {
  display: block;
  margin-top: 6px;
  padding: 4px 8px;
  border-left: 0;
  border-radius: 7px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
#sy-book-index a.sy-book-solo:hover { background: #f3e6cf; }
#sy-book-index a.sy-book-solo:focus-visible {
  outline: 2px solid var(--terra); outline-offset: 2px;
}
#sy-book-index a.sy-book-solo[aria-current="page"] {
  color: var(--terra);
  font-weight: 700;
  background: transparent;
  border-left-color: transparent;
}
.sy-book-toggle {
  display: flex; align-items: center; gap: 6px;
  width: 100%; margin: 0; padding: 4px 8px;
  border: 0; background: transparent; border-radius: 7px;
  font: inherit; font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--muted); cursor: pointer; text-align: left;
}
.sy-book-toggle:hover { background: #f3e6cf; }
.sy-book-toggle:focus-visible {
  outline: 2px solid var(--terra); outline-offset: 2px;
}
.sy-book-toggle.is-here { color: var(--terra); font-weight: 700; }
.sy-book-chevron {
  display: inline-block; width: 10px; flex-shrink: 0;
  font-size: 9px; opacity: 0.7; line-height: 1;
}
.sy-book-chevron::before { content: "\25B8"; }
.sy-book-toggle[aria-expanded="true"] .sy-book-chevron::before { content: "\25BE"; }
.sy-book-pages { margin: 2px 0 0; }
#sy-book-index a {
  padding: 5px 8px 5px 22px;
  border-left: 3px solid transparent;
  border-radius: 6px;
}
.sy-book-theory a {
  padding: 4px 8px;
  border-left: none;
}
#sy-book-index a.sub { padding: 2px 8px 2px 28px; }
#sy-book-index .sy-book-group { margin: 6px 0 2px; }
#sy-book-index .sy-book-group-label {
  padding: 6px 8px 2px 22px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
#sy-book-index a[aria-current="page"] {
  font-weight: 400;
  color: var(--terra);
  background: transparent;
  border-left-color: var(--terra);
}
#sy-book-index a.sub[aria-current="page"] {
  font-size: 0.875rem;
}

/* Book pager — the previous and next chapter, built by sangeet-book-nav.js from
   the same index the sidebar draws. Prev sits left and next right even when only
   one of them exists, so the arrow a reader reaches for never moves. */
#sy-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 32px 0 8px;
}
#sy-pager a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
}
#sy-pager a:hover { border-color: var(--terra); background: #fdf6e9; }
#sy-pager a span {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted, #7a6a55);
}
#sy-pager a strong { font-size: 0.98rem; line-height: 1.3; }
/* The next link is the one being reached for, so it keeps the right-hand column
   and its own emphasis whether or not a previous link exists beside it. */
.sy-pager-prev span::before { content: "\2190\00a0"; }
.sy-pager-next {
  grid-column: 2;
  text-align: right;
  border-color: var(--terra) !important;
}
.sy-pager-next span::after { content: "\00a0\2192"; }
@media (max-width: 640px) {
  #sy-pager { grid-template-columns: 1fr; }
  .sy-pager-next { grid-column: 1; }
}

/* “From theory” banner — a room page saying which shared theory chapter it applies.
   Rooms already used the class; the look lives here so every room reads the same. */
.from-theory {
  background: #f3e6cf;
  border-left: 3px solid var(--terra);
  font-size: 0.92rem;
  margin: 0 0 1.2rem;
  padding: 10px 14px;
}
.from-theory strong { color: var(--ink); }

/* Compact data tables — size to content, don’t stretch full main width */
table {
  width: max-content;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}
th, td {
  padding: 0.4em 0.7em;
  vertical-align: top;
}
th {
  white-space: nowrap;
}

.from-theory a {
  color: var(--ink);
  font-weight: 700;
}

h1 .np {
  color: var(--terra);
}

.lead {
  font-size: 1.12rem;
  color: #4a3728;
  line-height: 1.6;
}

.note {
  background: #fbf1da;
  border-left: 5px solid var(--ochre);
  border-radius: 8px;
  color: #5a4a34;
  margin: 18px 0;
  padding: 12px 18px;
}

.tip {
  background: #eef3e7;
  border-left-color: var(--green);
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 18px 0;
  padding: 20px 22px;
}

/* Canonical buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--terra);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
}
.btn:hover {
  background: var(--terra-soft);
  color: #fff;
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn.ghost:hover {
  border-color: var(--terra);
  color: var(--terra);
}



/* Rhythm letters (sangeet-letters.js): the note value printed where a note starts,
   in the same letters the TAB row uses. */
.rl {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--terra, #b5451d);
  text-align: center;
  white-space: nowrap;
}
.rl.rl-rest { color: var(--muted, #7a6a58); font-weight: 500; }
table.grid tr.rl-row th.lane { font-size: .72rem; font-weight: 600; color: var(--muted, #7a6a58); }
table.grid tr.rl-row td { padding-top: 2px; padding-bottom: 2px; height: auto; background: transparent; }

/* A ♯ or ♭ in a monospace drill row takes exactly one cell, so a font that has to borrow
   the glyph cannot push the rest of the row out of its column. */
.accd { display: inline-block; width: 1ch; text-align: center; }

/* —— Option A Warm Parchment Front Pages (hub, tools, and all room covers) ——
   Uses only live parchment/dark CSS tokens so every front page respects the
   sitewide Light / Dark switch with zero flash between Home, Music, and lessons. */
body.sy-front {
  --sy-accent: var(--terra);
  background: var(--bg);
  color: var(--ink);
}
body.sy-front.sy-front-east { --sy-accent: var(--leaf); }
body.sy-front.sy-front-west { --sy-accent: var(--terra); }
body.sy-front.sy-front-both,
body.sy-front.sy-front-tools { --sy-accent: var(--ochre); }

body.sy-front main.hero,
body.sy-front main.page,
body.sy-front main.sy-cover {
  max-width: 58rem;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) clamp(18px, 4vw, 36px) 64px;
  position: relative;
}
body.sy-front.sy-has-bar main.hero,
body.sy-front.sy-has-bar main.page,
body.sy-front.sy-has-bar main.sy-cover {
  padding-bottom: 108px;
}

.sy-front-head {
  border-top: 3px solid var(--sy-accent);
  padding-top: 1.15rem;
  margin-bottom: 1.5rem;
}
.sy-front-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  margin: 0 0 0.9rem;
}
body.sy-front .sy-hub {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sy-accent);
  text-decoration: none;
  margin: 0;
}
body.sy-front .sy-hub:hover { text-decoration: underline; }
body.sy-front:has(header.top .lib-bar) .sy-hub { display: none; }

.sy-hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}
.sy-hero-copy { flex: 1; min-width: 0; }
.sy-hero-photo {
  width: 14rem;
  flex: 0 0 auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel);
}
.sy-hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
@media (max-width: 720px) {
  .sy-hero-row { flex-direction: column; }
  .sy-hero-photo { width: 100%; max-width: 22rem; }
}

body.sy-front .brand {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 4.1rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin: 0 0 0.25em;
}
body.sy-front .brand small {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.28em;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sy-accent);
  margin-top: 0.55em;
}
body.sy-front .tag {
  max-width: 40rem;
  font-size: clamp(1rem, 2vw, 1.14rem);
  line-height: 1.58;
  color: var(--ink);
  margin: 0 0 0.9rem;
}
body.sy-front .hint,
body.sy-front .tease,
body.sy-front .part-of {
  max-width: 40rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 1rem;
}
body.sy-front .part-of a,
body.sy-front .hint a { color: var(--sy-accent); font-weight: 600; }

/* Continue practicing pill & Start here strip */
.continue-pill {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  padding: 0.38rem 0.8rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--sy-accent);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.35;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.continue-pill[hidden] { display: none; }
.continue-pill:hover {
  border-color: var(--sy-accent);
  background: var(--hover);
  color: var(--ink);
}
.continue-k { font-weight: 700; color: var(--sy-accent); }
.continue-v { color: var(--ink); font-weight: 500; }

.start-strip { margin: 0 0 1.6rem; }
.start-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  margin: 0 0 0.65rem;
}
.start-label,
body.sy-front .apply,
body.sy-front .utils-label,
body.sy-front .appendix-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.6rem;
}
.start-head .start-label { margin: 0; }
.start-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 720px) {
  .start-grid { grid-template-columns: 1fr; }
}
.start-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.start-card:hover {
  border-color: var(--sy-accent);
  background: var(--hover);
  transform: translateY(-1px);
  color: inherit;
}
.start-card strong {
  display: block;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.18em;
}
.start-card span {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

/* Hub tracks & rooms */
body.sy-front .tracks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 720px) {
  body.sy-front .tracks { grid-template-columns: 1fr; }
}
body.sy-front .track {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 1.15rem 1.2rem 1.25rem;
}
body.sy-front .track.east { border-top: 3px solid var(--leaf); --track-accent: var(--leaf); }
body.sy-front .track.west { border-top: 3px solid var(--terra); --track-accent: var(--terra); }
body.sy-front .track.both { border-top: 3px solid var(--ochre); --track-accent: var(--ochre); grid-column: 1 / -1; }
body.sy-front .track h2 {
  margin: 0 0 0.18em;
  font-family: var(--font-sans);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
}
body.sy-front .track .sub {
  margin: 0 0 0.95rem;
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--muted);
}
body.sy-front .theory {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 0.82rem 0.95rem;
  margin-bottom: 0.9rem;
  background: var(--hover);
  border: 1px solid var(--line);
  border-left: 3px solid var(--track-accent, var(--sy-accent));
  border-radius: 8px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
body.sy-front .theory:hover { border-color: var(--track-accent, var(--sy-accent)); color: inherit; }
body.sy-front .theory strong {
  display: block;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.12em;
}
body.sy-front .theory span {
  font-size: 0.83rem;
  line-height: 1.4;
  color: var(--muted);
}
body.sy-front .track.both .apply { margin-top: 1.15rem; }
body.sy-front .rooms { display: flex; flex-direction: column; gap: 7px; }
body.sy-front .rooms-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 720px) {
  body.sy-front .rooms-grid { grid-template-columns: 1fr; }
}
body.sy-front .room {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 0.68rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
body.sy-front .room:hover {
  border-color: var(--track-accent, var(--sy-accent));
  background: var(--hover);
  transform: translateX(2px);
  color: inherit;
}
body.sy-front .room strong {
  display: block;
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--ink);
}
body.sy-front .room span {
  font-size: 0.8rem;
  line-height: 1.38;
  color: var(--muted);
}

/* Hub & Tools grids */
body.sy-front .utils-label { margin: 1.9rem 0 0.7rem; }
body.sy-front .tool-blocks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
  gap: 10px;
}
@media (max-width: 640px) {
  body.sy-front .tool-blocks { grid-template-columns: 1fr; }
}
body.sy-front .tool {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-decoration: none;
  color: inherit;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
body.sy-front .track .tool {
  padding: 0.68rem 0.85rem;
  border-radius: 8px;
  background: var(--bg);
}
body.sy-front .tool:hover {
  border-color: var(--ochre);
  background: var(--hover);
  transform: translateY(-1px);
  color: inherit;
}
body.sy-front .tool strong { font-size: 0.95rem; font-weight: 700; color: var(--ink); }
body.sy-front .tool span { font-size: 0.81rem; line-height: 1.42; color: var(--muted); }

/* Room starter paths (.paths / .path) */
body.sy-front .paths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 12px;
  margin: 0 0 1.6rem;
}
body.sy-front.sy-front-tools .paths {
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}
body.sy-front a.path {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 1rem 1.1rem;
  text-decoration: none;
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-left: 3.5px solid var(--sy-accent);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
body.sy-front a.path:hover {
  border-color: var(--sy-accent);
  background: var(--hover);
  transform: translateY(-2px);
  color: var(--ink);
}
body.sy-front a.path strong { font-size: 1.02rem; font-weight: 700; color: var(--ink); }
body.sy-front a.path span { font-size: 0.86rem; line-height: 1.45; color: var(--muted); }

/* Room curriculum maps (.appendix, .cluster, .pair-board, .tabs) */
body.sy-front .appendix { margin-top: 1.75rem; max-width: 100%; }
body.sy-front .cluster { margin: 0 0 1.35rem; }
body.sy-front .cluster-h {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 700;
  margin: 0 0 0.45rem;
}
body.sy-front .cluster-h em {
  font-style: normal;
  font-weight: 600;
  color: var(--sy-accent);
  margin-left: 0.45rem;
}
body.sy-front .cluster-note {
  margin: 0 0 0.55rem;
  font-size: 0.88rem;
  line-height: 1.48;
  color: var(--muted);
}
body.sy-front .cluster-ready {
  margin: 0.55rem 0 0;
  font-size: 0.84rem;
  line-height: 1.48;
  color: var(--muted);
}
body.sy-front .cluster-ready strong { color: var(--ink); }
body.sy-front .gym-advanced {
  margin: 0.75rem 0 0.45rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

body.sy-front .pair-board {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
}
body.sy-front .pair-head,
body.sy-front .pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16.5rem;
  gap: 10px 18px;
  align-items: center;
}
body.sy-front .pair-head {
  padding: 9px 16px 4px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
body.sy-front .pair {
  padding: 11px 16px;
  border-top: 1px solid var(--line);
}
body.sy-front .pair-board > .pair + .pair-head {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
body.sy-front .pair-read {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
body.sy-front .pair-path { list-style: decimal; padding-left: 1.2rem; }
body.sy-front .pair-path li { margin: 0; padding: 1px 0; }
body.sy-front .pair-path li::marker { color: var(--sy-accent); font-weight: 700; }
body.sy-front .pair-read a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.96rem;
}
body.sy-front .pair-read a:hover { color: var(--sy-accent); text-decoration: underline; }
body.sy-front .pair-read span { font-weight: 500; font-size: 0.85rem; color: var(--muted); }
body.sy-front .pair-lab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--on-accent);
  background: var(--sy-accent);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 14px;
  white-space: nowrap;
  transition: opacity 0.18s ease, transform 0.15s ease;
}
body.sy-front .pair-lab::before { content: "\25B6"; font-size: 0.72em; }
body.sy-front .pair-lab:hover { opacity: 0.9; transform: translateY(-1px); color: var(--on-accent); }
body.sy-front .pair-map {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.15s ease;
}
body.sy-front .pair-map span {
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: right;
}
body.sy-front .pair-map:hover { background: var(--hover); color: var(--sy-accent); }
body.sy-front .pair-board > .pair-map:first-child { border-top: none; }
@media (max-width: 640px) {
  body.sy-front .pair-head { display: none; }
  body.sy-front .pair-head,
  body.sy-front .pair { grid-template-columns: 1fr; }
  body.sy-front .pair-map { flex-direction: column; align-items: flex-start; gap: 2px; }
  body.sy-front .pair-map span { text-align: left; }
}

body.sy-front .tabs { display: flex; flex-wrap: wrap; gap: 8px; }
body.sy-front .tab {
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
body.sy-front .tab:hover {
  border-color: var(--sy-accent);
  background: var(--hover);
  color: var(--sy-accent);
}

/* Tools page Eastern/Western names switch & bottom links */
body.sy-front .names-ctl { margin: 0 0 1.4rem; color: var(--muted); font-size: 0.9rem; }
body.sy-front .utils {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 1.25rem;
}
body.sy-front .utils a,
body.sy-front .back a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--sy-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
body.sy-front .utils a:hover,
body.sy-front .back a:hover { border-bottom-color: var(--sy-accent); }
body.sy-front .back { margin-top: 2rem; font-size: 0.9rem; color: var(--muted); }

body.sy-front .foot {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
  line-height: 1.58;
  color: var(--muted);
  max-width: 44rem;
}
body.sy-front .foot a { color: var(--sy-accent); font-weight: 600; }
body.sy-front .foot code { font-size: 0.85em; color: var(--ink); }

/* Shared drill panels and filter controls (used across instrument & singing rooms) */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.controls label { font-size: 0.88rem; }
.controls select {
  font: inherit;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: inherit;
}

.drill {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin: 12px 0;
}
.drill h3 {
  margin: 0 0 6px;
  font-size: 1.08rem;
  color: var(--terra);
}
.drill .job {
  margin: 0 0 10px;
  font-size: 0.95rem;
}
.drill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 4px;
}

/* Shared Bhatkhande / Sargam notation tokens (singing & tools) */
.name {
  display: inline-block;
  position: relative;
  padding: 0 0.12em;
}
.name-komal {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.name-tivra,
.tok.name-tivra {
  position: relative;
  display: inline-block;
  padding-top: 0.42em;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 1.5px 0.38em;
  background-position: center 0.02em;
  background-repeat: no-repeat;
}
.name.oct-high::before {
  content: "\2022";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -85%);
  font-size: 0.55em;
  line-height: 1;
  color: inherit;
  text-decoration: none;
  pointer-events: none;
}
.name.oct-low::after {
  content: "\2022";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 70%);
  font-size: 0.55em;
  line-height: 1;
  color: inherit;
  text-decoration: none;
  pointer-events: none;
}
.sargam-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 8px 0 14px;
  font-family: ui-monospace, Consolas, monospace;
}
.sargam-line .tok {
  background: #f3e6cf;
  padding: 12px 7px 10px;
  border-radius: 6px;
  font-size: 0.88rem;
  min-width: 2em;
  text-align: center;
  position: relative;
  cursor: pointer;
  user-select: none;
}
.sargam-line .tok.on {
  background: var(--ochre);
  font-weight: 700;
}
.sargam-line .tok-gap {
  background: transparent;
  border: none;
  min-width: 0.75em;
  width: 0.75em;
  padding: 0;
  margin: 0 2px;
  pointer-events: none;
}
.sargam-line .tok-break {
  flex-basis: 100%;
  width: 100%;
  height: 6px;
  margin: 2px 0 0;
  padding: 0;
  background: transparent;
  pointer-events: none;
}



/* Lifted shared sargam, rhythm-strip, and table-end rules */
.legend-line .tok { cursor: default; }
.legend-line .tok.hold:hover { background: #f7efe2; }
.legend-line .tok.rest:hover { background: #efe8dc; }
.legend-line .tok:hover { background: #f3e6cf; }
.sargam-line .bow-group .tok .dur { display: none; }
.sargam-line .meend-group { display: inline-flex; flex-wrap: nowrap; align-items: stretch; gap: 1px; position: relative; margin: 0 2px 4px; padding-top: 7px; }
.sargam-line .meend-group::before { content: ''; position: absolute; left: 3px; right: 3px; top: 2px; height: 6px; border: 1.5px solid #6b5840; border-bottom: none; border-radius: 50% 50% 0 0; pointer-events: none; }
.sargam-line .murki-group { display: inline-flex; flex-wrap: nowrap; gap: 1px; align-items: stretch; position: relative; margin: 0 2px; padding-bottom: 2px; border: 1px dashed #9a7d52; border-radius: 6px; background: #faf6ee; }
.sargam-line .murki-group .murki-label { position: absolute; left: 4px; top: -0.55em; font-size: 0.55rem; font-weight: 700; color: var(--muted); background: #faf6ee; padding: 0 3px; line-height: 1; }
.sargam-line .phrase-group { display: inline-flex; flex-wrap: nowrap; align-items: stretch; gap: 2px; position: relative; margin: 0 3px 6px; padding: 0 1px; }
.sargam-line .phrase-group::after { content: ''; position: absolute; left: 1px; right: 1px; top: 100%; height: 12px; margin-top: 3px; border: 1.5px solid #6b5840; border-top: none; border-radius: 0 0 45% 45%; pointer-events: none; }
.sargam-line .tok .dur { display: none; }
.sargam-line .tok .lyric.is-hold { color: var(--muted); font-weight: 600; }
.sargam-line .tok.comment { background: transparent; color: var(--muted); font-style: normal; font-weight: 600; font-family: inherit; font-size: 0.92rem; min-width: auto; padding: 0 6px; cursor: default; border: 1px dashed var(--line); border-radius: 5px; text-align: left; align-self: stretch; }
.sargam-line .tok.comment:hover { background: #faf3e6; }
.sargam-line .tok.hold.half { min-width: 0.65em; padding-left: 2px; padding-right: 2px; }
.sargam-line .tok.hold.on { background: var(--ochre); color: var(--ink); }
.sargam-line .tok.repeat { background: transparent; border: none; color: var(--muted); font-family: ui-monospace, Consolas, monospace; font-weight: 700; font-size: 0.92rem; letter-spacing: 0; min-width: 0; padding: 6px 2px; margin: 0 1px; display: inline-flex; align-items: center; align-self: stretch; line-height: 1; }
.sargam-line .tok.repeat:hover { background: transparent; color: var(--ink); }
.sargam-line .tok.rest { background: #efe8dc; color: var(--muted); font-style: normal; font-weight: 700; }
.sargam-line .tok.rest.on { background: var(--ochre); color: var(--ink); }
.sargam-line .tok:hover { background: #ead7b4; }
.sargam-line.has-lyrics { row-gap: 16px; }
.sargam-line.has-lyrics .bow-group { margin-bottom: 2px; }
.sargam-line.has-lyrics .phrase-group { margin-bottom: 8px; }
.taal-cycle-strip { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 0 0 8px; padding: 8px 10px; background: #f7f2e8; border: 1px dashed var(--line); border-radius: 8px; font-size: 0.82rem; color: var(--muted); }
.taal-cycle-strip .lab { font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.72rem; }
.taal-cycle-strip .taal-mark-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 1.35em; padding: 2px 6px; border-radius: 6px; background: #fffdf8; border: 1px solid var(--line); font-weight: 800; color: var(--terra); font-family: ui-monospace, Consolas, monospace; }
.tune-bar-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; border: 1px solid var(--line); background: #fffdf8; color: var(--ink); }
.tune-bar-chip.empty { border-style: dashed; color: var(--muted); font-weight: 600; }
.tune-bar-chip.ok { border-color: #6a8f5a; background: #eef6ea; color: #2d4a24; }
.tune-bar-chip.warn { border-color: #c49a3a; background: #faf3e0; color: #5c4518; }
.tune-bar-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tune-bar-meter { margin: 0 0 12px; padding: 10px 12px; background: #faf3e6; border: 1px solid var(--line); border-radius: var(--radius); }
.tune-bar-meter .tune-bar-hint { margin: 0 0 8px; font-size: 0.86rem; color: var(--muted); line-height: 1.45; }
.tune-preview { width: 100%; box-sizing: border-box; overflow: auto; -webkit-overflow-scrolling: touch; margin: 8px 0 14px; padding: 8px 10px; background: #fffdf8; border: 1px solid var(--line); border-radius: 12px; min-height: 12rem; }
.tune-sample { margin: 10px 0 0; padding: 10px 12px; background: #fffdf8; border: 1px solid var(--line); border-radius: 8px; overflow: auto; font-size: .86rem; line-height: 1.45; font-family: ui-monospace, Consolas, monospace; }
.tune-sample .lab { display: block; font-family: var(--font-sans, inherit); font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.tune-taal-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 0 0 10px; padding: 10px 12px; background: #faf3e6; border: 1px solid var(--line); border-radius: var(--radius); }
.tune-taal-row .hint { font-size: 0.82rem; color: var(--muted); font-weight: 500; }
.tune-taal-row label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; font-weight: 600; }
.tune-taal-row select { padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; }
td .legend-line { margin: 2px 0; }
tr:last-child td { border-bottom: none; }
code { background: #f3e6cf; border-radius: 5px; font-size: .9em; padding: 1px 6px; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid #d8ccb6; }
.toc { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin: 14px 0 0; padding: 0; background: transparent; border: none; position: static; width: auto; height: auto; min-width: 0; overflow: visible; }
.toc a { display: inline; padding: 0; border: none; border-radius: 0; color: var(--terra); font-size: 0.95rem; line-height: 1.4; text-decoration: none; }
.toc a:hover { background: transparent; color: var(--terra-soft); text-decoration: underline; }

/* BEGIN DARK (generated by scripts/gen_dark.py; do not edit) */
html[data-theme="dark"] body {
  color: var(--ink);
  background: var(--bg);
}
html[data-theme="dark"] a {
  color: var(--terra);
}
html[data-theme="dark"] a:hover {
  color: var(--terra-soft);
}
html[data-theme="dark"] .wrap > nav {
  background: var(--panel);
  border-right: 1px solid var(--line);
}
html[data-theme="dark"] body.sy-has-bar:not(.sy-front) > header.top {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
html[data-theme="dark"] body.sy-has-bar:not(.sy-front) > header.top .lib-bar {
  color: var(--muted);
}
html[data-theme="dark"] body.sy-has-bar:not(.sy-front) > header.top .lib-bar a {
  color: var(--terra);
}
html[data-theme="dark"] body.sy-has-bar:not(.sy-front) > header.top .lib-bar a[aria-current="page"] {
  color: var(--ink);
}
html[data-theme="dark"] :where(.wrap) > nav .brand {
  border-bottom: 1px solid var(--line);
  color: var(--terra);
}
html[data-theme="dark"] :where(.wrap) > nav .brand small {
  color: var(--muted);
}
html[data-theme="dark"] :where(.wrap) > nav .brand:hover {
  color: var(--terra-soft);
}
html[data-theme="dark"] :where(.wrap) > nav h2 {
  color: var(--muted);
}
html[data-theme="dark"] :where(.wrap) > nav a {
  color: var(--ink);
}
html[data-theme="dark"] :where(.wrap) > nav a:hover {
  background: var(--hover);
}
html[data-theme="dark"] :where(.wrap) > nav a.sub {
  color: var(--muted);
}
html[data-theme="dark"] :where(.wrap) > nav a.sub:hover {
  color: var(--ink);
}
html[data-theme="dark"] footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
}
html[data-theme="dark"] .sy-rooms-foot a {
  color: var(--terra);
}
html[data-theme="dark"] .sy-rooms-foot a:hover {
  color: var(--terra-soft, var(--terra));
}
html[data-theme="dark"] .sy-foot-label {
  color: var(--ink);
}
html[data-theme="dark"] .sy-site-switcher {
  background: var(--panel);
  border-top: 1px solid var(--line);
}
html[data-theme="dark"] .sy-switcher-summary {
  color: var(--ink);
}
html[data-theme="dark"] .sy-switcher-summary::before {
  color: var(--muted);
}
html[data-theme="dark"] .sy-switcher-summary:hover {
  color: var(--terra);
}
html[data-theme="dark"] .sy-switcher-label {
  color: var(--muted);
}
html[data-theme="dark"] .sy-home {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  color: var(--terra);
}
html[data-theme="dark"] .sy-home:hover {
  color: var(--terra-soft);
}
html[data-theme="dark"] .sy-theme {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
}
html[data-theme="dark"] .sy-lang {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
}
html[data-theme="dark"] .sy-lang:hover {
  color: var(--terra);
  border-color: var(--terra);
}
html[data-theme="dark"] .sy-lang:focus-visible {
  outline: 2px solid var(--terra);
}
html[data-theme="dark"] .sy-ne-note {
  border-left: 3px solid var(--ochre);
  background: var(--panel);
  color: var(--muted);
}
html[data-theme="dark"] .sy-theme:hover {
  color: var(--terra);
  border-color: var(--terra);
}
html[data-theme="dark"] .sy-theme:focus-visible {
  outline: 2px solid var(--terra);
}
html[data-theme="dark"] .sy-home:focus-visible {
  outline: 2px solid var(--terra);
}
html[data-theme="dark"] #sy-book-index a.sy-book-solo {
  border-left: 0;
  color: var(--muted);
}
html[data-theme="dark"] #sy-book-index a.sy-book-solo:hover {
  background: #2f2616;
}
html[data-theme="dark"] #sy-book-index a.sy-book-solo:focus-visible {
  outline: 2px solid var(--terra);
}
html[data-theme="dark"] #sy-book-index a.sy-book-solo[aria-current="page"] {
  color: var(--terra);
  background: transparent;
  border-left-color: transparent;
}
html[data-theme="dark"] .sy-book-toggle {
  border: 0;
  background: transparent;
  color: var(--muted);
}
html[data-theme="dark"] .sy-book-toggle:hover {
  background: #2f2616;
}
html[data-theme="dark"] .sy-book-toggle:focus-visible {
  outline: 2px solid var(--terra);
}
html[data-theme="dark"] .sy-book-toggle.is-here {
  color: var(--terra);
}
html[data-theme="dark"] #sy-book-index a {
  border-left: 3px solid transparent;
}
html[data-theme="dark"] .sy-book-theory a {
  border-left: none;
}
html[data-theme="dark"] #sy-book-index .sy-book-group-label {
  color: var(--muted);
}
html[data-theme="dark"] #sy-book-index a[aria-current="page"] {
  color: var(--terra);
  background: transparent;
  border-left-color: var(--terra);
}
html[data-theme="dark"] #sy-pager a {
  border: 1.5px solid var(--line);
  color: var(--ink);
}
html[data-theme="dark"] #sy-pager a:hover {
  border-color: var(--terra);
  background: #2c210f;
}
html[data-theme="dark"] #sy-pager a span {
  color: var(--muted, #b8afa3);
}
html[data-theme="dark"] .sy-pager-next {
  border-color: var(--terra) !important;
}
html[data-theme="dark"] .from-theory {
  background: #2f2616;
  border-left: 3px solid var(--terra);
}
html[data-theme="dark"] .from-theory strong {
  color: var(--ink);
}
html[data-theme="dark"] .from-theory a {
  color: var(--ink);
}
html[data-theme="dark"] h1 .np {
  color: var(--terra);
}
html[data-theme="dark"] .lead {
  color: #d2c5ba;
}
html[data-theme="dark"] .note {
  background: #2f2610;
  border-left: 5px solid var(--ochre);
  color: #c5baab;
}
html[data-theme="dark"] .tip {
  background: #202519;
  border-left-color: var(--green);
}
html[data-theme="dark"] .card {
  background: var(--panel);
  border: 1px solid var(--line);
}
html[data-theme="dark"] .btn {
  background: #b5451d;
  color: #ffffff;
  border: none;
}
html[data-theme="dark"] .btn:hover {
  background: #c8663a;
  color: #ffffff;
}
html[data-theme="dark"] .btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
html[data-theme="dark"] .btn.ghost:hover {
  border-color: var(--terra);
  color: var(--terra);
}
html[data-theme="dark"] .rl {
  color: var(--terra, #d79a84);
}
html[data-theme="dark"] .rl.rl-rest {
  color: var(--muted, #b7aea4);
}
html[data-theme="dark"] table.grid tr.rl-row th.lane {
  color: var(--muted, #b7aea4);
}
html[data-theme="dark"] table.grid tr.rl-row td {
  background: transparent;
}
html[data-theme="dark"] body.sy-front {
  background: var(--bg);
  color: var(--ink);
}
html[data-theme="dark"] .sy-front-head {
  border-top: 3px solid var(--sy-accent);
}
html[data-theme="dark"] body.sy-front .sy-hub {
  color: var(--sy-accent);
}
html[data-theme="dark"] .sy-hero-photo {
  border: 1px solid var(--line);
  background: var(--panel);
}
html[data-theme="dark"] body.sy-front .brand {
  color: var(--ink);
}
html[data-theme="dark"] body.sy-front .brand small {
  color: var(--sy-accent);
}
html[data-theme="dark"] body.sy-front .tag {
  color: var(--ink);
}
html[data-theme="dark"] body.sy-front .hint,
html[data-theme="dark"] body.sy-front .tease,
html[data-theme="dark"] body.sy-front .part-of {
  color: var(--muted);
}
html[data-theme="dark"] body.sy-front .part-of a,
html[data-theme="dark"] body.sy-front .hint a {
  color: var(--sy-accent);
}
html[data-theme="dark"] .continue-pill {
  border: 1px solid var(--line);
  border-left: 3px solid var(--sy-accent);
  background: var(--panel);
  color: var(--ink);
}
html[data-theme="dark"] .continue-pill:hover {
  border-color: var(--sy-accent);
  background: var(--hover);
  color: var(--ink);
}
html[data-theme="dark"] .continue-k {
  color: var(--sy-accent);
}
html[data-theme="dark"] .continue-v {
  color: var(--ink);
}
html[data-theme="dark"] .start-label,
html[data-theme="dark"] body.sy-front .apply,
html[data-theme="dark"] body.sy-front .utils-label,
html[data-theme="dark"] body.sy-front .appendix-label {
  color: var(--muted);
}
html[data-theme="dark"] .start-card {
  color: inherit;
  border: 1px solid var(--line);
  background: var(--panel);
}
html[data-theme="dark"] .start-card:hover {
  border-color: var(--sy-accent);
  background: var(--hover);
  color: inherit;
}
html[data-theme="dark"] .start-card strong {
  color: var(--ink);
}
html[data-theme="dark"] .start-card span {
  color: var(--muted);
}
html[data-theme="dark"] body.sy-front .track {
  border: 1px solid var(--line);
  background: var(--panel);
}
html[data-theme="dark"] body.sy-front .track.east {
  border-top: 3px solid var(--leaf);
}
html[data-theme="dark"] body.sy-front .track.west {
  border-top: 3px solid var(--terra);
}
html[data-theme="dark"] body.sy-front .track.both {
  border-top: 3px solid var(--ochre);
}
html[data-theme="dark"] body.sy-front .track h2 {
  color: var(--ink);
}
html[data-theme="dark"] body.sy-front .track .sub {
  color: var(--muted);
}
html[data-theme="dark"] body.sy-front .theory {
  color: inherit;
  background: var(--hover);
  border: 1px solid var(--line);
  border-left: 3px solid var(--track-accent, var(--sy-accent));
}
html[data-theme="dark"] body.sy-front .theory:hover {
  border-color: var(--track-accent, var(--sy-accent));
  color: inherit;
}
html[data-theme="dark"] body.sy-front .theory strong {
  color: var(--ink);
}
html[data-theme="dark"] body.sy-front .theory span {
  color: var(--muted);
}
html[data-theme="dark"] body.sy-front .room {
  color: inherit;
  border: 1px solid var(--line);
  background: var(--bg);
}
html[data-theme="dark"] body.sy-front .room:hover {
  border-color: var(--track-accent, var(--sy-accent));
  background: var(--hover);
  color: inherit;
}
html[data-theme="dark"] body.sy-front .room strong {
  color: var(--ink);
}
html[data-theme="dark"] body.sy-front .room span {
  color: var(--muted);
}
html[data-theme="dark"] body.sy-front .tool {
  color: inherit;
  border: 1px solid var(--line);
  background: var(--panel);
}
html[data-theme="dark"] body.sy-front .track .tool {
  background: var(--bg);
}
html[data-theme="dark"] body.sy-front .tool:hover {
  border-color: var(--ochre);
  background: var(--hover);
  color: inherit;
}
html[data-theme="dark"] body.sy-front .tool strong {
  color: var(--ink);
}
html[data-theme="dark"] body.sy-front .tool span {
  color: var(--muted);
}
html[data-theme="dark"] body.sy-front a.path {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-left: 3.5px solid var(--sy-accent);
}
html[data-theme="dark"] body.sy-front a.path:hover {
  border-color: var(--sy-accent);
  background: var(--hover);
  color: var(--ink);
}
html[data-theme="dark"] body.sy-front a.path strong {
  color: var(--ink);
}
html[data-theme="dark"] body.sy-front a.path span {
  color: var(--muted);
}
html[data-theme="dark"] body.sy-front .cluster-h {
  color: var(--ink);
}
html[data-theme="dark"] body.sy-front .cluster-h em {
  color: var(--sy-accent);
}
html[data-theme="dark"] body.sy-front .cluster-note {
  color: var(--muted);
}
html[data-theme="dark"] body.sy-front .cluster-ready {
  color: var(--muted);
}
html[data-theme="dark"] body.sy-front .cluster-ready strong {
  color: var(--ink);
}
html[data-theme="dark"] body.sy-front .gym-advanced {
  color: var(--muted);
}
html[data-theme="dark"] body.sy-front .pair-board {
  border: 1px solid var(--line);
  background: var(--panel);
}
html[data-theme="dark"] body.sy-front .pair-head {
  color: var(--muted);
}
html[data-theme="dark"] body.sy-front .pair {
  border-top: 1px solid var(--line);
}
html[data-theme="dark"] body.sy-front .pair-board > .pair + .pair-head {
  border-top: 1px solid var(--line);
}
html[data-theme="dark"] body.sy-front .pair-path li::marker {
  color: var(--sy-accent);
}
html[data-theme="dark"] body.sy-front .pair-read a {
  color: var(--ink);
}
html[data-theme="dark"] body.sy-front .pair-read a:hover {
  color: var(--sy-accent);
}
html[data-theme="dark"] body.sy-front .pair-read span {
  color: var(--muted);
}
html[data-theme="dark"] body.sy-front .pair-lab {
  color: var(--on-accent);
  background: var(--sy-accent);
  border: 1px solid transparent;
}
html[data-theme="dark"] body.sy-front .pair-lab:hover {
  color: var(--on-accent);
}
html[data-theme="dark"] body.sy-front .pair-map {
  border-top: 1px solid var(--line);
  color: var(--ink);
}
html[data-theme="dark"] body.sy-front .pair-map span {
  color: var(--muted);
}
html[data-theme="dark"] body.sy-front .pair-map:hover {
  background: var(--hover);
  color: var(--sy-accent);
}
html[data-theme="dark"] body.sy-front .pair-board > .pair-map:first-child {
  border-top: none;
}
html[data-theme="dark"] body.sy-front .tab {
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
}
html[data-theme="dark"] body.sy-front .tab:hover {
  border-color: var(--sy-accent);
  background: var(--hover);
  color: var(--sy-accent);
}
html[data-theme="dark"] body.sy-front .names-ctl {
  color: var(--muted);
}
html[data-theme="dark"] body.sy-front .utils a,
html[data-theme="dark"] body.sy-front .back a {
  color: var(--sy-accent);
  border-bottom: 1px solid transparent;
}
html[data-theme="dark"] body.sy-front .utils a:hover,
html[data-theme="dark"] body.sy-front .back a:hover {
  border-bottom-color: var(--sy-accent);
}
html[data-theme="dark"] body.sy-front .back {
  color: var(--muted);
}
html[data-theme="dark"] body.sy-front .foot {
  border-top: 1px solid var(--line);
  color: var(--muted);
}
html[data-theme="dark"] body.sy-front .foot a {
  color: var(--sy-accent);
}
html[data-theme="dark"] body.sy-front .foot code {
  color: var(--ink);
}
html[data-theme="dark"] .controls {
  background: var(--panel);
  border: 1px solid var(--line);
}
html[data-theme="dark"] .controls select {
  border: 1px solid var(--line);
  background: var(--bg);
  color: inherit;
}
html[data-theme="dark"] .drill {
  background: var(--panel);
  border: 1px solid var(--line);
}
html[data-theme="dark"] .drill h3 {
  color: var(--terra);
}
html[data-theme="dark"] .name.oct-high::before {
  color: inherit;
}
html[data-theme="dark"] .name.oct-low::after {
  color: inherit;
}
html[data-theme="dark"] .sargam-line .tok {
  background: #2f2616;
}
html[data-theme="dark"] .sargam-line .tok.on {
  background: #6b4e14;
}
html[data-theme="dark"] .sargam-line .tok-gap {
  background: transparent;
  border: none;
}
html[data-theme="dark"] .sargam-line .tok-break {
  background: transparent;
}
html[data-theme="dark"] .legend-line .tok.hold:hover {
  background: #2a2214;
}
html[data-theme="dark"] .legend-line .tok.rest:hover {
  background: #29231a;
}
html[data-theme="dark"] .legend-line .tok:hover {
  background: #2f2616;
}
html[data-theme="dark"] .sargam-line .meend-group::before {
  border: 1.5px solid #6b5840;
  border-bottom: none;
}
html[data-theme="dark"] .sargam-line .murki-group {
  border: 1px dashed #9a7d52;
  background: #262013;
}
html[data-theme="dark"] .sargam-line .murki-group .murki-label {
  color: var(--muted);
  background: #262013;
}
html[data-theme="dark"] .sargam-line .phrase-group::after {
  border: 1.5px solid #6b5840;
  border-top: none;
}
html[data-theme="dark"] .sargam-line .tok .lyric.is-hold {
  color: var(--muted);
}
html[data-theme="dark"] .sargam-line .tok.comment {
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--line);
}
html[data-theme="dark"] .sargam-line .tok.comment:hover {
  background: #2a2212;
}
html[data-theme="dark"] .sargam-line .tok.hold.on {
  background: #6b4e14;
  color: var(--ink);
}
html[data-theme="dark"] .sargam-line .tok.repeat {
  background: transparent;
  border: none;
  color: var(--muted);
}
html[data-theme="dark"] .sargam-line .tok.repeat:hover {
  background: transparent;
  color: var(--ink);
}
html[data-theme="dark"] .sargam-line .tok.rest {
  background: #29231a;
  color: var(--muted);
}
html[data-theme="dark"] .sargam-line .tok.rest.on {
  background: #6b4e14;
  color: var(--ink);
}
html[data-theme="dark"] .sargam-line .tok:hover {
  background: #352c1a;
}
html[data-theme="dark"] .taal-cycle-strip {
  background: #272115;
  border: 1px dashed var(--line);
  color: var(--muted);
}
html[data-theme="dark"] .taal-cycle-strip .taal-mark-chip {
  background: #2a210b;
  border: 1px solid var(--line);
  color: var(--terra);
}
html[data-theme="dark"] .tune-bar-chip {
  border: 1px solid var(--line);
  background: #2a210b;
  color: var(--ink);
}
html[data-theme="dark"] .tune-bar-chip.empty {
  color: var(--muted);
}
html[data-theme="dark"] .tune-bar-chip.ok {
  border-color: #6a8f5a;
  background: #1c2517;
  color: #c1d5bb;
}
html[data-theme="dark"] .tune-bar-chip.warn {
  border-color: #6c5c37;
  background: #2c2512;
  color: #ddcdad;
}
html[data-theme="dark"] .tune-bar-meter {
  background: #2a2212;
  border: 1px solid var(--line);
}
html[data-theme="dark"] .tune-bar-meter .tune-bar-hint {
  color: var(--muted);
}
html[data-theme="dark"] .tune-preview {
  background: #2a210b;
  border: 1px solid var(--line);
}
html[data-theme="dark"] .tune-sample {
  background: #2a210b;
  border: 1px solid var(--line);
}
html[data-theme="dark"] .tune-sample .lab {
  color: var(--muted);
}
html[data-theme="dark"] .tune-taal-row {
  background: #2a2212;
  border: 1px solid var(--line);
}
html[data-theme="dark"] .tune-taal-row .hint {
  color: var(--muted);
}
html[data-theme="dark"] .tune-taal-row select {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}
html[data-theme="dark"] tr:last-child td {
  border-bottom: none;
}
html[data-theme="dark"] code {
  background: #2f2616;
}
html[data-theme="dark"] .swatch {
  border: 1px solid #504737;
}
html[data-theme="dark"] .toc {
  background: transparent;
  border: none;
}
html[data-theme="dark"] .toc a {
  border: none;
  color: var(--terra);
}
html[data-theme="dark"] .toc a:hover {
  background: transparent;
  color: var(--terra-soft);
}
/* END DARK */

/* BEGIN DARK TOKENS (generated by scripts/gen_dark.py; do not edit) */
html[data-theme="dark"] {
  --dk-bg-f3e6cf: #2f2616;
  --dk-bg-faf6f0: #251e14;
  --dk-bg-fdfbf7: #251e11;
  --dk-bg-fff0f0: #2c0b0b;
  --dk-bg-fffcf8: #2a1d0b;
  --dk-fg-166534: #a6ddbb;
  --dk-fg-2f6f9f: #8eb2cc;
  --dk-fg-7a6a58: #b7aea4;
  --dk-fg-a9741b: #d7b884;
  --dk-fg-c9b8a0: #cbbba4;
  --dk-line-e6ded2: #4a4134;
  --dk-line-e7ddcd: #4d4332;
  --dk-line-ede8e1: #463e34;
}
/* END DARK TOKENS */
