/* ===== MilTransitionCare Blog — Design tokens ===== */
:root {
  --bg: oklch(0.985 0.005 80);
  --bg-elev: oklch(1 0 0);
  --surface: oklch(0.97 0.008 80);
  --surface-2: oklch(0.94 0.01 80);
  --rule: oklch(0.88 0.012 80);
  --rule-strong: oklch(0.78 0.015 80);

  --ink: oklch(0.22 0.02 250);
  --ink-2: oklch(0.36 0.025 250);
  --ink-3: oklch(0.52 0.022 250);
  --ink-mute: oklch(0.62 0.018 250);

  --navy: oklch(0.28 0.06 255);
  --navy-deep: oklch(0.20 0.06 255);
  --navy-soft: oklch(0.42 0.06 255);

  --gold: oklch(0.78 0.13 80);
  --gold-deep: oklch(0.66 0.14 75);
  --gold-soft: oklch(0.92 0.06 85);

  --red: oklch(0.55 0.18 25);

  --serif: "Spectral", "Source Serif 4", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --container: 1240px;
  --gutter: 28px;
  --radius: 4px;
  --radius-lg: 8px;
  --density: 1;
}

[data-theme="dark"] {
  --bg: oklch(0.16 0.015 255);
  --bg-elev: oklch(0.20 0.018 255);
  --surface: oklch(0.22 0.02 255);
  --surface-2: oklch(0.26 0.022 255);
  --rule: oklch(0.30 0.025 255);
  --rule-strong: oklch(0.40 0.03 255);
  --ink: oklch(0.96 0.008 80);
  --ink-2: oklch(0.84 0.012 80);
  --ink-3: oklch(0.70 0.015 80);
  --ink-mute: oklch(0.58 0.018 80);
  --navy: oklch(0.62 0.08 255);
  --navy-deep: oklch(0.78 0.06 255);
  --navy-soft: oklch(0.50 0.06 255);
  --gold: oklch(0.82 0.13 82);
  --gold-soft: oklch(0.32 0.06 80);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* ===== Masthead ===== */
.masthead {
  background: var(--bg);
  position: relative;
}
.masthead::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(to right, var(--navy) 0 33.33%, var(--gold) 33.33% 66.66%, var(--red) 66.66% 100%);
}
.masthead-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0; border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
}
.masthead-date { color: var(--ink-mute); }
.masthead-cta { color: var(--navy-soft); font-weight: 600; transition: color .15s; }
.masthead-cta:hover { color: var(--gold-deep); }
.masthead-logo-wrap {
  display: flex; justify-content: center; align-items: center; padding: 22px 0 24px;
}
.masthead-logo-wrap a { display: block; line-height: 0; }
.masthead-logo-wrap img { height: 60px; width: auto; }

/* ===== Primary nav (dark, sticky) ===== */
.primary-nav { background: var(--navy-deep); position: sticky; top: 0; z-index: 30; }
.primary-nav .container { display: flex; align-items: center; height: 52px; }

.nav-brand {
  display: none; align-items: center; flex-shrink: 0; padding-right: 16px;
}
.nav-brand img { height: 30px; width: auto; display: block; }

.nav-links { display: flex; align-items: stretch; flex: 1; }
.nav-links a {
  display: flex; align-items: center;
  font-size: 13px; font-weight: 500; color: oklch(0.75 0.015 80);
  letter-spacing: 0.02em; white-space: nowrap; padding: 0 14px;
  position: relative; transition: color .15s, background .15s;
}
.nav-links a:hover { color: oklch(1 0 0); background: oklch(1 0 0 / 0.06); }
.nav-links a.active { color: var(--gold); }
.nav-links a.active::after {
  content: ""; position: absolute; bottom: 0; left: 14px; right: 14px;
  height: 2px; background: var(--gold);
}

.nav-search {
  display: flex; align-items: center; gap: 7px; flex-shrink: 0; margin-left: auto;
  color: oklch(0.65 0.015 80); font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
  padding: 7px 14px; border: 1px solid oklch(0.32 0.05 255); border-radius: var(--radius);
  background: oklch(0.24 0.055 255 / 0.6); transition: color .15s, border-color .15s;
}
.nav-search:hover { color: oklch(0.92 0.012 80); border-color: oklch(0.46 0.07 255); }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 40px; height: 40px; padding: 0; margin-left: 8px;
  background: none; border: none; cursor: pointer; flex-shrink: 0;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: oklch(0.78 0.012 80);
  border-radius: 2px; transition: transform .2s, opacity .2s;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-breaking { background: oklch(0.165 0.052 255); border-top: 1px solid oklch(0.27 0.06 255 / 0.7); }
.nav-breaking .container {
  display: flex; align-items: center; gap: 10px; height: 30px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.07em;
  text-transform: uppercase; color: oklch(0.66 0.018 80);
}
.breaking-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--red);
  box-shadow: 0 0 0 0 oklch(0.55 0.18 25 / 0.6);
  animation: breath 1.6s ease-in-out infinite;
}
@keyframes breath {
  0%, 100% { box-shadow: 0 0 0 0 oklch(0.55 0.18 25 / 0.6); }
  50% { box-shadow: 0 0 0 6px oklch(0.55 0.18 25 / 0); }
}

/* ===== Section header ===== */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-top: 2px solid var(--ink); padding-top: 14px; margin-bottom: 22px; position: relative;
}
.section-head::before {
  content: ""; position: absolute; left: 0; top: -2px; width: 80px; height: 2px; background: var(--gold);
}
.section-head h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 0; letter-spacing: -0.005em; }
.section-head .more { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.section-head .more::after { content: " →"; }

/* ===== Article cards ===== */
.kicker {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold-deep); font-weight: 500; display: inline-flex; align-items: center; gap: 6px;
}
.kicker .star { color: var(--gold); font-size: 10px; }
[data-theme="dark"] .kicker { color: var(--gold); }

.byline { font-family: var(--mono); font-size: 11px; color: var(--ink-mute); letter-spacing: 0.04em; text-transform: uppercase; }
.byline .dot { margin: 0 6px; opacity: 0.5; }

.headline { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; color: var(--ink); line-height: 1.15; text-wrap: balance; }
.dek { font-family: var(--serif); font-size: 16px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.45fr 1fr; gap: 36px; padding: 36px 0 12px; }
.hero-main .post-img { aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius); width: 100%; }
.hero-main .placeholder { aspect-ratio: 16/10; }
.hero-main .headline { font-size: clamp(34px, 3.6vw, 50px); margin: 18px 0 12px; }
.hero-main .dek { font-size: 18px; line-height: 1.5; max-width: 60ch; margin: 0 0 14px; }
.hero-side { display: grid; grid-template-rows: auto auto; gap: 24px; align-content: start; }
.hero-side-card .post-img { aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius); width: 100%; }
.hero-side-card .placeholder { aspect-ratio: 16/10; }
.hero-side-card .headline { font-size: 22px; margin: 12px 0 6px; }
.hero-side-card .dek { font-size: 14px; }
.hero-side-list { display: grid; gap: 18px; }
.hero-side-list .row {
  display: grid; grid-template-columns: 88px 1fr; gap: 14px;
  padding-top: 18px; border-top: 1px solid var(--rule);
}
.hero-side-list .row:first-child { border-top: 0; padding-top: 0; }
.hero-side-list .row .post-img { width: 88px; height: 88px; object-fit: cover; border-radius: var(--radius); }
.hero-side-list .row .placeholder { aspect-ratio: 1/1; }
.hero-side-list .row .headline { font-size: 15px; line-height: 1.3; margin: 6px 0 4px; }

/* Grid cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; }

.card { display: block; }
.card .post-img { aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); margin-bottom: 14px; width: 100%; }
.card .placeholder { aspect-ratio: 4/3; margin-bottom: 14px; }
.card .headline { font-size: 20px; margin: 8px 0 8px; }
.card .dek { font-size: 14.5px; line-height: 1.45; margin-bottom: 10px; }

.card-h { display: grid; grid-template-columns: 180px 1fr; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.card-h .post-img { width: 180px; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); }
.card-h .placeholder { aspect-ratio: 4/3; margin: 0; }
.card-h .headline { font-size: 19px; margin: 6px 0 6px; }
.card-h .dek { font-size: 14px; margin-bottom: 8px; }

.card-list { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.card-list:last-child { border-bottom: 0; }
.card-list .headline { font-size: 16px; margin: 4px 0 4px; }

/* Striped placeholder */
.placeholder {
  background: repeating-linear-gradient(45deg, var(--surface) 0 14px, var(--surface-2) 14px 28px);
  border: 1px solid var(--rule); border-radius: var(--radius); position: relative; overflow: hidden;
}
.placeholder .ph-label {
  position: absolute; left: 10px; bottom: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-mute); background: var(--bg-elev); padding: 3px 6px; border-radius: 2px;
  border: 1px solid var(--rule);
}
.placeholder .ph-corner {
  position: absolute; top: 0; right: 0; width: 24px; height: 24px;
  background: var(--gold); clip-path: polygon(100% 0, 0 0, 100% 100%);
}

/* Tag chip */
.tag {
  display: inline-block; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--rule); padding: 3px 8px; border-radius: 2px;
}
.tag.tag-navy { background: var(--navy); color: oklch(0.96 0.008 80); border-color: transparent; }
.tag.tag-gold { background: var(--gold-soft); color: var(--navy-deep); border-color: var(--gold); }
.tag.tag-red  { background: oklch(0.96 0.04 25); color: var(--red); border-color: oklch(0.85 0.08 25); }
[data-theme="dark"] .tag.tag-gold { background: oklch(0.32 0.06 80); color: var(--gold); border-color: var(--gold-deep); }
[data-theme="dark"] .tag.tag-red  { background: oklch(0.28 0.06 25); color: oklch(0.85 0.12 25); border-color: oklch(0.40 0.08 25); }

/* ===== Inline tool callout ===== */
.tool-callout {
  background: linear-gradient(180deg, var(--navy-deep) 0%, var(--navy) 100%);
  color: oklch(0.96 0.008 80); border-radius: var(--radius-lg); padding: 24px 26px;
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
  margin: 32px 0;
}
.tool-callout::before {
  content: ""; position: absolute; right: -20px; top: -20px; width: 140px; height: 140px;
  background: radial-gradient(circle, oklch(0.78 0.13 80 / 0.18) 0%, transparent 70%);
}
.tool-callout .tc-kicker {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; color: var(--gold);
  text-transform: uppercase; margin-bottom: 6px; display: flex; align-items: center; gap: 8px;
}
.tool-callout .tc-kicker .bar { width: 18px; height: 2px; background: var(--gold); }
.tool-callout h4 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.01em; line-height: 1.2; }
.tool-callout p { margin: 0; font-size: 14px; color: oklch(0.86 0.012 80); max-width: 56ch; }
.tool-callout .tc-cta {
  background: var(--gold); color: var(--navy-deep); padding: 12px 18px; border-radius: var(--radius);
  font-family: var(--sans); font-weight: 600; font-size: 13.5px; letter-spacing: 0.02em;
  white-space: nowrap; transition: transform .15s, background .15s; border: 1px solid transparent;
}
.tool-callout .tc-cta:hover { background: oklch(0.84 0.13 80); transform: translateY(-1px); }

/* ===== Sidebar widgets ===== */
.widget { background: var(--bg-elev); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 24px; }
.widget-title {
  font-family: var(--serif); font-size: 17px; font-weight: 600; margin: 0 0 16px;
  padding-bottom: 12px; border-bottom: 1px solid var(--rule); display: flex; align-items: center; gap: 8px;
}
.widget-title::before { content: ""; width: 14px; height: 2px; background: var(--gold); }
.widget--newsletter { background: var(--surface); border: 1px solid var(--rule-strong); position: relative; }
.widget--newsletter::before {
  content: ""; position: absolute; left: 0; top: 0; width: 4px; height: 100%;
  background: linear-gradient(180deg, var(--navy), var(--gold)); border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
.widget--tool { background: var(--navy-deep); color: oklch(0.94 0.012 80); border-color: transparent; }
.widget--tool .widget-title { color: oklch(0.98 0.012 80); border-color: oklch(1 0 0 / 0.12); }
.widget--tool p { color: oklch(0.84 0.012 80); font-size: 13.5px; line-height: 1.5; margin: 0 0 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 16px; border-radius: var(--radius); font-family: var(--sans); font-weight: 600;
  font-size: 13.5px; letter-spacing: 0.01em; cursor: pointer; border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.btn-primary { background: var(--gold); color: var(--navy-deep); }
.btn-primary:hover { background: oklch(0.84 0.13 80); }
.btn-outline { background: transparent; border-color: var(--rule-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink-2); }
.btn-block { width: 100%; }

.input {
  width: 100%; padding: 11px 12px; font-family: var(--sans); font-size: 14px;
  background: var(--bg-elev); color: var(--ink); border: 1px solid var(--rule-strong);
  border-radius: var(--radius); transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px oklch(0.28 0.06 255 / 0.12); }

/* Related / popular list */
.related-list { display: grid; gap: 14px; }
.related-list .item { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: start; }
.related-list .item .num { font-family: var(--serif); font-size: 28px; font-weight: 600; color: var(--gold-deep); line-height: 1; font-variant-numeric: tabular-nums; }
.related-list .item .title { font-family: var(--serif); font-size: 14.5px; line-height: 1.3; color: var(--ink); font-weight: 500; }
.related-list .item .meta { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-mute); margin-top: 4px; }

/* Tools matrix */
.tool-matrix { display: grid; gap: 8px; }
.tool-matrix .tool-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 10px 12px; background: oklch(1 0 0 / 0.05); border: 1px solid oklch(1 0 0 / 0.08);
  border-radius: var(--radius); transition: background .15s; cursor: pointer; text-decoration: none;
}
.tool-matrix .tool-row:hover { background: oklch(1 0 0 / 0.1); }
.tool-matrix .tool-icon { width: 28px; height: 28px; border-radius: 4px; display: grid; place-items: center; background: oklch(1 0 0 / 0.08); font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--gold); }
.tool-matrix .tool-name { font-size: 13px; font-weight: 500; color: oklch(0.96 0.008 80); }
.tool-matrix .tool-arrow { color: var(--gold); font-family: var(--mono); }

/* ===== Footer ===== */
.footer { background: var(--navy-deep); color: oklch(0.84 0.012 80); padding: 56px 0 28px; margin-top: 64px; border-top: 4px solid var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 48px; margin-bottom: 40px; }
.footer h5 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin: 0 0 14px; font-weight: 500; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer a { font-size: 14px; color: oklch(0.86 0.012 80); }
.footer a:hover { color: oklch(0.96 0.012 80); }
.footer .brand-block .logo { font-family: var(--serif); font-size: 22px; color: oklch(0.98 0.008 80); font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.footer .brand-block p { font-size: 13.5px; line-height: 1.55; max-width: 36ch; color: oklch(0.78 0.012 80); }
.footer-bottom { border-top: 1px solid oklch(1 0 0 / 0.1); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: oklch(0.64 0.012 80); }

/* ===== Ticker ===== */
.ticker { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--surface); padding: 10px 0; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; overflow: hidden; }
.ticker .container { display: flex; gap: 32px; align-items: center; }
.ticker .label { background: var(--red); color: white; padding: 4px 8px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; font-size: 10.5px; flex-shrink: 0; }
.ticker .items { display: flex; gap: 28px; color: var(--ink-2); white-space: nowrap; overflow: hidden; }
.ticker .items span { display: inline-flex; align-items: center; gap: 8px; }
.ticker .items span::before { content: "★"; color: var(--gold-deep); font-size: 9px; }

/* ===== Category hero ===== */
.cat-hero { background: var(--navy-deep); color: oklch(0.96 0.012 80); padding: 56px 0 48px; position: relative; overflow: hidden; }
.cat-hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 50%, oklch(0.78 0.13 80 / 0.12), transparent 50%), repeating-linear-gradient(135deg, transparent 0 20px, oklch(1 0 0 / 0.015) 20px 21px);
  pointer-events: none;
}
.cat-hero .container { position: relative; }
.cat-hero .breadcrumbs { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: oklch(0.74 0.012 80); margin-bottom: 18px; }
.cat-hero .breadcrumbs a { color: var(--gold); }
.cat-hero h1 { font-family: var(--serif); font-size: clamp(40px, 4.5vw, 64px); font-weight: 600; letter-spacing: -0.015em; margin: 0 0 14px; line-height: 1.05; }
.cat-hero .dek { color: oklch(0.86 0.012 80); font-size: 18px; max-width: 64ch; }
.cat-hero .stats { display: flex; gap: 40px; margin-top: 32px; padding-top: 24px; border-top: 1px solid oklch(1 0 0 / 0.15); }
.cat-hero .stat .num { font-family: var(--serif); font-size: 32px; color: var(--gold); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.cat-hero .stat .lbl { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: oklch(0.74 0.012 80); margin-top: 6px; }

/* ===== Filter bar ===== */
.filterbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid var(--rule); margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }
.filterbar .chips { display: flex; gap: 8px; flex-wrap: wrap; }
.filterbar .chip { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-2); cursor: pointer; background: var(--bg-elev); transition: all .15s; text-decoration: none; display: inline-block; }
.filterbar .chip:hover { border-color: var(--ink-3); }
.filterbar .chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filterbar .sort { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.filterbar .sort select { font-family: var(--mono); font-size: 11.5px; background: var(--bg-elev); border: 1px solid var(--rule); color: var(--ink); padding: 6px 10px; border-radius: var(--radius); }

/* ===== Search ===== */
.search-shell { padding: 48px 0; }
.search-form { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-bottom: 32px; }
.search-form .input { font-size: 18px; padding: 16px 18px; font-family: var(--serif); }
.search-summary { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--ink-mute); margin-bottom: 24px; display: flex; justify-content: space-between; align-items: center; }
.search-summary .count strong { color: var(--ink); font-weight: 600; }
.search-result { padding: 24px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 200px 1fr; gap: 24px; }
.search-result .post-img { aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); width: 200px; }
.search-result .placeholder { aspect-ratio: 4/3; margin: 0; }
.search-result .headline { font-size: 22px; margin: 8px 0 8px; }
.search-result .dek { font-size: 15px; margin-bottom: 10px; }
.search-result mark { background: var(--gold-soft); color: var(--ink); padding: 1px 3px; border-radius: 2px; }
[data-theme="dark"] .search-result mark { background: oklch(0.32 0.06 80); color: var(--gold); }
.search-result .url { font-family: var(--mono); font-size: 11.5px; color: var(--gold-deep); letter-spacing: 0.02em; display: block; margin-bottom: 4px; }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; gap: 6px; padding: 40px 0; }
.pagination a, .pagination span { min-width: 38px; height: 38px; display: grid; place-items: center; font-family: var(--mono); font-size: 13px; border: 1px solid var(--rule); border-radius: var(--radius); color: var(--ink-2); cursor: pointer; }
.pagination a:hover { border-color: var(--ink-3); }
.pagination .current { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pagination .ellipsis { border: 0; }

/* ===== Split feature ===== */
.split-feature { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: hidden; margin: 36px 0; }
.split-feature .left { padding: 32px; background: var(--surface); }
.split-feature .right { padding: 0; }
.split-feature .post-img { height: 100%; object-fit: cover; width: 100%; display: block; }
.split-feature .placeholder { aspect-ratio: auto; height: 100%; border: 0; border-radius: 0; border-left: 1px solid var(--rule); }
.split-feature .headline { font-size: 28px; margin: 12px 0 12px; }
.split-feature .dek { font-size: 15.5px; max-width: 50ch; }

/* ===== Category rail ===== */
.cat-rail { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: hidden; margin: 8px 0 40px; }
.cat-rail a { padding: 18px 14px; text-align: center; border-right: 1px solid var(--rule); font-family: var(--sans); font-weight: 500; font-size: 13.5px; color: var(--ink-2); transition: background .15s, color .15s; position: relative; }
.cat-rail a:last-child { border-right: 0; }
.cat-rail a:hover { background: var(--surface); color: var(--ink); }
.cat-rail a .cnt { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--gold-deep); margin-top: 4px; letter-spacing: 0.04em; }
[data-theme="dark"] .cat-rail a .cnt { color: var(--gold); }

/* ===== Tabs ===== */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); margin-bottom: 24px; flex-wrap: wrap; }
.tabs .tab { padding: 10px 16px; font-size: 13px; font-weight: 500; color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s, border-color .15s; text-decoration: none; display: inline-block; }
.tabs .tab:hover { color: var(--ink-2); }
.tabs .tab.active { color: var(--ink); border-color: var(--gold); }

/* Density */
[data-density="compact"] { --density: 0.75; }
[data-density="compact"] .grid-3 { gap: 22px; }
[data-density="compact"] .hero { padding: 24px 0 8px; gap: 28px; }
[data-density="roomy"] { --density: 1.25; }
[data-density="roomy"] .grid-3 { gap: 44px; }
[data-density="roomy"] .hero { padding: 56px 0 16px; gap: 48px; }

.page-section { padding: 40px 0; }
.page-section--alt { background: var(--surface); }
.two-col { display: grid; grid-template-columns: 1fr 320px; gap: 48px; }
.star-svg { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; }

.cta-bar { background: var(--gold); color: var(--navy-deep); padding: 12px 0; text-align: center; font-family: var(--sans); font-weight: 500; font-size: 14px; }

/* ===== Article body ===== */
.article-body { font-family: var(--serif); font-size: 19px; line-height: 1.7; max-width: 70ch; }
.article-body h2 { font-size: 26px; margin: 40px 0 16px; font-family: var(--serif); }
.article-body h3 { font-size: 21px; margin: 32px 0 12px; font-family: var(--serif); }
.article-body p { margin: 0 0 20px; }
.article-body a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.article-body blockquote { border-left: 3px solid var(--gold); margin: 32px 0; padding: 16px 24px; background: var(--surface); font-style: italic; }
.article-body img { border-radius: var(--radius); margin: 28px 0; width: 100%; }
.article-body ul, .article-body ol { padding-left: 28px; margin-bottom: 20px; }
.article-body li { margin-bottom: 8px; }

/* Flash messages */
.flash { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; }
.flash-success { background: oklch(0.92 0.04 145); border: 1px solid oklch(0.75 0.1 145); color: oklch(0.28 0.1 145); }
.flash-error   { background: oklch(0.95 0.04 25);  border: 1px solid oklch(0.8 0.1 25);  color: oklch(0.35 0.15 25); }

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .nav-brand { display: flex; }
  .nav-toggle { display: flex; }
  .nav-search .nav-search-label { display: none; }
  .nav-breaking { display: none; }

  .nav-links {
    display: none; flex-direction: column; flex: unset;
    position: absolute; top: 52px; left: 0; right: 0;
    background: var(--navy-deep);
    border-top: 1px solid oklch(0.28 0.06 255 / 0.6);
    border-bottom: 2px solid var(--gold);
    z-index: 40; max-height: calc(100vh - 52px); overflow-y: auto;
    box-shadow: 0 8px 24px oklch(0 0 0 / 0.3);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a {
    display: block; height: auto; padding: 13px 20px; font-size: 14px;
    border-bottom: 1px solid oklch(0.26 0.055 255 / 0.5);
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links a.active::after { display: none; }
}
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cat-rail { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .split-feature { grid-template-columns: 1fr; }
  .split-feature .post-img { aspect-ratio: 16/10; height: auto; }
  .search-result { grid-template-columns: 1fr; }
  .tool-callout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .masthead-top { display: none; }
  .masthead-logo-wrap { padding: 14px 0 12px; }
  .masthead-logo-wrap img { height: 44px; }
}
@media (max-width: 600px) {
  .grid-3 { grid-template-columns: 1fr; }
  .cat-rail { grid-template-columns: repeat(2, 1fr); }
  .card-h { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
