/* Shared chrome for the comparison pages (/alternatives, /alternatives/*): nav, article header,
   table of contents + reading column, tables, FAQ, sources, footer. Each page adds its own components. */
:root {
  --ink: #1a1a1a;
  --ink-2: #3d3d3b;
  --muted: #5f5f5b;
  --paper: #ffffff;
  --mist: #f6f5f2;
  --wall: #efeee9;
  --rule: #e2e0da;
  --line: #d3d1ca;
  --accent: #5b3df5;
  --accent-2: #4626e0;
  --tint: #efebff;
  --night: #161616;
  --night-2: #1f1f1f;
  --night-rule: #333331;
  --night-text: #b9b9b4;
  --good: #15803d;
  --sans: "Instrument Sans", -apple-system, "Segoe UI", system-ui, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --page: 1104px;
  --col: 680px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.page { max-width: var(--page); margin: 0 auto; padding: 0 32px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--rule); }
.nav .wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font: 700 20px/1 var(--sans); letter-spacing: -.02em; text-decoration: none; }
.logo svg { width: 28px; height: 28px; }
.nav .spacer { flex: 1; }
.nav-login { font-size: 15px; font-weight: 500; text-decoration: none; color: var(--ink-2); white-space: nowrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 50px; padding: 0 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s, transform .15s var(--ease); }
.btn:hover { background: var(--mist); border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--paper); box-shadow: 0 1px 2px rgba(40,20,140,.2), 0 8px 20px -8px rgba(91,61,245,.55); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.sm { height: 38px; padding: 0 14px; font-size: 14.5px; }
.btn .i { transition: transform .2s var(--ease); }
.btn:hover .i { transform: translateX(3px); }
.site-form { display: flex; gap: 6px; padding: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px -12px rgba(0,0,0,.12); transition: box-shadow .2s, border-color .2s; }
.site-form label { flex: 1; display: flex; align-items: center; gap: 10px; padding-left: 12px; color: var(--muted); min-width: 0; }
.site-form input { flex: 1; min-width: 0; height: 48px; border: 0; background: none; font-size: 17px; color: var(--ink); }
.site-form input::placeholder { color: #6e6e6e; }
.site-form input:focus { outline: none; }
.site-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(91,61,245,.18); }
.form-note { margin: 10px 0 0 !important; font-size: 14.5px !important; color: var(--muted) !important; }

/* article header */
.post-head { padding-top: 40px; }
.crumb { font-size: 14.5px; color: var(--muted); }
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.post-head h1 { margin: 14px 0 0; max-width: 22ch; font: 600 clamp(34px, 4.4vw, 54px)/1.06 var(--sans); letter-spacing: -.03em; text-wrap: balance; }
.deck { margin: 20px 0 0; max-width: 62ch; color: var(--ink-2); font-size: 20px; line-height: 1.5; }
.deck strong { color: var(--ink); font-weight: 600; }
.byline { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 22px; font-size: 15px; color: var(--muted); }
.byline svg { width: 30px; height: 30px; }
.byline b { color: var(--ink); font-weight: 600; }
.byline .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line); }

/* layout: table of contents + one reading column */
.post { display: grid; grid-template-columns: 220px minmax(0, var(--col)); justify-content: space-between; gap: 64px; padding-top: 56px; padding-bottom: 72px; }
.toc { position: sticky; top: 96px; align-self: start; }
.toc summary { list-style: none; font-weight: 600; font-size: 15px; cursor: default; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 2px; border-left: 1px solid var(--rule); }
.toc a { display: block; margin-left: -1px; padding: 6px 0 6px 14px; border-left: 1px solid transparent; font-size: 14.5px; line-height: 1.35; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }

.body { min-width: 0; }
.lede { margin: 0; font-size: 21px; line-height: 1.55; color: var(--ink); }
.body h2 { margin: 64px 0 0; font: 600 clamp(26px, 3vw, 32px)/1.15 var(--sans); letter-spacing: -.02em; text-wrap: balance; }
.body h3 { margin: 34px 0 0; font-size: 21px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.body p, .body li { color: var(--ink-2); font-size: 18px; line-height: 1.7; }
.body p { margin: 16px 0 0; }
.body ul, .body ol { margin: 14px 0 0; padding-left: 24px; }
.body li + li { margin-top: 6px; }
.body h2 + p, .body h3 + p { margin-top: 12px; }
.body a { text-decoration-color: var(--line); text-underline-offset: 3px; }
.body a:hover { text-decoration-color: var(--ink); }
.body strong { color: var(--ink); font-weight: 600; }
.body p strong { background: linear-gradient(transparent 62%, rgba(91, 61, 245, .16) 62%); }
.body code { font: 500 .88em var(--mono); padding: 1px 5px; border-radius: 4px; background: var(--mist); }

.takeaways { margin-top: 28px; padding: 22px 24px; border: 1px solid var(--rule); border-radius: 14px; background: var(--mist); }
.takeaways h2 { margin: 0 !important; font-size: 18px !important; letter-spacing: 0 !important; }
.takeaways ul { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.takeaways li { font-size: 16.5px; line-height: 1.55; color: var(--ink); margin: 0 !important; }
.takeaways li::marker { color: var(--accent); }

.demo { margin: 24px 0 0; }
.demo figcaption { margin-top: 8px; font-size: 14.5px; color: var(--muted); }
.tf { border-radius: 6px; overflow: hidden; }
.demo > .tf { max-width: 560px; }

.table-wrap { margin-top: 22px; overflow-x: auto; border: 1px solid var(--rule); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
th, td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
thead th { font-size: 13.5px; font-weight: 600; color: var(--muted); background: var(--mist); }
tbody th { font-weight: 600; color: var(--ink); white-space: nowrap; }
tr:last-child td, tr:last-child th { border-bottom: 0; }
td { color: var(--ink-2); line-height: 1.5; }
.table-note { margin-top: 10px !important; font-size: 14.5px !important; color: var(--muted) !important; }

.checks { margin: 18px 0 0; padding: 0 !important; list-style: none; display: grid; gap: 10px; }
.checks li { position: relative; padding: 0 0 0 34px; margin: 0 !important; }
.checks li::before { content: ""; position: absolute; left: 0; top: 6px; width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--accent); }

.cta-box { margin-top: 48px; padding: 26px; border-radius: 16px; background: var(--tint); }
.cta-box h3 { margin: 0; font-size: 22px; }
.cta-box p { font-size: 16.5px; }
.cta-box .site-form { margin-top: 16px; }

.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-of-type { border-top: 1px solid var(--rule); margin-top: 18px; }
.faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; cursor: pointer; list-style: none; font-weight: 600; font-size: 17.5px; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { transition: transform .25s var(--ease); margin-top: 4px; }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; }

.related { margin-top: 40px; display: grid; gap: 8px; }
.related a { font-weight: 600; }

.sources { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--rule); }
.sources p { font-size: 14px !important; line-height: 1.6 !important; color: var(--muted) !important; margin: 6px 0 0; }

footer { padding: 36px 0 46px; background: var(--night); color: var(--night-text); font-size: 14px; }
footer .wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
footer .logo { color: #fff; font-size: 19px; }
footer a { color: #deded9; text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
footer .spacer { flex: 1; }

@media (max-width: 980px) {
  .post { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 32px; }
  .toc { position: static; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 12px; }
  .toc summary { cursor: pointer; display: flex; justify-content: space-between; }
  .toc summary::after { content: "+"; font-weight: 500; color: var(--muted); }
  .toc[open] summary::after { content: "\2212"; }
  .body { max-width: var(--col); }
}
@media (max-width: 640px) {
  .page, .nav .wrap, footer .wrap { padding: 0 16px; }
  .post-head { padding-top: 28px; }
  .deck { font-size: 18px; }
  .lede { font-size: 19px; }
  .body p, .body li { font-size: 17px; }
  .site-form { flex-direction: column; }
  .site-form .btn { width: 100%; }
  .cta-box { padding: 20px; }
  .nav-login { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
