/* ==========================================================================
   Edify College of IT - Internship Testing Portal
   Professional theme: white workspace, Edify blue as the single accent,
   compact 14px type scale in IBM Plex Sans. Odoo-style light sidebar.
   ========================================================================== */

:root {
  --ink:            #08182E;
  --ink-soft:       #16304F;
  --brand:          #1552A2;
  --brand-bright:   #2E7DD1;
  --brand-tint:     #E8F0FA;
  --gold:           #E8B04B;
  --gold-deep:      #B7801F;

  --surface:        #F4F5F7;
  --card:           #FFFFFF;
  --line:           #E6E8EC;
  --line-soft:      #F0F1F4;

  --text:           #1F2A37;
  --text-mute:      #6B7280;
  --text-faint:     #9AA2AE;
  --track:          #EDEFF2;

  --good:           #12855F;
  --good-tint:      #E3F5EE;
  --warn:           #B7801F;
  --warn-tint:      #FCF3E0;
  --bad:            #C13B3B;
  --bad-tint:       #FBE9E9;

  --gradient:       linear-gradient(135deg, #08182E 0%, #10396F 42%, #1552A2 72%, #2E7DD1 100%);
  --gradient-soft:  linear-gradient(135deg, #1552A2 0%, #2E7DD1 100%);

  --radius:         12px;
  --radius-sm:      8px;
  --radius-lg:      14px;

  --shadow-sm:      none;
  --shadow:         0 1px 3px rgba(16, 24, 40, .05);
  --shadow-lg:      0 16px 40px rgba(16, 24, 40, .12);

  --display:        'IBM Plex Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --body:           'IBM Plex Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono:           'JetBrains Mono', 'Consolas', monospace;

  --sidebar-w:      228px;

  /* Marks the stylesheet draws itself, as masks rather than typed characters:
     a character inherits the font's weight and lands differently in every
     browser, and none of the fonts here carry a tick worth using. */
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  --rise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5M5 12l7-7 7 7'/%3E%3C/svg%3E");
  --dot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='3.4' fill='%23000'/%3E%3C/svg%3E");
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 14px; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -.005em;
  line-height: 1.25;
  margin: 0 0 .5rem;
  color: var(--ink);
}

h1 { font-size: 1.55rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }

p { margin: 0 0 1rem; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-bright); }

:focus-visible {
  outline: 2px solid var(--brand-bright);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   The chevron rail: the logo's three diagonal bars, reused as a structural
   accent. Appears on the sidebar edge, section headers and the timer.
   -------------------------------------------------------------------------- */

.chevron-rail {
  background-image: repeating-linear-gradient(
    115deg,
    var(--brand) 0 9px,
    transparent 9px 15px
  );
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--display);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--brand);
  margin-bottom: .5rem;
}

.eyebrow::before {
  content: '';
  width: 16px;
  height: 2px;
  background: currentColor;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   The shell: one white sheet floating on a grey ground, with the navigation
   across its top. Nothing here is sticky — the sheet clips its own corners,
   and a clipping ancestor silently kills position:sticky in a descendant.
   -------------------------------------------------------------------------- */

.shell { min-height: 100vh; padding: 1.1rem; }

.app-sheet {
  max-width: 1520px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  /* clip, not hidden. Both keep the corners rounded; only `hidden` makes a
     scroll container of the sheet, and an ancestor that scrolls is what a
     `position: sticky` element sticks to. With `hidden` here the bar that
     appears when rows are ticked stuck to the foot of a list a thousand
     pixels long instead of to the bottom of the screen, which on a phone
     meant it could not be reached at all. The first line is the fallback
     for a browser too old to know `clip`. */
  overflow: hidden;
  overflow: clip;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 30px rgba(16, 24, 40, .05);
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 2.2rem);
}

/* ----- top navigation ----- */

.topnav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: .6rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.tn-brand {
  display: inline-flex; align-items: center; gap: .5rem;
  flex: 0 0 auto; color: var(--ink); text-decoration: none;
}
.tn-brand img { height: 26px; width: auto; display: block; max-width: 170px; }
.tn-mark {
  width: 26px; height: 26px; flex: 0 0 26px; border-radius: 7px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: .85rem;
}
.tn-name {
  font-family: var(--display); font-weight: 600; font-size: .95rem;
  letter-spacing: -.01em; white-space: nowrap;
  max-width: 190px; overflow: hidden; text-overflow: ellipsis;
}

.tn-nav { display: flex; align-items: center; gap: .1rem; flex: 1; min-width: 0; }

.tn-link {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .5rem .72rem;
  font-family: var(--body); font-size: .9rem; font-weight: 500;
  color: var(--text-mute); background: none; border: none; cursor: pointer;
  border-radius: 8px; white-space: nowrap; text-decoration: none;
  position: relative;
}
.tn-link:hover { color: var(--ink); background: var(--surface); }
/* The leading mark and the trailing chevron are both svg; they are not the
   same thing, so they are not styled as one. The mark carries the item's
   meaning and brightens with it; the chevron is punctuation and stays faint. */
.tn-link > svg:first-child { width: 15px; height: 15px; flex: 0 0 15px; opacity: .72; }
.tn-link > span + svg { width: 12px; height: 12px; opacity: .45; margin-left: -.1rem; }
.tn-link:hover > svg:first-child { opacity: .95; }

/* The active destination is marked by a rule under the bar, as in a tab
   strip, so the row reads as navigation rather than as a set of buttons. */
.tn-link.on, .tn-group.on > .tn-link {
  color: var(--brand); font-weight: 600;
}
.tn-link.on > svg:first-child, .tn-group.on > .tn-link > svg:first-child { opacity: 1; }
.tn-link.on::after, .tn-group.on > .tn-link::after {
  content: ''; position: absolute;
  left: .72rem; right: .72rem; bottom: -.63rem; height: 2px;
  background: var(--brand); border-radius: 2px 2px 0 0;
}

.tn-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); flex: 0 0 6px;
}

/* ----- a group's drop-down ----- */

.tn-group { position: relative; display: inline-flex; }

/* The menu hangs half a rem below its name, and that gap is not part of the
   group — so a pointer travelling from the name down to the menu left the
   group on the way and the menu shut in its face. This bridges the gap with
   a transparent strip belonging to the menu, which keeps the hover unbroken
   along the whole path. */
.tn-menu::before {
  content: ''; position: absolute;
  left: 0; right: 0; top: -.55rem; height: .6rem;
}
.tn-menu {
  position: absolute; top: calc(100% + .5rem); left: 0; z-index: 60;
  min-width: 212px; padding: .3rem;
  background: #fff; border: 1px solid var(--line); border-radius: 11px;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s;
}
.tn-menu-right { left: auto; right: 0; }
.tn-group:hover > .tn-menu,
.tn-group:focus-within > .tn-menu {
  opacity: 1; visibility: visible; transform: none;
}
.tn-menu a {
  display: flex; align-items: center; gap: .5rem;
  padding: .45rem .6rem; border-radius: 7px;
  font-size: .89rem; color: var(--text); text-decoration: none;
}
.tn-menu a:hover { background: var(--surface); color: var(--ink); }
.tn-menu a svg { width: 15px; height: 15px; flex: 0 0 15px; color: var(--text-faint); }
.tn-menu a:hover svg { color: var(--brand); }
.tn-menu a .pill { margin-left: auto; }
.tn-who {
  padding: .5rem .6rem .55rem; margin-bottom: .2rem;
  border-bottom: 1px solid var(--line-soft);
}
.tn-who b { display: block; font-size: .9rem; color: var(--ink); }
.tn-who span { font-size: .8rem; color: var(--text-mute); text-transform: capitalize; }

.tn-right { display: flex; align-items: center; gap: .6rem; flex: 0 0 auto; }
.tn-actions { display: flex; align-items: center; gap: .45rem; }
.tn-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand); color: #fff; border: none; cursor: pointer;
  font-family: var(--display); font-weight: 600; font-size: .74rem;
  display: grid; place-items: center;
}

.tn-drawer-foot { display: none; }

/* ----- the context strip under the navigation ----- */

.subbar {
  display: flex; align-items: center; gap: 1rem;
  padding: .85rem 1.4rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.subbar h1 {
  font-size: 1.12rem; margin: 0; font-weight: 600; letter-spacing: -.015em;
}
.subbar .sub { font-size: .83rem; color: var(--text-mute); margin: .1rem 0 0; }
.subbar .sub:empty { display: none; }
.subbar .spacer { flex: 1; }
.sb-note { font-size: .83rem; color: var(--text-mute); }

.content { padding: 1.4rem; width: 100%; flex: 1; }

.sheet-foot {
  display: flex; align-items: center; gap: .8rem;
  padding: .7rem 1.4rem; border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: .78rem; color: var(--text-faint);
}
.sheet-foot .spacer { flex: 1; }
.sheet-foot b { color: var(--text-mute); font-weight: 600; }
.sf-install {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: 7px;
  padding: .22rem .6rem; font-size: .78rem; color: var(--text-mute); cursor: pointer;
}
.sf-install.show { display: inline-block; }

.menu-btn {
  display: none;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  width: 34px; height: 34px;
  border-radius: 9px;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Cards, grids, tables
   -------------------------------------------------------------------------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.45rem;
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 1.1rem; }
.card-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0;
  border-bottom: none;
}
.card-head h2, .card-head h3 { margin: 0; font-size: 1.05rem; letter-spacing: -.01em; }
.card-head .spacer { flex: 1; }
.card-head p { margin: .15rem 0 0; font-size: .88rem; color: var(--text-mute); }

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* Five across only while there is room for five to stay readable; below that
   it falls back with the others rather than squeezing five cards to ribbons. */
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; }
@media (max-width: 1280px) { .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.grid-sidebar { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }

/* A figure card. The reference leads with the number, not with decoration:
   a small muted caption above, the value large and tight below, and nothing
   else competing — so the coloured edge the old cards carried is gone and the
   icon, where a page supplies one, sits quietly to the right. */
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.stat .label {
  font-size: .74rem;
  color: var(--text-mute);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.stat .value {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -.03em;
  color: var(--ink);
  line-height: 1.05;
  margin-top: .45rem;
}
.stat .value small {
  font-size: .8rem; color: var(--text-faint); font-weight: 500;
  margin-left: .25rem; letter-spacing: 0;
}

table { width: 100%; border-collapse: collapse; font-size: .93rem; }
thead th {
  text-align: left;
  font-family: var(--display);
  font-size: .73rem;
  color: var(--text-mute);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: .3rem .6rem .6rem;
  background: none;
  border-top: none;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody td { padding: .6rem .6rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #FAFBFC; }

/* Short cells must never be broken across lines: a score read as "20/2 5"
   is not a score. Long prose cells are left free to wrap. */
td.strong, td.t-num, td.t-right, td .pill, .tag-code { white-space: nowrap; }

.table-wrap { overflow-x: auto; margin: 0 -.35rem; }
.table-wrap > table { min-width: 680px; }

/* A thin flat meter, for a pass rate or a progress figure beside a row. */
.meter { height: 6px; border-radius: 99px; background: var(--track); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.meter.good > i { background: var(--good); }
.meter.warn > i { background: var(--gold); }
.meter.bad  > i { background: var(--bad); }

/* --------------------------------------------------------------------------
   Buttons, pills, forms
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  font-family: var(--body);
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.3;
  padding: .5rem 1rem;
  border-radius: 9px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 14px; height: 14px; }

.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: #104487; border-color: #104487; color: #fff; }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-soft); color: #fff; }

.btn-ghost { background: #fff; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { color: var(--ink); border-color: #D5D8DE; background: var(--surface); }

.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #F0BE63; color: var(--ink); }

.btn-danger { background: var(--bad-tint); color: var(--bad); border-color: #F3D2D2; }
.btn-danger:hover { background: var(--bad); color: #fff; }

.btn-sm { padding: .32rem .7rem; font-size: .83rem; border-radius: 7px; }
.btn-lg { padding: .65rem 1.4rem; font-size: .98rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: 0;
  padding: .18rem .6rem;
  border-radius: 99px;
  background: var(--brand-tint);
  color: var(--brand);
  white-space: nowrap;
}
.pill.good { background: var(--good-tint); color: var(--good); }
.pill.warn { background: var(--warn-tint); color: var(--warn); }
.pill.bad  { background: var(--bad-tint);  color: var(--bad); }
.pill.mute { background: var(--line-soft); color: var(--text-mute); }
.pill.ink  { background: var(--ink); color: #fff; }

.tag-code { font-family: var(--mono); font-size: .78rem; letter-spacing: .02em; }

label, .field-label {
  display: block;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: .25rem;
}
/* "(optional)" sitting next to a field's name. It has to read as an aside,
   not as part of the name, so it loses the label's weight. */
label > .muted, .field-label > .muted { font-weight: 400; font-size: .95em; }

.hint { font-size: .82rem; color: var(--text-mute); font-weight: 400; margin-top: .3rem; }

/* Every text-like box, however it is written in the template.
   A bare <input> is a text box too, and matching only input[type=text] left
   those at the browser's own narrow default while the field beside them
   filled its column — which is what made these forms look ragged. */
input:not([type]), input[type=text], input[type=email], input[type=password],
input[type=number], input[type=tel], input[type=url], input[type=search],
input[type=date], input[type=time], input[type=datetime-local], input[type=month],
select, textarea {
  width: 100%;
  font-family: var(--body);
  font-size: .93rem;
  color: var(--text);
  padding: .52rem .75rem;
  border: 1px solid #DCE0E6;
  border-radius: 9px;
  background-color: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
/* A file input is a button, not a box: it gets the frame but not the padding
   of a text field, and never a fixed width. */
input[type=file] {
  width: 100%;
  font-family: var(--body);
  font-size: .88rem;
  color: var(--text);
  padding: .3rem;
  border: 1px solid #D4DAE2;
  border-radius: var(--radius-sm);
  background-color: #fff;
}
input[type=color] {
  width: 3.2rem; height: 32px; padding: 2px;
  border: 1px solid #D4DAE2; border-radius: var(--radius-sm); background: #fff;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(21, 82, 162, .12);
}
textarea { resize: vertical; min-height: 90px; line-height: 1.55; }
textarea.mono { font-family: var(--mono); font-size: .82rem; }

.field { margin-bottom: .85rem; }
.field-row { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.check {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .5rem .7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .9rem;
  font-weight: 400;
  margin-bottom: .5rem;
  transition: border-color .15s ease, background .15s ease;
}
.check:hover { border-color: var(--brand-bright); background: #FAFCFE; }
.check input { margin-top: .22rem; accent-color: var(--brand); }

/* --------------------------------------------------------------------------
   Flash messages
   -------------------------------------------------------------------------- */

.flashes { padding: .9rem 1.5rem 0; }
.flash {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem .85rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 400;
  margin-bottom: .5rem;
  border-left: 3px solid;
}
.flash.success { background: var(--good-tint); color: #0B6446; border-color: var(--good); }
.flash.danger  { background: var(--bad-tint);  color: #932B2B; border-color: var(--bad); }
.flash.warning { background: var(--warn-tint); color: #8A6015; border-color: var(--gold); }

/* --------------------------------------------------------------------------
   Landing page
   -------------------------------------------------------------------------- */

.landing { background: var(--ink); }

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .85rem 2rem;
  max-width: 1180px;
  margin: 0 auto;
}
.nav .brand { display: block; line-height: 0; }
.nav .brand img { height: 26px; display: block; }
.nav .spacer { flex: 1; }
.nav a.link { color: rgba(255, 255, 255, .82); font-size: .88rem; font-weight: 500; }
.nav a.link:hover { color: #fff; }
.nav .nav-cta-short { display: none; }

@media (max-width: 760px) {
  .nav { padding-left: 1.1rem; padding-right: 1.1rem; gap: .6rem; }
  .nav .section-link { display: none; }
  .nav .nav-cta-long { display: none; }
  .nav .nav-cta-short { display: inline; }
}

.hero {
  background: var(--gradient);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -30% -10% auto auto;
  width: 60%;
  height: 150%;
  background-image: repeating-linear-gradient(115deg,
    rgba(255, 255, 255, .055) 0 34px, transparent 34px 78px);
  transform: rotate(4deg);
  pointer-events: none;
}
.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 3rem 2rem 3.6rem;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 3rem;
  align-items: center;
  position: relative;
}
.hero .eyebrow { color: var(--gold); }
.hero h1 {
  color: #fff;
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -.015em;
  margin-bottom: 1rem;
}
.hero h1 em {
  font-style: normal;
  color: var(--gold);
  position: relative;
}
.hero p.lead {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, .82);
  max-width: 50ch;
  margin-bottom: 1.7rem;
}
.hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 2.2rem;
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(255, 255, 255, .16);
}
.hero-stats .n {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -.01em;
}
.hero-stats .l {
  font-size: .82rem;
  color: rgba(255, 255, 255, .55);
}

/* The signature panel: a live mock of the marking flow */
.flow-panel {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  backdrop-filter: blur(8px);
}
.flow-step {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  padding: .85rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, .15);
  opacity: 0;
  animation: flowIn .55s ease forwards;
}
.flow-step:last-child { border-bottom: none; }
.flow-step:nth-child(1) { animation-delay: .15s; }
.flow-step:nth-child(2) { animation-delay: .45s; }
.flow-step:nth-child(3) { animation-delay: .75s; }
.flow-step:nth-child(4) { animation-delay: 1.05s; }
.flow-step .mark {
  width: 30px; height: 30px;
  flex: 0 0 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .14);
  color: var(--gold);
  font-family: var(--display);
  font-size: .78rem;
  font-weight: 700;
}
.flow-step .t { font-size: .89rem; font-weight: 600; color: #fff; }
.flow-step .d { font-size: .79rem; color: rgba(255, 255, 255, .62); }

@keyframes flowIn {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: translateX(0); }
}

.band { background: #fff; }
.band-inner { max-width: 1180px; margin: 0 auto; padding: 2.8rem 2rem; }
.band.tint { background: var(--surface); }

.feature {
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  position: relative;
}
.feature .ico {
  width: 34px; height: 34px;
  border-radius: 6px;
  background: var(--brand-tint);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin-bottom: .85rem;
}
.feature .ico svg { width: 17px; height: 17px; }
.feature h3 { font-size: 1rem; }
.feature p { font-size: .92rem; color: var(--text-mute); margin: 0; }

.footer {
  background: var(--ink);
  color: rgba(255, 255, 255, .55);
  font-size: .82rem;
  padding: 1.6rem 2rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Auth pages
   -------------------------------------------------------------------------- */

.auth-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-aside {
  background: var(--gradient);
  color: #fff;
  padding: 3rem 3.2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.auth-aside::before {
  content: '';
  position: absolute;
  inset: auto auto -20% -10%;
  width: 70%; height: 90%;
  background-image: repeating-linear-gradient(115deg,
    rgba(255, 255, 255, .06) 0 28px, transparent 28px 64px);
  pointer-events: none;
}
/* The mark on a sign-in page. Height drives it and width follows, so a wide
   lockup and a square college crest are both drawn at their own shape rather
   than forced into one box; max-width only catches a very long lockup. */
.auth-aside .aside-logo {
  height: 46px; width: auto; max-width: 270px; object-fit: contain; display: block;
  align-self: flex-start; margin-bottom: 2rem; position: relative;
}
/* An institute's own logo sits on a white tile, because most are drawn for
   white paper and vanish on a dark panel. It is allowed to be taller than
   the portal's lockup: a crest is nearly square, so the same height reads
   as half the size. */
.auth-aside .aside-logo.aside-own {
  height: 62px; max-width: 250px; padding: .55rem .8rem; border-radius: 10px;
}
@media (max-width: 720px) {
  .auth-aside .aside-logo { height: 38px; margin-bottom: 1.2rem; }
  .auth-aside .aside-logo.aside-own { height: 52px; }
}
.auth-aside h2 { color: #fff; font-size: 1.5rem; position: relative; }
.auth-aside p { color: rgba(255, 255, 255, .78); position: relative; max-width: 40ch; }
.auth-aside ul { list-style: none; padding: 0; margin: 1.4rem 0 0; position: relative; }
.auth-aside li {
  display: flex; gap: .6rem; align-items: flex-start;
  font-size: .88rem; color: rgba(255, 255, 255, .82); margin-bottom: .7rem;
}
.auth-aside li::before {
  content: ''; flex: 0 0 15px; width: 15px; height: 15px; margin-top: .22rem;
  background: var(--gold);
  -webkit-mask: var(--tick) center / 15px 15px no-repeat;
  mask: var(--tick) center / 15px 15px no-repeat;
}

.auth-main {
  display: flex; align-items: center; justify-content: center;
  padding: 2.5rem 2rem; background: #fff;
}
.auth-box { width: 100%; max-width: 380px; }

.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; margin-bottom: 1.3rem; }
.role-opt {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .6rem;
  text-align: center;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-mute);
  background: #fff;
  transition: all .15s ease;
}
.role-opt:hover { border-color: var(--brand-bright); }
.role-opt.active {
  border-color: var(--brand);
  background: var(--brand-tint);
  color: var(--brand);
  box-shadow: none;
}
.role-opt small { display: block; font-weight: 400; font-size: .72rem; color: var(--text-faint); }
.role-opt.active small { color: var(--brand); }

/* --------------------------------------------------------------------------
   Test list and question editor
   -------------------------------------------------------------------------- */

.test-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: .6rem;
  position: relative;
  overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease;
}
.test-card:hover { box-shadow: var(--shadow); border-color: #D5D8DE; }
.test-card h3 { font-size: 1.02rem; margin: 0; padding-right: 3rem; }
.test-card .meta { display: flex; flex-wrap: wrap; gap: .4rem; }
.test-card .desc { font-size: .84rem; color: var(--text-mute); margin: 0; }
.test-card .foot {
  display: flex; align-items: center; gap: .6rem;
  padding-top: .8rem; border-top: 1px solid var(--line-soft); margin-top: auto;
}
.test-card .foot .spacer { flex: 1; }

.qcard {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  margin-bottom: .8rem;
  background: #fff;
  position: relative;
}
/* The row of pills and buttons above a question. On a phone there is not
   room for all of it on one line, so it wraps instead of pushing Delete off
   the right edge and dragging the whole page sideways. */
.qcard .qhead { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem;
                flex-wrap: wrap; }
.qcard .qhead .spacer { flex: 1 1 auto; min-width: 0; }
.qcard .qnum {
  font-family: var(--display);
  font-size: .74rem;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  padding: .18rem .5rem;
  border-radius: 5px;
}
.qcard .qhead .spacer { flex: 1; }
.qcard .qtext { font-size: .92rem; font-weight: 500; margin-bottom: .7rem; white-space: pre-wrap; }
.qcard ol.opts { margin: 0; padding-left: 1.15rem; font-size: .85rem; color: var(--text-mute); }
.qcard ol.opts li { margin-bottom: .22rem; }
.qcard ol.opts li.right { color: var(--good); font-weight: 600; }

/* Segmented chips on a grey track, as in the reference, rather than an
   underlined row. The track is what tells you the set is one control. */
.tabs {
  display: inline-flex;
  gap: .2rem;
  background: var(--track);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .22rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
  max-width: 100%;
}
.tab {
  padding: .4rem .85rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-mute);
  border: 1px solid transparent;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--body);
  transition: background .14s ease, color .14s ease;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
  font-weight: 600;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .22s ease; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.code-preview {
  font-family: var(--mono);
  font-size: .8rem;
  background: var(--ink);
  color: #CBD9EA;
  padding: .8rem 1rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  white-space: pre;
  margin: 0;
}

/* Provider picker on the AI settings page */
.provider-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
}
.provider-opt {
  display: block;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .8rem .9rem;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
  margin-bottom: 0;
}
.provider-opt:hover { border-color: var(--brand-bright); background: #FAFCFE; }
.provider-opt.active {
  border-color: var(--brand);
  background: var(--brand-tint);
  box-shadow: 0 0 0 3px rgba(21, 82, 162, .1);
}
.provider-opt b { font-size: .88rem; color: var(--ink); }
.provider-opt .small { display: block; margin-top: .3rem; line-height: 1.5; }

@media (max-width: 620px) {
  .provider-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Numbered student guide on the public page */
.guide-list {
  list-style: none;
  counter-reset: guide;
  padding: 0;
  margin: 0;
}
.guide-list li {
  counter-increment: guide;
  position: relative;
  padding: 0 0 1.25rem 3.2rem;
  font-size: .92rem;
  line-height: 1.68;
  color: var(--text-mute);
  border-left: 2px solid var(--line);
  margin-left: 1.05rem;
}
.guide-list li:last-child { border-left-color: transparent; padding-bottom: 0; }
.guide-list li::before {
  content: counter(guide, decimal-leading-zero);
  position: absolute;
  left: -1.07rem;
  top: -.1rem;
  width: 2.1rem; height: 2.1rem;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--gradient-soft);
  color: #fff;
  font-family: var(--display);
  font-size: .74rem;
  font-weight: 700;
}
.guide-list li b { color: var(--ink); font-weight: 600; display: block; margin-bottom: .12rem; }

@media (max-width: 620px) {
  .guide-list li { padding-left: 2.7rem; }
}

.empty {
  text-align: center;
  padding: 2.8rem 1.4rem;
  color: var(--text-mute);
}
.empty .ico {
  width: 54px; height: 54px;
  margin: 0 auto 1rem;
  border-radius: 15px;
  background: var(--brand-tint);
  color: var(--brand);
  display: grid; place-items: center;
}
.empty h3 { color: var(--text); }
.empty p { font-size: .87rem; max-width: 42ch; margin: 0 auto 1.1rem; }

/* --------------------------------------------------------------------------
   Exam runner
   -------------------------------------------------------------------------- */

.exam-body { background: #EEF3F9; }

.exam-bar {
  background: var(--ink);
  color: #fff;
  padding: .7rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  position: sticky;
  top: 0;
  z-index: 40;
}
.exam-bar .exam-logo { height: 24px; width: auto; display: block; }
/* An institute with no logo gets its name, set to read as a mark would. */
.exam-bar .exam-brand {
  font-family: var(--display); font-weight: 700; font-size: .92rem;
  letter-spacing: .01em; color: #fff; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 11rem;
}
@media (max-width: 480px) { .exam-bar .exam-brand { max-width: 7rem; font-size: .84rem; } }
.exam-bar .title { font-family: var(--display); font-weight: 600; font-size: .95rem; }
.exam-bar .spacer { flex: 1; }
.exam-bar .save-note { font-size: .74rem; color: rgba(255, 255, 255, .5); }

.timer {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: .01em;
  background: rgba(255, 255, 255, .1);
  padding: .38rem .8rem;
  border-radius: 8px;
}
.timer.warn { background: rgba(232, 176, 75, .2); color: var(--gold); }
.timer.critical { background: rgba(193, 59, 59, .25); color: #FF9E9E; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .58; } }

.exam-progress { height: 4px; background: rgba(255, 255, 255, .12); }
.exam-progress .fill {
  height: 100%;
  background-image: repeating-linear-gradient(115deg,
    var(--gold) 0 10px, var(--gold-deep) 10px 18px);
  transition: width .4s ease;
}

.exam-grid {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 1.3rem;
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.3rem 1.4rem 3rem;
  align-items: start;
}

.qnav { position: sticky; top: 74px; }
.qnav .card { padding: 1rem; }
.qnav-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .38rem; }
.qnav-btn {
  aspect-ratio: 1;
  border: 1.5px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-family: var(--display);
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-mute);
  cursor: pointer;
  transition: all .13s ease;
}
.qnav-btn:hover { border-color: var(--brand-bright); }
.qnav-btn.answered { background: var(--good-tint); border-color: #9FD9C4; color: var(--good); }
.qnav-btn.current { background: var(--brand); border-color: var(--brand); color: #fff; }
.qnav-legend { font-size: .74rem; color: var(--text-mute); margin-top: .8rem; }
.qnav-legend span { display: flex; align-items: center; gap: .4rem; margin-bottom: .25rem; }
.qnav-legend i { width: 11px; height: 11px; border-radius: 3px; display: block; }

.q-stage { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.q-stage-head {
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: .7rem;
}
.q-stage-body { padding: 1.4rem; }
.q-stage-foot {
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: .7rem;
  background: #FAFCFE;
  border-radius: 0 0 var(--radius) var(--radius);
}
.q-stage-foot .spacer { flex: 1; }

.q-panel { display: none; }
.q-panel.active { display: block; }
.q-prompt { font-size: 1.02rem; line-height: 1.65; white-space: pre-wrap; margin-bottom: 1.2rem; }

.opt-row {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  padding: .85rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: .55rem;
  cursor: pointer;
  transition: all .14s ease;
  font-size: .92rem;
}
.opt-row:hover { border-color: var(--brand-bright); background: #FAFCFE; }
.opt-row.selected { border-color: var(--brand); background: var(--brand-tint); }
.opt-row input { margin-top: .28rem; accent-color: var(--brand); }
.opt-row .letter {
  font-family: var(--display);
  font-weight: 700;
  font-size: .8rem;
  color: var(--brand);
  min-width: 18px;
}

.editor-wrap { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.editor-bar {
  background: var(--ink);
  color: rgba(255, 255, 255, .7);
  padding: .45rem .85rem;
  font-family: var(--mono);
  font-size: .74rem;
  display: flex; align-items: center; gap: .55rem;
}
.editor-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: #3C5A7D; }
.editor-bar .spacer { flex: 1; }
.CodeMirror { height: 400px; font-family: var(--mono) !important; font-size: 13.5px; }

/* --------------------------------------------------------------------------
   Practical answers: the work itself, uploaded
   The brief is read, the work is done elsewhere, and what comes back is a set
   of files. So the panel is a list of what has been handed in, with the one
   control that adds to it and one that takes away — nothing that could be
   mistaken for a place to do the work.
   -------------------------------------------------------------------------- */
.prac { display: flex; flex-direction: column; gap: .85rem; }
.prac-note {
  background: var(--brand-tint); border: 1px solid rgba(21, 82, 162, .18);
  border-radius: var(--radius-sm); padding: .7rem .9rem;
  font-size: .86rem; line-height: 1.5; color: var(--text);
}
.prac-note b { display: block; margin-bottom: .15rem; }
.prac-note b.prac-only { margin: .4rem 0 0; color: var(--good); }
.prac-label { font-size: .84rem; font-weight: 600; color: var(--text); }
.prac-label .muted { font-weight: 400; color: var(--text-mute); }

.prac-drop {
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  padding: .9rem 1rem; background: var(--surface);
}

.prac-files { list-style: none; margin: 0; padding: 0;
              display: flex; flex-direction: column; gap: .4rem; }
.prac-files:empty { display: none; }
.prac-files li {
  display: flex; align-items: center; gap: .6rem; min-width: 0;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .5rem .6rem;
}
.prac-kind {
  flex: 0 0 auto; font-size: .68rem; font-weight: 800; letter-spacing: .04em;
  background: var(--good-tint); color: var(--good);
  border-radius: 3px; padding: .18rem .4rem; white-space: nowrap;
}
.prac-name {
  min-width: 0; flex: 1 1 auto; font-size: .86rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.prac-x {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--card);
  color: var(--text-mute); border-radius: 4px; cursor: pointer;
  width: 26px; height: 26px; font-size: 1.05rem; line-height: 1;
}
.prac-x:hover { border-color: var(--bad); color: var(--bad); background: var(--bad-tint); }

.prac-msg { color: var(--text-mute); }
.prac-msg.bad { color: var(--bad); font-weight: 600; }

/* The teacher's side: what was handed in, shown with the marked answer. */
.work-grid {
  display: grid; gap: .7rem; margin-top: .7rem;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.work-item {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--card); display: block;
  color: inherit; text-decoration: none;
}
.work-item img { display: block; width: 100%; height: 112px; object-fit: cover; background: var(--surface); }
.work-item .pdfish {
  height: 112px; display: grid; place-items: center; background: var(--surface);
  font-size: .78rem; font-weight: 700; color: var(--text-mute);
}
.work-item .cap {
  padding: .4rem .5rem; font-size: .74rem; color: var(--text-mute);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.work-item:hover { border-color: var(--brand); }

.await-review {
  margin: .7rem 0 .4rem; padding: .7rem .9rem;
  background: var(--warn-tint); border: 1px solid rgba(183, 128, 31, .35);
  border-radius: var(--radius-sm); font-size: .86rem; line-height: 1.5;
}
.await-review b { display: block; color: var(--warn-deep, #8A5F10); margin-bottom: .1rem; }
.await-acts { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-top: .6rem; }
.await-acts form { margin: 0; }

/* The link a teacher sends out, and the reminder that a live paper is still
   theirs to change. Both only appear once a paper is published. */
/* The share card. This is the one thing a teacher needs the moment a paper
   goes live, so the link is the loudest thing on it: a single field running
   the full width with Copy attached to its end, and the access code demoted
   to a second row for the people who would rather type it. */
.send {
  background: linear-gradient(180deg, #F7FAFD 0%, #FFFFFF 100%);
  border: 1px solid #CFDEF1;
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem 1.1rem;
  margin-bottom: 1.1rem;
}
.send-head { display: flex; align-items: flex-start; gap: .8rem; margin-bottom: .95rem; }
.send-head h2 { margin: 0; font-size: 1.05rem; letter-spacing: -.015em; }
.send-head p { margin: .2rem 0 0; font-size: .87rem; color: var(--text-mute); max-width: 72ch; }
.send-ico {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
}
.send-ico svg { width: 17px; height: 17px; }

.send-link { display: flex; align-items: stretch; gap: .5rem; flex-wrap: wrap; }
.send-link input {
  flex: 1 1 320px;
  min-width: 0;
  font-family: var(--mono);
  font-size: .92rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #C7D8EE;
  border-radius: 9px;
  padding: .6rem .8rem;
}
.send-link .btn { flex: 0 0 auto; }
.send-link .btn svg { width: 14px; height: 14px; }

.send-alt {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  margin-top: .9rem; padding-top: .8rem;
  border-top: 1px solid #DEE9F6;
}
.send-alt .spacer { flex: 1; }
.send-alt-label { font-size: .82rem; color: var(--text-mute); }
.send-code {
  font-family: var(--mono); font-size: .95rem; font-weight: 600;
  letter-spacing: .04em; color: var(--ink);
  background: #fff; border: 1px solid #C7D8EE; border-radius: 7px;
  padding: .26rem .6rem;
}
.send-fine {
  font-size: .79rem; color: var(--text-mute); line-height: 1.5;
  flex: 1 1 340px; min-width: 240px; text-align: right;
}
@media (max-width: 760px) {
  .send-fine { text-align: left; flex-basis: 100%; }
  .send-link input { flex-basis: 100%; }
}
.still-editable {
  display: block; margin-bottom: 1.1rem; padding: .7rem .95rem;
  background: var(--brand-tint); border: 1px solid rgba(21, 82, 162, .18);
  border-radius: var(--radius-sm); font-size: .86rem; line-height: 1.55;
}
.still-editable b { display: block; margin-bottom: .1rem; }
.still-editable a { font-weight: 600; }

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.pager {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  margin-top: .4rem;
  border-top: 1px solid var(--line-soft);
  font-size: .84rem;
}
.pager-count { color: var(--text-mute); }
.pager-count b { color: var(--text); font-weight: 600; }

.pager-size { display: flex; align-items: center; gap: .45rem; }
.pager-size label {
  margin: 0;
  font-size: .78rem;
  color: var(--text-mute);
  font-weight: 500;
}
.pager-size select {
  width: auto;
  padding: .3rem 1.7rem .3rem .6rem;
  font-size: .82rem;
}

.pager-nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 .55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  font-size: .82rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .13s ease, background .13s ease;
}
.pager-btn:hover { border-color: var(--brand-bright); background: var(--brand-tint); color: var(--brand); }
.pager-btn.current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
}
.pager-btn.current:hover { background: var(--brand); color: #fff; }
.pager-btn.off { opacity: .4; pointer-events: none; }
.pager-gap { color: var(--text-faint); padding: 0 .2rem; }

@media (max-width: 620px) {
  .pager { gap: .7rem; }
  .pager-nav { margin-left: 0; width: 100%; }
  .pager-count { width: 100%; }
}

/* --------------------------------------------------------------------------
   Exam integrity
   -------------------------------------------------------------------------- */

.guard-strip {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: #2A1A08;
  color: #F0C46E;
  font-size: .81rem;
  font-weight: 500;
  padding: .5rem 1.4rem;
  border-bottom: 1px solid rgba(232, 176, 75, .25);
}
.guard-strip svg { flex: 0 0 15px; }
.guard-strip b {
  margin-left: auto;
  font-size: .74rem;
  background: rgba(232, 176, 75, .16);
  padding: .18rem .6rem;
  border-radius: 100px;
  white-space: nowrap;
}
.guard-strip b.spent { background: rgba(193, 59, 59, .28); color: #FFBDBD; }

.guard-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 24, 46, .82);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.guard-overlay.open { display: flex; animation: guardIn .2s ease; }
@keyframes guardIn { from { opacity: 0; } to { opacity: 1; } }

.guard-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 2.2rem 2rem;
  max-width: 460px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border-top: 5px solid var(--gold);
}
.guard-box.fatal { border-top-color: var(--bad); }
.guard-icon {
  width: 58px; height: 58px;
  border-radius: 17px;
  margin: 0 auto 1.1rem;
  display: grid; place-items: center;
  background: var(--warn-tint);
  color: var(--warn);
}
.guard-box.fatal .guard-icon { background: var(--bad-tint); color: var(--bad); }
.guard-box h2 { font-size: 1.3rem; margin-bottom: .6rem; }
.guard-box p { font-size: .92rem; color: var(--text-mute); margin-bottom: 1.4rem; }

@media (max-width: 620px) {
  .guard-strip { font-size: .75rem; padding: .5rem 1rem; flex-wrap: wrap; }
  .guard-strip b { margin-left: 0; }
}

/* --------------------------------------------------------------------------
   Results
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   The mark.

   This is the only place in the portal that raises its voice. A candidate's
   term lands on this number, so it gets the size, the depth and the colour,
   and every panel beneath it stays flat and quiet by comparison. The old
   version put diagonal stripes behind it — wallpaper that said nothing. What
   is behind it now is a glow thrown by the dial itself, so the decoration
   comes from the subject rather than being applied to it.
   -------------------------------------------------------------------------- */

.score-hero {
  /* One field, not two. An even diagonal ran out at bright blue on the right,
     which with the glow on the left split the panel into a lit half and an
     empty slab. The brand blue is a wash in the far corner now; the navy
     holds the rest, and the dial's own light is the only bright thing. */
  background:
    radial-gradient(70% 120% at 13% 50%, rgba(47, 191, 134, .26) 0%, transparent 58%),
    radial-gradient(85% 130% at 108% 115%, rgba(21, 82, 162, .85) 0%, transparent 62%),
    linear-gradient(120deg, #081A33 0%, #0C2850 60%, #12356A 100%);
  background-color: #0C2850;
  color: #fff;
  border-radius: 18px;
  padding: 2.1rem 2.3rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2.4rem;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.score-hero.is-fail {
  background:
    radial-gradient(70% 120% at 13% 50%, rgba(255, 138, 138, .22) 0%, transparent 58%),
    radial-gradient(85% 130% at 108% 115%, rgba(21, 82, 162, .85) 0%, transparent 62%),
    linear-gradient(120deg, #081A33 0%, #0C2850 60%, #12356A 100%);
}

.score-dial {
  width: 164px; height: 164px;
  position: relative;
  display: grid; place-items: center;
  flex: 0 0 164px;
}
.score-dial svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.score-read { position: relative; text-align: center; }
.score-dial .n {
  font-family: var(--display);
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: .95;
  font-variant-numeric: tabular-nums;
}
.score-dial .n small { font-size: 1.1rem; font-weight: 500; letter-spacing: 0; opacity: .7; }
.score-dial .of {
  margin-top: .3rem;
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, .62);
}

.score-say { position: relative; min-width: 0; }
/* The verdict is a fact, so it is stated as one: a solid chip, not a tinted
   word floating above a heading. */
.verdict {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .2rem .6rem .2rem .5rem;
  border-radius: 99px;
  font-size: .75rem; font-weight: 600; letter-spacing: .01em;
  background: rgba(47, 191, 134, .18);
  color: #8FEFC4;
  box-shadow: inset 0 0 0 1px rgba(143, 239, 196, .3);
}
.is-fail .verdict { background: rgba(255, 138, 138, .16); color: #FFB7B7;
                    box-shadow: inset 0 0 0 1px rgba(255, 183, 183, .3); }
.verdict svg { width: 13px; height: 13px; }

.score-hero h2 {
  color: #fff;
  font-size: 1.55rem;
  letter-spacing: -.025em;
  margin: .6rem 0 .5rem;
}
.score-hero .marks {
  display: flex; flex-wrap: wrap; gap: .5rem 1.1rem;
  font-size: .86rem;
  color: rgba(255, 255, 255, .72);
  font-variant-numeric: tabular-nums;
}
.score-hero .marks span { display: inline-flex; align-items: center; }
/* A separator drawn rather than typed, so it never has to be a middle dot. */
.score-hero .marks span + span::before {
  content: ''; width: 1px; height: 11px;
  background: rgba(255, 255, 255, .26);
  margin-right: 1.1rem;
}
.score-hero .say {
  margin: .9rem 0 0;
  color: rgba(255, 255, 255, .86);
  font-size: .93rem;
  line-height: 1.65;
  max-width: 76ch;
}

@media (max-width: 760px) {
  .score-hero { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; padding: 1.5rem; }
  .score-dial { width: 132px; height: 132px; }
  .score-dial .n { font-size: 2.4rem; }
}

.report-list { list-style: none; padding: 0; margin: 0; }
.report-list li {
  display: flex; gap: .6rem; align-items: flex-start;
  font-size: .88rem; margin-bottom: .55rem; color: var(--text);
}
/* The default marker is a quiet dot, because most of these lists state facts
   — how the queue works, where a track appears. A tick means "achieved", and
   putting one beside a neutral sentence tells the reader something untrue.
   The two lists that ARE a verdict ask for their own mark. */
.report-list li::before {
  content: '';
  flex: 0 0 15px; width: 15px; height: 15px; margin-top: .14rem;
  background: currentColor;
  color: var(--text-faint);
  -webkit-mask: var(--dot) center / 15px 15px no-repeat;
  mask: var(--dot) center / 15px 15px no-repeat;
}
.report-list.did li::before {
  color: var(--good);
  -webkit-mask-image: var(--tick); mask-image: var(--tick);
}
.report-list.warn li::before {
  color: var(--gold);
  -webkit-mask-image: var(--rise); mask-image: var(--rise);
}

.review-item {
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.05rem 1.15rem;
  margin-bottom: .85rem;
  background: #fff;
}
.review-item.right { border-left-color: var(--good); }
.review-item.partial { border-left-color: var(--gold); }
.review-item.wrong { border-left-color: var(--bad); }
.review-item .rhead { display: flex; align-items: center; gap: .6rem; margin-bottom: .55rem; }
.review-item .rhead .spacer { flex: 1; }
.review-item .prompt { font-size: .92rem; font-weight: 500; margin-bottom: .7rem; white-space: pre-wrap; }
.review-item .given { font-size: .85rem; margin-bottom: .55rem; }
.review-item .given b { color: var(--text-mute); font-weight: 600; }
.feedback-box {
  background: var(--brand-tint);
  border-radius: var(--radius-sm);
  padding: .7rem .9rem;
  font-size: .85rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.feedback-box.script { white-space: pre-wrap; }
.feedback-box .who {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: .2rem;
}

.grading-state { text-align: center; padding: 3rem 1.5rem; }
.spinner {
  width: 44px; height: 44px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  margin: 0 auto 1.1rem;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   Assistant (Edi)
   -------------------------------------------------------------------------- */

.edi-launch {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 60;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(21, 82, 162, .3);
  display: grid; place-items: center;
  transition: transform .18s ease;
}
.edi-launch:hover { background: #104487; }
.edi-launch svg { width: 20px; height: 20px; }

.edi-panel {
  position: fixed;
  right: 22px; bottom: 80px;
  z-index: 61;
  width: 372px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 130px);
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
}
.edi-panel.open { display: flex; animation: ediIn .22s ease; }
@keyframes ediIn {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.edi-head {
  background: var(--brand);
  color: #fff;
  padding: .7rem .9rem;
  display: flex; align-items: center; gap: .7rem;
  position: relative;
  overflow: hidden;
}
.edi-head::after {
  content: '';
  position: absolute; inset: 0 -20% 0 auto; width: 40%;
  background-image: repeating-linear-gradient(115deg,
    rgba(255, 255, 255, .07) 0 12px, transparent 12px 26px);
  pointer-events: none;
}
.edi-head .badge {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--gold); color: var(--ink);
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: .85rem;
  position: relative;
}
.edi-head .n { font-family: var(--display); font-weight: 700; font-size: .93rem; position: relative; }
.edi-head .s { font-size: .72rem; color: rgba(255, 255, 255, .68); position: relative; }
.edi-head .spacer { flex: 1; }
.edi-head button {
  background: rgba(255, 255, 255, .14); border: none; color: #fff;
  width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
  position: relative; z-index: 2; display: grid; place-items: center;
}
.edi-head button svg { pointer-events: none; }
.edi-head button:hover { background: rgba(255, 255, 255, .25); }

.edi-log { flex: 1; overflow-y: auto; padding: 1rem; background: var(--surface); }
.edi-msg { max-width: 86%; margin-bottom: .7rem; font-size: .86rem; line-height: 1.55; }
.edi-msg .bubble { padding: .65rem .85rem; border-radius: 13px; white-space: pre-wrap; }
.edi-msg.bot .bubble { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.edi-msg.me { margin-left: auto; }
.edi-msg.me .bubble { background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }

.edi-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .6rem; }
.edi-chip {
  font-size: .76rem; font-weight: 500;
  padding: .32rem .65rem;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 100px;
  cursor: pointer;
  color: var(--brand);
  font-family: var(--body);
}
.edi-chip:hover { background: var(--brand-tint); }

.edi-form { display: flex; gap: .5rem; padding: .8rem; border-top: 1px solid var(--line); background: #fff; }
.edi-form input { flex: 1; }
.edi-form button {
  width: 36px; flex: 0 0 36px;
  border: none; border-radius: var(--radius-sm);
  background: var(--brand); color: #fff;
  cursor: pointer; display: grid; place-items: center;
}
.edi-form button:disabled { opacity: .5; }

.typing { display: flex; gap: .22rem; padding: .55rem 0; }
.typing i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--text-faint);
  animation: bounce 1.1s ease-in-out infinite;
}
.typing i:nth-child(2) { animation-delay: .16s; }
.typing i:nth-child(3) { animation-delay: .32s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-5px); } }

/* --------------------------------------------------------------------------
   Utilities and responsive
   -------------------------------------------------------------------------- */

.row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.row-tight { gap: .35rem; }
.spacer { flex: 1; }
.muted { color: var(--text-mute); }
.small { font-size: .86rem; }
.tiny { font-size: .78rem; }
.center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: .6rem; }
.mb-2 { margin-bottom: 1.1rem; }
.mb-3 { margin-bottom: 1.7rem; }
.mt-1 { margin-top: .6rem; }        /* the set was missing its first step */
.mt-2 { margin-top: 1.1rem; }
.mt-3 { margin-top: 1.7rem; }
.strong { font-weight: 600; }

@media (max-width: 1080px) {
  .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-sidebar { grid-template-columns: minmax(0, 1fr); }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 2.2rem; }
  .exam-grid { grid-template-columns: minmax(0, 1fr); }
  .qnav { position: static; }
  .qnav-grid { grid-template-columns: repeat(10, 1fr); }
}

/* The bar can hold the six group names down to about this width. Below it
   the whole thing becomes a drawer, and the groups stop being drop-downs —
   on a touch screen there is nothing to hover, so every destination is
   listed open. */
@media (max-width: 980px) {
  .menu-btn { display: grid; place-items: center; order: -1; }
  .tn-nav {
    position: fixed;
    left: 0; top: 0; bottom: 0; width: 272px;
    z-index: 70;
    display: block;
    overflow-y: auto;
    background: #fff;
    border-right: 1px solid var(--line);
    padding: 1rem .7rem;
    transform: translateX(-100%);
    transition: transform .24s ease;
    box-shadow: var(--shadow-lg);
  }
  .tn-nav.open { transform: translateX(0); }
  .tn-link { display: flex; width: 100%; justify-content: flex-start; }
  .tn-link.on::after, .tn-group.on > .tn-link::after { display: none; }
  .tn-link.on, .tn-group.on > .tn-link { background: var(--brand); color: #fff; }
  .tn-link.on > svg:first-child { opacity: 1; }
  .tn-group { display: block; }
  .tn-group > .tn-link svg { display: none; }
  .tn-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    border: none; box-shadow: none; padding: 0 0 .5rem .55rem;
    min-width: 0; background: none;
  }
  .tn-menu a { font-size: .86rem; color: var(--text-mute); }
  .tn-who { display: none; }
  .tn-drawer-foot {
    display: block; margin-top: .9rem; padding-top: .7rem;
    border-top: 1px solid var(--line-soft);
  }
  .tn-drawer-foot a {
    display: block; padding: .45rem .72rem; border-radius: 8px;
    font-size: .89rem; color: var(--text);
  }
  .tn-me { display: none; }
  .tn-name { max-width: 120px; }
}

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr); }
  .auth-aside { display: none; }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .shell { padding: 0; }
  .app-sheet { border: none; border-radius: 0; box-shadow: none; min-height: 100vh; }
  .content, .subbar, .topnav, .sheet-foot { padding-left: 1rem; padding-right: 1rem; }
  .flashes { padding-left: 1rem; padding-right: 1rem; }
  .tn-actions .btn { padding: .4rem .7rem; font-size: .83rem; }
  .score-hero { grid-template-columns: minmax(0, 1fr); text-align: center; justify-items: center; }
}

@media (max-width: 620px) {
  .grid-2, .grid-4, .grid-5, .field-row { grid-template-columns: minmax(0, 1fr); }
  .hero-stats { gap: 1.3rem; }
  .qnav-grid { grid-template-columns: repeat(6, 1fr); }
  .edi-panel { right: 12px; left: 12px; width: auto; bottom: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .topnav, .subbar, .sheet-foot, .edi-launch, .edi-panel, .btn { display: none !important; }
  .app-sheet { border: none; box-shadow: none; }
  body { background: #fff; }
  .content { padding: 0; }
}

/* --------------------------------------------------------------------------
   AI settings: provider chain
   -------------------------------------------------------------------------- */

.chain { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.chain-step {
  display: inline-flex; align-items: center; gap: .4rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .25rem .6rem; font-size: .9rem; background: #fff;
}
.chain-step b {
  display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: .72rem; font-weight: 600;
}
.chain-arrow { color: var(--text-faint); }

.provider-table td { vertical-align: top; }
.provider-table tr.row-off td { color: var(--text-mute); }
.provider-table tr.edit-row td { background: #FAFBFD; border-bottom: 1px solid var(--line); }
.edit-form { padding: .4rem 0 .2rem; }
.order-btns { display: flex; gap: .25rem; }
.order-btns form { margin: 0; }
.icon-mini {
  width: 24px; height: 24px; border: 1px solid var(--line); background: #fff;
  border-radius: 4px; cursor: pointer; color: var(--text); font-size: .85rem; line-height: 1;
}
.icon-mini:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.icon-mini:disabled { opacity: .35; cursor: default; }
.provider-table form[style*="inline"] { margin: 0; }

/* --------------------------------------------------------------------------
   Product mark, tracks admin, question types
   -------------------------------------------------------------------------- */

.product-mark { font-size: .74rem; color: var(--text-faint); padding: .5rem .65rem 0; }
.product-mark b { color: var(--text-mute); font-weight: 600; }
.footer .product-line { margin-top: .35rem; color: rgba(255, 255, 255, .7); }
.footer .product-line b { color: #fff; font-weight: 600; }
.auth-product { margin-top: 1.4rem; font-size: .8rem; color: var(--text-faint); text-align: center; }
.auth-product b { color: var(--text-mute); }

.track-desc { color: var(--text-mute); font-size: .88rem; max-width: 60ch; }
.inline-edit { display: grid; gap: .6rem; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; align-items: start; }
@media (max-width: 760px) { .inline-edit { grid-template-columns: minmax(0, 1fr); } }

.qcard ol.opts li.right::marker { color: var(--good); }
.key-note { font-size: .8rem; color: var(--text-mute); }
.opt-row.multi input { accent-color: var(--brand); }
.fill-input { max-width: 520px; }
.pill.type { background: var(--line-soft); color: var(--text); }
.pill.type.coding { background: var(--ink); color: #fff; }
.examiner-note {
  margin-top: .5rem; padding: .5rem .75rem; border-radius: var(--radius-sm);
  background: var(--warn-tint); color: #7A5412; font-size: .84rem;
}
.opt-list { margin: 0 0 .7rem; padding-left: 1.15rem; font-size: .9rem; }
.opt-list li { margin-bottom: .2rem; }
.opt-list li.key { color: var(--good); font-weight: 600; }
.option-editor .row { flex-wrap: nowrap; }
.answer-text {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .6rem .8rem; white-space: pre-wrap; font-size: .92rem; line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Icons, reports
   -------------------------------------------------------------------------- */

svg.i { flex: 0 0 auto; vertical-align: -3px; }
.btn svg.i { width: 15px; height: 15px; }
.btn-icon {
  display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; color: var(--text);
}
.btn-icon:hover { color: var(--ink); border-color: #D5D8DE; background: var(--surface); }
.btn-icon.pdf:hover { color: #C0392B; border-color: #F0C6C0; background: #FBEAE8; }
.btn-icon.cert:hover { color: #9A6B00; border-color: #EBD9A8; background: #FDF3E1; }
.btn-icon[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.row-actions { display: inline-flex; gap: .3rem; }

.stat { display: flex; align-items: center; gap: .8rem; }
.stat .stat-ico {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px;
  display: grid; place-items: center; background: var(--track); color: var(--text-mute);
}
.stat.gold .stat-ico { background: var(--track); color: var(--text-mute); }
.stat .stat-body { min-width: 0; }

.tabs-bar {
  display: inline-flex; gap: .2rem; flex-wrap: wrap; max-width: 100%;
  background: var(--track); border: 1px solid var(--line);
  border-radius: 10px; padding: .22rem; margin-bottom: 1.1rem;
}
.tabs-bar a {
  display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .85rem;
  color: var(--text-mute); font-weight: 500; border-radius: 8px;
  border: 1px solid transparent; font-size: .85rem;
}
.tabs-bar a:hover { color: var(--text); }
.tabs-bar a.on { color: var(--ink); background: #fff; border-color: var(--line); font-weight: 600; }

.filter-bar {
  display: grid; gap: .6rem; align-items: end;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.filter-bar .field { margin: 0; }
.filter-bar label { font-size: .8rem; color: var(--text-mute); display: flex; gap: .3rem; align-items: center; }
.filter-actions { display: flex; gap: .4rem; align-items: center; }
.active-filters { font-size: .84rem; color: var(--text-mute); margin-top: .7rem; display: flex; gap: .4rem; align-items: center; }
.export-group { display: inline-flex; gap: .4rem; }
.btn-excel { background: #1D6F42; border-color: #1D6F42; color: #fff; }
.btn-excel:hover { background: #185C37; border-color: #185C37; color: #fff; }
.btn-pdf { background: #fff; border-color: #E3B7B1; color: #B03A2E; }
.btn-pdf:hover { background: #FBEAE8; color: #962F25; }

.verify-card { max-width: 560px; margin: 3rem auto; }
.verify-ok { border-left: 4px solid var(--good); }
.verify-bad { border-left: 4px solid var(--bad); }
.filter-bar { align-items: end; }
.filter-bar .field > label { margin-bottom: .25rem; min-height: 1.1rem; }
.filter-bar input, .filter-bar select {
  width: 100%; height: 36px; box-sizing: border-box; padding: 0 .6rem;
  border: 1px solid #D4DAE2; border-radius: var(--radius-sm); background-color: #fff;
  font: inherit; font-size: .93rem; color: var(--text);
}
.filter-bar input:focus, .filter-bar select:focus { outline: none; border-color: var(--brand-bright); box-shadow: 0 0 0 2px rgba(46,125,209,.15); }
.filter-actions .btn { height: 36px; }

/* --------------------------------------------------------------------------
   Reports page (v10)
   -------------------------------------------------------------------------- */

.export-label { font-size: .82rem; color: var(--text-mute); margin-right: .2rem; align-self: center; }
.export-group { align-items: center; }

.rp-tabs {
  display: inline-flex; gap: .25rem; padding: .25rem; margin-bottom: 1rem;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
}
.rp-tabs a {
  display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .95rem;
  border-radius: 7px; color: var(--text-mute); font-weight: 500; font-size: .93rem;
}
.rp-tabs a:hover { color: var(--brand); background: var(--surface); }
.rp-tabs a.on { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }

.rp-filters { padding: 0; overflow: hidden; }
.rp-filters-head {
  display: flex; align-items: center; gap: .6rem; padding: .7rem 1.1rem;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.rp-filters-title { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--ink, #0B1B33); }
.rp-count {
  font-size: .78rem; font-weight: 600; color: var(--brand); background: var(--brand-tint);
  padding: .12rem .55rem; border-radius: 999px;
}
.rp-clear { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; color: var(--text-mute); }
.rp-clear:hover { color: var(--bad, #C0392B); }

.rp-grid {
  display: grid; gap: .8rem 1rem; padding: 1rem 1.1rem 1.1rem;
  grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: end;
}
.rp-field { display: flex; flex-direction: column; gap: .3rem; margin: 0; min-width: 0; }
.rp-field > span {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .78rem; font-weight: 500; color: var(--text-mute); white-space: nowrap;
}
.rp-field select, .rp-field input {
  width: 100%; height: 38px; box-sizing: border-box; padding: 0 .65rem; margin: 0;
  border: 1px solid #D4DAE2; border-radius: 6px; background-color: #fff;
  font: inherit; font-size: .92rem; color: var(--text);
}
.rp-field select:focus, .rp-field input:focus {
  outline: none; border-color: var(--brand-bright); box-shadow: 0 0 0 3px rgba(46, 125, 209, .14);
}
.rp-search { grid-column: span 4; }
.rp-apply { grid-column: span 2; display: flex; }
.rp-apply .btn { width: 100%; height: 38px; justify-content: center; }
.rp-chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1.1rem 1rem; }
.rp-chip {
  font-size: .8rem; padding: .2rem .6rem; border-radius: 999px;
  background: var(--brand-tint); color: var(--brand); border: 1px solid #CFE0F4;
}
@media (max-width: 1100px) {
  .rp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-search, .rp-apply { grid-column: span 2; }
}

.stat { display: flex; align-items: center; gap: .85rem; flex-wrap: wrap; }
.stat > .label { flex: 1 0 100%; }
.stat .stat-ico { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; }

.rp-table { padding: .4rem .4rem .2rem; }
.rp-table th { white-space: nowrap; }
.t-right { text-align: right; }
.who { display: flex; align-items: center; gap: .6rem; }
.avatar {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%;
  display: grid; place-items: center; font-size: .75rem; font-weight: 600;
  background: var(--brand-tint); color: var(--brand);
}
.scorecell { display: flex; align-items: baseline; gap: .35rem; }
.scorecell b { font-size: .98rem; }
.minibar { height: 6px; width: 90px; border-radius: 99px; background: var(--track); margin-top: .3rem; overflow: hidden; }
.minibar span { display: block; height: 100%; border-radius: 99px; }
.minibar .good { background: var(--good, #1E8E5A); }
.minibar .warn { background: #D69E2E; }
.minibar .bad { background: var(--bad, #C0392B); }
.pill svg.i { vertical-align: -2px; }
.btn-excel, .btn-pdf { display: inline-flex; align-items: center; gap: .4rem; }
.rp-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.rp-search { grid-column: span 3; }
.rp-apply { grid-column: span 2; }
.rp-grid.reg { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rp-grid.reg .rp-search, .rp-grid.reg .rp-apply { grid-column: span 2; }
@media (max-width: 1100px) {
  .rp-grid, .rp-grid.reg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-search, .rp-apply, .rp-grid.reg .rp-search, .rp-grid.reg .rp-apply { grid-column: span 2; }
}

/* Turbo page transitions */
.turbo-progress-bar { height: 3px; background: var(--brand); box-shadow: 0 0 6px rgba(21, 82, 162, .4); }
html[aria-busy="true"] .content { opacity: .75; transition: opacity .12s ease; }

/* --------------------------------------------------------------------------
   Phones and the installed app (v12)
   -------------------------------------------------------------------------- */

.topbar-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.topbar-actions:empty { display: none; }
.install-btn { display: none; }
.install-btn.show { display: inline-flex; }

/* Installed app: keep clear of the notch and the home indicator. */
@supports (padding: env(safe-area-inset-top)) {
  .topbar { padding-top: max(.75rem, env(safe-area-inset-top)); }
  .exam-bar { padding-top: max(.6rem, env(safe-area-inset-top)); }
  .content { padding-bottom: max(4rem, calc(env(safe-area-inset-bottom) + 4rem)); }
  .edi-launch { bottom: max(22px, calc(env(safe-area-inset-bottom) + 12px)); }
}

@media (max-width: 860px) {
  /* The question comes first on a phone; the question grid sits under it. */
  .exam-grid .q-stage { order: 1; }
  .exam-grid .qnav { order: 2; }
}

@media (max-width: 620px) {
  /* iOS zooms into any field under 16px; stop that. */
  input, select, textarea { font-size: 16px !important; }

  .topbar { flex-wrap: wrap; row-gap: .6rem; padding-bottom: .7rem; }
  .topbar h1 { font-size: 1.08rem; line-height: 1.25; }
  .topbar .sub { display: none; }
  .topbar-actions { order: 3; width: 100%; }
  .topbar-actions .btn, .topbar-actions form { flex: 1 1 auto; }
  .topbar-actions form .btn { width: 100%; }
  .topbar-actions .btn { justify-content: center; }
  .export-label { display: none; }
  .export-group { width: 100%; display: flex; gap: .5rem; }
  .export-group .btn { flex: 1; }

  .content { padding: .9rem .8rem 5.5rem; }
  .card { padding: .95rem; }
  .card-head { flex-wrap: wrap; gap: .5rem; }

  /* Two small stat tiles per row instead of one tall column. */
  .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .stat { padding: .7rem .75rem; gap: .55rem; align-items: flex-start; }
  .stat .stat-ico { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; }
  .stat .stat-ico svg { width: 15px; height: 15px; }
  .stat .label { font-size: .76rem; }
  .stat .value { font-size: 1.25rem; }
  .stat .value small { display: block; margin: .1rem 0 0; font-size: .7rem; }

  .rp-tabs { display: flex; width: 100%; }
  .rp-tabs a { flex: 1; justify-content: center; padding: .5rem .4rem; font-size: .88rem; }
  .rp-grid, .rp-grid.reg { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .8rem; gap: .6rem; }
  .rp-search, .rp-apply, .rp-grid.reg .rp-search, .rp-grid.reg .rp-apply { grid-column: span 2; }
  .rp-filters-head { padding: .6rem .8rem; }

  /* Report tables become cards: one candidate per block. */
  .rp-table { padding: 0; }
  .rp-table .table-wrap { overflow: visible; }
  .rp-table thead { display: none; }
  .rp-table table, .rp-table tbody { display: block; }
  .rp-table tbody tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem .6rem;
    padding: .8rem .85rem; border-bottom: 1px solid var(--line-soft);
  }
  .rp-table tbody tr:hover { background: transparent; }
  .rp-table tbody td { display: block; padding: 0; border: 0; }
  .rp-results td:nth-child(1), .rp-results td:nth-child(3) { grid-column: 1 / -1; }
  .rp-results td:nth-child(2) { display: none; }
  .rp-results td:nth-child(3) { color: var(--text-mute); }
  .rp-results td:nth-child(5), .rp-results td:nth-child(7) { text-align: right; justify-self: end; }
  .rp-results td:nth-child(5) .tiny { display: none; }
  .rp-register td:nth-child(1), .rp-register td:nth-child(3) { grid-column: 1 / -1; }
  .rp-register td:nth-child(4), .rp-register td:nth-child(5), .rp-register td:nth-child(6) { display: none; }
  .rp-register td:nth-child(8), .rp-register td:nth-child(9) { text-align: right; justify-self: end; }
  .btn-icon { width: 36px; height: 36px; }         /* comfortable to tap */

  .exam-bar { gap: .5rem; }
  .exam-bar .exam-title { font-size: .9rem; }
  .qnav-grid { grid-template-columns: repeat(7, 1fr); }
  .opt-row { padding: .75rem .8rem; }
  .q-foot .btn { flex: 1; justify-content: center; }
}
.side-link.install-btn.show {
  display: flex; width: 100%; border: 0; background: none; cursor: pointer;
  font: inherit; text-align: left; color: var(--brand); font-weight: 500;
}
.side-link.install-btn.show:hover { background: var(--brand-tint); }
.link.install-btn.show { display: inline-flex; color: inherit; }

/* --------------------------------------------------------------------------
   "Get the app" cards (v13)
   -------------------------------------------------------------------------- */

[data-install-card] { display: none; }
[data-install-card].show { display: flex; }

/* Landing hero (dark) and sign-in page (light) */
.app-cta {
  align-items: center; gap: .8rem; margin-top: 1.4rem; max-width: 460px;
  padding: .7rem .75rem .7rem .7rem; border-radius: 14px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(6px);
}
.app-cta-ico {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 11px; background: #fff;
  display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.app-cta-ico img { width: 30px; height: 30px; object-fit: contain; }
.app-cta-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.app-cta-text b { color: #fff; font-size: .98rem; font-weight: 600; }
.app-cta-text span { color: rgba(255, 255, 255, .72); font-size: .8rem; }
.app-cta-btn {
  background: #fff; color: var(--brand); border: 0; font-weight: 600;
  padding: .55rem 1.1rem; border-radius: 9px; white-space: nowrap;
}
.app-cta-btn:hover { background: #E8F0FA; color: var(--brand); }
.app-cta.light { background: var(--brand-tint); border-color: #CFE0F4; margin: 1.2rem 0 0; max-width: none; backdrop-filter: none; }
.app-cta.light .app-cta-text b { color: var(--ink, #0B1B33); }
.app-cta.light .app-cta-text span { color: var(--text-mute); }
.app-cta.light .app-cta-ico { box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.app-cta.light .app-cta-btn { background: var(--brand); color: #fff; }
.app-cta.light .app-cta-btn:hover { background: #104487; }

/* Sidebar card after sign-in */
.app-card {
  position: relative; flex-direction: column; gap: .7rem;
  margin: .9rem .1rem .6rem; padding: .85rem .85rem .8rem; border-radius: 12px;
  background: linear-gradient(140deg, #0B1B33 0%, #1552A2 100%); color: #fff;
  box-shadow: 0 4px 14px rgba(21, 82, 162, .25);
}
.app-card-top { display: flex; align-items: center; gap: .6rem; padding-right: 1rem; }
.app-card-ico {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 9px; background: #fff;
  display: grid; place-items: center;
}
.app-card-ico img { width: 24px; height: 24px; object-fit: contain; }
.app-card-title { font-weight: 600; font-size: .9rem; line-height: 1.2; }
.app-card-text { font-size: .76rem; color: rgba(255, 255, 255, .72); margin-top: .1rem; }
.app-card-btn {
  display: flex; align-items: center; justify-content: center; gap: .4rem; width: 100%;
  padding: .5rem; border: 0; border-radius: 8px; cursor: pointer;
  background: #fff; color: var(--brand); font: inherit; font-weight: 600; font-size: .86rem;
}
.app-card-btn:hover { background: #E8F0FA; }
.app-card-x {
  position: absolute; top: .35rem; right: .45rem; width: 22px; height: 22px;
  border: 0; border-radius: 6px; background: transparent; cursor: pointer;
  color: rgba(255, 255, 255, .6); font-size: 1.05rem; line-height: 1;
}
.app-card-x:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.installed-app [data-install-card] { display: none !important; }

@media (max-width: 620px) {
  .app-cta { max-width: none; }
  .app-cta-text span { font-size: .76rem; }
}
.sidebar .app-card.show { margin-top: auto; }
.sidebar .app-card.show + .side-foot { margin-top: 0; }

/* --------------------------------------------------------------------------
   Camera proctoring (v16)
   -------------------------------------------------------------------------- */

.cam-check {
  display: flex; gap: 1rem; align-items: center; padding: .9rem;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
}
.cam-check-video {
  position: relative; width: 176px; height: 132px; flex: 0 0 176px;
  border-radius: 10px; overflow: hidden; background: #0B1B33;
}
.cam-check-video video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cam-check-empty { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.6); font-size: .85rem; }
.cam-check-body { min-width: 0; }
@media (max-width: 620px) { .cam-check { flex-direction: column; align-items: stretch; } .cam-check-video { width: 100%; height: 200px; flex-basis: auto; } }

.selfcam {
  position: fixed; left: 16px; bottom: 16px; z-index: 60;
  width: 168px; height: 126px; border-radius: 12px; overflow: hidden;
  background: #0B1B33; border: 2px solid #fff; box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.selfcam video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.selfcam-tag {
  position: absolute; left: 6px; top: 6px; display: inline-flex; align-items: center; gap: .3rem;
  font-size: .68rem; font-weight: 600; color: #fff; background: rgba(0,0,0,.55);
  padding: .12rem .45rem; border-radius: 99px;
}
.selfcam-tag i { width: 7px; height: 7px; border-radius: 50%; background: #E5484D; animation: rec 1.4s infinite; }
@keyframes rec { 50% { opacity: .3; } }
@media (max-width: 620px) { .selfcam { width: 104px; height: 78px; left: 10px; bottom: 10px; } }

.cam-block {
  position: fixed; inset: 0; z-index: 200; background: rgba(11, 27, 51, .92);
  display: grid; place-items: center; padding: 1.5rem;
}
.cam-block[hidden] { display: none; }
.cam-block-box { max-width: 440px; background: #fff; border-radius: 14px; padding: 1.6rem; text-align: center; }
.cam-block-box p { color: var(--text-mute); }

/* Live monitor */
.live-toolbar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.live-toolbar select { max-width: 380px; width: 100%; height: 36px; padding: 0 .6rem; border: 1px solid #D4DAE2; border-radius: 6px; font: inherit; }
.live-count { font-size: .85rem; color: var(--text-mute); }
.live-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.live-tile { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.live-shot { position: relative; aspect-ratio: 4 / 3; background: #0B1B33; cursor: zoom-in; }
.live-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.live-shot .ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.65); font-size: .82rem; text-align: center; padding: .5rem; }
.live-badge {
  position: absolute; left: 8px; top: 8px; font-size: .68rem; font-weight: 600; color: #fff;
  padding: .12rem .5rem; border-radius: 99px; background: rgba(0,0,0,.55); display: inline-flex; gap: .3rem; align-items: center;
}
.live-badge.live i { width: 7px; height: 7px; border-radius: 50%; background: #3DD68C; }
.live-badge.warn { background: #B7791F; }
.live-badge.bad { background: #C0392B; }
.live-timer { position: absolute; right: 8px; top: 8px; font-size: .72rem; font-weight: 600; color: #fff; background: rgba(0,0,0,.55); padding: .12rem .45rem; border-radius: 6px; }
.live-meta { padding: .55rem .7rem .65rem; }
.live-meta .strong { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-meta .tiny { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-foot { display: flex; justify-content: space-between; align-items: center; margin-top: .35rem; font-size: .78rem; color: var(--text-mute); }
.live-flag { color: #C0392B; font-weight: 600; }
.live-zoom { position: fixed; inset: 0; z-index: 150; background: rgba(11,27,51,.88); display: grid; place-items: center; padding: 1rem; }
.live-zoom[hidden] { display: none; }
.live-zoom img { max-width: min(92vw, 720px); border-radius: 12px; }
.live-zoom .cap { color: #fff; text-align: center; margin-top: .6rem; }

.snap-strip { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.snap-strip a { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #0B1B33; }
.snap-strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.snap-strip span { display: block; font-size: .72rem; color: #fff; padding: .15rem .35rem; background: #0B1B33; }
/* Screen pictures: wider tiles, and the whole screen shown rather than a crop
   of its middle — the point of keeping them is to see everything that was on
   it, and a crop would quietly cut off whatever sat in a corner. */
.snap-wide { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.snap-wide img { aspect-ratio: 16 / 9; object-fit: contain; }

/* The candidate sees a mirror of themselves; the teacher sees the picture the right way round. */

/* Inline question editor (v17) */
.qedit { margin: .4rem 0 .6rem; padding: .9rem; border: 1px solid #CFE0F4; border-radius: 10px; background: #F7FAFE; }
.qedit[hidden] { display: none; }
.qcard.editing { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(21, 82, 162, .08); }
.qcard.editing > .qtext, .qcard.editing > .opt-list, .qcard.editing > .key-note { display: none; }
.qcard:target { box-shadow: 0 0 0 3px rgba(232, 176, 75, .45); }
.build-choice { margin-top: .6rem; padding-top: 1rem; border-top: 1px solid var(--line-soft); }
.build-options { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: .8rem; }
.build-opt {
  display: flex; gap: .6rem; align-items: flex-start; padding: .8rem .9rem; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
}
.build-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.build-opt input { margin-top: .2rem; accent-color: var(--brand); }
.build-opt b { display: block; font-size: .95rem; }
.build-opt small { display: block; color: var(--text-mute); font-size: .8rem; margin-top: .1rem; }
.ai-build { padding: 1rem; border: 1px solid #CFE0F4; border-radius: 10px; background: #F7FAFE; }
.ai-build[hidden] { display: none; }
.ai-counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.ai-count { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 0;
  padding: .4rem .5rem .4rem .7rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: .86rem; }
.ai-count input { width: 64px; text-align: center; }
@media (max-width: 620px) { .build-options { grid-template-columns: 1fr; } }

/* Camera state on the paper page (v18) */
.cam-state { display: flex; align-items: center; gap: .6rem; padding: .6rem .85rem; border-radius: 10px; margin-bottom: 1rem; font-size: .9rem; }
.cam-state.on { background: #E6F4EC; color: #1E6B45; border: 1px solid #BFE3CD; }
.cam-state.off { background: #FDF3E1; color: #7A5412; border: 1px solid #F0DDB5; }
.cam-state span { flex: 1; }
.cam-reason { font-weight: 600; color: #7A5412; background: #FDF3E1; padding: .55rem .7rem; border-radius: 8px; }

/* Recordings (v19) */
.rec-list { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.rec-item { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #0B1B33; }
.rec-item video { width: 100%; aspect-ratio: 4 / 3; display: block; background: #0B1B33; }
.rec-meta { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .5rem .7rem; background: #fff; font-size: .82rem; color: var(--text-mute); }
/* A screen recording is the shape a screen is, and shown whole rather than
   cropped — the corner is exactly where a second window would be. */
.rec-wide video { aspect-ratio: 16 / 10; object-fit: contain; }
#screen-recording .rec-list { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
@media (max-width: 620px) {
  #screen-recording .rec-list { grid-template-columns: minmax(0, 1fr); }
}
.btn-icon.rec:hover { color: #6B46C1; border-color: #D6CCF0; background: #F3EFFC; }
.live-shot img[hidden], .live-shot .ph[hidden] { display: none; }

/* The candidate's screen, under their face.
   A screen is wide and full of small text, so it gets the shape it really is
   (16/9) and is fitted rather than cropped — cropping a screen hides exactly
   the corner somebody would put a second window in. */
.live-screen { aspect-ratio: 16 / 9; border-top: 1px solid rgba(255,255,255,.14); }
.live-screen img { object-fit: contain; background: #0B1B33; }
.live-screen[hidden] { display: none; }
.live-tag {
  position: absolute; left: .4rem; bottom: .35rem; z-index: 2;
  background: rgba(11,27,51,.78); color: #fff; border-radius: 5px;
  padding: .08rem .34rem; font-size: .66rem; letter-spacing: .02em;
}
/* A candidate who stopped sharing is the one thing an invigilator must not
   miss in a grid of forty, so the whole tile is marked, not just the badge. */
.live-tile.screen-off { border-color: #C0392B; box-shadow: 0 0 0 2px rgba(192,57,43,.18); }

/* Screens need more width than faces to stay readable. */
@media (min-width: 900px) {
  .live-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
}

/* --------------------------------------------------------------------------
   Form controls: one modern look for every dropdown and field (v20)
   -------------------------------------------------------------------------- */

select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  min-height: 38px; padding: .45rem 2.3rem .45rem .75rem;
  border: 1px solid #D4DAE2; border-radius: 8px; background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235F6B7A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7rem center; background-size: 16px;
  font: inherit; font-size: .93rem; color: var(--text); cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
  text-overflow: ellipsis;
}
select:hover { border-color: #B9C6D8; background-color: #FCFDFF; }
select:focus {
  outline: none; border-color: var(--brand-bright);
  box-shadow: 0 0 0 3px rgba(46, 125, 209, .16);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231552A2' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
select:disabled { background-color: var(--surface); color: var(--text-faint); cursor: not-allowed; }
select option { font-size: .93rem; padding: .4rem; }
select option[value="none"] { color: #7A5412; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="search"], input[type="date"], input[type="tel"], textarea {
  border-radius: 8px; transition: border-color .15s ease, box-shadow .15s ease;
}
input[type="text"]:hover, input[type="email"]:hover, input[type="password"]:hover,
input[type="number"]:hover, input[type="search"]:hover, input[type="date"]:hover, textarea:hover { border-color: #B9C6D8; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); width: 16px; height: 16px; }
input:disabled { background: var(--surface); color: var(--text-faint); }
.is-off { opacity: .45; }
.is-off::after { content: " (off)"; font-size: .75rem; }

/* Admin controls (v20) */
.user-edit { display: grid; gap: .6rem .8rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; padding: .6rem 0; }
.user-edit label { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; color: var(--text-mute); margin: 0; }
.user-edit input, .user-edit select { width: 100%; }
.user-edit-actions { display: flex; gap: .4rem; }
tr.edit-row td { background: #F7FAFE; }
.control-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .7rem .9rem; border: 1px solid #CFE0F4; background: #F7FAFE; border-radius: 10px; }
.control-bar form { margin: 0; }
.control-title { font-weight: 600; display: inline-flex; align-items: center; gap: .35rem; }
.score-edit { margin-top: .6rem; }
.score-edit summary {
  cursor: pointer; font-size: .85rem; color: var(--brand); font-weight: 500;
  width: fit-content; list-style: none;
  display: inline-flex; align-items: center; gap: .35rem;
}
.score-edit summary::-webkit-details-marker { display: none; }
.score-edit summary::before {
  content: ''; width: 13px; height: 13px; background: currentColor;
  -webkit-mask: var(--chev) center / 13px 13px no-repeat;
  mask: var(--chev) center / 13px 13px no-repeat;
  transition: transform .18s ease;
}
.score-edit[open] summary::before { transform: rotate(90deg); }
.score-edit form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .5rem; }
.score-edit label { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-size: .88rem; }
.score-edit input[type=number] { width: 72px; }
.score-edit input[type=text] { flex: 1; min-width: 200px; }

/* Choosing an institute on a shared address (v21) */
.pick-list { display: flex; flex-direction: column; gap: .5rem; }
.pick-item {
  display: flex; align-items: center; gap: .8rem; padding: .8rem .9rem;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text);
}
.pick-item:hover { border-color: var(--brand); background: var(--brand-tint); }
.pick-ico { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; display: grid; place-items: center;
            background: var(--brand-tint); color: var(--brand); font-weight: 600; }
.pick-body { flex: 1; display: flex; flex-direction: column; }
.pick-body small { color: var(--text-mute); font-size: .8rem; }


/* --------------------------------------------------------------------------
   Dropdowns: one arrow, drawn once, on every select in the portal (v23)
   The arrow lives in its own rule so no component's background can wipe it.
   -------------------------------------------------------------------------- */

select,
.rp-field select,
.filter-bar select,
.live-toolbar select,
.user-edit select,
.ai-build select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235F6B7A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right .75rem center !important;
  background-size: 16px 16px !important;
  padding-right: 2.4rem !important;
  cursor: pointer;
}
select:hover { border-color: #B9C6D8; }
select:focus {
  border-color: var(--brand-bright);
  box-shadow: 0 0 0 3px rgba(46, 125, 209, .16);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231552A2' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
}
select:disabled { cursor: not-allowed; opacity: .6; }
select[multiple] { background-image: none !important; padding-right: .65rem !important; }

/* --------------------------------------------------------------------------
   The shared sign-in page, when no institute has been chosen: Markai's own
   colours rather than a college's. (v25)
   -------------------------------------------------------------------------- */

.markai-auth .auth-aside {
  background: linear-gradient(150deg, #0B0A1F 0%, #3B1D9E 55%, #6D28D9 100%);
}
.markai-auth .auth-aside::after {
  background-image: repeating-linear-gradient(115deg, rgba(255,255,255,.05) 0 26px, transparent 26px 60px);
}
.markai-auth .auth-aside h2 { color: #fff; }
.markai-auth .auth-aside li::before, .markai-auth .auth-aside .eyebrow { color: #7DF9E4; }
.markai-auth .aside-logo { height: 52px; }
.markai-auth .eyebrow { color: #6D28D9; }
.markai-auth .btn-primary {
  background: linear-gradient(100deg, #8B5CF6, #6D28D9); border-color: #6D28D9;
  box-shadow: 0 10px 24px rgba(109, 40, 217, .28);
}
.markai-auth .btn-primary:hover { background: linear-gradient(100deg, #7C4DF3, #5B21B6); border-color: #5B21B6; }
.markai-auth a { color: #6D28D9; }
.markai-auth input:focus, .markai-auth select:focus {
  border-color: #8B5CF6; box-shadow: 0 0 0 3px rgba(139, 92, 246, .18);
}
.markai-auth .app-cta.light { background: #F3EFFF; border-color: #DDD2FB; }
.markai-auth .app-cta.light .app-cta-btn { background: #6D28D9; }
.markai-auth .app-cta.light .app-cta-btn:hover { background: #5B21B6; }

/* Registration link on the candidates page (v32) */
.invite-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.invite-link {
  flex: 1 1 320px; min-width: 240px; font-family: var(--mono, monospace); font-size: .82rem;
  padding: .5rem .65rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
}
.invite-link:focus { outline: none; border-color: var(--brand-bright); }

/* An institute's own branding (v34) */
.sidebar-name { display: block; font-weight: 600; font-size: 1rem; color: var(--brand);
                line-height: 1.25; padding: .1rem 0; }
.brand-now { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
             padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
             background: var(--surface-2); margin-bottom: .6rem; }
.brand-now img { max-height: 46px; max-width: 220px; }
.brand-drop { display: flex; align-items: center; gap: .4rem; font-size: .84rem; color: var(--muted); margin: 0; }
.brand-drop input { width: auto; }
.brand-pick { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.brand-pick input[type="color"] { width: 54px; height: 34px; padding: .15rem; cursor: pointer;
                                  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.brand-swatches { display: flex; gap: .35rem; }
.swatch { width: 26px; height: 26px; border-radius: 6px; border: 1px solid rgba(0,0,0,.15); cursor: pointer; }
.swatch:hover { transform: scale(1.08); }
/* Size lives with the other .aside-logo rules; this is only the tile. */
.aside-own { background: #fff; border-radius: 10px; object-fit: contain; }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: .9rem 0; }

/* Course material and class lists (v37) */
.material-body { max-height: 62vh; overflow-y: auto; white-space: pre-wrap; line-height: 1.7;
                 font-size: .92rem; color: var(--text); padding: .8rem 1rem; background: var(--surface-2);
                 border: 1px solid var(--line); border-radius: var(--radius-sm); }
.pick-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--line);
             border-radius: var(--radius-sm); padding: .3rem; }
.pick { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem .55rem;
        border-radius: var(--radius-sm); margin: 0; font-weight: 400; }
.pick:hover { background: var(--surface-2); }
.pick input { width: auto; margin-top: .2rem; }

/* Course material: pick what you are uploading, then one clean form (v38) */
.upload-card {
  display: flex; flex-direction: column; gap: .3rem; align-items: flex-start; text-align: left;
  padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); cursor: pointer; font: inherit; color: var(--text);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.upload-card:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(21, 82, 162, .10); }
.upload-card.on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(21, 82, 162, .12); }
.upload-card b { font-size: .98rem; }
.upload-ico { display: inline-flex; align-items: center; justify-content: center;
              width: 38px; height: 38px; border-radius: 10px; margin-bottom: .35rem;
              background: var(--surface-2); color: var(--brand); }
.upload-panel .card-head { align-items: flex-start; }

/* Paper wizard */
.kind-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .6rem; }
.kind { display: flex; gap: .55rem; align-items: flex-start; margin: 0; font-weight: 400;
        padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
        cursor: pointer; background: var(--surface); }
.kind:hover { border-color: var(--brand); }
.kind:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(21, 82, 162, .14); }
.kind input { width: auto; margin-top: .25rem; }
.kind-body { display: flex; flex-direction: column; gap: .15rem; }
.marks-line { display: flex; gap: 1.4rem; margin-top: .9rem; padding-top: .8rem;
              border-top: 1px solid var(--line); font-size: .86rem; color: var(--muted); }
.marks-line b { color: var(--ink); font-size: 1rem; margin-left: .3rem; }
.steps-list { margin: .6rem 0 0; padding-left: 1.1rem; font-size: .88rem; line-height: 1.7; color: var(--text); }
.steps-list li { margin-bottom: .35rem; }
.plain-list { margin: 0; padding-left: 1.05rem; font-size: .9rem; line-height: 1.9; }

/* The accounts directory: long unbroken names must not stretch the table (v41) */
.table-wrap table td, .table-wrap table th { overflow-wrap: anywhere; }
.accounts-table td:nth-child(1) { max-width: 260px; }
.accounts-table td:nth-child(2) { max-width: 240px; }
.signin { font-family: var(--mono, monospace); font-size: .82rem; overflow-wrap: anywhere; }

/* --------------------------------------------------------------------------
   Popups
   A form that is only needed now and then does not belong open on the page
   all the time: it pushes the records the page is actually about below the
   fold. These open over the list and close again.
   -------------------------------------------------------------------------- */

.pop[hidden] { display: none !important; }
.pop {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 3vh 1rem;
  background: rgba(16, 24, 40, .45);
  overflow-y: auto;
}
.pop-card {
  width: 100%; max-width: 860px;
  background: #fff; border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(16, 24, 40, .22);
  display: flex; flex-direction: column;
}
.pop-card.narrow { max-width: 560px; }
.pop-head {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1rem 1.25rem .85rem;
  border-bottom: 1px solid var(--line);
}
.pop-head h3 { margin: 0; font-size: 1.02rem; }
.pop-head p { margin: .2rem 0 0; font-size: .84rem; color: var(--text-mute); font-weight: 400; }
.pop-head .spacer { flex: 1; }
.pop-x {
  border: 0; background: none; cursor: pointer; line-height: 1;
  font-size: 1.4rem; color: var(--text-mute); padding: 0 .2rem;
}
.pop-x:hover { color: var(--text); }
.pop-body { padding: 1.1rem 1.25rem; }
.pop-body .field:last-child { margin-bottom: 0; }
.pop-foot {
  display: flex; align-items: center; gap: .6rem;
  padding: .85rem 1.25rem 1.1rem;
  border-top: 1px solid var(--line);
}
.pop-foot .spacer { flex: 1; }
@media (max-width: 720px) {
  .pop { padding: 0; }
  .pop-card { max-width: none; min-height: 100%; border-radius: 0; }
}

/* --------------------------------------------------------------------------
   Record lists
   A row of actions belongs on one line. Wrapped onto three it triples the
   height of every row and the list stops being scannable.
   -------------------------------------------------------------------------- */

.list-table { min-width: 1080px; }
.list-table td, .list-table th { vertical-align: middle; }
.list-table .actions { text-align: right; white-space: nowrap; width: 1%; }
.list-table .actions form { display: inline-block; margin: 0; }
.list-table .actions .btn { margin-left: .25rem; }
.list-table .actions .btn-sm { padding: .2rem .5rem; font-size: .78rem; }
/* Give the columns that carry real text room, and let the one long name a
   test throws at it wrap rather than starve everything else. */
.list-table .col-email { min-width: 190px; overflow-wrap: anywhere; }
.list-table .col-name { max-width: 320px; overflow-wrap: anywhere; }
.list-table .nowrap { white-space: nowrap; }

/* The accounts directory shares the record-list action column, and so does
   any other record list — the column behaves the same wherever it appears. */
.accounts-table .acts, .list-table .acts {
  text-align: right; white-space: nowrap; width: 1%;
}
.accounts-table .acts form, .list-table .acts form { display: inline-block; margin: 0; }
.accounts-table .acts .btn, .list-table .acts .btn { margin-left: .25rem; }
.accounts-table .acts .btn-sm, .list-table .acts .btn-sm {
  padding: .2rem .5rem; font-size: .78rem;
}

/* A record that is kept on file but no longer in use: still readable, plainly
   not current. Faded rather than hidden, because the office still needs it. */
.muted-row > td { opacity: .62; }
.muted-row:hover > td { opacity: 1; }

/* Every question's marks on one page. Four columns, with the question text
   given the room and the marks box kept narrow and to the right, so a column
   of numbers can be read down and compared at a glance. */
.mark-grid { display: grid; gap: .3rem; margin-top: .3rem; }
.mark-head, .mark-row {
  display: grid; gap: .6rem; align-items: center;
  grid-template-columns: 2.6rem minmax(0, 1fr) 8.5rem 5.5rem;
}
/* The kind column carries a tag, and a tag that will not wrap has to be
   allowed to end. "Practical / scenario (upload proof)" ran straight out of
   its column and under the marks box; the short name goes in the tag and the
   full one in its tooltip, and this keeps any future long name inside its
   own column rather than over its neighbour. */
.mark-row > span:nth-child(3) { min-width: 0; }
.mark-row .pill.type {
  max-width: 100%; display: inline-block; overflow: hidden;
  text-overflow: ellipsis; vertical-align: middle;
}
.mark-head {
  font-size: .76rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); padding: .2rem .5rem; border-bottom: 1px solid var(--line);
}
.mark-head span:last-child, .mark-row input { text-align: center; }
.mark-row {
  padding: .4rem .5rem; border: 1px solid transparent; border-radius: 8px;
}
.mark-row:nth-child(even) { background: #F7FAFE; }
.mark-row:hover { border-color: var(--line); }
.mark-row input { width: 100%; padding: .32rem .4rem; }
.mark-text { font-size: .9rem; line-height: 1.35; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .mark-head { display: none; }
  .mark-row {
    grid-template-columns: 2.6rem minmax(0, 1fr) 5rem;
    grid-template-areas: "num text marks" "num kind marks";
    row-gap: .2rem;
  }
  .mark-row .qnum { grid-area: num; }
  .mark-row .mark-text { grid-area: text; }
  .mark-row span:nth-child(3) { grid-area: kind; }
  .mark-row input { grid-area: marks; }
}

/* The curriculum's topics, to tick before a paper is set. Columns that fit
   themselves to the text, because an outline has both "Inertia" and
   "Momentum and its conservation in one dimension" in the same list. */
.topic-grid {
  display: grid; gap: .5rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin-top: .3rem;
}
.topic-pick { align-items: flex-start; padding: .5rem .6rem; }
.topic-pick span { font-size: .9rem; line-height: 1.35; overflow-wrap: anywhere; }
@media (max-width: 620px) { .topic-grid { grid-template-columns: minmax(0, 1fr); } }

/* The row of buttons that closes a form, with its note beside them. */
.form-foot {
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .9rem;
}
.form-foot .hint { margin: 0; }
.card-head .spacer { flex: 1; }

/* How many of each question, and what each is worth.
   A table reads better than eight loose boxes: the teacher sets a count and
   a mark on one line and sees what that line is worth. */
.qtype-grid { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.qtype-head, .qtype-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 110px 110px 90px;
  gap: .75rem; align-items: center; padding: .5rem .8rem;
}
.qtype-head {
  background: #F7F9FC; border-bottom: 1px solid var(--line);
  font-size: .72rem; text-transform: uppercase; letter-spacing: .03em;
  color: var(--text-mute); font-weight: 600;
}
.qtype-head span:not(:first-child), .qtype-row .qtype-sub { text-align: right; }
.qtype-row { border-bottom: 1px solid #EEF2F7; }
.qtype-row:last-child { border-bottom: 0; }
.qtype-row.on { background: #F6FAFF; }
.qtype-row label { margin: 0; font-size: .88rem; font-weight: 500; display: block; }
.qtype-row label .tiny { display: block; font-weight: 400; }
.qtype-row input { margin: 0; text-align: right; }
.qtype-sub { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }
@media (max-width: 760px) {
  .qtype-head { display: none; }
  .qtype-row { grid-template-columns: minmax(0, 1fr) 72px 72px 56px; gap: .4rem; padding: .5rem; }
  .qtype-row label { font-size: .8rem; }
}

/* A row of chips that wraps — a list of chapters to pick from, say. */
.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; }
a.upload-card { text-decoration: none; }

/* ==========================================================================
   The dashboard language: panels divided by hairlines rather than floating
   cards, figures with a small picture under each, segmented filters, and a
   table that carries a checkbox, a mark, a right-aligned value and a menu.
   ========================================================================== */

.panels {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}
.panels > * + * { border-left: 1px solid var(--line); }
.panels.stacked { grid-template-columns: minmax(0, 1fr); }
.panels.stacked > * + * { border-left: none; border-top: 1px solid var(--line); }
.panels + .panels { margin-top: 1.1rem; }
@media (max-width: 1080px) {
  .panels { grid-template-columns: minmax(0, 1fr); }
  .panels > * + * { border-left: none; border-top: 1px solid var(--line); }
}

.panel { display: flex; flex-direction: column; min-width: 0; }
/* Two panels sharing one column of the grid, divided from each other the
   same way the columns are divided from one another. */
.panel-stack { display: flex; flex-direction: column; min-width: 0; }
.panel-stack > * + * { border-top: 1px solid var(--line); }
.panel-stack > .panel:last-child { flex: 1; }
.panel-head {
  display: flex; align-items: center; gap: .7rem;
  padding: 1.05rem 1.2rem .3rem;
}
.panel-head h2, .panel-head h3 {
  margin: 0; font-size: 1.02rem; font-weight: 600; letter-spacing: -.015em;
}
.panel-head .spacer { flex: 1; }
.panel-body { padding: .9rem 1.2rem 1.2rem; }
.panel-body.flush { padding: 0; }

/* A quiet ⋮ that only darkens when reached for. */
.kebab {
  background: none; border: none; cursor: pointer; padding: .2rem .35rem;
  color: var(--text-faint); border-radius: 6px; line-height: 0;
}
.kebab:hover { color: var(--text); background: var(--surface); }
.kebab svg { width: 16px; height: 16px; }

/* ----- a row of figures, divided rather than boxed ----- */

.figs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.figs.two { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.figs.three { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.figs.four { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.figs > * + * { border-left: 1px solid var(--line-soft); }
@media (max-width: 760px) {
  .figs, .figs.three, .figs.four { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row; }
  .figs > * { border-left: none !important; border-top: 1px solid var(--line-soft); }
}

.fig { padding: .85rem 1.2rem 1.1rem; min-width: 0; }
.fig .cap {
  font-size: .68rem; font-weight: 500; letter-spacing: .085em;
  text-transform: uppercase; color: var(--text-mute);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fig .num {
  font-family: var(--display); font-size: 1.5rem; font-weight: 600;
  letter-spacing: -.03em; color: var(--ink); line-height: 1.15; margin-top: .3rem;
  display: flex; align-items: baseline; gap: .4rem;
}
.fig .num .unit { font-size: .85rem; font-weight: 500; color: var(--text-faint); letter-spacing: 0; }
.fig .delta { font-size: .78rem; font-weight: 600; letter-spacing: 0; }
.fig .delta.up { color: var(--good); }
.fig .delta.down { color: var(--bad); }
.fig .pic { margin-top: .7rem; height: 34px; }
.fig .pic svg { display: block; width: 100%; height: 100%; overflow: visible; }
.fig .foot { margin-top: .55rem; font-size: .78rem; color: var(--text-mute); }

/* The wide bar under a figure, and the stacked version that splits one
   total into its parts. */
.barline { height: 6px; border-radius: 99px; background: var(--track); overflow: hidden; display: flex; }
.barline > i { display: block; height: 100%; }
.barline > i:first-child { border-radius: 99px 0 0 99px; }
.barline > i:last-child { border-radius: 0 99px 99px 0; }
.barline > i:only-child { border-radius: 99px; }

/* ----- segmented filters, a search box, and the pager ----- */

.chips { display: inline-flex; align-items: center; gap: .15rem; flex-wrap: wrap; }
.chip {
  padding: .35rem .8rem; border-radius: 8px;
  font-size: .86rem; font-weight: 500; color: var(--text-mute);
  background: none; border: 1px solid transparent; cursor: pointer;
  text-decoration: none; white-space: nowrap;
}
.chip:hover { color: var(--ink); }
.chip.on {
  background: #fff; color: var(--ink); font-weight: 600;
  border-color: var(--line); box-shadow: var(--shadow);
}

.search-box { position: relative; display: inline-flex; align-items: center; min-width: 210px; }
.search-box svg {
  position: absolute; left: .6rem; width: 15px; height: 15px; color: var(--text-faint);
  pointer-events: none;
}
.search-box input { padding-left: 2rem !important; }

.pager {
  display: flex; align-items: center; gap: .6rem;
  padding: .75rem 1.2rem; border-top: 1px solid var(--line);
  font-size: .83rem; color: var(--text-mute);
}
.pager .spacer { flex: 1; }
.pager b { color: var(--ink); font-weight: 600; }

/* ----- the record table ----- */

.rows { width: 100%; border-collapse: collapse; font-size: .9rem; }
.rows thead th {
  text-align: left; padding: .55rem 1.2rem;
  font-size: .72rem; font-weight: 500; letter-spacing: .075em;
  text-transform: uppercase; color: var(--text-mute);
  border-bottom: 1px solid var(--line); white-space: nowrap; background: none;
}
.rows tbody td {
  padding: .6rem 1.2rem; border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.rows tbody tr:last-child td { border-bottom: none; }
.rows tbody tr:hover { background: #FAFBFC; }
.rows .t-right { text-align: right; }
.rows .t-num {
  text-align: right; font-variant-numeric: tabular-nums;
  font-weight: 600; color: var(--ink); white-space: nowrap;
}
.rows .t-pick, .rows .t-end { width: 1%; white-space: nowrap; }
.rows input[type=checkbox] { width: auto; accent-color: var(--brand); margin: 0; }

/* The little square that stands in for a logo beside a name. */
.named { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.named .mark {
  width: 26px; height: 26px; flex: 0 0 26px; border-radius: 7px;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 600; font-size: .68rem;
  background: var(--brand-tint); color: var(--brand);
}
.named .mark.g2 { background: #E9F3EC; color: #12855F; }
.named .mark.g3 { background: #FBF0DD; color: #9A6B00; }
.named .mark.g4 { background: #EDEBF8; color: #5B4BBF; }
.named .mark.g5 { background: #FBE9EA; color: #B23A3A; }
.named .nm { font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* A description saved before the limit existed is still in the database, and
   one of those would stretch its row past every other. Two lines is all any
   row gets to show; the full text is still there to edit. */
.track-desc {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; max-width: 62ch;
}

.sortable { display: inline-flex; align-items: center; gap: .25rem; color: inherit; text-decoration: none; }
.sortable .arr { font-size: .7rem; color: var(--brand); }

/* ----- a chart with its legend ----- */

.chartbox { padding: .3rem 1.2rem 1.1rem; }
.chartbox svg { display: block; width: 100%; height: auto; }
.chart-legend {
  display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap;
  margin-top: .7rem; font-size: .84rem; color: var(--text);
}
.chart-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.chart-legend i {
  width: 13px; height: 13px; border-radius: 4px; display: block; flex: 0 0 13px;
}

/* The costs-by-category list: a name, a dotted run, a value and a share. */
.split { list-style: none; margin: .9rem 0 0; padding: 0; }
.split li {
  display: flex; align-items: baseline; gap: .5rem;
  font-size: .86rem; padding: .22rem 0;
}
.split li .key { display: inline-flex; align-items: center; gap: .5rem; color: var(--text); }
.split li .key i { width: 8px; height: 8px; border-radius: 2px; display: block; flex: 0 0 8px; }
.split li .run { flex: 1; border-bottom: 1px dotted var(--line); transform: translateY(-3px); }
.split li .val { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.split li .pct { color: var(--text-mute); width: 3rem; text-align: right; font-variant-numeric: tabular-nums; }

/* The one decision that stands between a scenario paper and its result.
   Loud enough to be the first thing read on the page, and calm enough not
   to look like a warning — nothing has gone wrong, a person is simply owed
   a look at the work. */
.approve-bar {
  display: flex; align-items: center; gap: .85rem; flex-wrap: wrap;
  padding: .95rem 1.1rem;
  background: var(--brand-tint);
  border: 1px solid rgba(21, 82, 162, .22);
  border-radius: var(--radius);
}
.approve-bar .spacer { flex: 1; }
.approve-ico {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px;
  display: grid; place-items: center; background: var(--brand); color: #fff;
}
.approve-text { font-size: .88rem; line-height: 1.55; flex: 1 1 320px; min-width: 240px; }
.approve-text b { display: block; color: var(--ink); }

/* ==========================================================================
   Finish
   ==========================================================================
   Small things, applied once across the whole portal rather than page by
   page. None of them is visible on its own; together they are the difference
   between a layout that works and one that feels made.
   ========================================================================== */

/* Figures line up. Marks, counts, percentages and dates are read in columns
   and compared down the page, and proportional digits make that impossible:
   a 1 is narrower than a 7, so "18/25" above "20/25" never agrees. */
.t-num, .fig .num, .stat .value, .score-dial .n, .pager b,
td.t-num, .split .val, .split .pct, .tag-code, .send-code,
.scorecell, .rows td, .figs .num {
  font-variant-numeric: tabular-nums;
}

/* One focus ring for everything that takes focus, visible on any ground.
   Keyboard users are the only people who see it, which is exactly why it
   must not be an afterthought. */
:focus-visible {
  outline: 2px solid var(--brand-bright);
  outline-offset: 2px;
  border-radius: 6px;
}
.score-hero :focus-visible,
.topnav .tn-avatar:focus-visible { outline-color: #8FB8EA; }

/* A row you can act on says so when you reach it. The change is a shade,
   not a lift — a table of fifty results that animates on every row is noise. */
.rows tbody tr, tbody tr { transition: background .12s ease; }

/* Pills: lighter grounds and a hairline, so a row of them reads as a set of
   states rather than a row of coloured blocks. */
.pill {
  box-shadow: inset 0 0 0 1px rgba(16, 24, 40, .05);
  line-height: 1.45;
}
.pill.good { background: #E8F6EF; color: #0F7A55; }
.pill.warn { background: #FDF4E3; color: #96681A; }
.pill.bad  { background: #FCECEC; color: #B53A3A; }
.pill.mute { background: #F1F3F6; color: var(--text-mute); }

/* Buttons settle rather than jump. The old rule moved the whole button down
   a pixel on press, which on a toolbar of five made the row wobble. */
.btn { transition: background .14s ease, border-color .14s ease,
                   color .14s ease, box-shadow .14s ease; }
.btn:active { transform: none; }
.btn-primary { box-shadow: 0 1px 2px rgba(21, 82, 162, .22); }
.btn-primary:active { box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18); }

/* An initials disc, wherever one appears, is drawn the same way: a tint of
   the brand rather than a solid block, so a column of them is quiet. */
.named .mark, .avatar { font-variant-numeric: tabular-nums; letter-spacing: .01em; }

/* Empty states carry one drawn mark and an invitation, never an apology. */
.empty .ico {
  width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center; margin: 0 auto .9rem;
  background: var(--brand-tint); color: var(--brand);
}
.empty h3 { font-size: 1rem; letter-spacing: -.01em; margin-bottom: .3rem; }

/* Panels inside the sheet share one hairline. Giving each its own shadow is
   what makes a dashboard look like a pile of cards instead of one surface. */
.panel-head h2 svg, .card-head h2 svg { color: var(--text-faint); }

@media (prefers-reduced-motion: reduce) {
  .score-edit summary::before, .btn, .rows tbody tr, tbody tr { transition: none; }
}

/* A panel of facts about one record: label left, value right, values aligned
   down the column. The old shape — a bold label, a middle dot, the value —
   read as a sentence and made every row a different length. */
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .5rem .9rem; margin: 0; }
.facts dt { font-size: .82rem; color: var(--text-mute); white-space: nowrap; }
.facts dd {
  margin: 0; font-size: .87rem; color: var(--ink); font-weight: 500;
  overflow-wrap: anywhere; font-variant-numeric: tabular-nums;
}

/* The photography advice on a practical question. Folded away by default:
   a candidate who has done this before does not need it, and one who has not
   needs it badly — so it is one line until it is asked for. */
.prac-help { margin: -.2rem 0 .2rem; }
.prac-help summary {
  cursor: pointer; list-style: none;
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .84rem; font-weight: 500; color: var(--brand); width: fit-content;
}
.prac-help summary::-webkit-details-marker { display: none; }
.prac-help summary::before {
  content: ''; width: 13px; height: 13px; background: currentColor;
  -webkit-mask: var(--chev) center / 13px 13px no-repeat;
  mask: var(--chev) center / 13px 13px no-repeat;
  transition: transform .18s ease;
}
.prac-help[open] summary::before { transform: rotate(90deg); }
.prac-help ul {
  margin: .5rem 0 0; padding: .7rem .9rem .7rem 2rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  font-size: .85rem; line-height: 1.6; color: var(--text);
}
.prac-help li { margin-bottom: .3rem; }
.prac-help li:last-child { margin-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .prac-help summary::before { transition: none; } }

/* ==========================================================================
   The dashboard drawing itself
   ==========================================================================
   One orchestrated moment when the page arrives, then stillness. Each chart
   draws in the direction its data runs — a line left to right, a bar up from
   its baseline, a share bar out from its start — so the motion says something
   about the figure rather than decorating it. Everything is finished inside a
   second; nothing moves again unless a person asks it to.

   Entrances on every card, hovers that lift every tile, things that drift in
   as you scroll: those are the default, and they make a portal feel slow to
   use after the second visit. There is one of them here and it happens once.
   ========================================================================== */

@keyframes c-draw  { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes c-fade  { from { opacity: 0; }          to { opacity: 1; } }
@keyframes c-rise  { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes c-widen { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes c-sweep { from { stroke-dashoffset: var(--arc, 352); } }

/* A line is drawn along its own length. pathLength="1" on the element means
   the dash can be written as 1 whatever the real geometry is. */
.c-line {
  stroke-dasharray: 1;
  animation: c-draw .85s cubic-bezier(.33, 1, .68, 1) both;
  animation-delay: calc(var(--i, 0) * .12s);
}
/* The fill belongs to the line, so it arrives behind it rather than with it. */
.c-area { animation: c-fade .5s ease .45s both; }
.c-dash { animation: c-fade .5s ease .6s both; }

/* Bars grow out of the baseline they are measured from. A bar below the zero
   line grows downward, which is the same rule, not an exception. */
.c-bar {
  transform-box: fill-box;
  transform-origin: bottom;
  animation: c-rise .5s cubic-bezier(.34, 1.26, .64, 1) both;
  animation-delay: calc(var(--i, 0) * .012s);
}
.c-bar.c-down { transform-origin: top; }

/* A share bar fills from where it starts, and the segments after the first
   wait their turn, so a split reads as parts of one total. */
.barline > i {
  transform-origin: left;
  animation: c-widen .6s cubic-bezier(.33, 1, .68, 1) both;
}
.barline > i:nth-child(2) { animation-delay: .12s; }
.barline > i:nth-child(3) { animation-delay: .24s; }
.barline > i:nth-child(4) { animation-delay: .36s; }

/* The mark on a result page sweeps round to where it landed. */
.score-dial circle:last-of-type {
  animation: c-sweep 1.1s cubic-bezier(.33, 1, .68, 1) both .15s;
}

@media (prefers-reduced-motion: reduce) {
  .c-line, .c-area, .c-dash, .c-bar, .barline > i, .score-dial circle:last-of-type {
    animation: none;
    stroke-dashoffset: 0;
    transform: none;
    opacity: 1;
  }
}

/* The readout that follows the pointer across a chart. It sits on the body
   rather than inside the panel, because a panel clips its own corners and a
   tooltip near the edge would be cut in half by them. */
.chart-readout {
  position: fixed; top: 0; left: 0; z-index: 80;
  pointer-events: none;
  min-width: 148px;
  padding: .6rem .7rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  font-size: .82rem;
  will-change: transform;
}
.chart-readout[hidden] { display: none; }
.chart-readout .r-when {
  font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-mute); margin-bottom: .4rem;
}
.chart-readout .r-row {
  display: flex; align-items: center; gap: .45rem;
  margin-top: .22rem; white-space: nowrap;
}
.chart-readout .r-row i { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 9px; }
.chart-readout .r-name { color: var(--text-mute); }
.chart-readout .r-val {
  margin-left: auto; color: var(--ink); font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* The guide and the points it picks out. Drawn inside the chart, in the
   chart's own units, so they land exactly on the line at any width. */
.c-guide {
  stroke: var(--text-faint); stroke-width: 1; stroke-dasharray: 3 3;
  opacity: 0; pointer-events: none;
}
.c-dot {
  opacity: 0; pointer-events: none;
  stroke: #fff; stroke-width: 2;
}
.c-guide.is-on, .c-dot.is-on { opacity: 1; }
svg[data-chart] { cursor: crosshair; }

/* The top bar wraps rather than letting a page with several actions push its
   buttons over the navigation. One page grew a fourth action and the row
   collided; no page should be able to do that again. */
.topnav { flex-wrap: wrap; row-gap: .5rem; }
.tn-actions { flex-wrap: wrap; justify-content: flex-end; }

/* Give the AI the file the paper comes from -----------------------------------
   The four kinds are a choice, not a list of links, so they read as segments
   of one control. The whole block sits on a tint so the eye sees "this is one
   decision" rather than four more fields in a long form. */
.src-pick {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface, #F4F5F7);
  padding: .85rem .9rem;
  margin-bottom: 1rem;
}
.src-pick .field-label { margin-bottom: .15rem; }
.src-pick .hint.mt-0 { margin-top: 0; margin-bottom: .6rem; }
.src-pick .field-row { margin-bottom: 0; }
.src-pick .field:last-child .hint { margin-bottom: 0; }
.src-kinds { display: flex; flex-wrap: wrap; gap: .4rem; }
.src-kind {
  margin: 0;
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .32rem .7rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: #fff;
  font-size: .84rem; font-weight: 500;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, color .14s ease;
}
.src-kind input { margin: 0; }
.src-kind:hover { border-color: var(--brand); }
.src-kind:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-tint);
  color: var(--brand);
}
.src-kind:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.src-pick input[type="file"] { max-width: 100%; }
@media (max-width: 620px) {
  .src-pick .field-row { flex-direction: column; }
}

/* Records: downloads, ticks, and the bar of things to do with them ----------- */

.export-row { display: inline-flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.export-row .btn { gap: .35rem; }

/* The tick column is as narrow as a tick and never wraps. */
th.pick, td.pick { width: 2.2rem; padding-left: .55rem; padding-right: 0; }
th.pick input, td.pick input { margin: 0; cursor: pointer; }
tr:has(td.pick input:checked) { background: var(--brand-tint); }

/* The bar sits at the foot of the window while something is ticked, so the
   action is reachable without scrolling back up a list of a hundred rows. */
.bulk-form { margin: 0; }
/* Fixed, not sticky. A sticky element may only move inside its own
   parent's box, and this bar's parent is the little form that carries it —
   a box exactly the height of the bar, with nowhere to slide. So on a list
   of a hundred candidates the bar sat at the foot of the list, a thousand
   pixels below the screen, which on a phone made it unreachable: you ticked
   a row and nothing appeared. Fixed puts it where it belongs — above the
   list, at the bottom of the screen — for as long as something is ticked. */
/* hidden means hidden.
   The browser's own rule is `[hidden] { display: none }`, which any class
   that sets `display` beats — and most of the things this portal hides and
   shows are flex rows or grids with a display of their own. So the action
   bar stood on every list saying "0 selected", and the owner's card view
   stayed on screen underneath the table after switching back to the list.
   One rule settles it for everything, now and later. */
[hidden] { display: none !important; }

.bulk-bar {
  position: fixed; z-index: 60;
  left: 50%; transform: translateX(-50%);
  bottom: 1rem;
  width: min(60rem, calc(100% - 1.6rem));
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  margin-top: .75rem;
  padding: .55rem .75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(16, 24, 40, .12);
}
.bulk-bar .spacer { flex: 1 1 auto; }
.bulk-count { font-size: .86rem; color: var(--text-mute); }
.bulk-count b { color: var(--text); font-variant-numeric: tabular-nums; }
@media (max-width: 620px) {
  .bulk-bar {
    border-radius: var(--radius-sm);
    bottom: .6rem; width: calc(100% - 1.2rem);
    padding: .5rem .6rem; gap: .4rem;
  }
  .bulk-bar .spacer { flex-basis: 100%; height: 0; }
  .bulk-count { flex: 1 1 100%; font-size: .8rem; }
}

/* A filter bar that is the same on every list: controls that wrap, a Clear
   that only appears when there is something to clear. */
.filter-bar {
  display: flex; align-items: flex-end; gap: .5rem; flex-wrap: wrap;
  margin-bottom: .9rem;
}
.filter-bar .field, .filter-bar label { margin: 0; }
.filter-bar .f {
  display: flex; flex-direction: column; gap: .2rem;
  /* A label elsewhere in the portal is a flex row centred on its control;
     here it is a column, and inheriting that centring left every heading
     floating over the middle of its own box instead of sitting above its
     left edge. */
  align-items: stretch; text-align: left;
}
.filter-bar .f > span {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-mute); text-align: left;
}
.filter-bar input, .filter-bar select { margin: 0; }
.filter-bar .f-wide { min-width: 15rem; flex: 1 1 15rem; }

/* Printing. What goes on paper is the records, not the furniture around
   them: no navigation, no buttons, no tick column, and the table on a white
   ground with hairlines that survive a cheap printer. */
@media print {
  .no-print, .topnav, .subbar, .sheet-foot, .pager, .bulk-bar, .export-row,
  .btn, .flash, .assistant-launch, .tn-right, nav { display: none !important; }
  body, .app-sheet, .panel, .card { background: #fff !important; box-shadow: none !important; }
  .app-sheet, .card, .panel { border: 0 !important; margin: 0 !important; padding: 0 !important; }
  .table-wrap { overflow: visible !important; }
  table { width: 100% !important; min-width: 0 !important; border-collapse: collapse; }
  th, td { border-bottom: 1px solid #999 !important; padding: 4px 6px !important;
           font-size: 10pt !important; color: #000 !important; }
  thead { display: table-header-group; }
  tr { page-break-inside: avoid; }
  a[href]::after { content: ""; }
  /* The blurb under a heading explains the buttons, and the buttons are not
     on the paper. The heading itself stays. */
  .card-head p, .invite-row, .empty, .tabs, .subbar { display: none !important; }
  .print-head { display: block !important; }
  .print-head h2 { margin: 0 0 .2rem; font-size: 15pt; }
  .print-head p { display: block !important; font-size: 9pt; color: #444; }
}
.print-head { display: none; }

/* Tick everyone / clear, above a plain list of checkboxes. */
.tick-row { display: flex; gap: .4rem; margin-bottom: .5rem; }

/* On a phone ------------------------------------------------------------- */

/* The camera button belongs on a device with a camera in it. On a laptop
   `capture` opens the same file dialog as the other button, under a name
   that promises something else, so it is not shown there. */
.prac-shoot { display: none; }
@media (hover: none) and (pointer: coarse) {
  .prac-shoot { display: inline-flex; }
}

@media (max-width: 420px) {
  /* The question's own header: number, kind, marks. Three things on one
     line fit a laptop and not a 320-pixel phone, where the marks ran off
     the right-hand edge. */
  .q-stage-head, .q-stage-foot {
    flex-wrap: wrap; row-gap: .4rem; padding: .8rem .9rem;
  }
  .q-stage-body { padding: 1rem .9rem; }
  .q-stage-foot .btn { flex: 1 1 8rem; justify-content: center; }

  /* Upload: one full-width button above the other, which is also the
     easiest shape to hit with a thumb while holding the work. */
  .prac-drop { padding: .75rem .8rem; gap: .5rem; }
  .prac-drop .btn { flex: 1 1 100%; justify-content: center; }
  .prac-files li { flex-wrap: wrap; row-gap: .25rem; }
  .prac-name { flex: 1 1 100%; white-space: normal; overflow-wrap: anywhere; }
}

/* A tick box is drawn about 13 pixels wide by default, which is a third of
   a fingertip. On a touch screen it is grown, and the cell around it given
   room, so the target is the height of its row. */
@media (hover: none) and (pointer: coarse) {
  th.pick input[type="checkbox"], td.pick input[type="checkbox"] {
    width: 22px; height: 22px;
  }
  th.pick, td.pick { width: 2.9rem; padding-left: .7rem; }
  .bulk-bar .btn { flex: 1 1 auto; justify-content: center; }
}

/* A provider's keys, one line each. A free tier is a rate per key, so a
   college runs several — and the office has to be able to see which one is
   resting without reading a paragraph. */
.key-line { display: flex; align-items: center; gap: .35rem; margin-bottom: .2rem; }
.key-line .tag-code { margin: 0; }
.key-line .pill { font-size: .68rem; padding: .05rem .4rem; }
.key-drop {
  border: 0; background: none; cursor: pointer; line-height: 1;
  color: var(--text-faint); font-size: 1rem; padding: 0 .15rem; border-radius: 3px;
}
.key-drop:hover { color: var(--bad); background: var(--bad-tint); }
