/* Waypoint: mobile-first styles, based on the Waypoint mobile concept. */

@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/atkinson-hyperlegible-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/atkinson-hyperlegible-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url('fonts/source-serif-4-700.woff2') format('woff2');
}

:root {
  --ink: #14211d;
  --ink-2: #3e4c47;
  --ink-3: #4a5853;
  --bg: #f5f6f2;
  --surface: #ffffff;
  --line: #d9ded9;
  --line-2: #e6eae6;
  --brand: #0b5d4b;
  --brand-dark: #06392e;
  --brand-ink: #0e3a30;
  --brand-soft: #e3efea;
  --warn-bg: #fff4dc;
  --warn-ink: #4d3300;
  --warn-ico: #6b4600;
  --no-bg: #ecedec;
  --no-ink: #3a3f3d;
  --danger: #b3131b;
  --danger-dark: #8e0f15;
  --danger-soft: #fbe9e9;
  --danger-line: #f0c4c6;
  --danger-ink: #7a0d12;
  --danger-text: #4a1416;
  --sos-bg: #1b1112;
  --sos-red: #d7262e;
  --sos-ring: #5a1e21;
  --sos-text: #e9dadb;
  --radius: 14px;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-tap-highlight-color: rgba(11, 93, 75, 0.15);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 700;
  margin: 0;
  line-height: 1.15;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--brand);
  text-underline-offset: 2px;
}
a:hover {
  color: var(--brand-dark);
}

button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid #1a73e8;
  outline-offset: 2px;
}

svg {
  flex-shrink: 0;
}

[hidden] {
  display: none !important;
}

.vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.js-only {
  display: none !important;
}
.js .js-only {
  display: flex !important;
}

.skip {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}
.skip:focus {
  top: 8px;
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.topin {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--ink);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
}
.brand:hover {
  color: var(--ink);
}
.topnav {
  display: none;
  gap: 4px;
}
.topbtn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--ink-2);
  font-weight: 700;
  text-decoration: none;
}
.topbtn:hover {
  background: #f0f3f0;
  color: var(--ink);
}
.topbtn[aria-current] {
  background: var(--brand-soft);
  color: var(--brand);
}
.sosmini {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 22px;
  background: var(--danger);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.sosmini:hover {
  background: var(--danger-dark);
  color: #fff;
}
.concept {
  margin: 0;
  background: var(--warn-bg);
  color: #6b4600;
  font-size: 13px;
  padding: 6px 16px;
  text-align: center;
}

/* Layout */
.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.wrap.narrow {
  max-width: 760px;
  gap: 20px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stack-sm {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hero {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 640px;
}

.h-xl {
  font-size: clamp(30px, 8vw, 40px);
  line-height: 1.12;
}
.h-lg {
  font-size: clamp(27px, 7vw, 34px);
}
.h-md {
  font-size: 22px;
}
.h-sm {
  font-size: 19px;
}
.lede {
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-2);
}
.muted {
  color: var(--ink-2);
  font-size: 15px;
}
.small {
  font-size: 14px;
  color: var(--ink-3);
}
.eyebrow {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.label {
  font-weight: 700;
  font-size: 15px;
}

.checked {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--brand-ink);
}
.checked .ico {
  color: var(--brand);
}

/* Search */
.search {
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.searchbox {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 12px;
}
.searchbox:focus-within {
  outline: 3px solid #1a73e8;
  outline-offset: 2px;
}
.searchbox input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming in on focus */
}
.searchbox input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}
.noresult {
  padding: 16px;
  font-size: 15px;
  color: var(--ink-3);
}

/* Tiles and cards */
.grid3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.tile {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 80px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
}
.tile:hover {
  border-color: var(--brand);
  color: var(--ink);
}
.ticon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
}
.tiletext {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tiletext strong {
  font-size: 17px;
}
.tiletext span {
  font-size: 14px;
  color: var(--ink-3);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.pad {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 16px;
}
.box {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.boxh {
  font-size: 21px;
  padding: 16px 16px 10px;
}
.boxp {
  padding: 0 16px 12px;
  color: var(--ink-2);
  font-size: 15px;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 10px 16px;
  border-top: 1px solid var(--line-2);
  color: var(--ink);
  text-decoration: none;
}
a.row:hover {
  background: #f5f8f6;
  color: var(--ink);
}
.box > .row:first-child {
  border-top: 0;
}
.row small {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-3);
}
.chev {
  color: var(--ink-3);
}
.more {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  text-decoration: none;
}
.back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: -8px 0 -8px;
  color: var(--brand);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}

/* Stamps */
.stampgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 8px;
}
.snum {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border: 2px solid var(--brand);
  border-radius: 10px;
  background: var(--surface);
  color: var(--brand);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
}
.snum:hover {
  background: var(--brand-soft);
  color: var(--brand);
}
.stgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.st {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
}
.st:hover {
  border-color: var(--brand);
  color: var(--ink);
}
.num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border: 2px solid var(--brand);
  border-radius: 10px;
  color: var(--brand);
  font-weight: 700;
  font-size: 18px;
}
.sttext {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sttext strong {
  font-size: 17px;
}
.sttext > span:not(.badge) {
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-3);
}
.badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}
.badge-yes {
  background: var(--brand-soft);
  color: var(--brand);
}
.badge-lim {
  background: var(--warn-bg);
  color: #6b4600;
}
.badge-no {
  background: var(--no-bg);
  color: var(--no-ink);
}
.stamphead {
  display: flex;
  align-items: center;
  gap: 16px;
}
.bignum {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 30px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
}
.stat .eyebrow {
  color: var(--ink-3);
}
.stat strong {
  font-family: var(--serif);
  font-size: 28px;
}
.stat span:last-child {
  font-size: 14px;
  color: var(--ink-3);
}

/* Pills, chips and the work checker */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #c9d0cb;
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  cursor: pointer;
}
.pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pill:has(:checked) {
  border: 2px solid var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}
.pill:has(:focus-visible) {
  outline: 3px solid #1a73e8;
  outline-offset: 2px;
}
button.pill[aria-pressed='true'] {
  border: 2px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}
fieldset {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
legend {
  padding: 0;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 15px;
}
#checker {
  flex-direction: column;
  gap: 18px;
  padding: 18px 16px;
}
.result {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
}
.result h2.eyebrow {
  font-family: var(--sans);
}
.result-title {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.25;
}
.result a {
  color: #fff;
  font-weight: 700;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Lists inside fact sections */
.bullets,
.steps {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 16px;
  line-height: 1.5;
}
.steps li::marker {
  font-weight: 700;
  color: var(--brand);
}

/* Notes */
.note {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.5;
}
.note .ico {
  margin-top: 1px;
  color: var(--brand);
}
.note.warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
}
.note.warn .ico {
  color: var(--warn-ico);
}
.tint {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 16px;
  border-radius: var(--radius);
  background: var(--brand-soft);
  color: var(--brand-ink);
}

/* Buttons */
.two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
}
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-danger-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  text-decoration: none;
}
.btn-primary {
  border: 0;
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-dark);
  color: #fff;
}
.btn-secondary {
  border: 2px solid var(--brand);
  background: var(--surface);
  color: var(--brand);
}
.btn-secondary:hover {
  background: var(--brand-soft);
  color: var(--brand);
}
.btn-danger {
  border: 0;
  background: var(--danger);
  color: #fff;
  letter-spacing: 0.02em;
}
.btn-danger:hover {
  background: var(--danger-dark);
  color: #fff;
}
.btn-danger-ghost {
  border: 2px solid var(--danger);
  background: var(--surface);
  color: var(--danger);
}
.btn-danger-ghost:hover {
  color: var(--danger-dark);
}

/* Danger box (home) */
.danger {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 16px;
  border: 1px solid var(--danger-line);
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: var(--danger-text);
}
.danger h2 {
  color: var(--danger-ink);
}
.danger .two {
  max-width: 480px;
}

/* Emergency page */
.sos {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  padding: 22px 16px;
  border-radius: var(--radius);
  background: var(--sos-bg);
  color: #fff;
  text-align: center;
}
.sos p {
  color: var(--sos-text);
  font-size: 17px;
}
.sosring {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 216px;
  height: 216px;
  border-radius: 50%;
  background: var(--sos-ring);
  color: #fff;
  text-decoration: none;
}
.sosring > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--sos-red);
}
.sosring strong {
  font-family: var(--serif);
  font-size: 52px;
  line-height: 1;
  letter-spacing: 0.04em;
}
.sosring span span {
  font-weight: 700;
  font-size: 16px;
}
.sosring:hover {
  color: #fff;
}
.sosring:hover > span {
  background: #c11f27;
}
.btn-sos-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  border: 2px solid #fff;
  border-radius: var(--radius);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.btn-sos-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.locout {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-ink);
}
.locout strong {
  font-family: var(--serif);
  font-size: 24px;
  overflow-wrap: anywhere;
}

/* Phone numbers */
.tel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: 10px 16px;
  border-top: 1px solid var(--line-2);
  color: var(--ink);
  text-decoration: none;
}
.tel:hover {
  background: #f5f8f6;
  color: var(--ink);
}
.tel small {
  display: block;
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.4;
}
.tel b {
  font-size: 17px;
  color: var(--brand);
  white-space: nowrap;
}
.tel b.urgent {
  color: var(--danger);
}

/* Segmented tabs (help pages) */
.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--line-2);
}
.segmented a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 6px;
  border-radius: 10px;
  color: var(--ink-2);
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  text-decoration: none;
}
.segmented a[aria-current] {
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 1px 2px rgba(20, 33, 29, 0.12);
}

/* Sources */
.sources {
  margin-top: 8px;
}
.srclist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.srclist li {
  display: flex;
  flex-direction: column;
}
.srclist a {
  font-weight: 700;
}
.srclist span {
  font-size: 14px;
  color: var(--ink-3);
}

/* Footer and bottom navigation */
.sitefoot {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px 24px;
  font-size: 14px;
  color: var(--ink-3);
}
.sitefoot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
}
.sitefoot nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.nav {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.navbtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 0 12px;
  color: var(--ink-3);
  font-size: 13px;
  text-decoration: none;
}
.navbtn:hover {
  color: var(--ink);
}
.navbtn[aria-current] {
  color: var(--brand);
  font-weight: 700;
}

@media (min-width: 760px) {
  .topnav {
    display: flex;
  }
  .nav {
    display: none;
  }
  .wrap {
    padding-top: 32px;
    padding-bottom: 48px;
  }
  .h-md {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  .top,
  .nav,
  .concept,
  .js-only,
  .sitefoot nav {
    display: none !important;
  }
  body {
    background: #fff;
  }
}
