/* =========================================================================
   Umbermark — "Slate Vault" design direction (gen-sonnet-2)
   Near-dark terminal/security base, umber pigment as subtle logo accent.
   Harmonizes with the standalone HTML/PDF export dark palette by design.
   ========================================================================= */

/* -------------------------------------------------------------------------
   DESIGN TOKENS
   All color roles expressed as CSS custom properties so tests can verify
   presence and a future merge can swap just the :root block.
   ------------------------------------------------------------------------- */
:root {
  /* Backgrounds — neutral dark (achromatic so OKLCH chroma ≈ 0 < chroma(#faf6f1)).
     Warmth lives in the umber logo + card border accents, not the canvas. */
  --bg:        #111111;   /* page canvas: neutral near-black */
  --surface:   #1c1c1c;   /* card/form surface: one shade up */
  --surface-2: #272727;   /* nested surface: inputs, code blocks */

  /* Borders */
  --border:       #383838;
  --border-focus: #00bcd4;  /* cyan focus ring — same as accent */

  /* Text */
  --text:        #e2e8f0;  /* primary: soft off-white */
  --text-muted:  #718096;  /* secondary: muted slate gray */
  --text-head:   #f7fafc;  /* headings: slightly brighter */
  --text-link:   #63b3ed;  /* inline links: calm blue */

  /* CTA accent — replaces the disliked rust #8a3324 */
  --accent:        #00bcd4;  /* cyan: clean signal, security aesthetic */
  --accent-hover:  #0097a7;  /* darker cyan on hover */
  --accent-text:   #0d1117;  /* text ON accent bg: near-black for contrast */

  /* Umber pigment: preserved only for the logo/brand mark */
  --umber:         #c9956e;  /* desaturated warm umber */

  /* --- Score bands (harmonized with html_report.py export palette) --- */
  --band-gold:        #f5c451;
  --band-green:       #6ec97a;
  --band-yellow:      #e4b15c;
  --band-red:         #ef6b6b;
  --band-incomplete:  #8a90a0;

  /* Score band tint backgrounds for the score-card */
  --band-gold-bg:        #201a00;
  --band-green-bg:       #0b1f0e;
  --band-yellow-bg:      #1c1500;
  --band-red-bg:         #1f0c0c;
  --band-incomplete-bg:  #191c24;

  /* --- Severity badge colors (matching html_report.py) --- */
  --sev-critical:     #ef6b6b;
  --sev-high:         #f0a050;
  --sev-medium:       #e0c060;
  --sev-low:          #8bd0c0;

  /* --- Verdict pill colors --- */
  --verdict-pass:  #6ec97a;
  --verdict-warn:  #e4b15c;
  --verdict-fail:  #ef6b6b;
  --verdict-skip:  #9099a5;  /* lighter than --text-muted to pass AA on --surface */

  /* Spacing & shape */
  --radius:    6px;
  --radius-sm: 3px;
  --max-w:     760px;
}

/* -------------------------------------------------------------------------
   RESET & BASE
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 1rem;
}

h1, h2, h3, h4 {
  color: var(--text-head);
  line-height: 1.25;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }

p { margin: 0.5rem 0; }

a {
  color: var(--text-link);
  text-decoration: none;
}
a:hover { text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

ul, ol {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}
li { margin: 0.35rem 0; }

dl { margin: 0.75rem 0; }
dt {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.75rem;
}
dd {
  margin: 0.1rem 0 0 0;
  color: var(--text);
}

pre {
  font-family: "Cascadia Code", "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 0.85rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* -------------------------------------------------------------------------
   LAYOUT: header / main / footer
   ------------------------------------------------------------------------- */
header, main, footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.875rem 1rem;
}

/* Global site header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  /* Override max-width for the border to go edge-to-edge at full viewport */
  max-width: 100%;
  padding-left: max(1rem, calc((100% - var(--max-w)) / 2));
  padding-right: max(1rem, calc((100% - var(--max-w)) / 2));
}

main {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 100%;
  padding-left: max(1rem, calc((100% - var(--max-w)) / 2));
  padding-right: max(1rem, calc((100% - var(--max-w)) / 2));
}

/* -------------------------------------------------------------------------
   NAVIGATION
   ------------------------------------------------------------------------- */
.logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--umber);       /* umber pigment: brand identity touchpoint */
  text-decoration: none;
  letter-spacing: -0.01em;
}
.logo:hover { color: var(--accent); text-decoration: none; }

header nav a {
  margin-left: 1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s;
}
header nav a:hover { color: var(--text); }
header nav a:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.footer-nav {
  display: flex;
  gap: 1rem;
}
.footer-nav a {
  color: var(--text-muted);
  font-size: 0.875rem;
}
.footer-nav a:hover { color: var(--text); }

/* -------------------------------------------------------------------------
   BUTTONS
   Three vocabularies unified: .btn-primary, .btn-outline, .cta
   .cta is aliased to primary (used on server/login/dashboard "Add a server")
   .danger is the destructive action variant
   ------------------------------------------------------------------------- */
.btn-primary,
.cta,
.btn-outline,
.danger {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1.4;
}

/* Primary / CTA — cyan fill, dark text for 8:1+ contrast */
.btn-primary,
.cta {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}
.btn-primary:hover,
.cta:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-text);
  text-decoration: none;
}
.btn-primary:focus-visible,
.cta:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 2px;
}

/* Outline — transparent bg, cyan border/text */
.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover {
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
}
.btn-outline:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 2px;
}

/* Danger — destructive action (delete server) */
.danger {
  background: transparent;
  color: var(--sev-critical);
  border-color: var(--sev-critical);
}
.danger:hover {
  background: var(--band-red-bg);
  color: var(--sev-critical);
}
.danger:focus-visible {
  outline: 3px solid var(--sev-critical);
  outline-offset: 2px;
}

/* -------------------------------------------------------------------------
   FORM CONTROLS
   Global dark-mode styling for all form elements
   ------------------------------------------------------------------------- */
label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.75rem;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
textarea,
select {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.55rem 0.75rem;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color 0.15s;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.2);
}

input[type="checkbox"] {
  margin-right: 0.5rem;
  accent-color: var(--accent);
  width: 1rem;
  height: 1rem;
  vertical-align: middle;
  cursor: pointer;
}
input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* Placeholder text */
input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

/* Select arrow — override browser default for dark bg */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23718096' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

textarea {
  resize: vertical;
  min-height: 120px;
  font-family: "Cascadia Code", "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.85rem;
}

/* Form submit buttons within forms (native <button>) */
form button[type="submit"]:not(.btn-outline):not(.btn-primary):not(.danger) {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  background: var(--accent);
  color: var(--accent-text);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
form button[type="submit"]:not(.btn-outline):not(.btn-primary):not(.danger):hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* Generic unstyled button in claim_confirm.html */
form button:not([class]) {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  background: var(--accent);
  color: var(--accent-text);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

/* -------------------------------------------------------------------------
   UTILITY CLASSES
   ------------------------------------------------------------------------- */
.note {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-style: italic;
}
.note a { color: var(--text-link); }

.breadcrumb {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text); }

/* -------------------------------------------------------------------------
   LANDING PAGE
   ------------------------------------------------------------------------- */
.hero {
  padding: 2rem 0 1.5rem;
}

.hero h1 {
  color: var(--text-head);
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.subhero {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 600px;
}

.hero .btn-primary,
.hero .btn-outline {
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* "How it works" steps */
.how-it-works {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.how-it-works h2 {
  margin-top: 0;
}

.how-it-works ol {
  padding-left: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 1rem;
}

.how-it-works ol li {
  counter-increment: step;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.how-it-works ol li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  min-width: 1.75rem;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.875rem;
}

/* Anonymous scan form */
.scan-form {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.scan-form h2 { margin-top: 0; }

.scan-form form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 540px;
}

.tos-line {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.tos-line input[type="checkbox"] {
  display: inline;
  width: auto;
}

/* -------------------------------------------------------------------------
   SCORE CARD — the emotional centerpiece
   Large score number, band tint, non-color label for accessibility.
   ------------------------------------------------------------------------- */
.score-card {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem 2.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--border);  /* overridden by band variants */
  margin-bottom: 2rem;
}

.score-number {
  font-size: 5.5rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: var(--text-head);   /* overridden by band variants */
}

.score-incomplete {
  /* The "?" glyph when coverage is too low for a score */
  font-size: 5.5rem;
  font-weight: 800;
  color: var(--band-incomplete);
}

.score-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.score-band {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);   /* overridden by band variants */
}

.score-coverage {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Band-specific score card treatments.
   Left border + large-number color + band label color.
   Non-color: band label text (e.g. "GREEN") satisfies L2. */
.score-gold {
  background: var(--band-gold-bg);
  border-left-color: var(--band-gold);
}
.score-gold .score-number { color: var(--band-gold); }
.score-gold .score-band   { color: var(--band-gold); }

.score-green {
  background: var(--band-green-bg);
  border-left-color: var(--band-green);
}
.score-green .score-number { color: var(--band-green); }
.score-green .score-band   { color: var(--band-green); }

.score-yellow {
  background: var(--band-yellow-bg);
  border-left-color: var(--band-yellow);
}
.score-yellow .score-number { color: var(--band-yellow); }
.score-yellow .score-band   { color: var(--band-yellow); }

.score-red {
  background: var(--band-red-bg);
  border-left-color: var(--band-red);
}
.score-red .score-number { color: var(--band-red); }
.score-red .score-band   { color: var(--band-red); }

.score-incomplete {
  background: var(--band-incomplete-bg);
  border-left-color: var(--band-incomplete);
}
/* .score-incomplete .score-number already colored above via the glyph rule */
.score-incomplete .score-band { color: var(--band-incomplete); }

/* -------------------------------------------------------------------------
   REPORT SECTIONS
   ------------------------------------------------------------------------- */
.report { max-width: var(--max-w); }

/* Report metadata (dl) */
.report-meta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.25rem 1rem;
  align-items: baseline;
}
.report-meta dt {
  margin-top: 0;
  font-size: 0.75rem;
}
.report-meta dd { margin: 0; }

/* Platform facts */
.platform-facts {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  list-style: none;
  padding-left: 1rem;
  font-size: 0.875rem;
  font-family: ui-monospace, monospace;
  color: var(--text-muted);
}

/* Count pills row */
.counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
}

/* -------------------------------------------------------------------------
   PILLS — verdict counts and inline badges
   Color = text on dark surface; icon prefix for non-color encoding.
   ------------------------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.pill-pass { color: var(--verdict-pass); border-color: var(--verdict-pass); }
.pill-warn { color: var(--verdict-warn); border-color: var(--verdict-warn); }
.pill-fail { color: var(--verdict-fail); border-color: var(--verdict-fail); }
.pill-skip { color: var(--verdict-skip); border-color: var(--verdict-skip); }

/* Non-color icon prefixes in the count pills */
.pill-pass::before  { content: "✓ "; }
.pill-warn::before  { content: "⚠ "; }
.pill-fail::before  { content: "✗ "; }
.pill-skip::before  { content: "– "; }

/* -------------------------------------------------------------------------
   DEDUCTIONS LIST
   ------------------------------------------------------------------------- */
.deductions {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.deductions li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.6rem 0.875rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.points {
  margin-left: auto;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--sev-critical);
  white-space: nowrap;
}

/* -------------------------------------------------------------------------
   SEVERITY BADGES
   Colored text on dark surface; text label satisfies non-color encoding.
   ------------------------------------------------------------------------- */
.severity {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--surface-2);
  border: 1px solid currentColor;
  white-space: nowrap;
}

.sev-critical { color: var(--sev-critical); }
.sev-high     { color: var(--sev-high);     }
.sev-medium   { color: var(--sev-medium);   }
.sev-low      { color: var(--sev-low);      }

/* -------------------------------------------------------------------------
   FINDINGS LIST
   Card-per-finding layout; collapsible evidence via <details>.
   Verdict uses both color AND a prepended icon (non-color encoding).
   ------------------------------------------------------------------------- */
.findings {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.finding {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  border-left: 3px solid var(--border);   /* overridden by verdict variant */
}

.finding header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  border: none;
  padding: 0;
  max-width: none;
}

/* Verdict left-border colors for quick scan */
.verdict-pass { border-left-color: var(--verdict-pass); }
.verdict-warn { border-left-color: var(--verdict-warn); }
.verdict-fail { border-left-color: var(--verdict-fail); }
.verdict-skip {
  border-left-color: var(--verdict-skip);
  opacity: 0.75;
}

/* Inline verdict label */
.verdict {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Non-color: prepend a glyph to the verdict label */
.verdict-pass .verdict::before { content: "✓ "; color: var(--verdict-pass); }
.verdict-warn .verdict::before { content: "⚠ "; color: var(--verdict-warn); }
.verdict-fail .verdict::before { content: "✗ "; color: var(--verdict-fail); }
.verdict-skip .verdict::before { content: "– "; color: var(--verdict-skip); }

.verdict-pass .verdict { color: var(--verdict-pass); }
.verdict-warn .verdict { color: var(--verdict-warn); }
.verdict-fail .verdict { color: var(--verdict-fail); }
.verdict-skip .verdict { color: var(--verdict-skip); }

/* -------------------------------------------------------------------------
   EVIDENCE (pre) — collapsible via <details> wrapper in markup diff
   The base <pre class="evidence"> rule also applies when <details> absent.
   ------------------------------------------------------------------------- */
.evidence {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--surface-2);
}

/* <details> wrapper for evidence collapsing (additive markup in reports) */
details.evidence-wrap {
  margin-top: 0.625rem;
}
details.evidence-wrap > summary {
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-muted);
  user-select: none;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}
details.evidence-wrap > summary::before {
  content: "▶";
  font-size: 0.65em;
  transition: transform 0.15s;
}
details.evidence-wrap[open] > summary::before { transform: rotate(90deg); }
details.evidence-wrap > summary:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Copy-button affordance — sits beside the evidence summary */
.copy-btn {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s;
  vertical-align: middle;
}
.copy-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.copy-btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}
.copy-btn[data-copied="true"] {
  color: var(--verdict-pass);
  border-color: var(--verdict-pass);
}

/* -------------------------------------------------------------------------
   REMEDIATION & SKIP-REASON
   ------------------------------------------------------------------------- */
.remediation {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  padding: 0.5rem 0.75rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.skip-reason {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

/* -------------------------------------------------------------------------
   PUBLIC REPORT CTAs
   ------------------------------------------------------------------------- */
.public-cta {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.public-cta a { color: var(--accent); }

.ttl-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.purchase-cta {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}
.purchase-cta h2 { margin-top: 0; }

/* -------------------------------------------------------------------------
   DASHBOARD
   ------------------------------------------------------------------------- */
.dashboard h1 { margin-top: 0; }

.tier-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--border);
}
.tier-card h2 { margin-top: 0; }

/* Tier indicator colors — left border accent */
.tier-free    { border-left-color: var(--text-muted); }
.tier-solo    { border-left-color: var(--accent); }
.tier-pro     { border-left-color: var(--band-gold); }
.tier-agency  { border-left-color: var(--sev-critical); }

.servers {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.servers li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.9rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}

.host {
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.schedule {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

.recent-scans {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.recent-scans li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.9rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

/* score-mini: compact inline score badge in dashboard scan list */
.score-mini {
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  display: inline-block;
}

/* Reuse band colors for score-mini — text color matches score number */
.score-mini.score-gold       { color: var(--band-gold); }
.score-mini.score-green      { color: var(--band-green); }
.score-mini.score-yellow     { color: var(--band-yellow); }
.score-mini.score-red        { color: var(--band-red); }
.score-mini.score-incomplete { color: var(--band-incomplete); }

.when {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* -------------------------------------------------------------------------
   PRICING
   ------------------------------------------------------------------------- */
.pricing h1 { margin-top: 0; }

.lede {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tier {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tier header {
  border: none;
  padding: 0;
  max-width: none;
  display: block;
}
.tier header h2 {
  font-size: 1rem;
  margin: 0 0 0.25rem;
}

.tier-highlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.price {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-head);
  line-height: 1;
}
.price span {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
}

.tier ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  flex: 1;
}
.tier ul li {
  padding: 0.2rem 0;
  margin: 0;
}
.tier ul li::before {
  content: "✓ ";
  color: var(--verdict-pass);
}

.tier .btn-primary,
.tier .btn-outline {
  width: 100%;
  text-align: center;
  margin-top: auto;
}

/* -------------------------------------------------------------------------
   SCAN RUNNING
   ------------------------------------------------------------------------- */
.scan-running {
  padding: 2rem 0;
  text-align: center;
}
.scan-running h1 { margin-top: 0; }

#status-msg {
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--accent);
  font-family: ui-monospace, monospace;
  padding: 0.75rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: inline-block;
}

/* -------------------------------------------------------------------------
   AUTH PAGES (login / login_sent)
   ------------------------------------------------------------------------- */
.auth {
  max-width: 420px;
  margin: 2rem auto;
}
.auth h1 { margin-top: 0; }
.auth form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

/* -------------------------------------------------------------------------
   SERVER DETAIL / SERVER FORM
   ------------------------------------------------------------------------- */
.server-detail h1,
.server-form h1 {
  margin-top: 0;
}

.server-detail dl,
.server-form dl {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.25rem 1.25rem;
  align-items: baseline;
  margin-bottom: 1.5rem;
}
.server-detail dl dt,
.server-form dl dt { margin-top: 0; }
.server-detail dl dd,
.server-form dl dd { margin: 0; }

.server-form form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 540px;
}

.server-detail form {
  display: inline-block;
  margin-right: 0.75rem;
  margin-top: 0.5rem;
}

/* -------------------------------------------------------------------------
   BILLING / CANCEL SUBSCRIPTION
   ------------------------------------------------------------------------- */
.cancel-subscription {
  max-width: 520px;
}
.cancel-subscription h1 { margin-top: 0; }

/* -------------------------------------------------------------------------
   PURCHASE THANKS
   ------------------------------------------------------------------------- */
.thanks {
  padding: 2rem 0;
}
.thanks h1 { margin-top: 0; }

.permalink {
  display: inline-block;
  margin: 0.75rem 0;
  font-size: 1.1rem;
  font-family: ui-monospace, monospace;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
}

/* -------------------------------------------------------------------------
   CLI LOGIN DONE  (section.cli-login-done — just chrome)
   ------------------------------------------------------------------------- */
.cli-login-done {
  padding: 2rem 0;
  text-align: center;
}
.cli-login-done h1 { margin-top: 0; }

/* -------------------------------------------------------------------------
   RESPONSIVE ADJUSTMENTS
   ------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .score-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
  }

  .score-number { font-size: 4rem; }

  .tier-grid {
    grid-template-columns: 1fr;
  }

  header {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  footer {
    padding-left: 1rem;
    padding-right: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================================================================
   END — Slate Vault direction. gen-sonnet-2.
   ========================================================================= */

/* council R4 fix (gen-sonnet-2 boundaries MINOR): scope the incomplete glyph so .score-coverage doesn't inherit bold */
.score-coverage{font-weight:400;}
.score-number .score-incomplete{font-weight:800;letter-spacing:-0.03em;}

/* inline code / commands (e.g. the run-and-upload instructions) */
code, kbd {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.08em 0.36em;
  color: var(--text);
  overflow-wrap: break-word;
}

/* trust-ladder (landing) — three ways to scan; reuses .tier-grid/.tier card styling */
.trust-ladder { margin-top: 2.75rem; }
.trust-ladder > .subhero { margin: 0.25rem 0 1.25rem; }
/* non-interactive footer for not-yet-live tiers, aligned to card bottom like a button */
.tier-cta-soon {
  margin-top: auto;
  width: 100%;
  text-align: center;
  padding: 0.55rem 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-top: 1px dashed var(--border);
}
