/* The /guide/ page: the long walk through everything Music Pitch Changer does.
   It sits on Veritheme (vendor CSS + /assets/chrome.css, the site's shared frame) and
   only adds what the design system has no name for: the numbered points and the drawn
   interfaces inside the step cards. The page's own pieces are Veritheme components — the
   start cards (vt-card + vt-icon-badge), the contents and end cards (vt-card) and the
   eight parts (one accordion, data-vt-accordion).

   The drawings are markup and CSS, never screenshots: they stay sharp, they follow the
   system theme, and the words in them are real interface strings, so a translator moves
   them with the rest of the page (every visible string carries data-i18n).

   The site's policy is `style-src 'self'`, so there is not one inline style attribute
   here: every position of a callout number, slider or flag is a class below.

   Numbers: a point in the left column and the circle on the picture carry the same
   number, so "3" in the text is the thing ringed "3" in the drawing. */

:root {
  /* The names the drawings were written with (they came from site.css), now pointing at
     Veritheme tokens, so the pictures follow the theme and dark mode of the design system. */
  --bg: hsl(var(--vt-surface-page));
  --surface: hsl(var(--vt-surface-card));
  --subtle: hsl(var(--vt-surface-subtle));
  --ink: hsl(var(--vt-foreground-primary));
  --ink-2: hsl(var(--vt-foreground-primary));
  --muted: hsl(var(--vt-foreground-secondary));
  --line: hsl(var(--vt-border-default));
  --line-strong: hsl(var(--vt-border-strong));
  --brand: hsl(var(--vt-brand-fill));
  --brand-text: hsl(var(--vt-brand-fill));
  --brand-soft: hsl(var(--vt-brand-fill) / 0.08);
  --on-brand: hsl(var(--vt-on-brand));
  --radius: var(--vt-radius-xl);
  --radius-lg: var(--vt-radius-2xl);
  --font: var(--vt-font-family-base);
  --mono: var(--vt-font-family-mono);
  --shadow: 0 0 0 0 transparent;
  /* the drawn browser and the drawn windows keep their own greys, so a picture never
     melts into the page it sits on (same values as the Welcome page uses) */
  --g-frame: hsl(0 0% 88%);
  --g-chrome: hsl(0 0% 100%);
  --g-omni: hsl(0 0% 94%);
  --g-paper: hsl(0 0% 97%);
  --g-glyph: hsl(0 0% 36%);
  --g-skel: hsl(0 0% 82%);
  --g-edge: hsl(0 0% 78%);
  --g-screen: hsl(0 0% 13%);
  --g-pop-shadow: 0 0 0 1px hsl(0 0% 84%), 0 18px 36px -14px rgb(0 0 0 / 0.35);
  /* The gauge is the one thing on this page that is NOT brand blue: the extension paints
     the travelled arc by how far the key has moved — green near the original, through
     amber and orange, red at an octave (levelColor(), apps/extension/src/ui/gauge.ts:13-21).
     The drawings show +2 semitones, so this is levelColor(2/12) exactly; the sRGB line is
     the fallback for a browser without oklch. It is the same in both themes, as in the
     extension, which computes it from the value and not from the theme. */
  --g-level: #4fc94d;
  --g-level: oklch(0.740 0.197 143.0);
  --g-knob: hsl(0 0% 100%);
  --g-knob-edge: hsl(0 0% 72%);
}
@media (prefers-color-scheme: dark) {
  :root {
    --g-frame: hsl(0 0% 14%);
    --g-chrome: hsl(0 0% 20%);
    --g-omni: hsl(0 0% 11%);
    --g-paper: hsl(0 0% 11%);
    --g-glyph: hsl(0 0% 76%);
    --g-skel: hsl(0 0% 32%);
    --g-edge: hsl(0 0% 30%);
    --g-screen: hsl(0 0% 8%);
    --g-pop-shadow: 0 0 0 1px hsl(0 0% 26%), 0 18px 36px -14px rgb(0 0 0 / 0.7);
    --g-knob: hsl(0 0% 94%);
    --g-knob-edge: hsl(0 0% 30%);
  }
}

/* ---------- the first screen ---------- */

/* The page head, the start cards, the contents and the parts accordion are shared with /help/:
   /assets/chrome.css (site-lead, site-steps, site-toc, site-parts …). */


/* ---------- a step: text on the left, the drawn interface on the right ---------- */

.g-step { margin-top: 18px; padding: 28px 30px; background: var(--surface); border-radius: var(--radius-lg); border: var(--vt-border-width-thin) solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) 384px; gap: 36px; align-items: start; }
.g-step > div { min-width: 0; }
.g-step h3 { font-size: 1.1875rem; line-height: 1.3; letter-spacing: -0.015em; font-weight: 650; }
.g-step > div > p { margin-top: 8px; color: var(--muted); font-size: 1rem; line-height: 1.55; }
.g-plain { display: block; }

.g-points { counter-reset: pt; margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 15px; }
/* the number is taken out of the flow, so the bold lead-in and the sentence after it
   stay one running paragraph instead of two columns */
.g-points > li { counter-increment: pt; position: relative; padding-left: 38px; color: var(--ink-2); font-size: 1rem; line-height: 1.55; }
.g-points > li::before { content: counter(pt); position: absolute; left: 0; top: 2px; }
.g-points b { font-weight: 650; color: var(--ink); }

/* the circle: the same object in the text and on the picture */
.g-points > li::before, .g-mark {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: var(--on-brand); font: 700 0.75rem/1 var(--font); font-variant-numeric: tabular-nums;
}
.g-at { position: relative; }
.g-mark { position: absolute; z-index: 6; box-shadow: 0 0 0 2px var(--surface), 0 2px 8px -2px rgb(0 0 0 / 0.5); }
.g-mark.tl { top: -11px; left: -11px; }
.g-mark.tr { top: -11px; right: -11px; }
.g-mark.bl { bottom: -11px; left: -11px; }
.g-mark.br { bottom: -11px; right: -11px; }
.g-mark.lm { left: -13px; top: 50%; margin-top: -12px; }
.g-mark.rm { right: -13px; top: 50%; margin-top: -12px; }
.g-mark.lx { left: -34px; top: 50%; margin-top: -12px; }
.g-mark.rx { right: -34px; top: 50%; margin-top: -12px; }

.g-fig { position: relative; margin: 0; padding: 2px 14px; }
.g-fig-note { margin-top: 12px; text-align: center; color: var(--muted); font-size: 0.8125rem; }

/* ---------- the drawn Chrome window ---------- */

.g-win { position: relative; border-radius: 14px; overflow: hidden; background: var(--g-frame); box-shadow: 0 0 0 1px var(--g-edge); font-size: 13px; line-height: 1.3; color: var(--ink); }
.g-tabs { display: flex; align-items: flex-end; gap: 6px; height: 38px; padding: 0 10px; }
.g-dots { display: flex; gap: 6px; align-self: center; margin-right: 8px; }
.g-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--g-skel); }
.g-tab { height: 29px; min-width: 0; padding: 0 13px; display: flex; align-items: center; gap: 8px; background: var(--g-chrome); border-radius: 9px 9px 0 0; }
.g-tab-fav { flex: none; width: 15px; height: 15px; border-radius: 5px; background: var(--g-skel); }
.g-skel { display: block; height: 8px; border-radius: 4px; background: var(--g-skel); flex: none; }
.g-skel-ver { width: 46px; height: 7px; }
.g-tab .g-skel { width: 78px; }

.g-bar { display: flex; align-items: center; gap: 9px; height: 46px; padding: 0 9px; background: var(--g-chrome); }
.g-navi { display: flex; gap: 7px; color: var(--g-glyph); }
.g-bar svg { width: 18px; height: 18px; }
.g-omni { flex: 1; min-width: 0; height: 31px; border-radius: 16px; padding: 0 13px; display: flex; align-items: center; gap: 8px; background: var(--g-omni); color: var(--muted); overflow: hidden; }
.g-omni svg { width: 12px; height: 12px; flex: none; }
.g-omni .g-skel { width: 140px; max-width: 58%; }
.g-ti { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--g-glyph); }
.g-ti img { width: 20px; height: 20px; }
.g-ava { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--g-skel); }

/* Chrome's own badge under the icon */
.g-badge-num { position: absolute; right: 1px; bottom: 2px; min-width: 17px; height: 13px; padding: 0 3px; border-radius: 4px; background: var(--brand); color: var(--on-brand); font: 700 9px/13px var(--font); text-align: center; font-variant-numeric: tabular-nums; }
.g-badge-num.is-grey { background: hsl(0 0% 55%); }

.g-page { position: relative; background: var(--g-paper); }
.g-page-pop { display: flex; justify-content: flex-end; padding: 10px 30px 16px; }
.g-page-video { padding: 14px; }

/* a video playing on the page, with the extension's label over it */
.g-screen { position: relative; border-radius: 8px; background: var(--g-screen); aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; }
.g-screen-play { width: 44px; height: 44px; border-radius: 50%; background: rgb(255 255 255 / 0.16); display: grid; place-items: center; }
.g-screen-play svg { width: 20px; height: 20px; color: #fff; }
.g-screen-bar { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 4px; border-radius: 2px; background: rgb(255 255 255 / 0.25); }
.g-screen-bar i { display: block; width: 38%; height: 100%; border-radius: 2px; background: hsl(0 85% 58%); }
.g-toast { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; background: rgb(0 0 0 / 0.74); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; }

/* ---------- the extension's own windows ---------- */

.g-pop { width: min(300px, 100%); background: var(--bg); border-radius: 12px; box-shadow: var(--g-pop-shadow); }
.g-panel { width: 100%; max-width: 340px; margin: 0 auto; background: var(--bg); border-radius: 14px; box-shadow: var(--g-pop-shadow); font-size: 13px; line-height: 1.35; }
.g-pop, .g-panel { color: var(--ink); }

.g-head { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 11px; border-bottom: 1px solid var(--line); }
.g-head img { width: 21px; height: 21px; flex: none; }
.g-head-name { font-weight: 650; flex: 1; min-width: 0; font-size: 14px; }
.g-badge { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--subtle); color: var(--ink-2); white-space: nowrap; }
.g-badge.is-live { background: var(--brand-soft); color: var(--brand-text); }
.g-gear { flex: none; width: 24px; height: 24px; display: grid; place-items: center; color: var(--muted); }
.g-gear svg { width: 16px; height: 16px; }

.g-body { padding: 11px 12px 14px; display: grid; gap: 11px; }
.g-card { padding: 11px 12px 13px; border-radius: 11px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.g-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.g-card-head h4 { margin: 0; font-size: 13.5px; font-weight: 650; color: var(--ink); }
.g-mini { font-size: 12px; color: var(--muted); }
.g-rule { height: 1px; margin: 11px 0 10px; background: var(--line); }
.g-link { font-size: 12px; color: var(--brand-text); font-weight: 600; }
.g-links { display: flex; gap: 14px; }

.g-now { display: flex; align-items: center; gap: 10px; }
.g-fav { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--g-skel); }
.g-lines { flex: 1; min-width: 0; display: grid; gap: 6px; }
.g-lines .g-skel:first-child { width: 72%; }
.g-lines .g-skel:last-child { width: 42%; height: 6px; }

/* the key card */
.g-keyrow { display: flex; align-items: center; justify-content: center; gap: 12px; }
.g-kbtn { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; font-weight: 600; color: var(--ink-2); background: var(--surface); box-shadow: 0 0 0 1px var(--line-strong), 0 1px 0 var(--line-strong); }
.g-gauge { position: relative; flex: none; width: 104px; padding-bottom: 11px; }
.g-gauge-dot { fill: var(--line-strong); }
.g-gauge-dot.is-zero { fill: var(--muted); }
/* the extension paints the dots the arc has passed in the arc's own colour */
.g-gauge-dot.is-on { fill: var(--g-level); }
.g-gauge-knob { fill: var(--g-knob); stroke: var(--g-knob-edge); stroke-width: 2; }
.g-gauge-end { position: absolute; bottom: 0; transform: translateX(-50%); font-size: 9px; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums; }
.g-gauge-end.is-min { left: 21.7%; }
.g-gauge-end.is-max { left: 78.3%; }
.g-gauge svg { width: 100%; height: auto; }
.g-gauge path { fill: none; stroke-width: 10; stroke-linecap: round; }
.g-gauge-track { stroke: var(--line-strong); }
.g-gauge-fill { stroke: var(--g-level); }
.g-gauge-mid { position: absolute; inset: 0 0 11px; padding-top: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.g-gauge-mid b { font-size: 25px; line-height: 1.05; font-weight: 700; font-variant-numeric: tabular-nums; }
.g-gauge-mid i { font-style: normal; font-size: 11px; color: var(--muted); }
.g-words { margin: 9px 0 0; text-align: center; font-size: 12px; color: var(--muted); }

/* sliders */
.g-range { position: relative; height: 6px; border-radius: 3px; background: var(--line-strong); margin: 10px 0 8px; }
.g-range i { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--brand); }
.g-range b { position: absolute; top: 50%; width: 15px; height: 15px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 1px var(--line-strong), 0 1px 3px rgb(0 0 0 / 0.3); }
.g-range.is-seek i { left: 0; width: 28%; }
.g-range.is-seek b { left: 28%; }
.g-range.is-speed i { left: 37.5%; width: 12.5%; }
.g-range.is-speed b { left: 37.5%; }
.g-range.is-tune i { left: 18%; width: 32%; }
.g-range.is-tune b { left: 18%; }

.g-rowsb { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.g-rowsb b { color: var(--ink-2); font-weight: 600; }
.g-hint { margin: 8px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--muted); }

.g-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.g-chip { padding: 6px 6px; border-radius: 8px; background: var(--surface); box-shadow: 0 0 0 1px var(--line-strong), 0 1px 0 var(--line-strong); font-size: 10.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.g-chip.is-on { background: var(--brand-soft); color: var(--brand-text); box-shadow: 0 0 0 1.5px var(--brand); }

/* transport and the A-B loop */
.g-times { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.g-transport { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 9px; }
.g-tbtn { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--ink-2); background: var(--surface); box-shadow: 0 0 0 1px var(--line-strong), 0 1px 0 var(--line-strong); }
.g-tbtn svg { width: 15px; height: 15px; }
.g-play { width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; }
.g-play svg { width: 16px; height: 16px; }
.g-ab { display: flex; gap: 8px; margin-top: 9px; }
.g-abbtn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 0; border-radius: 8px; background: var(--surface); box-shadow: 0 0 0 1px var(--line-strong); font-size: 12px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.g-abbtn em { font-style: normal; color: var(--muted); font-weight: 700; }
.g-editor { position: relative; height: 44px; margin-top: 9px; border-radius: 8px; background: var(--subtle); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.g-wave { position: absolute; inset: 0; display: flex; align-items: center; gap: 2px; padding: 0 6px; }
.g-wave i { flex: 1; border-radius: 1px; background: var(--line-strong); height: 30%; }
.g-wave i:nth-child(3n) { height: 62%; }
.g-wave i:nth-child(4n) { height: 46%; }
.g-wave i:nth-child(5n) { height: 76%; }
.g-wave i:nth-child(7n) { height: 22%; }
.g-sel { position: absolute; top: 0; bottom: 0; left: 24%; right: 34%; background: hsl(221 83% 53% / 0.16); box-shadow: inset 0 0 0 1px var(--brand); }
.g-flag { position: absolute; top: 0; bottom: 0; width: 15px; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); font-size: 9.5px; font-weight: 700; }
.g-flag.a { left: 24%; }
.g-flag.b { right: 34%; }

/* switches */
.g-sws { display: grid; gap: 11px; }
.g-swrow { display: flex; align-items: flex-start; gap: 10px; }
.g-swrow > div { flex: 1; min-width: 0; }
.g-swrow strong { display: block; font-size: 12.5px; font-weight: 650; color: var(--ink); }
.g-swrow span:not(.g-mark) { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.4; color: var(--muted); }
.g-sw { flex: none; position: relative; width: 36px; height: 21px; border-radius: 999px; background: var(--line-strong); margin-top: 2px; }
.g-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 0.35); }
.g-sw.is-on { background: var(--brand); }
.g-sw.is-on::after { left: 18px; }

/* the wide button at the foot of the quick window */
.g-wide { display: block; padding: 9px 12px; border-radius: 10px; background: var(--brand); color: var(--on-brand); text-align: center; }
.g-wide b { display: block; font-size: 13.5px; font-weight: 650; }
.g-wide span:not(.g-mark) { display: block; margin-top: 1px; font-size: 11px; opacity: 0.85; }

/* the status line at the foot of the studio */
.g-note { display: flex; gap: 7px; align-items: flex-start; padding: 9px 12px 0; border-top: 1px solid var(--line); margin-top: 2px; font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.g-note svg { flex: none; width: 13px; height: 13px; margin-top: 2px; }

/* settings rows */
.g-set { display: grid; }
.g-set > div { padding: 11px 0; border-top: 1px solid var(--line); }
.g-set > div:first-child { border-top: 0; padding-top: 0; }
.g-set-label { font-size: 12.5px; font-weight: 650; color: var(--ink); }
.g-select { margin-top: 7px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 11px; border-radius: 9px; background: var(--surface); box-shadow: 0 0 0 1px var(--line-strong); font-size: 12px; color: var(--ink-2); }
.g-select svg { width: 13px; height: 13px; flex: none; color: var(--muted); }
.g-radios { margin-top: 7px; display: grid; gap: 7px; }
.g-radio { display: flex; gap: 9px; align-items: flex-start; font-size: 12px; color: var(--ink-2); }
.g-radio i { flex: none; width: 15px; height: 15px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-strong); margin-top: 2px; }
.g-radio.is-on i { box-shadow: inset 0 0 0 4.5px var(--brand); }
.g-radio span:not(.g-mark) { display: block; color: var(--muted); font-size: 11.5px; }

/* ---------- tables and plain lists inside the cards ---------- */

.g-keys { margin: 16px 0 0; width: 100%; border-collapse: collapse; font-size: 1rem; }
.g-keys th, .g-keys td { text-align: left; padding: 10px 14px 10px 0; border-top: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.g-keys tr:first-child th, .g-keys tr:first-child td { border-top: 0; }
.g-keys th { font-weight: 600; white-space: nowrap; color: var(--ink); }

.g-list { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 11px; font-size: 1rem; line-height: 1.55; color: var(--ink-2); }
.g-list > li { position: relative; padding-left: 19px; }
.g-list > li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.g-list b { font-weight: 650; color: var(--ink); }
.g-list .g-list-in { margin-top: 9px; gap: 7px; font-size: 0.9375rem; }
.g-list .g-list-in > li::before { background: var(--line-strong); }

/* the sentence that follows a numbered list and belongs to no circle */
.g-after { margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9875rem; line-height: 1.55; }

.g-sub { margin-top: 26px; font-size: 1.0625rem; line-height: 1.35; font-weight: 650; letter-spacing: -0.01em; color: var(--ink); }

.g-tip { display: flex; gap: 13px; align-items: flex-start; margin-top: 20px; padding: 15px 17px; border-radius: var(--radius); background: var(--brand-soft); color: var(--ink-2); font-size: 0.9875rem; line-height: 1.55; }
.g-tip svg { flex: none; width: 20px; height: 20px; color: var(--brand-text); margin-top: 2px; }

.g-end { margin-top: var(--vt-spacing-10); color: var(--muted); }
.g-end .g-end-links { margin-top: var(--vt-spacing-2); display: flex; flex-wrap: wrap; gap: 6px 20px; font-weight: 600; }

/* ---------- narrower screens ---------- */

@media (max-width: 1000px) {
  .g-step { grid-template-columns: minmax(0, 1fr) 336px; gap: 26px; }
}
@media (max-width: 880px) {
  .g-step { grid-template-columns: 1fr; gap: 24px; }
  .g-fig { order: -1; padding: 2px 14px 4px; }
}
@media (max-width: 600px) {
  .g-step { padding: 20px 18px; border-radius: var(--radius); }
  .g-points > li { padding-left: 31px; }
  .g-points > li::before, .g-mark { width: 21px; height: 21px; font-size: 0.6875rem; }
  .g-fig { padding: 2px 12px 4px; }
  .g-win { font-size: 12px; }
  .g-chips { gap: 4px; }
  .g-chip { padding: 6px 4px; font-size: 10px; }
  .g-page-pop { padding: 10px 14px 14px; }

  .g-tab .g-skel { display: none; }
  .g-dots { display: none; }
  .g-keys th, .g-keys td { display: block; padding: 2px 0; border-top: 0; }
  .g-keys tr { display: block; padding: 10px 0; border-top: 1px solid var(--line); }
  .g-keys tr:first-child { border-top: 0; padding-top: 0; }
}

/* Last word on the callout numbers. The drawings style their own span/b/i children, and
   a callout lives inside those drawings: this block comes last so the number is always
   white on brand, 24 px, centred — never a muted 11 px line of body text. */
.g-mark, .g-points > li::before {
  display: grid; place-items: center;
  background: var(--brand); color: var(--on-brand);
  font: 700 0.75rem/1 var(--font); font-variant-numeric: tabular-nums;
  opacity: 1; margin-top: 0; text-align: center;
}
@media (max-width: 600px) {
  .g-mark, .g-points > li::before { font-size: 0.6875rem; }
}

