:root {
  --canvas: #f7f7f4;
  --canvas-soft: #fafaf7;
  --surface-card: #ffffff;
  --surface-strong: #e6e5e0;
  --hairline: #e6e5e0;
  --hairline-soft: #efeee8;
  --hairline-strong: #cfcdc4;
  --ink: #26251e;
  --body: #5a5852;
  --muted: #807d72;
  --muted-soft: #a09c92;
  --primary: #f54e00;
  --primary-active: #d04200;
  --on-primary: #ffffff;
  --success: #1f8a65;
  --error: #cf2d56;
  --t-read: #9fbbe0;
  --t-grep: #9fc9a2;
  --t-thinking: #dfa88f;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: -0.015em;
  background: var(--canvas);
  color: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

code, pre, .mono { font-family: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace; letter-spacing: 0; }

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { color: var(--ink); font-weight: 400; }
h1 { font-size: 72px; line-height: 1.1; letter-spacing: -0.03em; }
h2 { font-size: 36px; line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: 26px; line-height: 1.25; letter-spacing: -0.0125em; }
h4 { font-size: 18px; font-weight: 600; color: var(--ink); letter-spacing: 0; }

p { margin-bottom: 16px; }

.section { padding: 80px 0; }
.section-tight { padding: 48px 0; }

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.top-nav {
  height: 64px;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  z-index: 50;
}
.top-nav .container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.wordmark { font-size: 18px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.wordmark span { color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--body); }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--hairline-strong); border-radius: 8px; padding: 6px 10px; cursor: pointer; color: var(--ink); font-size: 18px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  padding: 10px 18px;
  height: 40px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-active); color: var(--on-primary); }
.btn-secondary { background: var(--surface-card); color: var(--ink); border-color: var(--hairline-strong); }
.btn-ink { background: var(--ink); color: var(--canvas); height: 44px; padding: 12px 20px; }
.btn-ink:hover { color: var(--canvas); opacity: .92; }

.hero { background: var(--canvas); padding: 80px 0 56px; }
.hero h1 { max-width: 14ch; margin-bottom: 24px; }
.hero .lead { font-size: 18px; color: var(--body); max-width: 60ch; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

.hero-figure { margin-top: 48px; }
.figure-card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  overflow: hidden;
}
.figure-card img { width: 100%; height: auto; object-fit: cover; }
.figure-card figcaption { font-size: 13px; color: var(--muted); padding: 12px 20px; border-top: 1px solid var(--hairline); }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 24px;
}
.card h4 { margin-bottom: 8px; }
.card p { color: var(--body); margin-bottom: 0; }
.card .tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--surface-strong);
  border-radius: 9999px;
  padding: 4px 10px;
  margin-bottom: 16px;
}

.article-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.article-card img { width: 100%; height: 200px; object-fit: cover; }
.article-card .body { padding: 24px; }
.article-card h4 { font-size: 18px; }
.article-card .meta { font-size: 13px; color: var(--muted); margin-top: 16px; }

.section-head { margin-bottom: 48px; max-width: 60ch; }
.section-head p { color: var(--body); }

.divider { border: 0; border-top: 1px solid var(--hairline); margin: 0; }

.article-layout { max-width: 760px; margin: 0 auto; padding: 56px 0 80px; }
.article-layout .eyebrow { margin-bottom: 12px; }
.article-layout h1 { font-size: 44px; line-height: 1.15; margin-bottom: 16px; }
.article-meta { font-size: 13px; color: var(--muted); margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--hairline); }
.article-layout figure { margin: 32px 0; }
.article-layout figure img { border-radius: 12px; border: 1px solid var(--hairline); width: 100%; }
.article-layout figcaption { font-size: 13px; color: var(--muted); margin-top: 12px; }
.article-layout h2 { font-size: 28px; margin: 40px 0 16px; }
.article-layout h3 { font-size: 21px; margin: 28px 0 12px; }
.article-layout p { color: var(--body); margin-bottom: 16px; }
.article-layout ul, .article-layout ol { margin: 0 0 16px 22px; color: var(--body); }
.article-layout li { margin-bottom: 8px; }

.callout {
  background: var(--canvas-soft);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--t-read);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 28px 0;
}
.callout h4 { margin-bottom: 8px; }
.callout p { margin-bottom: 0; }

.keyfacts { background: var(--surface-card); border: 1px solid var(--hairline); border-radius: 12px; padding: 24px; margin: 28px 0; }
.keyfacts dl { display: grid; grid-template-columns: 1fr 2fr; gap: 12px 20px; }
.keyfacts dt { font-weight: 600; color: var(--ink); font-size: 14px; }
.keyfacts dd { color: var(--body); font-size: 14px; }

.refs { font-size: 14px; }
.refs li { margin-bottom: 8px; word-break: break-word; }

.steps { counter-reset: step; list-style: none; margin-left: 0 !important; }
.steps li { position: relative; padding-left: 44px; margin-bottom: 20px; }
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 28px; height: 28px;
  background: var(--ink);
  color: var(--canvas);
  border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}

table.data { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--hairline); }
table.data th { color: var(--ink); font-weight: 600; background: var(--canvas-soft); }
table.data td { color: var(--body); }

.related { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--hairline); }
.related h4 { margin-bottom: 16px; }

.form-wrap { background: var(--surface-card); border: 1px solid var(--hairline); border-radius: 12px; padding: 32px; max-width: 640px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.field input {
  width: 100%;
  height: 44px;
  background: var(--surface-card);
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
}
.field input:focus { outline: 2px solid var(--t-read); outline-offset: 1px; border-color: var(--t-read); }
.field input:invalid:not(:placeholder-shown) { border-color: var(--error); }
.form-note { font-size: 13px; color: var(--muted); margin-top: 16px; }
.form-status { display: none; margin-top: 20px; padding: 14px 18px; border-radius: 8px; font-size: 14px; }
.form-status.show { display: block; }
.form-status.success { background: rgba(31,138,101,.1); color: var(--success); border: 1px solid rgba(31,138,101,.3); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-info dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 15px; }
.contact-info dt { font-weight: 600; color: var(--ink); }
.contact-info dd { color: var(--body); }

footer.site-footer { background: var(--canvas); border-top: 1px solid var(--hairline); padding: 64px 0 48px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h5 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.88px; color: var(--muted); font-weight: 600; margin-bottom: 16px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { font-size: 14px; color: var(--body); }
.footer-about { font-size: 14px; color: var(--body); max-width: 38ch; }
.footer-about .wordmark { display: block; margin-bottom: 12px; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--hairline); font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

.disclaimer { background: var(--canvas-soft); border: 1px solid var(--hairline); border-radius: 8px; padding: 16px 20px; font-size: 13px; color: var(--muted); margin-top: 32px; }

.cookie-banner {
  position: fixed;
  left: 24px; right: 24px; bottom: 24px;
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface-card);
  border: 1px solid var(--hairline-strong);
  border-radius: 12px;
  padding: 20px 24px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  z-index: 100;
  flex-wrap: wrap;
}
.cookie-banner.show { display: flex; }
.cookie-banner p { margin: 0; font-size: 14px; color: var(--body); flex: 1 1 320px; }
.cookie-banner a { color: var(--ink); text-decoration: underline; }
.cookie-actions { display: flex; gap: 12px; }

@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 56px; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    padding: 16px 24px;
    gap: 16px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .grid-3, .grid-2, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  .section { padding: 56px 0; }
  .keyfacts dl { grid-template-columns: 1fr; }
}
