/* PresentationFlow design system.
   Tone: a business-school case packet. Navy ink on warm paper, serif headings,
   a quiet brass accent, crisp hairlines and tabular figures. */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Serif+4:opsz,wght@8..60,500;8..60,600;8..60,700&display=swap");

:root {
  --bg: #f7f5f0;
  --panel: #ffffff;
  --panel-2: #fbfaf7;
  --text: #14213d;          /* navy ink */
  --text-2: #3d4a63;
  --muted: #6e7587;
  --line: #e4e0d6;
  --line-strong: #cfc9bb;
  --accent: #1d3a6e;        /* oxford navy */
  --accent-hover: #142b54;
  --accent-text: #ffffff;
  --accent-soft: #e9eef7;
  --brass: #a8843c;         /* sparing highlight */
  --brass-soft: #f5eedc;
  --ok: #1e6b47; --ok-bg: #e6f2ea;
  --warn: #8a5a00; --warn-bg: #fbf1d9;
  --err: #a62a1f; --err-bg: #fbe9e6;
  --taken-bg: #f1eee7;
  --shadow: 0 1px 2px rgba(20, 33, 61, .04), 0 4px 16px rgba(20, 33, 61, .05);
  --radius: 10px;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1522; --panel: #161e2e; --panel-2: #131a28;
    --text: #e8ebf2; --text-2: #c3c9d6; --muted: #8b93a6;
    --line: #263046; --line-strong: #34405a;
    --accent: #8fb0ea; --accent-hover: #a9c3f0; --accent-text: #0d1424; --accent-soft: #1c2840;
    --brass: #d1ad62; --brass-soft: #2b2617;
    --ok: #74cf9e; --ok-bg: #12291e; --warn: #f0c060; --warn-bg: #2e2510; --err: #ff8f84; --err-bg: #34191a;
    --taken-bg: #1b2436;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 var(--sans); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}

/* ---------- Top bar ---------- */
.topbar {
  background: var(--accent); color: var(--accent-text);
  border-bottom: 3px solid var(--brass);
}
@media (prefers-color-scheme: dark) { .topbar { background: #0b1220; color: var(--text); } }
.topbar-inner {
  max-width: 1120px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 18px/1 var(--serif); letter-spacing: .01em; color: inherit; text-decoration: none;
}
.brand-mark {
  width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center;
  background: var(--brass); color: #14213d; font: 700 14px/1 var(--serif);
}
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; font-size: 13.5px; }
.topbar nav a {
  color: inherit; opacity: .82; text-decoration: none; padding: 6px 10px; border-radius: 6px;
}
.topbar nav a:hover { opacity: 1; background: rgba(255, 255, 255, .1); }
.topbar nav a[aria-current="page"] { opacity: 1; background: rgba(255, 255, 255, .14); }

/* ---------- Masthead: navy band under the top bar ---------- */
.topbar { border-bottom: 0; }
.masthead {
  background:
    radial-gradient(1200px 300px at 85% -40%, rgba(168, 132, 60, .28), transparent 60%),
    linear-gradient(180deg, var(--accent) 0%, #17305c 100%);
  color: #fff; position: relative; overflow: hidden;
  border-bottom: 3px solid var(--brass);
}
.masthead::after { /* faint ledger lines, like a case packet */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .035;
  background: repeating-linear-gradient(0deg, #fff 0 1px, transparent 1px 28px);
}
@media (prefers-color-scheme: dark) { .masthead { background: linear-gradient(180deg, #0b1220, #101a2e); } }
.masthead-inner { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 30px 20px 34px; }
.masthead.has-overlap .masthead-inner { padding-bottom: 76px; }
.masthead h1 { color: #fff; font-size: 34px; margin: 0 0 6px; }
.masthead .eyebrow { color: #e3c98f; }
.masthead p, .masthead .muted { color: rgba(255, 255, 255, .78); }
.masthead a { color: #fff; }
.masthead .row.spread { align-items: flex-end; }
.masthead .share { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); box-shadow: none; }
.masthead .share .muted, .masthead .share code { color: #fff; }
.masthead .share button { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .25); color: #fff; }
.masthead .share button:hover { background: rgba(255, 255, 255, .2); color: #fff; border-color: rgba(255,255,255,.4); }
.overlap { margin-top: -56px !important; position: relative; z-index: 2; }
.masthead + main { padding-top: 26px; }

/* Masthead progress (student home) */
.m-progress { display: flex; align-items: center; gap: 14px; margin-top: 18px; max-width: 560px; }
.m-progress .progress-bar { background: rgba(255, 255, 255, .18); height: 6px; }
.m-progress .progress-bar span { background: linear-gradient(90deg, #e3c98f, var(--brass)); }
.m-progress .small { color: rgba(255, 255, 255, .8) !important; white-space: nowrap; }

/* ---------- Icons (inline SVG masks; colour follows the text) ---------- */
.ico { display: inline-block; width: 18px; height: 18px; flex: none; background: currentColor; vertical-align: -3px;
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.ico.lg { width: 22px; height: 22px; }
.i-calendar { --i: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='5' width='18' height='16' rx='2'/><path d='M16 3v4M8 3v4M3 10h18'/></svg>"); }
.i-users { --i: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><circle cx='9' cy='8' r='3.5'/><path d='M2.5 20c.8-3.4 3.4-5.5 6.5-5.5s5.7 2.1 6.5 5.5'/><path d='M16 4.6a3.5 3.5 0 0 1 0 6.8M18.5 14.8c1.6.8 2.7 2.6 3 5.2'/></svg>"); }
.i-message { --i: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M4 5h16v11H9l-5 4z'/><path d='M8 9.5h8M8 12.5h5'/></svg>"); }
.i-award { --i: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='9' r='6'/><path d='M8.5 14 7 22l5-3 5 3-1.5-8'/></svg>"); }
.i-clipboard { --i: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='5' y='4' width='14' height='18' rx='2'/><path d='M9 2.5h6v3H9zM9 11h6M9 15h4'/></svg>"); }
.i-check { --i: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='m5 12.5 4.5 4.5L19 7.5'/></svg>"); }
.i-send { --i: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M21 3 10 14M21 3l-7 18-4-7-7-4z'/></svg>"); }
.i-present { --i: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='12' rx='1.5'/><path d='M12 16v4M8 21h8M7 12l3-3 2 2 4-4'/></svg>"); }
.i-clock { --i: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M12 7v5l3 2'/></svg>"); }
.i-file { --i: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M14 3H6a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V8z'/><path d='M14 3v5h5M9 13h6M9 17h6'/></svg>"); }
.i-arrow { --i: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14M13 6l6 6-6 6'/></svg>"); }
.i-list { --i: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M9 6h11M9 12h11M9 18h11'/><path d='m3.5 6 1 1 2-2M3.5 12l1 1 2-2M3.5 18l1 1 2-2'/></svg>"); }

/* ---------- Entrance motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rise > * { animation: rise .45s cubic-bezier(.2, .7, .2, 1) both; }
.rise > *:nth-child(2) { animation-delay: .05s; } .rise > *:nth-child(3) { animation-delay: .1s; }
.rise > *:nth-child(4) { animation-delay: .15s; } .rise > *:nth-child(5) { animation-delay: .2s; }
@media (prefers-reduced-motion: reduce) { .rise > * { animation: none; } }

/* ---------- Layout ---------- */
main { max-width: 1120px; margin: 0 auto; padding: 32px 20px 80px; }
.page-head { margin-bottom: 8px; }
.eyebrow {
  font: 600 11.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--brass);
  margin: 0 0 10px;
}
h1, h2, h3 { font-family: var(--serif); color: var(--text); font-weight: 600; letter-spacing: -.005em; }
h1 { font-size: 32px; line-height: 1.15; margin: 0 0 6px; }
h2 { font-size: 20px; line-height: 1.25; margin: 0 0 10px; }
h3 { font-size: 16px; line-height: 1.3; margin: 0; }
p { margin: 0 0 10px; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
code { font: 13px ui-monospace, "SF Mono", Menlo, monospace; background: var(--taken-bg); padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.grid2 > .panel { margin-top: 20px; }
.hidden, [hidden] { display: none !important; }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin-top: 20px; box-shadow: var(--shadow);
}
.panel > h2:first-child { padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.panel h2 .step {
  display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 10px; vertical-align: 2px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  font: 600 13px/1 var(--sans);
}

/* ---------- Controls ---------- */
button, .btn {
  font: 500 14px/1.2 var(--sans); border: 1px solid var(--line-strong); background: var(--panel); color: var(--text);
  padding: 9px 14px; border-radius: 8px; cursor: pointer; text-decoration: none; display: inline-flex;
  align-items: center; gap: 6px; transition: background .15s, border-color .15s, color .15s;
}
button:hover:not(:disabled), .btn:hover { border-color: var(--accent); color: var(--accent); }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
button.primary:hover:not(:disabled), .btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-text); }
button:disabled { opacity: .45; cursor: not-allowed; }
button:focus-visible, .btn:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--brass); outline-offset: 2px;
}

select, input[type=text], input[type=email], input[type=number], textarea {
  font: 14.5px/1.4 var(--sans); padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--panel); color: var(--text); max-width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
select:focus, input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
textarea { width: 100%; resize: vertical; }
input[type=file] { font: 14px var(--sans); max-width: 100%; color: var(--text-2); }
input[type=file]::file-selector-button {
  font: 500 13.5px var(--sans); margin-right: 12px; padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--text); cursor: pointer;
}
input[type=file]::file-selector-button:hover { border-color: var(--accent); color: var(--accent); }

.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.toggle input { appearance: none; width: 40px; height: 22px; border-radius: 99px; background: var(--line-strong); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle input:checked { background: var(--ok); }
.toggle input:checked::after { transform: translateX(18px); }

/* ---------- Messages, pills ---------- */
.msg { padding: 11px 14px; border-radius: 8px; margin-top: 12px; font-size: 14px; border: 1px solid transparent; }
.msg.ok { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 20%, transparent); }
.msg.warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 20%, transparent); }
.msg.err { background: var(--err-bg); color: var(--err); border-color: color-mix(in srgb, var(--err) 20%, transparent); }
.msg ul { margin: 6px 0 0; padding-left: 18px; }
.msg ol { margin: 6px 0 0; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1 var(--sans); padding: 5px 10px;
  border-radius: 99px; border: 1px solid var(--line); color: var(--text-2); background: var(--panel-2); white-space: nowrap;
}
.pill.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.pill.ok::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.full { background: var(--brass-soft); color: var(--brass); border-color: transparent; }
.pill input[type=number] { width: 3.4em; padding: 1px 4px; font-size: 12px; border-radius: 5px; }
.ticker { font: 600 11.5px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .03em; color: var(--brass); background: var(--brass-soft); padding: 3px 6px; border-radius: 4px; vertical-align: 1px; }
.ticker:empty { display: none; }

/* ---------- Sign-up schedule ---------- */
#schedule > .panel h3, .panel > .row.spread h3 { font-size: 17px; }
.firms { list-style: none; margin: 14px 0 0; padding: 0; }
.firms li { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); }
.firms li .firm { min-width: 0; }
.firms li .firm strong { font-weight: 600; }
.firms li .desc { font-size: 13px; color: var(--muted); margin-top: 2px; }
.firms li.taken .firm { opacity: .55; }
.firms li select { min-width: 220px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ---------- Grading form ---------- */
.q { margin: 0 0 22px; padding: 0 0 20px; border-bottom: 1px solid var(--line); }
.q:last-of-type { border-bottom: 0; }
.q-title { display: block; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.q-hint { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.scale { display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 0; }
.scale label { position: relative; }
.scale input { position: absolute; opacity: 0; pointer-events: none; }
.scale span {
  display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--panel); font: 600 14px/1 var(--sans);
  font-variant-numeric: tabular-nums; cursor: pointer; transition: all .12s;
}
.scale label:hover span { border-color: var(--accent); color: var(--accent); }
.scale input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.scale input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: 2px; }
.scale-ends { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 6px; max-width: 470px; }

/* ---------- Results / reports ---------- */
pre { font: 13.5px/1.6 var(--sans); font-variant-numeric: tabular-nums; color: var(--text-2); }
.report {
  white-space: pre-wrap; margin: 0; padding: 16px 18px; background: var(--panel-2);
  border: 1px solid var(--line); border-left: 3px solid var(--brass); border-radius: 8px;
}
details { margin-top: 8px; }
details > summary { cursor: pointer; font-weight: 500; color: var(--accent); padding: 4px 0; }
details[open] > summary { margin-bottom: 8px; }

/* ---------- Student home cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 24px; }
.card {
  display: flex; flex-direction: column; align-items: stretch; gap: 6px; text-align: left; padding: 20px 20px 18px; min-height: 168px; width: 100%;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text);
  text-decoration: none; font: inherit; cursor: pointer; box-shadow: var(--shadow);
  border-top: 3px solid var(--accent); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(20,33,61,.06), 0 10px 28px rgba(20,33,61,.09); color: var(--text); }
.card .num { font: 600 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.card .title { font: 600 19px/1.25 var(--serif); }
.card .state { margin-top: auto; padding-top: 10px; }
.card.active { border-color: var(--line); border-top-color: var(--brass); box-shadow: 0 0 0 2px var(--brass); }
.grade { font: 600 56px/1 var(--serif); color: var(--accent); margin: 4px 0 12px; font-variant-numeric: tabular-nums; }

.card.done .num::after { content: " ✓"; color: var(--ok); }

/* ---------- Student home: next action, progress, feedback report ---------- */
.next {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 20px; padding: 20px 22px; border-radius: var(--radius);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
.next .eyebrow { margin-bottom: 6px; }
.next h2 { margin: 0 0 2px; font-size: 22px; }
.next p { margin: 0; }
.next.live { background: var(--brass-soft); border-color: color-mix(in srgb, var(--brass) 40%, transparent); }
.next.live .eyebrow::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #c0392b;
  margin-right: 7px; vertical-align: 1px; animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .next.live .eyebrow::before { animation: none; } }

.progress { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.progress-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .4s ease; }

.fb { max-width: 680px; }
.fb-title { font: 600 17px/1.35 var(--serif); margin: 0 0 14px; }
.fb-h { margin: 22px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.fb-h:first-child { margin-top: 0; }
.fb-kv { margin: 6px 0; }
.fb-note { white-space: pre-wrap; padding: 14px 16px; background: var(--panel-2); border-left: 3px solid var(--brass); border-radius: 6px; }
.meter { margin: 0 0 14px; }
.meter-head { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-bottom: 5px; }
.meter-val { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter-bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 70%, var(--brass))); border-radius: inherit; }
.meter-n { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.quotes { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 8px; }
.quotes li { padding: 10px 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.quotes li::before { content: "“"; font: 600 22px/0 var(--serif); color: var(--brass); margin-right: 4px; vertical-align: -6px; }

/* ---------- Peer grade page ---------- */
.submit-bar {
  position: sticky; bottom: 0; margin: 8px -24px -22px; padding: 14px 24px;
  background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(6px);
  border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.empty { text-align: center; padding: 28px 12px; }
.empty .icon { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 24px; }
.empty.ok .icon { background: var(--ok-bg); color: var(--ok); }
.empty h2 { margin-bottom: 4px; }

/* ---------- Student key dates ---------- */
.timeline { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.tl:first-child { border-top: 0; }
.tl-count {
  display: flex; flex-direction: column; align-items: center; justify-content: center; height: 56px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--line); line-height: 1;
}
.tl-num { font: 600 22px/1 var(--serif); color: var(--text); font-variant-numeric: tabular-nums; }
.tl-unit { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.tl.next-up .tl-count { background: var(--accent); border-color: var(--accent); }
.tl.next-up .tl-num, .tl.next-up .tl-unit { color: var(--accent-text); }
.tl.soon:not(.next-up) .tl-count { background: var(--brass-soft); border-color: transparent; }
.tl.past { opacity: .55; }
.tl.past .tl-num { font-size: 18px; color: var(--ok); }
.tl.pending .tl-num { color: var(--muted); }
.tl.pres .tl-body strong::before { content: "★ "; color: var(--brass); }
.tl { align-items: start; }
.tl-body { min-width: 0; padding-top: 4px; }
.tl.past .tl-exp { display: none; }
.tl-exp { margin-top: 8px; }
.tl-exp > summary { font-size: 13.5px; display: inline-flex; align-items: center; gap: 8px; list-style: none; }
.tl-exp > summary::-webkit-details-marker { display: none; }
.tl-exp > summary::before { content: "▸"; font-size: 11px; transition: transform .15s; }
.tl-exp[open] > summary::before { transform: rotate(90deg); }
.tl-exp[open] { padding: 12px 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; }
.tl-exp[open] > summary { margin-bottom: 6px; }
.checklist { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.checklist li { position: relative; padding-left: 26px; font-size: 14px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 16px; height: 16px; border-radius: 4px;
  border: 1.5px solid var(--line-strong); background: var(--panel);
}
.tl-submit { margin: 10px 0 0; font-size: 13.5px; }

/* ---------- Admin dashboard ---------- */
button.sm, .btn.sm { padding: 6px 11px; font-size: 13px; }
.share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px 8px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.share code { background: transparent; padding: 0; font-size: 13px; color: var(--text); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-top: 20px; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.kpi-label { font: 600 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.kpi-num { font: 600 34px/1.05 var(--serif); color: var(--accent); font-variant-numeric: tabular-nums; margin-top: 4px; }
.kpi-sub { font-size: 12.5px; color: var(--muted); }

.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.todo li:first-child { border-top: 0; padding-top: 0; }
.todo li > span::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brass); margin-right: 10px; vertical-align: 2px; }
.todo li.done-all > span { color: var(--ok); font-weight: 500; }
.todo li.done-all > span::before { display: none; }

.tabs { display: flex; gap: 4px; margin-top: 30px; border-bottom: 1px solid var(--line-strong); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs button {
  border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted);
  padding: 12px 16px; margin-bottom: -1px; font-weight: 600; white-space: nowrap;
}
.tabs button:hover:not(:disabled) { color: var(--text); border-color: transparent; border-bottom-color: var(--line-strong); }
.tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.tab-count:not(:empty) { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 99px; background: var(--brass-soft); color: var(--brass); font-size: 11.5px; }

.table-wrap { overflow-x: auto; margin: 0 -4px; }
table.queue { width: 100%; border-collapse: collapse; font-size: 14px; }
.queue th { text-align: left; font: 600 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.queue td { padding: 11px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.queue .num { text-align: right; font-variant-numeric: tabular-nums; }
.queue tbody tr[data-id] { cursor: pointer; transition: background .12s; }
.queue tbody tr[data-id]:hover, .queue tbody tr[data-id]:focus-visible { background: var(--panel-2); outline: none; }
.queue tbody tr.selected { background: var(--accent-soft); }
.queue tbody tr.selected td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

/* ---------- Milestone settings editor ---------- */
.ms-list { display: grid; gap: 14px; margin-top: 8px; }
.ms { padding: 16px 18px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; background: var(--panel-2); display: grid; gap: 12px; }
.ms-head { display: flex; align-items: center; gap: 10px; }
.ms-num { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 600 13px/1 var(--sans); }
.ms-label { flex: 1; font: 600 16px/1.3 var(--serif) !important; }
.ms-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.ms-field { display: grid; gap: 5px; min-width: 0; }
.ms-field[hidden] { display: none; }
.ms-field > span { font: 600 12px/1.2 var(--sans); color: var(--text-2); }
.ms-field > span em { font-style: normal; font-weight: 400; color: var(--muted); }
.ms-field input, .ms-field select, .ms-field textarea { width: 100%; }
.ms-when { color: var(--muted); margin-top: -4px; }
input[type=date] { font: 14.5px/1.4 var(--sans); padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--panel); color: var(--text); }
input[type=date]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }

/* ---------- Student home layout ---------- */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.home-side { position: sticky; top: 16px; }
.home-side > .panel:first-child { margin-top: 0; }
.home-main > :first-child { margin-top: 0; }
.home-main .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 20px; }
@media (max-width: 920px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-side { position: static; }
}
@media (max-width: 520px) { .home-main .cards { grid-template-columns: 1fr; } }
.home-side .tl { grid-template-columns: 52px 1fr; gap: 12px; }
.home-side .tl-count { height: 50px; }
.home-side .tl-num { font-size: 19px; }
.home-side .tl-exp[open] { padding: 10px 12px; }
.home-side .checklist li { font-size: 13.5px; }

/* Card icon badge */
.card { position: relative; }
.card-ico {
  position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.card.done .card-ico { background: var(--ok-bg); color: var(--ok); }
.card .title { padding-right: 48px; }

/* KPI icons and polish */
.kpi { position: relative; overflow: hidden; }
.kpi .ico { position: absolute; top: 16px; right: 16px; color: var(--brass); opacity: .9; }
.kpi::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--accent), transparent); opacity: .5; }

/* Tabs with icons */
.tabs button .ico { margin-right: 6px; width: 16px; height: 16px; }

/* Panel headings with an icon */
.panel h2 .ico { color: var(--brass); margin-right: 8px; vertical-align: -2px; }

/* ---------- Landing ---------- */
.hero { padding: 24px 0 8px; }
.hero h1 { font-size: 40px; }
.hero p { font-size: 17px; color: var(--text-2); max-width: 560px; }

@media (max-width: 600px) {
  main { padding: 22px 16px 64px; }
  h1 { font-size: 26px; }
  .hero h1 { font-size: 32px; }
  .panel { padding: 18px 16px; }
  .firms li { flex-direction: column; align-items: stretch; }
  .firms li > .pill, .firms li > button { align-self: flex-start; }
  .firms li select { min-width: 0; width: 100%; }
  .scale span { min-width: 36px; height: 42px; }
  /* Long scales (e.g. 1-10) as two even rows that fill the width. */
  .scale:has(label:nth-child(8)) { display: grid; grid-template-columns: repeat(5, 1fr); }
  .scale:has(label:nth-child(8)) span { min-width: 0; }
  .scale-ends { max-width: none !important; }
  .submit-bar { margin: 8px -16px -18px; padding: 12px 16px; }
}
