:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: rgba(255, 255, 255, .94);
  --surface-solid: #fff;
  --text: #101318;
  --muted: #4b5563;
  --border: #c9d0d9;
  --accent: #0759c7;
  --accent-contrast: #fff;
  --danger: #a31122;
  --success: #116329;
  --focus: #004fb6;
  --shadow: 0 18px 50px rgba(15, 23, 42, .10);
  --radius: 1.25rem;
  --content: 76rem;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  font-size: clamp(1rem, .96rem + .18vw, 1.125rem);
  line-height: 1.65;
  overflow-wrap: anywhere;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .15em; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: .2rem solid var(--focus); outline-offset: .2rem; }

.skip-link {
  position: fixed;
  z-index: 1000;
  inset: .75rem auto auto .75rem;
  padding: .75rem 1rem;
  border-radius: .75rem;
  background: var(--text);
  color: var(--surface-solid);
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }

.preview-banner {
  padding: .75rem max(1rem, calc((100vw - var(--content)) / 2));
  background: #fff3c4;
  color: #352600;
  border-bottom: 1px solid #cfaa23;
  font-weight: 700;
}

.site-header, .site-footer, main {
  width: min(calc(100% - 2rem), var(--content));
  margin-inline: auto;
}
.site-header {
  position: sticky;
  z-index: 20;
  top: .75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-block: .75rem 0;
  padding: .75rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.brand { min-height: 2.75rem; display: inline-flex; align-items: center; padding-inline: .5rem; color: var(--text); font-weight: 800; text-decoration: none; }
.site-header nav { overflow-x: auto; scrollbar-width: thin; }
.nav-list { display: flex; gap: .25rem; margin: 0; padding: 0; list-style: none; white-space: nowrap; }
.nav-list a { min-height: 2.75rem; display: inline-flex; align-items: center; padding: .55rem .8rem; border-radius: .65rem; color: var(--text); text-decoration: none; }
.nav-list a[aria-current="page"] { background: var(--text); color: var(--surface-solid); }
.nav-desktop-only { display: none; }
.nav-mobile-only { display: list-item; }

main { min-height: 65vh; padding-block: clamp(3rem, 8vw, 8rem); }
.hero, .page-header { max-width: 58rem; margin-bottom: clamp(2rem, 5vw, 4rem); }
.hero { min-height: min(65vh, 42rem); display: grid; align-content: center; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.035em; text-wrap: balance; }
h1 { margin: .3rem 0 1rem; font-size: clamp(2.6rem, 8vw, 7rem); }
h2 { font-size: clamp(1.75rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.65rem); }
p { max-width: 72ch; }
.lead { color: var(--muted); font-size: clamp(1.15rem, 2vw, 1.55rem); }
.eyebrow, .meta { color: var(--muted); font-size: .88rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.content-section, .article-section { margin-block: clamp(2.5rem, 7vw, 6rem); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1rem; }
.card {
  min-width: 0;
  padding: clamp(1.15rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-solid);
  box-shadow: 0 10px 32px rgba(15, 23, 42, .06);
}
.card h2, .card h3 { margin-block: .35rem .75rem; }
.card-image, .article-cover { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: calc(var(--radius) - .35rem); }
.article { max-width: 64rem; }
.rich-text { font-size: clamp(1rem, .98rem + .14vw, 1.12rem); }
.rich-text pre, .rich-text table { max-width: 100%; overflow: auto; }
.rich-text pre { padding: 1rem; border-radius: .75rem; background: #111827; color: #fff; }
.rich-text table { display: block; border-collapse: collapse; }
.rich-text th, .rich-text td { padding: .65rem; border: 1px solid var(--border); }

.button {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1rem;
  border: 1px solid var(--accent);
  border-radius: .75rem;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { filter: brightness(.9); }
.button:disabled { opacity: .58; cursor: wait; }
.text-link { min-height: 2.75rem; display: inline-flex; align-items: center; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-block: 1.5rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-solid); }
.facts div { min-width: 0; }
.facts dt { color: var(--muted); font-size: .85rem; font-weight: 800; text-transform: uppercase; }
.facts dd { margin: .3rem 0 0; }
.timeline { display: grid; gap: 1rem; }
.timeline article { padding-left: 1rem; border-left: .25rem solid var(--accent); }
.tag-list { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; list-style: none; }
.tag-list li { padding: .35rem .7rem; border: 1px solid var(--border); border-radius: 999px; }

.contact-form { display: grid; grid-template-columns: 1fr; gap: 1rem; max-width: 54rem; }
.field { min-width: 0; }
.field label { display: block; margin-bottom: .35rem; font-weight: 750; }
.field input:not([type="checkbox"]), .field select, .field textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: .75rem;
  border: 1px solid #7b8794;
  border-radius: .65rem;
  background: var(--surface-solid);
  color: var(--text);
}
.field textarea { resize: vertical; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 .12rem var(--danger); }
.checkbox { display: grid; grid-template-columns: 2.75rem 1fr; align-items: start; }
.checkbox input { width: 2.75rem; height: 2.75rem; margin: 0; accent-color: var(--accent); }
.checkbox label { padding-top: .45rem; }
.field-error { color: var(--danger); font-weight: 700; }
.form-status[data-state="success"], .notice-success { color: var(--success); }
.form-status[data-state="error"], .notice-error { color: var(--danger); }
.notice { margin-bottom: 1.5rem; padding: 1rem; border: 1px solid currentColor; border-radius: .75rem; background: var(--surface-solid); }
.honeypot { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }

.site-footer { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 2rem; padding-block: 2.5rem 4rem; border-top: 1px solid var(--border); }
.site-footer ul { margin: .5rem 0 0; padding: 0; list-style: none; }
.site-footer a { min-height: 2.75rem; display: inline-flex; align-items: center; }

@media (min-width: 44rem) {
  .contact-form { grid-template-columns: 1fr 1fr; }
  .field-wide { grid-column: 1 / -1; }
  .nav-desktop-only { display: list-item; }
  .nav-mobile-only { display: none; }
}

@media (max-width: 48rem) {
  .site-header { position: static; display: block; }
  .brand { width: 100%; }
  .site-header nav { margin-top: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: var(--surface-solid); }
}
