/* Self-hosted, not Google Fonts: the app's own CSP (see server/app.ts) allows
   styles and fonts from 'self' only, so a fonts.googleapis.com <link> is
   blocked in production and Outfit silently falls back to a system font.
   Same two files the prospect deck generator serves. */
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/outfit-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/outfit-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Axia brand palette — this is the tool's own UI, so it follows the Axia
     color spec (light-first). Generated reports/PDFs are a separate system
     that always uses the audited client's own brand, never these tokens.
     The spec itself is light-only, but this app keeps its own light/dark
     switch (below) driven by the OS setting, using midnight/navy/gold as
     the anchor colors in both. */
  --bg: #f4f6fb; /* soft-bg */
  --ink: #161d2c; /* midnight */
  --muted: #525a73; /* soft — body/description text */
  --faint: #686c7a; /* captions and small labels. Clears 4.5:1 on white and on --panel, so it is safe at any size. */
  --paper: #ffffff; /* white — card backgrounds */
  --surface-2: #f4f6fb; /* a panel inside a card; the deck generator's surface-2 */
  --on-brand: #ffffff; /* text on a brand fill */
  --panel: #f4f6fb; /* soft-bg — recessed panels, inputs */
  --border: #e2e6f0; /* rule */
  --border-hover: #cfd8ec; /* rule-hover */
  --brand: #1f3a7a; /* navy — always this value, even in dark mode: it's a fill/border color paired with white text or a light background, never read as text-on-page */
  --brand-text: #1f3a7a; /* navy used AS text/links on the page background — adaptive, since navy-on-dark-navy is unreadable */
  --gold: #d4a24c; /* accent only — hover state of buttons, the one thing to notice */
  --gold-ink: #161d2c; /* text color ON gold — always midnight, in both themes, per spec */
  --solid: #1f3a7a; /* the primary button's fill — inverts to white on dark, matching the deck generator */
  --on-solid: #ffffff;
  --tint: #e7ecf6; /* secondary button fill, icon tile fill */
  /* The bar's own fill. It cannot be --brand: in dark mode --brand and
     --tint are the same navy, so the fill and the track behind it were the
     same colour and only the diagonal stripe showed the bar had moved. */
  --progress: #1f3a7a;
  /* The diagonal stripes inside the bar. They have to read against the fill,
     and the fill is navy on paper and pale blue on a dark page, so the stripe
     cannot be white in both. */
  --progress-stripe: rgba(255, 255, 255, 0.36);
  --tint-hover: #dbe3f2;
  --dragover-bg: #e7ecf6;
  --critical: #b42318;
  --critical-bg: #fdecea;
  --critical-border: #f5c2bc;
  --critical-text: #b42318;
  --warning: #8a6420;
  --warning-bg: #f7eddb;
  --warning-text: #8a6420;
  --pass: #2fb67c;
  --pass-bg: #e6f5ee;
  --pass-border: #b7e2cc;
  --pass-text: #1f7a55;
  --shadow-card: 0 1px 2px rgba(14, 19, 48, 0.04), 0 8px 28px rgba(14, 19, 48, 0.05);
  --shadow-card-hover: 0 2px 4px rgba(14, 19, 48, 0.04), 0 24px 50px rgba(14, 19, 48, 0.1);
  --shadow-gold: 0 10px 26px rgba(212, 162, 76, 0.35);
  color-scheme: light dark;
  font-size: 16px;
  /* Header and content both read this, so they always line up. A page that
     wants a narrower measure overrides it on <body> rather than setting its
     own max-width and drifting away from the header. */
  --page-width: 1152px;
}

/* Three states, not two: an explicit choice stamps data-theme on <html>,
   and the default "follow my computer" setting stamps nothing at all. The
   media query is guarded so an explicit light choice still beats a dark OS,
   and the attribute selector repeats the tokens so the toggle wins in the
   other direction too. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10141f;
    --ink: #e8eaf0;
    --muted: #aab3c7; /* the spec's own dark-surface body color */
    --faint: #8d96ab; /* the spec's dark-surface small-label colour, lifted 15% — at #79839c it read 3.81:1 on --tint, which is the disabled button. */
    --paper: #1a2032;
    /* The deck generator's `surface-2`. A panel sitting inside a card is a
       step *up* from it there, not a hole cut into it — ours used the same
       recessed tone as an input, so the brand block read as a bin rather than
       as a section of the form. */
    --surface-2: #202940;
    --on-brand: #dfe4ef; /* the deck generator's accent-strong */
    --panel: #161d2c; /* midnight */
    --border: #2a3244;
    --border-hover: #3a4356;
    /* The deck generator's `accent-soft`, not the house navy.
    
       Navy is a fill colour on white paper and it stays that on the light
       theme. On a dark ground it is the one saturated thing on the page: a
       selected segment came out a bright blue block against a card and a page
       that are both near-black, and it read as belonging to a different
       product. The deck tool has no such colour in its dark palette — a
       chosen state there is this, one step up from the card it sits on. White
       text still clears 11:1 on it. */
    --brand: #202940;
    --brand-text: #b7c6e8; /* the deck tool's dark accent-text value. Navy is unreadable on a dark ground, but near-white made the pills compete with the page title — this sits deliberately below it. */
    --gold: #d4a24c;
    --solid: #ffffff; /* a ready button is the brightest thing on a dark page */
    --on-solid: #161d2c;
    --tint: #202940;
    --progress: #b7c6e8;
    --progress-stripe: rgba(16, 20, 31, 0.26);
    --tint-hover: #29334e;
    --dragover-bg: #202940;
    --critical: #e5847a;
    --critical-bg: #3a1f1e;
    --critical-border: #5c2b28;
    --critical-text: #f2a399;
    --warning: #e0ac4a;
    --warning-bg: #3a2f1a;
    --warning-text: #e0ac4a;
    --pass: #2fb67c;
    --pass-bg: #16332a;
    --pass-border: #27553f;
    --pass-text: #7ad9a3;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 28px rgba(0, 0, 0, 0.25);
    --shadow-card-hover: 0 2px 4px rgba(0, 0, 0, 0.2), 0 24px 50px rgba(0, 0, 0, 0.35);
  }
}

:root[data-theme="dark"] {
    --bg: #10141f;
    --ink: #e8eaf0;
    --muted: #aab3c7; /* the spec's own dark-surface body color */
    --faint: #8d96ab; /* the spec's dark-surface small-label colour, lifted 15% — at #79839c it read 3.81:1 on --tint, which is the disabled button. */
    --paper: #1a2032;
    /* The deck generator's `surface-2`. A panel sitting inside a card is a
       step *up* from it there, not a hole cut into it — ours used the same
       recessed tone as an input, so the brand block read as a bin rather than
       as a section of the form. */
    --surface-2: #202940;
    --on-brand: #dfe4ef; /* the deck generator's accent-strong */
    --panel: #161d2c; /* midnight */
    --border: #2a3244;
    --border-hover: #3a4356;
    /* The deck generator's `accent-soft`, not the house navy.
    
       Navy is a fill colour on white paper and it stays that on the light
       theme. On a dark ground it is the one saturated thing on the page: a
       selected segment came out a bright blue block against a card and a page
       that are both near-black, and it read as belonging to a different
       product. The deck tool has no such colour in its dark palette — a
       chosen state there is this, one step up from the card it sits on. White
       text still clears 11:1 on it. */
    --brand: #202940;
    --brand-text: #b7c6e8; /* the deck tool's dark accent-text value. Navy is unreadable on a dark ground, but near-white made the pills compete with the page title — this sits deliberately below it. */
    --gold: #d4a24c;
    --solid: #ffffff; /* a ready button is the brightest thing on a dark page */
    --on-solid: #161d2c;
    --tint: #202940;
    --progress: #b7c6e8;
    --progress-stripe: rgba(16, 20, 31, 0.26);
    --tint-hover: #29334e;
    --dragover-bg: #202940;
    --critical: #e5847a;
    --critical-bg: #3a1f1e;
    --critical-border: #5c2b28;
    --critical-text: #f2a399;
    --warning: #e0ac4a;
    --warning-bg: #3a2f1a;
    --warning-text: #e0ac4a;
    --pass: #2fb67c;
    --pass-bg: #16332a;
    --pass-border: #27553f;
    --pass-text: #7ad9a3;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 28px rgba(0, 0, 0, 0.25);
    --shadow-card-hover: 0 2px 4px rgba(0, 0, 0, 0.2), 0 24px 50px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

::selection {
  background: var(--brand);
  color: #ffffff;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(31, 58, 122, 0.3);
}

body {
  margin: 0;
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  /* Without this the body stops at its content and the page turns white
     below the fold on short screens. */
  min-height: 100dvh;
  /* A column, so the footer can be pushed to the bottom of a short page
     rather than floating halfway up one. */
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

/* Takes the space the footer does not, which is what holds the footer down.
   Nothing here may claim a whole screen of its own — a min-height: 100vh on
   a page wrapper puts the footer one scroll below the fold, where it renders
   correctly and is never seen. */
body > main {
  flex: 1 0 auto;
  /* Explicit, because main centres itself with margin: 0 auto and an auto
     margin in a flex column absorbs the free space instead of stretching —
     which silently narrows every page to the width of its own content. */
  width: 100%;
  /* And the rows keep their own height. main is a grid, and a grid given
     more height than its content spreads that height through the rows: on a
     short page the form ended up floating in the middle of its own gap. The
     spare space belongs at the bottom, above the footer. */
  align-content: start;
}

/* Privacy and Terms, and nothing else. Faint, small, centred: there to be
   found rather than read. */
.site-footer {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 28px 20px 32px;
  font-size: 12px;
  color: var(--faint);
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 4px;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* The internal tool shares these pages and has nobody to inform. Hidden from
   the attribute set before first paint, so it never appears and vanishes. */
:root[data-surface="internal"] .site-footer {
  display: none;
}

/* Shared Axia tool chrome. The prospect deck generator is the reference
   implementation for all of this — matching it is what keeps the tools
   reading as one product when you flip between tabs. */
header.topbar {
  /* Locked to the top on every page, the way the other two Axia tools are.
     On the report page in particular the deck is tall enough to scroll the
     brand off the screen entirely, which is the one thing the bar is there
     for. */
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--border);
  background: var(--paper);
}

/* The inner container, not the header itself, is what's constrained — the
   white strip runs edge to edge while the title lines up with the first
   card below it. Without this the title sat 32px from the window edge while
   the content sat in a centered 1152px column. */
header.topbar > .topbar-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  /* 64px, the same bar height every Axia tool uses, so the chrome doesn't
     jump when you flip between them in adjacent tabs. min-height rather than
     a fixed one: a wrapped row on a narrow screen still needs to grow. */
  min-height: 64px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* The Axia mark sits with the product name, so a page on someone else's
   screen still says who made it. Two files rather than one recoloured by
   CSS: the mark is a flat PNG, and a filter would wash out its edges. */
.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  text-decoration: none;
  color: inherit;
}

.axia-mark {
  display: block;
  width: 24px;
  height: 24px;
}

/* The public pages carry the full wordmark rather than the mark alone —
   these are the only screens a stranger sees, so the name has to be on them.
   Height-driven so the PNG keeps its own proportions; the same size the
   prospect deck generator's public page uses. */
.axia-wordmark {
  display: block;
  height: 22px;
  width: auto;
}

/* Internal pages carry the brand and the page name: the mark says whose tool
   this is, the name says which one. Divided rather than run together, so the
   two read as separate things. */
.topbar-title {
  margin: 0;
  padding-left: 12px;
  border-left: 1px solid var(--border);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.axia-mark-light { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .axia-mark-dark { display: none; }
  :root:not([data-theme="light"]) .axia-mark-light { display: block; }
}

:root[data-theme="dark"] .axia-mark-dark { display: none; }
:root[data-theme="dark"] .axia-mark-light { display: block; }

header.topbar h1 {
  font-size: 18px;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header-pill {
  font-size: 14px;
  font-weight: 500;
  color: var(--brand-text);
  background: var(--tint);
  border: none;
  border-radius: 999px;
  padding: 8px 20px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.header-pill:hover {
  background: var(--tint-hover);
  box-shadow: var(--shadow-card);
}

/* Square variant for the icon-only theme toggle, so it reads as one of the
   pills rather than a stray button. */
.header-pill.icon-only {
  padding: 8px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Which tool you are in, said in the one colour Axia reserves for the thing
   to notice. Not a pill you can press: the internal tool and the public one
   look the same from across a desk, and this is the difference. */
.header-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-ink);
  background: var(--gold);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

/* The right-hand end of the bar: badge, theme, menu, in that order. */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* The pages and the sign-out, behind one button.

   They used to sit in the bar: a pill for the other page, a theme toggle, a
   badge and a sign-out, four things across a 64px strip beside a title that
   wants the room. Navigation is the part nobody reads until they want it, so
   it folds away. Built by hand rather than with <details>, which does not
   close on Escape or on a click outside it and does not give the button its
   focus back. */
.nav-menu {
  position: relative;
}

.nav-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  min-width: 176px;
  padding: 4px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.nav-menu-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-menu-item:hover {
  background: var(--surface-2);
  color: var(--ink);
}

/* Marked rather than dropped, so the list is the same shape on every page. */
.nav-menu-item[aria-current="page"] {
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 600;
}

.nav-menu-rule {
  margin: 4px 0;
  border-top: 1px solid var(--border);
}

/* Sign out is deliberately quieter than the pills — it's the one thing in
   the header you don't want to hit by accident. */
.header-quiet {
  font-size: 14px;
  font-weight: 500;
  color: var(--brand-text);
  background: none;
  border: none;
  padding: 8px 4px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.header-quiet:hover { text-decoration: underline; }

main {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* The form column carries the whole reading: two colour rows of swatches, the
   two colour fields side by side, and both dropzones. At 420px the swatch
   rows wrapped and the labels above them ran to three lines. 546 is the old
   width and a third again.

   The split waits until 1000px rather than 900 because of that extra width —
   at 900 the results card was left under 300px, which is narrower than its
   own row of stat chips. Below the breakpoint the two stack, which is the
   better answer at that size anyway. */
@media (min-width: 1000px) {
  main { grid-template-columns: 546px 1fr; align-items: start; }
}

/* A one-column page still uses the shared width; it just stops splitting. */
main.main-single {
  grid-template-columns: 1fr;
}

/* The public lead page is a two-field form and a short list — a full
   1152px measure makes it look empty and the copy hard to scan. */
body.narrow { --page-width: 720px; }

/* The broken-link page is one card and nothing else, so the measure is the
   card: 728px of panel plus the 24px the header and main each hold at their
   sides. The Axia mark and the theme button then line up with the card's own
   edges instead of sitting out past them. */
body.fail-page { --page-width: 776px; }

.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.card h2 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.card-header h2 { margin-bottom: 16px; }

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.025em;
  margin: 14px 0 6px;
  color: var(--muted);
}

form > label:first-of-type { margin-top: 0; }

input[type="text"],
input[type="url"],
input[type="email"],
input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  /* 16px rather than the deck tool's 14px: below 16px, iOS Safari auto-zooms
     the page whenever a field is focused, and the public audit page is the
     one screen here that really does get opened on a phone. */
  font-size: 16px;
  font-family: inherit;
}

input[type="text"]:focus-visible,
input[type="url"]:focus-visible,
input[type="email"]:focus-visible,
input[type="number"]:focus-visible {
  border-color: var(--brand);
}

input[type="text"]::placeholder,
input[type="url"]::placeholder,
input[type="email"]::placeholder,
input[type="number"]::placeholder {
  color: var(--faint);
}

.combobox {
  position: relative;
}

.combobox-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-card-hover);
  max-height: 220px;
  overflow-y: auto;
}

.combobox-list[hidden] { display: none; }

.combobox-list li {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}

.combobox-list li:hover,
.combobox-list li.active {
  background: var(--tint);
  color: var(--brand-text);
}

.color-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 480px) {
  .color-row {
    flex-direction: column;
  }
}

.color-col {
  flex: 1;
  min-width: 0;
}

.color-col label {
  margin-top: 0;
}

.color-swatch-btn {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.color-swatch-btn:hover,
.color-swatch-btn:focus-visible {
  border-color: var(--brand);
}

.mode-toggle {
  display: flex;
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.mode-btn {
  flex: 1;
  padding: 10px 12px;
  background: var(--paper);
  color: var(--muted);
  border: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.mode-btn + .mode-btn {
  border-left: 1px solid var(--border);
}

/* The chosen segment reads through its text, not its fill.
   
   On the light theme the navy block does the work. On a dark one the fill is
   a single step up from the card behind it — the same near-invisible lift the
   deck generator's period toggle uses — so the brightness of the label is
   what says which one is on. A fill loud enough to carry it alone is the
   saturated blue block this was. */
.mode-btn.active {
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
}

.mode-btn:not(.active):hover {
  background: var(--tint);
  color: var(--ink);
}

/* The two cards of the form, stacked. main's own columns are the page split,
   so the pair needs a box of its own or the brand card lands beside Current
   Audit instead of under the prospect's details. */
.form-column {
  display: grid;
  gap: 24px;
  align-content: start;
}

/* Detect Brand and the reset, kept together at the end of the card's header
   row the way the deck generator has them. */
.card-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detect-brand-btn {
  padding: 6px 16px;
  background: var(--tint);
  color: var(--brand-text);
  border: none;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}

.detect-brand-btn:hover:not(:disabled) {
  background: var(--tint-hover);
}

.detect-brand-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dropzone-row {
  display: flex;
  gap: 12px;
}

@media (max-width: 480px) {
  .dropzone-row {
    flex-direction: column;
  }
}

/* The wordmark is a wide lockup and the favicon is a square, so they do not
   deserve the same width. Same split the deck generator uses. */
.dropzone-col {
  flex: 3;
  min-width: 0;
}

.dropzone-col:last-child {
  flex: 1;
}

/* Nothing to put beside a square thumbnail in a narrow box. */
.dropzone-col:last-child .dropzone-preview {
  justify-content: center;
}

.dropzone-col:last-child .dropzone-preview-meta {
  display: none;
}

.dropzone-col label {
  margin-top: 0;
}

/* `position: relative` so the remove button can sit in the corner rather than
   on the same line as the filename — see .remove-file. */
.dropzone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 92px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  background: var(--paper);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--brand);
}

.dropzone.dragover {
  border-color: var(--brand);
  background: var(--dragover-bg);
}

.dropzone-empty {
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
}

/* The thumbnail beside the name, not above it.
   
   A full-width preview 88px tall made a logo the largest thing in the form,
   and the two boxes then ran the height of the panel for no reason — the deck
   generator sets a small square next to the filename and it reads better at a
   glance. Big enough to tell a right logo from a wrong one is the whole
   requirement. */
.dropzone-preview {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-align: left;
}

.dropzone-preview[hidden] {
  display: none;
}

.dropzone-preview img {
  flex: none;
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 6px;
  /* Fixed light backdrop, not the theme background — a dark or white-on-
     transparent logo needs to read clearly regardless of the page's own
     background. */
  background: #ffffff;
  background-image: linear-gradient(45deg, #e2e6f0 25%, transparent 25%, transparent 75%, #e2e6f0 75%), linear-gradient(45deg, #e2e6f0 25%, transparent 25%, transparent 75%, #e2e6f0 75%);
  background-size: 12px 12px;
  background-position: 0 0, 6px 6px;
  border: 1px solid var(--border);
  padding: 6px;
}

.dropzone-preview-meta {
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
  /* Clear of the corner button. */
  padding-right: 14px;
}

.dropzone-preview .filename {
  flex: 1;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Pinned to the corner in both boxes, so the two match however wide they are
   and the filename gets the whole line. */
.dropzone-preview .remove-file {
  position: absolute;
  top: 2px;
  right: 4px;
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
}

.dropzone-preview .remove-file:hover {
  color: var(--critical-text);
}

.dimension-warning {
  margin: 6px 0 0;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--warning-bg);
  color: var(--warning-text);
  font-size: 12px;
  line-height: 1.4;
}

.hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

button.primary {
  margin-top: 20px;
  padding: 10px 24px;
  background: var(--solid);
  color: var(--on-solid);
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

button.primary:hover:not(:disabled) {
  background: var(--gold);
  color: var(--gold-ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

/* The one thing to press on a long form, so it takes the column rather than
   sitting in the corner of it. The deck generator's Run is the same shape. */
button.primary#submitBtn {
  width: 100%;
  padding: 12px 24px;
  font-weight: 600;
}

/* Recedes rather than dims. An opacity fade on a solid fill still reads as a
   button you can press; this reads as one that is waiting for something. */
button.primary:disabled {
  background: var(--tint);
  color: var(--faint);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#errorBox {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--critical-bg);
  border: 1px solid var(--critical-border);
  color: var(--critical-text);
  border-radius: 8px;
  font-size: 13px;
}

#progressBox {
  display: none;
  margin-top: 20px;
}

/* --tint, not --panel: on the public form the bar sits on a panel, so a
   panel-coloured track was invisible and the fill read as a loose stripe
   floating on the card rather than as part of a bar. */
.progress-track {
  position: relative;
  height: 10px;
  border-radius: 5px;
  background: var(--tint);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--progress);
  background-image: linear-gradient(
    135deg,
    var(--progress-stripe) 25%,
    transparent 25%,
    transparent 50%,
    var(--progress-stripe) 50%,
    var(--progress-stripe) 75%,
    transparent 75%,
    transparent
  );
  background-size: 28px 28px;
  width: 0%;
  transition: width 0.4s ease;
  animation: progress-stripes 0.9s linear infinite;
}

@keyframes progress-stripes {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 28px 0;
  }
}

/* A thin light that keeps sweeping across the whole track, independent of
   the real percent — so a long, unmoving step (page speed, the AI review)
   still reads as "working" instead of "stuck". */
.progress-scan {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 18%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  animation: progress-scan 1.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes progress-scan {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(650%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .progress-fill {
    animation: none;
  }
  .progress-scan {
    display: none;
  }
}

/* The two lines that sit around the bar. Each holds a label on the left and
   a number on the right, so the block reads as a column of aligned edges
   rather than four ragged lines of text. */
.progress-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.progress-row-under {
  margin: 10px 0 0;
}

/* Both right-hand numbers: the same size, weight and figure spacing, so the
   percentage above the bar and the countdown below it read as one pair. */
.progress-pct,
.progress-eta {
  flex: none;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

/* Fixed height because the words change length as the estimate lands, and
   nothing below should move when they do. */
.progress-eta {
  min-height: 17px;
}

.progress-pct {
  font-weight: 600;
  color: var(--ink);
}

.progress-msg {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

/* Inside a row it is one of two cells, so it carries no margin of its own
   and gives up its width before the number beside it does. */
.progress-row .progress-msg {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-box {
  display: none;
  margin-top: 18px;
  padding: 16px;
  border-radius: 8px;
  background: var(--panel);
}

/* The green twin of #errorBox: same padding, radius and type, a tinted
   ground and a border all the way round. It used to be a panel with a green
   bar down one side, which read as a slab bolted to the form rather than as
   the form answering back. The two outcomes of a submit now look like two of
   the same thing. */
.result-box.success {
  padding: 12px 14px;
  background: var(--pass-bg);
  border: 1px solid var(--pass-border);
  color: var(--pass-text);
  font-size: 13px;
}

.result-box.success p {
  margin: 0;
  color: inherit;
}

.result-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.result-header svg { flex: none; color: var(--pass); }

.stat-row {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.stat-chip {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 6px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--border);
}

.stat-chip .stat-count {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-chip .stat-label {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}

.stat-chip.critical .stat-count { color: var(--critical-text); }
.stat-chip.warning .stat-count { color: var(--warning-text); }
.stat-chip.pass .stat-count { color: var(--pass-text); }

.download-link {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 18px;
  background: var(--brand);
  color: white;
  border: none;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.download-link:hover:not(:disabled) {
  background: var(--gold);
  color: var(--gold-ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

.download-link:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.drive-row {
  margin-top: 14px;
}

.drive-btn {
  display: block;
  width: 100%;
  margin-top: 0;
  text-align: center;
  background: var(--brand);
}

.drive-status {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.drive-status a {
  color: var(--brand-text);
  font-weight: 600;
}

.download-link.small {
  margin-top: 0;
  padding: 4px 12px;
}

.download-link.secondary {
  background: var(--tint);
  color: var(--brand-text);
  border: none;
}

.download-link.secondary:hover:not(:disabled) {
  background: var(--tint-hover);
  color: var(--brand-text);
  transform: none;
  box-shadow: none;
}

.download-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.download-row .download-link {
  flex: 1 1 0;
  min-width: 0;
  margin-top: 0;
  text-align: center;
}

.client-list { display: flex; flex-direction: column; gap: 10px; }

.client-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--paper);
}

.client-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.client-toggle {
  display: block;
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.client-toggle:hover .name,
.client-toggle:focus-visible .name {
  color: var(--brand-text);
}

.client-item .name { display: block; font-weight: 600; font-size: 14px; }
.client-item .meta { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

.icon-btn {
  flex: none;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  color: var(--critical-text);
  background: var(--critical-bg);
  border-color: transparent;
}

/* Not every icon button is destructive — refresh/reset actions use the brand color instead of critical red. */
.icon-btn.neutral:hover,
.icon-btn.neutral:focus-visible {
  color: var(--brand-text);
  background: var(--tint);
}

.rerun-group {
  flex: none;
  display: flex;
  gap: 4px;
}

/* Solid and color-coded, not the flat tint fill .badge.quick uses — those
   two looked identical, so a real "click to rerun" action was
   indistinguishable from a passive "this audit was a Quick Audit" tag
   sitting right below it. Full and Quick each get their own solid brand
   color (navy / gold) so the two are unmistakable from each other too. */
.rerun-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rerun-btn[data-mode="full"] {
  background: var(--brand);
  color: #ffffff;
}

.rerun-btn[data-mode="quick"] {
  background: var(--gold);
  color: var(--gold-ink);
}

.rerun-icon { flex: none; }

.rerun-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-card-hover);
}

.rerun-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.rerun-btn.spinning .rerun-icon {
  animation: rerun-icon-spin 1s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .rerun-btn.spinning .rerun-icon {
    animation: none;
  }
}

@keyframes rerun-icon-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.audit-list { margin-top: 10px; display: none; flex-direction: column; gap: 8px; }

.trend-box {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--paper);
}

.trend-summary { font-size: 12.5px; font-weight: 600; }

.trend-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.t-good { color: var(--pass-text); }
.t-bad { color: var(--critical-text); }
.t-mid { color: var(--warning-text); }

.audit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--panel);
  font-size: 13px;
}

.audit-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.audit-row .icon-btn {
  width: 22px;
  height: 22px;
  font-size: 14px;
  margin-left: 4px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

/* Tinted background + matching dark text reads clearly at this size — a
   solid fill with white text fails contrast at 11px (see --pass etc.). */
.badge.complete { background: var(--pass-bg); color: var(--pass-text); }
.badge.failed { background: var(--critical-bg); color: var(--critical-text); }
.badge.running { background: var(--warning-bg); color: var(--warning-text); }
.badge.quick { background: var(--tint); color: var(--brand-text); margin-left: 4px; }

.audit-row-pending {
  display: block;
  border: 1px solid var(--brand);
  background: var(--dragover-bg);
}

.audit-row-enter {
  animation: audit-row-enter 0.3s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .audit-row-enter {
    animation: none;
  }
}

@keyframes audit-row-enter {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.pending-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* Reuses the same .progress-track/.progress-fill/.progress-scan look as the
   New Audit page's live progress bar, just smaller, so a rerun in the
   history list reads as the identical "it's working" cue. */
.audit-row-pending .progress-track {
  margin-top: 8px;
  height: 6px;
  border-radius: 3px;
}

.audit-row-pending .progress-msg {
  margin-top: 6px;
  font-size: 11.5px;
}

.empty { color: var(--muted); font-size: 13px; }

/* A themed stand-in for window.confirm() — the native dialog shows the raw
   domain in its own title bar and can't be styled at all, which looks
   broken next to everything else here. Backdrop + modal values are the
   Axia spec's own (section 5: Modal). */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 29, 44, 0.38);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal-box {
  width: 100%;
  max-width: 380px;
  background: var(--paper);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(14, 19, 48, 0.28);
  padding: 24px;
}

.modal-box h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.modal-box p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.modal-btn {
  padding: 9px 18px;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.modal-cancel {
  background: var(--tint);
  color: var(--brand-text);
}

.modal-cancel:hover {
  background: var(--tint-hover);
}

.modal-confirm {
  background: var(--critical);
  color: #ffffff;
}

.modal-confirm:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-card-hover);
}

/* ---- Public lead-magnet page (webapp/public.html) ------------------------
   Everything above is shared with the internal tool. These are the only
   styles unique to the public face. */

.public-hero h1 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.public-hero p {
  margin: 0;
  max-width: 50ch;
  color: var(--muted);
  font-size: 16px;
}

/* The card is the one thing to do on this page, so it gets the lift and
   everything around it stays flat. */
main.main-single > .card {
  box-shadow: var(--shadow-card-hover);
}

/* The only error on the public page that offers a way forward. */
#errorBox a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  white-space: nowrap;
}

.public-what h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.public-what ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.public-what li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
}

.public-what li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

/* ---- The report stage (webapp/public.html, once an audit finishes) ------
   The form's narrow measure gives way to the full width: the report is a
   landscape deck and needs the room. */

.report-stage {
  display: grid;
  gap: 20px;
}

/* The header row is one line of text. The 20px stage gap above and below it
   was spending 40px of the window on either side of a 24px heading, and the
   slide is what that height is worth more to. */
main.main-single:has(> .report-stage) { padding-top: 14px; }
.report-stage > .stage-head { margin-bottom: -8px; }

/* display:grid above beats the hidden attribute's UA display:none, so the
   stage rendered empty before its report had loaded. Same trap as
   .reveal-cta further down. */
.report-stage[hidden] { display: none; }

.stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.stage-line {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* Nothing but a grouping element now: the slide and its controls sit
   straight on the page. The panel that used to be here was a second rounded
   box around a slide that is already one. */
.deck {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

/* This is the card. Rounded and shadowed so the slide reads as an object on
   the page in both themes — on the light page it is white on near-white, and
   the shadow is the only thing holding its edge.

   It shrink-wraps the canvas, which is sized to fit the window rather than
   the column, so on a short window the slide is narrower than the page and
   sits in the middle of it. */
.deck-canvas-wrap {
  display: flex;
  justify-content: center;
}

/* Shrink-wraps the canvas, so the link layer laid over it lines up exactly. */
.deck-page {
  position: relative;
  display: block;
}

.deck-links {
  position: absolute;
  inset: 0;
}

/* Each one covers a card drawn on the page. The PDF already draws the label,
   so the anchor carries nothing but its hit area and its cursor. */
.deck-links > a {
  position: absolute;
  border-radius: 6px;
  display: block;
}

.deck-links > a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.deck-canvas-wrap > .deck-page > canvas {
  background: var(--paper);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  display: block;
}

.deck-canvas-wrap:fullscreen {
  align-items: center;
  background: var(--ink);
  padding: 24px;
}

.deck-canvas-wrap:fullscreen .deck-page {
  max-height: 100%;
}

.deck-canvas-wrap:fullscreen canvas {
  max-height: 100%;
  width: auto !important;
  max-width: 100%;
}

.deck-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px 4px;
}

.deck-middle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.deck-count {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* The deck generator's primary-button format: solid on the page, gold on
   hover, receding when there is nowhere to go. On the dark report page that
   means white, which is what these are — the two controls the reader is
   meant to use. */
.deck-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--on-solid);
  background: var(--solid);
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.2s ease, box-shadow 0.2s ease, opacity 0.15s ease;
}

.deck-btn:hover:not(:disabled) {
  background: var(--gold);
  color: var(--gold-ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

/* Recedes rather than dims, same as the submit button: an opacity fade on a
   white pill still reads as a button you can press. */
.deck-btn:disabled {
  background: var(--tint);
  color: var(--faint);
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* The expand control is not one of the two the reader is meant to use, so it
   stays quiet next to them. */
.deck-btn.icon {
  background: var(--tint);
  color: var(--brand-text);
}

.deck-btn.icon:hover:not(:disabled) {
  background: var(--tint-hover);
  color: var(--brand-text);
  transform: none;
  box-shadow: none;
}

.deck-btn.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 32px;
  height: 32px;
}

/* A step card is the one thing to do next, so it gets the gold kicker the
   brand reserves for exactly that. */
.step-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.step-kicker {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.step-card h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

.step-note {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.step-note a { color: var(--brand-text); }

.fix-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.fix-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 15px;
  color: var(--ink);
}

.fix-tag {
  flex: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.fix-tag.critical {
  color: var(--critical-text);
  background: var(--critical-bg);
}

.fix-tag.warning {
  color: var(--warning-text);
  background: var(--warning-bg);
}

.cal-embed {
  margin-top: 16px;
  min-height: 560px;
  width: 100%;
  overflow: auto;
  border-radius: 12px;
}

/* cal.com's frame is inline by default, which leaves a strip of descender
   space under it that reads as an empty band inside the card. */
.cal-embed > iframe { display: block; }

@media (max-width: 600px) {
  .deck-btn { padding: 8px 14px; font-size: 13px; }
  .stage-line { font-size: 16px; }
}

/* ---- The report page (webapp/report.html) -------------------------------
   Lifted from the prospect deck generator's closing call to action, which is
   itself the one on axiacommunications.com: a midnight panel, a gold label,
   and a round arrow that fills gold on hover. A big white card with a pulsing
   border read as an advert, which is why it isn't one. */

.report-loading {
  padding: 48px 0;
  color: var(--muted);
  font-size: 15px;
}

/* Title and counts on one line. Flex with wrap so a narrow screen breaks
   between them rather than clipping, and baseline alignment so the smaller
   counts sit on the title's baseline instead of its middle. */
.stage-title {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* Drawn, not typed: a "|" character would take the title's weight and size
   and read as part of the words. */
.stage-divider {
  width: 1px;
  align-self: stretch;
  min-height: 20px;
  margin: 0 14px;
  background: var(--border);
}

/* The counts are a fact rather than a subtitle: the numbers carry the weight
   and the words around them stay quiet. */
.stage-head .stage-line {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}

/* The three counts carry the report's own severity colours, so the numbers
   read before the words do. */
.stage-count strong {
  font-weight: 700;
}

.stage-count-critical { color: var(--critical-text); }
.stage-count-warning { color: var(--warning-text); }
.stage-count-pass { color: var(--pass-text); }

/* The one call to action on the page, so it is the brightest thing on it:
   white on the dark page, the navy pill it already is on the light one.
   Scoped here rather than changed on .download-link, which the internal tool
   uses on a card rather than on the page background. */
.stage-head .download-link {
  margin-top: 0;
  background: var(--solid);
  color: var(--on-solid);
}

.stage-head .download-link:hover {
  background: var(--gold);
  color: var(--gold-ink);
}

@media (max-width: 560px) {
  /* Stacked, with the download under the title rather than squeezed beside
     it, and the rule becomes the gap between the two lines. */
  .stage-head { align-items: flex-start; }
  .stage-title { display: block; }
  .stage-divider { display: none; }
  .stage-head .stage-line { display: block; margin-top: 4px; }
}

.reveal-cta {
  display: flex;
  width: 100%;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-radius: 16px;
  border: 1px solid rgb(14 19 48 / 0.08);
  /* Shorter than it was. This panel is a prompt, not a section: at 24 and 27
     it took as much height as a slide's worth of content and pushed the deck
     above it up the page. */
  padding: 16px 24px;
  text-align: left;
  font-family: inherit;
  /* White, the way the deck generator draws it. On a dark page a white card
     is the thing that gets pressed; the midnight panel it used to be sat in
     the page rather than on top of it. */
  background: #ffffff;
  box-shadow: 0 1px 2px rgb(14 19 48 / 0.06), 0 10px 30px rgb(0 0 0 / 0.35);
  transition:
    transform 200ms cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 200ms cubic-bezier(0.2, 0.7, 0.2, 1),
    border-color 200ms ease;
}

/* On dark the panel is the same midnight as the cards around it, so a faint
   gold edge keeps it from disappearing into them. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .reveal-cta { border-color: rgb(212 162 76 / 0.28); }
}

:root[data-theme="dark"] .reveal-cta { border-color: rgb(212 162 76 / 0.28); }

.reveal-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgb(14 19 48 / 0.06), 0 24px 50px rgb(14 19 48 / 0.22);
}

.reveal-cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgb(212 162 76 / 0.55);
}

/* display:flex above beats the hidden attribute's UA display:none, so the
   panel stayed on screen after it had been clicked. */
.reveal-cta[hidden] { display: none; }

.reveal-cta-text { min-width: 0; }

.reveal-cta-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  /* The deck's own gold ink, which holds on white where the lighter gold
     used for dark grounds would not. */
  color: #9a6f1f;
}

.reveal-cta-prompt {
  display: block;
  margin-top: 5px;
  font-size: 21px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--midnight, #161d2c);
  text-wrap: balance;
}

.reveal-cta-arrow {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgb(14 19 48 / 0.22);
  color: #161d2c;
  animation: cta-ring 2.8s ease-out infinite;
  transition:
    background-color 200ms ease,
    color 200ms ease,
    border-color 200ms ease,
    transform 200ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal-cta:hover .reveal-cta-arrow,
.reveal-cta:focus-visible .reveal-cta-arrow {
  animation: none;
  background: var(--gold);
  border-color: var(--gold);
  color: var(--gold-ink);
  transform: translateX(3px);
}

@keyframes cta-ring {
  0% { box-shadow: 0 0 0 0 rgb(212 162 76 / 0.5); }
  70%, 100% { box-shadow: 0 0 0 12px rgb(212 162 76 / 0); }
}

/* The ring is decoration, and a pulsing edge is exactly what someone turning
   motion off is turning off. */
@media (prefers-reduced-motion: reduce) {
  .reveal-cta-arrow { animation: none; }
  .reveal-cta, .reveal-cta-arrow { transition: none; }
}

@media (max-width: 600px) {
  .reveal-cta { padding: 20px; gap: 16px; }
  .reveal-cta-prompt { font-size: 20px; }
  .reveal-cta-arrow { width: 40px; height: 40px; }
}

/* The page currently being read, under the progress line. Its own row so a
   long path can't push the percentage around. */
/* The page being read, truncated from the left of the row it shares with the
   countdown. 12px rather than 13: it is the quietest thing in the block and
   was competing with the phase above it. */
.progress-detail {
  min-width: 0;
  min-height: 17px;
  font-size: 12px;
  color: var(--faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The public form is four short fields, so it reads better as a block than
   a column: two across on anything wider than a phone. */
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* The wrapper owns the spacing here, so the label's own stacking margin
   would double it. */
.field-grid .field label {
  margin: 0 0 6px;
}

@media (max-width: 560px) {
  .field-grid { grid-template-columns: 1fr; }
}

/* ---------- a report that isn't there ----------
   A panel rather than a red line: the reader has hit a dead end and needs
   telling why and where to go, which is more than one sentence's worth. */
/* Held at #errorBox specificity. The id rule above paints every error on
   the public form red, and a whole panel is not that — without the id here
   the panel stayed maroon and its button came out as pink underlined text. */
#errorBox.report-fail {
  /* Wide enough for the three parts of a link to sit across a row with room
     to breathe, and sat near the top of the page so the headline is the first
     thing on screen rather than something found halfway down. The width is
     explicit because the page centres its child, which otherwise leaves the
     panel shrink-to-fit and well short of the max. */
  width: 100%;
  /* The deck generator's own measurements: its card is max-w-3xl inside a
     px-5 main, which is 728px of card. Everything inside is set to the same
     scale, so the two pages read as one company rather than as two tools that
     happen to say the same thing. */
  max-width: 728px;
  margin: 16px auto 48px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  box-shadow: var(--shadow-card);
  text-align: left;
}

#errorBox.report-fail h1 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

#errorBox.report-fail p {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

/* The address a working link has, set as the thing itself rather than
   described in a sentence — the reader is holding one to compare it to, and
   the labels do the work of saying which part is which.
   One inset block holds the whole address: on the bare card the prefix and
   the three boxes read as four loose tiles rather than as one link. */
#errorBox.report-fail .fail-shape {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--tint);
}

#errorBox.report-fail .fail-shape-prefix {
  display: block;
  margin-bottom: 8px;
  color: var(--faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

#errorBox.report-fail .fail-parts {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

#errorBox.report-fail .fail-part {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--paper);
}

#errorBox.report-fail .fail-part-value {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.35;
  /* The code is 21 characters against two short words, so it wraps inside
     its box rather than forcing all three boxes, and the card with them, out
     to whatever width the longest one needs. */
  word-break: break-all;
}

#errorBox.report-fail .fail-part-label {
  color: var(--faint);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: uppercase;
}

/* Centred on the boxes, so the row reads as one link rather than as three
   cards with something between them. */
#errorBox.report-fail .fail-join {
  flex: 0 0 auto;
  align-self: center;
  color: var(--faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1;
}

#errorBox.report-fail .fail-compare {
  margin: 16px 0 0;
}

@media (max-width: 520px) {
  #errorBox.report-fail .fail-parts {
    flex-direction: column;
  }

  /* A join between two stacked rows means nothing. */
  #errorBox.report-fail .fail-join {
    display: none;
  }
}

/* The deck sets this as a form label: 14px at medium, not a heading weight.
   At 700 it was competing with the headline at the top of the same card. */
#errorBox.report-fail h2 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

/* The line between what they can fix themselves and what they hand to us.
   Without it the four blocks read as one wall. */
#errorBox.report-fail .fail-ask {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* The field and its button share one row until the panel is too narrow to
   hold both, at which point the button takes the full width rather than
   shrinking to something unpressable. */
/* Both children are given the field's own height rather than left to the
   row to resolve: as a wrapping flex container this one resolved taller than
   either of them, and the field ended up a line deeper than its button. */
/* A grid rather than a wrapping flex row. As flex this one resolved taller
   than either child and left them stepped rather than level; two grid tracks
   put the field and its button on the same line with nothing to resolve. */
#errorBox.report-fail .fail-ask-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

/* The deck's .field, to the pixel: a 12px radius rather than a pill, the
   recessed fill rather than the card's own, and set at 16px so a typed
   address is the largest thing in the block. */
#errorBox.report-fail .fail-ask-row input {
  min-width: 0;
  box-sizing: border-box;
  height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 24px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#errorBox.report-fail .fail-ask-row input::placeholder {
  color: var(--faint);
}

#errorBox.report-fail .fail-ask-row input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgb(31 58 122 / 0.3);
}

#errorBox.report-fail .fail-ask-row button.primary {
  box-sizing: border-box;
  /* The form-submit rule elsewhere gives every button.primary a 20px top
     margin, for a button that sits under a stack of fields. This one sits
     beside one. */
  margin: 0;
  height: 46px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--solid);
  color: var(--on-solid);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

#errorBox.report-fail .fail-ask-row button.primary:hover:not(:disabled) {
  background: var(--gold);
  color: var(--gold-ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

#errorBox.report-fail .fail-ask-row button.primary:disabled {
  background: var(--tint);
  color: var(--faint);
  cursor: not-allowed;
}

#errorBox.report-fail .fail-said {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

#errorBox.report-fail .fail-said.good {
  color: var(--ink);
  font-weight: 600;
}

#errorBox.report-fail .fail-said.bad {
  color: var(--critical-text);
}

#errorBox.report-fail .fail-other {
  margin: 20px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* Quiet on purpose. The report they came for is the thing, and this is not
   it — so it underlines rather than shouts. */
#errorBox.report-fail .fail-other a {
  color: inherit;
  font-weight: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Declared after the button's own rule so it wins on equal specificity: a
   button that has dropped to its own row should fill it rather than sit at
   whatever width its label happens to be. */
@media (max-width: 520px) {
  #errorBox.report-fail .fail-ask-row {
    grid-template-columns: 1fr;
  }

  #errorBox.report-fail .fail-ask-row button.primary {
    justify-content: center;
  }
}


/* ---------- brand palette ----------
   Every colour the reading found, split by where it came from. Two colours
   win a role and the rest used to be discarded, which left nothing on screen
   to argue with when a pick was wrong. */
/* Boxed, so the swatches read as one control rather than as loose colour
   floating between two fields. */
.palette {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
}

.palette-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.palette-title {
  font-size: 12px;
  font-weight: 600;
}

/* Label on the left of its own row rather than a sentence above it. A
   four-letter word set on the same line does the job two sentences were
   doing, and the swatches line up with each other down the block. */
.palette-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.palette-hint {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}

/* An author `display` beats the browser's own rule for [hidden], so without
   this the two labels sit there above an empty row before anything has been
   read, describing swatches that do not exist yet. */
.palette[hidden],
.palette-group[hidden] {
  display: none;
}

.palette-label {
  flex: 0 0 30px;
  padding-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

.palette-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.palette-swatch {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}

.palette-swatch:hover {
  transform: translateY(-1px);
}

/* The one already in use gets a ring, so the pick reads as a pick. */
.palette-swatch[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--brand-text);
}

/* The second colour wears a dashed edge instead of a ring, so a swatch in use
   says which of the two presses put it there. */
.palette-swatch.is-accent {
  border: 2px dashed var(--brand-text);
}

/* Back to the tool's own pick. Sized like a swatch so the row stays one row,
   and carrying the pair it would restore so it can be read without pressing. */
.palette-auto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}

.palette-auto:hover {
  transform: translateY(-1px);
}

.palette-auto[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--brand-text);
}

.palette-auto-dots {
  display: inline-flex;
}

.palette-auto-dots span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.palette-auto-dots span + span {
  margin-left: -5px;
}

.palette-swatch:focus-visible {
  outline: 2px solid var(--brand-text);
  outline-offset: 2px;
}


/* ---------- skip link ----------
   Off-screen rather than display:none, because a hidden element cannot be
   focused and the link exists precisely to be the first thing Tab reaches.
   Comes back on focus, over everything, and lands on the same pill shape the
   header already uses so it does not look like a bug when it appears. */
.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--solid);
  color: var(--on-solid);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: top .12s ease;
}

.skip-link:focus {
  top: 16px;
}

/* The target takes focus programmatically, so it must never draw a ring
   around the whole page when it does. Keyboard focus moving into it is what
   the link is for; the ring belongs on whatever is tabbed to next. */
main:focus {
  outline: none;
}

.consent-note { margin: 12px 0 0; font-size: 12px; color: var(--muted, #6b7280); }
