/* LOCAL Intelligence — warm paper editorial system.
   Light, inviting, one accent used like a highlighter. */

:root {
  --page: #f4f0ea;
  --page-2: #efe8dc;
  --surface: #fbf8f3;
  --surface-2: #ece4d6;
  --ink: #1a1814;
  --muted: #6b645b;
  --muted-2: #8a8278;
  --accent: #2b7a9b;
  --accent-ink: #1e5f7a;
  --accent-soft: rgba(43, 122, 155, 0.12);
  --accent-wash: rgba(43, 122, 155, 0.08);
  --line: rgba(26, 24, 20, 0.1);
  --line-strong: rgba(26, 24, 20, 0.18);
  --sand: #c9b48a;
  --shadow: 0 1px 0 rgba(26, 24, 20, 0.04), 0 12px 40px rgba(26, 24, 20, 0.06);

  --font-sans: "Inter", "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, serif;

  --measure: 40rem;
  --page-w: 1120px;
  --wide: 1240px;
  --gutter: clamp(1.25rem, 4.2vw, 3.25rem);

  --nav-h: 4.1rem;
  --radius: 4px;
  --radius-lg: 12px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --focus: 0 0 0 2px var(--page), 0 0 0 4px var(--accent);
}

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

html {
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  hanging-punctuation: first last;
}

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

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background-color: var(--page);
  background-image:
    radial-gradient(ellipse 80% 50% at 12% -10%, rgba(43, 122, 155, 0.07), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(201, 180, 138, 0.14), transparent 50%);
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--accent-ink);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: 0.75rem;
  z-index: 100;
  background: var(--ink);
  color: var(--page);
  padding: 0.45rem 0.7rem;
  transform: translateY(-150%);
}

.skip:focus {
  transform: none;
  color: var(--page);
}

.kicker {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 0.85rem;
}

.display {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0;
  color: var(--ink);
}

.lede {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.01em;
  max-width: 38rem;
  color: var(--ink);
}

.body {
  max-width: var(--measure);
  color: var(--ink);
}

.body p {
  margin: 0 0 1.1em;
}

.body p:last-child {
  margin-bottom: 0;
}

.body h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.22;
  margin: 2.2rem 0 0.75rem;
}

.body h3 {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  font-weight: 600;
  margin: 1.7rem 0 0.5rem;
}

.muted {
  color: var(--muted);
}

.split-head {
  display: grid;
  gap: 0.4rem;
  margin: 0 0 1.5rem;
}

.split-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4.4vw, 2.85rem);
  letter-spacing: -0.03em;
  line-height: 1.12;
  font-weight: 500;
  margin: 0;
}

.split-head h2 span {
  display: block;
  color: var(--muted);
  font-weight: 400;
}

.section {
  padding: clamp(3.5rem, 9vh, 6.5rem) var(--gutter);
}

.section-inner {
  max-width: var(--page-w);
  margin: 0 auto;
}

hr.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0 var(--gutter);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  padding: 0.65rem 0.95rem;
  min-height: 2.75rem;
  cursor: pointer;
  border-radius: var(--radius);
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}

.link-quiet {
  color: var(--muted);
  text-decoration: none;
}

.link-quiet:hover {
  color: var(--accent-ink);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--page) 88%, white);
  border-bottom: 1px solid var(--line);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--nav-h);
  padding: 0 var(--gutter);
  max-width: calc(var(--wide) + 2 * var(--gutter));
  margin: 0 auto;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-decoration: none;
  min-width: 0;
}

.brand:hover {
  color: var(--ink);
}

.brand__name {
  font-weight: 700;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
}

.brand__status {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  cursor: pointer;
  position: relative;
  border-radius: var(--radius);
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 1rem;
  height: 1.5px;
  background: currentColor;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-toggle span {
  top: 50%;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] span::before {
  top: 0;
  transform: translateX(-50%) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span::after {
  top: 0;
  transform: translateX(-50%) rotate(-45deg);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.05rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
  padding: 0.35rem 0;
}

.site-nav a:hover,
.site-nav a[aria-current="true"],
.site-nav a.is-active {
  color: var(--ink);
}

@media (max-width: 1100px) {
  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--page);
    border-bottom: 1px solid var(--line);
    display: none;
    padding: 0.5rem var(--gutter) 1.25rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav a {
    display: block;
    padding: 0.85rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    min-height: 2.75rem;
  }
}

/* Chips, tables, footnotes, footer */
.status-chip {
  display: inline-block;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  padding: 0.14rem 0.4rem;
  color: var(--muted);
  vertical-align: middle;
  border-radius: 2px;
  background: var(--surface);
}

.status-chip.fact {
  color: var(--ink);
  border-color: var(--ink);
}

.status-chip.interpretation {
  color: #7a6230;
  border-color: rgba(201, 180, 138, 0.7);
  background: rgba(201, 180, 138, 0.18);
}

.status-chip.projection {
  color: var(--accent-ink);
  border-color: var(--accent);
  background: var(--accent-soft);
}

details.method {
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
  max-width: 46rem;
}

details.method summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.92rem;
  list-style: none;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
}

details.method summary::-webkit-details-marker {
  display: none;
}

details.method summary::before {
  content: "+";
  color: var(--accent-ink);
  margin-right: 0.45rem;
  font-weight: 600;
}

details.method[open] summary::before {
  content: "\2013";
}

details.method .method__body {
  padding: 0.9rem 0 0.2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

details.method a {
  color: var(--ink);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-top: 1.5rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.7rem 0.65rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.data-table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.data-table td.num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

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

.footnotes {
  margin-top: 2.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  max-width: 46rem;
}

.footnotes ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.footnotes a {
  color: var(--muted);
}

.footnotes a:hover {
  color: var(--accent-ink);
}

.cite {
  font-size: 0.72em;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  vertical-align: super;
  line-height: 0;
  margin-left: 0.08em;
}

.cite:hover {
  color: var(--accent-ink);
}

.callout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: 1.15rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.callout p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.site-footer {
  padding: 2.5rem var(--gutter) 3.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer__inner {
  max-width: var(--page-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

@media (max-width: 700px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}
