/* Singbud app theme: the homepage's look (css/home.css) carried into the app. Loaded after every other sheet.
   Near-white ground with pale cyan waves, navy text, teal actions, one coral accent, pill buttons, Outfit and Lexend.
   The older sheets all read these tokens, so most of the change happens here at the top.
   --coral was the app's action colour, so it now holds teal; the real coral accent is --accent. */
:root {
  --mint: #fdfefe;
  --mint-brand: #f1fbfd;
  --bg-2: #f1fbfd;
  --wave: #d3f6fb;
  --wave-2: #e8fbfd;
  --teal-wash: #e4f8fa;
  --teal-text: #0a7580;
  --cream: #f1fbfd;
  --cream-deep: #e3e8f1;
  --teal: #17b6c2;
  --teal-dark: #0b7f8a;
  --teal-deeper: #096d77;
  --belly: #c9f1f3;
  --coral: #0b7f8a;
  --coral-dark: #096d77;
  --coral-text: #c8402f;
  --accent: #f4594b;
  --blush: #e4f8fa;
  --ink: #111640;
  --ink-soft: #4a5178;
  --yellow: #c4f3f8;
  --sun: #e8fbfd;
  --sun-deep: #c9f1f3;
  --dash: #bcc5d8;
  --panel: #ffffff;
  --line: #e3e8f1;
  --line-strong: #cfd6e4;

  --font-head: 'Outfit', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Lexend', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;

  --sh-card: 0 0 0 1px var(--line), 0 10px 26px -20px rgba(20, 40, 90, 0.28);
  --sh-raise: 0 0 0 1px var(--line), 0 18px 40px -22px rgba(20, 40, 90, 0.32);
  --sh-solid: 0 12px 24px -14px rgba(11, 127, 138, 0.9);
  --sh-press: 0 0 0 1px var(--line);
  --ring: 0 0 0 3px rgba(23, 182, 194, 0.32);

  --r-card: 22px;
  --r-lg: 26px;
  --r-btn: 999px;
}

body { font-weight: 300; }
strong, b { font-weight: 500; }
h1, h2, h3, .page-title, .today-title, .ob-title, .card-title { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.015em; }
.page-title, .ob-title, .today-title { font-weight: 800; }
.eyebrow { font-family: var(--font-head); font-weight: 700; letter-spacing: 0.04em; color: var(--teal-text); }
:focus-visible { outline-color: var(--teal-dark); }

/* The page: near-white, with one pale wave behind the top of every tabbed page. */
body { background: var(--mint); }
.app-main { position: relative; isolation: isolate; }
.app-main::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  left: 0; right: 0; top: 0; height: 230px;
  background: linear-gradient(180deg, var(--wave-2) 0%, rgba(232, 251, 253, 0) 100%);
}

/* Buttons: pills, teal for the one main action. */
.btn { border-radius: 999px; font-family: var(--font-head); font-weight: 600; letter-spacing: 0; }
.btn-primary {
  --sh-card: 0 12px 24px -14px rgba(11, 127, 138, 0.9);
  background: var(--teal-dark); color: #fff;
}
.btn-primary:hover { background: var(--teal-deeper); }
.btn-primary:active { background: #075a63; }
.btn-secondary, .btn-ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-secondary:hover, .btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--teal-dark); }
.btn-link { font-family: var(--font-body); font-weight: 400; color: var(--ink); text-decoration-color: var(--teal); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.btn-link.danger { color: var(--coral-text); text-decoration-color: currentColor; }

/* Cards: white on near-white, a hairline and a soft navy shadow. */
.card, .hcard { background: #fff; border-radius: var(--r-card); }
.today { background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-raise); }

/* Tabs and side rail */
.tabs { background: #fff; box-shadow: 0 -1px 0 var(--line); }
.tab { font-family: var(--font-head); font-weight: 600; }
.tab.is-on { color: var(--teal-text); }
.tab.is-on .ic { background: var(--teal-wash); color: var(--teal-text); }
.tab.is-on .ic .ic-fill { fill: var(--teal); }
.avatar { box-shadow: inset 0 0 0 2px var(--ink); }
.rail-brand { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.02em; }
@media (min-width: 960px) {
  .tabs { background: #fff; box-shadow: inset -1px 0 0 var(--line); }
  .tab.is-on, .tab.is-on:hover { background: var(--teal-wash); color: var(--teal-text); }
  .app-main::before { height: 280px; }
}

/* ---------- Bud's ear: what happened, line by line (js/bud-ear.js) ---------- */
.ear { margin: 16px auto 0; max-width: 560px; display: grid; gap: 12px; text-align: left; }
.ear-sum { margin: 0; display: grid; gap: 10px; padding: 14px 16px; border-radius: 18px; background: var(--bg-2); }
.ear-sum > div { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: baseline; }
.ear-sum dt { font-family: var(--font-head); font-weight: 700; font-size: 0.86rem; color: var(--teal-text); }
.ear-sum dd { margin: 0; font-weight: 400; font-size: 0.98rem; line-height: 1.42; color: var(--ink); }
.lc { padding: 16px; border-radius: 22px; background: #fff; box-shadow: var(--sh-card); display: grid; gap: 12px; }
.lc[hidden] { display: none; }
.lc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.lc-head b { font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; }
.lc-head small { font-size: 0.84rem; font-weight: 400; color: var(--ink-soft); white-space: nowrap; }
.lc-words { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: flex-start; }
.lc-word { display: grid; justify-items: start; gap: 1px; }
.lc-word b { font-family: var(--font-head); font-weight: 600; font-size: 1.16rem; line-height: 1.25; padding-bottom: 2px; border-bottom: 3px solid var(--teal); }
.lc-word small { font-size: 0.72rem; font-weight: 400; line-height: 1.2; color: var(--ink-soft); }
.lc-word.m-low b, .lc-word.m-high b { border-bottom-color: var(--accent); }
.lc-word.m-low small, .lc-word.m-high small { color: var(--coral-text); font-weight: 500; }
.lc-word.m-late b, .lc-word.m-sag b, .lc-word.m-shaky b { border-bottom-style: dashed; }
.lc-word.m-quiet b { color: var(--ink-soft); border-bottom-color: var(--dash); border-bottom-style: dotted; }
.lc-lane { width: 100%; height: 92px; border-radius: 14px; background: var(--bg-2); }
.lc-target { fill: #d4f3f6; stroke: var(--teal); stroke-width: 1; vector-effect: non-scaling-stroke; }
.lc-sung { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.lc-sung.on { stroke: var(--teal-dark); }
.lc-sung.off { stroke: var(--accent); }
.lc-say { margin: 0; font-weight: 400; font-size: 1rem; line-height: 1.45; }
.lc-replay { justify-self: start; }
.lc-nav { display: flex; align-items: center; justify-content: center; gap: 14px; }
.lc-arrow { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; color: var(--ink); }
.lc-arrow:hover:not([disabled]) { box-shadow: inset 0 0 0 1.5px var(--teal-dark); }
.lc-arrow[disabled] { opacity: 0.4; cursor: default; }
.lc-arrow .ic { width: 20px; height: 20px; }
.lc-dots { display: flex; gap: 6px; }
.lc-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.lc-dots i.on { background: var(--teal-dark); }

/* The result: what happened first, then hearing the take, then the buttons. */
.ex-result > .ear { order: 1 !important; width: 100%; }
.ex-result > .ex-listen { order: 2 !important; width: 100%; max-width: 560px; margin-top: 12px; }
.ex-result > .ex-result-actions { order: 3 !important; width: 100%; }
.ex-listen .btn { box-shadow: inset 0 0 0 1.5px var(--line); background: #fff; color: var(--ink); padding-inline: 20px; }
.ex-listen .btn.btn-primary { background: #fff; color: var(--ink); }
.ex-listen .btn .ic { stroke: currentColor; }
.ex-listen .btn .ic .ic-fill { fill: var(--teal-dark); stroke: var(--teal-dark); }
.sc-result .ear { grid-column: 1 / -1; width: 100%; margin-top: 4px; }

/* ---------- Songs: your song first ---------- */
.bring { display: grid; gap: 14px; padding: 18px; border-radius: var(--r-lg); background: #fff; box-shadow: var(--sh-raise); margin-bottom: 14px; }
.bring-head { display: grid; grid-template-columns: 62px 1fr; gap: 12px; align-items: center; }
.bring-bud { width: 62px; display: block; }
.bring h2 { font-size: 1.3rem; font-weight: 800; line-height: 1.15; }
.bring p { margin: 4px 0 0; font-size: 0.94rem; color: var(--ink-soft); line-height: 1.4; }
.bring > .btn { width: 100%; }
.bring-mine { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.bring-mine li { border-bottom: 1px solid var(--line); }
.bring-mine a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; text-decoration: none; }
.bring-mine b { font-family: var(--font-head); font-weight: 600; }
.bring-mine .ic { width: 18px; height: 18px; color: var(--ink-soft); flex: none; }
.way-rows { display: grid; margin: 4px 0 14px; border-radius: 18px; background: #fff; box-shadow: var(--sh-card); overflow: hidden; }
.way-row { display: grid; grid-template-columns: 40px 1fr 18px; gap: 12px; align-items: center; min-height: 64px; padding: 10px 14px; text-decoration: none; color: var(--ink); }
.way-row + .way-row { border-top: 1px solid var(--line); }
.way-row:hover { background: var(--bg-2); }
.way-row .way-ic { grid-row: auto; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--teal-wash); color: var(--teal-text); }
.way-row .way-ic .ic { width: 21px; height: 21px; }
.way-row .way-ic .ic .ic-fill { fill: var(--teal); }
.way-text { display: grid; }
.way-text b { font-family: var(--font-head); font-weight: 600; font-size: 1rem; line-height: 1.2; }
.way-text small { font-size: 0.84rem; color: var(--ink-soft); line-height: 1.3; }
.way-row > .ic { width: 18px; height: 18px; color: var(--ink-soft); }
.warmups { margin-bottom: 14px; }
.warmups > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--bg-2); }
.warmups > summary::-webkit-details-marker { display: none; }
.warmups > summary > .ic { width: 18px; height: 18px; flex: none; color: var(--ink-soft); transition: transform 0.2s; }
.warmups[open] > summary > .ic { transform: rotate(90deg); }
.warmups-text { display: grid; }
.warmups-text b { font-family: var(--font-head); font-weight: 600; }
.warmups-text small { font-size: 0.84rem; color: var(--ink-soft); }
.warmups .songs-tools { margin-top: 14px; }
.today-parts { color: var(--ink-soft); font-weight: 400; }

/* ---------- Leftovers from the warm palette ---------- */
:root { --track: #e8edf5; --good-text: #0a7580; }
.sc-stars i.on { color: var(--teal-dark); }
.sc-result, .sc-result.is-pass { background: none; box-shadow: none; padding: 8px 0 0; }
.sc-result.is-mini { padding: 14px 0; }
.piano .k-label { fill: #7a81a3; }
.seg-switch { background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.seg-switch a[aria-current] { color: var(--teal-text); }
@media (min-width: 720px) { .bring > .btn { justify-self: start; width: auto; min-width: 280px; } }

/* ---------- How to do this ---------- */
.px-how { display: block; margin-top: 4px; padding: 4px 0; background: none; border: 0; cursor: pointer; font-family: var(--font-body); font-weight: 400; font-size: 0.86rem; color: var(--teal-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--teal); }
.how { text-align: left; max-height: 52vh; overflow-y: auto; }
.how-h { margin: 12px 0 2px; font-family: var(--font-head); font-weight: 700; font-size: 0.92rem; color: var(--teal-text); }
.how-h:first-child { margin-top: 0; }
.how-p { margin: 0; font-size: 0.98rem; line-height: 1.45; font-weight: 400; }
.sc-drop-ic .sc-eq { display: none; }

/* ---------- Voice-first welcome (Nov 2026) ---------- */
.hello-free { margin: 0; text-align: center; font-size: 0.88rem; color: var(--ink-soft); }
.hello-voice .hello-body { max-width: 30ch; }
.win { max-width: 560px; margin: 0 auto; }
.win .eyebrow { margin-bottom: 8px; }
.win-title { font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.4rem); line-height: 1.18; }
.win-title .squiggle-line path { animation: draw-on 0.9s cubic-bezier(.6, 0, .3, 1) 0.7s both; }
.win.is-in .piano .k-w.on { fill: var(--teal); }
.win.is-in .piano .k-b.on { fill: var(--teal-deeper); }

/* ---------- "Which song?": three ways to bring it ---------- */
button.way-row { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.sc-ask .ob-hint { margin-bottom: 0; }
.sc-ways { margin: 20px 0 0; text-align: left; }
.sc-ways .way-ic .ic { stroke: currentColor; }
.sc-notnow { display: block; margin: 18px auto 0; }

/* ---------- Others: everything outside the main path ---------- */
.others-group + .others-group { margin-top: 6px; }
.others-h { margin: 14px 4px 8px; font-family: var(--font-head); font-weight: 700; font-size: 0.86rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); }
.mysong .bring { margin-top: 4px; }
/* The short hello has room for the privacy promise on every phone. */
.hello.hello-voice .privacy-line { display: flex; margin-left: auto; margin-right: auto; }

/* The result: where they start (level and measured skills), then their notes. */
.win-start { margin-top: 18px; }
.win-start .level-line { margin-top: 8px; }
.win-start .card-note { margin-top: 12px; }
.win-notes { margin-top: 12px; }
.win.is-in .skill-fill { transform: scaleX(var(--v)); }
.win.is-in .skill-word { opacity: 1; }

/* ---------- The lesson: words, the mix, moving on ---------- */
.sc-line-words { margin: 4px 0 0; font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; line-height: 1.3; color: var(--ink-soft); overflow-wrap: anywhere; }
.sc-mix { display: grid; gap: 8px; margin: 14px auto 0; max-width: 420px; padding: 12px 14px; border-radius: 16px; background: #fff; box-shadow: var(--sh-card); }
.sc-mix-row { display: grid; grid-template-columns: 56px 1fr 44px; align-items: center; gap: 10px; font-size: 0.9rem; font-weight: 600; }
.sc-mix-row b { text-align: right; font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.sc-mix-row input[type="range"] { width: 100%; accent-color: var(--teal); }
.sc-aside { width: 100%; margin: 0 0 6px; font-size: 0.92rem; color: var(--ink-soft); text-align: center; }
.sc-words-all { margin-top: 10px; }
.sc-node.is-later .sc-node-ic { opacity: 0.55; }
.sc-lyrics-input { width: 100%; min-height: 180px; font-family: var(--font-body); font-size: 0.98rem; line-height: 1.45; resize: vertical; }
.sc-plan-head .sc-continue { margin-top: 8px; }

/* ---------- Tell me more, and the song report ---------- */
.lc-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 10px; }
.lc-more { padding: 6px 0; font-size: 0.92rem; }
.sc-pattern { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--teal-wash); color: var(--teal-text); font-weight: 600; }
.report { width: 100%; max-width: 560px; margin: 16px auto 0; padding: 16px 18px; border-radius: 18px; background: #fff; box-shadow: var(--sh-card); text-align: left; }
.sc-report { padding: 0; margin-top: 14px; }
.sc-report .report { margin: 0; box-shadow: none; max-width: none; }
.report-sub { margin: 2px 0 10px; font-size: 0.88rem; color: var(--ink-soft); }
.report-strong { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.report-strong li { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--teal-text); }
.report-strong .ic { width: 18px; height: 18px; flex: none; }
.report-fixes { margin: 0; padding: 0 0 0 1.2em; display: grid; gap: 12px; }
.report-fixes li b { display: block; font-family: var(--font-head); font-weight: 700; }
.report-fixes li span { display: block; margin: 2px 0 8px; font-size: 0.94rem; color: var(--ink-soft); line-height: 1.4; }
.report-none { margin: 0; color: var(--ink-soft); }

.sc-free-note { margin: 10px 0 0; font-size: 0.88rem; color: var(--ink-soft); }
.sc-node.is-locked .sc-node-ic { background: var(--bg-2); color: var(--ink-soft); }
.sc-soft { width: 100%; margin: 10px 0 0; text-align: center; font-size: 0.92rem; color: var(--ink-soft); }
.sc-soft a { color: var(--teal-text); font-weight: 600; }

/* ---------- Lesson on desktop: Sing stays on screen (Nov 2026 desktop pass) ---------- */
/* The speed and the singer/band mix sit beside the Sing button, and the lane takes what the window leaves. */
.sc-tside { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.sc-tside .sc-mix { margin: 0; width: 100%; max-width: 340px; }
@media (min-width: 900px) {
  .sc-lane { height: clamp(220px, calc(100vh - 510px), 460px); }
  .sc-run .sc-coach { margin: 10px 0 8px; }
  .sc-run .sc-steps { margin-top: 8px; }
  .sc-run .sc-step { padding: 6px 10px; }
}
@media (max-width: 640px) {
  .sc-tside { display: contents; }
  .sc-transport { grid-template-areas: "mix mix" "go go" "speed repeat"; }
  .sc-tside .sc-mix { grid-area: mix; justify-self: stretch; max-width: 420px; margin: 0 auto; }
  .sc-transport > .sc-go { grid-area: go; }
}

/* ---------- Lesson result: one centred column ---------- */
.sc-result:not(.is-mini) { max-width: 640px; margin-left: auto; margin-right: auto; grid-template-columns: 1fr 1fr; }
.sc-result:not(.is-mini) > .sc-ring { justify-self: end; }
.sc-result:not(.is-mini) > .sc-result-text { justify-self: start; }
@media (max-width: 640px) { .sc-result:not(.is-mini) { grid-template-columns: 1fr; } .sc-result:not(.is-mini) > .sc-ring, .sc-result:not(.is-mini) > .sc-result-text { justify-self: center; } }
.sc-result:not(.is-mini) .sc-result-actions { justify-content: center; }
.sc-result:not(.is-mini) .ear { max-width: none; }

/* ---------- #/coach: one question, then your songs ---------- */
.sc-home.sc-learn { max-width: 560px; }
.sc-home .sc-hero-bud { margin-top: 8px; margin-bottom: 14px; }
.sc-home .sc-demo { display: inline-flex; align-items: center; gap: 6px; margin: 22px auto 0; }
.sc-home .sc-demo .ic { width: 18px; height: 18px; }
.sc-home.is-over .sc-ways { outline: 3px dashed var(--teal); outline-offset: 8px; border-radius: 20px; }

/* ---------- Your key: one line, the rest folded ---------- */
.sc-key-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sc-key .sc-key-head h2 { margin: 0; }
.sc-key-now { font-family: var(--font-head); font-weight: 700; color: var(--teal-text); }
.sc-key .sc-key-msg { margin: 6px 0 0; font-weight: 400; color: var(--ink-soft); line-height: 1.45; }
.sc-key-more { margin-top: 10px; }
.sc-key-more > summary { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; list-style: none; font-weight: 700; color: var(--teal-text); padding: 4px 0; }
.sc-key-more > summary::-webkit-details-marker { display: none; }
.sc-key-more > summary .ic { width: 16px; height: 16px; transition: transform 180ms ease; }
.sc-key-more[open] > summary .ic { transform: rotate(90deg); }
.sc-key-more[open] > summary { margin-bottom: 12px; }

/* ---------- Home on desktop: stat tiles at their own height ---------- */
@media (min-width: 900px) {
  .home-side > .stat-grid:last-child { flex: none; align-content: start; }
  .home-side .stat-tile { height: auto; }
}

/* ---------- My song and Others: a readable column on wide screens ---------- */
.page.mysong, .page.others { max-width: 760px; }
.my-how { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.my-how li { display: flex; align-items: flex-start; gap: 12px; }
.my-how-n { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--teal-wash, #E3F6F3); color: var(--teal-text); font-family: var(--font-head); font-weight: 700; }
.my-how b { display: block; font-family: var(--font-head); }
.my-how small { display: block; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.4; }
@media (min-width: 900px) { .my-how { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Practice: one group at a time ---------- */
.px-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.px-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; font-size: 0.92rem; border: 0; border-radius: 99px; cursor: pointer; background: var(--white); color: var(--ink); font-weight: 600; box-shadow: var(--sh-card); }
.px-chip .ic { width: 18px; height: 18px; color: var(--teal-text); }
.px-chip[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.px-chip[aria-pressed="true"] .ic { color: currentColor; }
.px-cat { margin-top: 20px; }
.px-how { justify-self: start; text-align: left; }
@media (min-width: 900px) { .px-list { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); } }
@media (max-width: 640px) {
  .px-cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 18px -16px 0; padding: 4px 16px 8px; }
  .px-cats::-webkit-scrollbar { display: none; }
  .px-chip { flex: none; }
}
