/* Qualiphy's brand on the NEW look (lane BRANDING, 2026-10-29; vault note "Branding guidelines applied to v2 (2026-10-29)"). Loaded by base.html after every page style and ONLY in the new look: the old look never sees this file.
   It holds the structure the guide describes (page header with its eyebrow, cards, buttons, fields, tables, badges, notices, the navy menu, the signed-out page, the logo) and NOTHING else: every color, size, radius, shadow and space is a token
   of the active theme (themes/qualiphy.css), so a named theme and the dark mode follow, and a test (test_brand.py) keeps it that way. Where a screen's own stylesheet is more specific it still wins. */

/* ---- the brand type face, self-hosted (Plus Jakarta Sans, SIL OFL; the files and their source are in static/fonts/; same origin only, so the content security policy needs nothing). One variable file covers every weight the scale uses (400 to 700, up to 800). The theme's stack puts Gilroy first when the visitor has it installed. */
@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("fonts/PlusJakartaSans-wght.woff2") format("woff2");
}

/* ---- the page: the area's name above the title, and the guide's room under the last line */
#page { padding-bottom: var(--space-page-bottom); }
#page[data-eyebrow]::before {
  content: attr(data-eyebrow); display: block; margin-bottom: var(--space-3); font-size: var(--font-size-eyebrow); font-weight: 700;
  letter-spacing: var(--track-eyebrow); text-transform: uppercase; color: var(--color-accent-text);
}
.page-head h1 { font-weight: var(--font-weight-heading); letter-spacing: -.02em; }

/* ---- cards */
.panel { border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.panel h2 { font-size: var(--font-size-card-title); }
.stat b { font-size: var(--font-size-stat); }

/* ---- buttons: purple fill (a tinted halo), pressed slate, a quiet disabled; secondary is the ghost, .soft the tint, .danger the red */
.btn {
  border-radius: var(--radius-md); padding: var(--btn-pad); font-size: var(--font-size-button); font-weight: var(--font-weight-button); min-height: var(--target-min);
  box-shadow: var(--shadow-primary);
}
.btn:hover { background: var(--color-accent-hover); }
a.btn { text-decoration: none; }          /* a link that looks like a button is not underlined (its shape says it is pressable) */
.btn:active { background: var(--color-accent-pressed); }
.btn.secondary { background: transparent; color: var(--color-text); border-color: var(--color-border-strong, var(--color-border)); box-shadow: none; }
.btn.secondary:hover { background: var(--color-surface-2); border-color: var(--color-accent); }
.btn.secondary:active { background: var(--color-tint); }
.btn.soft { background: var(--color-tint); color: var(--color-on-tint); border-color: transparent; box-shadow: none; }
.btn.soft:hover { background: color-mix(in srgb, var(--color-accent) 20%, var(--color-surface)); }
.btn.danger { background: var(--color-danger); color: var(--color-on-danger); box-shadow: none; }
.btn.danger:hover { background: var(--color-danger-hover); }
.btn.small { padding: var(--btn-pad-sm); font-size: var(--font-size-button-sm); border-radius: var(--radius-control-sm); }
.btn:disabled:not(.secondary):not(.soft):not(.danger), .btn[aria-disabled="true"]:not(.secondary):not(.soft):not(.danger) { background: var(--color-accent-disabled); box-shadow: none; cursor: not-allowed; }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; }
.btn.secondary:disabled, .btn.soft:disabled { opacity: .55; }

/* ---- a row of one text box and its button (the decline box of a signing page, a reason box on a review): the box fills the row and is a full touch target; before the brand type face its default 21px height only cleared the touch-spacing rule by half a pixel */
.inline-form:has(> input[type="text"]) { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.inline-form > input[type="text"] {
  flex: 1 1 12rem; min-width: 0; min-height: var(--target-min); padding: var(--input-pad); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-surface); color: var(--color-text); font: inherit;
}
.inline-form > input[type="text"]:focus-visible { outline: none; border-color: var(--color-accent); box-shadow: var(--ring-glow); }

/* ---- fields: a labelled box with the purple halo while it has focus (a floating label keeps its own padding, which its label is placed against) */
.field > span { font-size: var(--font-size-label); }
.field:not(.float) input, .field:not(.float) textarea { padding: var(--input-pad); }
.field input, .field textarea { border-radius: var(--radius-md); }
.field input:focus-visible, .field textarea:focus-visible { border-color: var(--color-accent); box-shadow: var(--ring-glow); }
.hint, .field .help { font-size: var(--font-size-help); }
.field { margin-bottom: var(--space-field); }

/* ---- tables: a quiet head in small capitals, a hover row, comfortable cells */
.data-table, .audit-table { font-size: var(--font-size-table); }
.data-table thead th, .audit-table thead th {
  background: var(--color-table-head-bg); font-size: var(--font-size-table-head); font-weight: 700; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--color-text-muted);
}
.data-table th, .data-table td { padding: var(--space-3) var(--space-4); }
.audit-table th, .audit-table td { padding: var(--space-3) var(--space-4); }
.data-table tbody tr:hover { background: var(--color-row-hover); }

/* ---- badges: a pill on a tint; the words are the page's text color (the guide's tinted-text colors fail AA), the state is the tint */
.chip {
  padding: var(--badge-pad); border-radius: var(--radius-pill); font-size: var(--font-size-badge); line-height: 1.2; font-weight: 600;
  background: var(--color-tint); color: var(--color-text); border: 1px solid transparent;
}
.chip.none, .chip.more { background: var(--color-neutral-bg); color: var(--color-neutral-text); border-color: transparent; font-weight: 500; }
.chip.ok { background: var(--color-ok-bg); color: var(--color-ok-text); border-color: var(--color-ok-border); }
.chip.warn { background: var(--color-warn-bg); color: var(--color-warn-text); border-color: var(--color-warn-border); }
.chip.danger { background: var(--color-danger-soft); color: var(--color-danger-text); border-color: var(--color-danger-border); }
.chip.info { background: var(--color-tint); color: var(--color-on-tint); border-color: transparent; }

/* ---- a phone: the badge and the table cells go back to the tight padding the dense screens were laid out with (a 320px window has no room for more) */
@media (max-width: 40rem) {
  .chip { padding: var(--space-1) var(--space-2); }
  .data-table th, .data-table td, .audit-table th, .audit-table td { padding: var(--space-2) var(--space-3); }
}

/* ---- notices: the state's tint, its border and its words */
.notice { background: var(--color-danger-soft); color: var(--color-danger-text); border: 1px solid var(--color-danger-border); }
.notice.ok { background: var(--color-ok-bg); color: var(--color-ok-text); border-color: var(--color-ok-border); }
.notice.warn { background: var(--color-warn-bg); color: var(--color-warn-text); border-color: var(--color-warn-border); }

/* ---- the menu: the navy gradient, a lavender label over each section, the open page in the accent with its halo */
.sidenav { background: var(--sidebar-gradient); background-color: var(--sidebar-bg); }
.ctx-head h2 { font-size: var(--font-size-nav-section); letter-spacing: var(--track-nav-section); color: var(--sidebar-label); font-weight: 700; }
.menu-link[aria-current="page"], .rail-btn[aria-current="page"], .area-btn[aria-current="true"] {
  background: var(--color-accent); color: var(--color-on-accent); box-shadow: var(--shadow-nav-active);
}
.menu-link[aria-current="page"]:hover, .rail-btn[aria-current="page"]:hover, .area-btn[aria-current="true"]:hover { background: var(--color-accent-hover); color: var(--color-on-accent); }
.rail-btn.primary, .rail-btn.primary:hover { box-shadow: var(--shadow-primary); }

/* ---- the logo: Qualiphy's own files (static/brand/), never stretched or recolored. A pair (the one for light and the one for dark) is swapped by the page's mode, the way the theme swaps its values; the menu and the
   signed-out page are always dark, so they carry the dark file alone. */
.logo { display: block; width: auto; max-width: 100%; object-fit: contain; }
.logo.sm { height: var(--logo-h-sm); }
.logo.md { height: var(--logo-h-md); }
.logo.lg { height: var(--logo-h-lg); }
.logo-on-dark { display: none; }
:root[data-mode="dark"] .logo-on-light { display: none; }
:root[data-mode="dark"] .logo-on-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"]) .logo-on-light { display: none; }
  :root:not([data-mode="light"]) .logo-on-dark { display: block; }
}
.ctx-logo { padding: var(--space-2) var(--space-3) var(--space-3); }
.welcome .logo { margin-inline: auto; animation: rise 600ms var(--ease) both; }
.sg-public-head .logo { margin-bottom: var(--space-3); }
@media (prefers-reduced-motion: reduce) { .welcome .logo { animation: none; } }

/* ---- signed out: the dark gradient with its two glows, the logo above the card */
.center { background: var(--guest-bg); align-content: center; justify-items: center; gap: var(--space-5); }
.card { border-radius: var(--radius-xl); box-shadow: var(--shadow-modal); }

/* ---- calmer nudges (lane A11YPASS): the paused-exams callouts of a person with several clinics are tight warning-tint lines, title and sentence on one flowing line, small gaps; the old look (which does not load this sheet) keeps its red slab */
.credit-banners { gap: var(--space-1); margin: 0 0 var(--space-3); }
.credit-banner { padding: var(--space-1) var(--space-3); border-width: 1px; border-left-width: var(--space-2); border-color: var(--color-warn-border); background: var(--color-warn-bg); color: var(--color-warn-text); font-size: .9rem; line-height: 1.4; }
.credit-banner p { display: inline; margin: 0; }
.credit-banner-title { font-size: 1em; }
.credit-banner p + p { margin-top: 0; }
.credit-banner p + p::before { content: " "; }
.credit-banner-resolve, .credit-banner-review { display: inline-flex; margin-left: var(--space-2); }
