/* Blog article pages. Extracted verbatim from BlogPostLayout.astro's
   <style is:global> (with Astro's :global() wrappers unwrapped to plain CSS,
   e.g. `article :global(h2)` -> `article h2`) plus the MDX content components
   (Callout, FAQ, Figure, InlineCTA) rendered inside articles. Served as a static
   /public asset so Astro can't drop it. Own <head>, own token set. */

@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin.woff2') format('woff2');
  font-weight: 100 900; font-display: swap; font-style: normal;
}
:root {
  --navy: #000000; --mint: #ff6a00; --white: #fff; --slate: #94a3b8;
  --ink: #1f2937; --line: #e5e9f0; --bg-soft: #f8fafc;
  /* Table semantic tokens (separate from the mint accent) */
  --good: #0f9d6b; --good-bg: #ecfdf5; --good-line: #a7f3d0;
  --bad: #e11d48; --bad-bg: #fff1f2; --bad-line: #fecdd3;
  --warn: #b45309; --warn-bg: #fff7ed; --warn-line: #fed7aa;
  --row-hover: #eef6ff;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Prevent horizontal scroll on mobile (sticky rail is desktop-only, so this is safe). */
@media (max-width: 1119px) { html, body { overflow-x: hidden; } }
body {
  margin: 0; font-family: Inter, system-ui, -apple-system, sans-serif;
  color: var(--ink); background: var(--white); line-height: 1.75; font-size: 19px;
}
a { color: var(--mint); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
img { max-width: 100%; }

.site-header { background: var(--navy); padding: 18px 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.brand { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.brand .cited { font-family: 'Cabinet Grotesk', system-ui, sans-serif; }
.brand .labs { color: var(--mint); }
.brand a { color: var(--white); } .brand a:hover { text-decoration: none; }

/* Hero (gradient, split: text left / image right) */
.post-hero {
  color: #fff;
  background:
    radial-gradient(900px 380px at 88% 15%, rgba(255,106,0,.16), transparent 60%),
    linear-gradient(120deg, #0a0a0a 0%, #000000 52%, #1a1a1a 100%);
  padding: 54px 0;
}
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 34px; align-items: center; }
@media (min-width: 900px) {
  .post-hero.has-img .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 48px; }
}
.hero-text { max-width: 660px; }
.badge {
  display: inline-block; background: #ecfdf5; color: #047857; font-size: 12.5px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}
.post-hero .badge { background: rgba(255,106,0,.18); color: var(--mint); }
.post-hero h1 {
  font-family: 'Cabinet Grotesk', system-ui, sans-serif; font-size: clamp(28px, 4.6vw, 44px);
  line-height: 1.16; color: #fff; margin: 0 0 18px;
}
.byline { display: flex; align-items: center; gap: 12px; color: #cbd5e1; font-size: 15px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; background: #112240; color: var(--mint);
  display: grid; place-items: center; font-family: 'Cabinet Grotesk', system-ui, sans-serif; font-weight: 700; font-size: 16px; flex: none;
}
.byline a { color: #fff; font-weight: 600; }
.hero-media { max-width: 540px; margin-left: auto; }
.hero-img { width: 100%; height: auto; border-radius: 14px; display: block; box-shadow: 0 20px 50px rgba(0,0,0,.35); }

/* Shell: floating left rail + centered column */
.post-shell { display: block; padding: 40px 0 64px; }
@media (min-width: 1120px) {
  .post-shell { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: 56px; justify-content: center; }
}
.rail { display: none; }
@media (min-width: 1120px) {
  .rail { display: block; position: sticky; top: 28px; align-self: start; }
}
.rail h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--slate); margin: 0 0 10px; }
.toc { list-style: none; margin: 0 0 26px; padding: 0; border-left: 2px solid var(--line); }
.toc a {
  display: block; padding: 6px 0 6px 14px; margin-left: -2px; color: #64748b; font-size: 14px;
  line-height: 1.35; border-left: 2px solid transparent;
}
.toc a:hover { color: var(--navy); text-decoration: none; }
.toc a.active { color: var(--navy); font-weight: 600; border-left-color: var(--mint); }
.share { display: flex; gap: 10px; }
.share a {
  width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; display: grid;
  place-items: center; color: #475569; font-size: 13px; font-weight: 700;
}
.share a:hover { border-color: var(--mint); color: var(--mint); text-decoration: none; }
.rail-cta { margin-top: 26px; padding: 20px 18px; border-radius: 12px; background: linear-gradient(160deg, #141414, #000000); color: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.rc-eyebrow { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); background: var(--mint); padding: 2px 8px; border-radius: 5px; margin-bottom: 10px; }
.rc-title { font-size: 15.5px; font-weight: 700; color: #fff; margin-bottom: 6px; line-height: 1.3; }
.rail-cta p { margin: 0 0 14px; font-size: 13.5px; color: #cbd5e1; line-height: 1.5; }
.rail-cta a { display: block; text-align: center; background: var(--mint); color: var(--navy); font-size: 14px; font-weight: 700; padding: 10px; border-radius: 8px; }
.rail-cta a:hover { text-decoration: none; filter: brightness(.96); }

/* Article */
.post-main { max-width: 720px; margin: 0 auto; min-width: 0; overflow-wrap: break-word; }
.post-main > :first-child { margin-top: 0; }
article h2 { font-family: 'Cabinet Grotesk', system-ui, sans-serif; font-size: 30px; color: var(--navy); margin: 44px 0 14px; scroll-margin-top: 24px; line-height: 1.25; }
article h3 { font-size: 21px; color: var(--navy); margin: 30px 0 8px; }
article p { margin: 0 0 20px; }
article ul, article ol { padding-left: 24px; margin: 0 0 20px; }
article li { margin: 9px 0; }
article img { max-width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.10); margin: 30px 0; display: block; }
article blockquote {
  margin: 28px 0; padding: 20px 24px; background: var(--bg-soft);
  border-left: 4px solid var(--mint); border-radius: 0 10px 10px 0; color: #334155; font-size: 18px;
}
article blockquote p:last-child { margin-bottom: 0; }
article code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: .9em; }
article pre { background: var(--navy); color: #e2e8f0; padding: 18px; border-radius: 10px; overflow-x: auto; }
article pre code { background: none; padding: 0; }
.table-wrap { margin: 28px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; }
article table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 0; }
article thead th { background: var(--navy); color: #fff; font-weight: 600; letter-spacing: .01em; }
article th, article td { padding: 12px 15px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); line-height: 1.5; }
article tbody tr:nth-of-type(even) { background: var(--bg-soft); }
article tbody tr:last-child td { border-bottom: none; }
article td:first-child, article th:first-child { font-weight: 600; color: var(--navy); }
/* Mobile: each row becomes a labelled card (no cramped horizontal scroll). */
@media (max-width: 640px) {
  .table-wrap { border: none; border-radius: 0; overflow: visible; }
  article table, article tbody, article tr, article td { display: block; width: 100%; }
  article thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  article tr { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 14px; overflow: hidden; background: #fff; }
  article tbody tr:nth-of-type(even) { background: #fff; }
  article td { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: right; white-space: normal; }
  article td:last-child { border-bottom: none; }
  article td::before { content: attr(data-label); font-weight: 600; color: var(--navy); text-align: left; flex: 0 0 40%; }
  article td:first-child { color: var(--ink); background: var(--bg-soft); }
}
/* ===== Auto/override table variants ===== */
/* Subtle row hover on every table */
article tbody tr { transition: background .14s ease; }
article tbody tr:hover { background: var(--row-hover); }
@media (prefers-reduced-motion: reduce) { article tbody tr { transition: none; } }

/* pricing: right-aligned tabular figures */
article td.num, article th.num { text-align: right; font-variant-numeric: tabular-nums; }
article td.num { font-weight: 700; color: var(--navy); white-space: nowrap; }

/* compare: green "good" column, red "bad" column, ✓/✗ icons */
article .tv-compare tbody tr:nth-of-type(even) { background: transparent; }
article td.col-good, article th.col-good { background: var(--good-bg); }
article td.col-bad, article th.col-bad { background: var(--bad-bg); }
article tbody td.col-good { border-bottom-color: var(--good-line); }
article tbody td.col-bad { border-bottom-color: var(--bad-line); }
article thead th.col-good { box-shadow: inset 0 -3px 0 var(--mint); }
article thead th.col-bad { box-shadow: inset 0 -3px 0 var(--bad); }
article .ic { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: 700; color: #fff; margin-right: 8px; vertical-align: -3px; }
article .ic-good { background: var(--good); }
article .ic-bad { background: var(--bad); }

/* matrix: status badges */
article .badge { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; line-height: 1.45; white-space: nowrap; }
article .b-yes, article .b-low { background: var(--good-bg); color: var(--good); box-shadow: inset 0 0 0 1px var(--good-line); }
article .b-no, article .b-high { background: var(--bad-bg); color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad-line); }
article .b-mid { background: var(--warn-bg); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); }
article .b-na { background: var(--bg-soft); color: var(--slate); box-shadow: inset 0 0 0 1px var(--line); }

/* data: sticky header for long reference tables */
article .tv-scroll { max-height: 440px; overflow: auto; }
article .tv-scroll thead th { position: sticky; top: 0; z-index: 2; }
@media (max-width: 640px) { article .tv-scroll { max-height: none; overflow: visible; } }
article hr { border: none; border-top: 1px solid var(--line); margin: 40px 0; }

details.toc-mobile { margin: 0 0 28px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
@media (min-width: 1120px) { details.toc-mobile { display: none; } }
details.toc-mobile summary { font-weight: 600; color: var(--navy); cursor: pointer; }
details.toc-mobile ul { list-style: none; padding: 12px 0 2px; margin: 0; }
details.toc-mobile a { display: block; padding: 5px 0; color: #475569; font-size: 15px; }

.authorbox { margin-top: 44px; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); font-size: 16px; color: #334155; }
.authorbox p { margin: 0; } .authorbox strong { color: var(--navy); }

/* Keep reading — redesigned related-posts section (image-top cards) */
.keep { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 72px 0; }
.keep .eyebrow { font-family: 'Cabinet Grotesk', system-ui, sans-serif; font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--mint); display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.keep .eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--mint); border-radius: 2px; }
.keep h2 { font-family: 'Cabinet Grotesk', system-ui, sans-serif; font-weight: 800; color: var(--navy); font-size: clamp(26px, 3.4vw, 34px); line-height: 1.08; letter-spacing: -.015em; margin: 0 0 30px; text-wrap: balance; }
.keep-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 760px) { .keep-grid { grid-template-columns: repeat(3, 1fr); } }
.kcard { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.kcard:hover { transform: translateY(-4px); box-shadow: 0 20px 42px -24px rgba(15,23,42,.35); border-color: #d7dbe4; text-decoration: none; }
.kcard__media { aspect-ratio: 16 / 9; overflow: hidden; background: #000; display: block; }
.kcard__media img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; border-radius: 0; box-shadow: none; aspect-ratio: 16 / 9; transition: transform .35s ease; }
.kcard:hover .kcard__media img { transform: scale(1.04); }
.kcard__body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.kcat { font-family: 'Cabinet Grotesk', system-ui, sans-serif; font-weight: 700; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--mint); margin: 0 0 8px; }
.ktitle { font-family: 'Cabinet Grotesk', system-ui, sans-serif; font-weight: 700; color: var(--navy); font-size: 18px; line-height: 1.24; letter-spacing: -.005em; margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color .18s ease; }
.kcard:hover .ktitle { color: var(--mint); }
.kdesc { font-family: Inter, system-ui, sans-serif; color: #475569; font-size: 14px; line-height: 1.5; margin: 0 0 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kmore { margin-top: auto; font-family: 'Cabinet Grotesk', system-ui, sans-serif; font-weight: 700; font-size: 13.5px; color: var(--mint); display: inline-flex; align-items: center; gap: 6px; }
.kmore .arw { display: inline-block; transition: transform .18s ease; }
.kcard:hover .kmore .arw { transform: translateX(4px); }

.site-footer { background: var(--navy); color: var(--slate); padding: 28px 0; font-size: 14px; }
.site-footer a { color: var(--slate); }
.footnav { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 10px; }
.footnav a:hover { color: var(--mint); text-decoration: none; }

/* ===== MDX content components (rendered inside <article>) ===== */

/* Callout */
.callout { margin: 28px 0; padding: 18px 20px; border-radius: 10px; border-left: 4px solid; }
.callout p { margin: 0 0 10px; }
.callout p:last-child { margin: 0; }
.c-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.c-tip { background: #ecfdf5; border-color: #0f9d6b; } .c-tip .c-label { color: #047857; }
.c-note { background: #f1f5f9; border-color: #94a3b8; } .c-note .c-label { color: #475569; }
.c-key { background: #fffbeb; border-color: #f59e0b; } .c-key .c-label { color: #b45309; }

/* FAQ */
.faq { margin: 10px 0 0; }
.faq-item { border-top: 1px solid var(--line); padding: 18px 0; }
.faq-item h3 { margin: 0 0 6px; color: var(--navy); font-size: 19px; }
.faq-item p { margin: 0; }

/* Figure */
.post-figure { margin: 30px 0; }
.post-figure img {
  width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 12px; box-shadow: 0 8px 30px rgba(10,25,47,.10); display: block;
}
.post-figure figcaption {
  margin-top: 9px; font-size: 13.5px; line-height: 1.5; color: #64748b;
  text-align: center; font-style: italic;
}

/* InlineCTA */
.inline-cta {
  margin: 34px 0; padding: 24px; border-radius: 16px; background: #000; color: #F2F2F2;
  border: 1px solid #2A2A2A;
  display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.inline-cta strong { display: block; font-family: 'Cabinet Grotesk', system-ui, sans-serif; font-weight: 700; font-size: 19px; margin-bottom: 4px; }
.inline-cta p { margin: 0; color: #9A9A9A; font-size: 15px; max-width: 46ch; }
.ic-btn { background: #FF6A00; color: #000; font-weight: 700; padding: 12px 22px; border-radius: 12px; text-decoration: none; white-space: nowrap; }
.ic-btn:hover { filter: brightness(1.05); }
