/* Should Have Used Monero · V2 — style tokens matched to OrangeFren.com
   (black bg, #151515 cards with #232323 borders, 4px radius,
   theme color #c34b22, Open Sans + monospace details) */
:root {
  --bg: #000000;
  --surface: #151515;
  --surface-2: #1e1e1e;
  --line: #232323;
  --line-strong: #353535;
  --text: #ffffff;
  --muted: #959595;
  --faint: #757575;
  --theme: #c34b22;
  --theme-dim: rgba(195, 75, 34, 0.15);
  --radius: 4px;
  --mono: Hack, Consolas, ui-monospace, monospace;
  --sans: "Open Sans", Arial, sans-serif;
  --shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

/* light mode: system preference... */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #faf8f6;
    --surface: #ffffff;
    --surface-2: #f1ede9;
    --line: #e5e0db;
    --line-strong: #cfc8c1;
    --text: #1a1614;
    --muted: #5c554f;
    --faint: #6f665f;
    --theme-dim: rgba(195, 75, 34, 0.10);
    --shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  }
}
/* ...or explicit toggle */
:root[data-theme="light"] {
  --bg: #faf8f6;
  --surface: #ffffff;
  --surface-2: #f1ede9;
  --line: #e5e0db;
  --line-strong: #cfc8c1;
  --text: #1a1614;
  --muted: #5c554f;
  --faint: #6f665f;
  --theme-dim: rgba(195, 75, 34, 0.10);
  --shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--theme); text-underline-offset: 3px; }
a:hover { color: var(--theme); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--theme); color: var(--surface); padding: 8px 14px; border-radius: var(--radius); z-index: 10;
}
.skip-link:focus { left: 12px; top: 12px; }

/* header */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: 0.02em; }
.brand-logo { width: 52px; display: block; }
.brand-name strong { color: var(--theme); font-weight: 800; }
.head-actions { display: flex; align-items: center; }
.theme-toggle {
  font-family: var(--mono); font-size: 16px; line-height: 1;
  color: var(--muted); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  width: 34px; height: 34px; cursor: pointer;
}
/* hide the toggle when JS can't handle it */
.theme-toggle { display: none; }
html[data-js] .theme-toggle { display: block; }
.theme-toggle:hover { color: var(--text); border-color: var(--theme); }
.tagline { margin: 0; font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* hero */
.hero { padding: 72px 0 56px; }
.hero h1 {
  font-size: clamp(30px, 6vw, 48px);
  line-height: 1.12; font-weight: 800; margin: 0 0 18px; letter-spacing: -0.01em;
}
.accent { color: var(--theme); }
.lede { color: var(--muted); font-size: 17px; max-width: 56ch; margin: 0 0 16px; }

/* tally */
.tally { font-family: var(--mono); font-size: 15px; color: var(--text); margin: 0; line-height: 1.9; }
.tally strong { color: var(--theme); font-weight: 600; }
.tally-row { display: block; }
.tally-sep { color: var(--faint); }
.tally-tail { color: var(--muted); font-size: 13.5px; }

/* timeline */
.timeline { padding: 24px 0 8px; }

/* coin filters */
.filters { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 0 0 28px 48px; }
.filters-label { font-family: var(--mono); font-size: 12.5px; color: var(--faint); }
.filters-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-btn {
  font-family: var(--mono); font-size: 12.5px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: 4px 12px; cursor: pointer;
}
.filter-btn:hover { color: var(--text); border-color: var(--theme); }
.filter-btn.active { color: #fff; background: var(--theme); border-color: var(--theme); }
.filter-count { opacity: 0.75; font-size: 11px; }

.entries { list-style: none; margin: 0; padding: 0; position: relative; }
.entries::before {
  content: ""; position: absolute; left: 10px; top: 8px; bottom: 8px;
  width: 2px; background: var(--line-strong);
}
/* entries are visible by default (no-JS); scroll-reveal hides them only when
   JS is active (html[data-js] is set by app.js before first paint).
   Reveal = fade only (no translateY: moving element during touch-scroll
   looked like the timeline dots popping in and disappearing). */
html[data-js] .entry { opacity: 0; transition: opacity 0.25s ease; }
html[data-js] .entry.visible { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  html[data-js] .entry { transition: none; }
  html[data-js] .entry.visible { opacity: 1; }
}
.entry::before {
  content: ""; position: absolute; left: 2px; top: 8px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg); border: 4px solid var(--theme);
}
.entry-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px;
  overflow-wrap: anywhere; min-width: 0;
}
.entry-card h2, .entry-card p, .entry-card blockquote, .entry-src, .entry-src a { overflow-wrap: anywhere; word-break: break-word; }
.entry:hover .entry-card { border-color: var(--theme); }
.entry-meta { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: baseline; margin-bottom: 10px; }
.entry-date {
  font-family: var(--mono); font-size: 13px; color: var(--theme);
  background: var(--theme-dim); border-radius: var(--radius); padding: 2px 8px;
}
.entry-loss {
  font-family: var(--mono); font-size: 13px; color: #d9714a;
  border: 1px solid var(--theme); border-radius: var(--radius); padding: 2px 8px;
}
.entry h2 { margin: 0 0 8px; font-size: 21px; line-height: 1.25; font-weight: 700; }
.entry blockquote {
  margin: 0 0 10px; padding: 10px 14px; border-left: 3px solid var(--theme);
  background: var(--surface-2); border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text); font-size: 15px;
}
.entry blockquote::before { content: "“"; color: var(--theme); font-weight: 700; }
.entry blockquote::after { content: "”"; color: var(--theme); font-weight: 700; }
.entry p { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.entry-src { font-family: var(--mono); font-size: 12.5px; color: var(--faint); }
.entry-src a { color: var(--muted); }
.entry-tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.entry-tag {
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 1px 9px;
  background: var(--surface-2);
}

/* mobile: slimmer timeline rail */
@media (max-width: 640px) {
  .entry { padding-left: 30px; padding-bottom: 28px; }
  .entry::before { left: 2px; top: 7px; width: 13px; height: 13px; border-width: 4px; }
  .entries::before { left: 8px; width: 1px; }
  .filters { margin-left: 30px; }
}

/* outro + footer */
.outro { padding: 48px 0 64px; }
.outro h2 { font-size: 26px; margin: 0 0 12px; }
.outro p { color: var(--muted); max-width: 60ch; margin: 0; }
.site-foot { border-top: 1px solid var(--line); padding: 24px 0; }
.site-foot p { margin: 0; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

/* floating action button (OrangeFren referral) */
.fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 50;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  background: var(--theme); color: #fff;
  border: none; border-radius: var(--radius);
  padding: 12px 18px; cursor: pointer;
  font-family: var(--sans); text-align: left;
  box-shadow: var(--shadow);
  transition: background 0.15s ease, transform 0.15s ease;
}
.fab:hover { background: #d55a2e; transform: translateY(-2px); }
.fab:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.fab-title { font-weight: 700; font-size: 15px; line-height: 1.2; }
.fab-sub { font-family: var(--mono); font-size: 12px; opacity: 0.9; }
@media (max-width: 640px) {
  .fab { right: 12px; bottom: 12px; padding: 10px 14px; }
  .fab-title { font-size: 14px; }
  .fab-sub { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .entry { opacity: 1; transform: none; transition: none; }
}
