/*
 * Waypointstalls legal site — bold edition.
 *
 * Still zero external requests and zero JavaScript: the table of contents
 * collapses with <details>, so the CSP can stay at `default-src 'none'` with
 * `script-src 'none'`. A privacy page that pulls in a CDN to render itself
 * undercuts its own message.
 */

:root {
  --bg: #f6f4ee;
  --surface: #ffffff;
  --border: #e4dfd2;
  --border-strong: #cec7b4;

  --text: #171f18;
  --text-muted: #4e5b4a;
  --text-faint: #86907f;

  --green-900: #16291a;
  --green-800: #1d3a22;
  --green-700: #27492b;
  --green: #2f5233;
  --green-soft: #e5eee1;

  --clay: #b2552c;
  --clay-deep: #8f4322;
  --clay-soft: #f9e6da;

  --on-dark: #f4f6f1;
  --on-dark-muted: #b9c9b8;

  --r-lg: 1.5rem;
  --r-md: 1rem;
  --r-sm: 0.625rem;
  --measure: 40rem;
  --header-h: 4rem;
  --shell: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f130e;
    --surface: #161c16;
    --border: #283127;
    --border-strong: #3a453a;

    --text: #edeee6;
    --text-muted: #a8b3a4;
    --text-faint: #79836f;

    --green: #93c398;
    --green-soft: #1a2a1c;
    --clay: #d98b5f;
    --clay-soft: #2a1e17;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* =========================================================================
   Header
   ========================================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.brand__mark {
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 0.55rem;
  background: linear-gradient(145deg, var(--green-700), var(--green-900));
  color: var(--on-dark);
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: 0 2px 8px rgba(22, 41, 26, 0.28);
}

.brand__mark svg { display: block; }

.site-nav { display: flex; gap: 0.25rem; font-size: 0.925rem; font-weight: 500; }

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
}

.site-nav a:hover { color: var(--text); background: var(--green-soft); }

.site-nav a[aria-current="page"] {
  color: var(--on-dark);
  background: var(--green);
  font-weight: 650;
}

@media (prefers-color-scheme: dark) {
  .site-nav a[aria-current="page"] { color: var(--green-900); }
}

@media (max-width: 30rem) {
  .brand__name { display: none; }
  .site-header__inner { gap: 0.75rem; padding: 0 1rem; }
  .site-nav a { padding: 0.4rem 0.6rem; }
}

/* =========================================================================
   Hero — full-bleed dark panel, same in both themes
   ========================================================================= */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, var(--green-700) 0%, var(--green-900) 70%);
  color: var(--on-dark);
  isolation: isolate;
}

/* Route motif echoing the app icon — decorative only, hidden from AT. */
.hero__art {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
}

.hero__art svg { width: 100%; height: 100%; display: block; }

.hero__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 4.5rem 1.5rem 4rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-dark);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

h1 {
  font-size: clamp(2.75rem, 9vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 800;
  margin: 0 0 1.25rem;
  max-width: 14ch;
}

.hero__lede {
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  line-height: 1.55;
  color: var(--on-dark-muted);
  max-width: 34rem;
  margin: 0 0 2.25rem;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.875rem;
  color: var(--on-dark-muted);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.hero__meta a { color: var(--on-dark); }

/* =========================================================================
   At-a-glance — solid colour blocks
   ========================================================================= */

.glance {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 1.5rem;
  /* Pull the cards up so they straddle the hero edge — the overlap is what
     makes the section read as one composition rather than two stacked bands. */
  transform: translateY(-2.5rem);
}

.glance__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 44rem) { .glance__grid { grid-template-columns: 1fr 1fr; } }

.card {
  border-radius: var(--r-lg);
  padding: 1.75rem;
  color: var(--on-dark);
  /* The cards straddle the hero's bottom edge, so the top half of each sits on
     dark green. A hairline ring plus a deep shadow keeps them reading as
     separate objects instead of dissolving into the hero. */
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 40px -16px rgba(10, 20, 12, 0.65);
}

/* Deliberately lighter than the hero gradient behind it — same hue family,
   enough lift to separate. */
.card--yes { background: linear-gradient(150deg, #3c6b41, #2b4d30); }
.card--no  { background: linear-gradient(150deg, var(--clay), var(--clay-deep)); }

.card__title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.0625rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: var(--on-dark);
}

.card__title svg { flex: none; }

.card ul { margin: 0; padding: 0; list-style: none; font-size: 0.975rem; }

.card li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.6rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}

.card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
}

.card li:last-child { margin-bottom: 0; }

/* =========================================================================
   Layout
   ========================================================================= */

.layout {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 1rem 1.5rem 5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 64rem) {
  .layout { grid-template-columns: 14rem minmax(0, 1fr); gap: 4rem; }
}

/* --- contents --- */

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.25rem 1.15rem;
}

.toc__summary {
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0.95rem 0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toc__summary::-webkit-details-marker { display: none; }

.toc__summary::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.toc[open] .toc__summary::after { transform: rotate(-135deg); }

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0 0 0.9rem;
  counter-reset: toc;
  font-size: 0.9rem;
}

.toc li { counter-increment: toc; }

.toc a {
  display: flex;
  gap: 0.6rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0;
  line-height: 1.4;
  border-radius: var(--r-sm);
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  font-weight: 700;
  flex: none;
  padding-top: 0.1em;
}

.toc a:hover { color: var(--green); }

@media (min-width: 64rem) {
  .toc {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    background: transparent;
    border: 0;
    border-left: 2px solid var(--border);
    border-radius: 0;
    padding: 0 0 0 1.15rem;
  }
  .toc__summary { cursor: default; padding-top: 0; }
  .toc__summary::after { display: none; }
}

/* --- article --- */

article { max-width: var(--measure); }

article > section {
  scroll-margin-top: calc(var(--header-h) + 1.25rem);
  padding-top: 2.5rem;
}

article > section:first-child { padding-top: 1rem; }

h2 {
  position: relative;
  font-size: clamp(1.6rem, 3.6vw, 2.1rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 780;
  margin: 0 0 1.15rem;
}

/* Oversized ghost numeral as the section marker. */
h2 .h2__num {
  display: block;
  font-size: clamp(2.75rem, 7vw, 3.75rem);
  line-height: 0.8;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--green);
  opacity: 0.16;
  margin-bottom: 0.15rem;
}

h3 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 2rem 0 0.5rem;
}

p { margin: 0 0 1.2rem; }

article ul, article ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
article li { margin-bottom: 0.65rem; }
article li::marker { color: var(--green); }

a { color: var(--green); text-underline-offset: 0.16em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-thickness: 0.14em; }

strong { font-weight: 700; color: var(--text); }
em { font-style: italic; }

/* --- processors --- */

.processors { list-style: none; padding: 0; margin: 0 0 1.2rem; }

.processors li {
  padding: 1rem 1.1rem;
  margin: 0 0 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--r-sm);
}

.processors dfn {
  display: block;
  font-style: normal;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.015em;
  margin-bottom: 0.15rem;
}

.processors span {
  display: block;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* --- callout --- */

.callout {
  background: linear-gradient(150deg, var(--green-700), var(--green-900));
  color: var(--on-dark);
  border-radius: var(--r-md);
  padding: 1.5rem 1.6rem;
  margin: 1.75rem 0;
  font-size: 1rem;
  box-shadow: 0 12px 30px -14px rgba(20, 34, 22, 0.5);
}

.callout > :last-child { margin-bottom: 0; }

.callout a { color: var(--on-dark); text-decoration-color: rgba(255,255,255,0.5); }

.callout strong { color: var(--on-dark); }

.callout__label {
  display: block;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0.6rem;
}

/* =========================================================================
   Footer
   ========================================================================= */

.site-footer {
  background: var(--green-900);
  color: var(--on-dark-muted);
  font-size: 0.9rem;
}

.site-footer__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}

.site-footer nav { display: flex; gap: 1.5rem; }
.site-footer a { color: var(--on-dark); text-decoration: none; font-weight: 500; }
.site-footer a:hover { text-decoration: underline; }

/* =========================================================================
   Focus
   ========================================================================= */

a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 3px;
}

.hero a:focus-visible, .site-footer a:focus-visible { outline-color: var(--on-dark); }
