/*
  GAMBIT design baseline — docs/phase0/08-wireflows.md section A.
  Tokens are declared here and nowhere else (A.1). Components consume them by
  name; a raw colour or pixel value outside :root is a defect.
  Contrast pairs are the A.2 starting values; measurement is A-UI-A11Y-04.
*/

:root {
  /* neutral ramp */
  --color-surface: #ffffff;
  --color-bg: #f7f8fa;
  --color-surface-subtle: #eff1f4;
  --color-border-subtle: #e3e6eb;
  --color-border: #cbd1d9;
  --color-text-muted: #5a6472;
  --color-text-faint: #8c96a3;
  --color-text: #2b323c;
  --color-text-strong: #171b21;

  /* accent — single and restrained (§66) */
  --color-accent: #1f5fa8;
  --color-accent-hover: #17497f;
  --color-accent-tint: #eaf1fa;

  /* status families: fg / bg; border style is the non-colour channel */
  --status-danger-fg: #b3261e;
  --status-danger-bg: #fdecea;
  --status-warning-fg: #8a5300;
  --status-warning-bg: #fff3e0;
  --status-success-fg: #1b6b3a;
  --status-success-bg: #e8f5ec;
  --status-info-fg: #1f5fa8;
  --status-info-bg: #eaf1fa;
  --status-neutral-fg: #5a6472;
  --status-neutral-bg: #eff1f4;
  --status-unknown-fg: #4a4a4a;
  --status-unknown-bg: #f2f2f2;
  --status-stale-fg: #6e5300;
  --status-stale-bg: #fbf3dc;
  --status-muted-fg: #5a6472;
  --status-muted-bg: #f2f2f2;

  /* typography: a system stack with Georgian (Mkhedruli) coverage on every
     platform Gambit runs on; no webfont without owner approval (A.1) */
  --font-ui: "Noto Sans Georgian", "Noto Sans", "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono: "Noto Sans Mono", "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --leading-tight: 1.3;
  --leading-base: 1.5;

  /* spacing, 4px base */
  --space-1: 2px;
  --space-2: 4px;
  --space-3: 8px;
  --space-4: 12px;
  --space-5: 16px;
  --space-6: 20px;
  --space-7: 24px;
  --space-8: 32px;
  --space-9: 40px;
  --space-10: 48px;
  --space-11: 64px;

  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-pill: 999px;

  --elev-2: 0 1px 2px rgba(23, 27, 33, 0.08);
  --elev-3: 0 8px 24px rgba(23, 27, 33, 0.16);

  --focus-ring: 2px solid var(--color-accent);
  --focus-offset: 2px;

  --row-comfortable: 40px;
  --row-compact: 32px;
  --touch-target: 44px;

  --motion-fast: 120ms;
  --motion-base: 180ms;

  --z-sticky: 100;
  --z-dropdown: 200;
  --z-dialog: 300;
  --z-toast: 400;

  --content-max: 1200px;
}

/* ---------------------------------------------------------------- reset */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font-ui);
  font-size: 100%;
  line-height: var(--leading-base);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-size: var(--text-base);
  min-height: 100vh;
}

h1,
h2,
h3 {
  color: var(--color-text-strong);
  font-weight: 600;
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-4);
}

p {
  margin: 0 0 var(--space-4);
}

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

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

code,
.mono {
  font-family: var(--font-mono);
  font-size: 0.95em;
}

/* Focus is always visible and never removed (A-UI-A11Y-03). */
:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------- shell */

.skip-link {
  position: absolute;
  left: var(--space-3);
  top: -100px;
  z-index: var(--z-toast);
  padding: var(--space-3) var(--space-5);
  background: var(--color-surface);
  color: var(--color-accent);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.skip-link:focus {
  top: var(--space-3);
}

.shell-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-subtle);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.shell-header__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-6);
  min-height: var(--row-comfortable);
  flex-wrap: wrap;
}

.brand {
  font-weight: 700;
  font-size: var(--text-md);
  letter-spacing: 0.04em;
  color: var(--color-text-strong);
  text-decoration: none;
}

.shell-nav {
  display: flex;
  gap: var(--space-2);
}

.shell-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--row-comfortable);
  padding: 0 var(--space-4);
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.shell-nav__link:hover {
  color: var(--color-accent-hover);
}

.shell-nav__link[aria-current="page"] {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  font-weight: 500;
}

.shell-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.shell-user {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  text-decoration: none;
}

.shell-user:hover {
  text-decoration: underline;
}

.shell-main {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-6) var(--space-5) var(--space-10);
}

.shell-main:focus {
  outline: none;
}

.inline-form {
  display: inline;
  margin: 0;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 0;
}

.lang-switch__option {
  font: inherit;
  font-size: var(--text-sm);
  background: var(--color-surface);
  color: var(--color-text);
  border: 0;
  padding: var(--space-2) var(--space-4);
  min-height: 32px;
  cursor: pointer;
}

.lang-switch__option + .lang-switch__option {
  border-left: 1px solid var(--color-border);
}

.lang-switch__option[aria-pressed="true"] {
  background: var(--color-accent-tint);
  color: var(--color-accent);
  font-weight: 500;
}

/* ---------------------------------------------------------------- auth */

.auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-8) var(--space-5);
}

.auth__header {
  width: 100%;
  max-width: 420px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}

.auth-card__title {
  font-size: var(--text-xl);
}

.auth-card__lead {
  color: var(--color-text-muted);
}

.auth-card__footer {
  margin: var(--space-6) 0 0;
  font-size: var(--text-sm);
}

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

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-5);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

.page-title {
  font-size: var(--text-xl);
  margin: 0;
}

.page-subtitle {
  color: var(--color-text-muted);
  margin: var(--space-2) 0 0;
}

.page-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.breadcrumb {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-3);
}

.breadcrumb a {
  color: inherit;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.card__title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-5);
}

.card__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.card__header .card__title {
  margin-bottom: 0;
}

/* A card whose content matters once and now: a setup code, a warning
   before an irreversible action. The border carries it, not colour alone -
   the title says what it is. */
.card--notice {
  border: 2px solid var(--status-info-fg);
}

.card--caution {
  border: 2px solid var(--status-danger-fg);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

/* entity header: identifiers, independent status chips, actions (A.4 #3) */
.entity-header__meta {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  flex-wrap: wrap;
  margin-top: var(--space-3);
}

.identifier {
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* ---------------------------------------------------------------- key/value */

.kv {
  margin: 0;
  display: grid;
  gap: var(--space-3);
}

.kv__row {
  display: grid;
  grid-template-columns: minmax(120px, max-content) 1fr;
  gap: var(--space-5);
  align-items: baseline;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border-subtle);
}

.kv__key {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: var(--text-sm);
}

.kv__value {
  margin: 0;
  overflow-wrap: anywhere;
}

.kv__value--empty {
  color: var(--color-text-faint);
  font-style: italic;
}

/* ---------------------------------------------------------------- chips */

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-3);
  min-height: 22px;
  border-radius: var(--radius-pill);
  border: 1px solid currentColor;
  font-size: var(--text-xs);
  font-weight: 500;
  white-space: nowrap;
  vertical-align: middle;
}

.chip__glyph {
  font-weight: 700;
  font-family: var(--font-mono);
}

.chip--danger {
  color: var(--status-danger-fg);
  background: var(--status-danger-bg);
}

.chip--warning {
  color: var(--status-warning-fg);
  background: var(--status-warning-bg);
}

.chip--success {
  color: var(--status-success-fg);
  background: var(--status-success-bg);
}

.chip--info {
  color: var(--status-info-fg);
  background: var(--status-info-bg);
}

.chip--neutral {
  color: var(--status-neutral-fg);
  background: var(--status-neutral-bg);
}

.chip--unknown {
  color: var(--status-unknown-fg);
  background: var(--status-unknown-bg);
  border-style: dotted;
}

.chip--stale {
  color: var(--status-stale-fg);
  background: var(--status-stale-bg);
  border-style: dashed;
}

.chip--muted {
  color: var(--status-muted-fg);
  background: var(--status-muted-bg);
  text-decoration: line-through;
}

/* ---------------------------------------------------------------- banners */

.banner {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-4) var(--space-5);
  border: 1px solid currentColor;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
}

.banner__glyph {
  font-family: var(--font-mono);
  font-weight: 700;
}

.banner--danger {
  color: var(--status-danger-fg);
  background: var(--status-danger-bg);
}

.banner--success {
  color: var(--status-success-fg);
  background: var(--status-success-bg);
}

.banner--info {
  color: var(--status-info-fg);
  background: var(--status-info-bg);
}

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

.form {
  display: grid;
  gap: var(--space-5);
  max-width: 640px;
}

.form--inline {
  max-width: none;
}

.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}

.form__actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  align-items: center;
}

.field {
  display: grid;
  gap: var(--space-2);
}

.field__label {
  font-weight: 500;
  color: var(--color-text-strong);
}

.field__required {
  color: var(--status-danger-fg);
  margin-left: var(--space-1);
}

.field__hint {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.input,
.select,
.textarea {
  font: inherit;
  font-size: var(--text-md);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  min-height: var(--row-comfortable);
  width: 100%;
}

.textarea {
  min-height: 96px;
  resize: vertical;
}

.input--code {
  font-family: var(--font-mono);
  letter-spacing: 0.15em;
}

.input:disabled,
.select:disabled {
  background: var(--color-surface-subtle);
  color: var(--color-text-muted);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--row-compact);
}

.checkbox input {
  width: 18px;
  height: 18px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font: inherit;
  font-weight: 500;
  min-height: 36px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--motion-fast) ease-out, color var(--motion-fast) ease-out;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-surface);
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  color: var(--color-surface);
}

.btn--secondary {
  background: var(--color-surface);
  color: var(--color-accent);
  border-color: var(--color-border);
}

.btn--secondary:hover {
  background: var(--color-accent-tint);
}

.btn--danger {
  background: var(--color-surface);
  color: var(--status-danger-fg);
  border-color: var(--status-danger-fg);
}

.btn--danger:hover {
  background: var(--status-danger-bg);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-muted);
}

.btn--ghost:hover {
  color: var(--color-text-strong);
  background: var(--color-surface-subtle);
}

.btn--block {
  width: 100%;
}

.btn--small {
  min-height: 28px;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
}

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

.table-wrap {
  overflow-x: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table caption {
  text-align: left;
  padding: var(--space-4) var(--space-5);
  color: var(--color-text-muted);
  caption-side: top;
}

.table th,
.table td {
  text-align: left;
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--color-border-subtle);
  height: var(--row-compact);
  vertical-align: middle;
}

.table th {
  background: var(--color-surface-subtle);
  color: var(--color-text-muted);
  font-weight: 500;
  position: sticky;
  top: var(--row-comfortable);
  z-index: 1;
}

.table tbody tr:hover {
  background: var(--color-accent-tint);
}

.table td a {
  font-weight: 500;
}

.table .num {
  text-align: right;
  font-family: var(--font-mono);
}

.table--wide td {
  white-space: nowrap;
}

/* Free-text cells of a wide table may wrap, so the columns that matter -
   result, details - stay on screen at desktop width. */
.table--wide td.wrap {
  white-space: normal;
  min-width: 9rem;
}

/* ---------------------------------------------------------------- toolbar / search */

.toolbar {
  display: flex;
  gap: var(--space-3);
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.toolbar .field {
  min-width: 200px;
}

.toolbar .btn {
  min-height: var(--row-comfortable);
}

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

.empty {
  padding: var(--space-9) var(--space-5);
  text-align: center;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
}

.empty__title {
  color: var(--color-text-strong);
  font-weight: 500;
}

.outcome {
  max-width: 640px;
}

.outcome__correlation {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.pager {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  margin-top: var(--space-5);
  flex-wrap: wrap;
}

.pager__summary {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin: var(--space-5) auto 0 0;
}

.pager .pager__summary {
  margin: 0 auto 0 0;
}

.steps {
  padding-left: var(--space-6);
}

.steps li {
  margin-bottom: var(--space-4);
}

.qr {
  width: 200px;
  max-width: 100%;
  margin: var(--space-4) 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}

.qr svg {
  display: block;
  width: 100%;
  height: auto;
}

.key {
  font-size: var(--text-md);
  letter-spacing: 0.1em;
  overflow-wrap: anywhere;
}

.code-list {
  columns: 2;
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-5);
  font-size: var(--text-md);
}

.code-list li {
  padding: var(--space-2) 0;
}

.details {
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-top: var(--space-3);
}

.details summary {
  cursor: pointer;
  font-weight: 500;
}

.actions-list {
  display: grid;
  gap: var(--space-4);
}

.actions-list .form {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
}

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

.text-sm {
  font-size: var(--text-sm);
}

/* ---------------------------------------------------------------- timeline (A.4 #4) */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--color-border);
}

.timeline__entry {
  position: relative;
  padding: var(--space-2) 0 var(--space-4) var(--space-6);
}

.timeline__entry::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 10px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--color-accent);
}

.timeline__time {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.timeline__what {
  font-weight: 500;
}

.timeline__reason {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin: var(--space-1) 0 0;
}

.action-grid {
  display: grid;
  gap: var(--space-5);
}

.action {
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
}

.action__title {
  font-size: var(--text-base);
  font-weight: 600;
  margin: 0 0 var(--space-3);
}

.action .form {
  gap: var(--space-3);
}

.conflict {
  border: 1px solid var(--status-danger-fg);
  background: var(--status-danger-bg);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}

.conflict__title {
  color: var(--status-danger-fg);
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 767px) {
  .grid-2,
  .form__row {
    grid-template-columns: 1fr;
  }

  .kv__row {
    grid-template-columns: 1fr;
    gap: var(--space-1);
  }

  .table th,
  .table td {
    height: 48px;
  }

  .btn {
    min-height: var(--touch-target);
  }

  .shell-header__inner {
    padding: var(--space-3) var(--space-4);
    gap: var(--space-3);
  }

  .shell-main {
    padding: var(--space-5) var(--space-4) var(--space-9);
  }

  .auth-card {
    padding: var(--space-6);
  }

  .code-list {
    columns: 1;
  }

  .table th {
    position: static;
  }
}

@media (max-width: 479px) {
  .shell-tools {
    margin-left: 0;
    width: 100%;
  }

  .page-header {
    flex-direction: column;
  }
}

/* ---------------------------------------------------------------- notes (§25, §84): internal and public must not look alike */

.notes {
  list-style: none;
  margin: 0 0 var(--space-5);
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.note {
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border-subtle);
  border-left-width: 6px;
}

.note--internal {
  border-left-color: var(--status-warning-fg);
  background: var(--status-warning-bg);
}

.note--public {
  border-left-color: var(--status-info-fg);
  background: var(--color-surface);
}

.note--system {
  border-left-color: var(--color-text-faint);
  background: var(--color-surface-subtle);
  font-size: var(--text-sm);
}

.note__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.note__author {
  font-weight: 600;
  color: var(--color-text-strong);
}

.note__body {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.note__foot {
  margin: var(--space-2) 0 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.composer__visibility {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.composer__visibility label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.composer__visibility label:has(input:checked) {
  border-color: var(--color-accent);
  background: var(--color-accent-tint);
}

.publish-preview {
  border: 1px solid var(--status-warning-fg);
  background: var(--status-warning-bg);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}

.publish-preview__body {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  white-space: pre-wrap;
  margin: var(--space-3) 0;
}

.links {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.links li {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  align-items: baseline;
}

.hints {
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-4) 0;
}

.hints ul {
  margin: var(--space-2) 0 0;
  padding-left: var(--space-5);
}

/* ---------------------------------------------------------------- quick intake (08-wireflows WF-1) */

.verification {
  border: 2px dashed var(--status-warning-fg);
  background: var(--status-warning-bg);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
}

.verification--success {
  border-style: solid;
  border-color: var(--status-success-fg);
  background: var(--status-success-bg);
}

.verification--danger {
  border-style: solid;
  border-color: var(--status-danger-fg);
  background: var(--status-danger-bg);
}

.verification__title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-lg);
  margin: 0 0 var(--space-2);
}

.intake {
  align-items: start;
}

.intake__context {
  font-size: var(--text-sm);
}

.intake__warnings {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.intake__priority {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
}

.intake__details {
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-2) 0;
}

.intake__details > summary {
  cursor: pointer;
  font-weight: 600;
}

.intake__details[open] > summary {
  margin-bottom: var(--space-3);
}

.followups {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.followup {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-3);
}

.followup--done {
  color: var(--color-text-muted);
}

/* ---------------------------------------------------------------- lists */

.plain-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.plain-list li {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border-subtle);
}
