/* Shared by the blog pages; mirrors the landing page's palette and type. */
body { margin: 0; background: #f7f6f4; }
a { color: #3049c9; text-decoration: none; }
a:hover { color: #22349a; }
::selection { background: #dfe3f8; color: #22349a; }

.page { min-height: 100vh; display: flex; flex-direction: column; background: #f7f6f4; color: #26272c; font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; line-height: 1.7; }
.page > main { flex: 1; }

.site-header { display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 32px; border-bottom: 1px solid #dcdad4; background: #efeeea; position: sticky; top: 0; z-index: 10; }
.site-header-left { display: flex; align-items: center; gap: 40px; }
.site-header nav { display: flex; gap: 28px; font-size: 13px; }
.site-header-right { display: flex; align-items: center; gap: 12px; }
.nav-link { color: #4a4b52; }
.nav-link:hover, .nav-link.active { color: #17181b; }
.btn-primary { display: inline-block; border: 1px solid #3049c9; border-radius: 2px; background: #dfe3f8; color: #22349a; padding: 7px 16px; font-size: 13px; }
.btn-primary:hover { background: #ccd3f4; color: #22349a; }
.btn-ghost { display: inline-block; border: 1px solid #dcdad4; border-radius: 2px; color: #26272c; padding: 7px 16px; font-size: 13px; }
.btn-ghost:hover { border-color: #a8aab1; color: #17181b; }

.site-footer { border-top: 1px solid #dcdad4; padding: 28px 32px; font-size: 12px; color: #a8aab1; }

.eyebrow { color: #82848c; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 14px; }
.back { font-size: 13px; color: #82848c; }
.back:hover { color: #17181b; }

/* Blog index */
.blog-index { max-width: 760px; margin: 0 auto; padding: 88px 32px 96px; }
.blog-index .eyebrow { margin-bottom: 20px; }
.blog-index h1 { font-family: 'Space Grotesk', sans-serif; font-weight: 600; letter-spacing: -0.02em; font-size: 48px; line-height: 1.1; color: #17181b; margin: 0 0 48px; }
.post-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid #dcdad4; }
.post-list a { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 20px; gap: 16px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid #dcdad4; color: #26272c; }
.post-list .num { color: #a8aab1; font-size: 13px; }
.post-list .title { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 20px; line-height: 1.3; color: #17181b; letter-spacing: -0.01em; }
.post-list .date { color: #82848c; font-size: 12px; white-space: nowrap; }
.post-list .arrow { color: #a8aab1; transition: transform 0.15s ease, color 0.15s ease; }
.post-list a:hover .title { color: #22349a; }
.post-list a:hover .arrow { color: #3049c9; transform: translateX(3px); }

/* Post */
.post { max-width: 720px; margin: 0 auto; padding: 72px 32px 96px; }
.post header { margin: 28px 0 48px; }
.post h1 { font-family: 'Space Grotesk', sans-serif; font-weight: 600; letter-spacing: -0.02em; font-size: 44px; line-height: 1.12; color: #17181b; margin: 0 0 20px; text-wrap: balance; }
.post .subtitle { font-family: 'Space Grotesk', sans-serif; font-weight: 500; font-size: 22px; line-height: 1.35; letter-spacing: -0.01em; color: #4a4b52; margin: -6px 0 20px; text-wrap: balance; }
.post .meta { color: #82848c; font-size: 13px; }
.post .meta a { color: #4a4b52; }
.post .meta a:hover { color: #17181b; }
.prose p { margin: 0 0 22px; text-wrap: pretty; }
.prose strong { color: #17181b; }
.prose .parallels { list-style: none; margin: 0 0 26px; padding: 4px 0 4px 20px; border-left: 2px solid #dcdad4; }
.prose .parallels li { margin: 0 0 6px; }
.prose blockquote { margin: 36px 0; padding: 0; font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 24px; line-height: 1.3; letter-spacing: -0.01em; color: #17181b; text-wrap: balance; }
.post-end { margin-top: 56px; padding-top: 24px; border-top: 1px solid #dcdad4; }

/* Benchmark figures, same panels as the landing page */
.figure { margin: 36px 0 40px; width: min(960px, calc(100vw - 64px)); position: relative; left: 50%; transform: translateX(-50%); }
.figure-card { background: #f7f6f4; border: 1px solid #dcdad4; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.figure-card > div { min-width: 0; padding: 22px 24px 18px; }
.figure-card > div + div { border-left: 1px solid #e6e4de; }
.figure-card .bench-title { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 15px; color: #17181b; line-height: 1.5; }
.figure-card .bench-sub { font-size: 11px; color: #82848c; margin-bottom: 10px; }
.figure-card .row { padding: 6px 0; }
.figure-card .row-head { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: #82848c; }
.figure-card .row-head span:first-child { white-space: nowrap; }
.figure-card .row.lead .row-head span:first-child { color: #17181b; }
.figure-card .row.lead .row-head span:last-child { color: #3049c9; }
.figure-card .bar { height: 6px; margin-top: 4px; background: #eae8e3; position: relative; }
.figure-card .bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: #c4c2bb; }
.figure-card .row.lead .bar > i { background: #3049c9; }
.figure-card .bar > b { position: absolute; top: 0; bottom: 0; left: 86%; width: 3px; background: #f7f6f4; transform: skewX(-20deg); }
.figure figcaption { margin-top: 12px; font-size: 12px; color: #a8aab1; line-height: 1.6; }

/* Code */
.prose code { font-family: inherit; font-size: 0.92em; background: #eceae5; color: #17181b; padding: 1px 5px; border-radius: 2px; }
.prose .snippet { position: relative; margin: 0 0 26px; }
.prose .copy { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; padding: 0; display: flex; align-items: center; justify-content: center; background: #f7f6f4; border: 1px solid #dcdad4; border-radius: 2px; color: #82848c; cursor: pointer; opacity: 0.75; transition: opacity 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
.prose .snippet:hover .copy, .prose .copy:focus-visible { opacity: 1; }
.prose .copy:hover { color: #17181b; border-color: #a8aab1; }
.prose .copy svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.prose .copy .i-done, .prose .copy.done .i-copy { display: none; }
.prose .copy.done .i-done { display: block; }
.prose .copy.done { color: #3049c9; border-color: #3049c9; opacity: 1; }
.prose pre { margin: 0; padding: 16px 52px 16px 18px; background: #efeeea; border: 1px solid #dcdad4; overflow-x: auto; font-size: 12.5px; line-height: 1.6; }
.prose pre.lang-rust { padding: 18px 52px 18px 20px; font-size: 13.5px; line-height: 1.65; }
.lang-rust .kw, .lang-shell .kw, .lang-sql .kw { color: #3049c9; }
.lang-shell .fn { color: #9a3412; }
.lang-shell .str { color: #4d7c0f; }
.lang-shell .ty { color: #0f766e; }
.lang-rust .ty { color: #0f766e; }
.lang-rust .fn, .lang-sql .fn { color: #9a3412; }
.lang-rust .num, .lang-sql .num { color: #b45309; }
.lang-rust .str, .lang-sql .str { color: #4d7c0f; }
.lang-rust .com, .lang-sql .com { color: #a8aab1; font-style: italic; }
.prose pre code { background: none; color: #26272c; padding: 0; font-size: inherit; border-radius: 0; }
.prose .disclaimer { margin: 0 0 32px; padding: 12px 18px 13px; background: #efeeea; border-left: 3px solid #3049c9; }
.prose .disclaimer-label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: #82848c; margin-bottom: 2px; }
.prose .disclaimer p { margin: 0; color: #4a4b52; font-size: 13px; line-height: 1.6; }

/* Diagrams */
.diagram { margin: 32px 0 36px; }
.diagram-card { background: #f7f6f4; border: 1px solid #dcdad4; padding: 22px 24px 24px; }
.dg-title { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 16px; color: #17181b; line-height: 1.4; margin-bottom: 16px; }
.dg-label { font-size: 11px; color: #82848c; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
.arw { color: #a8aab1; font-size: 16px; flex: none; align-self: center; }
.chip { display: inline-block; padding: 0 8px; font-size: 12px; line-height: 24px; border-radius: 2px; white-space: nowrap; }
.c0 { background: #dfe3f8; color: #22349a; }
.c1 { background: #f6e1d3; color: #92400e; }
.c2 { background: #d6ebe6; color: #115e59; }
.c3 { background: #e8e0f4; color: #5b2a9e; }

.funnel { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 24px; row-gap: 4px; }
.funnel .shape-cell { display: flex; align-items: center; justify-content: center; min-height: 56px; }
.funnel .core { width: 22%; height: 36px; background: #17181b; color: #f7f6f4; font-size: 11px; display: flex; align-items: center; justify-content: center; border-radius: 2px; }
.funnel .shape { width: 100%; height: 56px; background: var(--c); clip-path: polygon(calc(50% - var(--a) / 2) 0, calc(50% + var(--a) / 2) 0, calc(50% + var(--b) / 2) 100%, calc(50% - var(--b) / 2) 100%); }
.funnel .lbl { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.funnel .lbl-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: #17181b; }
.funnel .lbl-head span:last-child { color: #3049c9; white-space: nowrap; }
.funnel .lbl-sub { font-size: 11px; color: #82848c; line-height: 1.5; }
.funnel .lat { height: 4px; margin-top: 5px; background: #eae8e3; position: relative; }
.funnel .lat > i { position: absolute; left: 0; top: 0; bottom: 0; min-width: 2px; background: #3049c9; }

.radix { display: flex; align-items: flex-start; gap: 14px; }
.rx-in { flex: none; border-collapse: collapse; font-size: 12px; }
.rx-in th { text-align: left; font-weight: 400; font-size: 11px; color: #82848c; padding: 0 12px 6px 0; border-bottom: 1px solid #dcdad4; white-space: nowrap; }
.rx-in td { padding: 3px 12px 0 0; }
.rx-in .chip { min-width: 28px; text-align: center; }
.hx { color: #82848c; white-space: nowrap; }
.hx b { font-weight: 500; color: #17181b; }
.radix > .arw { align-self: center; }
.rx-parts { flex: 1; min-width: 0; }
.rx-rule { font-size: 11px; color: #82848c; margin-bottom: 10px; }
.buckets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 18px minmax(0, 1fr); gap: 6px; }
.bucket .b-head { font-size: 10px; line-height: 1.4; color: #82848c; margin-bottom: 4px; min-height: 42px; }
.bucket .b-head b { display: block; font-weight: 500; font-size: 11px; color: #17181b; }
.bucket .b-box { border: 1px solid #dcdad4; border-top: none; min-height: 112px; padding: 4px; display: flex; flex-direction: column; gap: 3px; }
.bucket .chip { text-align: center; }
.bucket.gap .b-box { border: none; align-items: center; justify-content: center; color: #a8aab1; }

.rx-stack { display: flex; flex-direction: column; gap: 3px; }
.rx-stack .chip { text-align: center; }
.p2-strip .cells { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 3px; }
.p2-strip .cells i { height: 14px; border: 1px solid #dcdad4; }
.p2-strip .cells i.done { background: #c4c2bb; border-color: #c4c2bb; }
.p2-strip .cells i.now { background: #3049c9; border-color: #3049c9; }
.p2-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 6px; font-size: 11px; color: #82848c; }
.p2-legend .now { color: #3049c9; }
.p2-work { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); column-gap: 14px; align-items: start; margin-top: 22px; }
.p2-work .dg-label { margin-bottom: 8px; }
.p2-work .arw { align-self: center; }
.p2-table { border: 1px solid #3049c9; background: #f0f2fc; padding: 4px 12px 6px; }
.p2-table.out { border-color: transparent; background: none; padding-left: 0; padding-right: 0; }
.t-row.head { color: #82848c; font-size: 11px; border-bottom: 1px solid #dcdad4; }
.t-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; line-height: 22px; color: #17181b; }

@media (max-width: 720px) {
  .diagram-card { padding: 18px 16px; }
  .funnel { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); column-gap: 14px; }
  .radix { flex-direction: column; align-items: stretch; }
  .radix > .arw { transform: rotate(90deg); align-self: flex-start; }
  .buckets { grid-template-columns: repeat(3, minmax(0, 1fr)) 14px minmax(0, 1fr); }
  .p2-work { column-gap: 8px; }
  .p2-work .rx-stack .chip { padding: 0 4px; }
  .p2-table { padding: 4px 8px 6px; }

  .site-header { padding: 0 16px; }
  .site-header-left { gap: 20px; }
  .site-header nav { gap: 16px; }
  .hide-mobile { display: none !important; }
  .blog-index { padding: 48px 20px 64px; }
  .blog-index h1 { font-size: 34px; }
  .post-list a { grid-template-columns: 32px minmax(0, 1fr) 16px; gap: 10px; }
  .post-list .date { grid-column: 2; grid-row: 2; }
  .post-list .arrow { grid-column: 3; grid-row: 1; }
  .post-list .title { font-size: 18px; }
  .post { padding: 40px 20px 64px; font-size: 14px; }
  .post h1 { font-size: 32px; }
  .post .subtitle { font-size: 18px; }
  .prose blockquote { font-size: 20px; }
  .figure { width: calc(100vw - 40px); }
  .prose pre.lang-rust { padding: 16px 48px 16px 18px; font-size: 13px; }
  .figure-card { grid-template-columns: minmax(0, 1fr); }
  .figure-card > div { padding: 18px 16px 14px; }
  .figure-card > div + div { border-left: none; border-top: 1px solid #e6e4de; }
  .site-footer { padding: 24px 20px; }
}

/* Post body: headings, inline code, diagram placeholders */
.prose h2 { font-family: 'Space Grotesk', sans-serif; font-weight: 600; letter-spacing: -0.015em; font-size: 28px; line-height: 1.2; color: #17181b; margin: 52px 0 18px; text-wrap: balance; }
.prose h3 { font-family: 'Space Grotesk', sans-serif; font-weight: 600; letter-spacing: -0.01em; font-size: 19px; line-height: 1.3; color: #17181b; margin: 40px 0 12px; display: flex; align-items: baseline; gap: 12px; }
.prose h3 .step { flex: none; width: 24px; height: 24px; border: 1px solid #3049c9; border-radius: 2px; background: #dfe3f8; color: #22349a; font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 500; line-height: 24px; text-align: center; position: relative; top: -3px; }
.prose :not(pre) > code { font-size: 0.92em; background: #efeeea; border: 1px solid #e6e4de; border-radius: 2px; padding: 1px 5px; color: #17181b; }
.diagram { margin: 28px 0 36px; padding: 0; }
.diagram svg { display: block; width: 100%; height: auto; overflow: visible; }
.diagram figcaption { margin-top: 12px; font-size: 12px; color: #a8aab1; line-height: 1.6; }
.prose .footnote { margin: -14px 0 26px; font-size: 12.5px; line-height: 1.6; color: #82848c; }
.prose .note { margin: 0 0 26px; padding: 12px 16px 12px 18px; border-left: 2px solid #3049c9; background: #efeeea; font-size: 0.94em; color: #5a5c63; }
.prose .note::before { content: 'Note'; display: block; margin-bottom: 4px; font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: #82848c; }
