:root {
    --bg: #0A0E15;
    --bg-2: #0E1320;
    --panel: #121826;
    --line: #2A3244;
    --line-soft: #1C2333;
    --text: #E6E9EF;
    --muted: #B4BBC7;
    --faint: #9AA3B2;
    --accent: #EA580C;
    --accent-strong: #C2410C;
    --warm: #FDBA74;
    --display: 'Space Grotesk', system-ui, sans-serif;
    --body: Inter, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); line-height: 1.55; font-size: 16px; }
a { color: var(--text); }
a:hover { color: var(--warm); }
img { max-width: 100%; height: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.wrap-text { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.logo { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -0.02em; text-decoration: none; }
.logo span { color: var(--accent); }
.site-nav { display: flex; flex-wrap: wrap; gap: 26px; font-size: 15px; font-weight: 500; }
.site-nav a { text-decoration: none; }

/* Type */
.eyebrow { margin: 0 0 18px; font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.eyebrow.warm { color: var(--warm); }
h1, .h2, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; }
.accent { color: var(--accent); }
.lede { margin: 22px auto 0; max-width: 620px; font-size: 19px; color: var(--muted); }
.lede-sm { margin: 22px 0 0; font-size: 18px; color: var(--muted); }
.small { margin: 14px 0 0; font-size: 14px; color: var(--faint); }
.h2 { margin: 0; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; }

/* Hero */
.hero { padding-top: 80px; padding-bottom: 56px; text-align: center; }
.hero h1 { margin: 0; font-weight: 700; font-size: clamp(40px, 6vw, 66px); line-height: 1.04; letter-spacing: -0.03em; }

/* Subscribe form */
.subscribe { margin: 38px auto 0; max-width: 600px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.subscribe input { flex: 1 1 260px; min-width: 0; height: 54px; padding: 0 16px; border: 0; background: transparent; color: #fff; font: inherit; font-size: 17px; }
.subscribe input:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.subscribe button { height: 54px; padding: 0 24px; border: 0; border-radius: 10px; background: var(--accent-strong); color: #fff; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
.subscribe button:hover { background: #9A3412; }
.form-msg { display: none; flex-basis: 100%; margin: 4px 8px; font-size: 14px; }
.subscribe.success .form-success { display: block; color: #86EFAC; }
.subscribe.error .form-error { display: block; color: #FCA5A5; }
.subscribe.loading button { opacity: 0.6; }
.subscribed { margin-top: 30px; color: var(--warm); }

/* Panels */
.block { padding-bottom: 88px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.panel-head { padding: 20px 28px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.panel-head h2 { margin: 0; font-family: var(--body); font-size: 17px; font-weight: 600; letter-spacing: 0; }
.panel-head span { font-size: 13px; color: var(--faint); }
.tiles { padding: 24px 28px; display: flex; flex-wrap: wrap; gap: 16px; }
.tile { flex: 1 1 220px; background: var(--bg-2); border-radius: 12px; padding: 20px; }
.tile p { margin: 0; font-size: 15px; }
.tile .tile-label { margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--warm); text-transform: uppercase; letter-spacing: 0.06em; }
.panel-foot { padding: 16px 28px; border-top: 1px solid var(--line); font-size: 14px; color: var(--faint); }
.latest { display: flex; flex-direction: column; gap: 10px; }
.latest-item, .archive-item { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; text-decoration: none; }
.latest-item time, .archive-item time { color: var(--faint); font-size: 14px; }
.cta { padding: 36px; text-align: center; }
.cta h2 { margin: 0; font-size: 28px; }
.cta p { margin: 10px 0 0; color: var(--muted); }
.cta .subscribe { margin-top: 24px; }

/* Archive */
.archive { padding-top: 48px; }
.archive .h2 { margin-bottom: 28px; }
.archive-item { flex-direction: column; gap: 4px; padding: 22px 28px; border-bottom: 1px solid var(--line); }
.archive-item:last-child { border-bottom: 0; }
.archive-title { font-family: var(--display); font-size: 21px; font-weight: 600; }
.archive-excerpt { color: var(--muted); font-size: 15px; }
.archive-empty { padding: 28px; margin: 0; color: var(--faint); }
.pagination { display: flex; justify-content: space-between; margin-top: 24px; color: var(--faint); font-size: 14px; }

/* Health check band */
.band { background: var(--bg-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.split { padding-top: 88px; padding-bottom: 88px; display: flex; flex-wrap: wrap; gap: 56px; }
.split-main { flex: 1 1 420px; min-width: 0; }
.split-side { flex: 1 1 360px; min-width: 0; align-self: flex-start; }
.pills { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.pills span { border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 14px; color: #C9CED8; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 30px; }
.card h3 { margin: 0 0 10px; font-size: 22px; }
.card p { margin: 0 0 22px; color: var(--muted); }
.btn-light { display: inline-block; text-decoration: none; background: #fff; color: var(--bg); padding: 14px 22px; border-radius: 8px; font-weight: 600; }
.btn-light:hover { background: var(--warm); color: var(--bg); }

/* About */
.about { padding-top: 88px; padding-bottom: 88px; text-align: center; }
.about-line { margin: 0; font-family: var(--display); font-size: clamp(24px, 3vw, 32px); line-height: 1.3; letter-spacing: -0.01em; }
.links { margin: 22px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; font-weight: 500; }

/* Article */
.article { padding-top: 56px; padding-bottom: 56px; }
.article-head h1 { margin: 0; font-size: clamp(34px, 5vw, 52px); line-height: 1.08; letter-spacing: -0.03em; }
.article-head .lede { margin-left: 0; }
.article-image { margin-top: 36px; margin-bottom: 0; }
.article-image img { border-radius: 12px; }
.article-image figcaption { margin-top: 8px; font-size: 14px; color: var(--faint); }
.gh-content { max-width: 720px; margin: 40px auto 0; padding: 0 24px; font-size: 18px; line-height: 1.7; color: #D5D9E0; }
.gh-content > * + * { margin-top: 1.25em; }
.gh-content h2 { font-size: 30px; line-height: 1.2; margin-top: 2em; color: var(--text); }
.gh-content h3 { font-size: 23px; margin-top: 1.6em; color: var(--text); }
.gh-content a { color: var(--warm); }
.gh-content blockquote { margin-left: 0; padding-left: 20px; border-left: 3px solid var(--accent); color: var(--muted); }
.gh-content pre { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px; overflow-x: auto; font-size: 15px; }
.gh-content code { font-size: 0.9em; background: var(--panel); padding: 2px 6px; border-radius: 4px; }
.gh-content pre code { background: none; padding: 0; }
.gh-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.gh-content table { width: 100%; border-collapse: collapse; font-size: 16px; }
.gh-content th, .gh-content td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; }
.gh-content figcaption { font-size: 14px; color: var(--faint); text-align: center; margin-top: 8px; }

/* Ghost editor card widths (required) */
.kg-width-wide { position: relative; width: 85vw; min-width: 100%; margin-left: calc(50% - 50vw); transform: translateX(calc(50vw - 50%)); }
.kg-width-full { position: relative; width: 100vw; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; }
.kg-width-full img { width: 100%; }

/* Footer */
.site-footer { border-top: 1px solid var(--line-soft); }
.footer-inner { padding-top: 26px; padding-bottom: 26px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--faint); }

@media (max-width: 600px) {
    .hero { padding-top: 48px; }
    .site-nav { gap: 18px; }
    .split { padding-top: 64px; padding-bottom: 64px; }
}
