/* QTIC portal — form, applicant, admin and judge screens */
/* ---------- intake-style form ---------- */
.intake .cols { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 32px; align-items: start; }
.intake.narrow { max-width: 680px; }
.side { position: sticky; top: 100px; }
.side h2 { font-family: var(--f-mono); font-size: 11px; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px 2px; }
.side ol { list-style: none; margin: 0; padding: 0; }
.side li { padding: 0 0 4px; }
.side button { display: flex; gap: 11px; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: 8px; font-size: 14.5px; color: var(--ink-2); }
.side button:hover:not(:disabled) { background: var(--sunk); }
.side button:disabled { opacity: 0.55; }
.side li.current button { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.side li.done button { color: var(--ink); }
.mark { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-3); display: grid; place-items: center; font-size: 11.5px; font-weight: 600; color: var(--ink-3); background: var(--surface); margin-top: 1px; font-family: var(--f-mono); }
.side li.current .mark { border-color: var(--brand); background: var(--brand); color: var(--on-brand); }
.side li.done .mark { border-color: var(--good); background: var(--good); color: #fff; }
.est { display: block; font-size: 12px; font-weight: 400; color: var(--ink-3); margin-top: 1px; }
.side li.current .est { color: var(--brand-600); }
.mprog { display: none; margin-bottom: 16px; }
.mprog .row { justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-bottom: 7px; }
.mprog b { color: var(--ink); font-weight: 600; }
.bar { height: 6px; background: var(--sunk); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width 0.35s; }
@media (max-width: 900px) {
  .intake .cols { grid-template-columns: 1fr; gap: 0; }
  .side { display: none; }
  .mprog { display: block; }
}
.form-card { padding: 32px 34px; }
@media (max-width: 700px) { .form-card { padding: 22px 18px; } }
.step-h { margin: 0 0 6px; font-size: 1.65rem; font-weight: 700; letter-spacing: -0.012em; }
.step-sub { margin: 0 0 26px; color: var(--ink-2); font-size: 15.5px; }
.form { display: grid; gap: 22px; }
.f { margin-bottom: 22px; min-width: 0; }
.form .f, .stack .f { margin-bottom: 0; }
.q, legend.q { display: block; font-weight: 600; font-size: 15.5px; margin-bottom: 4px; color: var(--ink); padding: 0; }
.opt-tag { font-weight: 400; color: var(--ink-3); font-size: 13.5px; }
.help { font-size: 14px; color: var(--ink-2); margin: 0 0 9px; white-space: pre-line; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="date"], input[type="url"], input[type="search"], select, textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); font: inherit; font-size: 16px; background: var(--surface); color: var(--ink); transition: border-color 0.12s, box-shadow 0.12s; }
input:hover, select:hover, textarea:hover { border-color: var(--line-3); }
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
textarea.tall { min-height: 240px; }
textarea.sunk { background: var(--sunk); min-height: 90px; }
select { appearance: none; -webkit-appearance: none; padding-right: 38px; background-repeat: no-repeat; background-position: right 14px center;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%237c8494' d='M6 8 0 0h12z'/%3E%3C/svg%3E"); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 107, 237, 0.16); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--crit); background: var(--crit-soft); }
input:disabled, select:disabled { background: var(--sunk); color: var(--ink-3); cursor: not-allowed; }
input[readonly], textarea[readonly] { background: var(--sunk); }
.w-narrow { max-width: 170px; }
.w-mid { max-width: 260px; }
.sig { font-size: 19px; font-style: italic; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 600px) { .row2 { grid-template-columns: 1fr; } }
.prefix, .suffix { position: relative; }
.prefix > span, .suffix > span { position: absolute; top: 50%; transform: translateY(-50%); color: var(--ink-2); }
.prefix > span { left: 13px; }
.prefix input { padding-left: 28px; }
.suffix > span { right: 13px; }
.suffix input { padding-right: 34px; }
.my { display: flex; gap: 10px; max-width: 320px; }
.my select:first-child { flex: 1.4; }
.my select:last-child { flex: 1; }
.tick { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.tick input { width: 17px; height: 17px; accent-color: var(--brand); margin: 0; }
.count { display: block; font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-3); text-align: right; margin-top: 4px; }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choices.two { display: grid; grid-template-columns: 1fr 1fr; }
.choices.inline { flex-direction: row; flex-wrap: wrap; }
.choices.inline .c { flex: 0 1 auto; min-width: 110px; }
@media (max-width: 600px) { .choices.two { grid-template-columns: 1fr; } }
.c { position: relative; display: flex; align-items: flex-start; gap: 11px; padding: 12px 14px; min-height: 46px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); cursor: pointer; background: var(--surface); transition: border-color 0.12s, background 0.12s; }
.c:hover { border-color: var(--line-3); }
.c input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.box { flex: none; width: 19px; height: 19px; border: 1.5px solid var(--line-3); background: var(--surface); margin-top: 2px; display: grid; place-items: center; transition: all 0.12s; }
.c.radio .box { border-radius: 50%; }
.c.check .box { border-radius: 5px; }
.box::after { content: ""; opacity: 0; transition: opacity 0.1s; }
.c.radio .box::after { width: 9px; height: 9px; border-radius: 50%; background: #fff; }
.c.check .box::after { width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.c input:checked ~ .box { background: var(--brand); border-color: var(--brand); }
.c input:checked ~ .box::after { opacity: 1; }
.c:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.c input:focus-visible ~ .box { box-shadow: 0 0 0 3px rgba(47, 107, 237, 0.3); }
.c input[aria-invalid="true"] ~ .box { border-color: var(--crit); }
.ct { font-size: 15px; line-height: 1.4; }
.cd { display: block; font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.c.consent { border-style: solid; }
.c.consent b { font-weight: 600; }
.subq { margin: -8px 0 22px; padding: 16px 18px 2px; border-left: 3px solid var(--brand-200); background: var(--brand-50); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.subq .f { margin-bottom: 14px; }
.block { border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px 2px; margin: 0 0 22px; background: var(--page); }
.block > h3 { margin: 0 0 3px; font-size: 16.5px; }
.block > .bhelp { margin: 0 0 16px; font-size: 14px; color: var(--ink-2); }
@media (max-width: 700px) { .block { padding: 16px 14px 2px; } }
.err { display: none; color: var(--crit); font-size: 14px; font-weight: 500; margin-top: 6px; }
.err.on { display: flex; gap: 7px; align-items: flex-start; }
.err.on::before { content: "!"; flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--crit); color: #fff; font-size: 11px; font-weight: 700; line-height: 16px; text-align: center; margin-top: 2px; }
.summary { display: none; background: var(--crit-soft); border: 1.5px solid var(--crit); border-radius: var(--r-sm); padding: 14px 16px; margin-bottom: 24px; }
.summary.on { display: block; }
.summary:focus { outline: none; }
.summary h3 { margin: 0 0 7px; font-size: 15px; color: var(--crit); }
.summary ul { margin: 0; padding-left: 18px; font-size: 14.5px; }
.summary a { color: var(--crit); font-weight: 500; }
.notice { background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: var(--r); padding: 15px 17px; font-size: 14.5px; color: var(--brand-700); margin-bottom: 22px; white-space: pre-line; }
.notice strong { display: block; margin-bottom: 3px; font-weight: 600; }
.notice.calm { background: var(--sunk); border-color: var(--line); color: var(--ink-2); }
.notice.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.plain { background: var(--good-soft); border: 1px solid transparent; border-radius: var(--r); padding: 15px 17px; margin-bottom: 22px; }
.plain h4 { margin: 0 0 8px; font-size: 14.5px; color: var(--good); }
.plain ul { margin: 0; padding-left: 18px; font-size: 14.5px; }
.plain li { margin-bottom: 4px; }
.legal-d { margin-bottom: 22px; }
.legal-d summary { cursor: pointer; font-size: 14.5px; color: var(--brand-700); font-weight: 500; padding: 6px 0; }
.legal-note { font-size: 13px; color: var(--ink-3); margin: 6px 0 8px; }
.legal { max-height: 200px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; background: var(--page); font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.row-add { display: flex; gap: 8px; align-items: center; }
.row-add input { flex: 1; }
.nav { display: flex; align-items: center; gap: 12px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.spacer { flex: 1; }
.savechip { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); background: var(--sunk); padding: 5px 11px; border-radius: 999px; }
.savechip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
@media (max-width: 600px) {
  .nav { flex-direction: column-reverse; align-items: stretch; }
  .spacer, .savechip { display: none !important; }
  .nav .btn { width: 100%; }
  .nav .btn.link { padding: 10px; }
}
.rev { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 14px; overflow: hidden; }
.rev h3 { margin: 0; padding: 13px 17px; background: var(--sunk); font-size: 15px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rev h3 button { background: none; border: 0; color: var(--brand-700); font-size: 14px; font-weight: 500; text-decoration: underline; padding: 2px 4px; }
.rev dl { margin: 0; padding: 6px 17px 12px; }
.rev .r { display: grid; grid-template-columns: minmax(160px, 42%) 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.rev .r:last-child { border-bottom: 0; }
.rev dt { color: var(--ink-2); }
.rev dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 600px) { .rev .r { grid-template-columns: 1fr; gap: 1px; } }
.done-box { text-align: center; padding: 22px 6px; display: grid; gap: 10px; justify-items: center; }
.done-box h2, .done-box h1 { font-size: 1.65rem; }
.done-box p { color: var(--ink-2); max-width: 52ch; }
.tick-lg { width: 64px; height: 64px; border-radius: 50%; background: var(--good-soft); color: var(--good); display: grid; place-items: center; margin-bottom: 8px; }
.refbox { display: inline-block; margin: 8px auto 12px; background: var(--sunk); border: 1px dashed var(--line-3); border-radius: 10px; padding: 10px 18px; font-size: 14px; color: var(--ink-2); }
.refbox b { display: block; font-size: 19px; color: var(--ink); letter-spacing: 0.04em; margin-top: 3px; font-family: var(--f-mono); font-weight: 500; }
.foot { text-align: center; color: var(--ink-3); font-size: 13px; margin-top: 18px; }
.foot a { color: var(--ink-2); }

/* ---------- modal + toast ---------- */
.modal { position: fixed; inset: 0; background: rgba(20, 25, 34, 0.5); display: grid; place-items: center; padding: 20px; z-index: 100; }
.modal .m { background: var(--surface); border-radius: 14px; padding: 26px; max-width: 480px; width: 100%; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28); display: grid; gap: 14px; max-height: calc(100vh - 40px); overflow-y: auto; }
.modal h3 { font-size: 1.2rem; }
.modal p { color: var(--ink-2); font-size: 15px; }
.modal .f { margin: 0; }
.modal form { display: grid; gap: 14px; }
.modal .acts { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.mail { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.mail-h { background: var(--sunk); padding: 10px 16px; font-size: 13px; color: var(--ink-2); display: grid; gap: 2px; }
.mail-b { padding: 18px 16px; display: grid; gap: 12px; justify-items: start; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%); background: var(--ink); color: var(--surface); padding: 11px 18px; border-radius: var(--r-sm); font-size: 14.5px; z-index: 120; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }

/* ---------- applicant dashboard ---------- */
.track { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; padding: 0; margin: 0; list-style: none; }
.track li { font-size: 13.5px; color: var(--ink-3); padding-top: 12px; border-top: 2px solid var(--line-2); }
.track li.is-done { border-top-color: var(--brand-200); color: var(--ink-2); }
.track li.now { border-top-color: var(--brand); color: var(--ink); font-weight: 600; }
@media (max-width: 640px) { .track { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; } }
.req { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 18px 12px; margin: 0 -12px; border: 0; background: none; width: calc(100% + 24px); text-align: left; border-radius: var(--r-sm); font: inherit; color: inherit; }
.req + .req::before { content: ""; position: absolute; top: 0; left: 12px; right: 12px; border-top: 1px solid var(--line); }
button.req:hover { background: var(--sunk); }
button.req:hover::before, button.req:hover + .req::before { border-top-color: transparent; }
.req-go { color: var(--brand-700); opacity: 0; transition: opacity 0.12s, transform 0.12s; display: inline-block; }
button.req:hover .req-go, button.req:focus-visible .req-go { opacity: 1; transform: translateX(2px); }
.card-h + .req { border-top: 0; padding-top: 12px; }
.req .meter { grid-column: 1 / -1; }
.req b.mono { font-size: 15px; font-weight: 500; }
.gate { background: var(--sunk); border-radius: var(--r); padding: 22px; display: grid; gap: 12px; margin-top: 8px; }
.gate p { font-size: 14px; color: var(--ink-2); }
.card > .demo { margin-top: 16px; }

/* ---------- learn list ---------- */
.group-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 24px 28px 16px; flex-wrap: wrap; }
.item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 18px; align-items: start; padding: 22px 28px; border-top: 1px solid var(--line); }
.item-t { display: grid; gap: 4px; min-width: 0; }
.item-h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.item-h h3 { font-size: 16.5px; font-weight: 600; line-height: 1.3; letter-spacing: -0.005em; }
.item-h .pill { font-size: 11.5px; padding: 0 8px; position: relative; top: -1px; }
.item.is-past:not(.is-done) .item-h h3 { color: var(--ink-2); }
.num-tag { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; }
.item-m { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 14px; color: var(--ink-2); }
.item-m span:first-child { color: var(--ink); font-weight: 500; }
.item.is-past .item-m span:first-child { color: var(--ink-2); font-weight: 400; }
.item-d { font-size: 14.5px; color: var(--ink-2); line-height: 1.55; margin-top: 4px; max-width: 64ch; }
.item-cr { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--good); margin-top: 4px; }
.item-cr::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.item-r { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; padding-top: 1px; }
.ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--sunk); color: var(--ink-2); }
.ic.ok { background: var(--good-soft); color: var(--good); }
.group-p { display: grid; gap: 6px; min-width: 160px; text-align: right; font-size: 13px; color: var(--ink-2); }
.group-p .meter { height: 5px; }
.group-h h2 { font-size: 1.3rem; margin-bottom: 2px; }
.grp { scroll-margin-top: 96px; }
@media (max-width: 700px) {
  .item { grid-template-columns: 36px minmax(0, 1fr); gap: 14px; padding: 18px; }
  .ic { width: 36px; height: 36px; }
  .item-r { grid-column: 2; justify-content: flex-start; }
  .group-h { padding: 18px 18px 10px; }
  .group-p { min-width: 0; text-align: left; width: 100%; }
}

/* ---------- player ---------- */
.player { background: var(--player); color: var(--on-player); border-radius: var(--r); overflow: hidden; }
.screen-area { aspect-ratio: 16 / 9; display: grid; place-items: center; position: relative; background: radial-gradient(120% 90% at 30% 20%, #1f2a3d 0%, var(--player) 70%); }
.screen-area .ttl { position: absolute; left: 24px; top: 20px; font-size: 14px; opacity: 0.75; }
.bigplay { width: 72px; height: 72px; border-radius: 50%; border: 0; background: #ffffff24; color: #fff; display: grid; place-items: center; transition: opacity 0.2s; }
.bigplay:hover { background: #ffffff38; }
.slide { position: absolute; inset: auto 24px 24px; font-size: 22px; font-weight: 600; opacity: 0.92; }
.controls { display: grid; gap: 10px; padding: 14px 18px 16px; }
.seek { position: relative; height: 8px; background: #ffffff1f; border-radius: 999px; cursor: pointer; }
.seek .seg-w { position: absolute; top: 0; height: 100%; background: #96b7fb8c; }
.seek .head-dot { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: #fff; transform: translate(-50%, -50%); box-shadow: 0 0 0 3px #2f6bed99; }
.ctl-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-family: var(--f-mono); font-size: 12.5px; opacity: 0.85; }
.ctl-row button { background: none; border: 0; color: inherit; padding: 4px 6px; display: grid; place-items: center; }
.legend { font-size: 12px; opacity: 0.75; }
.legend i { display: inline-block; width: 10px; height: 6px; border-radius: 2px; vertical-align: middle; margin-right: 6px; background: rgba(150, 183, 251, 0.55); }
.ring-row { display: flex; gap: 20px; align-items: center; }
.ring { --p: 0; width: 96px; height: 96px; border-radius: 50%; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--sunk) 0); display: grid; place-items: center; flex: none; }
.ring b { width: 76px; height: 76px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-family: var(--f-mono); font-size: 18px; font-weight: 500; }
.ring.ok { background: conic-gradient(var(--good) 100%, var(--sunk) 0); }

/* ---------- application ---------- */
.apply-grid { display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .apply-grid { grid-template-columns: 1fr; } }
.secnav { display: grid; gap: 2px; }
.secnav button { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r-sm); font-size: 14.5px; background: none; border: 0; text-align: left; width: 100%; color: var(--ink-2); }
.secnav button:hover { background: var(--sunk); }
.secnav button[aria-current="true"] { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.secnav button[aria-current="true"] .mark { border-color: var(--brand); background: var(--brand); color: var(--on-brand); }
.secnav-review { margin-top: 8px; border-top: 1px solid var(--line) !important; border-radius: 0 !important; padding-top: 14px !important; color: var(--brand-700) !important; font-weight: 500; }
@media (max-width: 900px) { .secnav { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } .secnav-review { border-top: 0 !important; margin-top: 0; padding-top: 8px !important; } }
.card.form > .nav { margin-top: 6px; }
.drop { border: 1px dashed var(--line-3); border-radius: var(--r); padding: 18px; display: grid; gap: 10px; }
.drop-h { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.rules { display: flex; gap: 6px; flex-wrap: wrap; }
.rule { font-family: var(--f-mono); font-size: 11px; background: var(--sunk); color: var(--ink-3); padding: 2px 8px; border-radius: 4px; }
.upl { justify-self: start; cursor: pointer; }
.file { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 14.5px; background: var(--surface); }
.file .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .name a { color: var(--ink); }
.file-a { display: flex; gap: 6px; align-items: center; }
.file.err { border-color: transparent; background: var(--crit-soft); }
.file.err .msg { display: block; color: var(--crit); font-size: 13.5px; white-space: normal; }
.file.is-busy { opacity: 0.75; }
.ext { font-family: var(--f-mono); font-size: 10.5px; font-weight: 500; color: var(--ink-2); background: var(--sunk); padding: 4px 7px; border-radius: 5px; min-width: 44px; text-align: center; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--brand); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.rev-sec { display: grid; gap: 12px; padding: 22px 0; border-top: 1px solid var(--line); }
.rev-sec:first-child { border-top: 0; padding-top: 0; }
.rev-q { display: grid; gap: 2px; }
.rev-q .a { font-size: 15px; white-space: pre-wrap; }
.rev-q .a.missing { color: var(--crit); }
.answer { display: grid; gap: 4px; }
.answer p { font-size: 15px; }
.note-bar { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--brand-200); border-radius: var(--r-sm); padding: 14px 18px; font-size: 14.5px; }
.note-bar p { flex: 1; min-width: 220px; }
.quote { border-left: 2px solid var(--brand-200); padding: 2px 0 2px 18px; display: grid; gap: 6px; }
.crit-bars { display: grid; gap: 14px; }
.cb { display: grid; grid-template-columns: minmax(0, 170px) minmax(0, 1fr) 40px; gap: 14px; align-items: center; font-size: 14.5px; }
.cb .meter span { background: var(--brand-200); }

/* ---------- admin tables ---------- */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); text-align: left; display: grid; gap: 4px; align-content: start; }
button.stat:hover { border-color: var(--line-3); }
.stat b { display: block; font-size: 1.65rem; font-weight: 500; line-height: 1.1; }
.stat.hot b { color: var(--warn); }
@media (max-width: 760px) { .stats, .stats.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tbl-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px; }
.tbl-tools select { width: auto; padding-block: 8px; font-size: 14.5px; }
.search { width: 280px !important; max-width: 100%; padding-block: 8px !important; font-size: 14.5px !important; }
.bulk { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 12px 8px; padding: 10px 14px; background: var(--brand-50); border-radius: var(--r-sm); font-size: 14px; }
.bulk b { margin-right: 4px; color: var(--brand-700); }
.bulk .link { margin-left: auto; }
.tbl { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: left; font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); font-weight: 400; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
td.num.met { color: var(--good); }
th.chk, td.chk { width: 36px; padding-right: 0; }
td.chk input, th.chk input { width: 17px; height: 17px; accent-color: var(--brand); margin: 0; vertical-align: middle; }
td.act, th.act { text-align: right; white-space: nowrap; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--sunk); }
tr.is-sel td { background: var(--brand-50); }
tr.is-closed td { color: var(--ink-3); }
td.clamp { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co { font-weight: 600; }
.tbl-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 12px 10px; border-top: 1px solid var(--line); }
.spread { display: inline-block; width: 72px; height: 4px; background: var(--sunk); border-radius: 999px; position: relative; vertical-align: middle; }
.spread span { position: absolute; top: 0; height: 100%; background: var(--ink-3); border-radius: 999px; }
.spread.wide span { background: var(--warn); }
.fin { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; cursor: pointer; color: var(--ink-2); }
.fin input { width: 16px; height: 16px; accent-color: var(--brand); }
tr.is-fin td { background: var(--brand-50); }
.bar-score { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.bar-score i { display: block; height: 4px; background: var(--brand-200); border-radius: 999px; }
.log { display: grid; margin: 10px 0 0; padding: 0; list-style: none; }
.log li { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.log li:first-child { border-top: 0; }
details.more { border-top: 1px solid var(--line); padding-top: 12px; }
details.more summary { cursor: pointer; font-size: 14.5px; font-weight: 500; color: var(--brand-700); }
.danger-zone { border-color: var(--line); display: grid; gap: 10px; }
.progress-box { min-width: 220px; display: grid; gap: 8px; }

/* ---------- settings ---------- */
.setting { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); }
.card > h2 + .setting { border-top: 0; padding-top: 12px; }
.setting .state { display: block; margin-top: 6px; font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--line-2); border-radius: 999px; transition: background 0.2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: transform 0.2s; box-shadow: 0 1px 2px #0003; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translate(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.rule-tbl input { padding: 7px 9px; font-size: 14px; }
.rule-tbl .num-in { width: 76px; text-align: right; font-family: var(--f-mono); }
.rule-tbl td { padding: 8px 12px; }
.rule-tbl.links td:first-child { width: 46%; }
.rule-tbl.links .sub { font-size: 12.5px; }

/* ---------- judge scoring ---------- */
.crit { display: grid; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); }
.card-h + .crit { border-top: 0; padding-top: 6px; }
.crit-h { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; width: 100%; padding: 0; }
.scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.scale input { position: absolute; opacity: 0; pointer-events: none; }
.scale label { display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: var(--r-sm); height: 38px; font-family: var(--f-mono); cursor: pointer; background: var(--surface); color: var(--ink-2); }
.scale label:hover { border-color: var(--line-3); }
.scale input:checked + label { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand); font-weight: 500; }
.scale input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; }
.scale input:disabled + label { cursor: default; }
.anchor { font-size: 12.5px; color: var(--ink-3); }
.total { display: flex; justify-content: space-between; align-items: center; background: var(--sunk); border-radius: var(--r-sm); padding: 14px 16px; margin: 8px 0 12px; }
.total b { font-size: 1.6rem; font-weight: 500; }
.sticky { position: sticky; top: 120px; }
@media (max-width: 900px) { .sticky { position: static; } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
a[href^="tel:"] { white-space: nowrap; }
td.act .row { flex-wrap: nowrap; justify-content: flex-end; }
.stats.three .stat .sub { font-size: 15px; color: var(--ink); }

/* ---------- round 7 ---------- */
.help-text { font-size: 14.5px; color: var(--ink-2); margin: 4px 2px 0; }
.help-text a { color: var(--brand-700); }
.item-d { font-size: 14px; color: var(--ink-2); margin: 4px 0 0; max-width: 70ch; }
.self-rep { font-size: 14.5px; color: var(--ink-2); }
.embed { position: relative; aspect-ratio: 16 / 9; background: var(--player); border-radius: var(--r); overflow: hidden; }
.embed iframe, .embed > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ext-rec { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 36px 24px; }
.ext-rec .icon { color: var(--ink-3); }
.ext-rec .row.center { justify-content: center; }
.flag { display: inline-block; margin: 4px 6px 0 0; font-size: 12px; color: var(--warn); background: var(--warn-soft); padding: 1px 8px; border-radius: 999px; }
.warn-line { font-size: 13.5px; color: var(--warn); margin: 0; }
.drop.is-needed { border-color: var(--warn); background: var(--warn-soft); }
.pill.sm { font-size: 11.5px; padding: 0 8px; }
.kd-in .kvs { margin: 0; }
.tight-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
td.nowrap { white-space: nowrap; }

/* grids */
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; align-items: start; }
.row3 .span2 { grid-column: span 2; }
@media (max-width: 760px) { .row3 { grid-template-columns: 1fr; } .row3 .span2 { grid-column: auto; } }
.help.after { margin: 6px 0 0; font-size: 13px; }

/* pill toggles (judge categories, "applies to") */
.toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.tog { position: relative; cursor: pointer; }
.tog input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tog span { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 1.5px solid var(--line-2); border-radius: 999px; font-size: 14px; color: var(--ink-2); background: var(--surface); transition: border-color 0.12s, background 0.12s; }
.tog span svg { display: none; }
.tog:hover span { border-color: var(--line-3); }
.tog input:checked + span { background: var(--brand-50); border-color: var(--brand); color: var(--brand-700); font-weight: 500; }
.tog input:checked + span svg { display: inline; }
.tog input:focus-visible + span { box-shadow: 0 0 0 3px rgba(47, 107, 237, 0.3); }
.judge-form .f { margin-bottom: 0; }
.judge-form .row3 { gap: 14px 16px; }

/* category tabs with counts */
.seg-n { font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); margin-left: 4px; }
.seg button[aria-pressed="true"] .seg-n { color: var(--brand-700); }

/* assignments */
.chip.is-scored { background: var(--good-soft); border-color: transparent; color: var(--good); }
.chip.is-scored svg { flex: none; }
.chip-add { width: auto; height: 28px; padding: 0 28px 0 10px; font-size: 13px; border: 1px dashed var(--line-3); border-radius: 999px; background-color: var(--surface); color: var(--ink-2); cursor: pointer; }
.chip-add:hover { border-color: var(--brand); color: var(--brand-700); }
table.asg td { vertical-align: top; padding-block: 14px; }
table.asg tr.is-short td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.load { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.load li { display: grid; gap: 6px; font-size: 14.5px; }
.meter.thin { height: 4px; }
.stats .stat .sub { font-size: 13px; }

/* tables that stack on phones */
@media (max-width: 640px) {
  table.stack-sm thead { display: none; }
  table.stack-sm, table.stack-sm tbody, table.stack-sm tr, table.stack-sm td { display: block; width: 100%; }
  table.stack-sm tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  table.stack-sm tr:last-child { border-bottom: 0; }
  table.stack-sm td { border: 0; padding: 4px 0; text-align: left; }
  table.stack-sm td.num { text-align: left; font-family: var(--f-sans); }
  table.stack-sm td[data-l]:not(:first-child)::before { content: attr(data-l); display: block; font-family: var(--f-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }
  table.stack-sm td.act { padding-top: 8px; }
  table.stack-sm td.act .row { justify-content: flex-start; flex-wrap: wrap; }
  table.asg tr.is-short td:first-child { box-shadow: none; }
}

/* content editors */
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.subtabs button { border: 0; background: none; padding: 7px 12px; border-radius: var(--r-sm); font-size: 14.5px; color: var(--ink-2); font-weight: 500; }
.subtabs button:hover { background: var(--sunk); color: var(--ink); }
.subtabs button[aria-selected="true"] { background: var(--brand-50); color: var(--brand-700); }
.q.sm { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.ed-line, .ed-q { display: grid; gap: 12px; padding: 18px 0; border-top: 1px solid var(--line); }
.card-h + .ed-line, .ed-line:first-of-type { border-top: 0; padding-top: 4px; }
.ed-q { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--sunk); }
.ed-q input, .ed-q textarea, .ed-q select { background: var(--surface); }
.ed-btns { flex-wrap: nowrap; }
.btn.icon-only { width: 32px; padding: 0; justify-content: center; }
.btn:disabled.icon-only { opacity: 0.35; }
.c.check.mini { padding: 6px 10px; min-height: 36px; border-width: 1px; font-size: 14px; align-items: center; }
.c.check.mini .box { width: 18px; height: 18px; }
.f-inline { display: flex; align-items: center; gap: 8px; margin: 0; }
.f-inline .q { margin: 0; white-space: nowrap; }
.f-inline input { width: 90px; }
.catlimit { margin: 0; }
.catlimit .help { margin: 6px 0 0; font-size: 13px; }
.catlimit .tog span { height: 30px; font-size: 13px; padding: 0 11px; }
.txt-f .row { margin-bottom: 4px; }
.txt-f .q { margin: 0; }
.txt-f textarea { min-height: 0; }
.ed-list .ed-item { border-top: 1px solid var(--line); }
.ed-list .ed-item:first-child { border-top: 0; }
.ed-item.is-hidden .ed-sum b { color: var(--ink-3); }
.ed-item.is-open { background: var(--sunk); }
.ed-sum { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 22px; }
.ed-sum .pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.ed-body { padding: 4px 22px 20px; }
.ed-body input, .ed-body textarea, .ed-body select { background: var(--surface); }
.quota-row { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-start; }
.quota-row .f { margin: 0; }
.quota-row .num-in { width: 84px; text-align: right; font-family: var(--f-mono); }
.quota-row .f-date input { width: 160px; }
.split.narrow-left { grid-template-columns: minmax(0, 240px) minmax(0, 1fr); }
@media (max-width: 900px) { .split.narrow-left { grid-template-columns: 1fr; } }
.sidenav { display: grid; padding: 8px; }
.sidenav button { text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: var(--r-sm); font-size: 14.5px; color: var(--ink-2); }
.sidenav button:hover { background: var(--sunk); }
.sidenav button[aria-current="true"] { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
code { font-family: var(--f-mono); font-size: 12px; background: var(--sunk); padding: 1px 5px; border-radius: 4px; }
.rm-credit { font-size: 18px; padding: 2px 6px; margin-left: 4px; }
.chip-add { -webkit-appearance: none; appearance: none; background-image: none; padding: 0 12px; }
.sel-sm { width: auto; padding: 6px 30px 6px 10px; font-size: 14px; }

/* round 8 */
.c.consent.is-needed { border-color: var(--warn); }
.edit-bar { position: sticky; top: 70px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn); border-radius: var(--r-sm); padding: 12px 16px; font-size: 14.5px; }
.ae-step { border-top: 1px solid var(--line); padding-top: 12px; }
.ae-step summary { cursor: pointer; font-weight: 600; font-size: 15px; padding: 4px 0 10px; }
.ae-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; padding-bottom: 10px; }
.ae-grid .ae-f:has(textarea), .ae-grid .ae-f:has(.toggles) { grid-column: 1 / -1; }
@media (max-width: 700px) { .ae-grid { grid-template-columns: 1fr; } }
.ae-f input, .ae-f select, .ae-f textarea { font-size: 14.5px; padding: 8px 10px; }
.ae-f select { padding-right: 32px; }
.sched-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.sched-row .sub { font-size: 13px; }
.sched-in { display: flex; gap: 10px; align-items: center; }
.sched-in input { width: 230px; padding: 8px 10px; font-size: 14.5px; }
.sched-st { grid-column: 1 / -1; }
.sched-st:empty { display: none; }
@media (max-width: 600px) { .sched-row { grid-template-columns: 1fr; } .sched-in input { width: 100%; } }

/* round 9 */
.apply-main { display: grid; gap: 12px; min-width: 0; }
.autosave-note { margin: 0 4px; }
.apply-main > .demo { margin: 0 4px; }
.toast { display: flex; align-items: center; gap: 14px; }
.toast[hidden] { display: none; }
.toast-undo { background: none; border: 0; color: var(--brand-200); font: inherit; font-weight: 600; padding: 2px 4px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
.toast-undo:hover { color: inherit; }
.good-t { color: var(--good); }
.att-h { display: flex; justify-content: space-between; gap: 16px; padding: 20px 12px 6px; }
.att-h h2 { font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.att-n, .tab-n { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-family: var(--f-mono); font-size: 11.5px; font-weight: 500; }
.tab-n { margin-left: 6px; height: 18px; min-width: 18px; font-size: 11px; }
.att + .att { margin-top: 0; }
.resend { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.resend p { margin: 0; color: var(--ink-2); }
.modal .okbox { margin: 0; }

/* round 10 */
textarea.cnote { min-height: 0; font-size: 14.5px; padding: 8px 10px; margin-top: 4px; }
.cb-wrap { display: grid; gap: 8px; }
.cb-notes { list-style: none; margin: 0 0 4px; padding: 0 0 0 14px; border-left: 2px solid var(--brand-200); display: grid; gap: 8px; }
.cb-notes li { display: grid; gap: 2px; font-size: 14.5px; }
.sheet-st { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--sunk); font-size: 14px; }
.sheet-st.on { background: var(--good-soft); }
.sheet-st.on b { color: var(--good); }
/* production mode */
.is-prod .proto-banner, .is-prod .demo, .is-prod .proto-only { display: none !important; }
.is-prod:not(.is-staff) .roles { display: none; }
.staff-list { list-style: none; margin: 0; padding: 0; display: grid; }
.staff-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.staff-list li:first-child { border-top: 0; }
.staff-add input { flex: 1; min-width: 140px; padding: 8px 10px; font-size: 14.5px; }

/* round 11 */
.person { max-width: 860px; margin: 0 auto; display: grid; gap: 20px; }
.person > .card, .person > section, .person > details { margin: 0; }
.next-step { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-left: 3px solid var(--brand); }
.next-step .sub { display: block; font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.req-set { border-top: 1px solid var(--line); }
.req-set:first-of-type { border-top: 0; }
.req-set > summary { cursor: pointer; list-style: none; padding: 12px 0; }
.req-set > summary::-webkit-details-marker { display: none; }
.req-set-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.req-set-h b::before { content: "▸"; display: inline-block; width: 16px; color: var(--ink-3); transition: transform 0.15s; }
.req-set[open] .req-set-h b::before { transform: rotate(90deg); }
.chk-list { display: grid; gap: 2px; padding: 0 0 12px; }
.chk-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r-sm); }
.chk-row:hover { background: var(--sunk); }
label.chk { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; flex: 1; min-width: 0; }
label.chk input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chk-box { flex: none; width: 20px; height: 20px; border: 1.5px solid var(--line-3); border-radius: 5px; display: grid; place-items: center; color: transparent; background: var(--surface); margin-top: 1px; }
label.chk input:checked + .chk-box { background: var(--brand); border-color: var(--brand); color: #fff; }
label.chk input:focus-visible + .chk-box { box-shadow: 0 0 0 3px rgba(47, 107, 237, 0.3); }
label.chk input:disabled + .chk-box { opacity: 0.4; }
.chk-t { display: grid; gap: 1px; font-size: 14.5px; min-width: 0; }
.chk-t b { font-weight: 500; }
.chk-t .sub { font-size: 13px; color: var(--ink-3); }
.psec > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.psec > summary::-webkit-details-marker { display: none; }
.psec > summary h2 { margin: 0; }
.psec > summary h2::before { content: "▸"; display: inline-block; width: 18px; color: var(--ink-3); font-size: 0.85em; transition: transform 0.15s; }
.psec[open] > summary h2::before { transform: rotate(90deg); }
.psec[open] > summary { margin-bottom: 12px; }
.ans-sec { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.ans-sec:first-of-type { border-top: 0; padding-top: 0; }
.ans-sec h3 { font-size: 15px; color: var(--ink-2); font-family: var(--f-mono); font-weight: 400; text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; }
.answer a, .kv dd a { color: var(--brand-700); overflow-wrap: anywhere; }
.lead-p { font-size: 15.5px; color: var(--ink); }
.cat-pick { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.cat-pick.is-needed select { border-color: var(--warn); }
.pick-list { display: grid; gap: 14px; max-height: 52vh; overflow-y: auto; padding-right: 4px; }
.pick-list fieldset { display: grid; gap: 4px; }
.pick-list legend { margin-bottom: 4px; }
.pick-row { display: flex; gap: 10px; align-items: flex-start; padding: 7px 8px; border-radius: var(--r-sm); cursor: pointer; font-size: 14.5px; }
.pick-row:hover { background: var(--sunk); }
.pick-row input { width: 17px; height: 17px; accent-color: var(--brand); margin: 2px 0 0; flex: none; }
.pick-row .sub { display: block; font-size: 13px; color: var(--ink-3); }
.pick-row.is-off { opacity: 0.55; cursor: default; }
.modal .m:has(.pick-list) { max-width: 560px; }

/* round 12: emails, attendance import, private files */
.tpl.is-off > summary h2 { color: var(--ink-3); }
.tpl .setting { padding: 10px 0; }
.mail-b-pre { white-space: pre-wrap; background: var(--sunk); border-radius: var(--r-sm); padding: 14px 16px; font-size: 14.5px; max-height: 260px; overflow-y: auto; }
.plain-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; max-height: 220px; overflow-y: auto; }
.modal .m:has(.compose), .modal .m:has(.imp) { max-width: 620px; }
.compose textarea { min-height: 200px; }
.compose .tick { margin-top: 0; }
.confirm-line { margin: 4px 0 0; padding: 12px 14px; background: var(--brand-50); border-radius: var(--r-sm); color: var(--ink); font-size: 14.5px; }
.imp { display: grid; gap: 14px; }
.imp .f { margin: 0; }
.imp-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.imp-sum .stat { box-shadow: none; padding: 12px 14px; }
.imp-sum .stat b { font-size: 1.35rem; }
.imp-none { display: grid; gap: 6px; margin-top: 8px; max-height: 280px; overflow-y: auto; }
.imp-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 14px; }
.imp-row .sub { display: block; font-size: 12.5px; color: var(--ink-3); }
.imp-row select { max-width: 260px; }
@media (max-width: 600px) { .imp-row { flex-direction: column; align-items: stretch; } .imp-row select { max-width: none; } .imp-sum { grid-template-columns: 1fr 1fr 1fr; } }

/* ---------- motion ----------
   Small and quick. Screens animate only when you move somewhere new (see doRender), never on a redraw.
   Everything here is switched off for people who ask their device for reduced motion. */
:root { --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1); --ease-spring: cubic-bezier(0.34, 1.3, 0.64, 1); }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes pop-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(4px) scale(0.99); } }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toast-out { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, 6px); } }
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes tab-line { from { border-bottom-color: transparent; } }

/* page and step changes */
.screen.anim { animation: fade-up 0.26s var(--ease-out) var(--anim-skip, 0s) both; }
.screen.anim .stats > * { animation: fade-up 0.32s var(--ease-out) calc(var(--d, 0s) + var(--anim-skip, 0s)) both; }
.screen.anim .stats > :nth-child(2) { --d: 0.03s; }
.screen.anim .stats > :nth-child(3) { --d: 0.06s; }
.screen.anim .stats > :nth-child(4) { --d: 0.09s; }
.screen.anim .stats > :nth-child(5) { --d: 0.12s; }
.screen.anim .meter span, .screen.anim .bar i { transform-origin: left center; animation: grow-x 0.7s var(--ease-out) calc(0.08s + var(--anim-skip, 0s)) both; }
.nav-anim [aria-selected="true"] { animation: tab-line 0.3s var(--ease-out); }
.loading { animation: fade-in 0.3s ease-out 0.15s both; }

/* dialogs and messages */
#modal.m-in { animation: fade-in 0.16s ease-out; }
.modal .m.m-pop { animation: pop-in 0.22s var(--ease-out); }
.modal.m-ghost { pointer-events: none; z-index: 99; animation: fade-out 0.16s ease-in forwards; }
.modal.m-ghost > .m { animation: pop-out 0.16s ease-in forwards; }
.toast.t-in { animation: toast-in 0.22s var(--ease-out); }
.toast.t-out { animation: toast-out 0.18s ease-in forwards; }

/* sections someone opens */
details.opening > :not(summary) { animation: reveal 0.2s var(--ease-out); }

/* header shadow once the page scrolls */
header.site { transition: box-shadow 0.2s ease; }
header.site.scrolled { box-shadow: 0 1px 10px rgba(20, 25, 34, 0.07); }

/* hover and press */
.btn { transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease, transform 0.1s ease, filter 0.14s ease; }
.btn:active:not(:disabled):not(.link) { transform: translateY(1px) scale(0.985); }
.btn.primary:hover:not(:disabled) { box-shadow: 0 2px 8px rgba(47, 107, 237, 0.22); }
.tabs button, .subtabs button, .sidenav button, .secnav button, .side button, .seg button, .roles button, .link, a { transition: color 0.14s ease, background-color 0.14s ease, border-color 0.14s ease; }
tr.click td, .chk-row, .pick-row, .imp-row, .ed-item, .file { transition: background-color 0.14s ease, border-color 0.14s ease; }
button.stat { transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s var(--ease-out); }
button.stat:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(20, 25, 34, 0.07); }
button.stat:active { transform: none; }
.chk-box, .box, .tick input { transition: background-color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease; }
.chip { transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease; }
.chip .x { transition: color 0.12s ease, background-color 0.12s ease; }
.card.psec > summary h2::before, .req-set-h b::before { transition: transform 0.18s var(--ease-out); }
@media (prefers-reduced-motion: reduce) {
  .modal.m-ghost { display: none !important; }
  .btn:active:not(:disabled), button.stat:hover { transform: none !important; }
}

/* ---------- round 13: applicant dashboard ---------- */
/* Progress as arrows: done steps fill in brand blue, the current step is outlined and bold. */
.steps { display: flex; list-style: none; margin: 0; padding: 0; gap: 4px; counter-reset: none; }
.step { --c: var(--sunk); --t: var(--ink-3); flex: 1 1 0; min-width: 0; position: relative; display: flex; align-items: center; gap: 8px; padding: 10px 14px 10px 24px; min-height: 52px; background: var(--c); color: var(--t); font-size: 13.5px; line-height: 1.25; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%); }
.step:first-child { padding-left: 16px; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); border-radius: var(--r-sm) 0 0 var(--r-sm); }
.step:last-child { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 14px 50%); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding-right: 16px; }
.step.is-done { --c: var(--brand-100); --t: var(--brand-700); }
.step.is-now { --c: var(--brand); --t: var(--on-brand); font-weight: 600; }
.step-n { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-family: var(--f-mono); font-size: 11.5px; font-weight: 500; background: var(--surface); color: var(--ink-3); }
.step.is-done .step-n { background: var(--brand); color: var(--on-brand); }
.step.is-now .step-n { background: var(--on-brand); color: var(--brand-700); }
.step-l { min-width: 0; overflow-wrap: anywhere; }
.steps-m { display: none; font-size: 14px; color: var(--ink-2); margin-top: 8px; }
@media (max-width: 760px) {
  .step { padding: 8px 6px 8px 20px; min-height: 40px; justify-content: center; }
  .step:first-child { padding-left: 10px; }
  .step .step-l { display: none; }
  .steps-m { display: block; }
}

/* The single next thing to do */
.card.next { border-left: 4px solid var(--brand); padding-block: 24px; }
.card.next h2 { font-size: 22px; margin-bottom: 6px; }
.card.next > p { color: var(--ink-2); max-width: 70ch; }
.card.next .row { margin-top: 18px; }
.card.next.is-good { border-left-color: var(--good); }
.card.next.is-good .eyebrow { color: var(--good); }
.card.next.is-wait { border-left-color: var(--warn); }
.card.next.is-wait .eyebrow { color: var(--warn); }
.card.next.is-muted { border-left-color: var(--line-3); }
.card.next.is-muted .eyebrow { color: var(--ink-3); }
.next-note { display: block; margin-bottom: 8px; padding: 10px 14px; background: var(--warn-soft); color: var(--ink); border-radius: var(--r-sm); white-space: pre-line; }

/* Write it vs. submit it */
.app-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.app-line { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; }
.app-line .sub { font-size: 13.5px; margin-top: 1px; }
.app-ic { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sunk); color: var(--ink-3); margin-top: 1px; }
.app-line.is-ok .app-ic { background: var(--good-soft); color: var(--good); }
.app-line.is-go .app-ic { background: var(--brand-50); color: var(--brand-700); }
.app-line.is-lock { color: var(--ink-2); }
.dash-grid { margin-top: 4px; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }

/* Application page: draft vs. ready */
.apply-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--sunk); border-radius: var(--r-sm); padding: 12px 16px; font-size: 14.5px; }
.apply-bar p { flex: 1; min-width: 220px; }
.apply-bar-ic { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); color: var(--ink-3); }
.apply-bar.is-ready { background: var(--good-soft); }
.apply-bar.is-ready .apply-bar-ic { background: var(--good); color: #fff; }

/* Requirements page: filters under the intro */
.learn-bar { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

/* Admin: full application */
.answer.is-empty .label { color: var(--ink-3); }
.answer.is-empty p { font-size: 14px; font-style: italic; }
.todo-tag { display: inline-block; margin-left: 6px; font-size: 11.5px; font-weight: 500; padding: 0 8px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); vertical-align: 2px; }

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brandlink .logo { filter: brightness(1.45) saturate(0.9); } }
:root[data-theme="dark"] .brandlink .logo { filter: brightness(1.45) saturate(0.9); }
@media (max-width: 560px) {
  .card.next .row { flex-direction: column; align-items: stretch; }
  .card.next .btn { width: 100%; white-space: normal; text-align: center; padding-inline: 16px; }
  .card.next .btn.big { font-size: 15.5px; }
}

/* ---------- round 14 ---------- */
/* Reading an application (admin, judge, and the applicant's own review): section > question > answer. */
.ans-sec { gap: 18px; padding-top: 22px; }
.ans-sec h3 { font-family: var(--f-sans, inherit); font-size: 17px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); }
.answer { gap: 6px; }
.answer > .label, .rev-q > .label { font-family: inherit; font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink-2); line-height: 1.4; }
.answer > p { font-size: 15.5px; line-height: 1.6; color: var(--ink); background: var(--sunk); border-radius: var(--r-sm); padding: 10px 14px; }
.answer.is-empty > p { background: none; border: 1px dashed var(--line-2); color: var(--ink-3); font-size: 14px; font-style: italic; }
.answer.is-empty > .label { color: var(--ink-3); }
.rev-sec { gap: 16px; }
.rev-q { gap: 6px; }
.rev-q > .a { font-size: 15.5px; line-height: 1.6; background: var(--sunk); border-radius: var(--r-sm); padding: 10px 14px; }
.rev-q > .a.missing { background: var(--crit-soft); }
.kvs .kv dt { font-size: 14px; }

/* Dashboard next-step body uses the card's full width */
.card.next > p { max-width: none; }

/* Review and submit */
.okbox.go-submit { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.submit-box { border: 2px solid var(--brand); }
.submit-box h2 { font-size: 22px; margin-bottom: 4px; }
.submit-box.flash { animation: submit-flash 1.2s var(--ease-out, ease-out); }
@keyframes submit-flash { 0% { box-shadow: 0 0 0 0 rgba(47, 107, 237, 0.45); } 100% { box-shadow: 0 0 0 14px rgba(47, 107, 237, 0); } }
@media (prefers-reduced-motion: reduce) { .submit-box.flash { animation: none; } }

/* Results status (admin) */
.res-status { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; border-left: 4px solid var(--line-3); }
.res-status > div { flex: 1; min-width: 260px; }
.res-status h2 { font-size: 19px; margin-bottom: 4px; }
.res-status .eyebrow { color: var(--ink-3); }
.res-status.is-on { border-left-color: var(--good); }
.res-status.is-on .eyebrow { color: var(--good); }

/* Judge feedback minimum */
.count.is-short { color: var(--warn); }
.count.is-ok { color: var(--good); }
.req-tag { display: inline-block; margin-left: 6px; font-size: 11.5px; font-weight: 500; padding: 0 8px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); vertical-align: 2px; }
.rev-q > .a.none { background: none; border: 1px dashed var(--line-2); color: var(--ink-3); font-size: 14px; }

/* ---------- round 15 ---------- */
.watch-kv { margin-top: 14px; border-top: 1px solid var(--line); }
.watch-kv .kv:first-child { border-top: 0; }
.card.empty > p { max-width: none; justify-self: stretch; }
.kd-help { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.th-sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }
.th-sort:hover { color: var(--ink); }
.th-sort:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px; }
.th-sort.on { color: var(--brand-700); }
.th-arrow { font-family: var(--f-sans); font-size: 11px; opacity: 0.55; }
.th-sort.on .th-arrow { opacity: 1; }
th.num .th-sort { justify-content: flex-end; }

/* Admin → Judges */
.jcats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.jcat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 4px; box-shadow: var(--shadow, none); }
.jcat-n { font-size: 15px; color: var(--ink-2); }
.jcat-n b { font-size: 24px; color: var(--ink); margin-right: 2px; }
.jcat-s { font-size: 13px; color: var(--ink-3); }
.jcat-s b { color: var(--warn); font-weight: 600; }
.jcat.is-short { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.judges-tbl { table-layout: fixed; width: 100%; }
.judges-tbl col.c-j { width: 32%; }
.judges-tbl col.c-c { width: 30%; }
.judges-tbl col.c-s { width: 14%; }
.judges-tbl col.c-a { width: 24%; }
.judges-tbl td { vertical-align: middle; padding-top: 14px; padding-bottom: 14px; }
.jname { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.judges-tbl .sub { font-size: 13px; overflow-wrap: anywhere; }
.judges-tbl .jorg { color: var(--ink-3); }
.chips.sm { gap: 4px; }
.chips.sm .chip { font-size: 12px; padding: 1px 8px; line-height: 1.6; }
.jprog { display: grid; gap: 5px; max-width: 120px; }
.jacts { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.link.sm { font-size: 13px; }
.tag { display: inline-flex; align-items: center; font-size: 11px; font-weight: 500; padding: 0 7px; border-radius: 999px; background: var(--sunk); color: var(--ink-3); line-height: 1.7; white-space: nowrap; }
.tag.is-good { background: var(--good-soft); color: var(--good); }
.tag.is-warn { background: var(--warn-soft); color: var(--warn); }
@media (max-width: 760px) {
  .judges-tbl { table-layout: auto; }
  .jacts { justify-content: flex-start; }
}
/* Judge scoring: the score column scrolls on its own so the application stays in view */
.score-panel { top: 88px; max-height: calc(100vh - 104px); max-height: calc(100dvh - 104px); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.score-panel:focus { outline: none; }
@media (max-width: 900px) { .score-panel { max-height: none; overflow: visible; } }
