/* GottaLoveSA — WCAG 2.2 AAA target. All text pairs >= 7:1. */
:root {
  --bg: #fffdf8;
  --surface: #f4efe4;
  --text: #1b1b1b;
  --muted: #3a3a3a;
  --link: #0a4a55;
  --link-hover: #062f36;
  --accent: #8a3412;
  --accent-text: #ffffff;
  --border: #6b6257;
  --note-bg: #e8f1f2;
  --focus: #0a4a55;
  --focus-halo: #ffd84d;
  --error: #8f1d10;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --surface: #1f1f1f;
    --text: #f2f2f2;
    --muted: #d6d6d6;
    --link: #8fd3df;
    --link-hover: #c5ecf2;
    --accent: #f2b08e;
    --accent-text: #121212;
    --border: #9a9a9a;
    --note-bg: #16292c;
    --focus: #ffd84d;
    --focus-halo: #121212;
    --error: #ffb4a8;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--link-hover); text-decoration-thickness: 0.16em; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--focus-halo);
  border-radius: 2px;
}
main:focus { outline: none; }
.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1rem; }
.wrap.wide { max-width: 72rem; }
.skip {
  position: absolute; left: 1rem; top: -100px; z-index: 10;
  background: var(--accent); color: var(--accent-text); padding: 0.75rem 1rem; font-weight: 700;
}
.skip:focus { top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.site-head { border-bottom: 1px solid var(--border); background: var(--bg); }
.site-head > .wrap, .main-nav ul { max-width: 72rem; }
.head-row { padding-top: 1rem; padding-bottom: 0.5rem; }
.brand { text-decoration: none; color: var(--text); display: inline-flex; flex-direction: row; align-items: center; gap: 1rem; padding: 0.25rem 0; }
.brand-logo { width: auto; height: 108px; background: #ffffff; border-radius: 10px; padding: 4px; }
@media (max-width: 34rem) { .brand-logo { height: 84px; } }
.brand-name { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.01em; }
.brand-name span { color: var(--accent); }
.brand-tag { font-size: 1rem; color: var(--muted); }
.main-nav { background: #2f4a50; }
.main-nav ul { list-style: none; margin: 0 auto; padding: 0.5rem 1rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 0.75rem; }
.main-nav li { margin: 0; }
.main-nav a {
  display: inline-block; padding: 0.6rem 0.75rem; min-height: 44px; min-width: 44px;
  font-weight: 700; text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.25em;
  border-radius: 6px; color: #ffffff;
}
.main-nav a:hover { color: #ffffff; text-decoration-thickness: 0.15em; background: #1d3236; }
.main-nav a[aria-current="page"], .main-nav a.in-section { background: #ffffff; color: #1d3236; text-decoration-thickness: 0.15em; }
.main-nav a:focus-visible { outline-color: #ffd84d; box-shadow: none; }
.banner { display: block; line-height: 0; }
.banner img { width: 100%; height: auto; display: block; }
.banner:focus-visible { outline: 4px solid #ffd84d; outline-offset: -4px; box-shadow: inset 0 0 0 8px #1d3236; }

/* main */
main { padding: 1.5rem 0 3rem; display: block; }
h1, h2, h3 { line-height: 1.25; margin: 2rem 0 0.75rem; }
h1 { font-size: 2.25rem; margin-top: 0.75rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: 0.4rem; }
.lead { font-size: 1.3rem; color: var(--text); }
.meta { color: var(--muted); font-size: 1rem; }
.small { font-size: 1rem; color: var(--muted); }
.prose p.pic img, .prose > img { margin: 1.25rem 0; border-radius: 8px; }
.prose p.visit { margin-top: -0.5rem; }
.crumbs ol { list-style: none; padding: 0; margin: 0 0 0.5rem; display: flex; flex-wrap: wrap; gap: 0.25rem; font-size: 1rem; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin: 0 0.4rem; color: var(--muted); }
.note { background: var(--note-bg); border-left: 6px solid var(--link); padding: 0.85rem 1rem; margin: 1rem 0 1.5rem; border-radius: 4px; }
.note p:last-child { margin-bottom: 0; }

/* hero and bands */
.hero { padding: 1rem 0 1.5rem; max-width: 46rem; }
.hero h1 { font-size: 2.6rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.band { background: var(--surface); border-radius: 12px; padding: 1.25rem 1.25rem 0.5rem; margin: 2.5rem 0; }
.band h2 { margin-top: 0.25rem; }

/* buttons */
.btn {
  display: inline-block; background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 700;
  padding: 0.75rem 1.25rem; min-height: 48px; border: 2px solid var(--accent); border-radius: 8px;
  text-decoration: none; cursor: pointer;
}
.btn:hover { color: var(--accent-text); text-decoration: underline; }
.btn-alt { background: transparent; color: var(--text); border-color: var(--text); }
.btn-alt:hover { color: var(--text); }

/* cards */
.cards { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.card { background: var(--surface); border-radius: 12px; overflow: hidden; margin: 0; display: flex; flex-direction: column; position: relative; }
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card-body { padding: 0.9rem 1rem 0.5rem; }
.card h2, .card h3 { font-size: 1.2rem; margin: 0 0 0.4rem; }
.card a { text-decoration: underline; }
.card a::after { content: ""; position: absolute; inset: 0; }
.card a:focus-visible { box-shadow: none; outline: none; }
.card:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.card p { font-size: 1rem; margin-bottom: 0.5rem; }

/* link list */
.link-list { list-style: none; padding: 0; }
.link-list li { padding: 0.6rem 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; }
.link-list a { font-weight: 700; }

/* access box */
.access-box { border: 2px solid var(--link); border-radius: 12px; padding: 0.25rem 1.25rem 0.5rem; margin: 2.5rem 0 1rem; }
.access-box h2 { margin-top: 1rem; }

/* copyable templates */
pre.template {
  white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: 1rem;
  background: var(--surface); border: 2px solid var(--border); border-radius: 8px; padding: 0.85rem 1rem; margin: 0.5rem 0 1.5rem;
}
.toc ol { padding-left: 1.5rem; }
.toc a { display: inline-block; padding: 0.2rem 0; min-height: 24px; }

/* tables */
table { border-collapse: collapse; width: 100%; margin: 1rem 0 2rem; font-size: 1rem; }
caption { text-align: left; font-weight: 700; font-size: 1.2rem; padding-bottom: 0.5rem; }
th, td { border: 1px solid var(--border); padding: 0.6rem 0.7rem; text-align: left; vertical-align: top; }
thead th { background: var(--surface); }
@media (max-width: 34rem) {
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tr { border: 1px solid var(--border); margin-bottom: 0.75rem; border-radius: 6px; }
  th, td { border: none; }
  tbody th { background: var(--surface); }
}

/* forms */
.gform { margin: 1rem 0 1.5rem; max-width: 36rem; }
.field { margin-bottom: 1.25rem; }
label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.req, .opt { font-weight: 400; color: var(--muted); }
.hint { margin: 0 0 0.35rem; color: var(--muted); font-size: 1rem; }
.field-check { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.75rem; align-items: start; }
.field-check .field-error { grid-column: 1 / -1; }
.field-check input[type=checkbox] { width: 28px; height: 28px; margin: 0.15rem 0 0; accent-color: var(--link); }
.field-check label { font-weight: 400; }
input[type=file] { font: inherit; padding: 0.5rem 0; max-width: 100%; }
input[type=text], input[type=email], input[type=tel], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 2px solid var(--border); border-radius: 6px; padding: 0.6rem 0.7rem; min-height: 48px;
}
[aria-invalid="true"] { border-color: var(--error) !important; border-width: 3px !important; }
.field-error { color: var(--error); font-weight: 700; margin: 0 0 0.35rem; }
.field-error::before { content: "Error: "; }
.error-summary { border: 3px solid var(--error); padding: 0.5rem 1rem; margin-bottom: 1.25rem; border-radius: 8px; }
.error-summary h2 { font-size: 1.25rem; margin-top: 0.5rem; }

/* footer */
.site-foot { background: var(--surface); border-top: 1px solid var(--border); padding: 2rem 0 1rem; }
.site-foot .wrap { max-width: 72rem; }
.foot-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.foot-brand { font-weight: 700; font-size: 1.3rem; margin-bottom: 0.25rem; }
.foot-h { font-size: 1.1rem; margin: 0 0 0.5rem; }
.plain { list-style: none; padding: 0; }
.plain a { display: inline-block; padding: 0.3rem 0; min-height: 24px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .btn, .card, .access-box, .note { border: 2px solid CanvasText; }
}
@media print {
  .site-head nav, .site-foot, .skip, form { display: none; }
  a::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}
