/* WEB-001 portal shell -- deliberately no framework/bundler (ADR-001-14
   SS1/SS6): one hand-written, dependency-free stylesheet, served as-is by
   FastAPI's StaticFiles, no build step. Mobile-first; the Morning Brief,
   signals and editorial pages share one readable content column.

   The portal is DARK in both OS themes (owner decision 2026-07-14: the
   product look follows the dark radar prototype, docs/prototype/index.html,
   like the login scene already did). This token set was previously the
   prefers-color-scheme:dark variant; it is now simply the theme, and the
   former light set is gone rather than left as dead weight. */

:root {
  --color-bg: #14171a;
  --color-surface: #1c2024;
  --color-text: #e8eaed;
  --color-muted: #9aa4af;
  --color-border: #30363d;
  --color-accent: #6ea2ff;
  --color-accent-contrast: #0d1117;
  --color-danger: #ff8a80;
  --color-danger-bg: #3a1f1d;
  --radius: 6px;
  --gap: 1rem;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

a {
  color: var(--color-accent);
}

.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.65rem 1.25rem;
  background: rgb(28 32 36 / 96%);
  border-bottom: 1px solid var(--color-border);
}

.topbar .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--color-text);
}

.brand-mark {
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
}

.brand-name {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.topnav {
  display: flex;
  align-items: center;
  justify-self: start;
  gap: 0.15rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.25rem;
  overflow-x: auto;
  scrollbar-width: thin;
  border: 1px solid var(--color-border);
  border-radius: 0.85rem;
  background: rgb(13 17 23 / 38%);
}

.topnav a {
  padding: 0.42rem 0.68rem;
  border-radius: 0.62rem;
  color: var(--color-muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.topnav a:hover,
.topnav a:focus-visible {
  color: var(--color-text);
  background: rgb(255 255 255 / 6%);
}

.topnav a[aria-current="page"] {
  color: var(--color-text);
  background: rgb(110 162 255 / 17%);
  box-shadow: inset 0 0 0 1px rgb(110 162 255 / 24%);
}

.logout-form {
  margin: 0;
}

.logout-form button {
  background: rgb(255 255 255 / 3%);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem;
}

main {
  order: 1;
  min-width: 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.filters label {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  color: var(--color-muted);
  gap: 0.25rem;
}

.filters select,
.filters input,
.auth-card input {
  font: inherit;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
}

.filters button,
.auth-card button {
  font: inherit;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius);
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  cursor: pointer;
}

.reset-filters {
  align-self: center;
  font-size: 0.85rem;
}

.signal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.signal-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
}

.signal-card h3 {
  margin: 0 0 0.35rem;
}

.signal-card a {
  text-decoration: none;
  color: inherit;
}

.signal-card .meta,
.signal-detail .meta {
  color: var(--color-muted);
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
}

.signal-card .summary {
  margin: 0;
}

.pagination {
  margin-top: 1rem;
}

.empty-state {
  color: var(--color-muted);
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.signal-detail {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.signal-detail section {
  margin-top: 1.25rem;
}

.signal-detail h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-muted);
}

.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-list li {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.85rem;
}

.evidence-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.evidence-list blockquote {
  margin: 0 0 0.35rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--color-accent);
}

.evidence-list .provenance {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* The brand lockup is a dark-scene raster on a near-black background, and
   its light-on-dark artwork is only legible over a dark backdrop -- so the
   whole login page is rendered black (no card, the logo dissolves into the
   page). The tokens below now simply restate the :root theme (the portal
   went dark-everywhere in 2026-07-14's radar restyle), kept explicit so
   this scene cannot drift if :root ever changes again -- EXCEPT the page
   background, which is blacker than the theme's #14171a on purpose: it
   must match the matte the owner's animated mark carries inside itself
   (logo/iskematika-logo-animated.svg draws a #030304 backdrop rect; the
   page follows the asset, never the reverse).
   Only login.html sets this class; every signed-in page keeps its themed
   shell. `html.auth-page` carries color-scheme too because the browser
   themes the viewport scrollbar off the ROOT element's color-scheme, not
   the body's. */
html.auth-page {
  color-scheme: dark;
  background: #030304;
}

body.auth-page {
  background: #030304;
  color-scheme: dark;
  --color-surface: #1c2024;
  --color-text: #e8eaed;
  --color-muted: #9aa4af;
  --color-border: #30363d;
  --color-accent: #6ea2ff;
  --color-accent-contrast: #0d1117;
  --color-danger: #ff8a80;
  --color-danger-bg: #3a1f1d;
  color: var(--color-text);
}

body.auth-page .layout {
  min-height: 100dvh;
  display: grid;
  place-items: center;
}

body.auth-page main {
  width: 100%;
}

/* Default .auth-card is the themed light card — account_password.html (the
   forced password-change form) renders it on the normal shell. The login
   page's dark scene strips the card below. */
.auth-card {
  max-width: 460px;
  margin: 2rem auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

body.auth-page .auth-card {
  max-width: 520px;
  margin: 0 auto;
  background: none;
  border: none;
  padding: 0;
}

/* Two-part lockup: animated SVG mark stacked above the raster wordmark
   (owner request 2026-07-15), both centered. Fixed rem sizes (not
   percentages of .auth-card) so the mark can be enlarged independently of
   the wordmark -- stacking removes the earlier row's overflow-vs-card-width
   problem entirely, so no off-card centering hack is needed here. */
.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
}

/* The animated SVG's own artwork (the decorative ring) isn't centered in its
   1000x1000 viewBox -- it's drawn around x~576/1000, not x~500/1000 -- so a
   geometrically-centered <img> box still reads as visually off-center. Nudge
   left by that fixed offset (~7.6% of the rendered width) so the ring itself,
   not just its bounding box, sits on the page's centerline. */
.auth-mark {
  width: 18.2rem;
  height: auto;
  transform: translateX(-1.38rem);
}

.auth-wordmark {
  width: 21.45rem;
  height: auto;
}

.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-card label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
}

/* One shared measure keeps email, password and submit aligned. */
.auth-field-narrow {
  align-items: center;
}

.auth-field-narrow > input {
  width: min(100%, 22rem);
}

.auth-password-field > label {
  align-self: center;
}

.auth-password-control {
  display: flex;
  width: min(100%, 22rem);
}

.auth-password-control input {
  width: 100%;
  min-width: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}

.auth-card button.password-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 2.8rem;
  width: 2.8rem;
  min-width: 2.8rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-left: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--color-surface);
  color: var(--color-muted);
}

.auth-card button.password-toggle:hover {
  color: var(--color-text);
  background: rgb(255 255 255 / 7%);
}

.auth-card button.password-toggle[hidden] {
  display: none;
}

.password-eye {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-eye-hide,
.password-toggle.is-visible .password-eye-show {
  display: none;
}

.password-toggle.is-visible .password-eye-hide {
  display: block;
}

.auth-card button.auth-submit {
  width: min(100%, 22rem);
  align-self: center;
}

.form-error {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

/* ---------------------------------------------------------------------
   EDIT-002: editorial review-queue UI (/review). Reuses every shell/filter/
   card class above unchanged (.filters, .signal-list, .signal-card,
   .empty-state, .pagination, .auth-card inputs) and only adds what is
   genuinely new: status/severity badges, the gate report, the evidence/
   claim panel (incl. the highlight_quotes <mark> primitive), and the
   review-action forms.
   --------------------------------------------------------------------- */

.badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-severity-block,
.badge-gate-block,
.badge-unverified,
.badge-assigned-other {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border-color: var(--color-danger);
}

.badge-severity-warn,
.badge-gate-warn,
.badge-interested-party {
  background: #3a2f10;
  color: #e0b23d;
  border-color: #8a6100;
}

.badge-severity-info,
.badge-gate-pass,
.badge-verified,
.badge-assigned-me {
  background: #123420;
  color: #7fc596;
  border-color: #1e7d34;
}

/* AUTOREV-001 (ADR-001-16): marks the "За три минуты" text as the machine
   editor's draft rather than the deterministic tier-count fallback -- a
   distinct, neutral accent (neither pass/verified green nor warn/block
   red: this is informational, not a judgement about the content). */
.badge-opus-draft {
  background: #14283d;
  color: #7fb4e0;
  border-color: #2c5b8a;
}

.filter-statuses {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.filter-statuses legend {
  font-size: 0.85rem;
  color: var(--color-muted);
  padding: 0 0.25rem;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
}

.assignment-actions {
  margin: 0.5rem 0 0;
}

.assignment-actions form {
  display: inline-block;
}

/* AUTOREV-001 (ADR-001-16): the selection drifted since the machine
   editor's "За три минуты" draft was generated -- a warning to
   regenerate, not a publish-blocking error (publish still proceeds, with
   the deterministic fallback text), so this stays in the amber warn
   family (matching .badge-severity-warn), never .action-error's red. */
.summary-draft-stale {
  background: #3a2f10;
  color: #e0b23d;
  border: 1px solid #8a6100;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.action-error {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

/* PUB-SAFE-110 (ADR-001-19): the signal's content moved past the revision its
   provenance verdict was stamped against (or it was never bound). Publication
   IS blocked until a re-gate, but the banner itself is an amber advisory, not
   a hard error -- the same warn family as .summary-draft-stale, never
   .action-error's red. */
.binding-stale-warning {
  background: #3a2f10;
  color: #e0b23d;
  border: 1px solid #8a6100;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.review-signal > section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1rem;
}

.review-header {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.claims-jump-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.claims-jump-list li {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  font-size: 0.8rem;
}

.evidence-claim {
  border-top: 1px solid var(--color-border);
  padding-top: 1rem;
  margin-top: 1rem;
}

.evidence-claim:first-of-type {
  border-top: none;
  margin-top: 0.5rem;
  padding-top: 0;
}

.evidence-claim:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.claim-text {
  font-size: 1rem;
}

.claim-text mark.evidence-match,
mark.evidence-match {
  background: #6b5b00;
  color: var(--color-text);
  border-radius: 3px;
  padding: 0 0.1rem;
}

.claim-backlink {
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.evidence-verification {
  margin: 0.25rem 0;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.edit-form label,
.action-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
}

.edit-form input,
.edit-form textarea,
.action-form input {
  font: inherit;
  width: 100%;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
}

.action-form {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.action-form button,
.edit-form button {
  font: inherit;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius);
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  cursor: pointer;
}

.btn-danger {
  background: var(--color-danger);
}

button:disabled {
  background: var(--color-muted);
  cursor: not-allowed;
  opacity: 0.7;
}

.publish-blocked {
  color: var(--color-muted);
  font-size: 0.9rem;
}

/* ---------------------------------------------------------------------
   WEB-001 + BRIEF-001: Executive Morning Brief home and editor preview.
   The brief fields remain plain text and inherit Jinja autoescape; this
   stylesheet only controls presentation.
   --------------------------------------------------------------------- */

.brief-date-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.morning-brief,
.brief-hero {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.brief-hero {
  padding: 1.5rem;
}

.brief-hero h1 {
  margin: 0.2rem 0 0.35rem;
  line-height: 1.2;
}

.brief-hero .meta,
.brief-item-kicker {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.eyebrow {
  margin: 0;
  color: var(--color-accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brief-summary {
  margin: 1rem 0 0;
  max-width: 75ch;
  font-size: 1.05rem;
}

.brief-items {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: brief-card;
}

.brief-item {
  counter-increment: brief-card;
  border-top: 1px solid var(--color-border);
  padding: 1.5rem;
}

.brief-item h2 {
  margin: 0.35rem 0 1rem;
  line-height: 1.25;
}

.brief-item h2::before {
  content: counter(brief-card) ". ";
  color: var(--color-muted);
}

.brief-item h2 a {
  color: inherit;
  text-decoration: none;
}

.brief-item h2 a:hover {
  color: var(--color-accent);
}

.brief-item h3 {
  margin: 0 0 0.35rem;
  color: var(--color-muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brief-item section {
  margin-top: 1.1rem;
}

.brief-item section > p {
  margin: 0;
}

.brief-item-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.brief-tags {
  margin-bottom: 1rem;
}

.brief-evidence {
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 1rem;
}

.brief-signal-link {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.empty-inline {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.brief-limitations {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem;
}

.brief-limitations h2 {
  margin-top: 0;
  font-size: 1rem;
}

.brief-empty h1 {
  margin-top: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

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

  .topnav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
  }

  .logout-form {
    grid-column: 2;
    grid-row: 1;
  }

  .brief-date-nav {
    flex-wrap: wrap;
  }

  .brief-hero,
  .brief-item,
  .brief-limitations {
    padding: 1rem;
  }
}

@media (max-width: 390px) {
  .topbar { padding-inline: 0.75rem; }
  .brand-mark { width: 2.4rem; height: 2.4rem; }
  .brand-name { font-size: 1rem; }
}

/* Radar edition view (prototype docs/prototype/index.html brought to the
   product): stat tiles, «За три минуты», client-side filters and a
   master-detail list over one edition. Default (no-JS) flow keeps every
   detail card visible in order; [data-radar-enhanced] is set by the inline
   script and switches the layout to master-detail. */

.radar-edition {
  background: transparent;
  border: 0;
  border-radius: 0;
  display: grid;
  gap: var(--gap);
}

.radar-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}

.radar-stat {
  display: grid;
  gap: 0.15rem;
  padding: 1rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.radar-stat-label {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.radar-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
}

.radar-stat-sub {
  color: var(--color-muted);
  font-size: 0.8rem;
}

.radar-brief {
  border-left: 3px solid var(--color-accent);
  padding: 0.25rem 0 0.25rem 1rem;
}

.radar-brief h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.radar-brief p {
  margin: 0;
  max-width: 75ch;
  font-size: 1.05rem;
}

.radar-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  align-items: end;
}

.radar-controls label {
  display: grid;
  gap: 0.25rem;
  flex: 1 1 12rem;
  min-width: 0;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.radar-controls select {
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
}

.radar-layout {
  display: grid;
  gap: var(--gap);
  align-items: start;
}

.radar-layout[data-radar-enhanced] {
  grid-template-columns: minmax(16rem, 0.85fr) minmax(0, 1.35fr);
}

.radar-list,
.radar-detail {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  min-width: 0;
}

.radar-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.radar-list-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.radar-count {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.radar-row {
  display: grid;
  gap: 0.45rem;
  width: 100%;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  text-decoration: none;
  cursor: pointer;
}

.radar-rows > .radar-row:last-of-type {
  border-bottom: 0;
}

.radar-row:hover {
  background: var(--color-bg);
}

.radar-row:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid var(--color-accent);
  outline-offset: -3px;
}

.radar-row[aria-current="true"] {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
}

.radar-row[aria-current="true"] .badge {
  background: rgb(13 17 23 / 12%);
  border-color: rgb(13 17 23 / 28%);
  color: var(--color-accent-contrast);
}

.radar-row-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--color-muted);
}

.radar-row[aria-current="true"] .radar-row-kicker,
.radar-row[aria-current="true"] .radar-row-sub {
  color: var(--color-accent-contrast);
  opacity: 0.8;
}

.radar-row-title {
  font-weight: 600;
  line-height: 1.3;
}

.radar-row-sub {
  color: var(--color-muted);
  font-size: 0.8rem;
}

.radar-list-empty {
  margin: 0;
  padding: 1.25rem 1rem;
  color: var(--color-muted);
}

.radar-details {
  display: grid;
  gap: var(--gap);
  min-width: 0;
}

.radar-detail-head {
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.radar-detail-head h2 {
  margin: 0.35rem 0 0;
  line-height: 1.25;
}

.radar-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.radar-detail-section {
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.radar-detail-section h3 {
  margin: 0 0 0.35rem;
  color: var(--color-text);
  font-size: 1.05rem;
  letter-spacing: normal;
  text-transform: none;
}

.radar-detail-section p {
  margin: 0;
}

.radar-evidence .radar-evidence-caveat {
  margin-top: 0.35rem;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.radar-source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
}

.radar-watch-list {
  margin: 0;
  padding-left: 1.25rem;
}

.radar-watch-list li + li {
  margin-top: 0.35rem;
}

.radar-detail-link {
  margin: 0;
  padding: 1rem;
  font-size: 0.9rem;
}

.radar-pattern {
  padding: 1rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.radar-pattern-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.radar-pattern-label {
  color: var(--color-muted);
  font-size: 0.8rem;
}

.radar-pattern h2 {
  margin: 0.2rem 0 0;
  font-size: 1.25rem;
}

.radar-pattern p {
  margin: 0.55rem 0 0;
  color: var(--color-muted);
}

@media (max-width: 720px) {
  .radar-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .radar-stat {
    gap: 0.1rem;
    padding: 0.65rem;
  }

  .radar-stat-label,
  .radar-stat-sub {
    font-size: 0.7rem;
  }

  .radar-stat-value {
    font-size: clamp(0.9rem, 3.7vw, 1.15rem);
  }

  .radar-layout[data-radar-enhanced] {
    grid-template-columns: 1fr;
  }

  /* Enhancement moves only the open detail under its trigger. Keeping the
     remaining cards in .radar-details preserves the server-rendered,
     linear no-JS reading order. */
  .radar-layout[data-radar-enhanced] .radar-rows > .radar-detail {
    border-inline: 0;
    border-inline-start: 3px solid var(--color-accent);
    border-radius: 0;
    border-bottom: 3px solid var(--color-accent);
    box-shadow: 0 0.85rem 0 var(--color-bg);
    margin-bottom: 0.85rem;
  }

  .radar-layout[data-radar-enhanced] .radar-rows > .radar-detail .radar-detail-link {
    border-bottom: 0;
  }

  .radar-layout[data-radar-enhanced] .radar-rows > .radar-detail + .radar-row {
    border-top: 1px solid var(--color-border);
  }
}

/* The enhanced radar view toggles the `hidden` attribute from JS. The UA's
   `[hidden] { display: none }` is a normal-specificity declaration that the
   `display: grid/flex` rules above would otherwise defeat -- restate it
   scoped to every node the script (or the server-rendered `hidden` on the
   filter form) actually hides. */
.radar-controls[hidden],
.radar-row[hidden],
.radar-list-empty[hidden],
.radar-detail[hidden] {
  display: none;
}

/* ---------------------------------------------------------------------
   UX-UI 2026-08: editorial workspace and HTMX feedback.
   These rules are intentionally isolated from reader radar styles above:
   editorial decisions retain their server-side gates and are merely kept in
   view alongside the evidence a reviewer is reading.
   --------------------------------------------------------------------- */

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.5rem;
  left: 0.5rem;
  transform: translateY(-160%);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.htmx-status {
  position: fixed;
  z-index: 20;
  right: 1rem;
  bottom: 1rem;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow);
}

.htmx-status:empty {
  display: none;
}

form[data-htmx-submitting="true"] button[type="submit"],
form[data-htmx-submitting="true"] input[type="submit"] {
  cursor: wait;
}

/* ACP-400: `.review-workspace-*` принадлежали снятому `review_signal.html`.
   Селекторы ниже были КОМБИНИРОВАННЫМИ — диапазонное удаление секции унесло
   бы стили живой рельсы admin v2 (`_admin_review_decision_rail.html`), у
   которой пропал бы фон, отступы и sticky-позиционирование. Удалена ровно
   мёртвая половина каждого списка селекторов. */

.review-decision-rail {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.review-decision-rail > section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.review-decision-rail h2 {
  margin-top: 0;
}

.review-assignment .assignment-state {
  margin: 0 0 0.75rem;
}

.review-assignment .assignment-actions {
  margin: 0;
}

.review-assignment .assignment-actions button {
  font: inherit;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  cursor: pointer;
}

@media (min-width: 1024px) {
  /* Осталась одна живая рельса; сетки, в которых она была областью `rail`,
     принадлежали снятым шаблонам и удалены вместе с ними. */
  .review-decision-rail {
    position: sticky;
    top: 1rem;
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    padding-right: 0.2rem;
  }
}

/* ---------------------------------------------------------------------
   BOARD-001: board-grade reader, editorial workspace and A4 print view.
   --------------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .65rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button--primary { background: var(--color-accent); color: var(--color-accent-contrast); border-color: transparent; }
.button--danger { background: var(--color-danger-bg); color: var(--color-danger); border-color: var(--color-danger); }
.board-page .layout { max-width: 1240px; }

.board-hero,
.editor-heading {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
  margin: 1.2rem 0 3rem;
  padding: 2.2rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background:
    radial-gradient(circle at 88% 12%, rgba(110,162,255,.16), transparent 28%),
    linear-gradient(145deg, #20262c, #171b1f);
}

.board-hero h1, .editor-heading h1 { margin: .35rem 0 .75rem; font-size: clamp(2.2rem, 5vw, 4.7rem); line-height: .98; letter-spacing: -.045em; }
.board-lede { max-width: 70ch; margin: 0; color: #c7ced6; font-size: 1.12rem; }
.board-actions { display: grid; gap: .75rem; justify-items: end; }
.hash-chip { padding: .25rem .55rem; border: 1px solid var(--color-border); border-radius: 999px; color: var(--color-muted); font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.board-section { margin: 0 0 4rem; }
.section-heading { max-width: 820px; margin-bottom: 1.25rem; }
.section-heading h2 { margin: .35rem 0; font-size: clamp(1.75rem, 4vw, 3rem); line-height: 1.05; }
.section-heading > p:last-child { color: var(--color-muted); }

.board-signal-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .65rem; }
.board-signal-card, .delta-card, .fork-card, .editor-panel, .candidate-card, .publish-dock, .empty-state, .board-release-row {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
}
.board-signal-card { min-height: 270px; padding: 1rem; display: flex; flex-direction: column; }
.board-signal-card h3 { margin: .7rem 0; font-size: 1.02rem; line-height: 1.25; }
.board-signal-card p { font-size: .88rem; }
.board-signal-card > p:not(.interpretation) {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}
.board-signal-card .interpretation {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.board-signal-card a { margin-top: auto; text-decoration: none; }
.signal-number { color: var(--color-accent); font: 700 .8rem ui-monospace, monospace; }
.interpretation { color: var(--color-muted); }
.interpretation strong { display: block; color: var(--color-text); }

.delta-stack { display: grid; gap: 1rem; }
.delta-card { padding: 1.25rem; position: relative; overflow: hidden; }
.delta-type { display: inline-block; margin-bottom: 1rem; padding: .2rem .5rem; border-radius: 999px; background: rgba(110,162,255,.13); color: var(--color-accent); font: 700 .72rem ui-monospace, monospace; }
.delta-type--contradicted { background: rgba(255,138,128,.12); color: var(--color-danger); }
.delta-columns { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; }
.delta-columns span { color: var(--color-muted); font-size: .77rem; text-transform: uppercase; letter-spacing: .08em; }
.delta-columns p { margin: .25rem 0 0; font-size: 1.04rem; }
.delta-arrow { align-self: center; color: var(--color-accent); font-size: 1.5rem; }
.delta-meaning { padding-top: 1rem; border-top: 1px solid var(--color-border); }
.delta-meaning strong { display: block; }
.board-question { margin-bottom: 1rem; padding: .85rem 1rem; border-left: 3px solid var(--color-accent); background: #171b1f; font-weight: 650; }
.delta-card details summary { color: var(--color-accent); cursor: pointer; }
.evidence-list { display: grid; gap: .7rem; margin-top: .8rem; }
.evidence-list blockquote { margin: 0; padding: .8rem; border: 1px solid var(--color-border); border-radius: var(--radius); color: #c7ced6; }
.evidence-list cite { display: block; margin-top: .4rem; font-style: normal; font-size: .82rem; }

.hypothesis-label { display: inline-block; margin: .8rem 0 0; padding: .3rem .55rem; border: 1px solid #b89b58; color: #e0c47c; font: 700 .72rem ui-monospace, monospace; }
.fork-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.fork-card { padding: 1.2rem; border-top: 3px solid #b89b58; }
.fork-card > span { color: #e0c47c; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.fork-card h3 { margin: .45rem 0 1.2rem; font-size: 1.25rem; }
.fork-footer { display: grid; grid-template-columns: .35fr 1fr; gap: 1rem; margin-top: .8rem; padding: 1rem 1.2rem; border: 1px solid var(--color-border); border-radius: 10px; }
.fork-footer p { margin: 0; }
.board-limitations { padding: 1rem 1.2rem; border: 1px dashed var(--color-border); }
.board-limitations ul { margin-bottom: 0; }
.board-admin-danger { margin: 4rem 0; padding: 1rem; border: 1px solid var(--color-danger-bg); }
.board-admin-danger form { display: flex; gap: 1rem; align-items: end; margin-top: 1rem; }

.board-release-list { display: grid; gap: .8rem; }
.board-release-row { display: grid; grid-template-columns: 1fr auto; gap: 2rem; padding: 1.2rem; }
.board-release-row h2 { margin: .25rem 0; }
.board-release-row h2 a { color: inherit; text-decoration: none; }
.board-release-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; color: var(--color-muted); font-size: .85rem; }
.empty-state { padding: 3rem; text-align: center; }

.preview-ribbon { position: sticky; top: 0; z-index: 5; margin: -1.25rem -1.25rem 1rem; padding: .7rem 1.25rem; background: #e0c47c; color: #17120a; text-align: center; }
.publish-dock { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin: 4rem 0; padding: 1.4rem; }
.publish-dock h2 { margin: .25rem 0; }
.publish-dock p { margin: .2rem 0; }
.publish-dock code { overflow-wrap: anywhere; }

.editor-heading h1 { font-size: clamp(2rem, 4vw, 3.6rem); }
.editor-heading > p { max-width: 44ch; color: var(--color-muted); }
.edition-picker { display: grid; grid-template-columns: 1fr 1fr auto; gap: 1rem; align-items: end; margin-bottom: 1rem; padding: 1rem; border: 1px solid var(--color-border); background: var(--color-surface); }
.edition-picker label, .board-editor-form label { display: grid; gap: .35rem; color: var(--color-muted); font-size: .82rem; }
.edition-picker select, .board-editor-form input, .board-editor-form textarea { width: 100%; padding: .65rem; border: 1px solid var(--color-border); border-radius: var(--radius); background: #15191d; color: var(--color-text); font: inherit; }
.board-editor-form { display: grid; gap: 1rem; }
.editor-panel { padding: 1.25rem; display: grid; gap: 1rem; }
.editor-step { display: flex; gap: .8rem; align-items: start; }
.editor-step > span { color: var(--color-accent); font: 700 1rem ui-monospace, monospace; }
.editor-step h2, .editor-step p { margin: 0; }
.editor-step p { color: var(--color-muted); }
.candidate-stack { display: grid; gap: .8rem; }
.candidate-card { padding: 1rem; display: grid; gap: .8rem; }
.candidate-select { display: flex !important; align-items: center; gap: .6rem !important; color: var(--color-text) !important; font-size: 1rem !important; font-weight: 700; }
.candidate-select input, .support-check input { width: auto; }
.candidate-select span { color: var(--color-accent); font: 700 .72rem ui-monospace, monospace; }
.candidate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.board-editor-form fieldset { border: 1px solid var(--color-border); border-radius: var(--radius); }
.support-check { display: flex !important; align-items: start; gap: .5rem !important; margin: .5rem 0; color: var(--color-text) !important; }
.fork-editor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.fork-editor-card { padding: .8rem; border: 1px solid var(--color-border); border-top: 3px solid #b89b58; border-radius: var(--radius); }
.fork-editor-card > span { display: block; margin-bottom: .7rem; color: #e0c47c; font-size: .75rem; text-transform: uppercase; }
.editor-submit { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border: 1px solid var(--color-border); background: rgba(28,32,36,.96); backdrop-filter: blur(12px); }
.editor-submit p { margin: 0; color: var(--color-muted); }
.alert--error { margin: 1rem 0; padding: 1rem; border: 1px solid var(--color-danger); background: var(--color-danger-bg); color: var(--color-danger); }

/* Standalone A4 view is always light, independently of the portal theme. */
.board-print { color-scheme: light; background: #d8d8d8; color: #111; font-family: Arial, sans-serif; }
.print-document { width: 210mm; margin: 10mm auto; background: white; }
.print-cover, .print-appendix { height: 297mm; padding: 12mm 14mm; overflow: hidden; background: #fff; }
.print-cover { display: flex; flex-direction: column; page-break-after: always; }
.print-appendix { page-break-after: always; }
.print-appendix:last-child { page-break-after: auto; }
.print-header { display: flex; justify-content: space-between; padding-bottom: 4mm; border-bottom: .35mm solid #111; font-size: 7.5pt; letter-spacing: .08em; text-transform: uppercase; }
.print-header div { display: flex; gap: 5mm; }
.print-brand { font-weight: 900; }
.print-cover > h1 { margin: 7mm 0 1mm; font-size: 29pt; letter-spacing: -.04em; }
.print-summary { margin: 0 0 5mm; max-width: 165mm; font-size: 10pt; line-height: 1.35; }
.print-signal-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2mm; margin-bottom: 5mm; }
.print-signal-strip div { min-height: 20mm; padding: 2.3mm; background: #f0f1f2; font-size: 6.8pt; line-height: 1.2; }
.print-signal-strip b { display: block; margin-bottom: 1.5mm; color: #3569b8; }
.print-cover > h2 { margin: 0 0 2mm; font-size: 13pt; }
.print-deltas { display: grid; gap: 1.6mm; }
.print-deltas article { display: grid; grid-template-columns: 17mm 1fr; gap: 2mm; padding: 2mm 0; border-top: .2mm solid #bbb; }
.print-delta-type { color: #3569b8; font-size: 6.5pt; font-weight: 800; letter-spacing: .05em; }
.print-deltas article > div { display: grid; grid-template-columns: 1fr 5mm 1fr; gap: 1mm; font-size: 7.4pt; line-height: 1.2; }
.print-deltas i { text-align: center; color: #3569b8; font-style: normal; }
.print-deltas p { grid-column: 2; margin: 1mm 0 0; padding-left: 2mm; border-left: .5mm solid #3569b8; font-size: 7pt; font-weight: 700; }
.print-fork { margin-top: 4mm; padding: 3mm; border: .45mm solid #111; }
.print-fork-title span { font-size: 6.5pt; font-weight: 800; letter-spacing: .07em; }
.print-fork-title h2 { margin: 1mm 0 2mm; font-size: 11pt; }
.print-fork-branches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2mm; }
.print-fork-branches div { padding: 2mm; background: #f0f1f2; font-size: 7pt; }
.print-fork-branches p { margin: 1mm 0 0; }
.print-fork footer { display: flex; justify-content: space-between; gap: 4mm; margin-top: 2mm; padding-top: 2mm; border-top: .2mm solid #bbb; font-size: 6.5pt; }
.print-limitations { margin-top: auto; padding-top: 2mm; border-top: .2mm solid #bbb; font-size: 6.5pt; }
.print-appendix > h1 { font-size: 24pt; }
.print-evidence-card { page-break-inside: avoid; margin: 0 0 5mm; padding: 4mm; border: .25mm solid #999; }
.print-evidence-card h2 { margin: 1mm 0 2mm; font-size: 13pt; }
.print-evidence-card p { font-size: 8pt; }
.print-evidence-card blockquote { margin: 2mm 0; padding: 2mm 3mm; border-left: .7mm solid #3569b8; background: #f5f6f7; font-size: 8pt; }
.print-evidence-card blockquote footer { margin-top: 1mm; font-size: 6.7pt; }
.print-url { overflow-wrap: anywhere; }
.print-method { page-break-inside: avoid; padding: 4mm; background: #111; color: white; font-size: 8pt; }
.print-method h2 { margin-top: 0; }
.print-trigger { position: fixed; right: 20px; bottom: 20px; padding: .8rem 1rem; border: 0; background: #3569b8; color: white; font-weight: 700; cursor: pointer; }

@media (max-width: 900px) {
  .board-hero, .editor-heading, .publish-dock { flex-direction: column; }
  .board-actions { justify-items: start; }
  .board-signal-grid { grid-template-columns: 1fr 1fr; }
  .fork-grid, .fork-editor-grid { grid-template-columns: 1fr; }
  .edition-picker, .candidate-grid, .delta-columns, .fork-footer, .board-release-row { grid-template-columns: 1fr; }
  .delta-arrow { transform: rotate(90deg); justify-self: center; }
  .board-release-meta { align-items: flex-start; }
}

@media (max-width: 600px) {
  .board-signal-grid { grid-template-columns: 1fr; }
  .board-hero, .editor-heading { padding: 1.35rem; }
  .board-hero h1, .editor-heading h1 { font-size: clamp(2rem, 11vw, 3rem); }
}

@media print {
  @page { size: A4; margin: 0; }
  .board-print { background: white; }
  .print-document { margin: 0; }
  .print-trigger { display: none; }
}
