/*
 * Public design system — "Status Board". Spec: DESIGN.md (repo root).
 *
 * Shared by every page that extends templates/base_public.html. Page-only
 * styles live in their own file (e.g. landing.css). Brand colours are the
 * --sa-* tokens from tokens.css; --pub-* adds only what the public design
 * needs (sources and measured contrast in DESIGN.md §4), declared once in
 * tokens.css so the app register shares them.
 */

.pub {
  margin: 0;
  background: var(--pub-ink);
  color: #fff;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Resets sit inside :where() (zero specificity) so every component class wins. */
:where(.pub) *, :where(.pub) *::before, :where(.pub) *::after { box-sizing: border-box; }
:where(.pub) :where(h1, h2, h3, h4, p, ol, ul, dl, dd, figure) { margin: 0; padding: 0; }
:where(.pub) a { color: inherit; text-decoration: none; }
.pub :focus-visible { outline: 2px solid var(--pub-sky); outline-offset: 3px; border-radius: 6px; }
.pub-paper :focus-visible { outline-color: var(--sa-blue-600); }

.pub-wrap { max-width: 1380px; margin: 0 auto; padding: 0 var(--pub-gut); }
.pub-narrow { max-width: 760px; }
.pub-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pub-skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 8px; background: #fff; color: var(--pub-deep); transition: top .2s; }
.pub-skip:focus { top: 12px; }

.pub-logo { display: block; height: 22px; width: auto; }
.pub-brand { display: block; padding: 11px 0; }
.pub-logo .lg-navy, .pub-logo .lg-blue { fill: #fff; }
.pub-paper .pub-logo .lg-navy { fill: var(--sa-navy-800); }
.pub-paper .pub-logo .lg-blue { fill: var(--sa-blue-600); }

/* ---- header ---------------------------------------------------------- */
.pub-top { position: relative; z-index: 5; }
.pub-top__inner { display: flex; align-items: center; gap: 32px; height: 84px; }
.pub-nav { display: flex; align-items: center; gap: 28px; margin-left: auto; font-size: 15px; }
.pub-nav__claimant { display: flex; align-items: center; gap: 28px; color: var(--pub-soft); }
.pub-nav__link, .pub-nav__cta { white-space: nowrap; }
.pub-nav__link:hover { color: #fff; }
.pub-nav__cta { padding: 10px 18px; border-radius: 999px; background: var(--sa-blue-600); color: #fff; font-weight: 500; transition: background .25s; }
.pub-nav__cta:hover { background: var(--sa-blue-700); }
/* Staff and brokers: present, findable, deliberately quiet. Claimants come first. */
.pub-team { display: flex; align-items: center; gap: 16px; padding-left: 22px; border-left: 1px solid var(--pub-line); font-size: 13px; color: var(--pub-muted); }
.pub-team a { padding: 6px 0; transition: color .2s; }
.pub-team a:hover { color: var(--pub-soft); text-decoration: underline; text-underline-offset: 3px; }

/* ---- type -------------------------------------------------------------- */
.pub-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--pub-sky); }
.pub-eyebrow__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pub-mint); box-shadow: 0 0 0 4px rgba(123, 203, 144, .15); }
.pub-lede { max-width: 40ch; margin-top: 24px; font-weight: 300; font-size: clamp(17px, 1.4vw, 20px); color: var(--pub-soft); }
.pub-lede:empty { display: none; }

/* ---- ink atmosphere: dot field + brand glow (hero bands, sign-in pages) --- */
.pub-dots {
  position: absolute; inset: -10% -10% 0 -10%; z-index: -2; pointer-events: none;
  background-image: radial-gradient(circle, rgba(127, 192, 238, .28) 1.4px, transparent 1.7px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 72% 40%, #000 0, transparent 70%);
          mask-image: radial-gradient(ellipse 60% 70% at 72% 40%, #000 0, transparent 70%);
}
.pub-aura {
  position: absolute; right: -12%; top: -30%; z-index: -1; width: 70vw; max-width: 1100px; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--sa-blue-600-rgb), .38) 0, rgba(var(--sa-navy-800-rgb), .18) 38%, transparent 66%);
}

/* ---- sign-in layout: title left, panel right (all ink) ------------------- */
.pub-auth { position: relative; isolation: isolate; overflow: hidden; padding: clamp(32px, 5vw, 88px) 0 clamp(64px, 8vw, 128px); }
.pub-auth__grid { display: grid; grid-template-columns: 6fr 5fr; gap: clamp(32px, 6vw, 112px); align-items: start; }
.pub-auth__intro { padding-top: clamp(8px, 2vw, 32px); }
.pub-title { margin-top: 22px; font-weight: 300; font-size: clamp(44px, 6vw, 96px); line-height: .92; letter-spacing: -.05em; }
.pub-title__accent { color: var(--pub-sky); }
.pub-panel {
  display: grid; gap: 10px; padding: clamp(14px, 1.6vw, 20px);
  background: rgba(17, 27, 43, .72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid #22324a; border-radius: 22px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
}
.pub-panel__foot { margin-top: 18px; font-size: 15px; color: var(--pub-soft); }
.pub-textlink { color: #fff; text-decoration: underline; text-decoration-color: #33415a; text-underline-offset: 3px; transition: text-decoration-color .2s; }
.pub-textlink:hover { text-decoration-color: currentColor; }

/* step indicator for multi-page flows (track → channel → code) */
.pub-flow { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px; list-style: none; font-size: 13px; color: var(--pub-muted); }
.pub-flow li { display: inline-flex; align-items: center; gap: 10px; }
.pub-flow__n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid #2a3a52; font-size: 12px; font-feature-settings: "tnum" 1; }
.pub-flow li.is-done { color: var(--pub-soft); }
.pub-flow li.is-done .pub-flow__n { background: var(--sa-blue-600); border-color: var(--sa-blue-600); color: #fff; }
.pub-flow li[aria-current="step"] { color: #fff; }
.pub-flow li[aria-current="step"] .pub-flow__n { border-color: var(--pub-mint); color: var(--pub-mint); box-shadow: 0 0 0 4px rgba(123, 203, 144, .15); }

/* ---- fields on ink -------------------------------------------------------- */
.pub-field { display: block; min-width: 0; padding: 12px 16px 10px; border-radius: 12px; background: var(--pub-ink-2); border: 1px solid transparent; transition: border-color .25s, background .25s; cursor: text; }
.pub-field:focus-within { border-color: var(--sa-blue-600); background: #0d1828; }
.pub-field__label { display: block; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--pub-muted); }
.pub-field input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]):not([type="file"]), .pub-field select, .pub-field textarea {
  display: block; width: 100%; margin: 4px 0 0; padding: 0; border: 0; outline: 0; background: transparent;
  min-height: 32px; font: inherit; font-size: 18px; color: #fff; letter-spacing: 0;
}
.pub-field input::placeholder, .pub-field textarea::placeholder { color: #55657c; }
/* The field draws the focus ring; without this the global ring (0,2,0) outranks
   `.pub-field select/textarea` and paints a second ring inside it. */
.pub-field :is(select, textarea):focus-visible { outline: 0; }
.pub-field .iti { display: block; width: 100%; margin-top: 4px; }
.pub-field .iti input { margin-top: 0 !important; }
.pub-field .iti__selected-country { background: transparent; }
.pub-field .iti__selected-country-primary { padding-left: 0; }
.pub-field .iti__selected-dial-code { color: var(--pub-soft); font-size: 18px; }
.pub-field .iti__arrow { border-top-color: var(--pub-muted); }
.pub-field .iti__arrow--up { border-bottom-color: var(--pub-muted); }
.pub-field .iti__dropdown-content { color: var(--sa-ink-900); border-radius: 12px; overflow: hidden; }
/* Server errors (a visible .pub-field__error) and client errors (.is-invalid) look the same. */
.pub-field:has(.is-invalid), .pub-field:has(> .pub-field__error:not([hidden])), .pub-field.has-error { border-color: var(--pub-error); }
.pub-field__error, .pub-field .fv-plugins-message-container, .pub-field .invalid-feedback { display: block; margin-top: 6px; font-size: 13px; color: var(--pub-error); }
.pub-field__error[hidden] { display: none; }
.pub-field__help { display: block; margin-top: 6px; font-size: 13px; color: var(--pub-muted); }
/* 6-digit codes: centred, tabular, spaced; padding-left offsets the last letter's trailing space */
.pub-field.pub-code input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]) { text-align: center; font-size: 30px; font-feature-settings: "tnum" 1; letter-spacing: .45em; padding-left: .45em; min-height: 52px; }
.pub-code input::placeholder { letter-spacing: .45em; }

/* checkbox + inline row (remember me · forgot password) */
.pub-auth__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 6px 2px; font-size: 15px; }
.pub-check { display: inline-flex; align-items: center; gap: 10px; min-height: 32px; color: var(--pub-soft); cursor: pointer; }
.pub-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--sa-blue-600); }
.pub-auth__note { margin-top: 28px; max-width: 44ch; font-size: 15px; color: var(--pub-muted); }
/* Django's password-validator help (an HTML list) under a new-password field */
.pub-rules { margin-top: 2px; padding: 12px 16px; border-radius: 12px; border: 1px dashed #22324a; font-size: 13px; color: var(--pub-muted); }
.pub-rules ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }

/* radio choice cards (e.g. verification channel) */
.pub-choices { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.pub-choice { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 14px; min-height: 64px; padding: 14px 16px; border-radius: 14px; background: var(--pub-ink-2); border: 1px solid #22324a; cursor: pointer; transition: border-color .2s, background .2s; }
.pub-choice:hover { border-color: #33507f; }
.pub-choice input { grid-row: span 2; width: 18px; height: 18px; margin: 0; accent-color: var(--sa-blue-600); }
.pub-choice:has(input:checked) { border-color: var(--sa-blue-600); background: #0d1828; }
.pub-choice:has(input:focus-visible) { outline: 2px solid var(--pub-sky); outline-offset: 3px; }
.pub-choice__title { font-weight: 500; color: #fff; }
.pub-choice__caption { font-size: 13px; color: var(--pub-muted); }
.pub-more summary { cursor: pointer; padding: 8px 2px; font-size: 14px; color: var(--pub-soft); list-style: none; }
.pub-more summary::-webkit-details-marker { display: none; }
.pub-more summary::after { content: " ↓"; color: var(--pub-muted); }
.pub-more[open] summary::after { content: " ↑"; }
.pub-more[open] > .pub-choices { margin-top: 6px; }
.pub-sheet .pub-more summary { padding: 12px 2px; font-size: 15px; font-weight: 500; color: var(--sa-blue-700); }
.pub-sheet .pub-more summary::after { color: inherit; }

/* ---- buttons -------------------------------------------------------------- */
.pub-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 0 24px; border: 1px solid transparent; border-radius: 12px; font: inherit; font-size: 16px; font-weight: 500; line-height: 1.2; cursor: pointer; transition: background .25s, border-color .25s, color .25s; }
.pub-btn svg { width: 18px; height: 18px; flex: none; transition: transform .4s var(--pub-ease); }
.pub-btn--primary { background: var(--sa-blue-600); color: #fff; }
.pub-btn--primary:hover { background: var(--sa-blue-700); }
.pub-btn--primary:hover svg { transform: translateX(3px); }
.pub-btn--ghost { background: transparent; border-color: #2a3a52; color: var(--pub-soft); }
.pub-btn--ghost:hover { border-color: var(--pub-soft); color: #fff; }
.pub-btn--block { width: 100%; }
.pub-btn:disabled { opacity: .6; cursor: progress; }
.btn-loading-spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: pub-spin .7s linear infinite; }
@keyframes pub-spin { to { transform: rotate(360deg); } }

/* ---- alerts (Django messages) ----------------------------------------------- */
.pub-alerts { display: grid; gap: 10px; margin-bottom: 14px; }
.pub-alert { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid; font-size: 15px; line-height: 1.45; }
.pub-alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.pub-alert--error { background: rgba(255, 154, 160, .08); border-color: rgba(255, 154, 160, .35); color: #ffd3d6; }
.pub-alert--success { background: rgba(123, 203, 144, .08); border-color: rgba(123, 203, 144, .35); color: #c9ecd3; }
.pub-alert--warning { background: rgba(242, 169, 0, .08); border-color: rgba(242, 169, 0, .4); color: #ffe2a3; }
.pub-alert--info { background: rgba(127, 192, 238, .08); border-color: rgba(127, 192, 238, .35); color: #cfe8fa; }
/* On paper: a white card in the pill tones (DESIGN.md §4.2). */
.pub-sheet .pub-alert { background: #fff; }
.pub-sheet .pub-alert--error { border-color: rgba(var(--sa-red-600-rgb), .35); color: #b02a31; }
.pub-sheet .pub-alert--success { border-color: rgba(46, 125, 67, .35); color: var(--sa-green-700); }
.pub-sheet .pub-alert--warning { border-color: rgba(242, 169, 0, .55); color: var(--sa-amber-700); }
.pub-sheet .pub-alert--info { border-color: rgba(var(--sa-blue-600-rgb), .3); color: #00729c; }

/* ---- console (1–3 field forms on ink) ---------------------------------- */
.pub-console {
  display: grid; grid-template-columns: 1.15fr 1.2fr auto; gap: 8px; max-width: 780px; margin-top: 40px; padding: 8px;
  background: rgba(17, 27, 43, .72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid #22324a; border-radius: 18px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
}
.pub-console__field { display: block; min-width: 0; padding: 12px 16px 10px; border-radius: 12px; background: var(--pub-ink-2); border: 1px solid transparent; transition: border-color .25s, background .25s; cursor: text; }
.pub-console__field:focus-within { border-color: var(--sa-blue-600); background: #0d1828; }
.pub-console__label { display: block; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--pub-muted); }
.pub-console input {
  display: block; width: 100%; margin: 4px 0 0; padding: 0; border: 0; outline: 0; background: transparent;
  min-height: 32px; font: inherit; font-size: 18px; color: #fff; letter-spacing: 0;
}
.pub-console input::placeholder { color: #55657c; }
.pub-console input:focus-visible { outline: 0; }
.pub-console__submit {
  display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 24px; border: 0; border-radius: 12px;
  background: var(--sa-blue-600); color: #fff; font: inherit; font-size: 16px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: background .25s;
}
.pub-console__submit:hover { background: var(--sa-blue-700); }
.pub-console__submit svg { width: 18px; height: 18px; transition: transform .4s var(--pub-ease); }
.pub-console__submit:hover svg { transform: translateX(3px); }
.pub-console__error { display: none; margin-top: 10px; font-size: 14px; color: var(--pub-error); }
.pub-console__meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; font-size: 13px; color: var(--pub-muted); }
.pub-console__meta strong { font-weight: 500; color: var(--pub-soft); }

/* intl-tel-input on ink */
.pub-console .iti { display: block; width: 100%; margin-top: 4px; }
.pub-console .iti input { margin-top: 0; }
.pub-console .iti__selected-country { background: transparent; }
.pub-console .iti__selected-country-primary { padding-left: 0; }
.pub-console .iti__selected-dial-code { color: var(--pub-soft); font-size: 18px; }
.pub-console .iti__arrow { border-top-color: var(--pub-muted); }
.pub-console .iti__arrow--up { border-bottom-color: var(--pub-muted); }
.pub-console .iti__dropdown-content { color: var(--sa-ink-900); border-radius: 12px; overflow: hidden; }
.pub-console input.is-invalid { color: #ffb3b8; }

/* ---- ink title band over paper (forms, receipts, signed-in pages) --------- */
.pub-band { position: relative; isolation: isolate; overflow: hidden; padding: clamp(32px, 4.5vw, 72px) 0 clamp(40px, 5vw, 80px); }
.pub-band .pub-lede { max-width: 52ch; }

/* ---- paper: cards, data, actions -------------------------------------------- */
.pub-sheet { padding: clamp(40px, 5vw, 72px) 0 clamp(72px, 8vw, 120px); background: var(--sa-gray-50); color: var(--sa-ink-900); }
.pub-sheet__grid { display: grid; grid-template-columns: 7fr 5fr; gap: 20px; align-items: start; }
.pub-card { padding: clamp(22px, 2.6vw, 36px); border-radius: 16px; background: #fff; box-shadow: 0 1px 0 #e6ebf1, 0 18px 40px -28px rgba(0, 25, 77, .25); }
.pub-card + .pub-card { margin-top: 20px; }
.pub-card__kicker { font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--sa-blue-700); }
.pub-card__title { margin-top: 8px; font-weight: 400; font-size: clamp(22px, 2vw, 28px); letter-spacing: -.02em; line-height: 1.15; color: var(--pub-deep); }
.pub-card__text { margin-top: 10px; color: var(--sa-ink-700); }
.pub-dl { display: grid; grid-template-columns: minmax(120px, 2fr) 3fr; margin-top: 18px; border-top: 1px solid var(--sa-gray-200); }
.pub-dl dt, .pub-dl dd { padding: 12px 0; border-bottom: 1px solid var(--sa-gray-200); }
.pub-dl dt { font-size: 14px; color: var(--sa-ink-700); }
.pub-dl dd { font-weight: 500; color: var(--sa-ink-900); overflow-wrap: anywhere; }
.pub-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.pub-paper .pub-btn--ghost, .pub-sheet .pub-btn--ghost { border-color: var(--sa-gray-200); color: var(--pub-deep); background: #fff; }
.pub-paper .pub-btn--ghost:hover, .pub-sheet .pub-btn--ghost:hover { border-color: var(--pub-deep); }
.pub-list { display: grid; gap: 12px; margin-top: 16px; list-style: none; }
.pub-list li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; }
.pub-list__n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--sa-blue-50); color: var(--sa-blue-700); font-size: 12px; font-weight: 600; }

/* fields on paper: same anatomy as ink fields, light surface */
.pub-sheet .pub-field { background: #fff; border-color: var(--sa-gray-200); }
.pub-sheet .pub-field:focus-within { background: #fff; border-color: var(--sa-blue-600); box-shadow: 0 0 0 3px rgba(var(--sa-blue-600-rgb), .12); }
.pub-sheet .pub-field__label { color: #5b6570; }
.pub-sheet .pub-field input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]), .pub-sheet .pub-field select, .pub-sheet .pub-field textarea { color: var(--sa-ink-900); }
.pub-sheet .pub-field input::placeholder, .pub-sheet .pub-field textarea::placeholder { color: #8a929c; }
.pub-sheet .pub-field:has(.is-invalid), .pub-sheet .pub-field:has(> .pub-field__error:not([hidden])), .pub-sheet .pub-field.has-error { border-color: var(--sa-red-600); }
.pub-sheet .pub-field__error, .pub-sheet .pub-field .fv-plugins-message-container, .pub-sheet .pub-field .invalid-feedback { color: var(--sa-red-600); }
.pub-sheet .pub-field__help { color: #5b6570; }
.pub-sheet .pub-field .iti__selected-dial-code { color: var(--sa-ink-900); }
.pub-sheet .pub-field .iti__arrow { border-top-color: #5b6570; }
.pub-field select { appearance: none; -webkit-appearance: none; padding-right: 28px; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6570' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 2px center / 18px no-repeat; }
.pub-field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.pub-field__optional { text-transform: none; letter-spacing: 0; font-weight: 400; }
.pub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pub-grid__full { grid-column: 1 / -1; }
.pub-sheet .pub-panel__foot { color: var(--sa-ink-700); }
.pub-sheet .pub-textlink { color: var(--pub-deep); text-decoration-color: var(--sa-gray-300); }
.pub-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.flatpickr-calendar { font-family: inherit; }
/* Date picker (paper). The vendored theme takes every colour from Bootstrap
   variables, which public pages do not load; define them here from the
   brand tokens. Contrast in DESIGN.md §4.2. */
.pub .flatpickr-calendar {
  --bs-paper-bg: #fff;
  --bs-box-shadow: 0 0 0 1px var(--sa-gray-200), 0 24px 48px -20px rgba(0, 25, 77, .35);
  --bs-border-color: var(--sa-gray-200);
  --bs-body-color: var(--sa-ink-900);
  --bs-heading-color: var(--pub-deep);
  --bs-secondary-color: #5b6570;      /* other-month days: selectable, 5.93:1 */
  --bs-gray-75: var(--sa-gray-50);    /* month arrows */
  --bs-gray-50: var(--sa-gray-100);   /* day hover */
  --bs-primary: var(--sa-blue-600);
  --bs-primary-rgb: var(--sa-blue-600-rgb);
  --bs-primary-contrast: #fff;
  --bs-primary-bg-subtle: var(--sa-blue-50);
  padding: 8px; border-radius: 16px; font-size: 15px;
}
/* flatpickr sizes an upward calendar from its children's heights, which leave
   out this 8px + 8px padding, so it would overlap the field by 14px. */
.pub .flatpickr-calendar.arrowBottom { margin-top: -16px; }
/* The vendor theme paints today in blue-600 on blue-50 (4.32:1); blue-700 reaches 5.99. */
.pub .flatpickr-calendar .flatpickr-days .flatpickr-day.today:not(.selected) { color: var(--sa-blue-700); }
/* Days outside the allowed window cannot be picked: faint (disabled text is exempt from contrast). */
.pub .flatpickr-calendar .flatpickr-days .flatpickr-day.flatpickr-disabled { color: var(--sa-gray-300); }
/* wizard stepper */
.pub-stepper { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 28px; list-style: none; }
.pub-stepper__step { position: relative; display: flex; align-items: center; gap: 12px; padding: 0 0 14px; border-bottom: 2px solid var(--sa-gray-200); color: #5b6570; transition: border-color .4s var(--pub-ease), color .3s; }
.pub-stepper__n { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--sa-gray-200); background: #fff; font-size: 14px; font-weight: 600; color: #5b6570; }
.pub-stepper__title { display: block; font-weight: 600; color: inherit; }
.pub-stepper__sub { display: block; font-size: 13px; }
.pub-stepper__step.is-done { border-bottom-color: var(--sa-blue-600); color: var(--sa-ink-700); }
.pub-stepper__step.is-done .pub-stepper__n { background: var(--sa-blue-600); border-color: var(--sa-blue-600); color: #fff; }
.pub-stepper__step[aria-current="step"] { border-bottom-color: var(--pub-deep); color: var(--pub-deep); }
.pub-stepper__step[aria-current="step"] .pub-stepper__n { background: var(--pub-deep); border-color: var(--pub-deep); color: #fff; }
.pub-step__heading { font-weight: 400; font-size: clamp(22px, 2vw, 28px); letter-spacing: -.02em; color: var(--pub-deep); margin-bottom: 18px; }
.pub-step__heading:focus { outline: none; }
.pub-step__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.pub-step__nav--end { justify-content: flex-end; }

/* tracking number "ticket" */
.pub-ticket { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 14px; }
.pub-ticket--flush { margin-top: 0; }
.pub-ticket__number { font-weight: 300; font-size: clamp(30px, 3.6vw, 48px); letter-spacing: -.01em; line-height: 1; color: var(--pub-deep); overflow-wrap: anywhere; }
.pub-copy { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--sa-gray-200); background: #fff; color: var(--pub-deep); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; transition: border-color .2s; }
.pub-copy:hover { border-color: var(--pub-deep); }
.pub-copy svg { width: 16px; height: 16px; }
.pub-copy__done { font-size: 14px; color: var(--sa-green-700); }

/* claimant progress track: the six real stages (static, truthful) */
.pub-track { display: grid; grid-template-columns: repeat(6, 1fr); margin-top: 22px; list-style: none; counter-reset: stage; }
.pub-track li { position: relative; padding-top: 22px; font-size: 13px; color: var(--sa-ink-700); }
.pub-track li::before { content: ""; position: absolute; top: 5px; left: 0; right: 0; height: 2px; background: var(--sa-gray-200); }
.pub-track li::after { content: ""; position: absolute; top: 0; left: 0; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--sa-gray-300); }
/* The line after a stage is blue only once that stage is finished. */
.pub-track li.is-done::before { background: var(--sa-blue-600); }
.pub-track li.is-done::after { background: var(--sa-blue-600); box-shadow: none; }
.pub-track li[aria-current="step"] { color: var(--pub-deep); font-weight: 600; }
.pub-track li[aria-current="step"]::after { box-shadow: inset 0 0 0 3px var(--sa-blue-600), 0 0 0 4px rgba(var(--sa-blue-600-rgb), .15); }
.pub-track li.is-rejected { color: var(--sa-red-600); font-weight: 600; }
.pub-track li.is-rejected::after { background: var(--sa-red-600); box-shadow: none; }
.pub-track__label { display: block; padding-right: 8px; }

/* ---- signed-in claimant portal ---------------------------------------------- */
/* tabs under the band title; scroll sideways on narrow screens, never wrap */
.pub-tabs { display: flex; gap: 6px; margin-top: 28px; overflow-x: auto; scrollbar-width: none; }
.pub-tabs::-webkit-scrollbar { display: none; }
.pub-tab { display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid #22324a; color: var(--pub-soft); font-size: 15px; transition: border-color .2s, color .2s, background .2s; }
.pub-tab:hover { border-color: #33507f; color: #fff; }
.pub-tab[aria-current="page"] { background: #fff; border-color: #fff; color: var(--pub-deep); font-weight: 500; }
.pub-tab__badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; font-size: 12px; font-weight: 600; font-feature-settings: "tnum" 1; }
.pub-tab__badge--alert { background: var(--sa-red-600); color: #fff; }
.pub-tab__badge--warning { background: var(--sa-amber-500); color: var(--pub-ink); }
.pub-tab__badge--info { background: var(--pub-sky); color: var(--pub-ink); }
.pub-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; font-size: 15px; color: var(--pub-deep); text-decoration: underline; text-decoration-color: var(--sa-gray-300); text-underline-offset: 3px; }

/* status pills — tone from claims.constants.STATUS_COLORS; contrast in DESIGN.md §4.2 */
.pub-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.pub-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pub-pill--info { color: #00729c; background: rgba(13, 159, 212, .14); }
.pub-pill--primary { color: var(--sa-blue-700); background: rgba(var(--sa-blue-600-rgb), .14); }
.pub-pill--warning { color: var(--sa-amber-700); background: rgba(242, 169, 0, .14); }
.pub-pill--success { color: var(--sa-green-700); background: rgba(123, 203, 144, .14); }
.pub-pill--danger { color: #b02a31; background: rgba(var(--sa-red-600-rgb), .14); }
.pub-pill--secondary { color: var(--sa-ink-700); background: rgba(138, 146, 156, .14); }
.pub-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pub-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--sa-gray-50); border: 1px solid var(--sa-gray-200); font-size: 13px; color: var(--sa-ink-900); }
.pub-chip--current { background: var(--pub-deep); border-color: var(--pub-deep); color: #fff; }
.pub-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 14px; font-size: 14px; color: var(--sa-ink-700); }
.pub-figure { font-weight: 300; font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -.02em; color: var(--pub-deep); font-feature-settings: "tnum" 1; }
.pub-card--alert { box-shadow: inset 4px 0 0 var(--sa-red-600), 0 1px 0 #e6ebf1, 0 18px 40px -28px rgba(0, 25, 77, .25); }
.pub-card--alert .pub-card__kicker { color: #b02a31; }
.pub-sheet__main > * + *, .pub-sheet__side > * + * { margin-top: 20px; }

/* rows (documents, checklist, notifications) */
.pub-rows { list-style: none; margin-top: 14px; }
.pub-rows li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 14px 0; border-top: 1px solid var(--sa-gray-200); }
.pub-rows li:first-child { border-top: 0; }
.pub-rows__title { font-weight: 500; color: var(--sa-ink-900); overflow-wrap: anywhere; }
.pub-rows__sub { display: block; font-size: 13px; color: var(--sa-ink-700); }
.pub-rows__note { flex-basis: 100%; font-size: 14px; color: #b02a31; }

/* progress bar (documents uploaded) */
.pub-progress { height: 8px; margin-top: 14px; border-radius: 999px; background: var(--sa-gray-100); overflow: hidden; }
.pub-progress__bar { height: 100%; border-radius: inherit; background: var(--sa-blue-600); }

/* timeline (status history) */
.pub-timeline { list-style: none; margin-top: 16px; }
.pub-timeline li { position: relative; padding: 0 0 18px 26px; }
.pub-timeline li::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: -2px; width: 2px; background: var(--sa-gray-200); }
.pub-timeline li:last-child::before { display: none; }
.pub-timeline li::after { content: ""; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 3px var(--sa-blue-600); }
.pub-timeline__title { font-weight: 500; color: var(--sa-ink-900); }
.pub-timeline__time { display: block; font-size: 13px; color: #5b6570; font-feature-settings: "tnum" 1; }
.pub-timeline__note { margin-top: 4px; font-size: 14px; color: var(--sa-ink-700); }

/* chat */
.pub-chat { max-height: 520px; overflow-y: auto; padding: 4px 2px 8px; }
.pub-chat__list { list-style: none; display: grid; gap: 14px; }
.pub-chat__msg { max-width: 78%; }
.pub-chat__msg--mine { justify-self: end; text-align: right; }
.pub-chat__bubble { display: inline-block; padding: 12px 16px; border-radius: 18px 18px 18px 6px; background: var(--sa-blue-50); color: var(--sa-ink-900); text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; }
.pub-chat__msg--mine .pub-chat__bubble { border-radius: 18px 18px 6px 18px; background: var(--sa-blue-600); color: #fff; }
.pub-chat__meta { display: block; margin-top: 4px; font-size: 12px; color: #5b6570; font-feature-settings: "tnum" 1; }
.pub-chat__system { justify-self: center; padding: 6px 14px; border-radius: 999px; background: var(--sa-gray-100); font-size: 12px; color: var(--sa-ink-700); }
.pub-composer { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--sa-gray-200); }

/* upload drop zone (static/js/upload-zone.js toggles .dragover) */
.pub-drop { position: relative; display: grid; justify-items: center; gap: 6px; padding: 26px 18px; border: 1.5px dashed #9db3cc; border-radius: 14px; background: var(--sa-gray-50); text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.pub-drop:hover, .pub-drop.dragover { border-color: var(--sa-blue-600); background: var(--sa-blue-50); }
.pub-drop:focus-within { outline: 2px solid var(--sa-blue-600); outline-offset: 3px; }
.pub-drop svg { width: 28px; height: 28px; color: var(--sa-blue-700); }
.pub-drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pub-drop__title { font-weight: 500; color: var(--pub-deep); }
.pub-drop__hint { font-size: 13px; color: #5b6570; overflow-wrap: anywhere; }

.pub-form { display: grid; gap: 12px; margin-top: 16px; }
.pub-field.pub-field--bare { padding: 0; border: 0; background: transparent; cursor: default; }

/* empty states */
.pub-empty { padding: 28px 8px; text-align: center; color: var(--sa-ink-700); }

/* ---- paper sections ------------------------------------------------------ */
.pub-paper { padding: clamp(72px, 9vw, 140px) 0; background: var(--sa-gray-50); color: var(--sa-ink-900); }
.pub-sh { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 56px; }
.pub-sh__title { font-weight: 300; font-size: clamp(38px, 4.8vw, 76px); line-height: .95; letter-spacing: -.045em; color: var(--pub-deep); }
.pub-sh__title em { font-style: normal; color: var(--sa-blue-600); }
.pub-sh__lede { max-width: 38ch; font-weight: 300; font-size: 18px; }

/* ---- footer ------------------------------------------------------------ */
.pub-foot { border-top: 1px solid var(--pub-line); font-size: 13px; color: var(--pub-muted); }
.pub-staffline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-top: 22px; padding-bottom: 22px;
  /* hairline that matches the text column, not the padded box */
  background: linear-gradient(var(--pub-line), var(--pub-line)) center bottom / calc(100% - 2 * var(--pub-gut)) 1px no-repeat;
}
.pub-staffline a { color: var(--pub-soft); text-decoration: underline; text-decoration-color: #33415a; text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.pub-staffline a:hover { color: #fff; text-decoration-color: currentColor; }
.pub-foot__inner { display: flex; align-items: center; gap: 24px; min-height: 88px; }
.pub-foot__hours { margin-left: auto; }

/* ---- responsive -------------------------------------------------------- */
@media (max-width: 1080px) {
  .pub-nav__link:not(.pub-nav__link--keep) { display: none; }
  .pub-auth__grid { grid-template-columns: 1fr; }
  .pub-sheet__grid { grid-template-columns: 1fr; }
  .pub-chat__msg { max-width: 92%; }
  .pub-auth__intro { padding-top: 0; }
  .pub-sh { flex-direction: column; align-items: start; }
}
@media (max-width: 640px) {
  .pub { font-size: 16px; }
  .pub-top__inner { height: 68px; gap: 12px; }
  .pub-team { display: none; }
  .pub-nav, .pub-nav__claimant { gap: 16px; }
  .pub-nav__cta--wide-only { display: none; }
  .pub-nav__link--keep { padding: 12px 0; }
  .pub-nav__cta { padding: 9px 16px; font-size: 14px; }
  /* All four portal tabs stay visible: two rows rather than a hidden scroll. */
  .pub-tabs { flex-wrap: wrap; overflow: visible; }
  .pub-tab { flex: 1 1 calc(50% - 3px); justify-content: center; }
  .pub-composer { grid-template-columns: 1fr; }
  .pub-console { grid-template-columns: 1fr; }
  .pub-console__submit { padding: 16px; }
  .pub-foot__inner { flex-wrap: wrap; gap: 8px; padding-top: 24px; padding-bottom: 24px; }
  .pub-foot__hours { margin-left: 0; }
  .pub-track { grid-template-columns: 1fr; gap: 0; }
  .pub-track li { padding: 0 0 14px 26px; }
  .pub-track li::before { top: 12px; bottom: -2px; left: 5px; right: auto; width: 2px; height: auto; }
  .pub-track li:last-child::before { display: none; }
  .pub-dl { grid-template-columns: 1fr; }
  .pub-dl dt { padding-bottom: 0; border-bottom: 0; }
  .pub-grid { grid-template-columns: 1fr; }
  .pub-stepper__sub { display: none; }
  .pub-stepper__step { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 14px; }
  .pub-step__nav .pub-btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .pub *, .pub *::before, .pub *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
