/* Reclaim — accessibility, responsive and print layer.
   The design lives in inline styles carried over from the source design.
   This sheet only adds what inline styles cannot express: media queries,
   focus states, motion preferences and skip navigation. */

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: #C9A227;
  color: #08130F;
  font-family: Mulish, system-ui, sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 22px;
  border-radius: 0 0 4px 0;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Focus visibility (WCAG 2.4.7, 2.4.11) ----------
   The source design removed outlines on inputs. Restore a focus indicator
   that meets 3:1 contrast against both the dark and bone grounds. */
:focus-visible {
  outline: 3px solid #8FE6DA;
  outline-offset: 2px;
  border-radius: 2px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #8FE6DA;
  outline-offset: 2px;
}
/* On the bone (light) ground the mint ring is too light — darken it. */
.ground-bone :focus-visible {
  outline-color: #0A4A43;
}

/* ---------- Screen-reader-only utility ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Target size (WCAG 2.5.8 AA — 24×24 minimum) ---------- */
header nav a,
footer a,
button {
  min-height: 24px;
}
#nav-toggle,
.nav-toggle {
  min-width: 44px;
  min-height: 44px;
}

/* ---------- Responsive navigation ----------
   Replaces the JS-measured viewport logic from the design tool. */
#nav-toggle, .nav-toggle { display: none; }

@media (max-width: 880px) {
  #nav-toggle,
  .nav-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
  .primary-nav {
    display: none !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 2px !important;
    width: 100%;
    padding: 10px 0 6px;
  }
  .primary-nav a {
    display: block;
    padding: 13px 2px;
    width: 100%;
    border-bottom: 1px solid rgba(94, 110, 107, 0.22);
  }
  .primary-nav a:last-child {
    border-bottom: 0;
    text-align: center;
    margin-top: 12px;
    padding: 13px 18px !important;
  }
  .primary-nav[data-open="true"] {
    display: flex !important;
  }
}

/* ---------- Reduced motion (WCAG 2.3.3) ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Forced colours / high contrast ---------- */
@media (forced-colors: active) {
  .skip-link,
  button,
  a {
    forced-color-adjust: auto;
  }
}

/* ---------- Text spacing resilience (WCAG 1.4.12) ---------- */
p, li, dd {
  overflow-wrap: break-word;
}

/* ---------- Form validation messaging ---------- */
.field-error {
  display: block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #F0A08F;
  margin-top: 6px;
}
input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-bottom-color: #F0A08F !important;
}

/* ---------- No-JS fallbacks ---------- */
.no-js .js-only { display: none !important; }
.no-js .no-js-note { display: block !important; }
.no-js-note { display: none; }

/* ---------- Print ---------- */
@media print {
  header, footer, .skip-link, #nav-toggle, .nav-toggle { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  main { color: #000 !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 10px; }
}

/* ---------- Territory map dots ----------
   The visible dot stays 10px; the interactive target is 24×24 (WCAG 2.5.8). */
.map-dot {
  position: absolute;
  display: block;
  padding: 0;
  cursor: pointer;
  background: transparent;
  border: 0;
}
.map-dot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--dot-size, 10px);
  height: var(--dot-size, 10px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--dot, #8FA3A0);
  border: var(--dot-ring, 1px solid rgba(244, 246, 245, 0.25));
  transition: box-shadow .2s ease, transform .2s ease;
}
.map-dot:hover::before,
.map-dot:focus-visible::before {
  transform: translate(-50%, -50%) scale(1.35);
  box-shadow: 0 0 0 4px rgba(143, 230, 218, 0.28);
}

/* ---------- Form controls ----------
   The design uses underlined, transparent fields. Enforced here so the style
   cannot be lost to inline-style serialisation, and so autofill matches. */
form[name="territory-application"] input[type="text"],
form[name="territory-application"] input[type="email"],
form[name="territory-application"] input[type="tel"],
form[name="territory-application"] textarea {
  background-color: transparent;
  color: #F4F6F5;
  -webkit-text-fill-color: #F4F6F5;
}
form[name="territory-application"] input:-webkit-autofill,
form[name="territory-application"] input:-webkit-autofill:hover,
form[name="territory-application"] input:-webkit-autofill:focus {
  -webkit-text-fill-color: #F4F6F5;
  -webkit-box-shadow: 0 0 0 1000px #06322D inset;
  caret-color: #F4F6F5;
  transition: background-color 9999s ease-in-out 0s;
}
form[name="territory-application"] input:focus,
form[name="territory-application"] textarea:focus {
  border-bottom-color: #0DA89B;
}
form[name="territory-application"] input[type="checkbox"] {
  accent-color: #0DA89B;
}

/* ---------- Hero: mobile fold ----------
   The full 24-row ledger collapses to one column below ~760px, which pushed the
   headline roughly 1100px down the page. On small screens the ledger is trimmed
   to six rows with a link to the full register, and hero padding is tightened,
   so the headline and the zip lookup land inside the first viewport. */
.ledger-more { display: none; }

@media (max-width: 760px) {
  .hero-inner {
    padding-top: 26px !important;
  }
  .ledger-grid > div:nth-child(n+6) {
    display: none;
  }
  .ledger-more {
    display: inline-block;
    margin-top: 14px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: 0.12em;
    color: #8FE6DA;
    text-decoration: none;
    min-height: 24px;
    padding: 4px 0;
  }
  .ledger-more:hover,
  .ledger-more:focus-visible {
    text-decoration: underline;
  }
  form[data-zip-check] { margin-top: 4px !important; }
  .hero-copy {
    padding: 18px 0 72px !important;
  }
  .hero-copy h1 {
    font-size: clamp(2.5rem, 12vw, 4rem) !important;
  }
  .hero-copy p {
    font-size: 16px !important;
    margin-top: 22px !important;
  }
}

/* ============================================================
   MOBILE LAYER
   The source design carried desktop-only inline styles: fixed
   multi-column grids, nowrap eyebrow labels, 130-150px section
   padding and a 84px-minimum ghost wordmark. Below 760px those
   produce horizontal overflow and one-word-per-line prose. The
   rules here restate the same layouts at phone scale; nothing
   is hidden that a desktop visitor can see, except the ledger
   rows already linked from "See all 24 territories".
   ============================================================ */

@media (max-width: 760px) {

  /* ---- Section rhythm: desktop 130-150px is dead space on a phone ---- */
  [style*="padding: 150px 32px"]      { padding: 76px 20px !important; }
  [style*="padding: 140px 32px 150px"]{ padding: 72px 20px 76px !important; }
  [style*="padding: 130px 32px 140px"]{ padding: 68px 20px 72px !important; }
  [style*="padding: 130px 32px"]      { padding: 68px 20px !important; }
  [style*="padding: 110px 32px 130px"]{ padding: 60px 20px 68px !important; }
  [style*="padding: 110px 32px"]      { padding: 60px 20px !important; }
  [style*="padding: 96px 32px 72px"]  { padding: 56px 20px 44px !important; }
  [style*="padding: 96px 32px 88px"]  { padding: 56px 20px 48px !important; }
  [style*="padding: 88px 32px 130px"] { padding: 52px 20px 68px !important; }
  [style*="padding: 88px 32px 56px"]  { padding: 52px 20px 36px !important; }
  [style*="padding: 88px 32px"]       { padding: 52px 20px !important; }
  [style*="padding: 64px 32px 110px"] { padding: 40px 20px 60px !important; }
  [style*="padding: 64px 32px 48px"]  { padding: 40px 20px 32px !important; }
  [style*="padding: 56px 32px 0px"]   { padding: 34px 20px 0 !important; }
  [style*="padding: 52px 32px 0px"]   { padding: 26px 20px 0 !important; }
  [style*="padding: 24px 32px 130px"] { padding: 20px 20px 68px !important; }
  [style*="padding: 16px 32px"]       { padding: 16px 20px !important; }
  [style*="padding: 0px 32px 150px"]  { padding: 0 20px 76px !important; }
  [style*="padding: 0px 32px 130px"]  { padding: 0 20px 68px !important; }
  [style*="padding: 0px 32px 56px"]   { padding: 0 20px 36px !important; }

  /* ---- Section eyebrows: number, hairline, trailing status ----
     Three nowrap items on one 390px line overflowed the page. */
  .eyebrow {
    flex-wrap: wrap !important;
    gap: 10px 14px !important;
    margin-bottom: 26px !important;
  }
  .eyebrow > span[style*="flex: 1"] {
    min-width: 24px;
  }

  /* ---- Timeline / transfer / qualification rows ----
     Desktop "76px 176px 1fr" left the prose column ~50px wide, which
     wrapped to one word per line. Time and label share the first row;
     the prose spans the full width beneath, as on desktop it spans
     the remaining track. */
  .tl-row {
    grid-template-columns: auto 1fr !important;
    gap: 4px 14px !important;
    padding: 14px 0 !important;
  }
  .tl-row > *:nth-child(3) {
    grid-column: 1 / -1;
    margin-top: 2px;
  }

  .tl-row-2 {
    gap: 12px !important;
  }

  /* ---- Card padding: 26-30px each side leaves little room at 390px ---- */
  [style*="padding: 22px 30px"] { padding: 18px 18px !important; }
  [style*="padding: 14px 30px 10px"] { padding: 10px 18px 6px !important; }
  [style*="padding: 8px 30px 14px"] { padding: 6px 18px 10px !important; }
  [style*="padding: 14px 26px"] { padding: 12px 18px !important; }
  [style*="padding: 13px 26px"] { padding: 11px 18px !important; }
  [style*="padding: 20px 26px 4px"] { padding: 16px 18px 4px !important; }

  /* ---- Ghost wordmark: the 84px clamp floor overflowed 390px ---- */
  .footer-wordmark {
    font-size: clamp(38px, 13vw, 84px) !important;
    padding-top: 44px !important;
  }

  /* ---- Horizontally scrollable data tables keep momentum scrolling ---- */
  [style*="overflow-x: auto"],
  [style*="overflow-x:auto"] {
    -webkit-overflow-scrolling: touch;
  }

  /* ---- Long monospace labels may wrap rather than push the page ---- */
  main span[style*="white-space: nowrap"] {
    white-space: normal !important;
  }

  /* ---- Register-of-claims strip: label + ticker + count on one 390px
     line overflowed. Stack the ticker onto its own full-width row. ---- */
  .claims-strip {
    flex-wrap: wrap !important;
    white-space: normal !important;
    gap: 8px 18px !important;
    padding: 14px 20px !important;
  }
  .claims-strip > div {
    flex: 1 1 100% !important;
    order: 3;
    white-space: nowrap;
  }
  .claims-strip > span {
    flex: 0 1 auto !important;
  }

  /* ---- Auto-fit card grids ----
     minmax(260-320px, 1fr) cannot fit its own minimum on a 320px phone,
     so the track overflowed the viewport. One column on phones. ---- */
  [style*="repeat(auto-fit,minmax("],
  [style*="repeat(auto-fill,minmax("] {
    grid-template-columns: 1fr !important;
  }

  /* ---- Field note entries: the 150-200px meta rail starved the prose ---- */
  article[style*="minmax(150px,200px)"] {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    padding: 30px 0 !important;
  }

  /* ---- Display headings ----
     Long single words at clamp() minimums exceed a 320px column and were
     the last source of horizontal scroll. Let them break or hyphenate. ---- */
  h1, h2, h3 {
    overflow-wrap: break-word;
    hyphens: auto;
  }

  /* ---- flex-basis floors (e.g. flex: 1 1 320px) exceed a 320px column ---- */
  [style*="flex: 1 1 320px"],
  [style*="flex: 1 1 300px"],
  [style*="flex: 1 1 280px"],
  [style*="flex: 1 1 260px"] {
    flex-basis: 100% !important;
    min-width: 0 !important;
  }
}

/* ---- Narrow phones: keep the ledger to one line per zip ---- */
@media (max-width: 480px) {
  .ledger-row {
    grid-template-columns: 56px 1fr auto !important;
    gap: 8px !important;
    padding: 8px 2px !important;
  }
  .ledger-row > span:nth-child(3) {
    font-size: 9.5px !important;
    letter-spacing: 0.06em !important;
  }
  .footer-wordmark { font-size: clamp(34px, 12.5vw, 84px) !important; }
}
