/* Wofanu app stylesheet: sign-in, workspace and operator console.
   Styles the existing app markup (page-head, panel, list-row, pill, finding, plain buttons, status-message)
   so the views migrate as they are. Same tokens as the landing. Dark first; light mirrors every token.
   CSP-safe: no inline styles are needed anywhere. Orange appears only in the mark. */

@font-face {
  font-family: "Recursive";
  font-style: oblique 0deg 15deg;
  font-weight: 300 1000;
  font-display: swap;
  src: url("fonts/recursive-latin-full-normal.woff2") format("woff2-variations"), url("fonts/recursive-latin-full-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Recursive";
  font-style: oblique 0deg 15deg;
  font-weight: 300 1000;
  font-display: swap;
  src: url("fonts/recursive-latin-ext-full-normal.woff2") format("woff2-variations"), url("fonts/recursive-latin-ext-full-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ground: #0B1220;
  --side: #0D1526;
  --surface: #131D31;
  --surface-2: #0F1829;
  --field: #0D1526;
  --field-line: #617596;
  --line: #26344F;
  --line-strong: #3A4B6B;
  --text: #EAF0F7;
  --text-2: #C3CEDD;
  --muted: #8E9BB3;
  --dot: #FF6B3D;
  --danger: #FF9C9C;
  --danger-line: #7A3B45;
  --danger-bg: #2A1620;
  --btn-bg: #EAF0F7;
  --btn-fg: #0B1220;
  --btn-hover: #FFFFFF;
  --focus: #EAF0F7;
  --backdrop: rgba(4, 8, 16, 0.66);
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.25), 0 24px 48px -32px rgba(0, 0, 0, 0.7);
  --sun-display: block;
  --moon-display: none;
  --font: "Recursive", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Recursive", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --casual: "CASL" 0.5, "MONO" 0, "CRSV" 0.5;
  --semi: "CASL" 0.2, "MONO" 0, "CRSV" 0.5;
  --linear: "CASL" 0, "MONO" 0, "CRSV" 0.5;
  --mono: "CASL" 0, "MONO" 1, "CRSV" 0.5;
  --fs-small: 0.9375rem;
  --fs-meta: 0.8125rem;
  --radius: 14px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ground: #F4F6F9;
    --side: #EDF1F6;
    --surface: #FFFFFF;
    --surface-2: #F4F6F9;
    --field: #FFFFFF;
    --field-line: #7E8BA0;
    --line: #D5DCE6;
    --line-strong: #A9B5C7;
    --text: #0B1220;
    --text-2: #27344D;
    --muted: #4F5C74;
    --danger: #B42318;
    --danger-line: #E3B4AE;
    --danger-bg: #FDF0EE;
    --btn-bg: #0B1220;
    --btn-fg: #F4F6F9;
    --btn-hover: #26344F;
    --focus: #0B1220;
    --backdrop: rgba(11, 18, 32, 0.4);
    --shadow: 0 1px 0 rgba(11, 18, 32, 0.04), 0 24px 48px -30px rgba(11, 18, 32, 0.28);
    --sun-display: none;
    --moon-display: block;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --ground: #F4F6F9;
  --side: #EDF1F6;
  --surface: #FFFFFF;
  --surface-2: #F4F6F9;
  --field: #FFFFFF;
  --field-line: #7E8BA0;
  --line: #D5DCE6;
  --line-strong: #A9B5C7;
  --text: #0B1220;
  --text-2: #27344D;
  --muted: #4F5C74;
  --danger: #B42318;
  --danger-line: #E3B4AE;
  --danger-bg: #FDF0EE;
  --btn-bg: #0B1220;
  --btn-fg: #F4F6F9;
  --btn-hover: #26344F;
  --focus: #0B1220;
  --backdrop: rgba(11, 18, 32, 0.4);
  --shadow: 0 1px 0 rgba(11, 18, 32, 0.04), 0 24px 48px -30px rgba(11, 18, 32, 0.28);
  --sun-display: none;
  --moon-display: block;
  color-scheme: light;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  font-variation-settings: var(--linear);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 800; font-variation-settings: var(--casual); letter-spacing: -0.012em; line-height: 1.15; text-wrap: balance; }
p, ul, ol, dl { margin: 0; }
a { color: var(--text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
code, pre, kbd { font-family: var(--font-mono); font-variation-settings: var(--mono); }
code { font-size: 0.875em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

.skip-product {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 50;
  background: var(--text);
  color: var(--ground);
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
}
.skip-product:focus { top: 12px; }

/* Brand: wordmark, then the call mark */
.brand { display: inline-flex; align-items: center; gap: 0.032em; line-height: 1; color: var(--text); text-decoration: none; border-radius: 6px; }
.brand-word { font-weight: 800; font-variation-settings: var(--casual); letter-spacing: -0.01em; }
.brand .mark { width: 1.397em; height: 0.98em; position: relative; top: 0.07em; flex: none; }
.mark .c { fill: var(--text); stroke: var(--text); stroke-width: 1.8; stroke-linejoin: round; }
.mark .d { fill: var(--dot); }

/* Tool buttons: theme toggle and the locale control's trigger */
.tool-button, .app .tool-button, body > .main .tool-button, dialog .tool-button {
  display: inline-grid;
  place-items: center;
  grid-auto-flow: column;
  gap: 6px;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-family: var(--font-mono);
  font-variation-settings: var(--mono);
  font-size: 12.5px;
  cursor: pointer;
}
.tool-button:hover, .app .tool-button:hover, body > .main .tool-button:hover { border-color: var(--line); color: var(--text); background: transparent; }
.tool-button svg { width: 18px; height: 18px; }
.i-sun { display: var(--sun-display); }
.i-moon { display: var(--moon-display); }

/* App shell: sidebar and content */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px 14px 16px;
  background: var(--side);
  border-right: 1px solid var(--line);
}
.side-top { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px 2px; }
.side-top .brand { font-size: 1.45rem; padding: 4px 6px; }
.side-top .ws { grid-column: 1 / -1; }
.ws { display: grid; gap: 1px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.ws-name { font-weight: 700; font-variation-settings: var(--semi); font-size: var(--fs-small); }
.ws-sub { font-size: var(--fs-meta); color: var(--muted); }
body[data-mode="operator"] .ws { border-color: var(--text); }
.nav { display: grid; gap: 2px; }
.nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--text-2);
  text-decoration: none;
  font-size: var(--fs-small);
}
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.is-active, .nav a[aria-current="page"] { background: var(--surface); color: var(--text); font-weight: 700; box-shadow: inset 2px 0 0 var(--text); }
.nav a[href="/operator"], .nav a[href="/workspace"] { margin-top: 10px; border: 1px solid var(--line); }
.side-foot { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--line); font-size: var(--fs-meta); color: var(--muted); overflow-wrap: anywhere; }
.main { min-width: 0; }
.app .main-inner { max-width: 1060px; margin: 0 auto; padding: 36px 32px 72px; display: grid; gap: 18px; align-content: start; }

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: 0; z-index: 20; height: auto; overflow: visible; gap: 6px; padding: 8px 16px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-top { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px; }
  .side-top .brand { font-size: 1.25rem; padding: 4px 0; }
  .side-top .ws { grid-column: 2; grid-row: 1; padding: 0; border: 0; background: none; min-width: 0; }
  .ws-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-weight: 600; }
  .ws-sub { display: none; }
  .nav { display: flex; overflow-x: auto; gap: 2px; margin: 0 -16px; padding: 0 12px 6px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; padding: 0 10px; }
  .nav a.is-active, .nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--text); }
  .nav a[href="/operator"], .nav a[href="/workspace"] { margin-top: 0; }
  .side-foot { display: none; }
  .app .main-inner { padding: 22px 16px 56px; }
}

/* Page head and panels */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; padding-bottom: 6px; }
.page-head h1 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.15rem); line-height: 1.1; }
.page-sub { margin-top: 8px; color: var(--muted); font-size: var(--fs-small); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.panel-head { padding: 16px 20px 0; }
.panel-head h2 { font-size: 1.0625rem; font-weight: 750; letter-spacing: -0.005em; }
.panel-body { padding: 12px 20px 20px; display: grid; gap: 12px; color: var(--text-2); min-width: 0; }
.panel-body h2 { font-size: 1.375rem; color: var(--text); }
.panel-body strong { color: var(--text); }
.panel-body > ul, .panel-body > ol { padding-left: 1.2em; display: grid; gap: 6px; }
.panel-body details summary { cursor: pointer; color: var(--text); font-weight: 600; }
.panel-body details ul { padding-left: 1.2em; margin-top: 8px; display: grid; gap: 4px; font-size: var(--fs-meta); }
@media (max-width: 600px) { .panel-head { padding: 14px 16px 0; } .panel-body { padding: 10px 16px 16px; } }

/* Recorded progress: the events list reads as a timeline */
.panel-body > ol:has(time) { list-style: none; padding: 0; gap: 0; }
.panel-body > ol:has(time) li { position: relative; padding: 0 0 12px 22px; font-family: var(--font-mono); font-variation-settings: var(--mono); font-size: 13px; }
.panel-body > ol:has(time) li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--text); background: var(--surface); }
.panel-body > ol:has(time) li::after { content: ""; position: absolute; left: 7px; top: 17px; bottom: 0; border-left: 1px solid var(--line-strong); }
.panel-body > ol:has(time) li:last-child { padding-bottom: 0; }
.panel-body > ol:has(time) li:last-child::after { display: none; }
.panel-body > ol:has(time) li:last-child::before { background: var(--text); }

/* Lists of requests and records */
.list-row { display: grid; gap: 3px; padding: 14px 0; border-top: 1px solid var(--line); min-width: 0; }
.panel-body > .list-row:first-child, #history > .list-row:first-child { border-top: 0; padding-top: 2px; }
.list-row > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--muted); }
.list-row a { font-weight: 700; font-variation-settings: var(--semi); text-decoration: none; overflow-wrap: anywhere; }
.list-row a:hover { text-decoration: underline; }
.list-row p { color: var(--text-2); overflow-wrap: anywhere; }
.small { font-size: var(--fs-meta); color: var(--muted); }
/* Operator rows and tables print the state as plain text first; give it the tag look without changing markup */
.list-row > p:first-of-type > span[title]:first-child, .tbl td > span[title]:only-child, .list-row > p > span[title]:not(:first-child) {
  display: inline-block;
  font-family: var(--font-mono);
  font-variation-settings: var(--mono);
  font-size: 12px;
  line-height: 1.35;
  padding: 1px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text-2);
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* State pills. The app prints the recorded state; styling keys off the raw value in the inner title */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-variation-settings: var(--mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text-2);
  white-space: nowrap;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; flex: none; }
.pill:has([title="waiting"], [title="received"], [title="accepted"], [title="analysing"], [title="pending"], [title="sending"], [title="in_flight"], [title="registered"], [title="open"]) { border-style: dashed; }
.pill:has([title="report_ready"], [title="ready"], [title="complete"], [title="active"], [title="acknowledged"], [title="fix reported"]) { color: var(--text); border-color: var(--text); }
.pill:has([title="report_ready"], [title="ready"], [title="complete"], [title="active"], [title="acknowledged"], [title="fix reported"])::before { background: currentColor; }
.pill:has([title="declined"], [title="unsupported"], [title="failed"], [title="cancelled"], [title="suspended"], [title="purged"], [title="uncertain"], [title="configuration_pending"], [title="disputed"], [title="accepted risk"]) { color: var(--muted); background: var(--surface-2); border-color: var(--line); }
.pill:has([title="declined"], [title="unsupported"], [title="failed"], [title="cancelled"], [title="suspended"], [title="purged"], [title="uncertain"], [title="configuration_pending"])::before { border-radius: 1px; width: 8px; height: 1.5px; border: 0; background: currentColor; }
/* Evidence, availability and outcome labels on findings use the report's label styles */
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; }
.badge-row .pill::before { display: none; }
.pill:has([title="established" i]) { color: var(--text); border-color: var(--text); border-style: solid; }
.pill:has([title="candidate" i]) { border-style: dashed; }
.pill:has([title="not established" i], [title="not_established" i]) { color: var(--muted); border-style: dotted; border-color: var(--muted); }
.pill:has([title="disproved" i]) { background: var(--surface-2); border-color: var(--line); }
.pill:has([title="not analysed" i], [title="not_analysed" i]) { color: var(--muted); background: var(--surface-2); border-color: transparent; }
.pill:has([title="analysed" i]) { color: var(--text-2); border-color: var(--line-strong); }
.pill:has([title="rule violation" i], [title="rule_violation" i]) { color: var(--ground); background: var(--text); border-color: var(--text); }
.pill:has([title="known fix" i], [title="known_fix" i]) { color: var(--muted); border-color: var(--line-strong); }

/* Buttons. The app renders plain <button> elements; the role comes from type and data-action */
.app button, body > .main button, dialog button, .demo-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--muted);
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 650;
  font-variation-settings: var(--semi);
  font-size: var(--fs-small);
  line-height: 1.2;
  cursor: pointer;
  justify-self: start;
}
.app button:hover, body > .main button:hover, dialog button:hover { border-color: var(--text); }
.app button[type="submit"], body > .main button[type="submit"], dialog button[type="submit"],
.page-head > button[data-action="request"], button[data-action="onboard"], button[data-action="publish"], .btn-primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
  border-color: transparent;
}
.app button[type="submit"]:hover, body > .main button[type="submit"]:hover, dialog button[type="submit"]:hover,
.page-head > button[data-action="request"]:hover, button[data-action="onboard"]:hover, button[data-action="publish"]:hover, .btn-primary:hover { background: var(--btn-hover); }
.app button[data-action="delete"], .app button[data-action="delete-account"], .app button[data-action="user-delete"], .app button[data-action="delete-inquiry"] {
  color: var(--danger);
  border-color: var(--danger);
}
.app button[data-action="delete"]:hover, .app button[data-action="delete-account"]:hover, .app button[data-action="user-delete"]:hover, .app button[data-action="delete-inquiry"]:hover { background: var(--danger-bg); border-color: var(--danger); }
button[data-close-dialog], #different-email { border-color: transparent; color: var(--text-2); }
button[data-close-dialog]:hover, #different-email:hover { border-color: var(--line); color: var(--text); }
button:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-secondary { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--muted); border-radius: 9px; text-decoration: none; font-weight: 650; width: fit-content; }

/* Forms */
form { display: grid; gap: 14px; min-width: 0; }
label { display: grid; gap: 6px; font-size: var(--fs-small); font-weight: 600; color: var(--text-2); min-width: 0; }
input:not([type="file"]):not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--field-line);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-weight: 400;
  font-size: 1rem;
}
textarea { min-height: 104px; resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--text); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[type="file"] { font: inherit; font-size: var(--fs-small); color: var(--text-2); }
input[type="file"]::file-selector-button { font: inherit; font-weight: 650; margin-right: 12px; padding: 8px 12px; border: 1px solid var(--muted); border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; }
#code { font-family: var(--font-mono); font-variation-settings: var(--mono); font-size: 1.375rem; letter-spacing: 0.32em; max-width: 14ch; }
.operator-json { font-family: var(--font-mono); font-variation-settings: var(--mono); font-size: 13px; min-height: 220px; }
.history-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 240px); gap: 12px; }
form[data-user-search] { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.response-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.response-fields > label:nth-of-type(1) { grid-column: 1; grid-row: 1; }
.response-fields > label:nth-of-type(3) { grid-column: 2; grid-row: 1; }
.response-fields > label:nth-of-type(2) { grid-column: 1 / -1; grid-row: 2; }
.response-fields > button { grid-column: 1; grid-row: 3; }
.response-fields > p { grid-column: 1 / -1; grid-row: 4; }
form[data-state] { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
form[data-state] > label:first-child, form[data-state] > label:last-of-type, form[data-state] > button, form[data-state] > p { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .history-filters, form[data-user-search], .response-fields, form[data-state] { grid-template-columns: minmax(0, 1fr); }
  .response-fields > *, form[data-state] > * { grid-column: auto; grid-row: auto; }
}

/* Status and notices */
.status-message, [role="status"] { font-size: var(--fs-small); color: var(--muted); }
.status-message:empty, #sign-in-status:empty, #start-status:empty { display: none; }
.status-message.error, [role="alert"] { color: var(--danger); }
.original-notice { font-size: var(--fs-meta); color: var(--muted); }
.service-notice { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text-2); font-size: var(--fs-small); }
.service-notice strong { display: block; color: var(--text); margin-bottom: 2px; }

/* Findings: the report's evidence card */
.finding { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.f-body { padding: 18px 20px; display: grid; gap: 10px; }
.f-title { font-size: 1.375rem; font-weight: 750; line-height: 1.25; }
.f-consequence { color: var(--text-2); }
.f-next { font-weight: 600; color: var(--text); }
.f-evidence { border-top: 1px solid var(--line); }
.f-evidence > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 13px 20px; cursor: pointer; font-weight: 650; }
.f-evidence > summary::-webkit-details-marker { display: none; }
.f-evidence > summary::before { content: "+"; font-family: var(--font-mono); font-variation-settings: var(--mono); color: var(--muted); width: 1ch; }
.f-evidence[open] > summary::before { content: "\2212"; }
.f-evidence > div { padding: 0 20px 18px; display: grid; gap: 10px; color: var(--text-2); font-size: var(--fs-small); }
.f-evidence h4 { font-family: var(--font-mono); font-variation-settings: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.f-evidence ol, .f-evidence ul:not(.source-list) { padding-left: 1.2em; display: grid; gap: 4px; }
.source-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-family: var(--font-mono); font-variation-settings: var(--mono); font-size: 12.5px; }
.f-decide { border-top: 1px solid var(--line); padding: 16px 20px 20px; display: grid; gap: 12px; background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.f-decide > p { color: var(--text-2); }

/* Tables and raw records */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.tbl th { text-align: left; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-variation-settings: var(--mono); font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text-2); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td a { font-weight: 650; }
.report-prose { margin: 0; padding: 12px 14px; max-height: 320px; overflow: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; font-size: 12.5px; line-height: 1.5; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }

/* The start-review dialog */
dialog { width: min(580px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
dialog::backdrop { background: var(--backdrop); }
#start-form { padding: 20px 22px 22px; }
#start-form .page-head { align-items: center; flex-wrap: nowrap; padding: 0; }
#start-form .page-head h2 { font-size: 1.4rem; }
#start-form > p { color: var(--text-2); font-size: var(--fs-small); }

/* Sign-in: a single centred column without the sidebar */
body > .main .main-inner { width: 100%; max-width: 520px; margin: 0 auto; padding: 28px 16px 64px; display: grid; gap: 18px; }
.signin-header { display: flex; align-items: center; gap: 4px; padding-bottom: 18px; }
.signin-header .brand { font-size: 1.5rem; margin-right: auto; }
body > .main .page-head { padding-top: 8px; }
body > .main .page-head p { margin-top: 8px; color: var(--muted); }
body > .main .panel-body { padding: 20px; gap: 16px; }
#code-recipient { color: var(--text); font-weight: 600; }

/* Template-only helpers for the locale stand-in (the real control keeps its own markup) */
.locale-control .tool-button span { font-size: 12px; }
