/* Base: tokens, fonts, reset, typography, header, footer, buttons, forms */

@font-face {
  font-family: "Lora";
  src: url("../fonts/lora-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("../fonts/lora-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --tone-teal: #23545c;
  --tone-teal-deep: #173a40;
  --tone-teal-soft: #e4eff0;
  --tone-sand: #f5efe4;
  --tone-sand-deep: #e9dfcd;
  --tone-white: #ffffff;
  --tone-coral: #d9694f;
  --tone-coral-text: #a8442c;
  --tone-coral-soft: #fbe9e3;
  --tone-ink: #1c2b30;
  --tone-ink-soft: #3c4f55;
  --tone-line: #d6cdbd;
  --tone-focus: #a8442c;
  --tone-radius: 12px;
  --tone-shadow: 0 2px 4px rgba(28, 43, 48, 0.06), 0 10px 28px rgba(28, 43, 48, 0.08);
  --tone-font-head: "Lora", Georgia, "Times New Roman", serif;
  --tone-font-body: "Atkinson Hyperlegible", "Segoe UI", Arial, sans-serif;
  --tone-wrap: 72rem;
  --tone-gutter: clamp(1rem, 4vw, 2.5rem);
}

/* Text size steps controlled by the A / A+ / A++ buttons */
html { font-size: 118.75%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html[data-text-scale="large"] { font-size: 131.25%; }
html[data-text-scale="xlarge"] { font-size: 143.75%; }

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

body {
  margin: 0;
  font-family: var(--tone-font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--tone-ink);
  background: var(--tone-white);
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
img { height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--tone-font-head);
  font-weight: 600;
  line-height: 1.25;
  color: var(--tone-ink);
  margin: 0 0 0.75em;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p, ul, ol, table { margin: 0 0 1.1em; }
strong { font-weight: 700; }

a { color: var(--tone-teal); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--tone-teal-deep); text-decoration-thickness: 3px; }

:focus-visible { outline: 3px solid var(--tone-focus); outline-offset: 3px; border-radius: 4px; }

.s-wrap { width: 100%; max-width: var(--tone-wrap); margin: 0 auto; padding: 0 var(--tone-gutter); }
.s-wrap--narrow { max-width: 50rem; }

.s-skip {
  position: absolute; left: 1rem; top: -10rem; z-index: 200;
  background: var(--tone-ink); color: var(--tone-white); padding: 0.75rem 1.25rem; border-radius: var(--tone-radius);
}
.s-skip:focus { top: 1rem; color: var(--tone-white); }

.s-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}

.s-icon { width: 32px; height: 32px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.s-icon--small { width: 22px; height: 22px; }

/* Tier 1: utility bar */
.s-topbar { background: var(--tone-teal); color: var(--tone-white); font-size: 0.9rem; }
.s-topbar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-top: 0.5rem; padding-bottom: 0.5rem; }
.s-topbar__contact { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.s-topbar__link { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--tone-white); text-decoration: none; padding: 0.25rem 0; overflow-wrap: anywhere; }
.s-topbar__link:hover { color: var(--tone-white); text-decoration: underline; text-decoration-thickness: 2px; }
.s-topbar :focus-visible { outline-color: #ffd7c9; }

.s-textsize { display: flex; align-items: center; gap: 0.5rem; }
.s-textsize__label { margin-right: 0.25rem; }
.s-textsize__btn {
  min-width: 3rem; min-height: 2.6rem; padding: 0.2rem 0.6rem;
  font: 700 0.95rem/1 var(--tone-font-body); color: var(--tone-white);
  background: transparent; border: 2px solid rgba(255, 255, 255, 0.7); border-radius: 8px; cursor: pointer;
}
.s-textsize__btn:hover { background: rgba(255, 255, 255, 0.2); color: var(--tone-white); border-color: var(--tone-white); text-decoration: underline; }
.s-textsize__btn--active:hover, .s-textsize__btn[aria-pressed="true"]:hover { background: var(--tone-white); color: var(--tone-teal-deep); }
.s-textsize__btn--active, .s-textsize__btn[aria-pressed="true"] { background: var(--tone-white); color: var(--tone-teal); border-color: var(--tone-white); }

/* Tier 2: brand + nav */
.s-masthead { background: var(--tone-white); border-bottom: 1px solid var(--tone-line); }
.s-brand { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1.4rem 0 0.9rem; }
.s-brand__home { display: inline-flex; flex-direction: column; align-items: center; gap: 0.25rem; text-decoration: none; color: var(--tone-ink); border-radius: var(--tone-radius); padding: 0.25rem 0.75rem; }
.s-brand__home:hover { color: var(--tone-ink); text-decoration: none; }
.s-brand__home:hover .s-brand__name { color: var(--tone-teal); }
.s-brand__mark { width: 56px; height: 56px; }
.s-brand__name { font-family: var(--tone-font-head); font-weight: 600; font-size: 1.85rem; line-height: 1.1; letter-spacing: 0.01em; }
.s-brand__tagline { margin: 0.35rem 0 0; font-size: 0.95rem; color: var(--tone-ink-soft); }

.s-nav { border-top: 1px solid var(--tone-sand-deep); }
.s-nav__toggle {
  display: none; align-items: center; justify-content: center; gap: 0.6rem; width: 100%;
  min-height: 3.2rem; margin: 0.6rem 0; padding: 0.5rem 1rem;
  font: 700 1rem var(--tone-font-body); color: var(--tone-teal);
  background: var(--tone-teal-soft); border: 2px solid var(--tone-teal); border-radius: var(--tone-radius); cursor: pointer;
}
.s-nav__toggle:hover { background: var(--tone-teal); color: var(--tone-white); }
.s-nav__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 2.25rem; margin: 0; padding: 0; list-style: none; }
.s-nav__link {
  display: block; padding: 0.85rem 0.2rem 0.7rem;
  color: var(--tone-ink); text-decoration: none; font-size: 1.02rem;
  border-bottom: 4px solid transparent;
}
.s-nav__link:hover { color: var(--tone-teal); border-bottom-color: var(--tone-teal-soft); text-decoration: none; }
.s-nav__link[aria-current="page"] { color: var(--tone-teal); font-weight: 700; border-bottom-color: var(--tone-teal); }

@media (max-width: 47.99em) {
  .s-topbar__inner { justify-content: center; text-align: center; }
  .s-topbar__contact { justify-content: center; }
  .s-nav__toggle { display: flex; }
  .s-nav__list { display: none; flex-direction: column; gap: 0; padding-bottom: 0.75rem; }
  .s-nav__list--open { display: flex; }
  .s-nav__link { text-align: center; border-bottom-width: 3px; padding: 0.8rem 0.2rem; }
}

/* Buttons */
.s-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3.5rem; padding: 0.8rem 1.8rem;
  font: 700 1.05rem/1.3 var(--tone-font-body); text-align: center; text-decoration: none;
  color: var(--tone-white); background: var(--tone-teal);
  border: 2px solid var(--tone-teal); border-radius: var(--tone-radius); box-shadow: var(--tone-shadow); cursor: pointer;
}
.s-button:hover { color: var(--tone-white); background: var(--tone-teal-deep); border-color: var(--tone-teal-deep); text-decoration: underline; text-decoration-thickness: 2px; }
.s-button--large { min-height: 4rem; padding: 1rem 2.2rem; font-size: 1.15rem; }
.s-button--ghost { color: var(--tone-teal); background: var(--tone-white); box-shadow: none; }
.s-button--ghost:hover { color: var(--tone-white); background: var(--tone-teal); border-color: var(--tone-teal); }

/* Forms */
.s-field { margin: 0 0 1.4rem; }
.s-field__label { display: block; margin-bottom: 0.4rem; font-weight: 700; }
.s-field__optional { font-weight: 400; color: var(--tone-ink-soft); }
.s-field__input {
  display: block; width: 100%; min-height: 56px; padding: 0.7rem 1rem;
  font: 400 1.05rem/1.4 var(--tone-font-body); color: var(--tone-ink);
  background: var(--tone-white); border: 2px solid #8a9a9e; border-radius: var(--tone-radius);
}
.s-field__input:hover { border-color: var(--tone-teal); }
.s-field__input:focus-visible { outline: 3px solid var(--tone-focus); outline-offset: 2px; border-color: var(--tone-teal); }
textarea.s-field__input { min-height: 10rem; resize: vertical; }
.s-field__hint { margin: 0.35rem 0 0; font-size: 0.9rem; color: var(--tone-ink-soft); }
.s-check { display: flex; gap: 0.85rem; align-items: flex-start; margin: 0 0 1.1rem; }
.s-check__box { flex: none; width: 1.6rem; height: 1.6rem; margin: 0.15rem 0 0; accent-color: var(--tone-teal); cursor: pointer; }
.s-check__label { font-size: 0.97rem; }

/* Tables */
.s-table { width: 100%; border-collapse: collapse; font-size: 0.97rem; background: var(--tone-white); }
.s-table caption { text-align: left; font-weight: 700; padding-bottom: 0.5rem; }
.s-table th, .s-table td { padding: 0.7rem 0.9rem; border: 1px solid var(--tone-line); text-align: left; vertical-align: top; }
.s-table thead th { background: var(--tone-teal-soft); }
.s-table tbody th { font-weight: 700; background: #fbf8f2; }
.s-table-scroll { overflow-x: auto; }

/* Footer: three stacked rows */
.s-footer { background: var(--tone-sand); border-top: 1px solid var(--tone-line); padding: 3.5rem 0 2.5rem; text-align: center; }
.s-footer__row { margin: 0 auto 2.25rem; }
.s-footer__row:last-child { margin-bottom: 0; }
.s-footer__calm { font-family: var(--tone-font-head); font-size: 1.3rem; max-width: 40rem; margin: 0 auto 1rem; }
.s-footer__contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 2.5rem; margin: 0; padding: 0; list-style: none; font-size: 1.3rem; font-weight: 700; }
.s-footer__contact a { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--tone-teal); text-decoration: none; overflow-wrap: anywhere; }
.s-footer__contact a:hover { color: var(--tone-teal-deep); text-decoration: underline; text-decoration-thickness: 2px; }
.s-footer__links { display: flex; flex-wrap: wrap; justify-content: center; margin: 0; padding: 0; list-style: none; }
.s-footer__item { display: inline-flex; align-items: center; }
.s-footer__item + .s-footer__item::before { content: "·"; padding: 0 0.7rem; color: var(--tone-ink-soft); font-weight: 700; }
.s-footer__link {
  padding: 0.3rem 0.15rem; color: var(--tone-ink); text-decoration: underline; text-decoration-color: var(--tone-line);
  font: 400 0.95rem/1.5 var(--tone-font-body); background: none; border: 0; cursor: pointer;
}
.s-footer__link:hover { color: var(--tone-teal); text-decoration-color: var(--tone-teal); text-decoration-thickness: 2px; }
.s-footer__copy { margin: 1rem 0 0; font-size: 0.9rem; color: var(--tone-ink-soft); }
.s-footer__risk {
  max-width: 52rem; margin: 0 auto; padding: 1.4rem 1.6rem; text-align: left;
  background: var(--tone-white); border: 2px solid var(--tone-teal); border-radius: var(--tone-radius); font-size: 0.92rem;
}
.s-footer__risk-title { display: flex; align-items: center; gap: 0.6rem; font: 600 1.05rem var(--tone-font-head); margin: 0 0 0.5rem; color: var(--tone-teal); }
.s-footer__risk p:last-child { margin-bottom: 0; }

.s-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
