/* Table Read — shared marketing shell (landing, blog, legal).
   Tokens first; every page-level stylesheet builds on these. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f6f8;
  --ink: #0b1220;
  --ink-2: #3b4252;
  --muted: #6b7280;
  --line: #e7e9ee;
  --line-strong: #d3d7df;
  --accent: #1d5c3a;
  --accent-2: #2f7d52;
  --accent-ink: #ffffff;
  --accent-soft: #e6f0e9;
  --accent-text: #1d5c3a;
  --focus: #2f7d52;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(11, 18, 32, .04), 0 16px 40px -16px rgba(11, 18, 32, .14);
  --font: "Instrument Sans", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", ui-serif, Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --width: 1120px;
  --prose: 700px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0f0e;
    --surface: #171715;
    --surface-2: #1e1e1b;
    --ink: #f2f1ec;
    --ink-2: #cfcdc5;
    --muted: #9a988f;
    --line: #2a2a26;
    --line-strong: #3a3a35;
    --accent: #4fb27a;
    --accent-2: #6fcf97;
    --accent-ink: #0b1220;
    --accent-soft: #16291d;
    --accent-text: #86d9a8;
    --focus: #86d9a8;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0f0e; --surface: #171715; --surface-2: #1e1e1b; --ink: #f2f1ec; --ink-2: #cfcdc5;
  --muted: #9a988f; --line: #2a2a26; --line-strong: #3a3a35; --accent: #4fb27a; --accent-2: #6fcf97; --accent-ink: #0b1220;
  --accent-soft: #16291d; --accent-text: #86d9a8; --focus: #86d9a8; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.page-width { width: min(var(--width), 100% - 32px); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.005em; text-decoration: none; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; display: grid; place-items: center; }
.brand-mark img { width: 20px; height: 20px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { padding: 8px 12px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: 14.5px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.nav-actions { display: flex; gap: 8px; align-items: center; }
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
  .nav-actions .btn-ghost { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 999px;
  font: 550 15px/1 var(--font); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background .15s, border-color .15s, transform .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
.btn-accent { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 8px 20px -10px rgba(29,92,58,.6); }
.btn-accent:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-lg { min-height: 50px; padding: 0 24px; font-size: 16px; }
.text-link { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.text-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* Type */
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--accent-text); margin-bottom: 14px; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; line-height: 1.12; font-weight: 600; }
.display { font-family: var(--serif); font-weight: 500; letter-spacing: -.025em; }
.lede { color: var(--ink-2); font-size: 18px; line-height: 1.6; }
.muted { color: var(--muted); }

/* Sections */
.section { padding: 96px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); }
.section-head p { margin: 14px 0 0; }
@media (max-width: 760px) { .section { padding: 64px 0; } }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* Post cards (blog index + landing teaser) */
.post-card { display: flex; flex-direction: column; gap: 10px; padding: 24px; text-decoration: none; transition: border-color .15s, transform .15s; height: 100%; }
.post-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.post-card .post-tag { font-size: 12.5px; font-weight: 600; color: var(--accent-text); }
.post-card h3 { font-size: 19px; line-height: 1.3; }
.post-card p { margin: 0; color: var(--muted); font-size: 15px; }
.post-card .post-meta { margin-top: auto; padding-top: 8px; font-size: 13px; color: var(--muted); }

/* Long-form prose (blog articles + legal pages) */
.article-wrap { padding: 56px 0 96px; }
.crumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 28px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.article-head { max-width: var(--prose); margin: 0 auto 36px; }
.article-head h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 5vw, 54px); letter-spacing: -.025em; line-height: 1.06; }
.article-head .lede { margin: 18px 0 0; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 20px; font-size: 14px; color: var(--muted); }
.prose { max-width: var(--prose); margin: 0 auto; font-size: 17.5px; line-height: 1.75; color: var(--ink-2); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { color: var(--ink); font-size: 27px; line-height: 1.2; margin-top: 2.2em; }
.prose h3 { color: var(--ink); font-size: 20px; margin-top: 1.8em; }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose a { color: var(--accent-text); text-underline-offset: 3px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .12em .38em; border-radius: 6px; }
.prose pre { font-family: var(--mono); font-size: 14.5px; line-height: 1.6; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; overflow-x: auto; color: var(--ink); }
.prose blockquote { margin-left: 0; padding-left: 18px; border-left: 3px solid var(--line-strong); color: var(--ink-2); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--ink); font-weight: 600; }
.answer-box { background: var(--accent-soft); border-radius: var(--radius); padding: 20px 22px; color: var(--ink); }
.answer-box > strong:first-child { display: block; font-size: 13px; letter-spacing: .02em; color: var(--accent-text); margin-bottom: 6px; }
.answer-box p { margin: 0; }
.key-points { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px 18px 40px; }
.faq-block details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq-block summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-block summary::-webkit-details-marker { display: none; }
.faq-block summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq-block details[open] summary::after { content: "–"; }
.faq-block details p { margin: 10px 0 0; }
.cta-box { margin-top: 2.4em; padding: 26px; border-radius: var(--radius-lg); background: var(--ink); color: var(--bg); }
.cta-box h2, .cta-box h3 { color: var(--bg); margin: 0 0 8px; font-size: 22px; }
.cta-box p { color: color-mix(in srgb, var(--bg) 78%, transparent); margin: 0 0 16px; }
.cta-box .btn-primary { background: var(--bg); color: var(--ink); }
.related { max-width: var(--prose); margin: 56px auto 0; }
.related h2 { font-size: 20px; margin-bottom: 16px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-grid p { color: var(--muted); margin: 12px 0 0; max-width: 280px; }
.footer-col h2 { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 12px; letter-spacing: 0; }
.footer-col a { display: block; color: var(--muted); text-decoration: none; padding: 4px 0; }
.footer-col a:hover { color: var(--ink); }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.footer-base a { color: var(--muted); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* Motion */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
