/* =========================================================================
   Umbermark: Starhold brand v2 (STAR-166 R14)
   /static/product-tokens.css loads first and owns the fleet palette: neutrals
   (--bg, --surface, --surface-2, --border, --text, --text-muted #9aa3b5), the
   one action colour (--accent amber, --accent-hover, --accent-ink), --focus,
   radii, spacing, the Plex font stacks and the wordmark + lockup rules. This
   file only maps Umbermark's own names onto them and keeps the semantic
   colours: score bands, severities and verdicts (they also match the
   html_report.py export palette). No private accent palette lives here.
   ========================================================================= */

/* -------------------------------------------------------------------------
   DESIGN TOKENS (Umbermark names -> fleet tokens; semantic colours kept)
   ------------------------------------------------------------------------- */
:root {
  --border-focus: var(--focus);        /* focus ring: the fleet focus blue */
  --text-head:    var(--text);         /* headings: fleet ink */
  --text-link:    var(--accent);       /* inline links: amber, the one action colour */
  --accent-text:  var(--accent-ink);   /* text ON amber */

  /* --- Score bands (semantic; 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 the old muted grey to pass AA on --surface */

  /* Shape: panels stay at the fleet --radius-sm (6px, R6); small parts use 2px */
  --radius:    var(--radius-sm);
  --radius-xs: 2px;
  --max-w:     760px;
}

/* -------------------------------------------------------------------------
   RESET & BASE
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  font-family: var(--font-sans);
  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-xs);
}

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: var(--font-mono);
  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
   ------------------------------------------------------------------------- */
/* Header lockup (STAR-166): the PNG mark + Starhold wordmark come from
   product-tokens.css (.brand, .mark, .wordmark); the product name follows
   behind a hairline. The old umber logo colour is retired. */
.brand .logo {
  padding-left: var(--sp-2);
  border-left: 1px solid var(--border-strong);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-2);
  line-height: 1.25;
  color: var(--text);
  letter-spacing: 0;
}
.brand:hover .logo { color: var(--accent); }
.brand:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

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-pill);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1.4;
}

/* Primary / CTA — flat amber fill, dark ink (R9) */
.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 = the fleet secondary action: raised surface, strong hairline,
   Plex Mono; hover turns the hairline amber. Chamfer geometry at the end. */
.btn-outline {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-strong);
  font-family: var(--font-mono);
  font-weight: 400;
}
.btn-outline:hover {
  color: var(--text);
  border-color: var(--accent);
  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-xs);
  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: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--border-focus);
}

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='%239aa3b5' 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: var(--font-mono);
  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: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  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: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  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;
}

/* Copy-paste one-liner CTA (landing hero + /scan/upload) */
.cta-lead { margin-bottom: 0.5rem; color: var(--text-head); }
.copy-block {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.5rem 0.5rem 1rem;
}
.copy-block code {
  flex: 1;
  align-self: center;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-head);
  word-break: break-all;
  user-select: all;
}
.copy-block .copy-btn { margin: 0; flex-shrink: 0; }
.cta-alt { margin-top: 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;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  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.15rem 0.55rem;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  font-weight: 400;
  background: transparent;
  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-xs);
  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-xs);
  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);      }

.sev-info     { color: var(--text-muted);   }
.deductions.informational li { opacity: 0.85; }
.finding .control { margin: 0.25rem 0 0; font-size: 0.8rem; color: var(--text-muted); }

/* Remediation is rendered HTML (paragraphs, lists, <pre> command blocks). */
.remediation p, .remediation ul { margin: 0.35rem 0; }
.remediation ul { padding-left: 1.2rem; }
.remediation pre { margin: 0.35rem 0; font-size: 0.8rem; }
.remediation code { font-family: var(--font-mono); }


/* -------------------------------------------------------------------------
   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-xs);
}

/* 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-xs);
  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-xs) var(--radius-xs) 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-xs);
  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);
}

.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-xs);
  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(--font-mono);
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  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);
}

/* --- Public check catalogue (/checks) --- */
.check-list { list-style: none; padding: 0; }
.check-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.6rem 0.9rem; margin: 0.5rem 0; }
.check-summary { display: block; color: var(--text-muted); font-size: 0.9rem; }
.check-kind { font-size: 0.75rem; color: var(--text-muted); border: 1px solid var(--border); border-radius: var(--radius-xs); padding: 0 0.4rem; }
.check-section { margin: 1.5rem 0; }
.fix-step { margin: 1rem 0; }
.fix-variant { margin: 0.6rem 0 0.2rem; font-size: 0.85rem; color: var(--text-muted); }
.fix-judgement { font-size: 0.7rem; color: var(--sev-medium); border: 1px solid var(--border); border-radius: var(--radius-xs); padding: 0 0.4rem; }
.fix-locked { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 0.6rem 0.9rem; }
.fixpack-cta { margin: 2rem 0; }

/* .product-label is a chip (R11): hairline frame, leading square, Plex Mono. Text verbatim. */
.product-label{margin-left:.75rem;margin-right:auto;font-size:.75rem;color:var(--text-muted)}
.product-status{font-size:.9rem;opacity:.8}

/* =========================================================================
   STAR-166 brand v2 geometry (R6, R9, R11; F4)
   Panels are hull plates: radius <= 6px, a --chamfer cut off the top-right
   corner, a flat surface and a 1px border. clip-path removes the border along
   the cut, so ::after draws that hairline back. No lift, no shadow, no
   gradient fills. Chips and secondary buttons take the smaller --chip-cut.
   ========================================================================= */
.how-it-works ol li,
.scan-form form,
.score-card,
.finding,
.tier-card,
.tier,
.check-item,
.auth form,
.server-form form,
.purchase-cta,
.copy-block {
  position: relative;
  clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, 0 100%);
}
.how-it-works ol li::after,
.scan-form form::after,
.score-card::after,
.finding::after,
.tier-card::after,
.tier::after,
.check-item::after,
.auth form::after,
.server-form form::after,
.purchase-cta::after,
.copy-block::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: var(--chamfer);
  height: var(--chamfer);
  pointer-events: none;
  background: linear-gradient(to top right, transparent calc(50% - 1px), var(--border) calc(50% - 1px), var(--border) calc(50% + 1px), transparent calc(50% + 1px));
}
.tier-highlight::after {
  background: linear-gradient(to top right, transparent calc(50% - 1px), var(--accent) calc(50% - 1px), var(--accent) calc(50% + 1px), transparent calc(50% + 1px));
}
@media (max-width: 520px) {
  .how-it-works ol li, .scan-form form, .score-card, .finding, .tier-card, .tier,
  .check-item, .auth form, .server-form form, .purchase-cta, .copy-block {
    clip-path: polygon(0 0, calc(100% - var(--chamfer-sm)) 0, 100% var(--chamfer-sm), 100% 100%, 0 100%);
  }
  .how-it-works ol li::after, .scan-form form::after, .score-card::after, .finding::after, .tier-card::after,
  .tier::after, .check-item::after, .auth form::after, .server-form form::after, .purchase-cta::after,
  .copy-block::after {
    width: var(--chamfer-sm);
    height: var(--chamfer-sm);
  }
}

/* Chips (R11): hairline frame, Plex Mono, the small chamfer. Verdict pills keep
   their semantic colour and glyph; the cut's hairline follows currentColor. */
.pill,
.product-label,
.check-kind,
.fix-judgement,
.btn-outline {
  position: relative;
  clip-path: polygon(0 0, calc(100% - var(--chip-cut)) 0, 100% var(--chip-cut), 100% 100%, 0 100%);
}
.product-label,
.check-kind,
.fix-judgement {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 1px var(--sp-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-weight: 400;
  line-height: 1.5;
}
/* the tiny leading indicator square */
.product-label::before,
.check-kind::before,
.fix-judgement::before {
  content: '';
  flex: none;
  width: 5px;
  height: 5px;
  background: currentColor;
}
.pill::after,
.product-label::after,
.check-kind::after,
.fix-judgement::after,
.btn-outline::after {
  content: '';
  position: absolute;
  top: -1px;
  right: -1px;
  width: var(--chip-cut);
  height: var(--chip-cut);
  pointer-events: none;
  background: linear-gradient(to top right, transparent calc(50% - 1px), var(--border-strong) calc(50% - 1px), var(--border-strong) calc(50% + 1px), transparent calc(50% + 1px));
}
.pill::after {
  background: linear-gradient(to top right, transparent calc(50% - 1px), currentColor calc(50% - 1px), currentColor calc(50% + 1px), transparent calc(50% + 1px));
}
.btn-outline {
  border-radius: 0;
}
.btn-outline:hover::after {
  background: linear-gradient(to top right, transparent calc(50% - 1px), var(--accent) calc(50% - 1px), var(--accent) calc(50% + 1px), transparent calc(50% + 1px));
}
/* clip-path also clips an outline drawn outside the box: draw it inside. */
.btn-outline:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -4px;
}

/* Timestamps, durations and counts read as instrument values (R2). */
.when,
.score-number,
.score-mini,
.price {
  font-variant-numeric: tabular-nums;
}

/* Phone header: lockup and nav on one row, the availability chip on its own row below (text unchanged). */
@media (max-width: 600px) {
  header { flex-wrap: wrap; row-gap: var(--sp-2); }
  .product-label { order: 3; margin-left: 0; white-space: nowrap; }
  header nav a:first-child { margin-left: 0; }
}
