/* Lecture Guides: calm study desk. Player left, plan right; stacks on phones. */
:root {
  --bg: #f6f4ef; --bg2: #efece4; --panel: #ffffff; --ink: #1d2230; --muted: #626b7a; --line: #e4e0d6;
  --accent: #4b47d6; --accent-2: #0f9d8a; --accent-ink: #ffffff; --soft: #eeedfc;
  --watch: #12805c; --watch-bg: #dff3ea; --skim: #9a6300; --skim-bg: #fbefd6; --skip: #6b7380; --skip-bg: #efefed;
  --partly: #9a6300; --lecture: #b2342f; --lecture-bg: #fbe4e2;
  --c-SFM: #4b47d6; --c-HFD: #c2416a; --c-HSS: #0f8f7e; --c-ANA: #b7791f;
  --shadow: 0 1px 2px rgba(29,34,48,.05), 0 6px 20px rgba(29,34,48,.06);
  --shadow-lg: 0 2px 6px rgba(29,34,48,.06), 0 18px 40px rgba(29,34,48,.10);
  --radius: 14px;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1218; --bg2: #141924; --panel: #171c27; --ink: #e8eaf0; --muted: #9ba4b4; --line: #262d3b;
    --accent: #8b88ff; --accent-2: #3fd1bc; --accent-ink: #0d0f1a; --soft: #22223f;
    --watch: #5ad19e; --watch-bg: #15302a; --skim: #f0b54a; --skim-bg: #352a12; --skip: #9aa3b0; --skip-bg: #222833;
    --partly: #f0b54a; --lecture: #ff8f87; --lecture-bg: #3a1c1c;
    --c-SFM: #8b88ff; --c-HFD: #f07ba0; --c-HSS: #3fd1bc; --c-ANA: #f0b54a;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
    --shadow-lg: 0 2px 6px rgba(0,0,0,.35), 0 18px 40px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 2px; }
button { font: inherit; }
code { font-family: var(--mono); font-size: .88em; background: var(--bg2); padding: 1px 5px; border-radius: 5px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; gap: 14px; align-items: center;
  padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; font: 600 19px/1 var(--serif); color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand .logo { width: 26px; height: 26px; display: block; border-radius: 7px; box-shadow: var(--shadow); line-height: 0; }
.brand .logo svg { display: block; }
.crumb { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.navlink { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); white-space: nowrap; }
.navlink:hover { border-color: var(--accent); color: var(--accent); }
.wrap { max-width: 1400px; margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-right)) 56px max(16px, env(safe-area-inset-left)); }

/* Home hero */
.hero { position: relative; overflow: hidden; display: grid; gap: 22px; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center;
  padding: 30px; margin-bottom: 26px; border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow);
  background: radial-gradient(1200px 400px at -10% -40%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
              radial-gradient(800px 380px at 110% 120%, color-mix(in srgb, var(--accent-2) 20%, transparent), transparent 60%), var(--panel); }
@media (max-width: 860px) { .hero { grid-template-columns: minmax(0, 1fr); padding: 22px; } }
.eyebrow { margin: 0 0 6px; font: 700 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.hero h1 { margin: 0 0 10px; font: 600 clamp(26px, 4vw, 38px)/1.12 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.hero p.lede { margin: 0 0 18px; color: var(--muted); max-width: 52ch; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .hide-intro { position: absolute; top: 12px; right: 12px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: s; }
.steps > li { counter-increment: s; position: relative; padding: 12px 14px 12px 52px; background: color-mix(in srgb, var(--panel) 85%, transparent);
  border: 1px solid var(--line); border-radius: 12px; }
.steps > li::before { content: counter(s); position: absolute; left: 14px; top: 12px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font: 700 13px/1 var(--sans); color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.steps.mini li b { display: block; font-size: 15px; }
.steps.mini li span { color: var(--muted); font-size: 14px; }

/* Filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 18px; }
.filters .lbl { font-size: 13px; color: var(--muted); margin-right: 2px; }
.fchip { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 999px; padding: 5px 13px; font-size: 14px; font-weight: 600; cursor: pointer; }
.fchip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Home cards */
.day { margin: 0 0 30px; }
.day h2 { font: 600 21px var(--serif); margin: 0 0 12px; display: flex; align-items: baseline; gap: 10px; }
.day h2 small { font: 500 13px var(--sans); color: var(--muted); }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.gcard { position: relative; display: grid; gap: 8px; padding: 16px 18px 16px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  color: inherit; text-decoration: none; box-shadow: var(--shadow); overflow: hidden; }
.gcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cc, var(--accent)); }
.gcard:hover { border-color: color-mix(in srgb, var(--cc, var(--accent)) 55%, var(--line)); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.gcard .t { font-weight: 700; font-size: 16.5px; line-height: 1.3; }
.gcard .meta { color: var(--muted); font-size: 13.5px; display: flex; gap: 6px 14px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.gcard .done-badge { position: absolute; top: 14px; right: 14px; font-size: 12px; font-weight: 700; color: var(--watch); background: var(--watch-bg); padding: 3px 8px; border-radius: 999px; }
.tag { display: inline-block; font: 700 11px/1 var(--sans); letter-spacing: .07em; text-transform: uppercase; padding: 4px 7px; border-radius: 6px;
  background: color-mix(in srgb, var(--cc, var(--accent)) 14%, transparent); color: var(--cc, var(--accent)); }
.c-SFM { --cc: var(--c-SFM); } .c-HFD { --cc: var(--c-HFD); } .c-HSS { --cc: var(--c-HSS); } .c-ANA { --cc: var(--c-ANA); }
.bar { height: 6px; border-radius: 999px; background: var(--bg2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--watch)); }

/* How-to page */
.how { max-width: 820px; margin: 0 auto; }
.how h1 { font: 600 clamp(28px, 4vw, 40px)/1.1 var(--serif); margin: 6px 0 8px; letter-spacing: -.01em; }
.how .lede { color: var(--muted); margin: 0 0 22px; font-size: 17px; }
.how .steps > li { padding: 16px 18px 16px 60px; background: var(--panel); box-shadow: var(--shadow); }
.how .steps > li::before { left: 18px; top: 16px; width: 28px; height: 28px; }
.how .steps h3 { margin: 0 0 4px; font: 600 18px var(--serif); }
.how .steps > li > p { margin: 0; color: var(--muted); }
.how .steps p b, .how .steps p code { color: var(--ink); }
.legend { margin-top: 22px; }
.legend dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; margin: 8px 0 0; font-size: 15px; }
.legend dt { white-space: nowrap; }
.legend dd { margin: 0; color: var(--muted); }
.legend .sep { grid-column: 1 / -1; border-top: 1px solid var(--line); margin: 4px 0; }
.newhere { font-size: 13.5px; color: var(--muted); margin: 0; }

/* Guide */
.ghead { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; margin-bottom: 16px; }
.ghead h1 { font: 600 clamp(24px, 3vw, 30px)/1.15 var(--serif); margin: 0; text-wrap: balance; letter-spacing: -.01em; }
.ghead .meta { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.ghead .newhere { flex-basis: 100%; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 18px; background: var(--bg2); border-radius: 12px; overflow-x: auto; max-width: 100%; }
.tabs button { background: none; border: 0; border-radius: 9px; padding: 7px 14px; color: var(--muted); cursor: pointer; white-space: nowrap; font-weight: 600; font-size: 14.5px; }
.tabs button[aria-selected="true"] { color: var(--ink); background: var(--panel); box-shadow: var(--shadow); }

.study { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) 410px; align-items: start; }
@media (max-width: 1000px) { .study { grid-template-columns: minmax(0, 1fr); } }
.stage { display: grid; gap: 12px; min-width: 0; }
.screen { position: relative; aspect-ratio: 16 / 9; max-width: 100%; background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.screen > div, .screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.overlay { position: absolute; inset: 0; overflow: auto; background: var(--panel); color: var(--ink); padding: 22px; }
.screen.cp { aspect-ratio: auto; background: var(--panel); border: 1px solid var(--line); }
.screen.cp > :not(.overlay) { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.screen.cp .overlay { position: static; }
.overlay h3 { margin: 0 0 6px; font: 600 21px var(--serif); }

.now { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.now .what { min-width: 0; flex: 1 1 260px; }
.now .what b { display: block; }
.now .what span { color: var(--muted); font-size: 14px; }
.ctrls { display: flex; gap: 6px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 10px;
  padding: 8px 14px; cursor: pointer; text-decoration: none; font-weight: 600; font-size: 15px; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, var(--accent-2))); color: var(--accent-ink); border-color: transparent; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn.primary:hover { color: var(--accent-ink); filter: brightness(1.06); }
.btn.small { padding: 4px 10px; font-size: 13.5px; border-radius: 8px; }
.speed { display: flex; gap: 4px; align-items: center; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.speed .btn[aria-pressed="true"] { background: var(--soft); border-color: var(--accent); color: var(--accent); }

.progress { display: grid; gap: 6px; }
.progress .row { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }

.plan { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); max-height: calc(100vh - 120px); overflow: auto; box-shadow: var(--shadow); }
@media (max-width: 1000px) { .plan { max-height: none; } }
.plan h4 { margin: 0; padding: 11px 16px; font-size: 14px; position: sticky; top: 0; background: var(--panel); border-bottom: 1px solid var(--line); z-index: 1; }
.plan h4 small { color: var(--muted); font-weight: 500; }
.seg { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 2px 10px; padding: 9px 16px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.seg:hover { background: var(--soft); }
.seg.current { background: var(--soft); box-shadow: inset 3px 0 0 var(--accent); }
.seg.done .time { text-decoration: line-through; color: var(--muted); }
.seg .time { font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.seg .desc { min-width: 0; }
.seg .note { color: var(--muted); }
.chip { display: inline-block; font: 700 11px/1 var(--sans); padding: 3px 7px; border-radius: 999px; margin-right: 6px; vertical-align: 1px; }
.chip.Watch { background: var(--watch-bg); color: var(--watch); }
.chip.Skim { background: var(--skim-bg); color: var(--skim); }
.chip.Skip { background: var(--skip-bg); color: var(--skip); }
.chip.Video { background: var(--watch-bg); color: var(--watch); }
.chip.Partly { background: var(--skim-bg); color: var(--partly); }
.chip.Lecture { background: var(--lecture-bg); color: var(--lecture); }
.seg.Skip, .seg.Skim { opacity: .66; }
.seg.cp { grid-template-columns: 1fr; background: var(--bg); font-weight: 600; }

.search { display: flex; gap: 8px; align-items: stretch; margin: 10px 0; }
.search code { flex: 1; min-width: 0; font: 12px/1.4 var(--mono); padding: 9px 11px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  overflow-x: auto; white-space: nowrap; display: block; }
.howto { font-size: 14px; color: var(--muted); margin: 4px 0 10px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tblwrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tbl tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--bg) 45%, transparent); }
.tbl th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--panel); position: sticky; top: 0; }
.tbl td.n { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.tbl .quote { font-style: italic; }
.warn { color: var(--partly); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.panel h3 { margin: 0 0 6px; font: 600 19px var(--serif); }

.toast { position: fixed; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg);
  padding: 9px 16px; border-radius: 999px; font-size: 14px; z-index: 20; box-shadow: var(--shadow-lg); }
@media (prefers-reduced-motion: no-preference) { .seg, .gcard, .btn { transition: background .15s, border-color .15s, box-shadow .2s, transform .2s; } }
@media (max-width: 560px) { .navlink { padding: 5px 10px; } .crumb { display: none; } }
.ghead .newhere { order: 3; }

/* Blocks */
.blockbar { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; padding: 4px; background: var(--bg2); border-radius: 14px; width: fit-content; max-width: 100%; }
.bchip { border: 0; background: none; color: var(--muted); border-radius: 10px; padding: 7px 14px; font-weight: 700; font-size: 14.5px; cursor: pointer; display: inline-flex; gap: 7px; align-items: center; }
.bchip small { font-weight: 600; font-size: 12px; background: var(--line); color: var(--muted); border-radius: 999px; padding: 1px 7px; }
.bchip[aria-selected="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.bchip[aria-selected="true"] small { background: var(--soft); color: var(--accent); }
.bhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 4px 0 14px; }
.bhead h2 { margin: 0; font: 600 26px/1.15 var(--serif); letter-spacing: -.01em; }
.bhead span { color: var(--muted); font-size: 14px; }
.linkbtn { margin-left: auto; border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 14px; cursor: pointer; padding: 4px 0; }
details.day { margin: 0 0 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
details.day > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 12px; padding: 14px 18px; border-radius: var(--radius); }
details.day > summary::-webkit-details-marker { display: none; }
details.day > summary::before { content: "›"; display: inline-block; width: 12px; color: var(--muted); font-weight: 700; transform: rotate(0deg); transition: transform .15s; }
details.day[open] > summary::before { transform: rotate(90deg); }
details.day > summary:hover { background: var(--soft); }
details.day .dname { font: 600 19px var(--serif); }
details.day summary small { color: var(--muted); font-size: 13.5px; }
details.day > .cards { padding: 4px 16px 16px; }
details.day .gcard { box-shadow: none; }
@media (max-width: 600px) { details.day > summary { flex-wrap: wrap; row-gap: 2px; padding: 12px 14px; } details.day .dname { font-size: 17px; } details.day summary small { flex-basis: 100%; padding-left: 24px; } details.day > .cards { padding: 4px 10px 12px; } .bhead h2 { font-size: 22px; } }

/* School track + questions */
.trackbar { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 4px 0 14px; background: var(--bg2); border-radius: 14px; max-width: 100%; }
.trackbar button { border: 0; background: none; color: var(--muted); border-radius: 10px; padding: 7px 14px; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; text-align: left; font: inherit; line-height: 1.25; }
.trackbar button b { font-size: 14.5px; }
.trackbar button small { font-size: 12px; }
.trackbar button[aria-checked="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.trackbar button[aria-checked="true"] small { color: var(--accent); }
.parthead { font: 600 17px var(--serif); margin: 16px 0 6px; color: var(--ink); }
.plan .parthead:first-child { margin-top: 0; }
.chip.Notes { background: var(--soft); color: var(--accent); }
ul.notes { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 8px; line-height: 1.55; }
.notepanel { margin-bottom: 12px; }
.notepanel h3 { margin-top: 0; }
.qlist { display: grid; gap: 14px; }
.qcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.overlay .qcard { background: var(--bg); }
.qcard.right { border-color: var(--watch); }
.qcard.wrong { border-color: var(--lecture); }
.qstem { margin: 0 0 12px; font-weight: 600; line-height: 1.5; }
.qstem .tag { margin-right: 6px; vertical-align: 1px; }
.qn { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--soft); color: var(--accent); font-size: 13px; margin-right: 8px; }
.choices { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.choice { width: 100%; display: flex; gap: 10px; align-items: flex-start; text-align: left; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 10px; padding: 10px 12px; font: inherit; line-height: 1.45; cursor: pointer; }
.overlay .choice { background: var(--panel); }
.choice:hover:not([disabled]) { border-color: var(--accent); }
.choice b { color: var(--muted); min-width: 14px; }
.choice[disabled] { cursor: default; }
.choice.is-right { border-color: var(--watch); background: var(--watch-bg); }
.choice.is-wrong { border-color: var(--lecture); background: var(--lecture-bg); }
.why { margin: 4px 4px 2px 36px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.qfoot { margin: 10px 0 0; }
.qtop { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.qtop .filters { margin: 0; }
.qscore { color: var(--muted); font-size: 14px; }
.qscore .linkbtn { margin-left: 8px; }
.qhead { margin: 18px 0 8px; font: 600 17px var(--serif); }
.qk { max-width: 880px; }
.quicktop { margin-bottom: 14px; }
.qkbar { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-weight: 600; margin-bottom: 8px; }
.qkprog { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.qkprog i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.qkcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-top: 12px; }
.qkfact { font: 600 21px/1.35 var(--serif); margin: 0 0 14px; }
.qkfact .chip { vertical-align: 4px; }
.qkvid { aspect-ratio: 16 / 9; margin: 4px 0 8px; }
.qkvid iframe { width: 100%; height: 100%; border: 0; border-radius: 12px; background: #000; }
.qkctrls { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; }
@media (max-width: 600px) { .qkcard { padding: 14px; } .qkfact { font-size: 18px; } }
@media (max-width: 600px) { .trackbar { display: flex; } .trackbar button { flex: 1; padding: 7px 10px; } .why { margin-left: 4px; } .qcard { padding: 14px; } }

/* Brown sign-in: welcome page */
body.signed-out { background:
  radial-gradient(60vw 50vh at 12% 10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
  radial-gradient(55vw 50vh at 92% 95%, color-mix(in srgb, var(--accent-2) 13%, transparent), transparent 70%),
  var(--bg); background-attachment: fixed; min-height: 100vh; }
.welcome { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-areas: "head card" "points card";
  column-gap: 56px; row-gap: 26px; align-items: center; max-width: 1040px; margin: 64px auto; padding: 0 16px; }
.wl-head { grid-area: head; align-self: end; }
.wl-card { grid-area: card; }
.wl-points { grid-area: points; align-self: start; }
.wl-eyebrow { display: inline-block; font: 600 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); background: var(--soft); padding: 7px 11px; border-radius: 999px; }
.wl-head h1 { font: 600 clamp(34px, 5vw, 52px)/1.05 var(--serif); letter-spacing: -.01em; margin: 18px 0 14px; }
.wl-lede { font-size: 18px; color: var(--muted); margin: 0; max-width: 34em; }
.wl-points { list-style: none; counter-reset: wl; padding: 0; margin: 0; display: grid; gap: 14px; }
.wl-points li { counter-increment: wl; position: relative; padding-left: 44px; color: var(--muted); }
.wl-points li b { color: var(--ink); font-weight: 600; }
.wl-points li::before { content: counter(wl); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 10px;
  display: grid; place-items: center; font: 600 14px/1 var(--sans); color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.wl-card { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg);
  padding: 34px 30px 26px; text-align: center; }
.wl-card h2 { font: 600 26px/1.2 var(--serif); margin: 0 0 6px; }
.wl-card .muted { margin: 0; }
.gbtn { display: flex; justify-content: center; margin: 24px 0 8px; min-height: 44px; color-scheme: light; }
.wl-err { color: var(--lecture); font-size: 14px; margin: 10px 0 0; }
.wl-fine { font-size: 13px; color: var(--muted); margin: 18px 0 0; }
.userbox { margin-left: 8px; cursor: pointer; font-family: inherit; }
@media (max-width: 820px) {
  .welcome { grid-template-columns: 1fr; grid-template-areas: "head" "card" "points"; row-gap: 24px; margin: 28px auto; }
  .wl-lede { font-size: 16px; }
  .wl-card { padding: 28px 20px 22px; }
}
/* external (non-YouTube) videos such as Boards & Beyond */
.linkbox { border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; }
.linkrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.linkrow a.btn { text-decoration: none; }

/* Copy boxes: where to get the AnKing search */
.copybox { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius);
  padding: 16px 18px; margin: 12px 0 16px; box-shadow: var(--shadow); }
.copybox.hero { background: linear-gradient(135deg, var(--soft), var(--panel) 70%); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); border-left-color: var(--accent); }
.copybox { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 28px; }
.cb-head { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
@media (min-width: 900px) {
  .copybox { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: start; }
  .cb-steps { margin-top: 0; }
  .cb-raw { grid-column: 1 / -1; }
}
.cb-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cb-text b { font-size: 17px; line-height: 1.3; color: var(--ink); }
.cb-text span { font-size: 14px; color: var(--muted); }
.copybtn { font-size: 16px; padding: 12px 20px; min-height: 46px; border-radius: 12px; white-space: nowrap; }
.copybtn.copied { background: var(--watch); border-color: var(--watch); color: #fff; }
.cb-steps { margin: 14px 0 4px; padding-left: 22px; display: grid; gap: 6px; font-size: 14.5px; color: var(--ink); }
.cb-steps li::marker { color: var(--accent); font-weight: 700; }
.cb-raw { margin-top: 10px; font-size: 13px; }
.cb-raw summary { cursor: pointer; color: var(--muted); width: fit-content; }
.cb-raw summary:hover { color: var(--ink); }
.cb-raw code { display: block; margin-top: 8px; font: 12px/1.45 var(--mono); padding: 9px 11px; background: var(--bg2);
  border: 1px solid var(--line); border-radius: 10px; word-break: break-all; max-height: 140px; overflow: auto; user-select: all; }
kbd { font: 600 12px/1 var(--mono); padding: 3px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--bg2); color: var(--ink); }
.how .demo { margin-top: 10px; }
.tips { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14.5px; }
@media (max-width: 600px) { .copybtn { width: 100%; } .copybox { padding: 14px; } }

@media (max-width: 520px) {
  .topbar { gap: 8px; }
  .brand { font-size: 15px; gap: 7px; }
  .brand .logo, .brand .logo svg { width: 22px; height: 22px; }
  .crumb { display: none; }
  .navlink { font-size: 12.5px; padding: 5px 9px; }
  .userbox { margin-left: 0; }
}
