:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --text: #1c1917;
  --muted: #6b6560;
  --border: #e7e3de;
  --accent: #c2410c;
  --accent-soft: #fff1e8;
  --warn: #a16207;
  --warn-soft: #fef6dc;
  --shadow: 0 1px 2px rgba(28, 25, 23, .05);
  --on-accent: #ffffff;
  --false: #b91c1c;
  --false-soft: #fdecec;
  color-scheme: light;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
/* Dark theme: follows the device setting unless the visitor picks light or
   dark with the toggle (stored as data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141210;
    --surface: #1d1a17;
    --text: #ece8e3;
    --muted: #a39d96;
    --border: #2f2a26;
    --accent: #fb923c;
    --accent-soft: #2c1d12;
    --warn: #facc15;
    --warn-soft: #2a2410;
    --shadow: none;
    --on-accent: #1c1917;
    --false: #f87171;
    --false-soft: #2d1414;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141210;
  --surface: #1d1a17;
  --text: #ece8e3;
  --muted: #a39d96;
  --border: #2f2a26;
  --accent: #fb923c;
  --accent-soft: #2c1d12;
  --warn: #facc15;
  --warn-soft: #2a2410;
  --shadow: none;
  --on-accent: #1c1917;
  --false: #f87171;
  --false-soft: #2d1414;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--sans);
}
a { color: inherit; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

/* Masthead */
.masthead { border-bottom: 1px solid var(--border); background: var(--surface); }
.masthead-inner {
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  align-items: flex-end; justify-content: space-between;
  padding-top: 28px; padding-bottom: 20px;
}
h1 { font: 700 2.1rem/1.1 var(--serif); margin: 0; letter-spacing: -.01em; }
.tagline { margin: 6px 0 0; color: var(--muted); }
.updated { margin: 0; font-size: .875rem; color: var(--muted); }
.masthead-inner > div:first-child { flex: 1 1 380px; min-width: 0; }
.masthead-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.theme-toggle {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px 0 11px;
  border-radius: 999px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); font: 600 .875rem var(--sans); white-space: nowrap;
}
.theme-toggle > span { display: inline-flex; align-items: center; gap: 7px; }
.theme-toggle svg { width: 17px; height: 17px; flex: none; }
/* Show "Dark mode" (moon) while the page is light, "Light mode" (sun) while it's dark. */
.theme-toggle .mode-light { display: none; }
:root[data-theme="dark"] .theme-toggle .mode-light { display: inline-flex; }
:root[data-theme="dark"] .theme-toggle .mode-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .mode-light { display: inline-flex; }
  :root:not([data-theme="light"]) .theme-toggle .mode-dark { display: none; }
}
.masthead-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* Ko-fi support */
.support-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: var(--on-accent); text-decoration: none;
  font: 600 .875rem var(--sans); padding: 8px 14px; border-radius: 999px;
  white-space: nowrap;
}
.support-btn:hover { filter: brightness(1.08); }
.support-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.support-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  background: var(--accent-soft); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px;
  color: var(--text); font-size: .9rem;
}
.support-message { margin: 0 !important; flex: 1 1 260px; }
.support-progress { display: flex; align-items: center; gap: 10px; flex: 1 1 200px; font-size: .8rem; color: var(--muted); }
.support-progress .bar { flex: 1; height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; min-width: 80px; }
.support-progress .bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
[hidden] { display: none !important; }

/* Tabs */
.tabs { display: flex; gap: 4px; padding-top: 16px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab {
  border: none; background: none; border-radius: 0; padding: 10px 14px; margin-bottom: -1px;
  font: 600 .95rem var(--sans); color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab:hover { color: var(--text); border-color: transparent; border-bottom-color: var(--border); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }

/* Expand your Horizons */
.horizons { padding-top: 20px; }
.horizons-intro h2 { font: 700 1.6rem/1.2 var(--serif); margin: 4px 0 8px; }
.horizons-intro > p { margin: 0 0 14px; max-width: 680px; }
.lean-label { font-weight: 600; margin-right: 4px; }
.privacy-note { font-size: .8rem; color: var(--muted); margin: 8px 0 0; }
.hz-context { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-top: 20px; }
.hz-box { background: var(--accent-soft); border-radius: 12px; padding: 14px 16px; }
.hz-box h3 { font: 700 1.05rem var(--serif); margin: 0 0 6px; }
.hz-box p { margin: 0 0 8px; font-size: .92rem; }
.hz-box p:last-child { margin-bottom: 0; }
.hz-box a { color: inherit; }
.fc-section { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 6px; }
.fc-section > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.fc-section > summary::-webkit-details-marker { display: none; }
.fc-section[open] > summary .chev { transform: rotate(45deg); }
.fc-title { font: 700 1.2rem var(--serif); }
.fc-count { font: 600 .75rem var(--sans); color: var(--muted); background: var(--border); border-radius: 999px; padding: 2px 8px; }
.fc-sub { margin: 0; color: var(--muted); font-size: .9rem; }
.fc-grid { display: grid; gap: 10px; margin-top: 12px; }
.fc-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.fc-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .78rem; }
.verdict { font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 9px; border-radius: 6px;
  background: var(--warn-soft); color: var(--warn); }
.verdict.v-false, .verdict.v-altered, .verdict.v-satire_shared_as_real { background: var(--false-soft); color: var(--false); }
.fc-topic { color: var(--muted); font-weight: 600; }
.fc-block { margin: 10px 0 0; }
.fc-block p { margin: 2px 0 0; font-size: .96rem; }
.fc-block-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.fc-ground { background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.fc-decide { display: inline-block; margin-top: 8px; font-size: .85rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.fc-decide:hover { text-decoration: underline; }
.fc-claim { margin: 0 0 10px; font-size: 1rem; font-weight: 600; line-height: 1.4; }
.fc-claim-label { color: var(--muted); }
.fc-sources { margin: 8px 0 0; font-size: .8rem; color: var(--muted); }
.horizons-note { margin-top: 28px; font-size: .8rem; color: var(--muted); max-width: 720px; }
.empty-state { color: var(--muted); margin-top: 24px; }

/* Events near you */
.ev-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ev-controls select {
  font: 500 .95rem var(--sans); color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
}
.ev-lists { margin-top: 20px; }
.ev-lists .sublists { padding-top: 0; }
.badge.ev-mine { background: var(--accent-soft); color: var(--accent); }
ol.items.ev-items li { grid-template-columns: 1fr; }
ol.items.ev-items li::before { content: none; }

/* Shareable links, and the standalone pages prerender.py builds for them */
.fc-permalink { display: block; margin-top: 6px; font-size: .8rem; color: var(--muted); }
.ev-permalink { margin: 0; padding: 0 16px 10px; font-size: .8rem; color: var(--muted); }
.site-name { font: 700 2.1rem/1.1 var(--serif); margin: 0; letter-spacing: -.01em; }
.site-name a { text-decoration: none; }
.crumb { margin: 0 0 14px; font-size: .9rem; }
.crumb a { color: var(--accent); text-decoration: none; font-weight: 600; }
.standalone h1 { font: 700 1.6rem/1.2 var(--serif); margin: 4px 0 8px; }
.standalone h1.fc-claim { font: 600 1.25rem/1.4 var(--sans); margin: 0 0 12px; }

/* Toolbar */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  justify-content: space-between; padding-top: 20px; padding-bottom: 4px;
}
.toolbar input {
  flex: 1 1 220px; min-width: 0;
  font: inherit; font-size: .95rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 12px;
}
.toolbar input:focus-visible, button:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.toolbar-buttons { display: flex; gap: 8px; }
button {
  font: 500 .875rem var(--sans); color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px; cursor: pointer;
}
button:hover { border-color: var(--muted); }

/* Sections and lists */
.section-title {
  font: 600 .8rem var(--sans); text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin: 32px 0 12px;
}
.lists { display: grid; gap: 10px; }

details.list {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow); overflow: hidden;
}
details.list > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
}
details.list > summary::-webkit-details-marker { display: none; }
summary .chev {
  flex: none; width: 10px; height: 10px; margin-right: 2px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg); transition: transform .15s ease;
}
details[open] > summary .chev { transform: rotate(45deg); }
summary .name { font: 600 1.15rem/1.3 var(--serif); }
summary .count { margin-left: auto; font-size: .8rem; color: var(--muted); white-space: nowrap; }
.badge {
  font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--warn-soft); color: var(--warn); white-space: nowrap;
}

ol.items { list-style: none; margin: 0; padding: 0 16px 6px; counter-reset: rank; }
ol.items li {
  counter-increment: rank;
  display: grid; grid-template-columns: 28px 1fr auto; gap: 4px 12px;
  padding: 14px 0; border-top: 1px solid var(--border);
}
ol.items li::before {
  content: counter(rank);
  font: 700 1rem/1.4 var(--serif); color: var(--accent);
}
.item-body { min-width: 0; }
.item-title { font-weight: 600; line-height: 1.35; text-decoration: none; }
.item-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.meta { font-size: .8rem; color: var(--muted); margin-top: 3px; }
.meta .metric { color: var(--accent); font-weight: 500; }
.summary { margin: 6px 0 0; font-size: .95rem; }
.thumb {
  width: 96px; height: 64px; object-fit: cover; border-radius: 6px;
  background: var(--border);
}
.sublists { display: grid; gap: 8px; padding: 4px 16px 16px; }
details.list.sub { background: var(--bg); box-shadow: none; border-radius: 10px; }
details.list.sub > summary { padding: 11px 14px; }
details.list.sub summary .name { font-size: 1rem; }
details.list.sub ol.items { padding: 0 14px 4px; }
.empty { padding: 14px 0; color: var(--muted); border-top: 1px solid var(--border); margin: 0; }

.error {
  margin-top: 24px; padding: 12px 14px; border-radius: 8px;
  background: var(--warn-soft); color: var(--warn);
}
.footer { color: var(--muted); font-size: .8rem; padding-top: 24px; padding-bottom: 40px; }
.footer p { margin: 8px 0; }

@media (max-width: 560px) {
  .masthead-side { align-items: flex-start; }
  h1 { font-size: 1.7rem; }
  .thumb { width: 72px; height: 48px; }
  ol.items li { grid-template-columns: 22px 1fr auto; gap: 4px 10px; }
}
