/* =============================================================================
   SYG TPA — counsel portal.
   Zero build. One stylesheet, no framework, no web fonts, no icon fonts.

   Every colour is a custom property defined on bare :root, with a dark
   override that redefines the same tokens. No colour is ever defined for the
   first time inside the media query.
   ========================================================================== */

:root {
  --bg:            #f5f6f8;
  --surface:       #ffffff;
  --surface-2:     #f0f2f5;
  --surface-3:     #e8ebf0;

  --text:          #151a21;
  --text-2:        #4c5563;
  --text-3:        #6d7683;

  --border:        #dce0e6;
  --border-strong: #c2c8d1;

  --accent:        #1e4b78;
  --accent-hover:  #17395c;
  --accent-on:     #ffffff;
  --accent-soft:   #e8f0f8;

  --ok:            #1c6b46;
  --ok-bg:         #e9f4ee;
  --ok-border:     #a8d2bb;

  --warn:          #8a5300;
  --warn-bg:       #fdf3e2;
  --warn-border:   #e8c78c;
  --warn-strong:   #a8620a;

  --danger:        #98252a;
  --danger-bg:     #fbecec;
  --danger-border: #e6b2b2;

  --info:          #1e4b78;
  --info-bg:       #eaf1f8;
  --info-border:   #b6ccE3;

  --focus:         #2f6fb0;
  --radius:        6px;
  --radius-lg:     10px;
  --shadow:        0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-lg:     0 4px 14px rgba(16, 24, 40, 0.08);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #101318;
    --surface:       #191d24;
    --surface-2:     #20252d;
    --surface-3:     #272d36;

    --text:          #e7eaef;
    --text-2:        #b0b8c4;
    --text-3:        #8a93a1;

    --border:        #2c323b;
    --border-strong: #3d4550;

    --accent:        #7fb0e0;
    --accent-hover:  #9cc4ea;
    --accent-on:     #0f1319;
    --accent-soft:   #1b2836;

    --ok:            #74c99f;
    --ok-bg:         #16261e;
    --ok-border:     #2f5c44;

    --warn:          #e0aa5a;
    --warn-bg:       #2a2114;
    --warn-border:   #6b5124;
    --warn-strong:   #f0bd6d;

    --danger:        #e8908f;
    --danger-bg:     #2b1a1b;
    --danger-border: #6a3739;

    --info:          #8ab6e2;
    --info-bg:       #17222e;
    --info-border:   #2f4a68;

    --focus:         #7fb0e0;
    --shadow:        0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-lg:     0 4px 14px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "Noto Sans", sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 21px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p  { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---- app frame ---------------------------------------------------------- */

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 58px;
  flex-wrap: wrap;
}
.brand { display: flex; flex-direction: column; line-height: 1.2; padding: 8px 0; }
.brand-name { font-weight: 650; font-size: 15px; letter-spacing: -0.01em; }
.brand-sub { font-size: 12px; color: var(--text-3); }

.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-right: auto; }
.nav a {
  color: var(--text-2);
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 14px;
}
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.session { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-3); padding: 8px 0; }
.session-who { color: var(--text-2); }
.session-who b { color: var(--text); font-weight: 600; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 24px 96px; }

.page-head { margin-bottom: 20px; display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.page-head .grow { flex: 1 1 320px; }
.page-sub { color: var(--text-2); font-size: 14px; margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- cards -------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin-bottom: 20px;
}
.card > h2 { margin-bottom: 4px; }
.card-note { color: var(--text-3); font-size: 13px; margin-bottom: 16px; }
.card-head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.card-head .grow { flex: 1 1 auto; }
.card-flush { padding: 20px 0 4px; }
.card-flush > .card-head,
.card-flush > .card-note { padding-left: 22px; padding-right: 22px; }

.section-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-3); font-weight: 650;
}

/* ---- notices ------------------------------------------------------------ */

.notice {
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: var(--radius);
  padding: 11px 14px;
  font-size: 14px;
  margin-bottom: 16px;
  background: var(--surface-2);
  color: var(--text);
}
.notice:last-child { margin-bottom: 0; }
.notice strong { display: block; margin-bottom: 2px; }
.notice.info   { background: var(--info-bg);   border-color: var(--info-border);   border-left-color: var(--info); }
.notice.warn   { background: var(--warn-bg);   border-color: var(--warn-border);   border-left-color: var(--warn); }
.notice.danger { background: var(--danger-bg); border-color: var(--danger-border); border-left-color: var(--danger); }
.notice.ok     { background: var(--ok-bg);     border-color: var(--ok-border);     border-left-color: var(--ok); }

.hint { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }

/* ---- tables ------------------------------------------------------------- */

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
  text-align: left;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-3); font-weight: 650;
  padding: 0 14px 8px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--surface-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 13px; }
a.mono { white-space: nowrap; }
.nowrap { white-space: nowrap; }
.muted { color: var(--text-3); }
.strike { text-decoration: line-through; color: var(--text-3); }

tr.awaiting td { background: var(--warn-bg); }
tr.awaiting td:first-child { box-shadow: inset 3px 0 0 var(--warn); }

.days-cell { text-align: right; white-space: nowrap; }
.days-big {
  font-size: 22px; font-weight: 650; line-height: 1.1;
  font-variant-numeric: tabular-nums; color: var(--warn-strong);
  display: block;
}
.days-big.high { font-size: 26px; color: var(--danger); }
.days-unit { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); }

/* ---- chase panel -------------------------------------------------------- */

.chase {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-left: 3px solid var(--warn);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.chase h2 { color: var(--warn-strong); }
.chase-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.chase-list li {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  font-size: 14px;
}
.chase-days {
  font-family: var(--mono); font-weight: 650; color: var(--warn-strong);
  min-width: 84px;
}

/* ---- badges ------------------------------------------------------------- */

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-2);
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.badge.ok     { background: var(--ok-bg);     border-color: var(--ok-border);     color: var(--ok); }
.badge.warn   { background: var(--warn-bg);   border-color: var(--warn-border);   color: var(--warn-strong); }
.badge.danger { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); }
.badge.info   { background: var(--info-bg);   border-color: var(--info-border);   color: var(--info); }

/* ---- definition grids --------------------------------------------------- */

.dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px 24px;
  margin: 0;
}
.dl > div { min-width: 0; }
.dl dt {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-3); font-weight: 650; margin-bottom: 3px;
}
.dl dd { margin: 0; font-size: 14.5px; overflow-wrap: anywhere; }
.dl dd.big { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---- forms -------------------------------------------------------------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.field { display: flex; flex-direction: column; min-width: 0; }
.field.span-2 { grid-column: span 2; }
@media (max-width: 620px) { .field.span-2 { grid-column: span 1; } }
.field > label {
  font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 5px;
}
.field .req { color: var(--danger); font-weight: 700; }
input[type="text"], input[type="email"], input[type="password"],
input[type="date"], input[type="number"], select, textarea {
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 8px 10px;
  width: 100%;
  min-width: 0;
}
input:disabled, select:disabled { background: var(--surface-2); color: var(--text-3); }
input::placeholder { color: var(--text-3); }
/* The native control keeps its own affordance — a select that looks like a
   text box is a select nobody opens. */
select { cursor: pointer; }
textarea { min-height: 72px; resize: vertical; }
/* A six-digit code is six digits wide, not the width of the card. */
input#code {
  max-width: 220px;
  font-family: var(--mono);
  letter-spacing: 0.16em;
}
.stack + form { margin-top: 18px; }

.checkline { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.checkline input { width: auto; }

.form-actions {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding-top: 4px;
}

/* ---- buttons ------------------------------------------------------------ */

.btn {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
a.btn, a.btn:hover { text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-on); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.small { font-size: 13px; padding: 5px 11px; }
.btn.link {
  border-color: transparent; background: transparent; color: var(--accent);
  padding: 8px 4px;
}
.btn.link:hover { background: transparent; text-decoration: underline; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--surface); }

/* ---- sign in ------------------------------------------------------------ */

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 20px 40px;
}
.auth-card { width: 100%; max-width: 420px; }
.auth-mark { margin-bottom: 20px; }
.auth-mark .brand-name { font-size: 18px; }
.auth-card .card { margin-bottom: 14px; }
.auth-foot { font-size: 12.5px; color: var(--text-3); text-align: center; }
.programme-list { display: grid; gap: 8px; }
.programme-list button {
  text-align: left;
  width: 100%;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}

/* ---- billing line editor ------------------------------------------------ */

.lines { display: grid; gap: 12px; margin-bottom: 16px; }
.line-row {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 14px 16px;
}
.line-row-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
}
.line-row-head .section-label { flex: 1 1 auto; }
.line-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.line-row .field > label { font-size: 12px; }
.line-row input, .line-row select { background: var(--surface); }

.line-warn { margin-top: 12px; }
.line-warn .notice { margin-bottom: 0; font-size: 13px; }

/* ---- adjudication result ------------------------------------------------ */

.totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: start;
  gap: 16px;
  padding: 16px 0 4px;
}
.total-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--surface-2);
}
.total-box .section-label { display: block; margin-bottom: 4px; }
.total-box .amount { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.total-box.emphasis { background: var(--info-bg); border-color: var(--info-border); }

/* The split of "billable to your client": above the limit vs not covered at
   all. It sits inside the figure it explains, never beside it. */
.dl .split { max-width: 260px; }

.total-box .split, .dl .split {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 12px;
  margin: 10px 0 0;
  padding-top: 9px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.total-box .split dt, .dl .split dt { color: var(--text-2); font-size: 13px;
  text-transform: none; letter-spacing: 0; font-weight: 400; margin-bottom: 0; }
.total-box .split dd, .dl .split dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.reasons { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 5px; }
.reasons li {
  font-size: 13px;
  color: var(--text-2);
  padding-left: 12px;
  border-left: 2px solid var(--border-strong);
}
.reasons li .code {
  font-family: var(--mono); font-size: 11.5px; color: var(--text-3);
  display: block;
}

/* ---- submissions -------------------------------------------------------- */

.submission { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 16px; }
.submission:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.submission-head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px;
}

/* ---- misc --------------------------------------------------------------- */

.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-2);
}
.empty h2 { margin-bottom: 6px; }
.empty p { max-width: 46ch; margin-left: auto; margin-right: auto; }
.empty .form-actions { justify-content: center; margin-top: 16px; }

.loading { color: var(--text-3); padding: 32px 0; text-align: center; }

.stack { display: grid; gap: 10px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.footnote {
  margin-top: 28px;
  font-size: 12.5px;
  color: var(--text-3);
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

/* =============================================================================
   OPERATIONS PORTAL
   Shares every token above. Only layout that the counsel screens do not need
   lives down here.
   ========================================================================== */

.wrap.wide { max-width: 1360px; }

.topbar.ops { border-bottom-color: var(--border-strong); }
/* The operations frame is wider than the counsel one, so its header has to be
   too — otherwise the brand sits inboard of the content it labels. */
.topbar.ops .topbar-inner { max-width: 1360px; }

/* ---- queue tiles: the dashboard IS the navigation ------------------------ */

/* Six queues read as two rows of three. Auto-fit would put five on one row and
   orphan the sixth, which makes the set look like a mistake. */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } }
.tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px 20px 16px;
  color: var(--text);
  text-decoration: none;
}
.tile:hover { border-color: var(--border-strong); text-decoration: none; box-shadow: var(--shadow-lg); }
.tile-count {
  font-size: 34px; font-weight: 650; line-height: 1.05;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.tile-label { font-size: 14px; font-weight: 600; }
.tile-detail { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.tile.alert { background: var(--warn-bg); border-color: var(--warn-border); }
.tile.alert .tile-count { color: var(--warn-strong); }
.tile.alert .tile-detail { color: var(--warn); }

/* ---- separation of duties, shown rather than discovered ------------------ */

.gate {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-3);
  max-width: 42ch;
}
.gate-why { line-height: 1.4; }

/* ---- two-column detail --------------------------------------------------- */

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  align-items: start;
}
.two-col .card { margin-bottom: 0; }
.dl > div.wide { grid-column: 1 / -1; }

/* ---- tabs ---------------------------------------------------------------- */

.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tab {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ---- audit trail --------------------------------------------------------- */

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.timeline li:last-child { border-bottom: 0; }
.tl-when {
  font-size: 12.5px; color: var(--text-3);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.tl-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tl-event { font-weight: 600; font-size: 14px; }
.tl-move { font-size: 12.5px; color: var(--text-2); font-family: var(--mono); }
.tl-actor { font-size: 12.5px; color: var(--text-3); }
.tl-payload {
  font-size: 12px; color: var(--text-3); font-family: var(--mono);
  overflow-wrap: anywhere;
}

/* ---- a one-time secret ---------------------------------------------------- */

.invite-card { border-color: var(--warn-border); border-left: 3px solid var(--warn); }
.secret {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.secret-value {
  flex: 1 1 320px;
  font-family: var(--mono);
  font-size: 13px;
  overflow-wrap: anywhere;
  user-select: all;
}

/* ---- controls ------------------------------------------------------------- */

.control-detail { margin-top: 6px; }
.control-detail code {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius);
  padding: 8px 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

tr.muted td { color: var(--text-3); }

/* A quiet, inline action that is not a button — "Forgot your password?" sits
   under the sign-in form and must not compete with Sign in for attention. */
.form-actions.subtle { margin-top: .35rem; }
.btn-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: .86rem;
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
}
.btn-link:hover { text-decoration: underline; }
/* --muted was never defined anywhere, so this rule did nothing and a disabled
   link kept the accent colour — reading as clickable while ignoring clicks.
   The cooldown countdown on the sign-in screen is where that shows. */
.btn-link:disabled { color: var(--text-3); cursor: default; text-decoration: none; }

/* Recovery codes. Shown once, so they have to be readable and copyable at a
   glance — people photograph or print this. */
.codes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: .4rem;
  margin: .9rem 0;
}
.code-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .45rem .4rem;
  text-align: center;
  font-size: .82rem;
  /* Never wrap a code across lines: these get transcribed by hand, and a
     break mid-token is read as two codes or as a hyphen that is not there. */
  white-space: nowrap;
  overflow-x: auto;
}

/* ---- authenticator enrolment ---------------------------------------------
   The QR is the primary path. It is a data: URI produced by the server (the
   CSP is script-src 'self', so nothing draws a QR in the page) and is always
   painted on white regardless of theme: a QR inverted by a dark background is
   unscannable by most phone cameras, and the quiet zone only works if the
   frame around the symbol is light too.                                     */
.qr-frame {
  display: inline-block;
  /* The parent is a grid, which stretches its children: without this the
     white panel runs the full width of the card with the symbol in one
     corner, which reads as a broken image rather than a QR code. */
  width: fit-content;
  justify-self: start;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 12px;
  line-height: 0;
}
.qr {
  display: block;
  width: 240px;
  height: 240px;
  /* Modules are squares. Smoothing them turns a scannable grid into grey mush
     on a screen the camera is already reading at an angle. */
  image-rendering: pixelated;
}
@media (max-width: 420px) {
  .qr { width: 200px; height: 200px; }
}

/* The manual fallback. Closed by default when there is a QR — it is for the
   minority whose authenticator cannot use the camera — but it must be findable,
   because "I can't scan it" is exactly the moment someone starts looking. */
.manual-entry { margin-top: 4px; }
.manual-entry > summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--accent);
  padding: 4px 0;
}
.manual-entry > summary:hover { text-decoration: underline; }
.manual-entry > .stack {
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}
