/* whoishere.today page CSS: only what sits inside a visual and the kit lacks (tasteskill: page CSS),
   one --p-h per card group, and the long-text pages (help, legal). Everything else is the kit's. */

/* the seat colours shared with the app (src/lib/palette.ts STATUS_META) */
:root {
  --wh-present: #d9f7ea; --wh-present-line: #55cda2; --wh-present-ink: #175b48;
  --wh-late: #fff4c7; --wh-late-line: #e6a913; --wh-late-ink: #744d11;
}

/* ---------------------------------------------------------------- hero */
.hero__proof { font-size: var(--t-small); color: var(--ink); }
.hero__art .ui-win { width: 100%; }
/* the hero's window: no time column; a count column before the chips, and the content keeps 40px clear
   at the right, so the frame (which runs 28px past the art's edge) cuts empty margin, never a chip */
@container ui-win (min-width: 540px) {
  .hero__art .ui-win__body { grid-template-columns: 136px minmax(0, 1fr); }
  .hero__art .ui-win__cols, .hero__art .ui-win__row { grid-template-columns: 24px 80px minmax(0, 1fr) 52px 100px; }
  .hero__art .ui-win__row > .ui-win__age { grid-column: 4; grid-row: 1; text-align: right; font-variant-numeric: tabular-nums; color: var(--u-muted); }
  .hero__art .ui-win__row > .ui-win__st { grid-column: 5; grid-row: 1; }
  .hero__art .ui-win__cols > span:nth-child(3) { text-align: right; }
}
.hero__art .ui-win__main { padding-right: 40px; }

/* the small card over the window's lower-left corner */
.wh-note { background: #fff; color: #16181a; border-radius: var(--r-md); padding: 14px 16px; font: 400 14px/1.4 var(--font-text);
  box-shadow: 0 0 0 1px rgb(0 0 0 / .07), 0 18px 44px -20px rgb(0 0 0 / .45); }
.hero__art > .ly-piece--note { left: var(--s-6); bottom: var(--s-6); width: 300px; z-index: 2; }
@media (max-width: 1023px) { .hero__art > .ly-piece--note { left: var(--s-4); bottom: var(--s-4); width: 270px; } }
.wh-note__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.wh-note__head b { font-weight: 500; }
.wh-chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 13px; font-weight: 500;
  background: var(--wh-present); color: var(--wh-present-ink); white-space: nowrap; }
.wh-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.wh-note__line { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13px; color: #3d4247; border-top: 1px solid rgb(0 0 0 / .06); }
.wh-note__line:first-of-type { border-top: 0; }
.wh-note__line b { font-weight: 500; color: #16181a; }
.wh-note__line i { width: 18px; height: 18px; border-radius: 50%; flex: none; display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 500;
  background: var(--wh-present); color: var(--wh-present-ink); }
.wh-note__line i.is-late { background: var(--wh-late); color: var(--wh-late-ink); }

/* ---------------------------------------------------------------- app frame (sections-library app-frame) */
.app.ui { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); margin-top: var(--s-7); background: var(--u-bg); border: 1px solid var(--u-border); border-radius: var(--u-r); box-shadow: var(--u-shadow); }
.app > .app__pane { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.app > .app__pane + .app__pane { border-left: 1px solid var(--u-line); }
.app > .app__pane > .ui-panel { width: 100%; border: 0; border-radius: 0; box-shadow: none; }
.app > .app__pane::after { content: ""; position: absolute; inset: auto 0 0 0; height: 64px; background: linear-gradient(transparent, var(--u-bg)); pointer-events: none; }
@media (min-width: 1024px) and (max-width: 1279px) { .app.ui { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
@media (max-width: 1023px) {
  .app.ui { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .app > .app__pane--list { max-height: 252px; }
  .app > .app__pane--list::after { display: none; }
  .app .ui-win__side { display: none; }
  .app .ui-win__body { grid-template-columns: minmax(0, 1fr); }
  .app > .app__pane + .app__pane { border-left: 0; border-top: 1px solid var(--u-line); }
}
@media (max-width: 639px) {
  .app.ui { grid-template-rows: minmax(0, 1fr); }
  .app > .app__pane--list { display: none; }
  .app > .app__pane + .app__pane { border-top: 0; }
}
/* the roster's states in the app's own seat colours: present, late, checking in, expected */
.app .ui-win__st.is-done { color: var(--wh-present-ink); background: var(--wh-present); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--wh-present-line) 45%, transparent); }
.app .ui-win__st.is-you { color: var(--wh-late-ink); background: var(--wh-late); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--wh-late-line) 45%, transparent); }
.app .ui-win__st.is-you::before { background: currentColor; }

/* ---------------------------------------------------------------- the seat map (the open pane) */
.wh-map { container: wh-map / inline-size; height: 100%; display: flex; flex-direction: column; padding: 18px 22px 0; font: 400 13px/1.3 var(--font-text); color: var(--u-ink); }
.app > .app__pane--open::after { display: none; }
.wh-map__head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--u-line); }
.wh-map__title { display: grid; gap: 2px; margin-right: auto; min-width: 0; }
.wh-map__title b { font-size: 15px; font-weight: 500; }
.wh-map__title span { color: var(--u-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wh-map__live { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; background: var(--u-tint); color: var(--u-accent-text); font-weight: 500; white-space: nowrap; }
.wh-map__live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.wh-map__code { display: grid; justify-items: end; line-height: 1.1; }
.wh-map__code small { font-size: 13px; color: var(--u-muted); }
.wh-map__code b { font: 500 22px/1 var(--font-mono); letter-spacing: .04em; }
.wh-map__room { flex: 1; min-height: 0; display: grid; grid-template-rows: auto auto repeat(6, minmax(0, 1fr)); gap: 6px; padding: 12px 0 16px; }
.wh-map__front { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; margin-bottom: 4px; }
.wh-map__front > span:first-child { height: 26px; display: grid; place-items: center; border-radius: 6px; background: var(--u-fill-2); color: var(--u-muted); }
.wh-map__desk { height: 26px; padding: 0 12px; display: grid; place-items: center; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--u-line-2); color: var(--u-muted); }
.wh-map__legend { display: none; gap: 14px; color: var(--u-muted); }
.wh-map__legend span { display: inline-flex; align-items: center; gap: 6px; }
.wh-map__legend span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; border: 1px dashed var(--u-line-2); }
.wh-map__legend .is-present::before { border: 1px solid var(--wh-present-line); background: var(--wh-present); }
.wh-map__legend .is-late::before { border: 1px solid var(--wh-late-line); background: var(--wh-late); }
.wh-map__row { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.wh-bench { min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 3px; border-radius: 9px; background: var(--u-fill); }
.wh-seat { position: relative; display: grid; align-content: center; gap: 0; min-height: 0; padding: 0 8px; line-height: 1.15; border-radius: 7px; min-width: 0; overflow: hidden;
  border: 1px dashed var(--u-line-2); background: var(--u-bg); }
.wh-seat__id { font-size: 13px; color: var(--u-soft); }
.wh-seat__n { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wh-seat__i { display: none; font-weight: 500; }
.wh-seat:is(.wh-seat--present, .wh-seat--arrive-a, .wh-seat--arrive-b) { border: 1px solid var(--wh-present-line); background: var(--wh-present); color: var(--wh-present-ink); }
.wh-seat:is(.wh-seat--present, .wh-seat--arrive-a, .wh-seat--arrive-b) .wh-seat__id { color: color-mix(in oklab, var(--wh-present-ink) 70%, transparent); }
.wh-seat--late { border: 1px solid var(--wh-late-line); background: var(--wh-late); color: var(--wh-late-ink); }
.wh-seat--late .wh-seat__id { color: color-mix(in oklab, var(--wh-late-ink) 70%, transparent); }
/* a shorter frame (a laptop or tablet screen): the seat keeps its name on one line and drops its number */
@media (max-width: 1279px), (max-height: 860px) { .wh-seat__id { display: none; } }
/* too narrow for names: the seats are coloured tiles and a legend says what the colours mean */
@container wh-map (max-width: 520px) {
  .wh-map { padding: 14px 14px 0; }
  .wh-map__row { gap: 12px; }
  .wh-bench { gap: 4px; padding: 4px; }
  .wh-seat { padding: 0; }
  .wh-seat > span { display: none; }
  .wh-map__legend { display: flex; }
  .wh-map__title span { display: none; }
}
@container wh-map (max-width: 380px) { .wh-map__live { display: none; } }
/* the loop: two students take their seats a cycle (colours and opacity only), held finished at the end */
@keyframes wh-arrive-a { 0%, 26% { background: var(--u-bg); border-color: var(--u-line-2); } 32%, 100% { background: var(--wh-present); border-color: var(--wh-present-line); } }
@keyframes wh-arrive-b { 0%, 56% { background: var(--u-bg); border-color: var(--u-line-2); } 62%, 100% { background: var(--wh-present); border-color: var(--wh-present-line); } }
@keyframes wh-name-a { 0%, 26% { opacity: 0; } 32%, 100% { opacity: 1; } }
@keyframes wh-name-b { 0%, 56% { opacity: 0; } 62%, 100% { opacity: 1; } }
.wh-seat--arrive-a { animation: wh-arrive-a var(--m-cycle, 3.2s) linear infinite; }
.wh-seat--arrive-b { animation: wh-arrive-b var(--m-cycle, 3.2s) linear infinite; }
.wh-seat--arrive-a > :is(.wh-seat__n, .wh-seat__i) { animation: wh-name-a var(--m-cycle, 3.2s) linear infinite; }
.wh-seat--arrive-b > :is(.wh-seat__n, .wh-seat__i) { animation: wh-name-b var(--m-cycle, 3.2s) linear infinite; }

/* ---------------------------------------------------------------- students: four figures, two by two */
.wh-figures { margin-top: var(--s-9); row-gap: var(--s-7); }
.wh-figure { display: grid; align-content: start; gap: var(--s-3); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.wh-figure .t-stat { font-size: clamp(64px, 8vw, 128px); line-height: .95; font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking-xl); }
.wh-figure .t-small { max-width: 34ch; font-size: var(--t-body); line-height: 1.5; }
@media (max-width: 1023px) { .wh-figures { margin-top: var(--s-7); } .wh-figures > .wh-figure { grid-column: auto / span 6; } }
@media (max-width: 639px) { .wh-figures { row-gap: var(--s-6); } .wh-figure .t-stat { font-size: 28px; } .wh-figure .t-small { font-size: var(--t-small); } }

/* ---------------------------------------------------------------- features: one --p-h for the group */
/* a roll call ticks names present: the kit's struck-through done label would read as "removed" */
#features .ui-check.is-done .ui-check__label { text-decoration: none; color: var(--u-ink); }
#features .panel { --p-h: 336px; }
@media (max-width: 639px) { #features .panel { --p-h: 180px; } }

/* ---------------------------------------------------------------- exports: plain fact lines, the hub filling its frame */
.wh-facts { display: grid; }
.wh-facts li { padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.wh-facts li:last-child { border-bottom: 1px solid var(--line); }
#exports .frame--split > .dg { position: absolute; inset: 0; }

/* ---------------------------------------------------------------- inner pages: comparison rows and long text */
.wh-compare { margin-top: var(--s-7); }
.wh-compare__row { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr); align-items: center; gap: var(--s-4); min-height: 48px; border-bottom: 1px solid var(--line); }
.wh-compare__row > :not(:first-child) { text-align: center; }
.wh-compare__row--head { font-weight: 500; }
.wh-compare__dash { color: var(--muted); }
.wh-compare svg { display: inline-block; width: 18px; height: 18px; color: var(--accent); vertical-align: middle; }
@media (max-width: 639px) { .wh-compare__row { grid-template-columns: minmax(0, 1fr) 72px 72px; font-size: var(--t-small); } }

.wh-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); margin-top: var(--s-7); }
.wh-steps li { display: grid; gap: var(--s-2); align-content: start; padding-top: var(--s-4); border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.wh-steps h3 { font: 500 var(--t-card)/1.3 var(--font-text); }
@media (max-width: 1023px) { .wh-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 639px) { .wh-steps { grid-template-columns: 1fr; } }

.wh-legal { max-width: 68ch; }
.wh-legal h2 { font-size: var(--t-h3, 28px); margin: var(--s-8) 0 var(--s-3); }
.wh-legal h3 { font: 500 var(--t-card)/1.3 var(--font-text); margin: var(--s-6) 0 var(--s-2); }
.wh-legal p, .wh-legal li { line-height: 1.65; }
.wh-legal p { margin: 0 0 var(--s-4); }
.wh-legal ul { list-style: disc; padding-left: 1.25rem; margin: 0 0 var(--s-4); display: grid; gap: var(--s-2); }
.wh-legal a { text-decoration: underline; text-underline-offset: 3px; }
.wh-legal .t-lead { margin-top: var(--s-6); }

/* ---------------------------------------------------------------- the close: the name hand-set across the .wrap */
@media (min-width: 640px) { .closing .close__word { font-size: clamp(96px, 19vw, 272px); } }
.closing .close__word { line-height: 1.1; }

/* ---------------------------------------------------------------- pricing: the plan as the account page shows it */
.wh-plan { width: 100%; max-width: 360px; margin-top: var(--s-4); padding: 18px; display: grid; gap: 12px; font: 400 14px/1.4 var(--font-text); }
.wh-plan__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wh-plan__tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 99px; background: var(--u-tint); color: var(--u-accent-text); font-size: 13px; font-weight: 500; }
.wh-plan__bar { height: 6px; border-radius: 99px; background: var(--u-fill-2); overflow: hidden; }
.wh-plan__bar > i { display: block; height: 100%; width: calc(var(--k) * 100%); background: var(--u-accent); border-radius: inherit; }
.wh-plan__left { color: var(--u-text-2); }
.wh-plan__rows { display: grid; }
.wh-plan__rows > div { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--u-line); }
.wh-plan__rows dd { font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- questions: a student's phone after check-in */
.wh-phone { width: 248px; margin-top: var(--s-5); padding: 10px; border-radius: 38px; background: #0f0f0f; box-shadow: 0 30px 60px -30px rgb(0 0 0 / .45); }
.wh-phone__screen { display: grid; gap: 14px; align-content: start; min-height: 400px; padding: 22px 16px 18px; border-radius: 29px; background: #fff; color: #111; font: 400 13px/1.35 var(--font-text); }
.wh-phone__top { display: flex; align-items: center; gap: 6px; color: #1f6b3a; font-weight: 500; }
.wh-phone__top svg { width: 14px; height: 14px; }
.wh-phone__top span { color: #111; }
.wh-phone__class { display: grid; gap: 2px; }
.wh-phone__class b { font: 500 18px/1.2 var(--font-display); letter-spacing: -0.02em; }
.wh-phone__class span { color: #5e5e5e; }
.wh-phone__seats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; padding: 10px; border-radius: 12px; background: #f5f5f5; }
.wh-phone__seats i { aspect-ratio: 1.2; border-radius: 5px; border: 1px dashed #cfcfcf; background: #fff; }
.wh-phone__seats i.is-taken { border: 1px solid #dedede; background: #ededed; }
.wh-phone__seats i.is-mine { border: 2px solid #1f6b3a; background: var(--wh-present); }
.wh-phone__done { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 12px; background: var(--wh-present); color: var(--wh-present-ink); font-weight: 500; }
.wh-phone__done svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 639px) { .wh-plan { max-width: none; } .wh-phone { margin-inline: auto; } }
