/* RouterPlus Blog: editorial content styles. Shared navigation and footer live in site.css. */
@font-face { font-family: "Serotiva"; src: url("/assets/fonts/serotiva-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Serotiva"; src: url("/assets/fonts/serotiva-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
:root {
  --paper: #fefcfb;
  --paper-bright: #fff;
  --ink: #302e23;
  --muted: #6b6656;
  --faint: #898577;
  --line: #e3e1de;
  --line-dark: #d5d1c8;
  --blue: #315cda;
  --orange: var(--blue);
  --hot: #2449b8;
  --wash-orange: #f2d58f;
  --wash-pink: #f4e2f6;
  --wash-violet: #e8e2fc;
  --wash-blue: #c9d8f8;
  --wash-lime: #edf0d9;
  --bg: var(--paper);
  --plume-wash: #edf2fc;
  --text-main: var(--ink);
  --text-meta: var(--muted);
  --accent: var(--blue);
  --border-dark: var(--line-dark);
  --border-light: var(--line);
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --display: "Serotiva", var(--font);
  --font-serif: var(--display);
  --font-sans: var(--font);
  --pad: clamp(20px, 5vw, 72px);
  --prose: 760px;
  --shell: 1200px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper); color: var(--ink); font-family: var(--font);
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100vh;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.blog-page main { flex: 1 0 auto; padding: 80px var(--pad) 100px; }
.blog-page main > .wrap { max-width: var(--prose); margin: 0 auto; }
.blog-index main > .wrap { max-width: var(--shell); }

/* Listing */
.blog-intro { margin-bottom: 56px; max-width: 800px; }
.blog-eyebrow { margin-bottom: 20px; font: 500 12px/1.5 var(--mono); color: var(--muted); }
.blog-intro h1 { font: 500 clamp(48px, 6.1vw, 88px)/1.02 var(--display); letter-spacing: -.035em; margin-bottom: 22px; }
.blog-intro h1 em { color: var(--blue); font-style: normal; }
.blog-intro p { font-size: 20px; line-height: 1.5; max-width: 48ch; color: var(--muted); }
.post-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.post-list > li { min-width: 0; }
.post-list > li:first-child { grid-column: 1 / -1; }
.post-item { display: flex; flex-direction: column; gap: 24px; height: 100%; padding: 32px; border: 1px solid var(--line); background: var(--paper); text-decoration: none; transition: border-color .2s, background .2s; }
.post-list > li:first-child .post-item { padding: 44px; background: #edf2fc; border-color: #dce4f4; }
.post-item:hover { border-color: var(--blue); }
.post-item:hover .post-item-title { color: var(--blue); }
.post-thumb { display: block; width: 100%; height: auto; aspect-ratio: 2.5 / 1; object-fit: cover; border: 1px solid var(--line); }
.post-meta { font: 400 12px/1.6 var(--mono); color: var(--muted); margin-bottom: 18px; }
.post-item-title { font: 500 clamp(27px, 2.5vw, 36px)/1.12 var(--display); letter-spacing: -.025em; margin-bottom: 14px; transition: color .2s; text-wrap: balance; }
.post-list > li:first-child .post-item-title { font-size: clamp(34px, 4vw, 52px); max-width: 24ch; margin-bottom: 12px; }
.post-item-subtitle { color: var(--muted); font-size: 22px; line-height: 1.4; margin-bottom: 24px; }
.post-item-excerpt { font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 64ch; }
.post-item-byline { font: 400 12px/1.7 var(--mono); color: var(--ink); margin-top: 24px; }
.post-item-featured { position: relative; }
.post-item-featured .post-item-title a { text-decoration: none; }
.post-item-featured .post-item-title a::after { content: ""; position: absolute; inset: 0; }
.post-item-featured .post-item-byline a { position: relative; z-index: 1; color: var(--blue); text-underline-offset: 3px; }
.post-item-featured:focus-within { border-color: var(--blue); }

/* Articles */
.post-header { margin-bottom: 48px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.post-kicker { font: 400 12px/1.7 var(--mono); color: var(--muted); margin-bottom: 24px; }
.post-kicker a { color: var(--blue); text-decoration: none; }
.post-kicker a:hover { text-decoration: underline; text-underline-offset: 4px; }
.post-title { font: 500 clamp(40px, 5vw, 66px)/1.07 var(--display); letter-spacing: -.035em; margin-bottom: 22px; text-wrap: balance; overflow-wrap: anywhere; }
.post-title em { font-style: normal; color: var(--blue); }
.post-subtitle { font: 400 23px/1.45 var(--font); color: var(--muted); margin-bottom: 28px; }
.post-byline, .post-date { font: 400 12px/1.8 var(--mono); color: var(--muted); }
.post-date { display: block; margin-top: 4px; }
.post-byline a { color: var(--blue); text-decoration: none; }
.post-byline a:hover { text-decoration: underline; text-underline-offset: 3px; }
.article { font-size: 18px; line-height: 1.75; overflow-wrap: break-word; }
.article > p { margin-bottom: 24px; }
.article .lead { font-size: 22px; line-height: 1.6; margin-bottom: 32px; }
.article h2 { font: 500 34px/1.16 var(--display); letter-spacing: -.025em; margin: 48px 0 20px; }
.article h3 { font: 500 25px/1.25 var(--display); letter-spacing: -.015em; margin: 34px 0 14px; }
.article ul, .article ol { margin: 0 0 24px 1.2em; }
.article li { margin-bottom: 10px; }
.article strong { font-weight: 600; }
.article a { color: var(--blue); text-decoration: underline; text-decoration-color: #b2c1ed; text-underline-offset: 3px; }
.article a:hover { color: var(--hot); text-decoration-color: var(--hot); }
.article code { font-family: var(--mono); font-size: .85em; background: #edf2fc; border: 1px solid #dce4f4; padding: 1px 5px; }
.article pre { margin: 0 0 24px; padding: 20px 24px; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); overflow-x: auto; }
.article pre code { font-size: 13px; line-height: 1.65; background: none; border: 0; padding: 0; }
.article blockquote { margin: 28px 0; padding: 8px 0 8px 24px; border-left: 2px solid var(--blue); color: var(--muted); }
.result-callout { margin: 34px 0; padding: 28px 32px; border: 1px solid #dce4f4; background: #edf2fc; }
.result-callout .num { font: 500 30px/1.2 var(--display); color: var(--blue); }
.result-callout p { font-size: 18px; line-height: 1.6; margin: 0; }
.blog-page .stats { border-radius: 0; background: #edf2fc; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.blog-page .stat { display: grid; grid-template-rows: subgrid; grid-row: span 3; min-width: 0; padding: 22px 18px; }
.blog-page .stat .k, .blog-page .stat .o { margin: 0; }
.blog-page .stat .k { line-height: 1.5; padding-bottom: 10px; }
.blog-page .stat .v { font-family: var(--display); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; padding-bottom: 10px; }
.blog-page .stat .o { line-height: 1.5; }
.blog-page pre.cmd, .blog-page .code-panel { border-radius: 0; }
.blog-page pre.cmd { background: var(--ink); color: var(--paper); }
.blog-page .scrolly-step h3 { font-family: var(--display); font-weight: 500; }

/* Preserve figure geometry and give wide content a contained scrolling surface. */
.post-cover { width: 100vw; margin: -80px 0 52px 50%; transform: translateX(-50%); background: var(--paper); }
.post-cover img { display: block; width: 100%; height: auto; }
.post-figure { margin: 34px auto; max-width: 560px; }
.post-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.post-figure figcaption { margin-top: 12px; font: 400 12px/1.6 var(--mono); color: var(--muted); }
.article .rtable { border-top: 1px solid var(--line); padding-top: 16px; }
.article .rtable th { white-space: normal; }
.article .chart, .article .diagram { overscroll-behavior-x: contain; }
.post-footer { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font: 400 13px/1.7 var(--mono); color: var(--muted); }
.post-footer a { color: var(--blue); text-underline-offset: 3px; }
.cta { display: inline-flex; align-items: center; justify-content: center; min-height: 45px; padding: 0 22px; border: 1px solid var(--blue); background: var(--blue); color: #fff; font: 500 15px/1.4 var(--font); text-decoration: none; transition: background .2s; }
.cta:hover { background: var(--hot); border-color: var(--hot); }
.article a.cta, .article a.cta:hover, .post-footer a.cta, .post-footer a.cta:hover { color: #fff; text-decoration: none; }
.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.post-nav-card { display: flex; flex-direction: column; gap: 18px; justify-content: space-between; padding: 24px; min-height: 140px; border: 1px solid var(--line); text-decoration: none; transition: border-color .2s; }
.post-nav-card:hover { border-color: var(--blue); }
.post-nav-card.next { grid-column: 2; }
.post-nav-kicker { color: var(--blue); font: 400 11px/1.5 var(--mono); }
.post-nav-title { font: 500 23px/1.2 var(--display); letter-spacing: -.02em; }

/* Existing in-article access actions retain their behavior and use the site colors. */
.evo-gate { background: rgba(254, 252, 251, .8); backdrop-filter: blur(12px); }
.evo-gate-card { border-radius: 0; background: var(--paper); color: var(--ink); font-family: var(--font); border: 1px solid var(--line); }
.evo-gate-card .evo-gate-headline h1 { font-family: var(--display); font-weight: 500; }
.evo-gate-submit { background: var(--blue); border-color: var(--blue); border-radius: 0; }
.evo-gate-submit:hover { background: var(--hot); }

@media (max-width: 760px) {
  .blog-page main { padding-top: 48px; padding-bottom: 64px; }
  .blog-intro { margin-bottom: 36px; }
  .blog-intro p { font-size: 18px; }
  .post-list { grid-template-columns: 1fr; gap: 20px; }
  .blog-page .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blog-page .stat { padding: 18px 14px; }
  .post-list > li:first-child { grid-column: auto; }
  .post-item, .post-list > li:first-child .post-item { padding: 26px; }
  .post-item-subtitle { font-size: 19px; margin-bottom: 20px; }
  .post-header { padding-bottom: 26px; margin-bottom: 34px; }
  .post-title { font-size: clamp(38px, 8vw, 56px); }
  .post-subtitle { font-size: 20px; }
  .post-cover { margin-top: -48px; margin-bottom: 36px; }
  .article { font-size: 17px; line-height: 1.75; }
  .article .lead { font-size: 20px; }
  .article h2 { font-size: 29px; }
  .article h3 { font-size: 23px; }
  .result-callout { padding: 24px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-card.next { grid-column: auto; }
}
@media (max-width: 380px) {
  .blog-page .stats { grid-template-columns: 1fr; }
  .blog-page .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .blog-page .stat:last-child { border-bottom: 0; }
  .post-item, .post-list > li:first-child .post-item { padding: 22px; }
  .post-list > li:first-child .post-item-title { font-size: 31px; }
  .post-byline { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .post-item, .post-item-title, .post-nav-card, .cta { transition: none; }
}
