/* Bright Foundry Admin — one stylesheet, system fonts, no build step. */

:root {
  --navy: #1D3557;
  --navy-deep: #14263e;
  --teal: #2A9D8F;
  --teal-dark: #1f7f73;
  --teal-tint: #e6f4f2;
  --gold: #C9A24B;
  --gold-tint: #faf3df;
  --gold-ink: #7a5b12;
  --paper: #FAF8F3;
  --white: #ffffff;
  --ink: #2A2F36;
  --muted: #5B6572;
  --line: #e2ddd2;
  --line-strong: #cfc8b9;
  --red: #b3392b;
  --red-tint: #fbeae7;
  --red-ink: #8a2a1f;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(29, 53, 87, 0.06), 0 4px 14px rgba(29, 53, 87, 0.05);
  --sidebar-w: 236px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.55 var(--font);
}
a { color: var(--teal-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; margin: 0 0 .5rem; font-weight: 700; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
h4 { font-size: .9rem; }
p { margin: 0 0 .75rem; }
code { font-family: var(--mono); font-size: .88em; background: rgba(29,53,87,.06); padding: .1em .35em; border-radius: 4px; }
pre.pre { white-space: pre-wrap; word-break: break-word; background: rgba(29,53,87,.05); padding: .75rem; border-radius: 6px; }
del { background: var(--red-tint); color: var(--red-ink); text-decoration: line-through; padding: 0 .1em; border-radius: 3px; }
ins { background: var(--teal-tint); color: var(--teal-dark); text-decoration: none; padding: 0 .1em; border-radius: 3px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.nowrap { white-space: nowrap; }
.break-all { word-break: break-all; }
.pre-line { white-space: pre-line; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: .5rem; top: .5rem; }

/* --- Layout ----------------------------------------------------------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--navy);
  color: #e6ebf2;
  display: flex;
  flex-direction: column;
  padding: 1.1rem .9rem;
  position: sticky;
  top: 0;
  height: 100vh;
}
.main { flex: 1 1 auto; min-width: 0; padding: 1.6rem clamp(1rem, 3vw, 2.4rem) 4rem; }
.layout-minimal .main { max-width: 1100px; margin: 0 auto; width: 100%; }
.brand { display: flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; }
.brand-mark { border-radius: 8px; flex: 0 0 auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 700; letter-spacing: .01em; }
.brand-sub { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; opacity: .75; }
.sidebar .brand-name, .sidebar .brand-sub { color: #fff; }
.topbar .brand-name { color: var(--navy); }
.topbar .brand-sub { color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: .15rem; margin-top: 1.4rem; }
.nav-link {
  display: flex; align-items: center; gap: .6rem;
  color: #d5deea; text-decoration: none; padding: .5rem .65rem; border-radius: 7px; font-weight: 500;
}
.nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-link.active { background: var(--teal); color: #fff; }
.nav-icon { width: 1.1rem; text-align: center; opacity: .8; font-size: .95rem; }
.sidebar-foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.12); }
.userbox { display: flex; flex-direction: column; gap: .15rem; font-size: .88rem; }
.userbox-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userbox-role { opacity: .75; font-size: .8rem; }
.sidebar .userbox .btn-ghost { color: #d5deea; border-color: rgba(255,255,255,.25); align-self: flex-start; margin-top: .35rem; }
.sidebar .userbox .btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem clamp(1rem, 3vw, 2.4rem);
  background: var(--white); border-bottom: 1px solid var(--line);
}
.topbar .userbox { flex-direction: row; align-items: center; gap: .7rem; }
.topbar-mobile { display: none; }
.mobile-nav { display: none; }
.nav-toggle { display: none; }

/* --- Bare (login) ------------------------------------------------------ */
.bare-main { max-width: 440px; margin: 0 auto; padding: clamp(2rem, 8vh, 5rem) 1rem 3rem; }
.bare-brand { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.4rem; }
.bare-brand img { border-radius: 10px; }
.bare-brand .brand-name { font-size: 1.15rem; color: var(--navy); }
.bare-brand .brand-sub { color: var(--muted); }
.auth-card { padding: 1.6rem; }
.auth-card .form-stack { margin-bottom: 1rem; }
.auth-title { margin-bottom: .25rem; }

/* --- Cards / page structure --------------------------------------------- */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.25rem; box-shadow: var(--shadow); margin-bottom: 1rem;
}
.page { max-width: 1180px; }
.page-narrow { max-width: 760px; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.page-header h1 { margin-bottom: .3rem; }
.page-header .muted { max-width: 70ch; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.kicker { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 .35rem; font-weight: 600; }
.kicker a { color: inherit; }
.section-title { margin: 1.4rem 0 .6rem; font-size: 1.05rem; }
.section-title .muted { font-weight: 500; font-size: .9rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.two-col > *, .overview-grid > *, .state-grid > * { min-width: 0; }
.two-col-wide { grid-template-columns: 1.6fr 1fr; }
.empty { color: var(--muted); font-style: italic; margin: 0; }
.meta-row { display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: center; margin-top: .3rem; font-size: .88rem; }

/* --- Flash ------------------------------------------------------------- */
.flash { padding: .75rem 1rem; border-radius: 8px; border: 1px solid; margin-bottom: 1rem; }
.flash-success { background: var(--teal-tint); border-color: #bfe3dd; color: #145c53; }
.flash-error { background: var(--red-tint); border-color: #f0c8c1; color: var(--red-ink); }
.flash-info { background: var(--gold-tint); border-color: #ead9ae; color: var(--gold-ink); }
.copy-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .5rem; }
.copy-row code { background: rgba(255,255,255,.7); padding: .35rem .5rem; word-break: break-all; }

/* --- Badges / chips ------------------------------------------------------ */
.badge { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .76rem; font-weight: 650; line-height: 1.5; border: 1px solid transparent; white-space: nowrap; }
.badge-neutral { background: #eceae4; color: var(--muted); }
.badge-teal { background: var(--teal-tint); color: var(--teal-dark); border-color: #bfe3dd; }
.badge-gold { background: var(--gold-tint); color: var(--gold-ink); border-color: #ead9ae; }
.badge-navy { background: #e7ecf4; color: var(--navy); border-color: #cfd9e8; }
.badge-red { background: var(--red-tint); color: var(--red-ink); border-color: #f0c8c1; }
.badge-outline { background: transparent; color: var(--muted); border-color: var(--line-strong); }
.chip { display: inline-block; padding: .25rem .7rem; border-radius: 999px; border: 1px solid var(--line-strong); font-size: .84rem; text-decoration: none; color: var(--ink); background: var(--white); }
.chip:hover { border-color: var(--navy); }
.chip-red { color: var(--red-ink); }
.chip-gold { color: var(--gold-ink); }
.chip-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip-clear { color: var(--muted); border-style: dashed; }
.verdict-summary { display: flex; flex-wrap: wrap; gap: .4rem; margin: .7rem 0; }
.chip-legend { line-height: 2; }
.chip-legend .badge { vertical-align: baseline; }

/* --- Verification status banners (color + icon + text, never color alone) --- */
.status-banner {
  display: flex; align-items: flex-start; gap: .55rem;
  padding: .65rem .9rem; border-radius: 8px; border: 1px solid; margin: .5rem 0 .8rem;
  font-size: .95rem; line-height: 1.45;
}
.status-verified { background: var(--teal-tint); border-color: #a9d9d1; color: #145c53; }
.status-unverified { background: var(--gold-tint); border-color: #e0cd97; color: var(--gold-ink); }
.status-banner .status-icon {
  flex: 0 0 auto; width: 1.35rem; height: 1.35rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .85rem; color: #fff; margin-top: .1rem;
}
.status-verified .status-icon { background: var(--teal-dark); }
.status-unverified .status-icon { background: var(--gold-ink); }
.status-compact { padding: .35rem .6rem; font-size: .86rem; margin: .25rem 0; }
.status-compact .status-icon { width: 1.1rem; height: 1.1rem; font-size: .7rem; margin-top: .05rem; }
.state-card-rules { font-weight: 600; color: var(--navy); margin-bottom: .3rem; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font: inherit; font-weight: 600; font-size: .92rem; line-height: 1.2;
  padding: .55rem 1rem; border-radius: 8px; border: 1px solid transparent; cursor: pointer;
  text-decoration: none; transition: background .12s, border-color .12s, color .12s;
}
.btn-sm { padding: .38rem .75rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
.btn-secondary { background: var(--white); color: var(--navy); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--navy); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { background: rgba(29,53,87,.05); }
.btn-danger-text { color: var(--red); }
.btn[disabled], .btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .6rem; }
.inline-form { display: inline; margin: 0; }
.inline-form .select-sm { vertical-align: middle; }

/* --- Forms ------------------------------------------------------------- */
.form-stack { display: flex; flex-direction: column; gap: .9rem; }
.form-stack .btn-row { margin-top: .2rem; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field label { font-weight: 600; font-size: .9rem; color: var(--navy); }
.field-help { color: var(--muted); font-size: .84rem; margin: 0; }
input[type="text"], input[type="email"], input[type="password"], select, textarea {
  font: inherit; color: var(--ink); background: var(--white);
  border: 1px solid var(--line-strong); border-radius: 7px; padding: .55rem .65rem; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(42,157,143,.18); outline: none; }
textarea { resize: vertical; min-height: 2.6rem; }
.select-sm { width: auto; padding: .3rem .4rem; font-size: .85rem; }
.checkbox { display: inline-flex; align-items: center; gap: .45rem; font-weight: 500; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: flex-end; padding: .9rem 1.25rem; }
.filter-bar .field { min-width: 220px; }
.filter-bar select { width: auto; min-width: 220px; }

/* --- Tables ------------------------------------------------------------ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; position: relative; }
.card { max-width: 100%; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: .6rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }
.table .cell-text { min-width: 18rem; }
.table .cell-request { min-width: 13rem; }
.table .cell-progress { min-width: 9rem; }
.table .btn-row { flex-wrap: nowrap; margin-top: 0; gap: .35rem; }
.table-compact td, .table-compact th { padding: .4rem .6rem; }
.row-muted td { opacity: .6; }

/* --- Definition lists / stats ----------------------------------------------- */
.dl { margin: 0; display: grid; gap: .55rem; }
.dl > div { display: grid; grid-template-columns: 9.5rem 1fr; gap: .5rem; }
.dl.compact > div { grid-template-columns: 8rem 1fr; }
.dl dt { color: var(--muted); font-size: .85rem; font-weight: 600; padding-top: .1rem; }
.dl dd { margin: 0; }
.stat-row { display: flex; gap: 1rem; margin: .9rem 0 .2rem; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; min-width: 7rem; }
.stat-n { font-size: 1.5rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.stat-l { font-size: .8rem; color: var(--muted); }
.summary-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .8rem; margin-bottom: .5rem; }
.stat-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; display: flex; flex-direction: column; }
.big-number { font-size: 2rem; font-weight: 700; color: var(--navy); margin: 0 0 .3rem; line-height: 1.1; }
.big-number .small { font-weight: 500; }
.plain-list { list-style: none; padding: 0; margin: 0 0 .5rem; display: grid; gap: .45rem; }
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.state-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.state-card-head h3 { font-size: 1.1rem; }
.overview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.ov-card h2 { font-size: 1rem; margin-bottom: .6rem; }
.placeholder-card { border-left: 4px solid var(--gold); }
.placeholder-card ul { margin: 0 0 .6rem; padding-left: 1.2rem; }
.placeholder-card li { margin-bottom: .35rem; }
.theme-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.theme-row { display: flex; justify-content: space-between; gap: 1rem; font-size: .92rem; }
.theme-count { font-weight: 700; color: var(--navy); }
.theme-bar { height: 6px; background: #eceae4; border-radius: 3px; overflow: hidden; }
.theme-bar-fill { height: 100%; background: var(--teal); }

/* --- Progress ------------------------------------------------------------ */
.progress { height: 8px; background: #e9e5da; border-radius: 4px; overflow: hidden; margin: .3rem 0; }
.progress-bar { height: 100%; background: var(--teal); border-radius: 4px; transition: width .25s ease; }
.progress-label { font-weight: 600; font-size: .9rem; color: var(--navy); }

/* --- My reviews list ----------------------------------------------------------- */
.review-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.review-list-item { display: grid; grid-template-columns: 1fr 220px; gap: 1rem 1.5rem; align-items: center; }
.review-list-title { font-weight: 700; font-size: 1.05rem; color: var(--navy); }
.review-list-message { color: var(--muted); font-style: italic; margin: .4rem 0 0; }
.review-list-progress { display: flex; flex-direction: column; gap: .35rem; }
.review-list-progress .btn { align-self: flex-start; }

/* --- Review page ---------------------------------------------------------------- */
.page-review .page { max-width: 880px; }
.requester-message { margin: .6rem 0; padding: .7rem 1rem; border-left: 4px solid var(--gold); background: var(--gold-tint); border-radius: 0 8px 8px 0; }
.requester-message p { margin: 0 0 .25rem; }
.requester-message footer { font-size: .85rem; color: var(--gold-ink); }
.review-toolbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .7rem 1rem; box-shadow: var(--shadow); margin-bottom: .4rem;
}
.review-toolbar-progress { flex: 1 1 240px; }
.review-toolbar-actions { display: flex; gap: .5rem; align-items: center; }
.review-autosave-note { margin: 0 0 1rem; }
.sources-ref summary { cursor: pointer; }
.sources-list { margin: .6rem 0 0; padding-left: 1.3rem; font-size: .9rem; }
.sources-list li { margin-bottom: .25rem; word-break: break-word; }
.review-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.review-card { padding: 1.25rem 1.4rem; border-left: 5px solid var(--line-strong); scroll-margin-top: 90px; }
.review-card[data-verdict="confirmed"] { border-left-color: var(--teal); }
.review-card[data-verdict="needs_correction"] { border-left-color: var(--red); }
.review-card[data-verdict="not_sure"] { border-left-color: var(--gold); }
.review-card-head { margin-bottom: .6rem; }
.review-card-title { font-size: 1.15rem; margin-bottom: .2rem; }
.statement { font-size: 1.05rem; line-height: 1.6; margin: .2rem 0 .8rem; color: var(--ink); }
.statement-link { margin-bottom: .2rem; }
.source-block { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem; margin-bottom: .8rem; }
.source-block h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: .45rem; }
.source-block blockquote { margin: 0 0 .5rem; padding-left: .8rem; border-left: 3px solid var(--gold); font-size: .93rem; color: var(--ink); white-space: pre-line; }
.source-block blockquote:last-child { margin-bottom: 0; }
.source-label { font-weight: 600; color: var(--navy); }
.card-links { font-size: .88rem; margin-bottom: .8rem; word-break: break-word; }
.card-links a { margin-right: .5rem; }
.diff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: .8rem; }
.diff-grid.compact { font-size: .9rem; }
.diff-col { border: 1px solid var(--line); border-radius: 8px; padding: .7rem .9rem; background: var(--paper); }
.diff-col h3, .diff-col h4 { font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: .4rem; }
.diff-col p { margin: 0; white-space: pre-line; }
.diff-after { border-color: #bfe3dd; }
.diff-empty p { color: var(--muted); font-style: italic; }
.verdict-form { border-top: 1px dashed var(--line); padding-top: .9rem; margin-top: .4rem; }
.verdict-question { font-weight: 600; color: var(--navy); margin-bottom: .5rem; }
.verdict-buttons { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .7rem; }
.verdict-btn {
  font: inherit; font-weight: 600; font-size: .92rem; padding: .55rem 1rem; border-radius: 999px;
  border: 2px solid var(--line-strong); background: var(--white); color: var(--ink); cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.verdict-btn:hover { border-color: var(--navy); }
.verdict-btn[disabled] { opacity: .55; cursor: not-allowed; }
.verdict-confirm.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.verdict-correct.active { background: var(--red); border-color: var(--red); color: #fff; }
.verdict-unsure.active { background: var(--gold); border-color: var(--gold); color: #fff; }
.verdict-btn.pending { border-style: dashed; }
.verdict-form textarea { font-size: .93rem; }
.verdict-status { display: flex; justify-content: space-between; gap: 1rem; min-height: 1.3rem; font-size: .85rem; margin-top: .35rem; }
.saved-indicator { color: var(--teal-dark); font-weight: 600; }
.saved-indicator.saving { color: var(--muted); font-weight: 500; }
.verdict-error { color: var(--red-ink); font-weight: 600; }
.review-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.4rem; padding: 1rem 1.25rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.review-footer p { margin: 0; }

/* --- Reviewer readability (welcome / guided / list pages) ---------------------- */
body.page-review { font-size: 17px; line-height: 1.6; }
.page-review .btn { min-height: 44px; }
.page-review .btn-sm { min-height: 40px; }
.page-review .verdict-btn { min-height: 44px; padding: .6rem 1.1rem; }
.page-review .review-card-title { font-size: 1.2rem; }
.page-review .statement { font-size: 1.1rem; line-height: 1.65; }
.page-review textarea { font-size: 1rem; }
.btn-xl { padding: .85rem 1.6rem; font-size: 1.1rem; min-height: 52px; width: 100%; }

/* --- Welcome / summary / thank-you -------------------------------------------- */
.welcome, .guided { max-width: 660px; margin: 0 auto; }
.welcome-card { padding: 1.8rem 1.9rem; }
.welcome-card h1 { font-size: 1.5rem; }
.welcome-intro { font-size: 1.08rem; line-height: 1.65; }
.welcome-points { margin: 0 0 1.2rem; padding-left: 1.3rem; }
.welcome-points li { margin-bottom: .5rem; }
.welcome-skip { text-align: center; margin: .9rem 0 0; }
.welcome-skip a { color: var(--muted); }
.summary-counts { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .55rem; font-size: 1.05rem; }
.summary-counts li { display: flex; align-items: center; gap: .6rem; }
.summary-counts .status-icon {
  flex: 0 0 auto; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem; color: #fff;
}
.summary-ok .status-icon { background: var(--teal-dark); }
.summary-wrong .status-icon { background: var(--red); }
.summary-unsure .status-icon { background: var(--gold-ink); }
.summary-flagged { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: .7rem; }
.summary-flagged li { border-left: 4px solid var(--red); background: var(--red-tint); border-radius: 0 8px 8px 0; padding: .6rem .9rem; }
.summary-flagged a { font-weight: 600; }
.summary-note { margin: .25rem 0 0; color: var(--ink); }
.summary-submit { margin-top: 1.2rem; }
.thanks-card { text-align: center; padding: 2.4rem 1.9rem; }
.thanks-icon {
  width: 3.2rem; height: 3.2rem; margin: 0 auto .9rem; border-radius: 50%;
  background: var(--teal); color: #fff; font-size: 1.6rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.thanks-card .btn { margin-top: .8rem; }

/* --- Guided one-at-a-time mode -------------------------------------------------- */
.guided-head { margin-bottom: 1rem; }
.guided-progress { margin-top: .4rem; }
.guided-card { padding: 1.6rem 1.7rem; border-left: 5px solid var(--line-strong); }
.guided-card[data-verdict="confirmed"] { border-left-color: var(--teal); }
.guided-card[data-verdict="needs_correction"] { border-left-color: var(--red); }
.guided-card[data-verdict="not_sure"] { border-left-color: var(--gold); }
.guided-title { font-size: 1.3rem; margin-bottom: .7rem; }
.guided .statement { font-size: 1.2rem; line-height: 1.6; }
.guided-buttons { flex-direction: column; align-items: stretch; gap: .6rem; }
.guided-buttons .verdict-btn { width: 100%; min-height: 52px; font-size: 1.05rem; border-radius: 10px; text-align: center; }
.guided-note { margin-top: .3rem; }
.guided-note label { font-size: 1rem; }
.guided-note textarea { min-height: 4.5rem; }
.guided-note .btn { margin-top: .3rem; align-self: flex-start; min-height: 48px; }
.guided-nav { display: flex; justify-content: space-between; gap: 1rem; margin: 1rem 0 .4rem; font-weight: 600; }
.guided-nav a { text-decoration: none; padding: .5rem .3rem; }
.guided-footnote { text-align: center; }

/* --- Admin request view ------------------------------------------------------- */
.admin-items { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.admin-item { border-left: 5px solid var(--line-strong); padding: 1rem 1.2rem; scroll-margin-top: 20px; }
.admin-item.verdict-confirmed { border-left-color: var(--teal); }
.admin-item.verdict-needs_correction { border-left-color: var(--red); }
.admin-item.verdict-not_sure { border-left-color: var(--gold); }
.admin-item-head { display: flex; justify-content: space-between; gap: .8rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: .4rem; }
.admin-item-head h3 { margin: 0; }
.admin-item .statement { font-size: .95rem; margin-bottom: .5rem; }
.reviewer-note { background: var(--gold-tint); border: 1px solid #ead9ae; border-radius: 8px; padding: .6rem .8rem; margin: .4rem 0 .6rem; white-space: pre-line; }
.admin-actions { margin-top: .4rem; }

/* --- Error page ------------------------------------------------------------ */
.error-page { max-width: 560px; padding: 2rem 0; }
.error-code { font-size: 3rem; font-weight: 800; color: var(--gold); margin: 0; line-height: 1; }

/* --- Responsive ------------------------------------------------------------- */
@media (max-width: 900px) {
  .layout-admin .sidebar { display: none; }
  .layout-admin .topbar-mobile { display: flex; position: sticky; top: 0; z-index: 20; }
  .layout-admin .nav-toggle { display: inline-flex; }
  .layout-admin .mobile-nav { display: flex; flex-direction: column; background: var(--navy); padding: .6rem .8rem 1rem; }
  .layout-admin .mobile-nav[hidden] { display: none; }
  .mobile-nav .nav-link { color: #d5deea; }
  .mobile-nav .nav-link.active { background: var(--teal); color: #fff; }
  .mobile-nav-foot { border-top: 1px solid rgba(255,255,255,.15); margin-top: .5rem; padding-top: .6rem; color: #e6ebf2; }
  .mobile-nav-foot .btn-ghost { color: #d5deea; border-color: rgba(255,255,255,.25); }
  .main { padding: 1.1rem 1rem 3rem; }
  .two-col, .two-col-wide { grid-template-columns: 1fr; }
  .review-list-item { grid-template-columns: 1fr; }
  .diff-grid { grid-template-columns: 1fr; }
  .review-toolbar { position: static; }
}
@media (max-width: 600px) {
  body { font-size: 14.5px; }
  body.page-review { font-size: 17px; }
  h1 { font-size: 1.35rem; }
  .welcome-card, .guided-card { padding: 1.2rem 1.1rem; }
  .thanks-card { padding: 1.8rem 1.1rem; }
  .card { padding: .9rem 1rem; }
  .review-card { padding: 1rem 1rem; }
  .dl > div, .dl.compact > div { grid-template-columns: 1fr; gap: .1rem; }
  .verdict-btn { flex: 1 1 auto; text-align: center; }
  .filter-bar .field, .filter-bar select { min-width: 0; width: 100%; }
  .topbar .userbox-role { display: none; }
}
