/*
 * classlooper.com (ADR-0077). One stylesheet for every page, served from the backend jar.
 * Built from the approved drafts (docs/plans/2026-11-21-marketing-site-mock.html), with system fonts:
 * the content security policy allows nothing from other hosts, and nothing to download is fastest on 3G.
 * Colours are the app's own (classloop_ui AppColors). No inline styles anywhere: style-src is 'self'.
 */
:root {
  --paper: #F6F8FC; --surface: #FFFFFF; --ink: #13172A; --muted: #5A6178; --line: #DDE3EE;
  --accent: #2F6FED; --accent-strong: #1B4FBF; --accent-fill: #2F6FED; --accent-fill-hover: #1B4FBF; --on-accent: #FFFFFF; --tint: #EAF1FE;
  --mastery: #12663C; --mastery-tint: #E3F5EC; --pending: #7A5600; --pending-tint: #FFF1CC;
  --danger: #A3271C; --danger-tint: #FDECEA; --ring: #2F6FED; --shadow: rgba(19, 23, 42, .45);
  --f-display: "Segoe UI Variable Display", "SF Pro Display", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0F1118; --surface: #191C27; --ink: #F2F4FA; --muted: #AEB4C7; --line: #2C3044;
    --accent: #6BA0F5; --accent-strong: #8DB6FF; --accent-fill: #2F6FED; --on-accent: #FFFFFF; --tint: #1B2540;
    --mastery: #5FD49A; --mastery-tint: #15301F; --pending: #F2C14E; --pending-tint: #33290F;
    --danger: #EB6B6B; --danger-tint: #3A1B1B; --ring: #6BA0F5; --shadow: rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -.015em; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.5rem); font-weight: 800; }
h1.page-title { font-size: clamp(1.9rem, 4.4vw, 2.8rem); }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.2rem); font-weight: 800; }
h2.small { font-size: 1.5rem; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1120px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.code { font-family: var(--f-mono); font-size: .84em; font-weight: 600; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 38rem; }
.muted { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 30; }

/* ---------- chrome ---------- */
.site-nav .wrap { display: flex; align-items: center; gap: 20px; padding-block: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--f-display); font-weight: 800; font-size: 1.25rem; }
.brand svg { width: 30px; height: 30px; color: var(--accent-fill); }
.nav-links { display: flex; gap: 18px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav-links a.btn { color: var(--on-accent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 .98rem var(--f-body); padding: 12px 20px; border-radius: 10px; border: 1px solid transparent; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn-primary { background: var(--accent-fill); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-fill-hover); }
.btn-primary:disabled { opacity: .6; cursor: progress; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-sm { padding: 8px 14px; font-size: .88rem; border-radius: 8px; }
.foot { border-top: 1px solid var(--line); margin-top: 64px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; padding-block: 28px; font-size: .9rem; color: var(--muted); }
.foot a { color: var(--muted); }
.foot .spacer { flex: 1; }
section.band { padding-block: 56px; }
section.band.tight-top { padding-top: 24px; }
section.band.flush-top { padding-top: 8px; }
section.band.flush-bottom { padding-bottom: 0; }
.section-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; max-width: 44rem; }

/* ---------- home: hero ---------- */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center; padding-block: 28px 48px; }
.hero-copy { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.platforms { font-size: .9rem; color: var(--muted); }
.loop { position: relative; width: 100%; max-width: 440px; aspect-ratio: 1; margin-inline: auto; }
.loop svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.loop .arc { fill: none; stroke: var(--ring); stroke-width: 18; stroke-linecap: round; opacity: .9; }
.loop .dot { fill: var(--ring); }
.loop .tag rect { fill: var(--surface); stroke: var(--line); }
.loop .tag text { fill: var(--ink); font: 700 15px var(--f-body); }
.today { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(50%, 224px); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: 0 18px 40px -24px var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.today .cls { font-size: .74rem; color: var(--muted); font-weight: 600; }
.today .t { font-family: var(--f-display); font-weight: 800; font-size: 1.05rem; line-height: 1.2; }
.today .score { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.today .score strong { font-family: var(--f-display); font-size: 1.7rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--tint); color: var(--accent); }
.chip.ok { background: var(--mastery-tint); color: var(--mastery); }
.chip.wait { background: var(--pending-tint); color: var(--pending); }
.example-tag { align-self: flex-start; font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; list-style: none; margin: 0; padding: 0; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.step-n { font-family: var(--f-display); font-weight: 800; font-size: .95rem; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--accent); }

.who { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.who-card { padding-top: 22px; border-top: 2px solid var(--ink); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.who-card .q { font-size: 1.02rem; font-weight: 500; }
.who-card ul { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: .94rem; display: flex; flex-direction: column; gap: 3px; }
.who-card .more { font-weight: 700; text-decoration: none; font-size: .94rem; }
.who-card .talk { font-weight: 600; color: var(--muted); }
[data-contact-link] { white-space: nowrap; font-weight: 700; }
.later { margin-top: 28px; padding: 14px 18px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); }

/* the scrolling strip of schools */
/* Under three schools the strip stands still: it scrolls by hand (a phone shows one card at a time) and
   has no faded edges, which would only dim the first card. */
.marquee { overflow-x: auto; }
.marquee.moving { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.track { display: flex; gap: 18px; width: max-content; padding: 6px 18px 6px 0; }
.marquee.moving .track { animation: drift var(--drift, 60s) linear infinite; }
.marquee:hover .track, .marquee:focus-within .track { animation-play-state: paused; }
@keyframes drift { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee.moving .track { animation: none; }
  .marquee, .marquee.moving { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}
.school { width: 300px; flex: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.school-head { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.school-name { font-family: var(--f-display); font-weight: 800; font-size: 1.08rem; line-height: 1.2; }
.school-place { font-size: .84rem; color: var(--muted); }
.cls-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cls-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 9px; color: var(--ink); text-decoration: none; }
a.cls-row:hover { background: var(--tint); }
.lvl { font-family: var(--f-mono); font-weight: 600; font-size: .78rem; padding: 2px 7px; border-radius: 6px; background: var(--tint); color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cls-name { font-weight: 600; font-size: .94rem; line-height: 1.3; }
.cls-sub { display: block; font-weight: 500; font-size: .8rem; color: var(--muted); }
.appr { font-size: .72rem; font-weight: 700; color: var(--pending); background: var(--pending-tint); padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.strip-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

.teaser { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 32px; }
.teaser .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.teaser .pair div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dl { background: var(--accent-fill); color: var(--on-accent); border-radius: 18px; padding: 34px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.dl .stack { max-width: 34rem; }
.dl h2, .dl p { color: var(--on-accent); }
.dl .btn { background: var(--surface); color: var(--ink); }

/* ---------- join list ---------- */
.page-head { padding-block: 32px 8px; display: flex; flex-direction: column; gap: 12px; }
.page-head.no-bottom { padding-bottom: 0; }
.search-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-block: 18px 26px; }
.input { font: 500 1rem var(--f-body); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; width: 100%; }
.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--tint); }
.search-row .input { flex: 1 1 260px; min-width: 0; max-width: 460px; }
.filter { font: 600 .88rem var(--f-body); padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.school-block { border-top: 1px solid var(--line); padding-block: 22px; display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 20px; }
.school-block .cls-list { gap: 8px; }
.join-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 18px; font-size: .92rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pager .cta-row { gap: 8px; }
.empty { padding: 28px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
.loading { color: var(--muted); padding-block: 18px; }

/* ---------- class page ---------- */
.crumbs { font-size: .88rem; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.class-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 32px; align-items: start; margin-top: 18px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: .95rem; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.subj { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.subj li { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 14px; border-top: 1px solid var(--line); }
.subj li:first-child { border-top: 0; }
.req { font-size: .74rem; font-weight: 700; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
.stepper { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; font-size: .8rem; font-weight: 700; }
.stepper li { flex: 1; padding-top: 8px; border-top: 3px solid var(--line); color: var(--muted); }
.stepper li.on { border-color: var(--accent-fill); color: var(--ink); }
.stepper li.done { border-color: var(--accent-fill); }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { font: 700 .88rem var(--f-body); border: 0; border-radius: 8px; padding: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px var(--shadow); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .lbl { font-size: .88rem; font-weight: 700; }
.hint { font-size: .8rem; color: var(--muted); }
.check-line { display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--muted); }
.check-line.ok { color: var(--mastery); }
.check-line svg { width: 16px; height: 16px; flex: none; }
.err { background: var(--danger-tint); color: var(--danger); border-radius: 10px; padding: 10px 12px; font-size: .9rem; font-weight: 600; }
.linkish { background: none; border: 0; padding: 0; font: 600 .84rem var(--f-body); color: var(--accent); cursor: pointer; text-decoration: underline; text-align: left; }
.pick { display: flex; flex-direction: column; gap: 6px; }
.pick label { display: grid; grid-template-columns: auto 5.2rem minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: .92rem; }
.pick input { width: 18px; height: 18px; accent-color: var(--accent-fill); }
.done-box { display: flex; flex-direction: column; gap: 12px; }
.done-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--mastery-tint); color: var(--mastery); }
.done-icon.wait { background: var(--pending-tint); color: var(--pending); }

/* ---------- teach ---------- */
.duties { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 8px; }
.duty { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.duty ul { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 6px; }
.duty .who-for { font-size: .92rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.terms { margin-top: 16px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px; }
.form-grid .full { grid-column: 1 / -1; }
.radios { display: flex; flex-wrap: wrap; gap: 8px; }
.radios label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: .92rem; cursor: pointer; }
.radios input { accent-color: var(--accent-fill); }
textarea.input { min-height: 92px; resize: vertical; line-height: 1.5; }
.picker { position: relative; }
.pchip { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 700; padding: 4px 6px 4px 11px; border-radius: 999px; background: var(--tint); color: var(--accent); }
.pchip button { border: 0; background: transparent; color: inherit; font: 700 1rem/1 var(--f-body); cursor: pointer; padding: 0 4px; }
.suggest { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px -18px var(--shadow); z-index: 5; list-style: none; padding: 4px; margin: 4px 0 0; }
.suggest button { width: 100%; text-align: left; border: 0; background: transparent; color: var(--ink); font: 500 .95rem var(--f-body); padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.suggest button:hover, .suggest button:focus-visible { background: var(--tint); }
.suggest .none { padding: 8px 10px; font-size: .88rem; color: var(--muted); }
.closed-msg { border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; color: var(--muted); font-weight: 600; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.consent input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent-fill); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.thanks { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }

/* ---------- privacy ---------- */
.prose { max-width: 44rem; display: flex; flex-direction: column; gap: 14px; }
.prose h2 { font-size: 1.3rem; margin-top: 14px; }
.prose ul { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 6px; }

/* ---------- holding page (the switch is off) ---------- */
.holding { min-height: 100vh; display: grid; place-items: center; padding-block: 40px; }
.hold-card { max-width: 30rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 30px; display: flex; flex-direction: column; gap: 16px; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .steps, .who { grid-template-columns: 1fr 1fr; }
  .class-grid { grid-template-columns: 1fr; }
  .panel { position: static; }
  .teaser { grid-template-columns: 1fr; }
  .school-block { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 640px) {
  .steps, .who, .duties, .form-grid, .teaser .pair { grid-template-columns: 1fr; }
  .nav-links { margin-left: 0; width: 100%; gap: 14px; }
  .join-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .join-row .appr { grid-column: 2; justify-self: start; }
  .join-row .btn { grid-column: 3; grid-row: 1; }
  .dl, .teaser, .form-grid { padding: 22px; }
  .loop .tag { display: none; }
  .today { width: 74%; }
  .subj li { grid-template-columns: 4.8rem minmax(0, 1fr); }
  .subj li .req { grid-column: 2; }
  .pick label { grid-template-columns: auto 4.6rem minmax(0, 1fr); }
  .pick label .req { grid-column: 3; }
}
