/* Fileustaxes portal shell. Light theme, 16px base, AA contrast.
   No inline styles are used anywhere (CSP style-src 'self'). */

:root {
  --bg: #ffffff;
  --surface: #f5f7fa;
  --text: #1d2330;
  --muted: #545b6b;
  --primary: #1f5fbf;
  --primary-hover: #194f9f;
  --primary-text: #ffffff;
  --border: #cfd5df;
  --focus: #1f5fbf;
  --banner-bg: #fff1b8;
  --banner-text: #3b2a00;
  --ok: #1d6b3d;
  --ok-bg: #e3f4ea;
  --warn: #6b4500;
  --warn-bg: #fff1d6;
  --error: #a42218;
  --error-bg: #fde8e6;
  --info: #174e8c;
  --info-bg: #e4eefb;
  --draft: #6b4500;
  --radius: 8px;
  --touch: 44px;
  --space: 1rem;
  --max: 70rem;         /* 1120 px content column */
  /* Brand colours matching fileustaxes.com */
  --hdr-bg: #0d2240;
  --hdr-text: #ffffff;
  --gold: #d4921d;
  --gold-hover: #b8781a;
  --hdr-h: 4rem;        /* 64 px */
}

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

[hidden] { display: none !important; }

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2 { line-height: 1.25; }
h1 { font-size: 1.75rem; margin: 0 0 1rem; }
h2 { font-size: 1.3rem; margin: 1.5rem 0 0.5rem; }
p { margin: 0 0 0.75rem; }
a { color: var(--primary); text-underline-offset: 0.2em; }
a:hover { color: var(--primary-hover); }
h1[tabindex="-1"]:focus { outline: none; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
}
.skip-link:focus { top: 0.5rem; }

.muted { color: var(--muted); }
.lead { font-size: 1.1rem; }
.help { color: var(--muted); font-size: 0.95rem; margin: 0.25rem 0 0; }
.draft { color: var(--draft); font-weight: 600; }

/* Banner and status */
.banner {
  background: var(--banner-bg);
  color: var(--banner-text);
  font-weight: 700;
  text-align: center;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
}

.status-strip {
  background: var(--warn-bg);
  color: var(--warn);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

/* ---- Header and nav ---- */

/* == Shared header base (app + public pages) == */
.site-header {
  background: var(--hdr-bg);
  color: var(--hdr-text);
  min-height: var(--hdr-h);
  position: relative;
  border-bottom: none;
}
/* inner constraint matches the content column */
.hdr-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--hdr-h);
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Wordmark / brand */
.wordmark {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--hdr-text);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.wordmark:hover { color: var(--hdr-text); opacity: 0.9; }
/* Non-link current-page wordmark (span, no hover) */
span.wordmark { cursor: default; }
span.wordmark[aria-current="page"] { opacity: 0.8; }

/* Centre nav (desktop only) */
.hdr-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}
.hdr-nav a {
  color: var(--hdr-text);
  text-decoration: none;
  padding: 0 0.75rem;
  min-height: var(--touch);
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
  font-size: 0.95rem;
  white-space: nowrap;
}
.hdr-nav a:hover { background: rgba(255,255,255,0.12); }
.hdr-nav a[aria-current="page"] { background: rgba(255,255,255,0.18); font-weight: 600; }
/* Non-link current-page nav item (span replaces <a> when target==current page) */
.hdr-nav span[aria-current="page"] {
  color: var(--hdr-text);
  padding: 0 0.75rem;
  min-height: var(--touch);
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
  font-size: 0.95rem;
  white-space: nowrap;
  background: rgba(255,255,255,0.18);
  font-weight: 600;
  cursor: default;
}
.hdr-drawer span[aria-current="page"] {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--hdr-text);
  font-weight: 600;
  opacity: 0.85;
  cursor: default;
}

/* Right: lang toggle, sign-in, CTA */
.hdr-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  flex-shrink: 0;
}
.hdr-lang {
  color: var(--hdr-text);
  text-decoration: none;
  font-size: 0.9rem;
  min-height: var(--touch);
  display: inline-flex;
  align-items: center;
  padding: 0 0.5rem;
  border-radius: var(--radius);
  white-space: nowrap;
}
.hdr-lang:hover { background: rgba(255,255,255,0.12); }
.hdr-signin {
  color: var(--hdr-text);
  text-decoration: none;
  font-size: 0.95rem;
  min-height: var(--touch);
  display: inline-flex;
  align-items: center;
  padding: 0 0.75rem;
  border-radius: var(--radius);
  white-space: nowrap;
}
.hdr-signin:hover { background: rgba(255,255,255,0.12); }

/* Gold CTA button in the header */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  padding: 0 1.1rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: #ffffff;
  background: var(--gold);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn-cta:hover { background: var(--gold-hover); color: #ffffff; }

/* Hamburger button (mobile only by default) - uses <details>/<summary> for CSS-only toggle */
.hdr-menu {
  display: none;
  position: relative;
  flex-shrink: 0;
}
.hdr-menu summary { list-style: none; cursor: pointer; }
.hdr-menu summary::-webkit-details-marker { display: none; }
.hdr-burger {
  display: inline-flex;
  background: transparent;
  border: 2px solid rgba(255,255,255,0.4);
  color: var(--hdr-text);
  border-radius: var(--radius);
  min-height: var(--touch);
  min-width: var(--touch);
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
}
.hdr-burger:hover { background: rgba(255,255,255,0.12); }

/* Mobile full-width drawer (shown when <details> is open) */
.hdr-drawer {
  display: none;
}
.hdr-menu[open] .hdr-drawer {
  display: block;
  position: absolute;
  top: calc(var(--hdr-h) - var(--touch) / 2 + var(--touch) / 2);
  right: 0;
  width: 220px;
  background: var(--hdr-bg);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  z-index: 200;
  padding: 0.5rem 0;
}
.hdr-drawer a {
  display: flex;
  align-items: center;
  min-height: 3rem; /* 48 px */
  padding: 0 1.5rem;
  color: var(--hdr-text);
  text-decoration: none;
  font-size: 1rem;
}
.hdr-drawer a:hover { background: rgba(255,255,255,0.1); }

/* == Legacy app header (index.html) compat == */
/* The app fills .site-header directly (no .hdr-inner); keep it working */
.brand { font-weight: 700; font-size: 1.1rem; color: var(--hdr-text); margin-right: auto; }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--hdr-text);
  border-color: rgba(255,255,255,0.4);
}
.menu-toggle:hover { background: rgba(255,255,255,0.12); }

.site-nav { display: none; }
.site-header.nav-open .site-nav {
  display: block;
  position: absolute;
  top: var(--hdr-h);
  left: 0;
  right: 0;
  background: var(--hdr-bg);
  border-top: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  z-index: 200;
  padding: 0.25rem 0 0.5rem;
}

/* Shared app/public nav list (inside drawer) */
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.nav-list a {
  display: flex;
  align-items: center;
  min-height: var(--touch);
  padding: 0.5rem 1.5rem;
  border-radius: 0;
  color: var(--hdr-text);
  text-decoration: none;
}
.nav-list a:hover { background: rgba(255,255,255,0.1); }
.nav-list a[aria-current="page"] { background: rgba(255,255,255,0.15); font-weight: 700; }
.nav-more details { width: 100%; }
.nav-more summary {
  display: flex;
  align-items: center;
  min-height: var(--touch);
  padding: 0.5rem 1.5rem;
  cursor: pointer;
  list-style: none;
  color: var(--hdr-text);
}
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary:hover { background: rgba(255,255,255,0.1); }
.nav-sub { list-style: none; margin: 0; padding: 0 0 0 1.5rem; display: flex; flex-direction: column; gap: 0; }
.nav-sub a {
  display: flex;
  align-items: center;
  min-height: var(--touch);
  padding: 0.5rem 1.5rem;
  color: var(--hdr-text);
  text-decoration: none;
}
.nav-sub a:hover { background: rgba(255,255,255,0.1); }
.nav-sub a[aria-current="page"] { background: rgba(255,255,255,0.15); font-weight: 700; }

/* App right-side header actions */
.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.user-label { color: rgba(255,255,255,0.75); font-size: 0.95rem; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Main content */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2rem;
}
main:focus { outline: none; }

.page-body { margin-top: 0.5rem; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
}

.steps, .link-list { padding-left: 1.25rem; }
.link-list { list-style: none; padding-left: 0; }
.link-list a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  padding: 0.25rem 0;
}

/* Buttons and inputs: large touch targets */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  min-width: var(--touch);
  padding: 0.55rem 1.1rem;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--surface); }
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-text);
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-text); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-lg { min-height: 52px; font-size: 1.1rem; padding: 0.7rem 1.5rem; }

input, select, textarea {
  font: inherit;
  min-height: var(--touch);
  width: 100%;
  max-width: 32rem;
  padding: 0.5rem 0.75rem;
  color: var(--text);
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
}

.field { margin: 0 0 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; }

/* Feedback */
.spinner-wrap { display: flex; align-items: center; gap: 0.75rem; color: var(--muted); padding: 0.5rem 0; }
.spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 3s; }
}

.error-box {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
}
.error-box p { color: var(--text); }
.error-box .muted { color: var(--muted); }
.error-box .btn { margin-top: 0.5rem; }

.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid currentColor;
}
.badge-neutral { color: var(--muted); background: var(--surface); }
.badge-info { color: var(--info); background: var(--info-bg); }
.badge-ok { color: var(--ok); background: var(--ok-bg); }
.badge-warn { color: var(--warn); background: var(--warn-bg); }
.badge-error { color: var(--error); background: var(--error-bg); }

/* Tables: scroll sideways on narrow screens instead of breaking layout */
.table-wrap { overflow-x: auto; margin: 1rem 0; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
caption { text-align: left; font-weight: 700; padding: 0.5rem 0.75rem; }
th, td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface); font-weight: 700; }
td.num, th.num { text-align: right; white-space: nowrap; }

/* Toasts */
.toasts {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  max-width: 28rem;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 20;
}
.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--bg);
  border: 2px solid var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.toast-error { border-color: var(--error); color: var(--error); }
.toast-ok { border-color: var(--ok); color: var(--ok); }
.toast-info { border-color: var(--info); }
.toast span { color: var(--text); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.site-footer p { margin: 0.2rem 0; max-width: var(--max); margin-left: auto; margin-right: auto; }
.noscript { padding: 1rem; background: var(--warn-bg); color: var(--warn); text-align: center; }

/* Wide screens: pub header centre nav + right; app nav inline */
@media (min-width: 900px) {
  .hdr-menu { display: none !important; }
  .hdr-nav { display: flex; }
  .hdr-right { display: flex; }
  .menu-toggle { display: none; }
  .site-nav { display: block; width: auto; overflow-x: auto; max-width: calc(100vw - 320px); }
  .nav-list { flex-direction: row; flex-wrap: nowrap; }
  .nav-list a { min-height: var(--touch); white-space: nowrap; }
  .site-header .site-nav { order: 2; }
}

/* Narrow screens (< 900 px): hamburger for pub pages; Sign in + CTA always visible */
@media (max-width: 899px) {
  .hdr-nav { display: none; }
  .hdr-menu { display: flex; align-items: center; }
  .hdr-right { gap: 0.5rem; }
  /* Smaller CTA text on tablet/phone */
  .btn-cta { font-size: 0.88rem; padding: 0 0.75rem; }
  .hdr-signin { font-size: 0.88rem; padding: 0 0.5rem; }
  .hdr-lang { display: none; } /* in drawer instead */
}
/* Tighter squeeze at ≤ 820 px so long ES labels never force header to wrap */
@media (max-width: 820px) {
  .btn-cta { font-size: 0.82rem; padding: 0 0.6rem; }
  .hdr-signin { font-size: 0.82rem; padding: 0 0.4rem; white-space: nowrap; }
  .wordmark { font-size: 1rem; }
}

@media (max-width: 359px) {
  h1 { font-size: 1.5rem; }
  .user-label { display: none; }
  main { padding: 1rem 1rem 2rem; }
}

/* ---- Workbench and partner pages (added by Keeper; classes come from pages-staff.js / pages-partner.js) ---- */
.wb-masked, .wb-staff-only, .wb-stub { background: #eef4ff; border: 1px solid #c7d7f5; border-radius: 8px; padding: 10px 14px; margin: 12px 0; }
.wb-stub { background: #f6f6f6; border-color: #d9d9d9; color: #444; }
.wb-board { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 24px; }
.wb-card, .wb-chip { cursor: pointer; font: inherit; border: 1px solid #c9ced6; background: #fff; border-radius: 10px; color: inherit; }
.wb-card { display: flex; flex-direction: column; align-items: flex-start; min-width: 130px; padding: 12px 16px; }
.wb-card-count { font-size: 1.8rem; font-weight: 700; line-height: 1.1; order: -1; }
.wb-card-label { color: #4a5360; font-size: 0.9rem; }
.wb-card:hover, .wb-chip:hover { border-color: #1d5bc1; }
.wb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.wb-chip { padding: 8px 14px; border-radius: 999px; }
.wb-chip[aria-pressed="true"], .wb-chip.is-active { background: #1d5bc1; color: #fff; border-color: #1d5bc1; }
.wb-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.wb-table-wrap { overflow-x: auto; }
.wb-table { border-collapse: collapse; width: 100%; }
.wb-table th, .wb-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e3e6eb; }
.wb-primary { background: #1d5bc1; color: #fff; border: 0; border-radius: 8px; padding: 10px 16px; font: inherit; cursor: pointer; }
.wb-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.wb-dialog { background: #fff; border-radius: 12px; padding: 20px 24px; max-width: 460px; }
.wb-dialog-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.wb-flag-note { background: #fff6e0; border-left: 4px solid #e0a100; padding: 6px 10px; margin: 6px 0; }
.wb-note-meta { color: #5a6270; font-size: 0.85rem; }
.wb-board-total { color: #4a5360; }
.wb-case-h, .wb-board-title { margin-top: 20px; }
.wb-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; }

/* ---- bank (pages-bank.js: bank products, sandbox only) ---- */
.bank-banner { background: #fff6e0; border-left: 4px solid #e0a100; padding: 8px 12px; font-weight: 600; }
.bank-sandbox-label { background: #eef4ff; border-left: 4px solid #3b6fd1; padding: 6px 10px; }
.bank-offer { border: 1px solid #c9d2c4; border-radius: 6px; padding: 10px 14px; margin: 10px 0; }
.bank-disclosures .bank-disclosure { border-top: 1px solid #e3e8df; padding: 6px 0; }
.bank-advance-option { display: block; margin: 4px 0; }
.bank-reason, .bank-consent-hint { color: #5a6270; }
.bank-bank-fee { font-weight: 600; }

/* ---- Drake hand-off page (pages-handoff.js, route wb-handoff). Added by the HANDOFF builder; append-only. ---- */
.hf-sandbox { background: #fff1d6; border-left: 4px solid #b26a00; padding: 8px 12px; margin: 10px 0; color: #3d2600; }
.hf-section { border-top: 1px solid #e3e6eb; margin-top: 20px; padding-top: 12px; }
.hf-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.hf-field { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.hf-field input, .hf-field select { min-height: 44px; font: inherit; padding: 6px 10px; max-width: 100%; }
.hf-diff-row { border: 1px solid #e3e6eb; border-radius: 8px; padding: 8px 12px; margin: 8px 0; }
.hf-timeline { padding-left: 20px; }
.hf-task { margin: 8px 0; }

/* ---- Workbench calls page (wb-calls; pages-calling.js; added by the CALLING builder) ---- */
.calls-counts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; }
.calls-counts dd { margin: 0; font-weight: 600; }
.calls-select { min-height: 44px; font: inherit; padding: 8px 10px; border: 1px solid #8a93a0; border-radius: 8px; max-width: 100%; }
.calls-msg { color: #8a1c1c; min-height: 1.2em; }
.calls-result { margin: 12px 0; }
.calls-outcome textarea { width: 100%; min-height: 4.5em; font: inherit; padding: 8px 10px; border: 1px solid #8a93a0; border-radius: 8px; }
.calls-softphone .btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.calls-log-body { margin-top: 8px; }

/* owner-dashboard (pages-owner.js, owner-home): owner-only page styles */
.ow-section { margin-top: 24px; }
.ow-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.ow-card { border: 1px solid #c9ced6; border-radius: 8px; padding: 12px; background: #ffffff; }
.ow-card h3 { margin: 0 0 6px; font-size: 1rem; }
.ow-card p { margin: 2px 0; }
.ow-chart { display: block; max-width: 640px; height: auto; border: 1px solid #c9ced6; border-radius: 8px; background: #ffffff; }
.ow-axis { stroke: #5a6270; stroke-width: 1; }
.ow-bar { fill: #1f5fa8; }
.ow-line { stroke-width: 2.5; }
.ow-line-paid { stroke: #2e7d32; }
.ow-line-filed { stroke: #6a1b9a; stroke-dasharray: 6 4; }
.ow-legend { margin: 6px 0; }
.ow-key { display: inline-block; padding: 2px 8px; border-radius: 4px; color: #1d2430; background: #e8edf4; }
.ow-key-signups { border-left: 4px solid #1f5fa8; }
.ow-key-paid { border-left: 4px solid #2e7d32; }
.ow-key-filed { border-left: 4px solid #6a1b9a; }
.ow-funnel li, .ow-stages li { margin: 4px 0; }
.ow-backdrop { position: fixed; inset: 0; background-color: rgba(20, 24, 31, 0.55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.ow-dialog { background: #ffffff; color: #1d2430; border-radius: 10px; padding: 20px; width: 100%; max-width: 520px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); }
.ow-dialog-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.ow-dialog-actions .btn { min-height: 44px; }
.ow-backdrop .btn-primary:focus, .ow-backdrop .btn:focus { outline: 3px solid #1f5fa8; outline-offset: 2px; }

/* ---- notify (NOTIFY builder): appended section, notifications page only ---- */
.notify-form .field { margin: 12px 0; }
.notify-form input[type="checkbox"] { width: 1.1em; height: 1.1em; margin: 0 0.5em 0 0; vertical-align: middle; }
.notify-form input[type="tel"], .notify-form select { min-height: 44px; max-width: 100%; }
.notify-form :focus-visible { outline: 3px solid #1a4fa0; outline-offset: 2px; }
.notify-history td { overflow-wrap: anywhere; vertical-align: top; }

/* ---- Identity check and e-signature (esign module, pages-esign.js) ---- */
.advisory { background: #f4f7fb; border-left: 4px solid #1a4fa0; }
.advisory p { margin: 6px 0; font-size: 0.95rem; }
.choice { display: flex; align-items: center; gap: 8px; min-height: 44px; }
#esign-year { min-height: 44px; max-width: 100%; }
#main :focus-visible { outline: 3px solid #1a4fa0; outline-offset: 2px; }

/* ---------- questionnaire (pages-questionnaire.js) ---------- */
.qn-section { margin-top: 12px; }
.qn-q { margin: 14px 0; }
.qn-q fieldset { border: 0; padding: 0; margin: 0; }
.qn-q legend { font-weight: 600; margin-bottom: 6px; }
.qn-q label { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.qn-q input[type="text"], .qn-q input[type="number"], .qn-q input[type="date"] {
  min-width: 0; max-width: 100%; padding: 8px 10px; font: inherit; border: 1px solid #8a93a0; border-radius: 6px;
}
.qn-error { color: #8a1c1c; margin: 4px 0 0; }
.qn-error:empty { display: none; }
progress#qn-progress { width: 100%; height: 14px; }
.qn-status { min-height: 1.4em; }

/* ---- yearround (pages-yearround.js) and marketing (pages-marketing.js): own section, append only ---- */
.yr-item { border-top: 1px solid #d0d7de; padding: 12px 0; }
.yr-item h3 { margin: 0 0 4px; font-size: 1.05em; }
.yr-refs { margin: 4px 0 0; padding-left: 1.2em; }
.yr-refs a, .mk-text a { color: #0b4f9c; }
progress#yr-progress { width: 100%; height: 14px; }
.mk-text h2 { font-size: 1em; margin: 12px 0 2px; }

/* ---- questionnaire v2 (pages-questionnaire.js) ---- */
.qn-badge { display: inline-block; margin: 2px 0 0; padding: 1px 8px; border-radius: 10px;
  background: #eef3fb; color: #0b4f9c; font-size: 0.9em; }
.qn-resume { margin: 6px 0 0; }
.qn-missing { border-left: 4px solid #b26a00; }
.qn-missing ul { margin: 6px 0; padding-left: 1.2em; }
.qn-missing li p { margin: 2px 0 6px; }

/* ---- library (pages-library.js, Workbench library): own section, append only ---- */
.lib-banner { border: 2px solid #8a1c1c; background: #fff4f4; color: #5c1212; padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.lib-form-section { display: block; margin: 12px 0; }
.lib-form-section form { display: grid; gap: 10px; max-width: 42rem; }
.lib-msg { color: #8a1c1c; min-height: 1.2em; }
.lib-badge { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 0.9em; border: 1px solid #9aa3ad; }
.lib-badge-uploaded { background: #eef3fb; color: #0b4f9c; border-color: #0b4f9c; }
.lib-badge-filed { background: #eaf6ec; color: #1e5b2b; border-color: #1e5b2b; }
.lib-badge-quarantined { background: #fff4f4; color: #8a1c1c; border-color: #8a1c1c; font-weight: 700; }
.lib-badge-unknown { background: #f2f2f2; color: #333; }
.lib-open { margin: 10px 0; padding: 10px; border: 1px solid #c9ced6; border-radius: 8px; }
.lib-note-text { white-space: pre-wrap; overflow-wrap: anywhere; }
#lib-progress { width: 100%; max-width: 30rem; }

/* ---- own sign-in / sign-up / authenticator setup (auth-native.js) ---- */
.auth-card { max-width: 28rem; margin: 0 auto; background: #fff; border: 1px solid var(--border, #d8dee6); border-radius: var(--radius); padding: 1.5rem; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06); }
.auth-card .field { margin-bottom: 1rem; }
.auth-card label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.auth-input { width: 100%; min-height: var(--touch); font: inherit; padding: 0.5rem 0.75rem; border: 1px solid #8a94a3; border-radius: 6px; background: #fff; }
.auth-pw { display: flex; gap: 0.5rem; align-items: stretch; }
.auth-pw .auth-input { flex: 1; min-width: 0; }
.auth-toggle { min-width: 5rem; }
.auth-submit { width: 100%; justify-content: center; }
.auth-links { margin: 0.75rem 0 0; text-align: center; }
.btn-link { background: none; border: 0; padding: 0.5rem; font: inherit; color: var(--primary); text-decoration: underline; cursor: pointer; min-height: var(--touch); }
.auth-qr { width: 100%; max-width: 15rem; margin: 0.5rem auto 1rem; background: #fff; }
.auth-qr svg { width: 100%; height: auto; display: block; }
.auth-key code { word-break: break-all; font-size: 1.05rem; }
.info-box { background: var(--info-bg); color: var(--info); border-radius: var(--radius); padding: 0.75rem 1rem; margin-bottom: 1rem; }
@media (max-width: 30rem) { .auth-card { padding: 1rem; border-radius: 0; border-left: 0; border-right: 0; } }

/* SMS opt-in on sign-up: checkbox beside the full disclosure, normal weight (carrier opt-in evidence must be readable) */
.auth-sms { display: grid; grid-template-columns: 1.5rem 1fr; column-gap: 0.6rem; align-items: start; text-align: left; }
.auth-sms input[type="checkbox"] { width: 1.25rem; height: 1.25rem; margin: 0.15rem 0 0; }
.auth-sms label { font-weight: 400; font-size: 0.92rem; line-height: 1.45; }
.auth-sms p { grid-column: 2; margin: 0.4rem 0 0; font-size: 0.92rem; }
