/* School Meeting Prep by Noxe. Study 5 layout (big title, round mark, ruled list, one highlighted row), harbour teal and clay colours. */
@font-face { font-family: 'Inter Tight'; src: url(../fonts/InterTight.woff2) format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url(../fonts/Newsreader-500.woff2) format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --bg: #EAF0EE; --card: #EAF0EE; --well: #DCE6E3; --ink: #0F2A2B; --ink2: #4A6160; --line: #0F2A2B; --rule: #0F2A2B;
  --hi: #F2A58C; --hi-ink: #2A0F08; --btn: #0F3D3E; --btn-ink: #F1F7F5; --field: #0F2A2B;
  --red: #A62A1F; --ok: #17695A; --on-red: #FFFFFF;
  --shadow: none;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12201F; --card: #12201F; --well: #1B2D2C; --ink: #E8F2EF; --ink2: #9DB5B1; --line: #587471; --rule: #587471;
    --hi: #F2A58C; --hi-ink: #2A0F08; --btn: #F2A58C; --btn-ink: #2A0F08; --field: #8FA9A5;
    --red: #FF9C8F; --ok: #7FD6BF; --on-red: #2B0A07;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.5 var(--sans); }
h1, h2, h3 { font-family: var(--sans); font-weight: 700; letter-spacing: -.03em; line-height: 1.08; margin: 0; }
h1 { font-size: 42px; letter-spacing: -.04em; } h2 { font-size: 24px; margin-top: 8px; letter-spacing: -.02em; } h3 { font-size: 20px; letter-spacing: -.01em; line-height: 1.2; }
p { margin: 0; }
a { color: var(--ink); text-underline-offset: 3px; }
.wrap { max-width: 640px; margin: 0 auto; padding: 0 18px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 8px; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--btn); color: var(--btn-ink); padding: 10px 14px; border-radius: 12px; z-index: 50; }
.skip:focus { top: 8px; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 19px var(--sans); letter-spacing: -.02em; min-height: 44px; }
.brand img { border-radius: 8px; }
.textlink { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; min-height: 44px; display: inline-flex; align-items: center; padding: 0 4px; background: none; border: 0; font-family: inherit; font-size: 17px; cursor: pointer; }
.textlink:hover { text-decoration-thickness: 2px; }
.textlink.more { padding: 0 8px; }
main { padding-top: 8px; padding-bottom: 120px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack > h2 { margin-top: 10px; }
.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.lead { font-size: 17px; line-height: 1.35; color: var(--ink2); }
.small { font-size: 16px; color: var(--ink2); }
.empty { color: var(--ink2); padding: 6px 2px; }
.step { color: var(--ink2); font-weight: 600; font-size: 16px; }
.back { align-self: flex-start; margin-left: -4px; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 20px; border-radius: 14px; border: 2px solid transparent; font: 700 19px var(--sans); letter-spacing: -.01em; cursor: pointer; text-decoration: none; text-align: center; }
.btn.primary { background: var(--btn); color: var(--btn-ink); min-height: 60px; font-size: 20px; }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.quiet { background: transparent; color: var(--ink2); min-height: 44px; padding: 0 12px; font-weight: 600; font-size: 17px; }
.btn.quiet:hover { color: var(--ink); text-decoration: underline; }
.btn.danger { background: var(--red); color: var(--on-red); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .6; cursor: default; }
input[type=text], input[type=date], select, textarea { width: 100%; font: 400 17px/1.4 var(--sans); color: var(--ink); background: transparent; border: 1.5px solid var(--field); border-radius: 14px; padding: 12px 14px; min-height: 52px; }
input:focus, textarea:focus, select:focus { outline: 3px solid var(--ink); outline-offset: 2px; }
textarea { resize: vertical; min-height: 56px; }
::placeholder { color: var(--ink2); opacity: 1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-weight: 700; }
.hint { color: var(--ink2); font-size: 16px; }
.row-form { display: flex; gap: 10px; }
.row-form .btn { flex: none; }
.nav-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two { display: grid; grid-template-columns: 1fr; gap: 12px; }

/* stage tabs: three ruled cells, the open one filled */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1.5px solid var(--rule); border-bottom: 1.5px solid var(--rule); margin: 0 -18px; }
.seg-item { min-height: 52px; display: flex; align-items: center; justify-content: center; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.seg-item + .seg-item { border-left: 1.5px solid var(--rule); }
.seg-item[aria-current=page] { background: var(--hi); color: var(--hi-ink); }

/* ruled blocks and rows (no boxes) */
.card { background: none; border: 0; border-top: 1.5px solid var(--rule); border-radius: 0; padding: 16px 0; box-shadow: none; }
.card.stack { gap: 12px; }
.card.note { display: flex; flex-direction: column; gap: 12px; }
.who { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.who-name { font: 700 42px/1 var(--sans); letter-spacing: -.04em; overflow-wrap: anywhere; }
.who-sub { color: var(--ink2); font-size: 16px; line-height: 1.35; margin-top: 10px; }
.badge { flex: none; width: 76px; height: 76px; border-radius: 50%; background: var(--btn); color: var(--btn-ink); justify-content: center; padding: 0; text-decoration: none; font-weight: 700; font-size: 16px; }
.badge:hover { text-decoration: none; }
.seg ~ h1, .seg ~ .stack h1 { font-size: 30px; letter-spacing: -.03em; }
.rows { list-style: none; margin: 0 -18px; padding: 0; background: none; border-top: 1.5px solid var(--rule); border-bottom: 1.5px solid var(--rule); }
.rows > li + li { border-top: 1px solid var(--rule); }
.row { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 12px 18px; text-decoration: none; color: var(--ink); width: 100%; background: none; border: 0; font: inherit; text-align: left; }
.row.split { justify-content: space-between; padding: 0 10px 0 0; }
.row-btn { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 72px; padding: 12px 18px; cursor: pointer; background: none; border: 0; color: inherit; font: inherit; text-align: left; flex: 1; }
a.row:hover { background: var(--well); }
.row.next, a.row.next:hover, .row.split:has([aria-current]) { background: var(--hi); color: var(--hi-ink); }
.row.next .row-sub, .row.split:has([aria-current]) .row-sub, .row.next .chev, .row.next .row-kick { color: var(--hi-ink); }
.row.split:has([aria-current]) .textlink { color: var(--hi-ink); }
.row-num { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid currentColor; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; }
.row-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.row-kick { font: 500 16px/1.2 var(--serif); color: var(--ink2); }
.row-title { font: 500 23px/1.15 var(--serif); letter-spacing: -.01em; }
.row-sub { color: var(--ink2); font-size: 16px; line-height: 1.35; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
.chev { color: var(--ink2); font-size: 28px; line-height: 1; }
.item { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.item-main { flex: 1; word-break: break-word; }
.item-date { color: var(--ink2); font-size: 16px; font-weight: 600; }
.item-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* question bank */
.bank-group { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.bank-group h3 { margin-top: 8px; }
.bank-row { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 60px; padding: 10px 0; background: none; border: 0; border-top: 1px solid var(--rule); border-radius: 0; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.bank-text { font: 500 21px/1.2 var(--serif); }
.bank-row:hover:not(:disabled) .bank-act { text-decoration: underline; }
.bank-act { flex: none; font-weight: 700; color: var(--ink); }
.bank-row:disabled { cursor: default; }
.bank-row:disabled .bank-text { color: var(--ink2); }
.bank-row:disabled .bank-act { color: var(--ok); }

/* during */
.q { display: flex; flex-direction: column; gap: 12px; }
.check { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; }
.check input { flex: none; width: 30px; height: 30px; margin: 2px 0 0; accent-color: var(--btn); }
.q-text { font: 500 23px/1.2 var(--serif); letter-spacing: -.01em; }
.check input:checked + .q-text { color: var(--ink2); }

/* after */
.status { min-height: 44px; font-weight: 700; background: none; border: 0; padding: 0 8px; font-size: 18px; cursor: pointer; border-radius: 10px; text-decoration: underline; text-underline-offset: 4px; font-family: var(--sans); }
.s-todo { color: var(--ink); } .s-done { color: var(--ok); } .s-late { color: var(--red); }
.agreed { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 6px; }
.out { margin-top: 8px; }
.msg, .disclaimer { border-top: 1.5px solid var(--rule); border-bottom: 1.5px solid var(--rule); padding: 12px 0; font-weight: 600; }
.gloss { margin: 0; display: flex; flex-direction: column; gap: 0; }
.gloss dt { font: 500 24px/1.15 var(--serif); } .gloss dd { margin: 6px 0 0; }

/* welcome */
.welcome { display: flex; flex-direction: column; gap: 16px; padding-top: 16px; }
.welcome h1 { font-size: 46px; }

/* undo bar, in the design's own language: solid ink bar, small icon + word */
.undo { position: fixed; left: 12px; right: 12px; bottom: 12px; max-width: 616px; margin: 0 auto; background: var(--btn); color: var(--btn-ink); border-radius: 12px; padding: 2px 8px 2px 16px; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; z-index: 20; font-size: 17px; }
.undo[hidden] { display: none; }
.undo-btn { display: inline-flex; align-items: center; gap: 8px; background: none; color: inherit; min-height: 44px; padding: 0 10px; border: 0; font: 700 18px var(--sans); cursor: pointer; }
.undo-btn:focus-visible { outline-color: var(--btn-ink); }
.undo-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* print sheet: hidden on screen */
.print { display: none; }
@media (min-width: 720px) { .two { grid-template-columns: 1fr 1fr; } main { padding-top: 16px; } }

@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #000; font: 400 10.5pt/1.35 'Inter Tight', sans-serif; }
  .top, .undo, .skip, #main, footer { display: none !important; }
  .print { display: block; }
  .print h1 { font: 700 18pt var(--sans); margin: 0 0 2pt; color: #000; }
  .print .p-sub { color: #333; margin-bottom: 8pt; }
  .print h2 { font: 700 12pt var(--sans); margin: 10pt 0 3pt; padding-bottom: 2pt; border-bottom: 1px solid #999; color: #000; break-after: avoid; }
  .print ul, .print ol { margin: 0; padding-left: 16pt; }
  .print li { margin-bottom: 2pt; break-inside: avoid; }
  .print .pre { white-space: pre-wrap; }
  .print .qlist li { margin-bottom: 7pt; }
  .print .line { display: block; border-bottom: 1px solid #aaa; height: 14pt; }
}

.inline-msg { color: var(--ink); font-weight: 600; }
.inline-msg:empty { display: none; }
.brand small { font: 400 16px var(--sans); color: var(--ink2); letter-spacing: 0; }
