/* Proctora app: calm, trustworthy, warm. Exam-paper light; one accent (blue); hierarchy through opacity. */
html, body { background: #f7f5f0; }
:root {
  --bg: 40 27% 95%;
  --fg: 210 13% 9%;
  --card: 0 0% 100%;
  --accent: #1d4ed8;
  --accent-ink: #ffffff;
  --danger: #b42318;
  --warn: #93370d;
  --ok: #067647;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, monospace;
  --enter: cubic-bezier(.22, 1, .36, 1);
  --state: cubic-bezier(.4, 0, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: hsl(var(--fg)); font-family: var(--sans); font-size: 16px; line-height: 1.55; letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
::selection { background: rgba(29, 78, 216, .18); }
[hidden] { display: none !important; }
a { color: inherit; }
button, input { font: inherit; letter-spacing: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Grain unifies the flat canvas and stops banding. */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.9'/></svg>");
}
/* Ambient light, never the visual. */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background: none;
}

/* Shell */
.shell { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: 0 64px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 0; position: relative; z-index: 2; }
.wordmark { font-family: var(--display); font-weight: 500; font-size: 20px; letter-spacing: -.045em; }
.wordmark sup { font-size: 10px; color: hsl(var(--fg) / .4); margin-left: 2px; letter-spacing: 0; }
.status { display: flex; align-items: center; gap: 18px; font-size: 12px; color: hsl(var(--fg) / .55); }
.status .sep { width: 1px; height: 14px; background: hsl(var(--fg) / .15); }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: hsl(var(--fg) / .35); margin-right: 8px; vertical-align: middle; }
.dot.ok { background: var(--accent); }
.dot.bad { background: var(--danger); }
.signout {
  background: transparent; border: 1px solid hsl(var(--fg) / .16); color: hsl(var(--fg) / .8); border-radius: 999px;
  padding: 7px 16px; font-size: 13px; cursor: pointer; transition: border-color .2s var(--state), color .2s var(--state);
}
.signout:hover { border-color: hsl(var(--fg) / .4); color: hsl(var(--fg)); }

/* Ghost wordmark: the signature. Static, behind everything. */
.ghost {
  position: fixed; left: 50%; bottom: -5.6vw; transform: translateX(-50%); z-index: 0; pointer-events: none;
  font-family: var(--display); font-weight: 600; font-size: 24vw; line-height: .8; letter-spacing: -.07em;
  color: hsl(var(--fg) / .035); white-space: nowrap; user-select: none;
}

main { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; justify-content: center; padding-bottom: 72px; }

/* Typography */
.eyebrow { font-family: var(--mono); font-size: 11.5px; letter-spacing: .24em; text-transform: uppercase; color: hsl(var(--fg) / .5); margin: 0 0 22px; }
.eyebrow::before { content: ""; display: inline-block; width: 32px; height: 1px; background: hsl(var(--fg) / .35); vertical-align: middle; margin-right: 14px; }
h1.display {
  font-family: var(--display); font-weight: 400; font-size: clamp(44px, 6.4vw, 92px); line-height: .98;
  letter-spacing: -.045em; margin: 0 0 26px;
}
h1.display .line { display: block; overflow: hidden; padding-bottom: .16em; margin-bottom: -.1em; }
h1.display .line > span { display: inline-block; white-space: nowrap; }
h1.display .muted { color: hsl(var(--fg) / .42); }
.lede { max-width: 30rem; font-size: 17px; color: hsl(var(--fg) / .62); margin: 0 0 44px; }
h1.title { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 4vw, 56px); line-height: 1.02; letter-spacing: -.04em; margin: 0 0 12px; }
.sub { color: hsl(var(--fg) / .55); margin: 0 0 32px; }

/* One material, reused: dark glass. */
.glass {
  background: hsl(var(--fg) / .035); border: 1px solid hsl(var(--fg) / .09); border-radius: 28px;
  backdrop-filter: blur(10px); box-shadow: inset 0 1px 0 hsl(var(--fg) / .06);
}

/* Role choice */
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); gap: 16px; }
.choice {
  position: relative; text-align: left; color: inherit; cursor: pointer; padding: 26px 28px 28px; min-height: 168px;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: border-color .25s var(--state), background-color .25s var(--state), transform .25s var(--state);
}
.choice:hover { border-color: hsl(var(--fg) / .24); background: hsl(var(--fg) / .06); }
.choice:active { transform: scale(.985); }
.choice .index { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; color: hsl(var(--fg) / .45); text-transform: uppercase; }
.choice strong { display: block; font-family: var(--display); font-weight: 400; font-size: 28px; letter-spacing: -.035em; margin-top: 18px; }
.choice .desc { color: hsl(var(--fg) / .55); font-size: 14.5px; }
.arrow {
  position: absolute; top: 22px; right: 22px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: hsl(var(--fg)); color: #f7f5f0; transition: transform .3s var(--state);
}
.choice:hover .arrow { transform: rotate(-45deg); }
.arrow svg { width: 16px; height: 16px; }

/* Pills */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 999px;
  padding: 12px 26px; font-size: 14.5px; font-weight: 500; cursor: pointer; border: 1px solid transparent;
  transition: background-color .2s var(--state), border-color .2s var(--state), opacity .2s var(--state);
}
.pill:active { transform: scale(.97); }
.pill-solid { background: hsl(var(--fg)); color: #f7f5f0; }
.pill-solid:hover { background: #2b3036; }
.pill-ghost { background: transparent; color: hsl(var(--fg) / .85); border-color: hsl(var(--fg) / .18); }
.pill-ghost:hover { border-color: hsl(var(--fg) / .4); }
.pill-accent { background: var(--accent); color: var(--accent-ink); }
.pill-accent:hover { filter: brightness(1.08); }
.pill[disabled] { opacity: .5; cursor: not-allowed; }
.back { background: none; border: 0; color: hsl(var(--fg) / .55); cursor: pointer; padding: 0; font-size: 14px; margin-bottom: 28px; }
.back:hover { color: hsl(var(--fg)); }

/* Forms */
.panel { max-width: 440px; padding: 32px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; color: hsl(var(--fg) / .6); margin-bottom: 8px; }
.field input {
  width: 100%; background: hsl(var(--fg) / .04); border: 1px solid hsl(var(--fg) / .12); border-radius: 14px;
  color: hsl(var(--fg)); padding: 14px 16px; font-size: 16px; transition: border-color .2s var(--state);
}
.field input:focus { outline: none; border-color: var(--accent); }
.hint { font-size: 13px; color: hsl(var(--fg) / .45); margin: 14px 0 0; }
.message { border-radius: 16px; padding: 12px 16px; font-size: 14.5px; margin: 0 0 18px; border: 1px solid; }
.message.error { color: var(--danger); border-color: rgba(180, 35, 24, .25); background: rgba(180, 35, 24, .05); }
.message.warning { color: var(--warn); border-color: rgba(181, 71, 8, .25); background: rgba(247, 144, 9, .07); }
.message.success { color: var(--ok); border-color: rgba(6, 118, 71, .25); background: rgba(6, 118, 71, .06); }
.message ul { margin: 8px 0 0; padding-left: 1.1rem; }
.message li { margin: 4px 0; }
.message li span { display: block; color: hsl(var(--fg) / .6); font-size: 13.5px; }

/* Home screens */
.home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.home main { justify-content: flex-start; padding-top: 24px; }
.exam-list { display: grid; gap: 14px; max-width: 980px; }
.exam { padding: 26px 30px; display: grid; grid-template-columns: 1fr auto; gap: 8px 28px; align-items: center; }
.exam h2 { font-family: var(--display); font-weight: 400; font-size: 26px; letter-spacing: -.03em; margin: 0; }
.exam .meta { font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: hsl(var(--fg) / .45); margin: 0; }
.exam .when { color: hsl(var(--fg) / .62); font-size: 14.5px; margin: 6px 0 0; }
.exam .rules { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.exam .rules li { font-size: 12.5px; color: hsl(var(--fg) / .6); border: 1px solid hsl(var(--fg) / .1); border-radius: 999px; padding: 4px 12px; }
.exam .side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; grid-row: 1 / 3; grid-column: 2; }
.state { font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: hsl(var(--fg) / .5); }
.state.open { color: var(--accent); }
.state.done { color: hsl(var(--fg) / .45); }
.empty { padding: 36px; color: hsl(var(--fg) / .55); max-width: 640px; }
.portal { padding: 32px; max-width: 640px; }
.portal h2 { font-family: var(--display); font-weight: 400; font-size: 28px; letter-spacing: -.03em; margin: 0 0 8px; }
.portal p { color: hsl(var(--fg) / .6); margin: 0 0 24px; }

/* Four role cards in a 2 x 2 grid */
.choices { grid-template-columns: repeat(2, minmax(0, 360px)); }
.choice { min-height: 132px; }
.choice strong { margin-top: 12px; font-size: 25px; }

/* Invitation flow */
.code-input { font-size: 22px !important; letter-spacing: .18em; text-transform: uppercase; }
.consent-text { color: hsl(var(--fg) / .75); line-height: 1.65; margin: 0 0 20px; }
.agree { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; font-size: 15px; cursor: pointer; }
.agree input { width: 18px; height: 18px; accent-color: var(--accent); }
.camera-panel { max-width: 560px; }
.camera { position: relative; aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; background: #000; margin-bottom: 18px; }
.camera video, .camera img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scaleX(-1); }
.camera img { transform: none; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Entrance choreography: nav → eyebrow → headline lines → lede → cards. */
@media (prefers-reduced-motion: no-preference) {
  .enter .topbar { animation: fade .8s var(--enter) both; }
  .enter .eyebrow { animation: rise .8s var(--enter) .15s both; }
  .enter h1.display .line > span { animation: line 1s var(--enter) both; }
  .enter h1.display .line:nth-child(1) > span { animation-delay: .25s; }
  .enter h1.display .line:nth-child(2) > span { animation-delay: .37s; }
  .enter .lede { animation: rise .8s var(--enter) .5s both; }
  .enter .choice { animation: rise .8s var(--enter) both; }
  .enter .choice:nth-child(1) { animation-delay: .62s; }
  .enter .choice:nth-child(2) { animation-delay: .7s; }
  .enter .choice:nth-child(3) { animation-delay: .78s; }
  .enter .choice:nth-child(4) { animation-delay: .86s; }
  .screen-in > * { animation: rise .6s var(--enter) both; }
  .screen-in > *:nth-child(2) { animation-delay: .06s; }
  .screen-in > *:nth-child(3) { animation-delay: .12s; }
  .screen-in > *:nth-child(4) { animation-delay: .18s; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes line { from { transform: translateY(110%); } to { transform: none; } }

@media (max-width: 860px) {
  .shell { padding: 0 22px; }
  .choices { grid-template-columns: 1fr; }
  .status .clock-label, .status .sep { display: none; }
  .exam { grid-template-columns: 1fr; }
  .exam .side { grid-row: auto; grid-column: 1; align-items: flex-start; flex-direction: row; }
}
@media (max-height: 720px) {
  h1.display { font-size: clamp(40px, 5.2vw, 72px); }
  .lede { margin-bottom: 28px; }
}

/* D3.2: start agreement, invitations, practice */
.home-actions { display: flex; gap: 10px; }
.overlay { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(20, 23, 26, .45); backdrop-filter: blur(6px); }
.dialog { width: min(620px, 100%); padding: 30px 32px; max-height: calc(100vh - 48px); overflow: auto; }
.dialog h2 { font-family: var(--display); font-weight: 400; font-size: 28px; letter-spacing: -.03em; margin: 4px 0 16px; }
.checklist { margin: 0 0 18px; padding-left: 20px; color: hsl(var(--fg) / .8); }
.checklist li { margin: 4px 0; }
.warning-box { display: flex; flex-direction: column; gap: 4px; border: 1px solid rgba(181, 71, 8, .25); background: rgba(247, 144, 9, .07);
  color: var(--warn); border-radius: 14px; padding: 14px 16px; margin: 0 0 18px; font-size: 14.5px; }
.warning-box span { color: hsl(var(--fg) / .7); }
.dialog-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dialog-actions .spacer { flex: 1; }
.pill:disabled { opacity: .4; cursor: not-allowed; filter: none; }
.exam.invited { border-color: rgba(29, 78, 216, .5); box-shadow: 0 0 0 1px rgba(29, 78, 216, .2) inset; }
.exam .invite-note { grid-column: 1 / -1; margin: 6px 0 0; font-size: 13.5px; color: var(--accent); }
.practice-layer { position: fixed; inset: 0; z-index: 50; background: #f7f5f0; }
.practice-layer iframe { width: 100%; height: 100%; border: 0; display: block; }

/* D3.3: create an account, join a class */
.register-link { margin-top: 18px; }
.link-button { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.register-panel { max-width: 560px; }
.register-class { font-family: var(--mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: hsl(var(--fg) / .55); margin: 0 0 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.optional { color: hsl(var(--fg) / .45); font-weight: 400; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

/* D7: my results */
.results-dialog { width: min(760px, 100%); }
.results-list { display: grid; gap: 10px; }
.result { padding: 16px 20px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.result h3 { margin: 2px 0 4px; font-weight: 500; }
.result .meta, .result-question .meta { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: hsl(var(--fg) / .45); margin: 0; }
.result .side { display: flex; gap: 8px; }
.result-score { margin: 0; font-weight: 600; }
.result-score.passed { color: var(--accent); }
.result-score.failed { color: var(--warn); }
.result-note { margin: 0; color: hsl(var(--fg) / .7); }
.result-head { margin: 12px 0; }
.result-question { border-top: 1px solid hsl(var(--fg) / .1); padding: 10px 0; }
.result-question p { margin: 4px 0; }
.result-question .q-text { font-weight: 600; }
.result-question .correct { color: var(--accent); }

/* S1: organisation sign-up */
.org-signup-link { margin-top: 22px; }
.kind-choice { border: 0; padding: 0; margin: 0 0 12px; }
.kind-choice legend { font-size: 14px; color: hsl(var(--fg) / .7); margin-bottom: 6px; }
.kind-choice .agree { margin-bottom: 8px; }

/* L1: shared lab computers */
.lab-banner { padding: 10px 14px; border-radius: 12px; margin-bottom: 18px; font-size: 14px; color: hsl(var(--fg) / .85); }
.lab-setup-link { margin-left: 18px; opacity: .7; }
.pill-wide { width: 100%; }

/* Start screen: three portals and a guide */
.portal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.display-compact { margin-bottom: 30px; }
.portal-sit {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; text-align: left; cursor: pointer;
  padding: 30px 34px; border-radius: 28px; border: 0; background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 18px 40px -20px rgba(29, 78, 216, .55); transition: transform .2s var(--state), box-shadow .2s var(--state);
}
.portal-sit:hover { transform: translateY(-2px); box-shadow: 0 24px 50px -20px rgba(29, 78, 216, .65); }
.portal-sit:active { transform: scale(.99); }
.portal-sit .index { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; opacity: .7; }
.portal-sit strong { display: block; font-family: var(--display); font-weight: 400; font-size: 40px; letter-spacing: -.04em; margin: 10px 0 6px; line-height: 1.05; }
.portal-sit .desc { font-size: 15px; opacity: .78; }
.portal-sit .arrow { position: static; transform: none; flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-ink); color: var(--accent); }
.portal-sit .arrow svg { width: 22px; height: 22px; }
.portal-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.portal-card strong { font-size: 24px; }
.guide { padding: 24px; border-radius: 24px; position: sticky; top: 24px; }
.guide-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: hsl(var(--fg) / .55); margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.guide-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(29, 78, 216, .15); }
.guide h2 { font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: -.03em; margin: 0 0 8px; }
.guide p { color: hsl(var(--fg) / .65); font-size: 14.5px; margin: 0 0 12px; }
.guide-list { margin: 0 0 16px; padding-left: 18px; color: hsl(var(--fg) / .8); font-size: 14px; display: grid; gap: 8px; }
.guide-note { font-size: 13px; color: hsl(var(--fg) / .5); }
.guide-help { width: 100%; margin-top: 4px; }
.wizard-question { color: hsl(var(--fg)) !important; font-size: 16px !important; margin-bottom: 14px !important; }
.wizard-answers { display: grid; gap: 10px; margin-bottom: 14px; }
.wizard-answer { width: 100%; text-align: left; white-space: normal; }
.wizard-restart { font-size: 13px; }
@media (max-width: 980px) {
  .portal-layout { grid-template-columns: 1fr; }
  .guide { position: static; }
}
@media (max-width: 620px) {
  .portal-pair { grid-template-columns: 1fr; }
  .portal-sit strong { font-size: 30px; }
}
/* Cards on the second screen appear at once (the staggered entrance is for the start screen). */
.enter #screen-sit .choice { animation-delay: 0s; animation-duration: .4s; }
/* Small helpers in place of inline styles (the security policy blocks style attributes). */
.u-wide { width: 100%; }
.u-m0 { margin: 0; }
.u-mt16 { margin: 16px 0 0; }
.u-max640 { max-width: 640px; }

/* ---- Light theme: one card material (white paper on warm off-white) ---------------------------------------- */
.glass { background: #ffffff; border: 1px solid hsl(var(--fg) / .08); backdrop-filter: none;
  box-shadow: 0 1px 2px rgba(20, 23, 26, .04), 0 10px 28px -16px rgba(20, 23, 26, .16); }
.choice.glass:hover { background: #ffffff; border-color: hsl(var(--fg) / .2); box-shadow: 0 1px 2px rgba(20, 23, 26, .05), 0 16px 36px -18px rgba(20, 23, 26, .22); }
h1.display .muted, .display .muted { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 400; letter-spacing: -.03em; color: hsl(var(--fg) / .45); }
.ghost { color: hsl(var(--fg) / .03); }
.portal-sit .arrow { background: #ffffff; color: var(--accent); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(29, 78, 216, .15); }

/* Single column; the guide is a strip at the bottom. */
.portal-layout { grid-template-columns: 1fr; gap: 0; }
.portal-main { max-width: 980px; }
.guide-strip { position: static; margin-top: 28px; padding: 22px 28px; border-radius: 22px;
  display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px 28px; align-items: center; }
.guide-strip .guide-eyebrow { margin: 0; }
.guide-strip > div[id$="guide-body"] { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); gap: 4px 28px; align-items: start; }
.guide-strip h2 { grid-column: 1; font-size: 20px; margin: 0; }
.guide-strip > div[id$="guide-body"] > p { grid-column: 1; margin: 0; }
.guide-strip .guide-list { grid-column: 2; grid-row: 1 / span 3; margin: 0; }
.guide-strip .guide-help { width: auto; margin: 0; white-space: nowrap; }
.guide-strip .guide-wizard:not([hidden]) { grid-column: 2 / span 2; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.guide-strip .wizard-question { margin: 0 !important; flex: 1 1 260px; }
.guide-strip .wizard-answers { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.guide-strip .wizard-answer { width: auto; }
#screen-sit .guide-strip { grid-template-columns: 150px minmax(0, 1fr); }

/* Continue with Google / email */
.or-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: hsl(var(--fg) / .45); font-size: 13px; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: hsl(var(--fg) / .12); }
.google-button { background: #ffffff; color: hsl(var(--fg)); border: 1px solid hsl(var(--fg) / .18); gap: 12px; }
.google-button:hover { border-color: hsl(var(--fg) / .4); background: #fbfbfa; }
.google-button[disabled] { opacity: .6; cursor: progress; }
.g-logo { width: 18px; height: 18px; flex: none; }
.join-panel { display: grid; gap: 12px; max-width: 460px; }
.join-panel .hint { margin: 4px 0 0; }
.register-link { color: hsl(var(--fg) / .6); }
.google-note { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: rgba(29, 78, 216, .06); color: hsl(var(--fg) / .8); font-size: 14px; }

@media (max-width: 900px) {
  .guide-strip, #screen-sit .guide-strip { grid-template-columns: 1fr; }
  .guide-strip > div[id$="guide-body"] { grid-template-columns: 1fr; }
  .guide-strip .guide-list { grid-column: 1; grid-row: auto; }
  .guide-strip .guide-wizard:not([hidden]) { grid-column: 1; }
}

/* Start screen rhythm: everything on one laptop screen (1366 x 768), guide strip included. */
.portal-main { max-width: none; }
#screen-start .eyebrow { margin-bottom: 14px; }
h1.display.display-compact { font-size: clamp(44px, 5.2vw, 76px); line-height: .98; margin: 0 0 24px; }
.portal-sit { padding: 24px 30px; }
.portal-sit strong { font-size: 36px; margin: 8px 0 4px; }
.portal-pair .choice { min-height: 0; padding-top: 20px; padding-bottom: 20px; }
.portal-pair .choice strong { margin-top: 8px; }
#screen-start .org-signup-link { margin: 18px 0 0; }
.guide-strip { margin-top: 22px; }
main { padding-bottom: 28px; }
.topbar { padding: 22px 0; }

/* ======================================================================================================
   Clear glass theme (2026-11-21): midnight ink with soft azure / cyan / amber light pools and fine grain,
   liquid-glass surfaces with a light-catching hairline rim, white text, solid white primary actions.
   This layer overrides the earlier light theme.
   ====================================================================================================== */
:root {
  --fg: 0 0% 100%;
  --accent: #60a5fa;          /* links and focus on dark glass (azure, lifted for contrast) */
  --accent-ink: #0a0f1f;
  --danger: #fca5a5;
  --warn: #fcd34d;
  --ok: #6ee7b7;
  --ink: #0a0f1f;
  --glass-fill: rgba(255, 255, 255, .06);
  --glass-fill-strong: rgba(255, 255, 255, .09);
}
html, body { background: #070b1a; }
body { color: #fff; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: rgba(96, 165, 250, .4); color: #fff; }

/* The scene behind the glass: static light pools (no animation, cheap on lab PCs) + film grain. */
body::before {
  content: ""; position: fixed; inset: -10%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(42% 48% at 14% 10%, rgba(59, 130, 246, .55) 0%, rgba(59, 130, 246, 0) 70%),
    radial-gradient(36% 40% at 88% 16%, rgba(34, 211, 238, .30) 0%, rgba(34, 211, 238, 0) 70%),
    radial-gradient(40% 44% at 78% 92%, rgba(14, 165, 233, .26) 0%, rgba(14, 165, 233, 0) 70%),
    radial-gradient(30% 34% at 6% 94%, rgba(251, 191, 36, .16) 0%, rgba(251, 191, 36, 0) 70%),
    linear-gradient(180deg, #0a1026 0%, #070b1a 60%, #060916 100%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.shell { z-index: 1; }
.ghost { color: rgba(255, 255, 255, .025); }

/* Liquid glass: blur + tint + a hairline rim bright at top and bottom, fading at the sides. */
.glass {
  position: relative; background: var(--glass-fill); border: 0;
  -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .14), 0 18px 50px -24px rgba(0, 0, 0, .55);
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.2px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .5) 0%, rgba(255, 255, 255, .16) 22%, rgba(255, 255, 255, 0) 42%,
    rgba(255, 255, 255, 0) 58%, rgba(255, 255, 255, .14) 80%, rgba(255, 255, 255, .38) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask-composite: exclude;
}
.choice.glass { transition: background .25s var(--state), transform .25s var(--state), box-shadow .25s var(--state); }
.choice.glass:hover { background: var(--glass-fill-strong); border: 0; transform: translateY(-2px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .2), 0 24px 60px -24px rgba(0, 0, 0, .6); }
.choice .index, .portal-sit .index, .eyebrow, .guide-eyebrow { color: rgba(255, 255, 255, .72); font-size: 11.5px; }
.eyebrow::before { background: rgba(255, 255, 255, .5); }
.choice .desc, .sub, .lede, .guide p { color: rgba(255, 255, 255, .74); }
.choice strong, .guide h2, .title { color: #fff; }
.choice .arrow { background: rgba(255, 255, 255, .95); color: var(--ink); }

/* Headline: crisp white, the accent line in a soft serif italic. */
h1.display { color: #fff; text-shadow: 0 2px 24px rgba(0, 0, 0, .25); }
h1.display .muted, .display .muted { color: rgba(214, 228, 255, .78); }

/* Primary action: solid white (most legible on glass); the big portal is a white slab with an ink arrow chip. */
.pill-solid { background: #fff; color: var(--ink); }
.pill-solid:hover { background: #e9efff; }
.pill-ghost { background: rgba(255, 255, 255, .06); color: #fff; border-color: rgba(255, 255, 255, .22); }
.pill-ghost:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .4); }
.portal-sit { background: linear-gradient(180deg, #ffffff 0%, #eef3ff 100%); color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 24px 60px -22px rgba(59, 130, 246, .65); }
.portal-sit:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 30px 70px -22px rgba(59, 130, 246, .8); }
.portal-sit .index { color: rgba(10, 15, 31, .6); }
.portal-sit .desc { color: rgba(10, 15, 31, .7); opacity: 1; }
.portal-sit .arrow { background: var(--ink); color: #fff; }

/* Status bar as a slim glass pill. */
.status { color: rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .06); padding: 8px 16px; border-radius: 999px;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .12); }
.status .sep { background: rgba(255, 255, 255, .22); }
.dot.ok { background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .2); }
.wordmark { color: #fff; font-size: 19px; }

/* Forms on glass. */
.field label { color: rgba(255, 255, 255, .78); }
.field input, .field select, .field textarea, input.code-input {
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); color: #fff; }
.field input::placeholder { color: rgba(255, 255, 255, .42); }
input:focus, select:focus, textarea:focus, .field input:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(96, 165, 250, .28); }
.hint, .optional, .register-link { color: rgba(255, 255, 255, .62); }
.link-button { color: #93c5fd; }
.back { color: rgba(255, 255, 255, .7); }
.back:hover { color: #fff; }
.agree { color: rgba(255, 255, 255, .85); }

/* Messages and notes on dark glass. */
.message.error { color: #fecaca; border-color: rgba(248, 113, 113, .35); background: rgba(248, 113, 113, .12); }
.message.warning { color: #fde68a; border-color: rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .1); }
.message.success { color: #a7f3d0; border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .1); }
.google-note { background: rgba(96, 165, 250, .14); color: #dbeafe; }
.warning-box { border-color: rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .1); }
.exam.invited { border-color: transparent; box-shadow: 0 0 0 1.5px rgba(147, 197, 253, .7) inset; }

/* Guide strip and Google button. */
.guide-dot { background: #22d3ee; box-shadow: 0 0 0 4px rgba(34, 211, 238, .2); }
.guide-list { color: rgba(255, 255, 255, .88); }
.or-divider { color: rgba(255, 255, 255, .55); }
.or-divider::before, .or-divider::after { background: rgba(255, 255, 255, .16); }
.google-button { background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .22); }
.google-button:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .4); }

/* Dialogs over the scene. */
.overlay { background: rgba(3, 6, 15, .6); }
.camera { background: #000; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(20, 28, 52, .92); }
}

/* Round 2: clearer glass. A light pool behind the card area, and a diagonal sheen inside each panel. */
body::before {
  background:
    radial-gradient(42% 48% at 14% 10%, rgba(59, 130, 246, .55) 0%, rgba(59, 130, 246, 0) 70%),
    radial-gradient(36% 40% at 88% 16%, rgba(34, 211, 238, .32) 0%, rgba(34, 211, 238, 0) 70%),
    radial-gradient(46% 38% at 52% 68%, rgba(96, 165, 250, .30) 0%, rgba(96, 165, 250, 0) 72%),
    radial-gradient(40% 44% at 82% 94%, rgba(14, 165, 233, .28) 0%, rgba(14, 165, 233, 0) 70%),
    radial-gradient(30% 34% at 6% 94%, rgba(251, 191, 36, .18) 0%, rgba(251, 191, 36, 0) 70%),
    linear-gradient(180deg, #0b1230 0%, #080d20 55%, #060916 100%);
}
.glass { background: linear-gradient(135deg, rgba(255, 255, 255, .13) 0%, rgba(255, 255, 255, .05) 45%, rgba(255, 255, 255, .035) 100%); }
.choice.glass:hover { background: linear-gradient(135deg, rgba(255, 255, 255, .18) 0%, rgba(255, 255, 255, .07) 45%, rgba(255, 255, 255, .05) 100%); }

/* Automatic updates */
.update-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 20px; border-radius: 18px; margin: 0 0 18px; }
.update-banner strong { display: block; color: #fff; font-weight: 600; }
.update-banner span { color: rgba(255, 255, 255, .72); font-size: 14px; }
.update-actions { display: flex; align-items: center; gap: 14px; flex: none; }
.update-dialog { max-width: 480px; }
