/*
 * Pepe's NetCheck — HQ web portal brand sheet.
 *
 * Tokens are quoted from the live site (pepes.co.uk, read 13 Aug 2026 — see
 * ios/NetCheckApp/PepesFranchising/Components/Brand.swift for the fetch and
 * the contrast figures). This is a light brand: cream ground, one red, one
 * yellow, a near-black. The red carries body text (5.81:1 on white); the
 * yellow does not (1.42:1) and never sits under small text here — only on
 * button labels large/bold enough to read as a logotype, exactly as the
 * client's own ".button" does, and inside the four severity chips, which are
 * short, bold and never body copy.
 *
 * SIGNATURE DEVICE: the "heat bar" that opens the severity panel. Store
 * network risk is not a traffic light — this brand has no green — so open
 * findings are shown as a single warmth gradient inside the site's own red
 * family (deep brick → red → muted gold → pale sand) rather than a borrowed
 * red/amber/green. The same four colours repeat as the severity chips
 * throughout the portal, so the one place this page takes a visual risk is
 * also the key to reading everything under it.
 */

:root {
  color-scheme: light;

  --cream:  #fdfae9;
  --ink:    #3d1514;
  --red:    #c42417;
  --red-2:  #c42518; /* footer / logo red — one hue, two quoted values */
  --yellow: #ffd505;
  --dark:   #1d1d1c;
  --paper:  #ffffff;
  --line:   #e9e2c8; /* a hairline pulled toward the cream, not grey */

  /* Severity heat ramp — brick → red → logo gold → pale sand. */
  --sev-critical: #8d1b17;
  --sev-critical-ink: #fdfae9;
  --sev-high: #c42417;
  --sev-high-ink: #fdfae9;
  --sev-medium: #f3d015;
  --sev-medium-ink: #3d1514;
  --sev-low: #e3d6a0;
  --sev-low-ink: #3d1514;
  --sev-overdue-ink: #3d1514;

  --radius-pill: 25px;
  --radius-card: 14px;
  --shadow-brand: 3px 8px 0 var(--dark);

  --font-display: "Livvic", "Century Gothic", "Futura", "Trebuchet MS", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 15px/1.55 var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }

a { color: var(--red); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--dark);
  outline-offset: 2px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--red);
  margin: 0 0 0.4em;
  line-height: 1.1;
}
h1 { font-weight: 900; font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); letter-spacing: -0.01em; }
h2 { font-weight: 700; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.03em; }

.eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--dark);
  opacity: 0.65;
  margin: 0 0 0.35em;
}

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

.page {
  flex: 1;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3.5rem;
}

/* --- header ---------------------------------------------------------------*/

.site-header {
  background: var(--cream);
  border-bottom: 3px solid var(--red);
}

.site-header__inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}
.brand__logo { height: 34px; width: auto; }
.brand__wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--red);
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

/* The nav collapses behind a menu button only below the small-screens
 * breakpoint. `.nav-toggle` is a `<details>` holding ONLY the `<summary>`
 * menu button - `.site-nav` is a separate sibling in `.site-header__inner`,
 * not nested inside the `<details>`, on purpose: a closed `<details>` hides
 * its non-summary content natively, and that native hide-until-open behaviour
 * is NOT undone by giving the `<details>` `display: contents` (it still
 * suppresses the content), which is what let the nav collapse to nothing
 * above the breakpoint while an empty menu button leaked through. Keeping
 * `.site-nav` outside the `<details>` sidesteps that entirely: above the
 * breakpoint the toggle is plainly hidden and the nav is an ordinary flex
 * item; below it `.nav-toggle[open] ~ .site-nav` (a same-level sibling
 * selector) shows the nav, driven by the `<details>`'s native open state. */
.nav-toggle { display: none; }
.nav-toggle__summary { display: none; }

.site-nav {
  display: flex;
  gap: 1.25rem;
  margin-right: auto;
  font-weight: 600;
}
.site-nav a { text-decoration: none; color: var(--ink); }
.site-nav a:hover { color: var(--red); }
.site-nav__soon {
  color: #9c8f7c !important;
  pointer-events: none;
}
.site-nav__soon span {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid #9c8f7c;
  border-radius: 999px;
  padding: 0.05em 0.5em;
  margin-left: 0.35em;
  vertical-align: middle;
}

.account { display: flex; align-items: center; gap: 0.9rem; }
.account__email { font-size: 0.85rem; color: var(--ink); opacity: 0.8; }
.account__signout { margin: 0; }

/* --- footer -----------------------------------------------------------*/

.site-footer {
  background: var(--red-2);
  color: var(--cream);
  text-align: center;
  padding: 1.1rem 1.5rem;
  font-size: 0.8rem;
}
.site-footer p { margin: 0; opacity: 0.9; }

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

.btn {
  display: inline-block;
  background: var(--red);
  color: var(--yellow);
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.7em 1.7em;
  font: 700 0.8rem/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-brand);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 9px 0 var(--dark); }
.btn:active { transform: translate(2px, 4px); box-shadow: 1px 4px 0 var(--dark); }

.btn--alt { background: var(--yellow); color: var(--red); }

.btn--ghost {
  background: transparent;
  color: var(--red);
  border: 2px solid var(--red);
  box-shadow: none;
  padding: 0.5em 1.2em;
}
.btn--ghost:hover { background: var(--red); color: var(--cream); transform: none; }

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

.page-login .page { display: flex; align-items: center; justify-content: center; }

.login {
  width: 100%;
  max-width: 360px;
  background: var(--paper);
  border-radius: var(--radius-card);
  padding: 2.25rem 2rem 2rem;
  text-align: center;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(29, 29, 28, 0.35);
}
.login__logo { height: 56px; width: auto; margin: 0 auto 1rem; }
.login__eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--dark);
  opacity: 0.6;
  margin: 0 0 0.25rem;
}
.login__title { margin-bottom: 1.25rem; }
.login__form { display: flex; flex-direction: column; gap: 0.4rem; text-align: left; }
.login__form label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dark);
  margin-top: 0.6rem;
}
.login__form input {
  font: 1rem/1.4 var(--font-body);
  padding: 0.65em 0.8em;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
  color: var(--ink);
}
.login__form input:focus-visible { border-color: var(--red); outline: none; box-shadow: 0 0 0 3px rgba(196, 36, 23, 0.18); }
.login__form .btn { margin-top: 1.1rem; align-self: center; }
.login__note { font-size: 0.75rem; color: var(--dark); opacity: 0.55; margin: 1.4rem 0 0; }

.alert {
  background: #fbe4d8;
  color: var(--sev-critical);
  border: 1px solid var(--sev-critical);
  border-radius: 10px;
  padding: 0.65em 0.9em;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

/* --- dashboard ------------------------------------------------------------*/

.dashboard__title { margin-bottom: 1.4rem; }

.panel {
  background: var(--paper);
  border-radius: var(--radius-card);
  padding: 1.5rem 1.6rem 1.7rem;
  margin: 0 0 1.5rem;
  box-shadow: 0 1px 0 var(--line);
}
.panel__note { margin: -0.3em 0 1.1em; font-size: 0.85rem; opacity: 0.65; }

.stat-row {
  display: flex;
  background: var(--paper);
  border-radius: var(--radius-card);
  box-shadow: 0 1px 0 var(--line);
  margin: 0 0 1.5rem;
  overflow: hidden;
}
.stat {
  flex: 1;
  text-align: center;
  padding: 1.5rem 1rem;
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: none; }
.stat__value {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem);
  color: var(--red);
  line-height: 1;
  margin: 0 0 0.35em;
  font-variant-numeric: tabular-nums;
}
.stat__label {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  opacity: 0.7;
}

/* the signature element */
.heatbar {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--line);
  margin-bottom: 1rem;
}
.heatbar__segment { flex-shrink: 0; }
.heatbar__segment--critical { background: var(--sev-critical); }
.heatbar__segment--high { background: var(--sev-high); }
.heatbar__segment--medium { background: var(--sev-medium); }
.heatbar__segment--low { background: var(--sev-low); }

.severity-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
}
.severity-legend li { display: flex; align-items: center; gap: 0.5rem; }
.severity-legend__count { font-weight: 700; font-variant-numeric: tabular-nums; }

.chip {
  display: inline-block;
  border-radius: 999px;
  padding: 0.2em 0.75em;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.chip--critical { background: var(--sev-critical); color: var(--sev-critical-ink); }
.chip--high { background: var(--sev-high); color: var(--sev-high-ink); }
.chip--medium { background: var(--sev-medium); color: var(--sev-medium-ink); }
.chip--low { background: var(--sev-low); color: var(--sev-low-ink); }

.attention-list { list-style: none; margin: 0; padding: 0; }
.attention-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 0.2rem 0.85rem 1rem;
  border-left: 4px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.attention-item:last-child { border-bottom: none; }
.attention-item--critical { border-left-color: var(--sev-critical); }
.attention-item--high { border-left-color: var(--sev-high); }
.attention-item--medium { border-left-color: var(--sev-medium); }
.attention-item--low { border-left-color: var(--sev-low); }
.attention-item--none { border-left-color: var(--dark); }

.attention-item__name { margin: 0; font-weight: 700; }
.attention-item__ref { margin: 0; font-size: 0.78rem; opacity: 0.6; }

.attention-item__status {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
}
.attention-item__visit { opacity: 0.75; }
.attention-item__visit--overdue { opacity: 1; color: var(--sev-critical); font-weight: 700; }

.empty { opacity: 0.6; margin: 0; }
.none { opacity: 0.5; font-style: italic; }
.chip--info { background: var(--line); color: var(--ink); }

/* --- back link, page sub-heading (store + visit detail) -------------------*/

.back-link {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  opacity: 0.7;
  margin-bottom: 0.9rem;
}
.back-link:hover { color: var(--red); opacity: 1; }

.store-detail__title { margin-bottom: 0.15em; }
.store-detail__ref { margin: 0 0 0.3rem; font-size: 0.85rem; opacity: 0.6; }
.store-detail__area-manager { margin: 0 0 1.4rem; font-size: 0.85rem; opacity: 0.75; }

.store-list-page__head,
.store-detail__head,
.user-detail__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
}
.store-list-page__head { align-items: flex-end; margin-bottom: 0.3rem; }
.store-list-page__head h1,
.store-detail__head h1,
.user-detail__head h1 { margin-bottom: 0; }
.store-detail__head .btn--ghost { flex-shrink: 0; }

/* --- store create / edit form ------------------------------------------ */

.store-form { max-width: 480px; }

.form-preview {
  display: flex;
  align-items: baseline;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
  padding: 0.7rem 1.1rem;
  margin: 0 0 1.2rem;
  background: var(--paper);
  border-left: 4px solid var(--dark);
  border-radius: 10px;
  box-shadow: 0 1px 0 var(--line);
}
.form-preview__label {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.68rem;
  opacity: 0.55;
}

.form {
  background: var(--paper);
  border-radius: var(--radius-card);
  padding: 1.6rem 1.6rem 1.75rem;
  box-shadow: 0 1px 0 var(--line);
}
.field { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 1rem; }
.field:first-child { margin-top: 0; }
.field label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dark);
}
.field input,
.field textarea,
.field select {
  font: 1rem/1.4 var(--font-body);
  padding: 0.65em 0.8em;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
  color: var(--ink);
  width: 100%;
}
.field textarea { resize: vertical; min-height: 4.5em; }
.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  border-color: var(--red);
  outline: none;
  box-shadow: 0 0 0 3px rgba(196, 36, 23, 0.18);
}
.field__hint { margin: 0.3rem 0 0; font-size: 0.78rem; opacity: 0.6; }
.form-actions { display: flex; align-items: center; gap: 0.9rem; margin-top: 1.5rem; }

/* --- generic linked row list (store list, visit history) ------------------*/

.list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  background: var(--paper);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 1px 0 var(--line);
}
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.1rem;
  border-left: 4px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.list li:last-child .list-row { border-bottom: none; }
.list-row:hover { background: var(--cream); }
.list-row--critical { border-left-color: var(--sev-critical); }
.list-row--high { border-left-color: var(--sev-high); }
.list-row--medium { border-left-color: var(--sev-medium); }
.list-row--low { border-left-color: var(--sev-low); }
.list-row--none { border-left-color: var(--dark); }

.list-row__main { display: flex; flex-direction: column; gap: 0.15em; }
.list-row__name { font-weight: 700; }
.list-row__ref { font-size: 0.78rem; opacity: 0.6; }
.list-row__status { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; font-size: 0.82rem; }
.list-row__visit { opacity: 0.7; }
.list-row__visit--never { opacity: 1; color: var(--sev-critical); font-weight: 700; }

/* --- Wi-Fi credential block (store detail) ---------------------------------*/

.wifi-list { display: flex; flex-direction: column; gap: 0.8rem; margin: 0; padding: 0; }
.wifi-leg {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.75rem 1rem;
  background: var(--cream);
  border-radius: 10px;
  margin: 0;
}
.wifi-leg__role {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--dark);
  opacity: 0.7;
  min-width: 4.5rem;
  margin: 0;
}
.wifi-leg__detail { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin: 0; }
.wifi-leg__ssid { font-weight: 700; }
.credential {
  font: 600 0.85rem/1 ui-monospace, Menlo, Consolas, monospace;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 0.4em 0.75em;
  letter-spacing: 0.02em;
}

/* --- equipment roster (store detail) ---------------------------------------*/

.roster-group { margin: 0 0 1.6rem; }
.roster-group:last-child { margin-bottom: 0; }
.roster-group__label { display: flex; align-items: center; gap: 0.55em; }
.roster-group__count {
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 700;
  background: var(--line);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.05em 0.6em;
  font-size: 0.72rem;
}

.table-scroll { overflow-x: auto; }
.roster-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.roster-table th,
.roster-table td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.roster-table th { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.6; font-weight: 700; }
.roster-table tbody tr:last-child td { border-bottom: none; }
.roster-table code { font: 600 0.82rem ui-monospace, Menlo, Consolas, monospace; }

.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 0.15em 0.65em;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1.5px solid var(--line);
  color: var(--ink);
}
.pill--active { background: var(--dark); color: var(--cream); border-color: var(--dark); }
.pill--removed { background: transparent; opacity: 0.55; }
.pill--superseded { background: var(--line); }

/* --- risk score (visit detail) ---------------------------------------------*/

.risk-summary { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.risk-summary__score {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.2rem, 1.8rem + 1.6vw, 3rem);
  color: var(--red);
  margin: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.risk-summary__max { font-size: 0.4em; opacity: 0.5; font-weight: 700; margin-left: 0.1em; }

.risk-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.35em 1em;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.risk-badge--red { background: var(--sev-critical); color: var(--sev-critical-ink); }
.risk-badge--amber { background: var(--sev-medium); color: var(--sev-medium-ink); }
/* This brand has no green (see the file header) - a clean result gets a
   quiet outlined badge in ink rather than a borrowed hue. */
.risk-badge--green {
  background: transparent;
  color: var(--dark);
  border: 2px solid var(--dark);
  padding: calc(0.35em - 2px) calc(1em - 2px);
}

/* --- findings (visit detail) ------------------------------------------ */

.findings-list { list-style: none; margin: 0; padding: 0; }
.finding-item { padding: 0.9rem 0 0.9rem 1rem; border-left: 4px solid var(--line); border-bottom: 1px solid var(--line); }
.finding-item:last-child { border-bottom: none; }
.finding-item--critical { border-left-color: var(--sev-critical); }
.finding-item--high { border-left-color: var(--sev-high); }
.finding-item--medium { border-left-color: var(--sev-medium); }
.finding-item--low { border-left-color: var(--sev-low); }
.finding-item--info { border-left-color: var(--line); }
.finding-item__head { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin: 0 0 0.35rem; }
.finding-item__title { margin: 0; font-weight: 700; }
.finding-item__remediation { margin: 0; font-size: 0.88rem; opacity: 0.8; }
.finding-item__remediation--none { opacity: 0.5; font-style: italic; }

/* --- 404 -------------------------------------------------------------- */

.not-found { text-align: center; padding: 3rem 1rem; }
.not-found .btn { margin-top: 1rem; }

/* --- settings: users table, role pills, one-time enrolment code -----------*/

/* A good-news counterpart to `.alert` (which is always the warm red
   refusal wash). This brand has no green (see the file header) - good news
   gets the same quiet outlined-in-ink treatment `.risk-badge--green`
   already uses for a clean scan, not a borrowed hue. */
.alert--success {
  background: var(--paper);
  color: var(--dark);
  border: 1.5px solid var(--dark);
}
.alert--success p { margin: 0; }
.alert--success p + p { margin-top: 0.5em; }

/* The one moment this flow shows a secret that will never be shown again -
   handed over like the claim ticket it functionally is. Yellow is reserved
   in this brand for exactly this: large, bold text that reads as a
   logotype rather than body copy (see the file header) - never small print. */
.code-ticket {
  background: var(--yellow);
  border: 2.5px dashed var(--dark);
  border-radius: var(--radius-card);
  padding: 1rem 1.25rem;
  margin-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.code-ticket__label {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: var(--dark);
  opacity: 0.7;
}
.code-ticket__code {
  font: 900 2rem/1.15 ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: 0.05em;
  color: var(--dark);
}
.code-ticket__note { margin: 0; font-size: 0.85rem; color: var(--dark); opacity: 0.85; }

.users-table th,
.users-table td { text-align: left; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--line); }
.users-table th { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.6; font-weight: 700; }
.users-table tbody tr:last-child td { border-bottom: none; }

.pill--role-admin { background: var(--dark); color: var(--cream); border-color: var(--dark); }
.pill--role-area_manager { background: transparent; color: var(--red); border-color: var(--red); }
.pill--inactive { background: transparent; opacity: 0.55; }

/* --- settings: per-user detail page ---------------------------------------
 *
 * The one visual idea on this page: severity, reused. This brand already has
 * a vocabulary for "this matters more" - the sev-critical brick-red that
 * marks a critical finding elsewhere in the portal - so the one truly
 * destructive action here (hard delete) borrows that exact token rather than
 * inventing a new colour. Every other action (edit, reset, reactivate) stays
 * in the ordinary panel/ghost-button language; only the danger zone steps
 * outside it, and only by as much as a critical finding already does.
 */

.user-detail__title { margin-bottom: 0.15em; }
.user-detail__email { margin: 0 0 0.5rem; font-size: 0.9rem; opacity: 0.7; }
.user-detail__badges { margin: 0 0 1.4rem; display: flex; gap: 0.5rem; }

.field--checkbox label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}
.field--checkbox input { width: auto; }

/* A single small action with its own one-button form, laid end to end in a
   panel - "Account access" and "Account status" are both a short list of
   these rather than a full `.form` card each. */
.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.action-row:last-child { border-bottom: none; }
.action-row__body { display: flex; flex-direction: column; gap: 0.2rem; max-width: 34rem; }
.action-row__title { margin: 0; font-weight: 700; }
.action-row__note { margin: 0; font-size: 0.85rem; opacity: 0.7; }
.action-row form { margin: 0; flex-shrink: 0; }

.eyebrow--danger { color: var(--sev-critical); opacity: 1; }

.panel--danger {
  border: 2px solid var(--sev-critical);
  box-shadow: none;
}
.panel--danger h2 { color: var(--sev-critical); }

.btn--danger {
  background: transparent;
  color: var(--sev-critical);
  border: 2px solid var(--sev-critical);
  box-shadow: none;
  padding: 0.5em 1.2em;
}
.btn--danger:hover { background: var(--sev-critical); color: var(--sev-critical-ink); transform: none; }

/* --- small screens ---------------------------------------------------- */

@media (max-width: 640px) {
  .site-header__inner { gap: 0.75rem; }

  /* Below the breakpoint the toggle takes the nav's old flex slot (order 3,
   * full width) so it wraps onto its own row under the logo/account row,
   * and the nav itself becomes a dropdown panel under the button. */
  .nav-toggle { display: block; order: 3; width: 100%; }

  .nav-toggle__summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin: 0;
    padding: 0.6em 1em;
    font: 700 0.75rem/1 var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--red);
    background: var(--paper);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-card);
    cursor: pointer;
    user-select: none;
    list-style: none;
  }
  .nav-toggle__summary::-webkit-details-marker { display: none; }
  .nav-toggle__summary::marker { content: ""; }
  .nav-toggle[open] .nav-toggle__summary { border-color: var(--red); }

  .nav-toggle__icon,
  .nav-toggle__icon::before,
  .nav-toggle__icon::after {
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
  }
  .nav-toggle__icon { position: relative; display: inline-block; }
  .nav-toggle__icon::before,
  .nav-toggle__icon::after {
    content: "";
    position: absolute;
    left: 0;
    transition: transform 0.15s ease;
  }
  .nav-toggle__icon::before { top: -5px; }
  .nav-toggle__icon::after { top: 5px; }
  .nav-toggle[open] .nav-toggle__icon { background: transparent; }
  .nav-toggle[open] .nav-toggle__icon::before { transform: translateY(5px) rotate(45deg); }
  .nav-toggle[open] .nav-toggle__icon::after { transform: translateY(-5px) rotate(-45deg); }

  /* `.site-nav` is a sibling of `.nav-toggle`, not its content (see the
   * comment above `.nav-toggle { display: none; }`), so it collapses/reveals
   * off the `<details>`'s native `[open]` state via a sibling combinator,
   * not a descendant one. It takes the toggle's old flex slot, wrapping onto
   * its own full-width row right under the button. */
  .site-nav { display: none; order: 4; width: 100%; margin-right: 0; }
  .nav-toggle[open] ~ .site-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0.5rem;
    padding: 0.25rem 0;
    border-top: 1px solid var(--line);
  }
  .site-nav a { padding: 0.65rem 0.2rem; border-bottom: 1px solid var(--line); }
  .site-nav a:last-child { border-bottom: none; }

  .stat-row { flex-direction: column; }
  .stat { border-left: none; border-top: 1px solid var(--line); }
  .stat:first-child { border-top: none; }
  .attention-item { flex-direction: column; align-items: flex-start; }
  .list-row { flex-direction: column; align-items: flex-start; }
  .wifi-leg { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .device-card__chevron { transition: none; }
  .lightbox__mount { animation: none; }
  .nav-toggle__icon::before,
  .nav-toggle__icon::after { transition: none; }
}

/* --- visit report: full head-office record -------------------------------- */

.muted { opacity: 0.6; font-weight: 400; }

/* Store's public line + manager counts: a plain key/value grid. */
.spec-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem 1.6rem;
  margin: 0;
}
.spec { margin: 0; }
.spec dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  opacity: 0.6;
  margin: 0 0 0.15rem;
}
.spec dd { margin: 0; font-weight: 600; }
.spec code { font: 600 0.85rem ui-monospace, Menlo, Consolas, monospace; }

/* Devices found on the network: one readable card per host. */
.device-leg {
  display: flex;
  align-items: center;
  gap: 0.55em;
  margin: 1.4rem 0 0.7rem;
}
.device-leg:first-of-type { margin-top: 0.3rem; }

.device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.device-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 10px;
  overflow: hidden;
}

/* The clickable disclosure row - a native <summary>, so the whole card is
   keyboard/screen-reader operable with no script. Collapsed, it is the only
   thing shown; it repeats the facts a reader needs before deciding to open
   a device, in the same tag/badge vocabulary the expanded body uses below. */
.device-card__summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
  padding: 0.9rem 1rem;
  cursor: pointer;
  list-style: none;
}
.device-card__summary::-webkit-details-marker { display: none; }
.device-card__summary:hover { background: var(--paper); }
.device-card[open] > .device-card__summary {
  border-bottom: 1px solid var(--line);
}

.device-card__summary-main {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.device-card__summary-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.device-card__ip {
  font: 700 1rem/1 ui-monospace, Menlo, Consolas, monospace;
  color: var(--ink);
}
.device-card__hostname { font-size: 0.85rem; opacity: 0.75; }

/* A quiet, bordered mono badge for the open-port count - deliberately not a
   coloured pill like the vendor/role/gateway tags either side of it, so the
   summary reads as one fact drawn from the network (a number) among several
   drawn from identity (vendor, role). */
.device-card__ports {
  font: 700 0.72rem/1.4 ui-monospace, Menlo, Consolas, monospace;
  padding: 0.05em 0.5em;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  white-space: nowrap;
}
.device-card__ports--zero { opacity: 0.55; font-weight: 400; }

/* Disclosure chevron: a plain corner, not the UA triangle, so it matches the
   rest of the brand's geometric marks (tags, tiers). Points right closed,
   down open. */
.device-card__chevron {
  width: 0.5rem;
  height: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
  border-right: 2.5px solid var(--red);
  border-bottom: 2.5px solid var(--red);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}
.device-card[open] > .device-card__summary .device-card__chevron {
  transform: rotate(45deg);
}

.device-card__body {
  padding: 0.9rem 1rem 1rem;
}

.kv { margin: 0; }
.kv__row { display: flex; gap: 0.6rem; padding: 0.12rem 0; }
.kv__row dt {
  flex: 0 0 5.5rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
  opacity: 0.55;
}
.kv__row dd { margin: 0; font-size: 0.85rem; min-width: 0; word-break: break-word; }
.kv__row dd code { font: 600 0.8rem ui-monospace, Menlo, Consolas, monospace; }

.device-card__block { margin-top: 0.8rem; }
.device-card__label {
  font-family: var(--font-body);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
  opacity: 0.55;
  font-weight: 700;
  margin: 0 0 0.35rem;
}
.device-card__link { margin: 0; font-size: 0.85rem; }

.subtable { width: 100%; border-collapse: collapse; font-size: 0.8rem; background: var(--paper); }
.subtable th, .subtable td {
  text-align: left;
  padding: 0.35rem 0.55rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.subtable th {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.55;
  font-weight: 700;
  white-space: nowrap;
}
.subtable tbody tr:last-child td { border-bottom: none; }
.subtable code { font: 600 0.78rem ui-monospace, Menlo, Consolas, monospace; }

.tls { display: flex; flex-direction: column; gap: 0.1rem; }
.tls__row { font-size: 0.74rem; opacity: 0.85; word-break: break-word; }

/* Small inline tags reused across the device cards. */
.tag {
  display: inline-block;
  border-radius: 999px;
  padding: 0.1em 0.6em;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.tag--gateway { background: var(--dark); color: var(--cream); }
.tag--confirmed { background: transparent; color: var(--red); border: 1.5px solid var(--red); }
.tag--soft {
  background: var(--line);
  color: var(--ink);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 600;
}
.tag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }

/* Identifier tier badge (A strongest → C weakest). */
.tier {
  display: inline-block;
  border-radius: 6px;
  padding: 0.05em 0.45em;
  font: 700 0.7rem/1.4 ui-monospace, Menlo, Consolas, monospace;
  border: 1.5px solid var(--line);
}
.tier--A { background: var(--dark); color: var(--cream); border-color: var(--dark); }
.tier--B { background: var(--sev-medium); color: var(--sev-medium-ink); border-color: var(--sev-medium); }
.tier--C { background: transparent; color: var(--ink); }

/* Equipment-observation outcome pills (extend the roster `.pill`). */
.pill--outcome-added { background: var(--dark); color: var(--cream); border-color: var(--dark); }
.pill--outcome-confirmed { background: transparent; color: var(--red); border-color: var(--red); }
.pill--outcome-replaced { background: var(--sev-medium); color: var(--sev-medium-ink); border-color: var(--sev-medium); }
.pill--outcome-removed { background: transparent; opacity: 0.6; }
.pill--outcome-not_seen { background: var(--line); }
.pill--outcome-inaccessible { background: transparent; color: var(--sev-critical); border-color: var(--sev-critical); }

/* Photographs: pinned-evidence cards reusing the brand's offset shadow. */
.photo-group { margin-bottom: 1.4rem; }
.photo-group:last-child { margin-bottom: 0; }
.photo-group__label { display: flex; align-items: center; gap: 0.5em; margin-bottom: 0.15rem; }
.photo-group__meta { margin: 0 0 0.8rem; font-size: 0.82rem; opacity: 0.7; }
.photo-group__meta code { font: 600 0.8rem ui-monospace, Menlo, Consolas, monospace; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.1rem 1.2rem;
}
.photo-card {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-brand);
  overflow: hidden;
}
.photo-card__img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--line);
  display: block;
}
.photo-card__caption {
  padding: 0.45rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 600;
  opacity: 0.75;
  font-variant-numeric: tabular-nums;
}
/* Provenance tag - "Taken in the app" / "From camera roll" - kept quiet: a
   lighter weight than the timestamp it sits beside, no colour of its own. */
.photo-card__source { font-weight: 400; }

/* Thumbnail's open control. `.photo-card` clips to its rounded corners
   (overflow: hidden), so the focus ring is pulled inward with a negative
   offset rather than the usual outward one - an outward ring would be cropped
   at the edges by that clip. */
.photo-card__expand { display: block; }
.photo-card__expand:focus-visible {
  outline: 3px solid var(--dark);
  outline-offset: -3px;
}

/* Photograph lightbox - a CSS-only full-size view (`:target`, no script: the
   portal CSP ships no script-src relaxation). Each thumbnail's <a href>
   points at its own #photo-lightbox-{id}; this element is that target,
   display:none until matched. The enlarged photo is mounted in the same
   paper card the thumbnail uses (var(--paper), --radius-card,
   --shadow-brand), just larger, so it reads as the same pinned-evidence
   object lifted off the board rather than a generic modal. */
.lightbox {
  display: none;
}
.lightbox:target {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
}
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 29, 28, 0.92);
}
.lightbox__mount {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  max-width: 90vw;
  max-height: 90vh;
  background: var(--paper);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-brand);
  padding: 0.7rem 0.7rem 0.9rem;
  animation: lightbox-in 0.15s ease;
}
.lightbox__img {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  max-width: calc(90vw - 1.4rem);
  max-height: calc(90vh - 4.5rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  background: var(--line);
}
.lightbox__caption {
  margin: 0.65rem 0.1rem 0;
  font-size: 0.82rem;
  color: var(--ink);
}
.lightbox__caption .muted { display: block; margin-top: 0.15rem; }
.lightbox__caption code { font: 600 0.8rem ui-monospace, Menlo, Consolas, monospace; }
.lightbox__close {
  position: absolute;
  top: -0.9rem;
  right: -0.9rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--dark);
  color: var(--cream);
  font: 700 1.3rem/1 var(--font-body);
  text-decoration: none;
  box-shadow: var(--shadow-brand);
}
.lightbox__close:hover { background: var(--red); }
.lightbox__close:focus-visible {
  outline: 3px solid var(--dark);
  outline-offset: 2px;
}

@keyframes lightbox-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* Warnings: plain, so they read as caveats not alarms. */
.warning-group { margin-bottom: 1rem; }
.warning-group:last-child { margin-bottom: 0; }
.warning-group__label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
  font-weight: 700;
  margin: 0 0 0.4rem;
}
.warning-list { list-style: none; margin: 0; padding: 0; }
.warning-item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  padding: 0.5rem 0.75rem;
  background: var(--cream);
  border-left: 3px solid var(--sev-medium);
  border-radius: 8px;
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
}
.warning-item:last-child { margin-bottom: 0; }
.warning-item__key { font-weight: 700; opacity: 0.6; text-transform: uppercase; font-size: 0.68rem; letter-spacing: 0.03em; }

@media (max-width: 640px) {
  .device-grid, .photo-grid { grid-template-columns: 1fr; }
  .kv__row { flex-direction: column; gap: 0.05rem; }
  .kv__row dt { flex-basis: auto; }
}

/* --- reports: the admin Security summary -----------------------------
 *
 * The dashboard opens with three quiet stat tiles; this is a document, not a
 * screen you glance at - a head-office briefing meant to be read start to
 * finish and printed. It opens instead with a dark dateline band (echoing
 * the footer's own --dark band, so the report is visually bookended rather
 * than just another stack of --paper panels) carrying a one-line, data-
 * derived verdict - the thesis of the whole page - and an "as of" stamp set
 * in the same monospace this brand already reserves for credentials and
 * codes (.credential, .code-ticket__code), because a report's dateline is
 * that same kind of fact: a stamped-and-fixed value, not prose.
 */

.report-hero {
  background: var(--dark);
  color: var(--cream);
  border-radius: var(--radius-card);
  padding: 1.7rem 1.8rem;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.report-hero__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  flex-wrap: wrap;
}
.report-hero .eyebrow { color: var(--cream); opacity: 0.6; margin-bottom: 0.2em; }
.report-hero h1 { color: var(--cream); margin: 0; }
.report-hero__stamp {
  font: 700 0.76rem/1.3 ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
  color: var(--yellow);
  white-space: nowrap;
}
.report-hero__verdict {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.05rem, 0.94rem + 0.6vw, 1.4rem);
  line-height: 1.3;
  margin: 0.2rem 0 0;
  max-width: 62ch;
}
.report-hero__verdict--clear { opacity: 0.8; font-weight: 600; }

/* Section 2: open critical/high findings, grouped by store. Each group is a
 * small dossier card - reuses .findings-list/.finding-item/.chip verbatim
 * (the visit detail page's own vocabulary for exactly this content) rather
 * than inventing a second finding-list style. */
.report-group {
  background: var(--paper);
  border-radius: var(--radius-card);
  border-left: 4px solid var(--line);
  box-shadow: 0 1px 0 var(--line);
  padding: 1.05rem 1.3rem 0.3rem;
  margin: 0 0 1rem;
}
.report-group:last-child { margin-bottom: 0; }
.report-group--critical { border-left-color: var(--sev-critical); }
.report-group--high { border-left-color: var(--sev-high); }
.report-group__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.3rem;
}
.report-group__store { margin: 0; font-weight: 700; }
.report-group__store a { color: inherit; text-decoration: none; }
.report-group__store a:hover { color: var(--red); }
.report-group__meta { margin: 0; font-size: 0.78rem; opacity: 0.65; }
.report-group .finding-item__rule {
  font: 600 0.72rem ui-monospace, Menlo, Consolas, monospace;
  opacity: 0.55;
  margin-left: 0.5em;
}

/* Section 3: the NET-011 callout - the estate's key segregation risk, given
 * its own visual register rather than reading as one more severity chip.
 * Shares the warm red wash `.alert` already uses for this brand's "something
 * is wrong" register (currently the sign-in error), rather than a new hue. */
.report-net011 {
  background: #fbe4d8;
  border: 1.5px solid var(--sev-critical);
  border-radius: var(--radius-card);
  padding: 0.95rem 1.2rem;
  margin: 0 0 0.9rem;
}
.report-net011:last-child { margin-bottom: 0; }
.report-net011__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  flex-wrap: wrap;
}
.report-net011__store { margin: 0; font-weight: 700; color: var(--sev-critical); }
.report-net011__store a { color: inherit; text-decoration: none; }
.report-net011__store a:hover { text-decoration: underline; }
.report-net011__meta { margin: 0; font-size: 0.78rem; opacity: 0.7; }
.report-net011__title { margin: 0.5rem 0 0; font-weight: 600; }
.report-net011__answer { margin: 0.35rem 0 0; font-size: 0.85rem; }
.report-net011__answer-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.68rem;
  opacity: 0.7;
  margin-right: 0.4em;
}
.report-net011__note { margin: 0.35rem 0 0; font-size: 0.85rem; font-style: italic; opacity: 0.85; }

/* Section 5: coverage - reuses .stat__value/.stat__label's typography (the
 * dashboard's own numerals) on cream tiles rather than nesting a second
 * .stat-row's white card inside this section's .panel, which would read as
 * white-on-white. */
.report-coverage__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}
.report-coverage__tile {
  flex: 1 1 150px;
  text-align: center;
  padding: 0.9rem 0.7rem;
  background: var(--cream);
  border-radius: 10px;
}
.report-coverage__tile .stat__value { font-size: clamp(1.5rem, 1.25rem + 1vw, 2.1rem); }

/* --- print: a briefing that fits one clean document ------------------- */
@media print {
  .site-header, .site-footer, .site-nav, .back-link, .btn, .account { display: none !important; }
  body { background: var(--paper); }
  .page { max-width: none; padding: 0; margin: 0; }

  /* The dark dateline band costs a page of toner for no reading benefit on
   * paper - printed, it converts to the same quiet outlined-in-ink treatment
   * this brand already gives good news (.risk-badge--green's comment
   * explains the reasoning: no colour to spend, so an outline carries it). */
  .report-hero {
    background: none;
    color: var(--ink);
    border: 2.5px solid var(--dark);
    padding: 1rem 1.3rem;
  }
  .report-hero .eyebrow,
  .report-hero h1,
  .report-hero__verdict,
  .report-hero__stamp { color: var(--ink); }

  .panel, .report-group, .report-net011, .stat-row, .attention-item {
    box-shadow: none;
    break-inside: avoid;
  }

  /* Severity is the one thing this report cannot afford to lose to a
   * browser's "skip background colours" print default. */
  .chip, .heatbar__segment, .report-group, .report-net011,
  .attention-item, .list-row {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* --- device enrolment: the UDID capture tool (web/enroll.py) ---------------
 *
 * An internal admin tool, so it wears the portal's own clothes - .panel,
 * .eyebrow, .btn, .roster-table - rather than inventing a second look. The one
 * place it spends any boldness is the step list on the start page: this flow
 * genuinely IS an ordered sequence an admin walks a device through, so the
 * numbers earn their place (they encode the order, they do not decorate), and
 * they are drawn as a connected timeline in the brand red/yellow. Everything
 * else stays quiet.
 */

.enrol { max-width: 46rem; }
.enrol__lead { max-width: 40rem; margin: 0.2rem 0 1.4rem; opacity: 0.85; }
.enrol__foot { max-width: 40rem; font-size: 0.85rem; opacity: 0.6; margin: 1.2rem 0 0; }

/* The signature: a numbered process timeline. `counter` drives the markers, so
   the ordinal is real content the list keeps in step with, not hand-typed. */
.enrol-steps {
  list-style: none;
  counter-reset: enrol-step;
  margin: 0;
  padding: 0;
}
.enrol-step {
  counter-increment: enrol-step;
  position: relative;
  padding: 0 0 1.3rem 3.1rem;
}
.enrol-step:last-child { padding-bottom: 0; }
.enrol-step::before {
  content: counter(enrol-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.1rem;
  height: 2.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: var(--yellow);
  border-radius: 999px;
  font: 900 1rem/1 var(--font-display);
  z-index: 1;
}
/* The connecting spine between markers - the "timeline" read. */
.enrol-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 1.05rem;
  top: 2.1rem;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.enrol-step__title { margin: 0.2rem 0 0.2rem; font-weight: 700; }
.enrol-step__body { margin: 0; font-size: 0.9rem; opacity: 0.8; }

.enrol-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}
.enrol-actions .back-link { margin-bottom: 0; }

/* The "iOS will error at the end" notice. This is a known, ignorable quirk of
 * the install handshake, not a real failure - the device is already captured
 * by the time it appears - so it borrows the brand's medium/amber severity
 * register (a heads-up) rather than `.alert`'s warm red, which this portal
 * reserves for something actually being wrong. */
.enrol-notice {
  background: rgba(243, 208, 21, 0.18);
  border: 1.5px solid var(--sev-medium);
  border-radius: var(--radius-card);
  padding: 0.95rem 1.2rem;
  margin: 1.4rem 0 0;
}
.enrol-notice__title { margin: 0 0 0.3rem; font-weight: 700; }
.enrol-notice__body { margin: 0; font-size: 0.88rem; opacity: 0.9; }
.enrol-notice__body a { color: var(--ink); }

/* Copy-friendly UDID: full 40 hex chars on one selectable line, in the
   monospace this brand already reserves for credentials and codes. */
.enrol-udid {
  font: 600 0.82rem ui-monospace, Menlo, Consolas, monospace;
  color: var(--ink);
  user-select: all;
}
.enrol-table td { vertical-align: top; }

/* The result page: no header (the device is not signed in), so it centres on
   its own, mirroring the sign-in card. */
.page-enrol-done .page { display: flex; align-items: center; justify-content: center; }
.enrol-done {
  width: 100%;
  max-width: 380px;
  background: var(--paper);
  border-radius: var(--radius-card);
  padding: 2.25rem 2rem 2rem;
  text-align: center;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(29, 29, 28, 0.35);
}
.enrol-done__logo { height: 56px; width: auto; margin: 0 auto 1rem; }
.enrol-done__eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--dark);
  opacity: 0.6;
  margin: 0 0 0.25rem;
}
.enrol-done__title { margin-bottom: 1rem; }
.enrol-done__body { font-size: 0.92rem; opacity: 0.85; margin: 0 0 0.9rem; text-align: left; }
.enrol-done__body:last-child { margin-bottom: 0; }
