/* Blog pages (/blog/ and /blog/<slug>/). Same tokens, nav and footer as the
   home page, plus a reading layout. An external file so the CSP can stay strict. */
:root {
  --white: #FFFFFF;
  --gray: #F5F5F7;
  --ink: #1D1D1F;
  --text: #1D1D1F;
  --muted: #6E6E73;
  --faint: #86868B;
  --line: #D2D2D7;
  --blue: #0B5FD6;
  --blue-hover: #0A54BE;
  --pale: #E8F0FC;
  --link: #0066CC;
  --gutter: clamp(16px, 3.2vw, 44px);
  --wide: 1680px;
  --content: 1180px;
  --z-nav: 50;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--white); color: var(--text); line-height: 1.47; letter-spacing: -0.012em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { color: var(--ink); font-weight: 600; letter-spacing: -0.028em; text-wrap: balance; }
p, li { text-wrap: pretty; }
.wide { width: min(var(--wide), 100% - 2 * var(--gutter)); margin-inline: auto; }
.content { width: min(var(--content), 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
.ico { display: inline-block; flex-shrink: 0; vertical-align: -0.14em; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border-radius: 980px; font: 500 17px/1 var(--font); letter-spacing: -0.02em; border: 0; cursor: pointer; transition: background .2s ease, transform .15s ease; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-hover); }

/* Nav (matches the home page) */
.nav { position: sticky; top: 0; z-index: var(--z-nav); background: rgba(255,255,255,.72); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(0,0,0,.08); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 52px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 19px; color: var(--ink); letter-spacing: -0.03em; }
.logo img { width: 28px; height: 28px; border-radius: 7px; }
.nav-links { display: flex; gap: 30px; font-size: 13px; color: #424245; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-cta .btn { min-height: 30px; padding: 0 14px; font-size: 13px; }
.nav-signin { font-size: 13px; color: #424245; padding: 6px; }
.nav-signin:hover { color: var(--ink); }
@media (pointer: coarse) { .nav-links a { padding: 12px 6px; } .nav-signin { padding: 12px 8px; } .foot-top nav a { padding: 10px 4px; } }

/* Article header */
.post-head { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(28px, 5vw, 88px); align-items: center; padding: clamp(32px, 5vw, 72px) 0 clamp(40px, 5vw, 72px); max-width: 1320px; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--muted); }
.crumbs a { color: var(--blue); }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.crumbs .ico { color: var(--faint); }
.post-head h1 { margin-top: 18px; font-size: clamp(36px, 4.6vw, 62px); line-height: 1.06; letter-spacing: -0.042em; font-weight: 700; }
.dek { margin-top: 20px; font-size: clamp(19px, 1.8vw, 23px); line-height: 1.42; color: var(--muted); letter-spacing: -0.02em; max-width: 38em; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 26px; font-size: 15px; color: var(--faint); }
.post-cover { justify-self: end; width: 100%; max-width: 500px; }
.post-cover img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: clamp(22px, 2.4vw, 34px); background: var(--gray); }

/* Article layout: sticky contents on the left, reading column on the right */
.post-layout { display: grid; grid-template-columns: 230px minmax(0, 720px); gap: clamp(32px, 5vw, 96px); justify-content: center; padding-bottom: clamp(56px, 7vw, 96px); }
.toc { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 96px); overflow: auto; padding-right: 6px; }
.toc p { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.toc ol { list-style: none; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; font-size: 14px; line-height: 1.35; color: var(--muted); }
.toc a:hover { color: var(--ink); border-left-color: var(--ink); }

/* Reading column */
.prose { font-size: 19px; line-height: 1.62; color: #2A2A2C; letter-spacing: -0.014em; }
.prose > * + * { margin-top: 1.05em; }
.prose .lede { font-size: clamp(21px, 2vw, 24px); line-height: 1.5; color: var(--ink); letter-spacing: -0.02em; }
.prose h2 { margin-top: 2.1em; font-size: clamp(27px, 2.6vw, 34px); line-height: 1.15; letter-spacing: -0.035em; font-weight: 700; scroll-margin-top: 76px; }
.prose h3 { margin-top: 1.7em; font-size: 22px; line-height: 1.25; letter-spacing: -0.025em; scroll-margin-top: 76px; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(0,102,204,.35); }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--faint); }
.prose ol > li::marker { font-weight: 600; }
.prose ul.checklist { list-style: none; padding-left: 0; }
.prose ul.checklist li { position: relative; padding-left: 34px; }
.prose ul.checklist li::before { content: ""; position: absolute; left: 0; top: .2em; width: 22px; height: 22px; border-radius: 7px; background: var(--pale) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%230B5FD6' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.prose figure { margin: 2em 0; }
.prose figure img { width: 100%; border-radius: 20px; background: #fff; outline: 1px solid var(--line); outline-offset: -1px; }
.prose figcaption { margin-top: 12px; font-size: 15px; line-height: 1.45; color: var(--muted); }
.prose aside.note { padding: 20px 24px; border-radius: 18px; background: var(--pale); font-size: 17px; line-height: 1.55; color: #24324A; }
.prose pre { padding: 18px 20px; border-radius: 16px; background: var(--gray); overflow-x: auto; }
.prose code { font: 15px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; color: var(--ink); }
.prose small { display: block; }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line); -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
.prose caption { caption-side: bottom; text-align: left; padding: 12px 16px 14px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
.prose th, .prose td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid #E8E8ED; }
.prose thead th { background: var(--gray); font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; border-bottom-color: var(--line); }
.prose tbody tr:last-child > * { border-bottom: 0; }
.prose tbody th { font-weight: 600; color: var(--ink); white-space: nowrap; }
.prose td small, .prose th small { margin-top: 3px; font-size: 13px; color: var(--muted); }
.policy-table td:nth-child(3), .policy-table td:nth-child(4), .policy-table th a { font-variant-numeric: tabular-nums; white-space: nowrap; }
.policy-table td:nth-child(2) { min-width: 180px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 980px; font-size: 13px; font-weight: 600; background: var(--gray); color: var(--ink); white-space: nowrap; }
.pill.required { background: var(--blue); color: #fff; }
.pill.optional { background: var(--pale); color: #0A4CAD; }
.pill.not_considered { background: #EDEDF0; color: var(--muted); }
.na { color: var(--faint); }

/* End of article */
.post-faq h3 { font-size: 20px; }
.post-faq h3 + p { margin-top: .4em; color: #3A3A3C; }
.sources ol { font-size: 16px; }
.sources > p { font-size: 15px; color: var(--muted); }
.prose .about { margin-top: 2.6em; padding: 20px 24px; border-radius: 18px; background: var(--gray); font-size: 16px; line-height: 1.55; color: var(--muted); }

/* Cards (blog index and "Keep reading") */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 1.6vw, 24px); }
.card { display: flex; flex-direction: column; border-radius: clamp(20px, 2vw, 28px); background: var(--gray); overflow: hidden; transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(29,29,31,.10); }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 30%; background: #E8E8ED; }
.card-copy { display: flex; flex-direction: column; flex: 1; padding: clamp(20px, 2vw, 28px); }
.card-tag { font-size: 13px; font-weight: 600; color: var(--blue); }
.card-title { margin-top: 8px; font-size: clamp(21px, 1.8vw, 24px); line-height: 1.18; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); text-wrap: balance; }
.card-desc { margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-min { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 16px; font-size: 13px; color: var(--faint); }
.card.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.card.feature img { aspect-ratio: 5 / 4; height: 100%; object-position: center 35%; }
.card.feature .card-copy { justify-content: center; padding: clamp(28px, 4vw, 64px); }
.card.feature .card-title { font-size: clamp(30px, 3.2vw, 46px); line-height: 1.08; letter-spacing: -0.04em; }
.card.feature .card-desc { font-size: 18px; -webkit-line-clamp: 4; }
.card.feature .card-min { margin-top: 0; padding-top: 22px; }

.related { padding: clamp(56px, 7vw, 96px) 0 0; border-top: 1px solid #E8E8ED; }
.related h2 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.035em; font-weight: 700; margin-bottom: clamp(22px, 2.6vw, 36px); }

/* Blog index */
.blog-head { padding: clamp(48px, 7vw, 104px) 0 clamp(32px, 4vw, 56px); }
.eyebrow { font-size: 17px; font-weight: 600; color: var(--blue); }
.blog-head h1 { margin-top: 10px; font-size: clamp(42px, 6vw, 80px); line-height: 1.03; letter-spacing: -0.045em; font-weight: 700; max-width: 14ch; }
.blog-head .dek { max-width: 34em; }
.posts { margin-top: clamp(16px, 1.6vw, 24px); }

/* Footer */
footer { background: var(--gray); padding: 28px 0 64px; margin-top: clamp(72px, 9vw, 130px); font-size: 12px; color: var(--muted); }
.foot-top { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.foot-top nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-top nav a:hover { color: var(--ink); text-decoration: underline; }
.foot-logo { font-size: 15px; }
.foot-logo img { width: 22px; height: 22px; border-radius: 6px; }
.fine { padding-top: 16px; line-height: 1.6; max-width: 900px; }

@media (max-width: 1068px) {
  .post-layout { grid-template-columns: minmax(0, 720px); }
  .toc { position: static; max-height: none; padding: 18px 20px; border-radius: 18px; background: var(--gray); }
  .toc ol { border-left: 0; }
  .toc a { padding: 5px 0; border-left: 0; margin-left: 0; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 833px) {
  .nav-links { gap: 0; }
  .nav-links a:not(.nav-blog) { display: none; }
  .post-head { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 24px; }
  .post-cover { justify-self: stretch; max-width: none; }
  .post-cover img { aspect-ratio: 4 / 3; object-position: center 30%; }
  .card.feature { grid-template-columns: minmax(0, 1fr); }
  .card.feature img { min-height: 0; height: auto; aspect-ratio: 4 / 3; }
}
@media (max-width: 640px) {
  .nav-cta .btn { display: none; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .prose { font-size: 18px; }
  .prose table { font-size: 15px; }
  /* Diagrams are drawn at 1200px wide: on phones they scroll sideways at a readable size. */
  .prose figure:has(img[src$=".svg"]) { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .prose figure img[src$=".svg"] { width: 760px; max-width: none; }
  .prose figure:has(img[src$=".svg"]) figcaption { position: sticky; left: 0; max-width: calc(100vw - 2 * var(--gutter)); }
  .prose th, .prose td { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .card:hover { transition: none; transform: none; }
}
