/*
 * SSG-only stylesheet — loaded by Lambda-rendered /post/<id> and /c/<path> pages.
 *
 * Self-contained: the SSG'd HTML doesn't load Tailwind or the React bundle
 * before first paint, so this file ports the design tokens + the minimum
 * styles needed to render content beautifully for crawlers and slow connections.
 */
:root {
  --bg:        oklch(98.4% 0.004 80);
  --bg-elev:   oklch(99.6% 0.003 80);
  --bg-sunk:   oklch(96.2% 0.005 80);
  --bg-page:   oklch(95.0% 0.006 80);
  --line:      oklch(91% 0.006 80);
  --line-soft: oklch(94% 0.005 80);
  --ink:       oklch(22% 0.01 80);
  --ink-2:     oklch(38% 0.008 80);
  --ink-3:     oklch(54% 0.007 80);
  --ink-4:     oklch(68% 0.006 80);
  --accent:    oklch(55% 0.06 195);
  --accent-ink:oklch(40% 0.07 195);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-page);
  color: var(--ink);
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

.font-serif { font-family: 'Source Serif 4', Georgia, serif; }

.site-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg);
}
.site-header .site-name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.01em;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.breadcrumb {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  margin-bottom: 16px;
}
.breadcrumb a {
  color: var(--ink-3);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { color: var(--ink-4); margin: 0 4px; }

.prose-forum {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
}
.prose-forum p { margin: 0 0 0.85em; }
.prose-forum p:last-child { margin-bottom: 0; }
.prose-forum h1, .prose-forum h2, .prose-forum h3 { font-weight: 600; line-height: 1.25; }
.prose-forum h1 { font-size: 1.7em; margin: 0.5em 0 0.3em; }
.prose-forum h2 { font-size: 1.35em; margin: 1.2em 0 0.4em; }
.prose-forum h3 { font-size: 1.1em; margin: 1em 0 0.4em; }
.prose-forum code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.86em;
  background: var(--bg-sunk);
  border: 1px solid var(--line-soft);
  padding: 1px 5px;
  border-radius: 4px;
}
.prose-forum blockquote {
  border-left: 2px solid var(--ink-4);
  padding: 2px 0 2px 14px;
  color: var(--ink-2);
  margin: 0.6em 0;
  font-style: italic;
}
.prose-forum a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 2px;
}
.prose-forum ul {
  padding-left: 1.1em;
  margin: 0.4em 0 0.85em;
  list-style: square;
}
.prose-forum li { margin: 0.2em 0; }
.prose-forum pre {
  background: var(--bg-sunk);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 10px 12px;
  overflow-x: auto;
  font-size: 12.5px;
  margin: 0.6em 0;
}

.post-meta {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Like / dislike chips — rendered inline next to the date in post + comment
   meta footers. SSG-only: hydrated React replaces these with the interactive
   VoteBar buttons. */
.vote-chips {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 6px;
}
.vote-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px 1px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elev);
  line-height: 1;
  height: 19px;
}
.vote-chip .count {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.vote-chip.vote-up { color: var(--ink-2); }
.vote-chip.vote-down { color: var(--ink-3); }

.comments {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}
.comments h2 {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  font-weight: 500;
  margin: 0 0 16px;
}
.comments-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.comments-list > li {
  margin-bottom: 24px;
}
.comment-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
}
.replies {
  list-style: none;
  margin-top: 12px;
  padding-left: 16px;
  border-left: 1px solid var(--line-soft);
}
.replies li {
  margin-bottom: 16px;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.post-list li {
  border-bottom: 1px solid var(--line-soft);
}
.post-list a {
  display: block;
  padding: 14px 0;
  text-decoration: none;
  color: inherit;
}
.post-list a:hover { background: var(--bg-elev); }
.post-list p {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.subcategories {
  margin: 16px 0 24px;
  padding: 12px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}
.subcategories h2 {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  font-weight: 500;
  margin: 0 0 8px;
}
.subcategories ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.subcategories a {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
}
.subcategories a:hover { border-color: var(--ink-4); }

.site-footer {
  text-align: center;
  padding: 24px 16px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-4);
}

/* /post/* — title-equivalent first-sentence headline. The SSG renderer
   emits this so crawlers and screen readers see a real <h1>. */
.post-headline {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 16px;
  letter-spacing: -0.005em;
}

/* /about — policy / terms / features page */
.about-page main {
  max-width: 720px;
}
.about-header {
  margin-bottom: 32px;
}
.about-header h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 30px;
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.about-header h1 .muted { color: var(--ink-3); }
.about-header .eyebrow {
  margin: 8px 0 0;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}
.about section { margin-bottom: 32px; }
.about section h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 10px;
  line-height: 1.3;
}
.about section p {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 12px;
}
.about-bullets {
  list-style: none;
  padding: 0;
  margin: 8px 0 12px;
}
.about-bullets li {
  position: relative;
  padding: 0 0 0 14px;
  margin: 0 0 10px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.about-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-3);
}
.about-bullets li strong {
  color: var(--ink);
  font-weight: 600;
}
.about-footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.about-footer p {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-4);
  margin: 0;
}
.about-footer a {
  color: var(--ink-3);
  text-decoration: underline;
  text-decoration-color: var(--ink-4);
}
.about-footer a:hover { color: var(--ink); }
