/* About page — standalone (server-rendered), styled to match the React front page.
   Tokens mirror frontend/src/tokens.ts; theme is set on <html data-theme> before paint
   from the same localStorage key the app uses ('implied.theme'). */

@import url('https://fonts.googleapis.com/css2?family=Zilla+Slab:ital,wght@0,400;0,500;1,400&family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;0,6..72,500;0,6..72,700&family=DM+Mono:wght@300;400;500&display=swap');

:root {
  --bg: #f0f2f8;
  --surface: #ffffff;
  --text1: #141c2e;
  --text2: #4b5568;
  --text3: #6b7280;
  --border: #dce1eb;
  --accent: #1e5faf;
  --wordmark-news: #334155;
  --nav: #64748b;
  --nav-hover: #1e293b;
  --note-bg: rgba(30, 95, 175, 0.05);
}

:root[data-theme='dark'] {
  --bg: #0f1524;
  --surface: #141d30;
  --text1: #e4e4ec;
  --text2: #a1a8b8;
  --text3: #6b7280;
  --border: #1e2d48;
  --accent: #60a5fa;
  --wordmark-news: #e2e8f0;
  --nav: #94a3b8;
  --nav-hover: #ffffff;
  --note-bg: rgba(96, 165, 250, 0.07);
}

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

body {
  background: var(--bg);
  color: var(--text1);
  font-family: 'Newsreader', Georgia, serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 64px;
}

.wrap {
  max-width: min(720px, calc(100vw - 48px));
  margin: 0 auto;
  width: 100%;
}

/* ---- masthead ---- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px 0 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.wordmark {
  font-family: 'Zilla Slab', serif;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.05;
  text-decoration: none;
}

.wordmark-implied { color: var(--accent); }
:root:not([data-theme='dark']) .wordmark-implied { color: #1e5faf; }
:root[data-theme='dark'] .wordmark-implied { color: rgba(59, 130, 246, 0.55); }
.wordmark-news { color: var(--wordmark-news); }

.masthead-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--nav);
}

.crumbs a {
  color: var(--nav);
  text-decoration: none;
  transition: color 150ms ease;
}

.crumbs a:hover { color: var(--nav-hover); }
.crumbs .here { color: var(--text1); }
.crumbs span[aria-hidden] { opacity: 0.4; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text3);
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
  padding: 5px 10px;
  border-radius: 12px;
  cursor: pointer;
}

/* ---- type ---- */

h1 {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 34px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

h2 {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text3);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.lead {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text1);
  margin-bottom: 40px;
}

section { margin-bottom: 40px; }

p {
  font-size: 16px;
  line-height: 1.68;
  color: var(--text2);
  margin-bottom: 14px;
}

ul, ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

li {
  font-size: 16px;
  line-height: 1.62;
  color: var(--text2);
  margin-bottom: 9px;
}

li::marker { color: var(--text3); }

strong { color: var(--text1); font-weight: 500; }
em { font-style: italic; color: var(--text3); }

a { color: var(--accent); }

.note {
  background: var(--note-bg);
  border-left: 2px solid var(--accent);
  padding: 14px 16px;
  margin-top: 16px;
  border-radius: 0 4px 4px 0;
}

.backlink {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.backlink a { color: var(--nav); text-decoration: none; }
.backlink a:hover { color: var(--nav-hover); }

@media (max-width: 600px) {
  h1 { font-size: 27px; }
  .lead { font-size: 17px; }
  p, li { font-size: 15px; }
  .wordmark { font-size: 26px; }
}
