/* ============================================================
   Static content pages (Phase 46): /about, /compare/ngrok, …
   Built from frontend/content/*.md by scripts/build-seo.mjs. These pages don't
   load the React app, so this file carries its own copy of the design tokens
   in src/index.css (keep the two in step) and the same light/dark switch:
   public/theme-init.js sets html.dark before first paint.
   ============================================================ */
:root {
  --pp-bg: 245 245 247;
  --pp-surface: 255 255 255;
  --pp-fill: 235 235 239;
  --pp-border: 224 224 230;
  --pp-text: 29 29 31;
  --pp-muted: 100 100 108;
  --pp-faint: 142 142 147;
  --pp-accent: 0 113 227;
  --pp-accent-hover: 0 98 204;
  --pp-get: 36 138 61;
  --pp-delete: 215 0 21;
  color-scheme: light;
}

.dark {
  --pp-bg: 22 22 24;
  --pp-surface: 30 30 33;
  --pp-fill: 42 42 46;
  --pp-border: 50 50 55;
  --pp-text: 245 245 247;
  --pp-muted: 160 160 168;
  --pp-faint: 112 112 120;
  --pp-accent: 10 132 255;
  --pp-accent-hover: 64 156 255;
  --pp-get: 48 209 88;
  --pp-delete: 255 69 58;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: rgb(var(--pp-bg));
  color: rgb(var(--pp-text));
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  font-feature-settings: 'cv11', 'calt';
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: rgb(var(--pp-accent)); text-underline-offset: 3px; }
a:hover { color: rgb(var(--pp-accent-hover)); }
:focus-visible { outline: 2px solid rgb(var(--pp-accent) / 0.7); outline-offset: 2px; }
::selection { background: rgb(var(--pp-accent) / 0.25); }

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 20px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: rgb(var(--pp-surface)); padding: 6px 10px; border-radius: 6px; }

/* Header */
.site-head {
  position: sticky; top: 0; z-index: 5;
  border-bottom: 1px solid rgb(var(--pp-border) / 0.7);
  background: rgb(var(--pp-bg) / 0.85);
  backdrop-filter: saturate(150%) blur(16px);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
}
.site-head .wrap { max-width: 72rem; display: flex; align-items: center; gap: 16px; height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: rgb(var(--pp-text)); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; text-decoration: none; }
.brand:hover { color: rgb(var(--pp-text)); }
.brand img { border-radius: 6px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a { color: rgb(var(--pp-muted)); font-size: 13px; text-decoration: none; padding: 6px 10px; border-radius: 8px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: rgb(var(--pp-text)); }
.site-nav a.cta { background: rgb(var(--pp-accent)); color: #fff; font-weight: 600; }
.site-nav a.cta:hover { background: rgb(var(--pp-accent-hover)); color: #fff; }

/* Breadcrumb */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 28px 0 0; padding: 0; font-size: 13px; color: rgb(var(--pp-faint)); }
.crumbs li + li::before { content: '›'; margin-right: 6px; }
.crumbs a { color: rgb(var(--pp-muted)); text-decoration: none; }
.crumbs a:hover { color: rgb(var(--pp-text)); }

/* Article */
main { padding-bottom: 72px; }
.page-head { padding: 24px 0 28px; border-bottom: 1px solid rgb(var(--pp-border)); }
h1 { font-size: clamp(30px, 5vw, 40px); line-height: 1.1; letter-spacing: -0.03em; margin: 0; font-weight: 700; }
.tldr { margin: 16px 0 0; font-size: 18px; line-height: 1.6; color: rgb(var(--pp-muted)); }
.tldr strong { color: rgb(var(--pp-text)); }
.meta { margin: 14px 0 0; font-size: 13px; color: rgb(var(--pp-faint)); }

.toc { margin: 28px 0 0; padding: 16px 20px; border: 1px solid rgb(var(--pp-border)); border-radius: 12px; background: rgb(var(--pp-surface)); }
.toc p { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.toc ol { margin: 0; padding-left: 20px; font-size: 14px; }

.prose h2 { font-size: 24px; line-height: 1.25; letter-spacing: -0.02em; margin: 48px 0 12px; font-weight: 700; scroll-margin-top: 72px; }
.prose h3 { font-size: 18px; line-height: 1.35; margin: 32px 0 8px; font-weight: 600; scroll-margin-top: 72px; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 16px; color: rgb(var(--pp-text) / 0.85); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: rgb(var(--pp-faint)); }
.prose strong { color: rgb(var(--pp-text)); font-weight: 600; }
.prose code {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; font-size: 0.86em;
  background: rgb(var(--pp-fill)); border: 1px solid rgb(var(--pp-border) / 0.7); border-radius: 5px; padding: 1px 5px;
}
.prose blockquote { border-left: 3px solid rgb(var(--pp-accent) / 0.6); padding: 2px 0 2px 16px; color: rgb(var(--pp-muted)); }

.table { overflow-x: auto; margin: 8px 0 24px; border: 1px solid rgb(var(--pp-border)); border-radius: 12px; background: rgb(var(--pp-surface)); }
.table table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.table th, .table td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid rgb(var(--pp-border)); }
.table tbody tr:last-child th, .table tbody tr:last-child td { border-bottom: 0; }
.table thead th { font-size: 13px; color: rgb(var(--pp-muted)); font-weight: 600; background: rgb(var(--pp-fill) / 0.5); }
.table tbody th { font-weight: 500; color: rgb(var(--pp-text)); }

/* Footer */
.site-foot { border-top: 1px solid rgb(var(--pp-border)); padding: 28px 0 40px; font-size: 13px; color: rgb(var(--pp-faint)); }
.site-foot .wrap { max-width: 72rem; display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.site-foot a { color: rgb(var(--pp-muted)); text-decoration: none; }
.site-foot a:hover { color: rgb(var(--pp-text)); }
.site-foot .copy { margin-right: auto; }

@media (max-width: 560px) {
  .site-nav a:not(.cta) { display: none; }
  .tldr { font-size: 17px; }
}
