:root {
  --bg: #f3f0e7;
  --surface: #fbfaf5;
  --surface-strong: #ffffff;
  --text: #17221c;
  --muted: #637068;
  --line: #d6d8cf;
  --accent: #17634a;
  --accent-strong: #0e4936;
  --accent-soft: #dcece3;
  --code: #eef0e9;
  --shadow: 0 24px 70px rgba(33, 51, 41, 0.09);
  color-scheme: light dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 88% -4%, rgba(61, 139, 103, 0.13), transparent 29rem),
    linear-gradient(180deg, rgba(255,255,255,0.2), transparent 34rem),
    var(--bg);
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
a:focus-visible { outline: 3px solid #efb44a; outline-offset: 4px; border-radius: 3px; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 20; padding: 9px 13px; color: #fff; background: var(--accent-strong); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.site-header,
main,
.site-footer {
  width: min(1140px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 780; text-decoration: none; letter-spacing: -0.025em; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; color: #fff; background: var(--accent); border-radius: 11px 4px; box-shadow: 0 7px 18px rgba(23, 99, 74, 0.2); }
nav { display: flex; gap: 27px; }
nav a { color: var(--muted); font-size: 0.94rem; font-weight: 580; text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: var(--accent); }

.hero { min-height: 650px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.7fr); align-items: center; gap: 70px; padding: 94px 0; }
.eyebrow { margin: 0 0 14px; color: var(--accent); font-size: 0.75rem; font-weight: 820; letter-spacing: 0.16em; text-transform: uppercase; }
h1, h2, h3, p { text-wrap: pretty; }
h1 { max-width: 820px; margin: 0; font-size: clamp(3rem, 7.2vw, 6.6rem); line-height: 0.97; letter-spacing: -0.064em; }
.lede { max-width: 680px; margin: 30px 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.28rem); }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; }
.button { width: max-content; display: inline-flex; padding: 12px 18px; color: #fff; background: var(--accent); border-radius: 9px; font-weight: 720; text-decoration: none; box-shadow: 0 10px 22px rgba(23, 99, 74, 0.16); }
.button:hover { background: var(--accent-strong); }
.text-link, .card-link { color: var(--accent); font-weight: 720; text-decoration: none; }
.text-link:hover, .card-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.dispatch { padding: 27px; background: color-mix(in srgb, var(--surface) 93%, transparent); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.dispatch-topline { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; padding-bottom: 18px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.status-dot { width: 8px; height: 8px; background: #36a66f; border-radius: 50%; box-shadow: 0 0 0 4px rgba(54, 166, 111, 0.12); }
.dispatch > p { margin: 24px 0 27px; font-size: 1.12rem; line-height: 1.55; }
.dispatch-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
.dispatch-meta div { min-width: 0; }
.dispatch-meta dt { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; }
.dispatch-meta dd { margin: 3px 0 0; font-size: 0.86rem; font-weight: 720; }

.section { padding: 102px 0; border-top: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 0.55fr); align-items: end; gap: 70px; margin-bottom: 38px; }
.section-heading > p, .section-intro { margin: 0; color: var(--muted); }
.compact-heading { grid-template-columns: 1fr; }
h2 { max-width: 730px; margin: 0; font-size: clamp(2rem, 4vw, 3.7rem); line-height: 1.08; letter-spacing: -0.048em; }
h3 { line-height: 1.22; letter-spacing: -0.025em; }

.feature-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 18px; }
.feature-card, .note-card, .topic-card { background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--line); border-radius: 18px; }
.feature-card { min-height: 520px; display: flex; flex-direction: column; justify-content: flex-end; padding: 38px; background: linear-gradient(145deg, rgba(23,99,74,0.04), transparent 55%), var(--surface); box-shadow: var(--shadow); }
.feature-card h3 { max-width: 610px; margin: 17px 0; font-size: clamp(2rem, 4vw, 3.2rem); }
.feature-card h3 a, .note-card h3 a { text-decoration: none; }
.feature-card h3 a:hover, .note-card h3 a:hover { color: var(--accent); }
.feature-card > p { max-width: 620px; margin: 0 0 24px; color: var(--muted); font-size: 1.06rem; }
.card-meta { display: flex; gap: 12px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.73rem; text-transform: uppercase; letter-spacing: 0.06em; }
.card-stack { display: grid; gap: 18px; }
.note-card { min-height: 251px; padding: 29px; }
.note-card h3 { margin: 22px 0 10px; font-size: 1.45rem; }
.note-card p { margin: 0 0 16px; color: var(--muted); }

.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.topic-card { min-height: 250px; padding: 25px; }
.topic-number { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.75rem; }
.topic-card h3 { margin: 62px 0 10px; font-size: 1.3rem; }
.topic-card p { margin: 0; color: var(--muted); font-size: 0.94rem; }

.split-section { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 75px; }
.section-intro { max-width: 480px; margin-top: 24px; }
.principles { margin: 0; padding: 0; list-style: none; }
.principles li { display: grid; grid-template-columns: 48px 1fr; gap: 8px; padding: 23px 0; border-bottom: 1px solid var(--line); }
.principles > li > span { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.76rem; }
.principles strong { font-size: 1.06rem; }
.principles p { margin: 5px 0 0; color: var(--muted); font-size: 0.94rem; }

.update-list { border-top: 1px solid var(--line); }
.update-row { display: grid; grid-template-columns: 145px 1fr auto; gap: 25px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.update-row time { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; }
.tag { padding: 4px 9px; color: var(--accent); background: var(--accent-soft); border-radius: 999px; font-size: 0.72rem; font-weight: 740; }

.closing-card { margin: 35px 0 110px; padding: clamp(32px, 7vw, 76px); background: var(--accent-strong); color: #f5fff9; border-radius: 24px; box-shadow: var(--shadow); }
.closing-card .eyebrow { color: #9ee2bf; }
.closing-card p:not(.eyebrow) { max-width: 660px; color: #cfe1d7; font-size: 1.05rem; }
.secondary-button { margin-top: 14px; color: var(--accent-strong); background: #f4fbf7; box-shadow: none; }
.secondary-button:hover { color: #fff; background: #28785b; }

.site-footer { min-height: 122px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); border-top: 1px solid var(--line); font-size: 0.85rem; }
.site-footer > div:first-child { display: grid; gap: 2px; }
.site-footer strong { color: var(--text); }
.footer-links { display: flex; gap: 22px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--accent); }

.page-main { width: min(1080px, calc(100% - 40px)); }
.article-header { max-width: 940px; padding: 115px 0 75px; }
.article-header h1 { max-width: 940px; font-size: clamp(2.9rem, 7vw, 6rem); }
.article-deck { max-width: 760px; margin: 27px 0; color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.32rem); }
.article-meta { display: flex; gap: 18px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; }
.article-layout { display: grid; grid-template-columns: 220px minmax(0, 720px); justify-content: space-between; gap: 80px; padding: 70px 0 115px; border-top: 1px solid var(--line); }
.article-aside { height: max-content; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.aside-label { margin: 0 0 13px; color: var(--accent); font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; }
.article-aside dl { margin: 0; }
.article-aside dl div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.82rem; }
.article-aside dl div:last-child { border: 0; }
.article-aside dt { color: var(--muted); }
.article-aside dd { margin: 0; font-weight: 680; }
.toc { display: grid; gap: 8px; position: sticky; top: 20px; }
.toc a { color: var(--muted); font-size: 0.84rem; text-decoration: none; }
.toc a:hover { color: var(--accent); }
.article-body { font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif; font-size: 1.08rem; }
.article-body > p:first-child { margin-top: 0; font-size: 1.2rem; }
.article-body h2 { margin: 2.2em 0 0.55em; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: clamp(1.55rem, 3vw, 2.25rem); scroll-margin-top: 20px; }
.article-body p { margin: 0 0 1.25em; }
.article-body li { margin: 0.45em 0; }
.article-body code { padding: 0.12em 0.34em; background: var(--code); border: 1px solid var(--line); border-radius: 4px; font-size: 0.88em; }
.article-body blockquote { margin: 2em 0; padding: 4px 0 4px 24px; color: var(--muted); border-left: 3px solid var(--accent); font-size: 1.2rem; }
.note-box { margin: 2em 0; padding: 20px 22px; background: var(--accent-soft); border-radius: 12px; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.note-box strong { color: var(--accent-strong); }
.note-box p { margin: 5px 0 0; color: var(--muted); font-size: 0.94rem; }
.checklist { padding: 0; list-style: none; }
.checklist li { position: relative; padding: 10px 0 10px 34px; border-bottom: 1px solid var(--line); }
.checklist li::before { content: "✓"; position: absolute; left: 5px; color: var(--accent); font-family: Inter, sans-serif; font-weight: 800; }
.article-nav { display: flex; justify-content: space-between; gap: 20px; padding: 35px 0 100px; border-top: 1px solid var(--line); }
.article-nav a { display: grid; color: var(--accent); font-weight: 700; text-decoration: none; }
.article-nav a:last-child { text-align: right; margin-left: auto; }
.article-nav span { color: var(--muted); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }

.error-page { min-height: 100vh; display: grid; align-content: space-between; padding: 45px 0 90px; }
.error-page > div { max-width: 850px; }
.error-page h1 { font-size: clamp(3rem, 8vw, 6.6rem); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 40px; }
  .dispatch { max-width: 560px; }
  .feature-grid, .section-heading, .split-section { grid-template-columns: 1fr; gap: 38px; }
  .feature-card { min-height: 410px; }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; gap: 35px; }
  .toc { position: static; }
}

@media (max-width: 600px) {
  .site-header { min-height: 72px; }
  .site-header nav { display: none; }
  .hero { padding: 72px 0; }
  h1 { letter-spacing: -0.052em; }
  .section { padding: 76px 0; }
  .topic-grid { grid-template-columns: 1fr; }
  .update-row { grid-template-columns: 1fr; gap: 4px; }
  .update-row .tag { width: max-content; margin-top: 5px; }
  .site-footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 16px; }
  .article-header { padding: 80px 0 55px; }
  .article-layout { padding: 50px 0 80px; }
  .article-nav { flex-direction: column; }
  .article-nav a:last-child { text-align: left; margin-left: 0; }
}

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

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1713;
    --surface: #17221c;
    --surface-strong: #1b2821;
    --text: #edf2ee;
    --muted: #a3afa7;
    --line: #2a3830;
    --accent: #72cfa5;
    --accent-strong: #225e48;
    --accent-soft: #1b3529;
    --code: #1b2821;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
  }
  .brand-mark { color: #102018; background: var(--accent); }
  .tag { color: #a5e7c8; }
  .note-box strong { color: #a5e7c8; }
  .closing-card { background: #173d2f; }
  .secondary-button { color: #173d2f; }
}
