/* ============================================================================
   DocuTrack — "Paper & Coral" theme (2026 revamp)
   ----------------------------------------------------------------------------
   A single, last-loaded layer that re-skins the product in the visual language of
   openclaw.ai: near-black ink on warm paper, one coral accent, one sea-green
   secondary, self-hosted Switzer/Sentient, mono micro-labels, hairline borders,
   hard corners and a header that shares the page surface with the content.

   HOW THIS FILE WORKS
   - It OVERRIDES the tokens in design-system.css, so every page that already uses
     var(--bg), var(--surface), var(--text), var(--border), var(--accent) …
     re-themes without touching its own stylesheet.
   - It is loaded LAST in base.html (after {% block css %}), so the page-level
     stylesheets (home.css, reportnationalid.css, dashboard.css, maps.css, …) are
     already parsed and can be corrected here without editing twenty files.
   - Dark mode is an attribute on <html>: data-theme="light" | "dark". The value
     is set before first paint by the inline bootstrap in base.html and toggled
     by static/js/theme.js.
   - NO BORDER RADIUS is a product rule: the universal rule below is deliberate.
     If you add a new rounded element, this layer is where you remove it.

   Keep the token names stable — the rest of the codebase depends on them.
   ============================================================================ */

/* ---- Self-hosted typefaces ------------------------------------------------ */
/* Switzer (display/body) and Sentient (italic accents), both from Fontshare and
   served from /static/fonts/ so the site makes no third-party font request. */
@font-face {
  font-family: "Switzer";
  src: url("../fonts/switzer-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("../fonts/switzer-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("../fonts/switzer-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("../fonts/switzer-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sentient";
  src: url("../fonts/sentient-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---- Tokens: light ------------------------------------------------------- */
:root {
  color-scheme: light;

  /* Ink (used for headings, primary buttons, high-contrast surfaces) */
  --primary: #17171a;
  --primary-dark: #000000;
  --primary-light: #e2dfd9;
  --primary-50: #eeebe6;
  --primary-10: rgba(23, 23, 26, 0.08);
  --ink: #17171a;

  /* Coral accent + sea-green secondary */
  --accent: #c24028;
  --accent-dark: #9c3222;
  --accent-light: #f7e7e3;
  --accent-20: rgba(194, 64, 40, 0.12);
  --sea: #0f6355;
  --sea-bright: #14806e;

  /* Paper surfaces */
  --bg: #f6f5f3;
  --bg-recessed: #eeebe6;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-alt: #efedea;
  --surface-hover: #f0eeea;

  /* Hairlines */
  --border: #dcd8d1;
  --border-light: #e8e5e0;
  --border-strong: #b7b1a8;

  /* Text */
  --text: #17171a;
  --text-secondary: #45454d;
  --text-muted: #6e6e77;
  --text-inverse: #ffffff;
  --text-on-accent: #ffffff;

  /* Semantic */
  --success: #0e5e50;
  --success-bg: #e3f0ec;
  --error: #a23422;
  --error-bg: #fbe9e5;
  --warning: #7a5310;
  --warning-bg: #f8f0df;
  --info: #205a82;
  --info-bg: #e7eff5;

  /* Elevation — flat by default; only overlays may cast a shadow */
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: 0 18px 40px -24px rgba(23, 23, 26, 0.35);
  --shadow-xl: 0 28px 60px -30px rgba(23, 23, 26, 0.45);

  /* Type */
  --font-display: "Switzer", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: var(--font-display);
  --font-body: var(--font-display);
  --font-ui: var(--font-display);
  --font-serif: "Sentient", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Space */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Shape — intentionally none */
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --radius-xl: 0;
  --radius-full: 0;

  /* Motion */
  --transition: 180ms cubic-bezier(0.23, 1, 0.32, 1);
  --transition-slow: 320ms cubic-bezier(0.23, 1, 0.32, 1);

  /* Chrome */
  --header-height: 64px;
  --selection-bg: rgba(194, 64, 40, 0.18);
  --focus-ring: rgba(194, 64, 40, 0.55);
}

/* ---- Tokens: dark -------------------------------------------------------- */
[data-theme="dark"] {
  color-scheme: dark;

  --primary: #ededed;
  --primary-dark: #ffffff;
  --primary-light: #3a3a40;
  --primary-50: #202024;
  --primary-10: rgba(237, 237, 237, 0.08);
  --ink: #ededed;

  --accent: #f5654a;
  --accent-dark: #ff7a5e;
  --accent-light: #2a1a17;
  --accent-20: rgba(245, 101, 74, 0.16);
  --sea: #4fc8ae;
  --sea-bright: #6fd8c2;

  --bg: #101012;
  --bg-recessed: #0b0b0c;
  --bg-elevated: #202024;
  --surface: #19191c;
  --surface-alt: #202024;
  --surface-hover: #232328;

  --border: #2e2e34;
  --border-light: #26262b;
  --border-strong: #4a4a52;

  --text: #ededed;
  --text-secondary: #bcbcc4;
  --text-muted: #9a9aa2;
  --text-inverse: #101012;
  --text-on-accent: #101012;

  --success: #4fc8ae;
  --success-bg: #122b27;
  --error: #f58a78;
  --error-bg: #2c1815;
  --warning: #e0a54a;
  --warning-bg: #2a2214;
  --info: #7ab6de;
  --info-bg: #14232d;

  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: 0 20px 44px -24px rgba(0, 0, 0, 0.9);
  --shadow-xl: 0 32px 70px -32px rgba(0, 0, 0, 0.95);

  --selection-bg: rgba(245, 101, 74, 0.24);
  --focus-ring: rgba(245, 101, 74, 0.6);
}

/* ---- Hard corners: the product rule ------------------------------------- */
*,
*::before,
*::after {
  border-radius: 0 !important;
}

/* ---- Base ---------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
  background: var(--bg);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  letter-spacing: -0.006em;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* design-system.css paints every SVG with `fill: currentColor`, which turns
   outline icons (markup `fill="none"`) into solid blobs. Let the explicit
   attribute win for those; filled brand marks keep their currentColor. */
svg[fill="none"] { fill: none; }

::selection {
  background: var(--selection-bg);
  color: var(--text);
}

/* Square, minimal scrollbars */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--text);
  text-wrap: balance;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.55rem); }
h4 { font-size: 1rem; letter-spacing: -0.01em; }

p { margin-bottom: var(--space-md); }

a {
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition), border-color var(--transition),
    background-color var(--transition), opacity var(--transition);
}
a:hover { color: var(--accent); }

p a,
.check-result__body a,
.privacy-card__text a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
p a:hover { color: var(--accent-dark); }

strong { font-weight: 600; }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--space-xl) 0;
}

::placeholder { color: var(--text-muted); opacity: 1; }

/* Focus: visible, square, never on mouse click */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Small mono kicker used above headings */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  background: currentColor;
  flex: 0 0 auto;
}
.eyebrow--muted { color: var(--text-muted); }

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-lg);
  z-index: 999;
  padding: 0.75rem 1rem;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.skip-link:focus {
  top: 12px;
  color: var(--bg);
}

/* ---- Layout / continuous chrome ----------------------------------------- */
.content-wrapper {
  background: var(--bg);
}

main {
  flex: 1 0 auto;
  padding: 0 0 clamp(3rem, 6vw, 5rem);
}

/* The header and the page share one surface and one hairline — no floating bar,
   no shadow, no second background. Content starts in the same plane. */
main > .container {
  padding-top: clamp(1.5rem, 3.5vw, 3rem);
}

.container {
  max-width: 1200px;
  padding-left: clamp(1.15rem, 3vw, 1.75rem);
  padding-right: clamp(1.15rem, 3vw, 1.75rem);
}

.container--narrow { max-width: 640px; }
.container--medium { max-width: 860px; }

@media (max-width: 480px) {
  .container { padding-left: 1rem; padding-right: 1rem; }
}

/* ---- Header ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  min-height: var(--header-height);
  width: 100%;
}

.site-logo,
.nav-links,
.site-header__actions {
  grid-row: 1;
}

.site-logo {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  color: var(--text);
  white-space: nowrap;
}
.site-logo__mark,
.site-footer__mark {
  display: block;
  width: 28px;
  height: 28px;
  margin-right: 0.65rem;
  flex: 0 0 auto;
}
.brand-wordmark {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.18em;
  white-space: nowrap;
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-size: clamp(1.05rem, 1.35vw, 1.22rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
  color: inherit;
}
.brand-wordmark__country {
  display: inline-block;
  margin-top: 0.12em;
  font-family: var(--font-mono);
  font-size: 0.48em;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  color: var(--accent);
}
.site-logo:hover { color: var(--text); }

/* The compact brand lockup cycles through the same hand-drawn glyphs as Pricing.
   Each sheet slides into the coral tile; the pin lands only after it settles. */
.site-logo__mark[data-brand-mark] {
  position: relative;
  display: block;
  width: 38px;
  height: 38px;
  margin-right: 0.65rem;
  flex: 0 0 38px;
  overflow: visible;
  isolation: isolate;
  background: #c24028;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.brand-mark__sheet {
  position: absolute;
  z-index: 1;
  top: 5px;
  left: 4px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  opacity: 0;
  transform: translate3d(6px, -2px, 0) rotate(9deg) scale(0.78);
  transform-origin: center;
  transition: opacity 0.2s ease, transform 0.42s cubic-bezier(0.2, 0.82, 0.24, 1);
  backface-visibility: hidden;
}
.brand-mark__sheet .doc-icon {
  width: 100%;
  height: 100%;
  color: #f6f5f3;
  stroke: currentColor;
  stroke-width: 1.7;
}
.brand-mark__sheet.is-active {
  opacity: 1;
  transform: translate3d(0, 0, 0) rotate(0) scale(1);
}
.brand-mark__sheet.is-leaving {
  opacity: 0;
  transform: translate3d(-6px, 3px, 0) rotate(-8deg) scale(0.84);
  transition-duration: 0.28s;
}
.brand-mark__pin {
  position: absolute;
  z-index: 3;
  right: -4px;
  bottom: -5px;
  display: block;
  width: 23px;
  height: 29px;
  transform-origin: 50% 88%;
  filter: drop-shadow(0 1.5px 1px rgba(23, 23, 26, 0.28));
  pointer-events: none;
}
.brand-mark__pin svg { display: block; width: 100%; height: 100%; }
.brand-mark__pin.is-landing {
  animation: brand-pin-land 0.54s cubic-bezier(0.2, 1.35, 0.35, 1) both;
}
.brand-mark__ripple {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: -11px;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(246, 245, 243, 0.82);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.3);
  pointer-events: none;
}
.brand-mark__ripple.is-pinging {
  animation: brand-pin-ripple 0.44s ease-out both;
}
@keyframes brand-pin-land {
  0% { opacity: 0; transform: translate3d(0, -9px, 0) scale(0.62) rotate(-11deg); }
  52% { opacity: 1; transform: translate3d(0, 1px, 0) scale(1.2) rotate(4deg); }
  74% { transform: translate3d(0, -1px, 0) scale(0.94) rotate(-1deg); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1) rotate(0); }
}
@keyframes brand-pin-ripple {
  0% { opacity: 0.7; transform: scale(0.3); }
  100% { opacity: 0; transform: scale(1.8); }
}
@media (max-width: 480px) {
  .site-logo__mark[data-brand-mark] { width: 34px; height: 34px; flex-basis: 34px; }
  .brand-mark__sheet { top: 4px; left: 3px; width: 23px; height: 23px; }
  .brand-mark__pin { right: -4px; bottom: -4px; width: 21px; height: 27px; }
  .brand-mark__ripple { right: -1px; bottom: -10px; }
}

.site-header__actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-links {
  grid-column: 2;
  justify-self: end;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav-links > a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.45rem 0.72rem;
  font-family: var(--font-body);
  font-size: 0.83rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.nav-links > a:hover {
  color: var(--text);
  background: var(--surface-alt);
  border-color: var(--border-light);
}
.nav-links > a.is-active {
  color: var(--text);
}
.nav-links > a.is-active::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-right: 0.4rem;
  background: var(--accent);
}
.nav-links > a.btn {
  margin-left: 0.35rem;
  color: var(--text-inverse);
}
.nav-links > a.btn:hover {
  color: var(--text-inverse);
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* Theme toggle (sun/moon morph, adapted from openclaw.ai) */
.theme-toggle {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: color var(--transition), background-color var(--transition),
    border-color var(--transition);
}
.theme-toggle:hover {
  color: var(--text);
  background: var(--surface-alt);
  border-color: var(--border-strong);
}
.theme-toggle svg {
  width: 19px;
  height: 19px;
  overflow: visible;
}
.tt-core {
  fill: currentColor;
  r: 9px;
  transition: r 260ms cubic-bezier(0.23, 1, 0.32, 1);
}
.tt-hole {
  cx: 17px;
  cy: 7px;
  transition: cx 300ms, cy 300ms;
}
.tt-rays {
  opacity: 0;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.6;
  transform-origin: 50% 50%;
  transform: rotate(-40deg) scale(0.6);
  transition: opacity 220ms, transform 320ms cubic-bezier(0.23, 1, 0.32, 1);
}
[data-theme="dark"] .tt-core { r: 4.4px; }
[data-theme="dark"] .tt-hole { cx: 32px; cy: -8px; }
[data-theme="dark"] .tt-rays {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Avatar trigger */
.user-avatar-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0.55rem 0.2rem 0.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  position: relative;
  transition: border-color var(--transition), background-color var(--transition);
}
.user-avatar-trigger:hover,
.user-avatar-trigger.is-open {
  background: var(--surface-alt);
  border-color: var(--border-strong);
}
.user-avatar-trigger .avatar-img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: none;
  flex-shrink: 0;
}
.greeting {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-body);
}
.greeting__name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  max-width: 15ch;
  overflow: hidden;
  text-overflow: ellipsis;
}
.greeting__chevron {
  width: 13px;
  height: 13px;
  color: var(--text-muted);
  transition: transform var(--transition);
}
.user-avatar-trigger.is-open .greeting__chevron { transform: rotate(180deg); }

.badge-dot {
  position: absolute;
  top: 0;
  right: auto;
  left: 26px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border: 2px solid var(--surface);
  z-index: 2;
}
.badge-menu {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: auto;
  background: var(--accent);
}

/* Dropdown */
.user-menu {
  top: calc(100% + 10px);
  right: 0;
  min-width: 248px;
  padding: 0.35rem 0;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.user-menu.show { animation: dtMenuIn 160ms cubic-bezier(0.23, 1, 0.32, 1); }
@keyframes dtMenuIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.user-menu__header { padding: 0.8rem 1rem 0.55rem; gap: 3px; }
.user-menu__name {
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
}
.user-menu__email {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}
.user-menu__divider {
  height: 1px;
  margin: 0.35rem 0.75rem;
  background: var(--border);
}
.user-menu__link,
.user-menu a {
  padding: 0.55rem 1rem;
  gap: 0.65rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.user-menu__link svg,
.user-menu a svg {
  width: 15px;
  height: 15px;
  color: var(--text-muted);
}
.user-menu__link:hover,
.user-menu a:hover {
  background: var(--surface-alt);
  color: var(--text);
}
.user-menu__link:hover svg,
.user-menu a:hover svg { color: var(--accent); }
.user-menu__link--danger,
.user-menu__link--danger:hover { color: var(--error); }
.user-menu__link--danger svg { color: var(--error); }
.user-menu__link--danger:hover { background: var(--error-bg); }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
}
.nav-toggle:hover { background: var(--surface-alt); border-color: var(--border-strong); }
.nav-toggle svg { width: 19px; height: 19px; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.75rem 1.3rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.2;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: color var(--transition), background-color var(--transition),
    border-color var(--transition);
  white-space: nowrap;
}
.btn:active { transform: none; }

.btn--primary {
  color: var(--text-inverse);
  background: var(--primary);
  border-color: var(--primary);
}
.btn--primary:hover {
  color: var(--text-on-accent);
  background: var(--accent);
  border-color: var(--accent);
}

.btn--accent {
  color: var(--text-on-accent);
  background: var(--accent);
  border-color: var(--accent);
}
.btn--accent:hover {
  color: var(--text-on-accent);
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn--outline {
  color: var(--text);
  background: transparent;
  border-color: var(--border-strong);
}
.btn--outline:hover {
  color: var(--bg);
  background: var(--text);
  border-color: var(--text);
}

.btn--ghost {
  color: var(--text-secondary);
  background: transparent;
  border-color: transparent;
}
.btn--ghost:hover {
  color: var(--text);
  background: var(--surface-alt);
  border-color: var(--border);
}

.btn--danger {
  color: var(--text-on-accent);
  background: var(--error);
  border-color: var(--error);
}

.btn--sm {
  min-height: 36px;
  padding: 0.5rem 0.9rem;
  font-size: 0.7rem;
}
.btn--block { width: 100%; }

.btn svg { width: 15px; height: 15px; }

/* ---- Cards -------------------------------------------------------------- */
.card {
  /* Named so a full-bleed child can cancel exactly this padding at every width: the map
     on the drop-off pages uses it to meet the card's edge on a phone. */
  --card-pad: clamp(1.5rem, 4vw, 2.25rem);
  padding: var(--card-pad);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: none;
}
.card--tight { --card-pad: var(--space-lg); padding: var(--card-pad); }
.card--elevated { box-shadow: none; }
.card--bordered-accent { border-top: 2px solid var(--accent); }
.card--bordered-primary { border-top: 2px solid var(--text); }

/* Forms and auth cards get room to breathe and align to the same measure. */
main .card.max-w-sm { max-width: 600px; }
main .card.max-w-md { max-width: 640px; }

.card > h2:first-child,
.card > h3:first-child {
  letter-spacing: -0.04em;
}

/* ---- Forms -------------------------------------------------------------- */
.form-group { margin-bottom: 1.25rem; }

.form-label,
.form-field label {
  display: block;
  margin-bottom: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-input,
.form-select,
.form-textarea,
.form-field input:not([type="radio"]):not([type="checkbox"]),
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  outline: none;
  transition: border-color var(--transition), background-color var(--transition),
    box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover,
.form-field input:not([type="radio"]):not([type="checkbox"]):hover,
.form-field select:hover,
.form-field textarea:hover {
  border-color: var(--border-strong);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.form-field input:not([type="radio"]):not([type="checkbox"]):focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  background: var(--surface);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236E6E77' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
  padding-right: 2.5rem;
}
[data-theme="dark"] .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%239A9AA2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

select option {
  color: var(--text);
  background: var(--surface);
}

.form-input::placeholder,
.form-field input:not([type="radio"]):not([type="checkbox"])::placeholder,
.form-field textarea::placeholder {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.form-textarea { min-height: 116px; resize: vertical; }

.form-hint {
  margin-top: 0.4rem;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--text-muted);
}
.form-error {
  margin-top: 0.4rem;
  font-size: 0.76rem;
  color: var(--error);
}

.form-field { margin-bottom: 1.25rem; }

.phone-field__prefix {
  left: 0.95rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.phone-field input,
.form-field .phone-field input { padding-left: 3.65rem; }

/* The generic `.form-field input` rule carries three specificity points and was
   overriding the padding above, so the placeholder started underneath the
   fixed +254 chip. Match that specificity here, after it in source order, and
   clear the padding again for the check form's email-mode field. */
.form-field .phone-field input:not([type="radio"]):not([type="checkbox"]) {
  padding-left: 3.65rem;
}
.form-field .phone-field.is-email input:not([type="radio"]):not([type="checkbox"]) {
  padding-left: 0.95rem;
}

.checkbox-group input[type="checkbox"] { accent-color: var(--accent); }
.checkbox-group label { font-family: var(--font-body); }

/* Radios and checkboxes are controls, not text fields: keep the native size
   even when they sit inside .form-field (the drop-off picker and Leaflet's
   layer switcher both do). */
.form-field input[type="radio"],
.form-field input[type="checkbox"] {
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--accent);
  -webkit-appearance: auto;
  appearance: auto;
}
.form-field .place-choice__opt input[type="radio"] { flex: 0 0 auto; }
.form-field .place-choice__opt {
  display: flex;
  align-items: center;
  margin-bottom: 0;
  gap: 0.55rem;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.form-field .place-choice__opt span { line-height: 1.35; }

/* Leaflet's layer switcher labels sit inside .form-field on the drop-off page,
   so reset the form-label typography there. */
.leaflet-control-layers {
  padding: 0.45rem 0.6rem;
  background: var(--surface) !important;
  color: var(--text);
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
}
.leaflet-control-layers label {
  display: block;
  margin: 0.15rem 0;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}
.leaflet-control-layers-selector { margin-right: 0.35rem; }

/* The map is the input: the coordinate fields are filled by map-picker.js and
   must not render as two unexplained empty boxes under the map. */
.form-field input[name="latitude"],
.form-field input[name="longitude"] { display: none; }

/* Review slider — the star is the handle, so hide the native thumb but keep
   the input's hit area and keyboard focus intact. The base .slider-container
   sets overflow:hidden (it is also the home carousel), which used to clip the
   star; the review variant opts back out. */
.rating-container .slider-container {
  overflow: visible;
  margin-top: 2.5rem;
}
input[type="range"] {
  height: 6px;
  background: var(--border);
  border: 0;
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: transparent;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  background: transparent;
  border: 0;
  cursor: grab;
}
input[type="range"]::-moz-range-track {
  height: 6px;
  background: transparent;
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: transparent;
  border: 0;
  cursor: grab;
}
input[type="range"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 8px;
}
.star-thumb svg {
  fill: var(--accent);
  stroke: var(--accent-dark);
}

/* Kill the browser's white autofill slab in dark mode */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--surface) inset;
  caret-color: var(--text);
  transition: background-color 5000s ease-in-out 0s;
}

/* OTP boxes stay proportional, now as hard tiles */
.otp-input {
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
}
.otp-input.filled { border-color: var(--border-strong); background: var(--surface-alt); }
.otp-input:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--accent);
  transform: none;
}
.otp-container--error .otp-input { border-color: var(--error); background: var(--error-bg); }
.otp-resend-progress { background: var(--border); }
.otp-resend-progress__bar { background: var(--accent); }

/* ---- Alerts / toasts / status ------------------------------------------ */
.message-toast {
  padding: 0.9rem 2.5rem 0.9rem 1rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-left: 3px solid var(--info);
  box-shadow: var(--shadow-lg);
  font-size: 0.86rem;
}
.message-toast--success { background: var(--surface); color: var(--text); border-left-color: var(--success); }
.message-toast--error { background: var(--surface); color: var(--text); border-left-color: var(--error); }
.message-toast--warning { background: var(--surface); color: var(--text); border-left-color: var(--warning); }
.message-toast--info { background: var(--surface); color: var(--text); border-left-color: var(--info); }
.message-toast__close:hover { background: var(--surface-alt); }

.alert-inline {
  padding: 0.9rem 1rem;
  background: var(--surface-alt);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--info);
  font-size: 0.86rem;
}
.alert-inline--info { color: var(--text-secondary); border-left-color: var(--info); }
.alert-inline--success { border-left-color: var(--success); }
.alert-inline--error { border-left-color: var(--error); }

.badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.badge--pending { color: var(--warning); background: var(--warning-bg); border-color: color-mix(in srgb, var(--warning) 30%, transparent); }
.badge--claimed { color: var(--info); background: var(--info-bg); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.badge--completed { color: var(--success); background: var(--success-bg); border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.badge--danger { color: var(--error); background: var(--error-bg); border-color: color-mix(in srgb, var(--error) 30%, transparent); }

.status-badge--online { color: var(--success); background: var(--success-bg); border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.status-badge--offline { color: var(--error); background: var(--error-bg); border-color: color-mix(in srgb, var(--error) 30%, transparent); }
.status-dot { display: inline-block; }

/* ---- Tables ------------------------------------------------------------- */
.progress-table {
  font-size: 0.84rem;
  border: 1px solid var(--border);
}
.progress-table th {
  padding: 0.7rem 0.85rem;
  background: var(--surface-alt);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.progress-table td {
  padding: 0.7rem 0.85rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
}
.progress-table tr:last-child td { border-bottom: 0; }
.progress-table tbody tr:hover { background: var(--surface-alt); }

/* ---- Footer ------------------------------------------------------------- */
.site-footer {
  padding: clamp(2.5rem, 5vw, 4rem) 0 var(--space-lg);
  background: #101012;
  color: #a6a6ae;
  border-top: 1px solid #26262b;
}
.site-footer::after { display: none; }
[data-theme="dark"] .site-footer {
  background: #0b0b0c;
  border-top-color: #2e2e34;
}

.site-footer__top {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-bottom: var(--space-xl);
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid #26262b;
}
@media (min-width: 640px) {
  .site-footer__top {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-lg);
  }
}
.site-footer__logo {
  display: inline-flex;
  align-items: center;
  color: #ededed;
}
.site-footer__logo .brand-wordmark__country { color: #f5654a; }
.site-footer__logo:hover { color: #ffffff; }
.site-footer__tagline {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: #70707a;
}

.site-footer__grid { gap: var(--space-xl); margin-bottom: var(--space-xl); }
.site-footer__col h4 {
  margin-bottom: var(--space-md);
  padding-bottom: 0;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f5654a;
}
.site-footer__col h4::after { display: none; }
.site-footer__col a {
  padding: 0.28rem 0;
  font-family: var(--font-body);
  font-size: 0.84rem;
  color: #a6a6ae;
}
.site-footer__col a:hover { color: #ffffff; }

.site-footer__social > a {
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid #2e2e34;
}
.site-footer__social > a:hover {
  background: #1a1a1d;
  border-color: #f5654a;
  transform: none;
  box-shadow: none;
}
.site-footer__social svg { color: #a6a6ae; }
.site-footer__social > a:hover svg { color: #f5654a; }

.site-footer__email { color: #a6a6ae; font-family: var(--font-mono); font-size: 0.74rem; }
.site-footer__email:hover { color: #ffffff; }

.site-footer__copyright {
  padding-top: var(--space-lg);
  border-top: 1px solid #26262b;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5f5f68;
}
.site-footer__copyright sup { color: #f5654a; }

/* ---- Home: hero --------------------------------------------------------- */
.hero {
  position: relative;
  max-width: none;
  margin: 0;
  padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 7vw, 5rem);
  text-align: center;
  border-bottom: 1px solid var(--border);
}
/* Square dot field, the openclaw signature. It starts under the header line so
   the header, hero and first section read as one continuous sheet, and fades
   out before the first section begins.

   The inline SVG is the no-JS and reduced-motion grid. hero-dots.js draws the
   same grid on the canvas and adds .hero--dots-live, which swaps the two. The
   canvas squares are pulled by a spring and nudge away from the pointer. */
.hero__dots {
  position: absolute;
  top: calc(-1 * var(--header-height));
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  pointer-events: none;
  overflow: hidden;
  color: var(--border);
  opacity: 0.9;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.55) 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.55) 55%, transparent 100%);
}
.hero__dots-fallback,
.hero__dots-canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.hero__dots-canvas { display: none; }
.hero--dots-live .hero__dots-canvas { display: block; }
.hero--dots-live .hero__dots-fallback { display: none; }

/* The static grid is already square. Keep it for anyone who prefers less
   motion, even if the canvas has already started. */
@media (prefers-reduced-motion: reduce) {
  .hero__dots-canvas { display: none !important; }
  .hero__dots-fallback { display: block !important; }
}

.hero > * { position: relative; z-index: 1; }
.hero > .hero__dots { position: absolute; z-index: 0; }

.hero__title {
  max-width: 980px;
  margin: 0 auto var(--space-lg);
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 6.4vw, 4.5rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.05em;
  color: var(--text);
}
.hero__title .word-cycler,
.word-cycler {
  display: inline;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--accent);
  min-width: 0;
  min-height: 0;
  vertical-align: baseline;
}
#cycler { display: inline; }

.hero__subtitle {
  max-width: 620px;
  margin: 0 auto var(--space-xl);
  font-size: clamp(0.98rem, 1.8vw, 1.08rem);
  line-height: 1.75;
  color: var(--text-secondary);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: var(--space-xl);
}
.hero__actions .btn { min-height: 48px; padding: 0 1.5rem; }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hero__meta li { display: inline-flex; align-items: center; gap: 0.5rem; }
.hero__meta li + li::before {
  content: "/";
  color: var(--border-strong);
}

/* ---- Home: how it works ------------------------------------------------- */
.features-section {
  max-width: none;
  margin: 0;
  padding: clamp(3rem, 7vw, 5rem) 0;
  border-bottom: 1px solid var(--border);
}
.features-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: start;
}
.features-text { gap: 0; }

.features-text__heading {
  margin: 0 0 var(--space-md);
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 600;
  text-align: left;
  color: var(--text);
}
.features-text__heading::after { display: none; }

.features-text__intro {
  max-width: 54ch;
  margin: 0 0 var(--space-xl);
  font-size: 0.98rem;
  line-height: 1.8;
  color: var(--text-secondary);
  text-align: left;
}

.feature-item {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: var(--space-lg);
  align-items: start;
  padding: 1.15rem 0;
  border-top: 1px solid var(--border-light);
}
.feature-item:last-of-type { border-bottom: 1px solid var(--border-light); }

.feature-tag {
  align-self: start;
  justify-self: start;
  padding: 0.38rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
}
.feature-tag--accent {
  color: var(--text-on-accent);
  background: var(--accent);
  border-color: var(--accent);
}
.feature-tag--outline {
  color: var(--accent);
  background: transparent;
  border-color: var(--accent);
}
.feature-tag--link:hover {
  transform: none;
  box-shadow: none;
  background: var(--accent);
  color: var(--text-on-accent);
  border-color: var(--accent);
}

.feature-desc {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.feature-callout {
  margin-top: var(--space-xl);
  padding: 1.15rem 1.35rem;
  background: var(--surface-alt);
  border-left: 2px solid var(--accent);
  font-size: 0.86rem;
  line-height: 1.75;
  color: var(--text-secondary);
}
.feature-callout strong { color: var(--text); }

/* The mockup is now real markup (a static slice of the chat), so it carries its
   own card styling; only the sticky column position lives here. */
.features-chat-mockup {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
  justify-content: center;
}

/* ---- Home: reviews ------------------------------------------------------ */
.reviews-section {
  margin: 0;
  padding: clamp(3rem, 7vw, 5rem) 0;
  border-bottom: 1px solid var(--border);
}
.reviews-section__title {
  margin: 0 0 var(--space-lg);
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  text-align: left;
  color: var(--text);
}
.reviews-section__title::after { display: none; }

.ratings-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem 1.25rem;
  width: 100%;
  max-width: none;
  margin: 0 0 var(--space-xl);
  padding: 0.9rem 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.ratings-summary__stars { display: inline-flex; gap: 3px; }
.ratings-summary__value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text);
}
.ratings-summary__count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.review-container { gap: 0; }
.review-list { gap: 1rem; padding: 0 0 1rem; }
.review-card {
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: none;
  transition: border-color var(--transition);
}
.review-card:hover { border-color: var(--border-strong); box-shadow: none; }
.review-header { margin-bottom: 0.9rem; gap: 0.5rem; }
.review-header strong { font-size: 0.82rem; }
.review-rating { font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-muted); }
.review-comment { font-size: 0.88rem; line-height: 1.75; color: var(--text-secondary); }
.review-date { font-family: var(--font-mono); font-size: 0.64rem; color: var(--text-muted); }
.review-nav-btn {
  width: 40px;
  height: 40px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
}
.review-nav-btn:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.review-card--spotlight { background: var(--text); border-color: var(--text); color: var(--bg); }
.review-card--spotlight p,
.review-card--spotlight .review-comment { color: color-mix(in srgb, var(--bg) 82%, transparent); }
.review-card--spotlight .review-header { color: var(--accent); }

.nav-dots { gap: 6px; margin-top: var(--space-md); }
.dot,
.nav-dots .dot {
  width: 8px;
  height: 8px;
  background: var(--border-strong);
}
.dot.active,
.nav-dots .dot.active { width: 24px; background: var(--accent); }

.average-rating__value,
.average-rating__star { color: var(--text); }

/* Empty reviews: with no cards the carousel would be a blank strip with two
   live arrows and five filled stars above "0 / 5". Swap in a quiet note and
   let the stars read as unfilled while the count is zero. */
.reviews-section.is-empty .nav-dots { display: none; }
/* home.css sets #prev-review / #next-review display, so match the IDs. */
.reviews-section.is-empty #prev-review,
.reviews-section.is-empty #next-review { display: none; }
.review-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  min-height: 140px;
  padding: 1.5rem 0;
  list-style: none;
}
.review-empty__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}
.review-empty__copy {
  font-size: 0.86rem;
  color: var(--text-muted);
}
.ratings-summary__stars.is-empty svg {
  fill: transparent;
  stroke: var(--border-strong);
  stroke-width: 1.2;
}

/* ---- Home: FAQ ---------------------------------------------------------- */
.faq-section {
  padding: clamp(3rem, 7vw, 5rem) 0 0;
}
.faq-section__inner { max-width: 880px; }
.faq-section__title {
  margin: 0 0 var(--space-md);
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  text-align: left;
  color: var(--text);
}
.faq-section__title::after { display: none; }
.faq-section__intro {
  max-width: 58ch;
  margin: 0 0 var(--space-xl);
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-secondary);
  text-align: left;
}

.faq-list { gap: 0; border-top: 1px solid var(--border); }
.faq-item {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.faq-item:hover { border-color: var(--border); box-shadow: none; }
.faq-question {
  gap: 1rem;
  padding: 1.15rem 0.25rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}
.faq-question:hover { background: transparent; color: var(--accent); }
.faq-question:focus-visible { outline-offset: -2px; }
.faq-icon {
  width: 30px;
  height: 30px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--accent);
}
.faq-question:hover .faq-icon {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-accent);
}
.faq-chevron { width: 16px; height: 16px; }
.faq-answer { padding: 0 0.25rem; }
.faq-answer p {
  max-width: 72ch;
  padding-bottom: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-secondary);
}
.faq-answer strong { color: var(--text); }
.faq-item.is-open .faq-answer { max-height: 620px; }

/* ---- Pricing ------------------------------------------------------------ */
.pricing-hero {
  max-width: 720px;
  margin: 0;
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(1.75rem, 4vw, 2.5rem);
  text-align: left;
}
.pricing-hero::after { display: none; }
.pricing-hero__title {
  margin: 0 0 var(--space-md);
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  color: var(--text);
}
.pricing-hero__subtitle {
  max-width: 60ch;
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.pricing-grid {
  max-width: 1120px;
  margin: 0;
  padding: 0 0 var(--space-xl);
  gap: 1rem;
  grid-template-columns: 1fr;
  /* Cards share a row height, so the buttons line up even when one name wraps to a second
     line. Without this the row reads as ragged. */
  align-items: stretch;
}
@media (min-width: 720px) {
  .pricing-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  }
}
/* Six cards — the free one plus five document types — are exactly two rows of three. Fixed
   columns rather than `auto-fit`, which at this width produced four and then a half-empty
   second row. */
@media (min-width: 1000px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pricing-card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: none;
  transition: border-color var(--transition), background-color var(--transition);
  height: 100%;
}
.pricing-card:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border-strong);
  background: var(--surface);
}
.pricing-card__badge,
.pricing-card__badge--gold {
  padding: 0.28rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
}
.pricing-card__badge--gold {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--accent-20);
}
.pricing-card__icon {
  margin: 0.85rem 0 0.35rem;
  font-size: 1.45rem;
  line-height: 0;
}
/* Drawn document glyphs (partials/doc_icon.html). They replaced emoji: emoji are rendered by
   the operating system, so they cannot follow the theme, cannot take the hairline stroke and
   differ between Android, iOS and Windows. currentColor is the whole point — these inherit
   the card's colour, including in dark mode. */
.doc-icon {
  display: block;
  width: 32px;
  height: 32px;
  color: var(--text);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pricing-card--report .doc-icon { color: var(--accent); }
.pricing-card__doc-img {
  width: 46px;
  height: 46px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
}
.pricing-card__title {
  margin: 0 0 0.3rem;
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--text);
}
.pricing-card__subtitle {
  margin-bottom: var(--space-md);
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.pricing-card__price {
  margin-bottom: var(--space-md);
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--text);
}
.pricing-card__price--free { font-size: 1.7rem; color: var(--sea); }
.pricing-card__currency {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  vertical-align: super;
}
.pricing-card__features { margin-bottom: var(--space-lg); }
.pricing-card__features li {
  position: relative;
  display: block;
  padding: 0.5rem 0 0.5rem 1.8rem;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
}
.pricing-card__check {
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 18px;
  height: 18px;
  margin-top: 0;
  background: var(--success-bg);
  color: var(--success);
  box-shadow: none;
  border: 1px solid color-mix(in srgb, var(--success) 35%, transparent);
}
.pricing-card__check-icon { font-size: 10px; }
.pricing-footer { max-width: 620px; margin: 0; text-align: left; padding: 0 0 var(--space-xl); }
.pricing-footer p {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.8;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

/* ---- Privacy ------------------------------------------------------------ */
.privacy-grid {
  max-width: 1080px;
  margin: 0;
  padding: 0 0 var(--space-xl);
  gap: 1rem;
}
@media (min-width: 720px) {
  .privacy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.privacy-card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: none;
  transition: border-color var(--transition);
}
.privacy-card:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border-strong);
}
.privacy-card__icon { margin-bottom: 0.75rem; font-size: 1.3rem; }
.privacy-card__title {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}
.privacy-card__text { font-size: 0.87rem; line-height: 1.8; color: var(--text-secondary); }

/* ---- Dashboard ---------------------------------------------------------- */
.dashboard-header {
  padding-bottom: var(--space-lg);
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border);
  gap: var(--space-md);
}
.dashboard-header h1 { margin: 0; font-size: clamp(2rem, 4.5vw, 3rem); }
.dashboard-header .text--muted { font-family: var(--font-mono); font-size: 0.72rem; }

.report-card {
  border: 1px solid var(--border) !important;
  background: var(--surface);
  transition: border-color var(--transition);
}
.report-card:hover { border-color: var(--border-strong) !important; }
.report-card--active { border-color: var(--accent) !important; box-shadow: none !important; }
.report-card--active .report-card__header { background: var(--accent-20) !important; }
.report-card__header { padding: 0.9rem 1.1rem; }
.report-card__header:hover { background: var(--surface-alt) !important; }
.report-card__icon {
  width: 30px;
  height: 30px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}
.report-card__icon--pending { background: var(--warning-bg); color: var(--warning); }
.report-card__icon--claimed { background: var(--success-bg); color: var(--success); }
.report-card__title { font-family: var(--font-body); font-size: 0.9rem; }
.report-card__meta { font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-muted); }

.incentive-banner {
  font-family: var(--font-body);
  background: var(--accent-20);
  border-color: var(--border);
  border-left-color: var(--accent);
}

.doc-list__item {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
}
.doc-list__item:hover { background: var(--surface-alt); border-color: var(--border-strong); }
.doc-list__item--active { background: var(--accent-20); border-color: var(--accent); box-shadow: none; }

.log-display {
  background: var(--surface-alt);
  border: 1px dashed var(--border-strong);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.7;
}

/* ---- Chat --------------------------------------------------------------- */
.chat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: none;
}
.chat-card__header {
  padding: 0.8rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.chat-card__header h3 { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.chat-card__messages { background: var(--bg-recessed); padding: 1rem; gap: 0.6rem; }
.chat-card__footer { padding: 0.7rem 1rem; background: var(--surface); border-top: 1px solid var(--border); }
.chat-card__input {
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
}
.chat-card__input:focus { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.msg {
  padding: 0.55rem 0.8rem;
  font-size: 0.85rem;
  line-height: 1.55;
  box-shadow: none;
  border: 1px solid transparent;
}
.msg--owner {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.msg--collector {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.msg__sender,
.msg__time { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.04em; }
.msg--owner .msg__time { color: color-mix(in srgb, var(--bg) 65%, transparent); }

/* ---- Misc cards / result states ---------------------------------------- */
.check-result__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: var(--space-md);
  font-family: var(--font-mono);
  font-size: 1.4rem;
  line-height: 1;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: none;
}
.check-result__icon--found,
.check-result__icon--waiting {
  background: var(--accent-20);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--accent);
}
.check-result__title { font-size: clamp(1.35rem, 3vw, 1.8rem); }
.check-result__body { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.75; }

.dropoff-notice {
  background: var(--accent-20);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-left: 3px solid var(--accent);
}
.dropoff-notice__place { font-family: var(--font-display); font-weight: 600; }

.map-shell { border: 1px solid var(--border); background: var(--surface-alt); }
.map-hint { background: var(--accent-20); border-bottom: 1px solid var(--border); color: var(--text-secondary); font-family: var(--font-mono); font-size: 0.7rem; }
.map-actions { background: var(--surface); border-top: 1px solid var(--border); }
.place-choice__opt { background: var(--surface); border: 1px solid var(--border); }
.place-choice__opt:has(input:checked) { background: var(--accent-20); border-color: var(--accent); }

.dropoff-chip--active { background: var(--accent-20); color: var(--accent); border-color: var(--accent); }
.dropoff-chip--done { background: var(--success-bg); color: var(--success); border-color: var(--success); }

[data-theme="dark"] .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) brightness(0.82) contrast(0.92);
}
/* Satellite imagery is already dark. Inverting it turns roofs into negatives and sand
   pale-green, which is the opposite of the question that layer answers: "is that the
   right building?" */
[data-theme="dark"] .is-satellite .leaflet-tile-pane {
  filter: none;
}
[data-theme="dark"] .leaflet-container { background: #151518; }
[data-theme="dark"] .leaflet-control-attribution {
  background: rgba(16, 16, 18, 0.85);
  color: #9a9aa2;
}
[data-theme="dark"] .leaflet-control-attribution a { color: #bcbcc4; }
[data-theme="dark"] .leaflet-bar a {
  background: #19191c;
  color: #ededed;
  border-bottom-color: #2e2e34;
}
[data-theme="dark"] .leaflet-bar a:hover { background: #202024; }

/* ---- Auth & utility pages ---------------------------------------------- */
.max-w-sm { max-width: 600px; }
.max-w-md { max-width: 640px; }
.max-w-lg { max-width: 760px; }

.form-field input:not([type="radio"]):not([type="checkbox"]),
.form-field select,
.form-field textarea { min-height: 48px; }

/* Legacy green inline panels that some auth templates still carry */
.alert {
  border: 1px solid var(--border) !important;
  background: var(--surface-alt) !important;
  color: var(--text) !important;
}

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 767px) {
  :root { --header-height: 58px; }

  .site-header { position: sticky; }
  .site-header__inner { min-height: var(--header-height); gap: 0.5rem; }

  .nav-toggle { display: inline-flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    grid-column: auto;
    justify-self: stretch;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.4rem 1rem 1rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: none;
    max-height: calc(100dvh - var(--header-height));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav-links.nav-links--open { display: flex; }

  /* The panel scrolls; the items inside it must not. A flex child defaults to
     `flex-shrink: 1`, so the signed-in menu (`.user-menu`, which is one item of this column)
     was being squeezed to a fraction of its content height — 387px of a 501px panel on a
     360×560 phone — and because it also had `overflow: hidden` the rest of it, Sign Out
     included, was clipped away rather than reachable by scrolling. `scrollHeight` then
     equalled `clientHeight`, so there was not even a scrollbar: the link existed but could
     not be tapped. Both rules below are needed; either one alone still loses the link. */
  .nav-links > * { flex: 0 0 auto; }

  .nav-links > a {
    width: 100%;
    min-height: 46px;
    padding: 0.7rem 0.25rem;
    border: 0;
    border-bottom: 1px solid var(--border-light);
  }
  .nav-links > a:hover { background: transparent; border-color: var(--border-light); }
  .nav-links > a.btn {
    margin: 0.6rem 0 0;
    padding: 0.7rem 1rem;
    border: 1px solid var(--primary);
    color: var(--text-inverse);
    background: var(--primary);
  }
  .nav-links > a.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--text-on-accent); }

  .user-menu {
    position: static;
    min-width: 100%;
    border: 0;
    padding: 0.4rem 0 0;
    box-shadow: none;
    background: transparent;
    overflow: visible;
  }
  .user-menu__header { padding: 0.65rem 0.25rem 0.35rem; }
  .user-menu__link,
  .user-menu a { padding: 0.65rem 0.25rem; }
  .user-menu__divider { margin: 0.25rem 0; }

  .user-avatar-trigger { padding: 0.2rem 0.4rem 0.2rem 0.2rem; gap: 0.4rem; }
  .greeting__name { display: none; }
  .greeting__chevron { width: 12px; height: 12px; }

  .theme-toggle { width: 38px; height: 38px; }
  .nav-toggle { width: 38px; height: 38px; }

  .hero { padding: 2rem 0 2.75rem; }
  .hero__title { font-size: clamp(2.1rem, 9vw, 3rem); }
  .hero__meta li + li::before { display: none; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }

  .features-grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .features-chat-mockup { position: static; order: -1; }
  .feature-item { grid-template-columns: 1fr; gap: 0.55rem; padding: 1rem 0; }
  .feature-desc { font-size: 0.88rem; }

  .reviews-section__title,
  .faq-section__title,
  .features-text__heading { letter-spacing: -0.03em; }

  .review-list li { min-width: calc(100vw - 4rem); }

  .dashboard-header { flex-direction: column; align-items: flex-start; }
  .pricing-hero { text-align: left; }
}

@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  .card { --card-pad: 1.25rem; padding: var(--card-pad); }
  .card > h2:first-child { font-size: 1.5rem; }
  .hero__meta { gap: 0.35rem 0.8rem; font-size: 0.62rem; }
  .pricing-card { padding: 1.25rem; }
  .toast,
  .message-toast { font-size: 0.84rem; }
}

/* ---- Motion & print ---------------------------------------------------- */
@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;
  }
}

@media print {
  .site-header,
  .site-footer,
  .theme-toggle,
  .messages-container { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ============================================================================
   LEGAL DOCUMENTS — terms, cookies, privacy
   ----------------------------------------------------------------------------
   These pages are read, not scanned: one column, no cards, no icons competing with
   the text. The only decoration is a hairline and the section number, which is what
   makes a long document navigable. Hard corners, like everything else.
   ========================================================================== */

.legal-meta {
  margin: 1.25rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.legal-wrap {
  max-width: 78ch;
  margin: 0 auto;
  padding: 0 clamp(1.15rem, 5vw, 1.75rem) var(--space-2xl);
}

/* ---- Contents ------------------------------------------------------------ */
.legal-toc {
  margin: 0 0 var(--space-2xl);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.legal-toc h2 {
  margin: 0 0 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.legal-toc ol {
  counter-reset: toc;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) {
  .legal-toc ol { grid-template-columns: repeat(2, 1fr); }
}
.legal-toc li { margin: 0; }
.legal-toc a {
  display: inline-flex;
  gap: 0.55rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary);
  text-decoration: none;
}
.legal-toc a::before {
  counter-increment: toc;
  content: counter(toc);
  flex: 0 0 auto;
  min-width: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-muted);
  padding-top: 0.28rem;
}
.legal-toc a:hover { color: var(--accent); }
.legal-toc a:hover::before { color: var(--accent); }

/* ---- Sections ------------------------------------------------------------ */
.legal-section {
  margin: 0 0 var(--space-2xl);
  scroll-margin-top: 90px;
}
.legal-section h2 {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin: 0 0 var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.legal-num {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent);
}
/* Sub-headings inside a legal section: a privacy policy groups several data types under
   one numbered section, and those labels must read as labels, not as new sections. */
.legal-section h3 {
  margin: var(--space-lg) 0 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.legal-section h3:first-of-type { margin-top: var(--space-md); }
.legal-section p,
.legal-section li {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-secondary);
}
.legal-section p { margin: 0 0 0.9rem; }
.legal-section ul,
.legal-section ol {
  margin: 0 0 var(--space-md);
  padding-left: 1.15rem;
}
.legal-section li { margin-bottom: 0.5rem; }
.legal-section li::marker { color: var(--text-muted); }
.legal-section strong { color: var(--text); font-weight: 600; }
.legal-section a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.legal-section a:hover { border-bottom-color: var(--accent); }

/* The one thing on the page that must not be skimmed past: money coming back. */
.legal-note {
  margin: var(--space-md) 0 var(--space-md);
  padding: 0.15rem 0 0.15rem 1rem;
  border-left: 2px solid var(--accent);
}
.legal-note strong { color: var(--text); }

/* ---- Cookie table -------------------------------------------------------- */
.legal-table-wrap {
  margin: 0 0 var(--space-md);
  overflow-x: auto;
  border-top: 1px solid var(--border);
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 34rem;
}
.legal-table th,
.legal-table td {
  padding: 0.85rem 0.9rem 0.85rem 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.legal-table th {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.legal-table td {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-secondary);
}
.legal-table th:first-child,
.legal-table td:first-child { padding-right: 1.25rem; }
.legal-table td:last-child { white-space: nowrap; }
.legal-table code {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--text);
}

/* The sharing table has three prose columns, not a cookie name and a lifetime. Its last
   column must wrap, and on a phone the stacked lines need their own labels instead of the
   cookie table's "Lasts" prefix. */
.legal-table--sharing td:last-child { white-space: normal; }
@media (max-width: 639px) {
  .legal-table--sharing td:last-child::before { content: none; }
  .legal-table--sharing td:nth-child(2)::before,
  .legal-table--sharing td:nth-child(3)::before {
    display: block;
    margin-bottom: 0.15rem;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .legal-table--sharing td:nth-child(2)::before { content: "Receives"; }
  .legal-table--sharing td:nth-child(3)::before { content: "Why"; }
}

/* The hero is the same width as the document below it, so the title and the first paragraph
   share one left edge. `.pricing-hero` centres nothing and caps at 720px, which left the legal
   body indented under a title that started at the margin. */
.legal-hero {
  max-width: 78ch;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.15rem, 5vw, 1.75rem) 0;
}

/* On a phone the cookie table becomes three stacked lines per cookie. Two rows do not need a
   horizontal scrollbar, and a column sliced in half reads as broken rather than as scrollable. */
@media (max-width: 639px) {
  .legal-table-wrap { overflow: visible; }
  .legal-table { min-width: 0; }
  .legal-table thead { display: none; }
  .legal-table,
  .legal-table tbody,
  .legal-table tr,
  .legal-table td { display: block; }
  .legal-table tr { padding: 1rem 0; border-bottom: 1px solid var(--border); }
  .legal-table td { padding: 0; border: 0; }
  .legal-table td + td { margin-top: 0.5rem; }
  .legal-table td:first-child {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text);
  }
  .legal-table td:nth-child(2) { font-size: 0.88rem; }
  .legal-table td:last-child {
    white-space: normal;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .legal-table td:last-child::before { content: "Lasts "; }
}
