/* ============================================================
   Covlo · covlo.app
   Covlo is a chess clock: your study time against your friends'.
   The page moves through three grounds and each one means something:
     purple = your time · night = the scores · paper = other students' work.
   Tokens and reasons: design/DIRECTION.md
   ============================================================ */

@font-face {
  font-family: "Mona Sans";
  src: url("assets/fonts/mona-sans-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Mona Sans Fallback";
  src: local("Arial"), local("Liberation Sans"), local("Arimo"), local("Helvetica");
  size-adjust: 102.73%;
  ascent-override: 106.10%;
  descent-override: 31.15%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light;

  --field: #8A00C4;
  --field-deep: #6E009D;
  --on-field: #FFFFFF;
  --on-field-2: #EBD6F7;
  --paper: #F6F3F8;
  --card: #FFFFFF;
  --ink: #1D0F28;
  --ink-2: #5A4B66;
  --rule: #E2DAE8;
  --night: #1D0F28;
  --on-night-2: #C9BBD4;
  --night-rule: #3A2A47;
  --foil: #FFD84D;
  --on-foil: #1D0F28;

  --font: "Mona Sans", "Mona Sans Fallback", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Liberation Sans", sans-serif;

  --t-display: clamp(3rem, min(1.1rem + 5.4vw, 11vh), 6.4rem);
  --t-h2: clamp(2.1rem, 1.3rem + 2.6vw, 3.9rem);
  --t-h3: 1.5rem;
  --t-body-l: 1.25rem;
  --t-body: 1.125rem;
  --t-small: 1rem;
  --t-meta: 0.875rem;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 40px; --s-7: 64px; --s-8: 104px; --s-9: 168px;

  --r-card: 22px;
  --r-inner: 12px;
  --gutter: 40px;
  --max: 1360px;

  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.on-field :focus-visible, .on-night :focus-visible { outline-color: var(--foil); }

.skip {
  position: absolute; left: var(--s-4); top: -60px; z-index: 50;
  background: var(--foil); color: var(--on-foil); font-weight: 700;
  padding: 10px 16px; border-radius: 999px; text-decoration: none;
}
.skip:focus { top: var(--s-4); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Wordmark ---------- */
.wordmark { display: inline-flex; align-items: center; gap: .3em; text-decoration: none; font-size: 30px; line-height: 1; }
.wordmark .mark { height: .86em; width: auto; }
.wordmark .word { height: 1em; width: auto; }
.on-field .wordmark { --mk: var(--foil); --hand: var(--foil); color: var(--on-field); }
.on-paper .wordmark { --mk: var(--field); --hand: var(--field); color: var(--ink); }

/* ---------- Buttons: a plunger you press ---------- */
.btn {
  display: inline-flex; white-space: nowrap; align-items: center; justify-content: center; gap: 10px;
  min-height: 58px; padding: 0 28px;
  border-radius: 999px; border: 2px solid var(--ink);
  background: var(--foil); color: var(--on-foil);
  font: inherit; font-weight: 700; font-stretch: 108%; font-size: 1.125rem; line-height: 1;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 5px 0 var(--ink);
  transition: transform .14s var(--ease-out), box-shadow .14s var(--ease-out), background-color .14s;
}
.btn:hover { background: #FFE070; }
.btn:active { transform: translateY(5px); box-shadow: 0 0 0 var(--ink); }
.btn.small { min-height: 44px; padding: 0 20px; font-size: 1rem; box-shadow: 0 3px 0 var(--ink); }
.btn.small:active { transform: translateY(3px); }

.text-link {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 4px;
  font-weight: 650; font-size: 1.125rem;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px;
}
.on-field .text-link { text-decoration-color: var(--foil); }
.on-paper .text-link { text-decoration-color: var(--field); }
.text-link:hover { text-decoration-thickness: 4px; }

/* ---------- Header ---------- */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); height: 92px; }
.site-head nav ul { display: flex; gap: var(--s-6); list-style: none; margin: 0; padding: 0; }
.site-head nav a { display: inline-block; white-space: nowrap; padding: 10px 0; font-weight: 550; font-size: 1rem; text-decoration: none; }
.site-head nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; text-decoration-color: var(--foil); }

/* ---------- 1 · Hero (purple) ---------- */
.on-field { background: var(--field); color: var(--on-field); }
.hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center;
        min-height: min(calc(100svh - 92px), 900px); padding-bottom: var(--s-6); }
.hero-copy { grid-column: 1 / span 6; grid-row: 1; position: relative; z-index: 1; }
.hero h1 {
  font-size: var(--t-display); font-weight: 800; font-stretch: 125%;
  letter-spacing: -.04em; line-height: .95; margin-bottom: var(--s-5);
}
.hero .lede { font-size: var(--t-body-l); color: var(--on-field-2); max-width: 34ch; margin-bottom: var(--s-6); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-4) var(--s-5); }

.stage { grid-column: 6 / span 7; grid-row: 1; position: relative; margin: 0; aspect-ratio: 1.12 / 1; }
.stage canvas, .stage .poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage canvas { cursor: pointer; touch-action: pan-y; }
.stage .poster { object-fit: contain; }
.stage.live .poster { visibility: hidden; }
.stage-foot {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center; gap: var(--s-4); flex-wrap: wrap;
}
.press {
  display: inline-flex; align-items: center; gap: 10px;
  font: inherit; font-weight: 650; font-size: 1rem; color: var(--on-field);
  min-height: 44px; padding: 0 4px; border: 1px solid transparent; background: none; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--foil); text-decoration-thickness: 2px; text-underline-offset: 6px;
}
.press svg { width: 20px; height: 20px; color: var(--foil); transition: transform .16s var(--ease-out); }
.press:hover { text-decoration-thickness: 4px; }
.press:active svg { transform: translateY(3px); }
.whose { font-weight: 600; font-size: 1rem; color: var(--on-field-2); min-width: 18ch; }

/* ---------- 2 · How it counts (night) ---------- */
.on-night { background: var(--night); color: var(--on-field); }
.counts { padding: 120px 0 var(--s-8); }
.counts-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: var(--s-7); }
.counts h2, .resources h2, .parents h2, .close h2 {
  font-size: var(--t-h2); font-weight: 780; font-stretch: 118%; letter-spacing: -.03em; line-height: 1;
}
.counts-head { grid-column: 1 / span 6; }
.counts-head p { margin-top: var(--s-5); font-size: var(--t-body-l); color: var(--on-night-2); max-width: 40ch; }
.tally { display: flex; align-items: flex-start; flex-wrap: nowrap; gap: 24px; margin: var(--s-7) 0 0; max-width: calc(100% - 64px); }
.tally div { display: grid; gap: var(--s-2); }
.tally dt { order: 2; font-size: var(--t-small); color: var(--on-night-2); font-weight: 550; }
.tally dd { order: 1; margin: 0; font-size: clamp(3.25rem, 1rem + 3vw, 4.25rem); font-weight: 800; font-stretch: 112%;
            letter-spacing: -.05em; line-height: .9; font-variant-numeric: tabular-nums; }
.tally .sat dd { color: var(--on-night-2); text-decoration: line-through; text-decoration-thickness: .06em; text-decoration-color: var(--on-field); }
.tally .xp dd { color: var(--foil); }
.tally .arrow { margin-top: 1.5rem; width: 40px; height: auto; color: var(--on-night-2); }

.board { grid-column: 7 / span 6; grid-row: 1; align-self: end; }
.board h3 { font-size: var(--t-small); font-weight: 650; color: var(--on-night-2); margin-bottom: var(--s-3); }
.board ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--night-rule); }
.board li {
  display: grid; grid-template-columns: 2.2em 1fr auto auto; gap: var(--s-4); align-items: baseline;
  padding: 14px 0; border-bottom: 1px solid var(--night-rule); font-variant-numeric: tabular-nums;
}
.board .rank { font-weight: 800; font-stretch: 125%; font-size: 1.375rem; color: var(--on-night-2); }
.board .who { font-weight: 600; }
.board .time { color: var(--on-night-2); }
.board .xp { font-weight: 750; min-width: 6.5ch; text-align: right; }
.board .me { position: relative; }
.board .me::before { content: ""; position: absolute; left: -16px; top: 12px; bottom: 12px; width: 4px; border-radius: 4px; background: var(--foil); }
.board .me .rank, .board .me .xp { color: var(--foil); }
.board .note { margin-top: var(--s-4); font-size: var(--t-small); color: var(--on-night-2); }

/* ---------- 3 · Resources (paper) ---------- */
.on-paper { background: var(--paper); color: var(--ink); }
.resources { padding: var(--s-9) 0 var(--s-8); }
.resources-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: end; row-gap: var(--s-5); }
.resources-head h2 { grid-column: 1 / span 7; }
.resources-head p { grid-column: 8 / span 5; font-size: var(--t-body-l); color: var(--ink-2); max-width: 38ch; }

.filters { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-7) 0 var(--s-6); padding: 0; list-style: none; }
.filters button {
  font: inherit; font-weight: 600; font-size: 1rem;
  min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--ink); border: 1.5px solid var(--rule);
}
.filters button:hover { border-color: var(--ink-2); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.deck { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); list-style: none; margin: 0; padding: 0; }
.post {
  position: relative; display: flex; flex-direction: column; gap: var(--s-3);
  background: var(--card); border-radius: var(--r-card); padding: var(--s-5);
  border: 1px solid var(--rule);
  box-shadow: 0 1px 0 var(--rule), 0 18px 32px -24px rgba(29, 15, 40, .35);
  transform: rotate(var(--tilt, 0deg));
  transition: transform .3s var(--ease-out);
}
.post:nth-child(3n+1) { --tilt: -1.2deg; }
.post:nth-child(3n+2) { --tilt: .8deg; }
.post:nth-child(3n) { --tilt: -.5deg; }
.post[hidden] { display: none; }
.post .kind { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); font-size: var(--t-meta); font-weight: 650; }
.post .kind span:first-child { color: var(--ink-2); }
.post .course { background: #EDE7F2; border-radius: 999px; padding: 4px 10px; color: var(--ink); }
.post h3 { font-size: var(--t-h3); font-weight: 720; font-stretch: 110%; letter-spacing: -.02em; line-height: 1.12; }
.post p { color: var(--ink-2); font-size: var(--t-small); }
.post ol { list-style: none; margin: 0; padding: 0; font-size: var(--t-small); }
.post ol li { display: flex; justify-content: space-between; gap: var(--s-3); padding: 9px 0; border-top: 1px solid var(--rule); }
.post ol li b { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.post footer { margin-top: auto; padding-top: var(--s-3); display: flex; justify-content: space-between; gap: var(--s-3); font-size: var(--t-meta); font-weight: 650; }
.post footer span:last-child { color: var(--ink-2); font-weight: 550; font-variant-numeric: tabular-nums; }
.post.routine { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.post.routine .kind span:first-child, .post.routine p, .post.routine footer span:last-child { color: var(--on-night-2); }
.post.routine .course { background: rgba(255,255,255,.12); color: var(--paper); }
.post.routine ol li { border-top-color: var(--night-rule); }

.resources-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-5); margin-top: var(--s-7); }
.resources-foot p { color: var(--ink-2); max-width: 52ch; font-size: var(--t-small); }

/* ---------- 4 · For parents (paper, ruled) ---------- */
.parents { padding: 56px 0 var(--s-9); }
.parents-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: var(--s-6); border-top: 2px solid var(--ink); padding-top: var(--s-7); }
.parents-head { grid-column: 1 / span 5; position: sticky; top: 120px; align-self: start; }
.parents-head p { margin-top: var(--s-5); font-size: var(--t-body-l); color: var(--ink-2); max-width: 36ch; }
.settings { margin: var(--s-6) 0 0; max-width: 420px; background: var(--card); border: 1px solid #E4DCEA; border-radius: var(--r-inner); padding: var(--s-2) var(--s-5) var(--s-3); }
.settings figcaption { font-size: var(--t-meta); font-weight: 650; color: var(--ink-2); padding: var(--s-3) 0 var(--s-2); }
.settings ul { list-style: none; margin: 0; padding: 0; }
.settings li { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: 12px 0; border-top: 1px solid var(--rule); font-size: var(--t-small); }
.settings b { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 650; white-space: nowrap; }
.settings i { position: relative; display: inline-block; width: 36px; height: 22px; border-radius: 999px; border: 1.5px solid var(--ink); }
.settings i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: var(--ink); }
.settings .on i { background: var(--ink); }
.settings .on i::after { left: auto; right: 3px; background: var(--card); }
.facts { grid-column: 7 / span 6; margin: 0; }
.facts div { padding: var(--s-5) 0; border-bottom: 1px solid var(--rule); }
.facts div:first-child { padding-top: 0; }
.facts dt { font-weight: 720; font-stretch: 108%; font-size: 1.1875rem; margin-bottom: var(--s-1); }
.facts dd { margin: 0; color: var(--ink-2); max-width: 52ch; }

/* ---------- 5 · Close (purple) ---------- */
.close { padding: var(--s-9) 0 var(--s-7); }
.close-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: var(--s-5); align-items: end; }
.close-clock { grid-column: 8 / span 5; grid-row: 1 / span 2; align-self: center; width: 100%; height: auto; }
.close h2 { grid-column: 1 / span 7; font-size: var(--t-display); font-stretch: 125%; font-weight: 800; letter-spacing: -.04em; line-height: .95; }
.close .close-body { grid-column: 1 / span 6; display: grid; gap: var(--s-6); justify-items: start; }
.close .close-body p { font-size: var(--t-body-l); color: var(--on-field-2); max-width: 36ch; }
.site-foot { margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid rgba(255,255,255,.28);
             display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-5); }
.site-foot ul { display: flex; flex-wrap: wrap; gap: var(--s-5); list-style: none; margin: 0; padding: 0; }
.site-foot a:not(.wordmark) { display: inline-block; padding: 8px 0; text-decoration: none; font-weight: 550; }
.site-foot a:hover { text-decoration: underline; text-underline-offset: 5px; }
.site-foot small { font-size: var(--t-meta); color: var(--on-field-2); }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  :root { --gutter: 28px; }
  .site-head nav ul { gap: var(--s-5); }
  .hero-copy { grid-column: 1 / span 6; }
  .stage { grid-column: 7 / span 6; }
  .deck { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .counts-head, .board { grid-column: 1 / -1; }
  .board { grid-row: auto; }
  .resources-head h2, .resources-head p { grid-column: 1 / -1; }
  .parents-head { grid-column: 1 / -1; }
  .facts { grid-column: 1 / -1; }
}

/* ---------- Phone: its own order, not the desktop stacked ---------- */
@media (max-width: 900px) {
  .site-head nav { display: none; }
  .hero { display: flex; flex-direction: column; align-items: stretch; min-height: 0; padding: var(--s-4) 0 var(--s-7); }
  .hero-copy { display: contents; }
  .hero h1 { order: 1; margin-bottom: var(--s-4); }
  .hero .lede { order: 2; margin-bottom: 0; max-width: 46ch; }
  .stage { order: 3; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); aspect-ratio: auto; height: 470px; }
  .stage-foot { justify-content: flex-start; padding: 0 var(--gutter); }
  .stage { padding-bottom: 56px; box-sizing: content-box; }
  .stage canvas, .stage .poster { inset: 0 auto auto 0; height: calc(100% - 56px); }
  .hero .actions { order: 4; margin-top: var(--s-4); }
  .close-clock { grid-column: 1 / -1; grid-row: auto; max-width: 420px; }
}
@media (max-width: 760px) {
  :root { --gutter: 20px; --s-8: 72px; --s-9: 96px; }
  .wordmark { font-size: 26px; }
  .site-head { height: 72px; }
  .site-head nav { display: none; }
  .site-head .btn { display: none; }
  .hero h1 { font-size: clamp(2.6rem, 1rem + 7vw, 3rem); }
  .hero .lede { font-size: var(--t-body); }
  .stage { height: min(70vw, 290px); }
  .stage-foot { gap: var(--s-3); }
  .hero .actions { gap: var(--s-2) var(--s-4); }
  .hero .actions .btn { padding: 0 22px; }
  .filters { position: relative; flex-wrap: nowrap; overflow-x: auto; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding: 4px var(--gutter); scrollbar-width: none; scroll-snap-type: x proximity; }
  .filters::-webkit-scrollbar { display: none; }
  .filters li { flex: 0 0 auto; scroll-snap-align: start; }
  .whose { min-width: 0; }
  .tally { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; align-items: start; gap: var(--s-4); }
  .tally .arrow { display: none; }
  .tally dd { font-size: 3.5rem; }
  .tally { max-width: none; }
  .filters { scroll-padding-inline: var(--gutter); }
  .site-foot { margin-top: 48px; }
  .site-foot ul { gap: 12px 20px; }
  .site-foot a:not(.wordmark) { font-size: 15px; padding: 6px 0; }
  .close { padding-bottom: var(--s-6); }
  .close-clock { max-width: 300px; }
  .tally dt { font-size: var(--t-meta); }
  .site-foot ul { gap: var(--s-2) var(--s-5); }
  .deck { grid-template-columns: 1fr; }
  .post { --tilt: 0deg !important; }
  .close h2 { grid-column: 1 / -1; }
  .close .close-body { grid-column: 1 / -1; }
}

@media (max-width: 360px) {
  .stage { height: 200px; }
}


/* ---------- v2: Classes ---------- */
.classes { padding: 120px 0 var(--s-8); }
.classes h2 { font-size: var(--t-h2); font-weight: 780; font-stretch: 118%; letter-spacing: -.03em; line-height: 1; max-width: 16ch; }
.class-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; margin-top: var(--s-7); }
.class-card {
  position: relative; border-radius: var(--r-card); padding: 36px 32px 30px;
  background: var(--card); color: var(--ink);
  box-shadow: 0 3px 0 #d8cce2, 0 7px 0 #b9a8c7, 0 28px 40px -20px rgba(0, 0, 0, .6);
  transform: rotate(-1deg);
}
.class-card.school { background: var(--field); color: var(--on-field); transform: rotate(1deg);
  box-shadow: 0 3px 0 #6e009d, 0 7px 0 #520075, 0 28px 40px -20px rgba(0, 0, 0, .6); }
.class-card .pin {
  position: absolute; top: -11px; left: 50%; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, rgba(255,255,255,.95) 0 10%, rgba(255,255,255,0) 32%), radial-gradient(circle at 50% 55%, #ffe27a 0 40%, #e0b21a 78%, #8a6a00 100%);
  box-shadow: 0 3px 2px rgba(0,0,0,.35), 2px 8px 6px -2px rgba(0,0,0,.3);
}
.class-card.global .pin { background: radial-gradient(circle at 34% 30%, rgba(255,255,255,.95) 0 9%, rgba(255,255,255,0) 30%), radial-gradient(circle at 50% 55%, #a43be0 0 45%, #6e009d 75%, #3d0058 100%); }
.class-card .eyebrow { font-size: var(--t-meta); font-weight: 700; color: var(--field); margin-bottom: var(--s-2); }
.class-card.school .eyebrow { color: var(--foil); }
.class-card h3 { font-size: 1.75rem; font-weight: 780; font-stretch: 115%; letter-spacing: -.02em; line-height: 1.05; margin-bottom: var(--s-3); }
.class-card > p { color: var(--ink-2); max-width: 40ch; }
.class-card.school > p { color: var(--on-field-2); }
.class-card ul { margin: var(--s-5) 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.class-card li { position: relative; padding-left: 22px; font-weight: 550; }
.class-card li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; border-radius: 50%; background: currentColor; opacity: .35; }
.pair-note { margin-top: var(--s-7); max-width: 60ch; font-size: var(--t-body-l); color: var(--on-night-2); }

.post .course.pick { background: var(--field); color: #fff; }
.post.question { background: #fff; }
.post.question p strong { color: var(--ink); }
.post.shared { background: var(--paper); border-style: dashed; }
.resources-foot .text-link { text-decoration-color: var(--field); }

.test-week { padding: var(--s-8) 0 var(--s-9); }
.tw-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: var(--s-7); align-items: center; border-top: 2px solid var(--ink); padding-top: var(--s-7); }
.tw-copy { grid-column: 1 / span 5; }
.tw-copy h2 { font-size: var(--t-h2); font-weight: 780; font-stretch: 118%; letter-spacing: -.03em; line-height: 1; }
.tw-copy > p { margin-top: var(--s-5); font-size: var(--t-body-l); color: var(--ink-2); max-width: 40ch; }
.tw-points { list-style: none; margin: var(--s-6) 0 0; padding: 0; display: grid; gap: var(--s-4); max-width: 46ch; }
.tw-points li { color: var(--ink-2); }
.tw-points strong { color: var(--ink); display: block; font-stretch: 108%; }

.mini-board {
  grid-column: 7 / span 6; position: relative; aspect-ratio: 560 / 520; border-radius: 22px;
  background: #e9e1f0; border: 1px solid #d8cce2;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.4), inset 0 -10px 30px -18px rgba(29,15,40,.25);
}
.mini-strings { position: absolute; inset: 0; width: 100%; height: 100%; }
.mini-strings path { fill: none; stroke: #6b4a86; stroke-width: 1.8; opacity: .75; vector-effect: non-scaling-stroke; }
.mb-card {
  position: absolute; transform: translate(-50%, 0) rotate(var(--t, -1deg)); width: 27%;
  background: #fff; border-radius: 12px; padding: 16px 12px 10px; font-size: 13px; line-height: 1.25;
  box-shadow: 0 2px 0 #ddd3e6, 0 4px 0 #c9bcd5, 0 12px 16px -10px rgba(29,15,40,.45);
}
.mb-card:nth-child(odd) { --t: 1.2deg; }
.mb-card i { position: absolute; top: -7px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, rgba(255,255,255,.95) 0 9%, rgba(255,255,255,0) 30%), radial-gradient(circle at 50% 55%, #a43be0 0 45%, #6e009d 75%, #3d0058 100%);
  box-shadow: 0 2px 2px rgba(29,15,40,.35); }
.mb-card b { display: block; font-weight: 750; font-stretch: 108%; }
.mb-card span { display: block; color: var(--ink-2); margin-top: 3px; }
.mb-card.slab { background: var(--ink); color: #fff; width: 34%; }
.mb-card.slab span { color: var(--on-night-2); }
.mb-card.slab i { background: radial-gradient(circle at 34% 30%, rgba(255,255,255,.95) 0 10%, rgba(255,255,255,0) 32%), radial-gradient(circle at 50% 55%, #ffe27a 0 40%, #e0b21a 78%, #8a6a00 100%); }
.mb-card.event { background: var(--field); color: #fff; }
.mb-card.event span { color: var(--on-field-2); }
.mb-card.note { box-shadow: 0 8px 14px -10px rgba(29,15,40,.45); }
.mb-card.check { background: var(--paper); border: 1.5px dashed var(--ink-2); box-shadow: none; width: 34%; }
.mb-card .box { display: inline-block; width: 11px; height: 11px; border: 1.5px solid var(--ink-2); border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.clock-side { grid-column: 7 / span 6; grid-row: 1; align-self: center; }
.clock-side img { width: 100%; max-width: 560px; height: auto; margin: 0 auto; }
.clock-side .note { color: var(--on-night-2); max-width: 46ch; margin: var(--s-3) auto 0; font-size: var(--t-small); text-align: center; }

@media (max-width: 1100px) {
  .tw-copy, .mini-board { grid-column: 1 / -1; }
  .mini-board { max-width: 600px; width: 100%; justify-self: center; }
  .clock-side { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 760px) {
  .class-pair { grid-template-columns: 1fr; gap: 36px; }
  .class-card { padding: 30px 22px 24px; }
  .mb-card { width: 30%; font-size: 12px; padding: 12px 8px 8px; }
  .mb-card.slab, .mb-card.check { width: 38%; }
  .classes { padding-top: 96px; }
}


/* ---------- v3: the hub and its features ---------- */
.kicker { font-size: var(--t-meta); font-weight: 700; font-stretch: 110%; margin: 0 0 var(--s-3); color: var(--field); }
.on-night .kicker, .on-field .kicker { color: var(--foil); }

.hub-stage { aspect-ratio: 1.08 / 1; max-height: calc(100svh - 160px); }
@media (max-height: 700px) and (min-width: 901px) {
  .hero h1 { font-size: clamp(2.6rem, 9vh, 5rem); }
  .hero .lede { margin-bottom: var(--s-5); }
}
.hub-legend { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; }
.hub-legend .whose { min-width: 0; }

.feature-nav { display: flex; flex-wrap: wrap; gap: var(--s-2); padding: 0 0 var(--s-7); margin-top: calc(-1 * var(--s-5)); }
.feature-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,.4); color: var(--on-field); text-decoration: none; font-weight: 600; font-size: 1rem;
}
.feature-nav a:hover { background: rgba(255,255,255,.12); border-color: var(--on-field); }

.feature { padding: 120px 0; }
.feature-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: var(--s-6); align-items: center; }
.feature-copy { grid-column: 1 / span 5; grid-row: 1; }
.feature-stage { grid-column: 7 / span 6; grid-row: 1; position: relative; margin: 0; aspect-ratio: 1.12 / 1; }
.feature-grid.reverse .feature-copy { grid-column: 8 / span 5; }
.feature-grid.reverse .feature-stage { grid-column: 1 / span 6; }
.feature h2 { font-size: var(--t-h2); font-weight: 780; font-stretch: 118%; letter-spacing: -.03em; line-height: 1; }
.feature-lede { margin-top: var(--s-5); font-size: var(--t-body-l); color: var(--ink-2); max-width: 42ch; }
.on-night .feature-lede { color: var(--on-night-2); }
.on-field .feature-lede { color: var(--on-field-2); }
.feature-points { list-style: none; margin: var(--s-5) 0 var(--s-5); padding: 0; display: grid; gap: 10px; max-width: 46ch; }
.feature-points li { position: relative; padding-left: 22px; font-weight: 550; }
.feature-points li::before { content: ""; position: absolute; left: 0; top: .6em; width: 9px; height: 9px; border-radius: 50%; background: var(--field); }
.on-night .feature-points li::before, .on-field .feature-points li::before { background: var(--foil); }
.feature-stage canvas, .feature-stage .poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.feature-stage .poster { object-fit: contain; }
.feature-stage.live .poster { visibility: hidden; }
.feature-stage canvas { touch-action: pan-y; }
.on-paper .press { color: var(--ink); }
.on-paper .press svg { color: var(--field); }
.on-paper .whose { color: var(--ink-2); }
.on-night .text-link { text-decoration-color: var(--foil); }
.on-paper .text-link { text-decoration-color: var(--field); }
.on-night.close { color: var(--on-field); }
.on-night.close .close-body p { color: var(--on-night-2); }
.on-night.close .site-foot small { color: var(--on-night-2); }
.on-night .wordmark { --mk: var(--foil); --hand: var(--foil); color: var(--on-field); }

@media (max-width: 900px) {
  .feature { padding: 88px 0; }
  .feature-grid, .feature-grid.reverse { display: flex; flex-direction: column; align-items: stretch; }
  .feature-copy { order: 1; }
  .feature-stage { order: 2; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); aspect-ratio: auto; height: min(88vw, 520px); padding-bottom: 56px; box-sizing: content-box; }
  .feature-stage canvas, .feature-stage .poster { height: calc(100% - 56px); inset: 0 auto auto 0; }
  .feature-stage .stage-foot { padding: 0 var(--gutter); justify-content: flex-start; }
  .hub-stage { padding-bottom: 40px; }
  .feature-nav { margin-top: 0; }
}

@media (forced-colors: active) {
  .settings i, .settings i::after { forced-color-adjust: none; }
  .btn, .press, .filters button { border: 2px solid ButtonText; }
  .board .me::before { background: Highlight; }
}
