/*
 * Professional theme — the pilot surfaces' shared stylesheet.
 *
 * THE PILOT LOOK. One sheet for the sign-in / sign-up / email-code /
 * authenticator / choose-company / sign-out screens and for the Police Book
 * pages under /policebook, so the two families stop wearing two ad-hoc looks
 * and both wear the one rasheedrouting.com already serves.
 *
 * WHERE IT COMES FROM. This is the component layer of the public marketing
 * catalog — miniserver/services/center_api/static/site.css — lifted as a shared
 * sheet. Every value below is that file's value: its type scale, spacing,
 * button/input/table/card/header treatment, its 3px focus ring, and its
 * stack-row-instead-of-scrolling table behaviour at narrow widths. The receipt
 * recording that sourcing decision, with shas, is
 * docs/platform/shell/PILOT-PROFESSIONAL-THEME-20261001.md.
 *
 * CENTRAL THEME ONLY. Like every other stylesheet on these surfaces, this
 * declares NO palette: every colour is a var(--rasrouting-theme-*) role resolved by
 * shared/theme-central.css, which loads before it. That is the rule the
 * consolidation receipt states as "surfaces may make semantic aliases but never
 * local palettes", and it is what keeps a surface change from forking the
 * central theme. A colour literal here is a defect, and
 * test_the_shared_stylesheet_declares_no_colour_of_its_own in
 * platform/auth/tests/center_auth/g02_candidate/
 * test_pilot_theme_stylesheet_served.py fails the build if one appears.
 *
 * The component *names* are the catalog's own (--brand, --panel, ...) resolved
 * once here from central roles, so this sheet reads like the site it copies and
 * still owns no colour of its own.
 *
 * NO WEBFONT, NO CDN. The catalog self-hosts Inter and Oswald, but those
 * .woff2 files are granted only on the centre's public policy — the Pi's
 * /policebook/static mount is gated by edge-private, which carries no font rule.
 * So the stacks name the faces and fall back to the system UI stack. Granting
 * the fonts to edge-private later makes the pages pick them up with no change
 * here. Nothing is fetched off-origin, so the CSP is untouched.
 *
 * GENERIC CONTROLS. Inputs, labels, error text, buttons, tables, cards and
 * headings are styled as plain elements and simple class names rather than per
 * page ids, so a field added to any of these forms inherits the theme with no
 * stylesheet work. The rule that matters for that is the "label + input +
 * message" trio near the middle of this file.
 */

:root {
  /* --- the catalog's semantic names, over central roles ----------------- */
  --brand: var(--rasrouting-theme-blue-base);
  --brand-hover: var(--rasrouting-theme-blue-hover);
  --brand-active: var(--rasrouting-theme-blue-active);
  --brand-ink: var(--rasrouting-theme-ink-inverse);
  --brand-soft: var(--rasrouting-theme-blue-subtle);
  --brand-line: var(--rasrouting-theme-blue-border);
  --accent: var(--rasrouting-theme-blue-ink);

  --panel: var(--rasrouting-theme-surface);
  --page: var(--rasrouting-theme-canvas);
  --neutral-soft: var(--rasrouting-theme-surface-raised);
  --neutral-faint: var(--rasrouting-theme-line-faint);
  --line: var(--rasrouting-theme-line);
  --line-strong: var(--rasrouting-theme-line-strong);

  --ink: var(--rasrouting-theme-ink-strong);
  --muted: var(--rasrouting-theme-ink-soft);

  --ok-bg: var(--rasrouting-theme-green-subtle);
  --ok-ink: var(--rasrouting-theme-green-ink);
  --err-bg: var(--rasrouting-theme-red-subtle);
  --err-ink: var(--rasrouting-theme-red-ink);
  --err-line: var(--rasrouting-theme-red-border);
  --warn-bg: var(--rasrouting-theme-amber-subtle);
  --warn-ink: var(--rasrouting-theme-amber-ink);

  --chrome-bg: var(--rasrouting-theme-surface-sunken);
  --chrome-ink: var(--rasrouting-theme-ink-strong);
  --chrome-muted: var(--rasrouting-theme-ink-soft);
  --chrome-line: var(--rasrouting-theme-line);
  --chrome-hover: var(--rasrouting-theme-surface-raised);
  --chrome-active: var(--rasrouting-theme-surface-overlay);

  --shadow-sm: var(--rasrouting-theme-shadow-sm);
  --shadow-md: var(--rasrouting-theme-shadow-md);
  --ring: var(--rasrouting-theme-focus);

  /* --- the catalog's faces, system-first (see NO WEBFONT above) ---------- */
  --pro-display: 'Oswald', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pro-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* --- the catalog's type scale, spacing and radii ---------------------- */
  --pro-fs-1: 0.8125rem;
  --pro-fs-2: 0.875rem;
  --pro-fs-3: 1rem;
  --pro-fs-4: 1.125rem;
  --pro-fs-5: clamp(1.375rem, 2.6vw, 1.75rem);
  --pro-fs-display: clamp(1.75rem, 4.6vw, 2.5rem);

  --pro-sp-1: 4px;
  --pro-sp-2: 8px;
  --pro-sp-3: 12px;
  --pro-sp-4: 16px;
  --pro-sp-5: 20px;
  --pro-sp-6: 24px;
  --pro-sp-7: 32px;
  --pro-sp-8: 44px;

  --pro-r-control: 8px;
  --pro-r-card: 12px;
  --pro-r-pill: 999px;

  --pro-lh-copy: 1.6;
  --pro-lh-title: 1.16;
}

/* ---------------------------------------------------------------- reset -- */

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

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font: var(--pro-fs-3) / var(--pro-lh-copy) var(--pro-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The catalog honours a reduced-motion preference globally; the pilot
   surfaces get the same courtesy rather than animating against a request. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { animation: none !important; transition: none !important; }
}

img,
svg { max-width: 100%; }

/* --------------------------------------------------------------- a11y ---- */

/* The 3px brand outline with a 2px offset is the catalog's focus treatment and
   the strongest accessibility asset these pages have. It is kept verbatim. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 3px;
  box-shadow: var(--rasrouting-theme-focus);
}

/* Visually hidden but still announced. The catalog calls this .sr-only; the
   chooser markup has always called it .visually-hidden, so both names resolve
   here rather than each sheet keeping its own copy. */
/* .sr-only and .visually-hidden uses the shared screen-reader utility in site-shell.css. */

.skip,
.pb-skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 30;
  padding: 10px 14px;
  border-radius: var(--pro-r-control);
  background: var(--panel);
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus,
.pb-skip:focus { left: var(--pro-sp-3); top: var(--pro-sp-2); }

/* ------------------------------------------------------------ headings --- */

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: var(--pro-lh-title);
  color: var(--ink);
}

h1 {
  font-family: var(--pro-display);
  font-weight: 600;
  font-size: var(--pro-fs-display);
  letter-spacing: -0.3px;
  margin-bottom: var(--pro-sp-3);
}

h2 {
  font-family: var(--pro-display);
  font-weight: 600;
  font-size: var(--pro-fs-5);
  letter-spacing: -0.2px;
}

h3 { font-size: 1.125rem; }

p { margin: 0 0 var(--pro-sp-4); color: var(--muted); }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); }

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

.rasrouting-signin-header,
.pb-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--pro-sp-3) var(--pro-sp-4);
}

.rasrouting-signin-header {
  padding: var(--pro-sp-3) var(--pro-sp-6);
  border-bottom: 1px solid var(--chrome-line);
  background: var(--chrome-bg);
}

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

.rasrouting-signin-main {
  flex: 1;
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
  padding: 0 var(--pro-sp-6);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--pro-sp-4);
}

.rasrouting-signin-footer {
  padding: 0 var(--pro-sp-6) var(--pro-sp-5);
  background: var(--page);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
}

.rasrouting-signin-footer .footer-powered {
  order: 1;
}

/* The sign-in shell and the book shell are both full-height columns: the main
   region takes the slack and the footer sits on the bottom edge. This is what
   lets .rasrouting-signin-main centre itself in the viewport the way the catalog's own
   pages do. */
.rasrouting-signin-body,
body.pb-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
/* A column flex item defaults to min-width:auto, so this BODY refuses to
   shrink below its widest descendant. `.pb-table` is a ten-column nowrap
   register, so at tablet width the body
   stayed at its content width and the DOCUMENT scrolled sideways — which is
   exactly what `.pb-table-scroll` exists to prevent. Without this, the
   contained-scroll promise in the tables comment above is false: the page
   scrolls, not the table. */
.rasrouting-signin-body,
body.pb-page { min-width: 0; }
.rasrouting-signin-body > *,
body.pb-page > * { min-width: 0; }

/* --------------------------------------------------------------- forms --- */

/* A form is a panel unless it says otherwise: a single-control form marked
   data-variant="bare" is a control, not a card. */
form {
  display: flex;
  flex-direction: column;
  gap: var(--pro-sp-4);
  margin: 0;
  padding: var(--pro-sp-5);
  border: 1px solid var(--line);
  border-radius: var(--pro-r-card);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

form[data-variant='bare'] {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  align-items: flex-start;
}

/* THE GENERIC FIELD. A label is a column: the words, then the control, then
   the message. Stacked rather than inline, so a field added to any of these
   forms — including the ones the sign-up work is adding right now — is themed
   without a stylesheet change. */
label {
  display: flex;
  flex-direction: column;
  gap: var(--pro-sp-2);
  font-size: var(--pro-fs-2);
  font-weight: 600;
  color: var(--muted);
}

/* THE GENERIC CONTROL. .pb-field input/select/textarea are named here
   explicitly because the book sheet's own rules are CLASS-scoped and so beat a
   bare element selector no matter which file loads first. Naming them is what
   makes one theme govern both families rather than the two quietly
   disagreeing. The catalog's values are these: the 11px 12px box and 44px
   target height come from site.css's own form rules, and the book sheet's
   former 8px 10px / 38px is the ad-hoc look this replaces. */
input,
select,
textarea,
.pb-field input,
.pb-field select,
.pb-field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--pro-r-control);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  min-height: 44px;
}

textarea { min-height: 120px; resize: vertical; }

select {
  appearance: none;
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: right 16px top 50%, right 11px top 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

input:hover,
select:hover,
textarea:hover { border-color: var(--line-strong); }

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}

input::placeholder,
textarea::placeholder {
  color: var(--rasrouting-theme-ink-muted);
  opacity: 1;
}

input[type='checkbox'],
input[type='radio'] {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--brand);
  flex: 0 0 auto;
}

/* A checkbox or radio is a row beside its label, not a stacked pair. */
label:has(> input[type='checkbox']),
label:has(> input[type='radio']) {
  flex-direction: row;
  align-items: center;
  gap: var(--pro-sp-3);
  min-height: 44px;
  color: var(--ink);
}

/* Error and hint text. Reserved height keeps the card from reflowing when a
   message appears.

   The error ink sits on the PLAIN panel, not on a red tint, and that is
   deliberate and measured: --rasrouting-theme-red-ink on --rasrouting-theme-surface is 6.47:1
   in light and 9.35:1 in dark, while the same ink on --rasrouting-theme-red-subtle is
   1.72:1 and would fail WCAG AA outright. The retired ad-hoc rule had it right
   for the same reason. A red border and the reserved gap carry "this is an
   error" without spending the contrast the words need, and a control marked
   invalid takes the tint on the control itself (below), not on its message. */
[role='alert'],
.field-error,
.error {
  margin: 0;
  min-height: 1.25em;
  font-size: var(--pro-fs-1);
  font-weight: 600;
  color: var(--err-ink);
}

/* An invalid control is marked by its BORDER, not by tinting its own
   background: the control holds the user's own typed text, and tinted ink on a
   tinted field is the same contrast failure the message rules avoid (see
   .form-status). The border is 2px so the state is visible without relying on
   hue alone, and the message beside it carries the words. */
input[aria-invalid='true'],
select[aria-invalid='true'],
textarea[aria-invalid='true'] {
  border: 2px solid var(--err-line);
  background: var(--panel);
}

.hint,
.field-hint {
  margin: 0;
  font-size: var(--pro-fs-1);
  font-weight: 400;
  color: var(--muted);
}

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

button,
.btn,
.pb-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--pro-sp-2);
  min-height: 44px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--brand);
  color: var(--brand-ink);
  font: 600 var(--pro-fs-3) / 1.2 var(--pro-body);
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}

button:where(:not(:disabled, [aria-disabled='true'])):hover,
.btn:where(:not(:disabled, [aria-disabled='true'])):hover,
.pb-button:where(:not(:disabled, [aria-disabled='true'])):hover { background: var(--brand-hover); }

button:where(:not(:disabled, [aria-disabled='true'])):active,
.btn:where(:not(:disabled, [aria-disabled='true'])):active,
.pb-button:where(:not(:disabled, [aria-disabled='true'])):active { background: var(--brand-active); }

/* The book sheet's .pb-button-primary is deliberately NOT overridden here. It
   carries the admin red role, a written product decision recorded at
   police-book.css: a red "Record sale" would read as a destructive control on
   a surface whose point is that nothing here can be destroyed. The shared
   sheet sets the box; the book sheet keeps the role. */

button[data-variant='quiet'],
.btn.quiet {
  background: transparent;
  color: var(--accent);
  border-color: var(--line);
}

button[data-variant='quiet']:hover,
.btn.quiet:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--accent);
}

button[data-variant='ghost'],
.btn.ghost {
  background: transparent;
  color: var(--chrome-ink);
  border-color: var(--chrome-line);
}

button[data-variant='ghost']:hover,
.btn.ghost:hover { border-color: var(--line-strong); }

/* --------------------------------------------------------------- cards --- */

.card,
.pb-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--pro-r-card);
  padding: var(--pro-sp-5);
}

.card h3 { margin: 0 0 var(--pro-sp-2); }
.card p { margin: 0 0 var(--pro-sp-2); font-size: var(--pro-fs-3); }

/* --------------------------------------------------------------- tables -- */

/* Usable at tablet width: the catalog's own answer is to stack each row into a
   card under 700px rather than push a horizontal scrollbar across the page.
   The same treatment is applied here, and the .pb-table wrapper keeps its
   explicit horizontal scroll for the wide record tables that genuinely need it
   (overflow on a contained element is not page-level horizontal scroll). */
table,
.pb-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--pro-r-card);
  font-size: var(--pro-fs-3);
}

caption {
  text-align: left;
  font-weight: 600;
  padding: 0 0 var(--pro-sp-3);
  color: var(--ink);
}

th,
td,
.pb-table th,
.pb-table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

thead th,
.pb-table th {
  background: var(--neutral-soft);
  font-size: var(--pro-fs-1);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

tbody tr:last-child td,
.pb-table tbody tr:last-child td { border-bottom: 0; }

tbody tr:hover,
.pb-table tbody tr:hover { background: var(--neutral-soft); }

.pb-table-scroll { overflow-x: auto; max-width: 100%; }

@media (max-width: 700px) {
  table,
  .pb-table {
    display: block;
  }
  thead,
  .pb-table thead {
    display: none;
  }
  tbody,
  .pb-table tbody {
    display: block;
  }
  tbody tr,
  .pb-table tbody tr {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
  }
  tbody tr:last-child,
  .pb-table tbody tr:last-child { border-bottom: 0; }
  tbody tr > th,
  tbody tr > td,
  .pb-table tbody tr > th,
  .pb-table tbody tr > td {
    display: block;
    max-width: 100%;
    padding: 0;
    border-bottom: 0;
    overflow-wrap: break-word;
  }
  /* A row's own header becomes its caption when the table is stacked. */
  tbody tr > th:first-child,
  .pb-table tbody tr > th:first-child {
    font-weight: 700;
    margin-bottom: 2px;
  }
  tbody tr > td:first-of-type,
  .pb-table tbody tr > td:first-of-type {
    margin-top: 2px;
    font-size: var(--pro-fs-1);
    color: var(--muted);
  }
}

/* --------------------------------------------------------------- status -- */

/* A notice carries its role in the 4px left rule, for the contrast reason
   spelled out at .form-status below: the theme's subtle tints are built for
   borders and chips, not for reading words on. */
.notice {
  display: block;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
  font-size: var(--pro-fs-3);
  margin: 0 0 var(--pro-sp-5);
}
/* display:block above outranks the browser's own [hidden] rule; a hidden notice stays hidden. */
.notice[hidden] { display: none; }

.notice.draft {
  border-left-color: var(--rasrouting-theme-amber-base);
  color: var(--ink);
  font-weight: 600;
}

.notice.truth { border-left-color: var(--rasrouting-theme-green-ink); }

/* A status band. The band is the message, so the whole box may take a role's
   surface; what it may NOT do is put tinted INK on a tinted GROUND, which is
   where the contrast goes. Measured: the central theme's own subtle tints fail
   AA against every ink the theme offers -- green-ink on green-subtle is 3.03:1
   light and 1.66:1 dark, red-ink on red-subtle is 1.72:1 and 1.98:1, and
   ink-strong on green-subtle is 7.04:1 light but 2.42:1 dark. Those tints are
   built for a coloured BORDER or a chip, not for reading words on.

   So the band is the plain panel and the role is carried by a 4px left rule
   plus the words, which is the same treatment the error text above gets and the
   one the retired ad-hoc sheet already used. Everything here clears 4.5:1 in
   both themes. */
.form-status {
  margin: 0 0 var(--pro-sp-4);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--pro-r-control);
  background: var(--panel);
  color: var(--ink);
  font-size: var(--pro-fs-2);
  font-weight: 600;
  display: none;
}

.form-status.ok { display: block; border-left-color: var(--rasrouting-theme-green-ink); }

.form-status.err { display: block; border-left-color: var(--err-ink); }

/* ---------------------------------------------------------------- misc --- */

/* The authenticator setup address is one long selectable string; let it wrap
   rather than scroll out of its card. */
code {
  font-size: var(--pro-fs-1);
  word-break: break-all;
}

/* The powered-by rule and alignment belong to the central theme's own
   .footer-powered component; only the wrapper's room is set here. */
.footer-powered {
  border-top: 1px solid var(--chrome-line);
  margin-top: var(--pro-sp-4);
  padding-top: 14px;
  display: flex;
  justify-content: flex-start;
}

/* Tap targets (walk r3): the footer links and the top-bar theme segments on the sign-in screens are 44px each way. */
.rasrouting-signin-footer a,
.rasrouting-signin-footer .footer-powered a,
body.rasrouting-signin-body .site-shell-footer:not([data-shell-footer]) a,
.rasrouting-signin-main p > a:only-child {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  box-sizing: border-box;
}

:root body.rasrouting-signin-body .site-bar .site-bar-shared-controls .rasrouting-theme-group .rasrouting-theme-btn {
  width: 44px;
  min-width: 44px;
  flex: 0 0 44px;
}

:root body.rasrouting-signin-body .site-bar .site-bar-shared-controls .rasrouting-theme-group .rasrouting-theme-btn::before {
  inset: 8px 8px;
}

.rasrouting-signin-main label:has(> input[type='checkbox']) {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

/* =====================================================================
 * Sign-up / sign-in family: ONE look with the /website/ pages (owner 10-10).
 *
 * The pages now load the same top bar, skin tokens and type face as the website
 * (the shell adds the MODERN skin, so --skin-font-* is Plus Jakarta Sans); this
 * block lays the form, links and footer out with those tokens. Everything is
 * scoped to body.rasrouting-signin-body, so the Police Book pages (body.pb-page) that
 * share this sheet are untouched. Tokens only: no colour literal is declared here.
 * ================================================================== */

/* The skip link is invisible until it takes keyboard focus. */
body.rasrouting-signin-body .rasrouting-signin-skip {
  position: absolute;
  inset-inline-start: -9999px;
  top: 8px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--rasrouting-theme-surface);
  color: var(--rasrouting-theme-ink-strong);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--rasrouting-theme-line-strong);
}
body.rasrouting-signin-body .rasrouting-signin-skip:focus,
body.rasrouting-signin-body .rasrouting-signin-skip:focus-visible { inset-inline-start: 12px; }

/* One centred column with room under the bar. */
body.rasrouting-signin-body .rasrouting-signin-main {
  flex: 1 0 auto;
  justify-content: flex-start;
  width: 100%;
  max-width: 32rem;
  margin-inline: auto;
  padding: clamp(28px, 6vw, 64px) 20px clamp(32px, 6vw, 56px);
  gap: 14px;
  font-family: var(--skin-font-body, var(--pro-body));
}
body.rasrouting-signin-body .rasrouting-signin-main:focus { outline: 0; }

body.rasrouting-signin-body .rasrouting-signin-main h1 {
  margin: 0 0 6px;
  font-family: var(--skin-font-head, var(--pro-display));
  font-weight: 800;
  font-size: clamp(1.75rem, 1.35rem + 1.7vw, 2.25rem);
  letter-spacing: -0.03em;
  line-height: 1.12;
  text-wrap: balance;
  color: var(--rasrouting-theme-ink-strong);
}

/* The card: the website's card (its radius, border and offset shadow). */
body.rasrouting-signin-body .rasrouting-signin-main form,
body.rasrouting-signin-body .rasrouting-signin-main dialog,
body.rasrouting-signin-body .signup-card {
  gap: 18px;
  padding: 24px;
  border: var(--skin-card-border, 1px solid var(--rasrouting-theme-line));
  border-radius: var(--skin-card-radius, 12px);
  background: var(--rasrouting-theme-surface);
  box-shadow: var(--skin-card-shadow, var(--rasrouting-theme-shadow-sm));
}
@media (max-width: 420px) {
  body.rasrouting-signin-body .rasrouting-signin-main form,
  body.rasrouting-signin-body .rasrouting-signin-main dialog,
  body.rasrouting-signin-body .signup-card { padding: 18px; }
}
/* A confirm dialog (Remove Authenticator app) is the same card, form-wide, over the page. */
body.rasrouting-signin-body .rasrouting-signin-main dialog {
  width: min(calc(100% - 32px), 480px);
  color: var(--rasrouting-theme-ink-strong);
}

/* A field is a label, a box and its hint, close together. */
body.rasrouting-signin-body .rasrouting-signin-main .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
body.rasrouting-signin-body .rasrouting-signin-main label {
  font-family: var(--skin-font-ui, inherit);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--rasrouting-theme-ink-strong);
}
body.rasrouting-signin-body .rasrouting-signin-main :is(input, select, textarea) {
  font-family: inherit;
  font-size: 1rem;
  border-radius: var(--skin-radius-sm, 8px);
  border-color: var(--rasrouting-theme-line-strong);
}
body.rasrouting-signin-body .rasrouting-signin-main :is(input, select, textarea):focus { outline: 0; }
body.rasrouting-signin-body .rasrouting-signin-main :is(input, select, textarea):focus-visible {
  outline: 3px solid var(--skin-focus, var(--rasrouting-theme-ink-strong));
  outline-offset: 2px;
  box-shadow: none;
}
body.rasrouting-signin-body .rasrouting-signin-main .field-hint { margin: 0; color: var(--rasrouting-theme-ink-soft); }

/* Buttons: the website's button (44px target, its weight and radius). */
body.rasrouting-signin-body .rasrouting-signin-main button {
  font-family: var(--skin-font-ui, inherit);
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--skin-radius-chip, 8px);
  min-height: 48px;
  padding: 0 20px;
  width: 100%;
}

/* "Show password" / "Show code": one inline toggle inside the box, the same on every screen. */
body.rasrouting-signin-body .rasrouting-signin-password-row {
  position: relative;
  display: block;
  width: 100%;
}
body.rasrouting-signin-body .rasrouting-signin-password-row input { padding-inline-end: 7.5rem; }
body.rasrouting-signin-body .rasrouting-signin-main .rasrouting-signin-password-toggle {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 0 var(--skin-radius-sm, 8px) var(--skin-radius-sm, 8px) 0;
  background: transparent;
  color: var(--accent);
  font-size: 0.8125rem;
  white-space: nowrap;
}
body.rasrouting-signin-body .rasrouting-signin-main .rasrouting-signin-password-toggle:hover { background: var(--brand-soft); color: var(--accent); }
body.rasrouting-signin-body .rasrouting-signin-main .rasrouting-signin-password-toggle:focus-visible { outline-offset: -3px; }

/* The checkbox row is a real 44px+ target and says what it opens. */
body.rasrouting-signin-body .rasrouting-signin-main label:has(> input[type='checkbox']) {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  padding: 6px 0;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--rasrouting-theme-ink-strong);
  cursor: pointer;
}
body.rasrouting-signin-body .rasrouting-signin-main input[type='checkbox'] {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  accent-color: var(--brand);
}
/* A link inside the consent sentence is a run of text: its focus ring hugs the words and stays inside its line, so it never
   covers the line above or below. The tick-box row around it is the 44px target. */
body.rasrouting-signin-body .rasrouting-signin-main label a { font-weight: 700; }
body.rasrouting-signin-body .rasrouting-signin-main label a:focus-visible {
  outline-width: 2px;
  outline-offset: 1px;
  border-radius: 2px;
}

/* Messages. An empty alert is not there at all (not drawn, not in the accessibility tree, so nothing reads out an empty
   alert); the moment it holds a sentence it appears, and an alert that appears is read out. A filled one is a plain error box. */
body.rasrouting-signin-body .rasrouting-signin-main [role='alert']:empty { display: none; }
body.rasrouting-signin-body .rasrouting-signin-main form [role='alert']:not(:empty):not(.field-error) {
  padding: 12px 14px;
  border: 1px solid var(--err-line);
  border-inline-start: 4px solid var(--err-ink);
  border-radius: var(--skin-radius-sm, 8px);
  background: var(--rasrouting-theme-surface);
  color: var(--err-ink);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.45;
}
/* A sentence already shown beside its field is not repeated in a second box, on screen or to a screen reader (clipped, it
   was still read a second time). */
body.rasrouting-signin-body .rasrouting-signin-main form:has(.field-error:not(:empty)) > [role='alert'][data-said-beside]:not(:empty):not(.field-error) { display: none; }
body.rasrouting-signin-body .rasrouting-signin-main .field-error:not(:empty) { font-size: 0.875rem; }

/* The links around the card. */
body.rasrouting-signin-body .rasrouting-signin-main form > a {
  align-self: flex-start;
  margin-block: -8px -4px;
  font-size: 0.875rem;
  font-weight: 600;
}
body.rasrouting-signin-body .rasrouting-auth-alt,
body.rasrouting-signin-body .rasrouting-auth-note,
body.rasrouting-signin-body .rasrouting-auth-operator {
  margin: 0;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--rasrouting-theme-ink-soft);
}
body.rasrouting-signin-body .rasrouting-auth-note { font-size: 0.875rem; line-height: 1.55; }
body.rasrouting-signin-body .rasrouting-auth-alt a,
body.rasrouting-signin-body .rasrouting-auth-operator a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 4px;
  font-weight: 700;
}
body.rasrouting-signin-body .rasrouting-auth-operator { font-size: 0.8125rem; }
body.rasrouting-signin-body .rasrouting-auth-operator a { font-weight: 500; }

/* Resend: one small line under the code card. */
body.rasrouting-signin-body .rasrouting-signin-main .rasrouting-auth-resend {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 4px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  font-size: 0.9375rem;
  color: var(--rasrouting-theme-ink-soft);
}
body.rasrouting-signin-body .rasrouting-signin-main button[data-variant='link'] {
  width: auto;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 0.9375rem;
  text-decoration: underline;
}
body.rasrouting-signin-body .rasrouting-signin-main button[data-variant='link']:hover { background: none; text-decoration-thickness: 2px; }
body.rasrouting-signin-body .rasrouting-signin-main button[data-variant='link']:disabled {
  background: none;
  border: 0;
  color: var(--rasrouting-theme-ink-soft);
  text-decoration: none;
  cursor: default;
}
body.rasrouting-signin-body .rasrouting-auth-resend [role='alert'] { flex-basis: 100%; }

/* The footer: ONE row of legal links, then the powered-by line, centred. The apex footer (data-shell-footer: the 404 wears it) is the
   shared one, left-aligned like every other apex page, so none of these rules apply to it. */
body.rasrouting-signin-body .site-shell-footer:not([data-shell-footer]) {
  margin-top: auto;
  padding: 20px 20px 28px;
  border-top: 1px solid var(--rasrouting-theme-line);
  background: transparent;
}
body.rasrouting-signin-body .site-shell-footer:not([data-shell-footer]) > .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  text-align: center;
}
body.rasrouting-signin-body .site-shell-footer:not([data-shell-footer]) .site-shell-legal {
  order: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  padding: 0;
}
body.rasrouting-signin-body .site-shell-footer:not([data-shell-footer]) .site-shell-legal a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--rasrouting-theme-ink-strong);
}
body.rasrouting-signin-body .site-shell-footer:not([data-shell-footer]) .site-shell-legal a:hover { text-decoration: underline; }
/* No separator characters between the links: a dot between items shows at the start of a wrapped line on a phone. The links
   are separated by their own padding, as in the shared footer on every other page. */
body.rasrouting-signin-body .site-shell-footer:not([data-shell-footer]) .footer-powered {
  order: 2;
  margin: 0;
  padding: 0;
  border-top: 0;
  justify-content: center;
}

/* The mark: the approved tile, unframed, at a size where its artwork reads. */
body.rasrouting-signin-body .footer-powered [data-rasrouting-platform-mark='small'] {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-size: 100% 100%;
  box-shadow: none;
}
body.rasrouting-signin-body .footer-powered .rasrouting-powered-by,
body.rasrouting-signin-body .footer-powered .footer-powered-mark { font-size: 0.8125rem; }

/* Loose paragraphs in the column: the column's own gap spaces them (no second margin on top of it). */
body.rasrouting-signin-body .rasrouting-signin-main > p { margin: 0; }
