@font-face{font-family:'Cabinet Grotesk';src:url(../fonts/cabinet-grotesk-800.woff2) format('woff2');font-weight:800;font-display:swap}
@font-face{font-family:'Cabinet Grotesk';src:url(../fonts/cabinet-grotesk-700.woff2) format('woff2');font-weight:700;font-display:swap}
@font-face{font-family:'Switzer';src:url(../fonts/switzer-400.woff2) format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:'Switzer';src:url(../fonts/switzer-500.woff2) format('woff2');font-weight:500;font-display:swap}
@font-face{font-family:'Switzer';src:url(../fonts/switzer-600.woff2) format('woff2');font-weight:600;font-display:swap}

/* Same paper as the landing and legal pages: warm off-white page, with the
   second tonal step (code blocks) cut from the same warmth. */
:root{
  --bg:#FAF8F4; --ink:#16191C; --muted:#5A6167;
  --accent:#E8531F; --accent-text:#B23F17;
  --band:#F1EDE6;
  --deep:#33383D; --on-deep:#F2F3F4; --rule:rgba(22,25,28,.14);
}
*{box-sizing:border-box}
/* `clip`, not `hidden`: both stop sideways scrolling, but `hidden` makes this
   a scroll container, which stops position:sticky working anywhere inside it
   (the contents sidebar just scrolls away). */
html,body{overflow-x:clip}
body{margin:0;background:var(--bg);color:var(--ink);font-family:'Switzer',system-ui,sans-serif;
  -webkit-font-smoothing:antialiased;font-size:17px;line-height:1.65}
.wrap{max-width:720px;margin:0 auto;padding:0 24px}
a{color:var(--accent-text)}

.blog-nav{display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:22px 0;border-bottom:1px solid var(--rule);margin-bottom:44px}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink)}
.brand img{height:26px;width:auto;border-radius:6px}
.brand b{font-family:'Cabinet Grotesk',sans-serif;font-size:19px;font-weight:800;letter-spacing:-.02em}
/* Mirrors the landing nav: links collapse under 760px, the chip stays. */
.nav-links{display:flex;align-items:center;gap:24px;font-size:14px;font-weight:500}
.nav-links a{color:var(--muted);text-decoration:none}
.nav-links a:hover{color:var(--ink)}
.nav-links a[aria-current="page"]{color:var(--ink)}
@media (max-width:760px){.nav-links a{display:none}}

/* Kept in the article flow, so it survives the mobile nav collapse. */
.post-back{margin:0 0 16px;font-size:14px;font-weight:500}
.post-back a{color:var(--muted);text-decoration:none}
.post-back a:hover{color:var(--ink)}

h1{font-family:'Cabinet Grotesk',sans-serif;font-weight:800;letter-spacing:-.025em;
  font-size:clamp(2rem,5vw,2.9rem);line-height:1.08;margin:0 0 10px}
.post-date{color:var(--muted);font-size:14px;font-weight:500;margin:0 0 22px}
/* The byline name links to the author's profile page. Underlined on the rule
   colour so it reads as a link without competing with the headline. */
.byline-author{color:var(--muted);text-decoration:underline;text-decoration-color:var(--rule);text-underline-offset:2px}
.byline-author:hover{color:var(--accent-text);text-decoration-color:currentColor}
.post{padding-bottom:8px}
.post h2{font-family:'Cabinet Grotesk',sans-serif;font-weight:800;letter-spacing:-.02em;
  font-size:1.5rem;margin:38px 0 12px}
.post h3{font-family:'Cabinet Grotesk',sans-serif;font-weight:700;font-size:1.2rem;margin:28px 0 10px}
.post p{margin:0 0 18px}
.post ul,.post ol{margin:0 0 18px;padding-left:22px}
.post li{margin:0 0 8px}
/* max-width keeps a 2x screenshot inside the column instead of overflowing it. */
.post img{max-width:100%;height:auto;border-radius:10px;border:1px solid var(--rule);margin:24px 0}
.post blockquote{margin:22px 0;padding:2px 18px;border-left:3px solid var(--accent);color:var(--muted)}
.post code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.9em;
  background:var(--band);padding:2px 6px;border-radius:5px}
.post pre{background:var(--band);border:1px solid var(--rule);border-radius:10px;padding:16px 18px;overflow-x:auto}
.post pre code{background:none;padding:0}

/* Headings carry ids so sections are directly linkable; this keeps the target
   off the very top edge when one is jumped to. */
.post h2[id]{scroll-margin-top:20px}

/* Contents list. Below 1180px it is an inline card sitting between the
   headline and the body (order:-1 puts it there without splitting the
   article); at 1180px and up it moves into the right gutter and sticks. */
.post-layout{display:flex;flex-direction:column}
.post-toc{order:-1;margin:0 0 30px;padding:18px 22px;border:1px solid var(--rule);border-radius:12px}
.post-toc-title{font-size:12.5px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;
  color:var(--muted);margin:0 0 10px}
/* Ordered for semantics, unmarked for looks: post headings often carry their
   own "1." already, and list markers would double it up. */
.post-toc ol{list-style:none;margin:0;padding-left:0;font-size:15.5px}
.post-toc li{margin:0 0 6px}
.post-toc li:last-child{margin-bottom:0}
/* The rule is on the anchor, not the li, so marking the active section swaps a
   colour rather than adding a box: nothing in the list shifts as you scroll. */
.post-toc a{display:block;padding-left:12px;border-left:2px solid transparent;
  color:var(--ink);text-decoration:none}
.post-toc a:hover{color:var(--accent-text)}
.post-toc a[aria-current]{color:var(--accent-text);border-left-color:var(--accent)}

@media (min-width:1180px){
  /* 24px padding either side leaves a 1000px inner row: 720 article, 48 gap,
     232 sidebar. The article column keeps the same measure as every other page. */
  .wrap.has-aside{max-width:1048px}
  .post-layout{display:grid;grid-template-columns:minmax(0,1fr) 232px;gap:0 48px;align-items:start}
  .has-aside .post-header,.has-aside .post-cta,.has-aside .related,.has-aside .post-pager{max-width:720px}
  .post-toc{order:0;position:sticky;top:24px;margin:0;max-height:calc(100vh - 48px);overflow-y:auto}
  footer.has-aside .shell{max-width:1048px}
}

/* Older/newer pager. Collapses to one column on narrow screens. */
.post-pager{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:0 0 44px}
.pager-link{display:flex;flex-direction:column;gap:6px;padding:16px 18px;
  border:1px solid var(--rule);border-radius:12px;text-decoration:none;color:var(--ink)}
/* Anchor-only: the empty half of the pager on a first/last post is a spacer,
   and a bare .pager-link:hover would light it up as a box with nothing in it. */
a.pager-link:hover{border-color:var(--ink)}
.pager-empty{border-color:transparent;pointer-events:none}
.pager-label{font-size:12.5px;font-weight:600;letter-spacing:.04em;color:var(--muted)}
.pager-title{font-family:'Cabinet Grotesk',sans-serif;font-weight:700;letter-spacing:-.01em;
  font-size:1.02rem;line-height:1.25}
.pager-next{text-align:right}
@media (max-width:560px){
  .post-pager{grid-template-columns:1fr}
  .pager-empty{display:none}
  .pager-next{text-align:left}
}

/* Related articles: a horizontal snap track of date + title cards. */
.related{margin:0 0 40px}
.related-head{display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding-top:26px;border-top:1px solid var(--rule);margin:0 0 16px}
.related h2{font-family:'Cabinet Grotesk',sans-serif;font-weight:800;letter-spacing:-.02em;
  font-size:1.25rem;margin:0}
.related-nav{display:flex;gap:8px;flex:none}
/* display:flex would otherwise beat the UA's [hidden] rule, so the arrows
   would stay on screen when the script hides them. */
.related-nav[hidden]{display:none}
.related-nav button{width:34px;height:34px;display:grid;place-items:center;padding:0;
  border:1px solid var(--rule);border-radius:9px;background:none;color:var(--ink);
  font:inherit;font-size:15px;line-height:1;cursor:pointer}
.related-nav button:hover:not(:disabled){border-color:var(--ink)}
.related-nav button:disabled{opacity:.3;cursor:default}
.related-track{display:flex;gap:14px;list-style:none;margin:0;padding:0 0 4px;
  overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;
  scrollbar-width:none}
.related-track::-webkit-scrollbar{display:none}
.related-track:focus-visible{outline:2px solid var(--accent);outline-offset:4px;border-radius:12px}
/* Snapping fights a drag in progress, so it is switched off for the duration. */
.related-track.is-dragging{scroll-snap-type:none;scroll-behavior:auto;cursor:grabbing;user-select:none}
.related-track.is-dragging a{cursor:grabbing}
.related-card a{-webkit-user-drag:none}
.related-card{flex:0 0 262px;scroll-snap-align:start}
.related-card a{display:flex;flex-direction:column;gap:8px;height:100%;padding:16px 18px;
  border:1px solid var(--rule);border-radius:12px;text-decoration:none;color:var(--ink)}
.related-card a:hover{border-color:var(--ink)}
.related-card .date{color:var(--muted);font-size:13px;font-weight:500}
.related-title{font-family:'Cabinet Grotesk',sans-serif;font-weight:700;letter-spacing:-.01em;
  font-size:1.02rem;line-height:1.25}
@media (max-width:480px){.related-card{flex-basis:80%}}
@media (prefers-reduced-motion:reduce){.related-track{scroll-behavior:auto}}

/* Comparison tables. The wrapper scrolls rather than the page, so a wide table
   can never push the article sideways on a phone. */
.post .table-wrap{overflow-x:auto;margin:0 0 22px;border:1px solid var(--rule);border-radius:10px}
.post table{border-collapse:collapse;width:100%;min-width:460px;font-size:14.5px;line-height:1.45}
.post th,.post td{text-align:left;padding:11px 14px;border-bottom:1px solid var(--rule);vertical-align:top}
.post thead th{font-family:'Cabinet Grotesk',sans-serif;font-weight:700;font-size:13.5px;
  letter-spacing:.01em;white-space:nowrap;background:#F7F5F1}
.post tbody tr:last-child td{border-bottom:0}
.post td:first-child{white-space:nowrap}

.post-cta{margin:44px 0;padding:24px;border:1px solid var(--rule);border-radius:14px;
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px}
.post-cta p{margin:0;max-width:60ch}
.chip{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--rule);border-radius:4px;
  padding:7px 13px;font-size:12.5px;font-weight:600;color:var(--ink);letter-spacing:.02em;white-space:nowrap}
.chip::before{content:'';width:6px;height:6px;border-radius:50%;background:var(--accent);flex:none}

/* Same footer band as the landing page and the legal pages. Full-bleed, with
   an inner shell at the .wrap width so it lines up with the nav above it. */
footer{background:var(--deep);margin-top:56px;padding:34px 0;font-size:13.5px;color:#B9BEC4}
footer .shell{max-width:720px;margin:0 auto;padding:0 24px;display:flex;
  justify-content:space-between;gap:16px;flex-wrap:wrap;align-items:center}
footer a{color:#B9BEC4;text-decoration:none}
footer a:hover{color:var(--on-deep);text-decoration:none}
footer .links{display:flex;gap:20px;flex-wrap:wrap}

/* index listing */
.post-list{list-style:none;margin:8px 0 0;padding:0}
.post-list li{padding:22px 0;border-bottom:1px solid var(--rule)}
.post-list a{font-family:'Cabinet Grotesk',sans-serif;font-weight:800;letter-spacing:-.02em;
  font-size:1.4rem;color:var(--ink);text-decoration:none;line-height:1.15;display:inline-block}
.post-list a:hover{color:var(--accent-text)}
.post-list .excerpt{color:var(--muted);margin:8px 0 0}
.post-list .date{color:var(--muted);font-size:13px;font-weight:500;margin:0 0 6px}
.blog-intro{color:var(--muted);font-size:1.05rem;margin:0 0 8px;max-width:60ch}
.empty{color:var(--muted)}

/* author profile (/blog/authors/<slug>) */
.author-head{margin:0 0 14px}
.author-role{color:var(--muted);font-size:14px;font-weight:600;letter-spacing:.02em;margin:8px 0 0}
.author-bio{color:var(--muted);max-width:60ch}
.author-bio p{margin:0 0 14px}
.author-links{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:14px;font-weight:500;margin:0 0 8px}
.author-posts-title{font-family:'Cabinet Grotesk',sans-serif;font-weight:800;letter-spacing:-.02em;
  font-size:1.25rem;margin:36px 0 0;padding-top:26px;border-top:1px solid var(--rule)}
