/* =============================================================================
   styles.css — The Canadian Debt Clock
   Aesthetic: light + hand-drawn, to match limestonecitybitcoin.com — warm ink
   on white "notebook" paper, Bitcoin-orange identity, Courier ledger numerals,
   uppercase tracked labels, and the doodle "offset-fill" sketch frame. Red is
   reserved for the debt so it still hits hard on white.
   ============================================================================= */

/* Fonts hosted on this site (SIL Open Font License, see assets/fonts) */
@font-face { font-family: "Work Sans"; src: url("../assets/fonts/work-sans.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../assets/fonts/newsreader.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../assets/fonts/newsreader-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../assets/fonts/ibm-plex-mono.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #ECE8E0;             /* warm paper */
  --paper: #F4F1EB;          /* panels and cards */
  --paper-2: #E3DED4;        /* insets, tracks */
  --ink: #2B2A27;
  --ink-soft: #45433E;
  --muted: #5E5B55;
  --faint: #8E897F;          /* decorative only, not for text */
  --border: #CBC6BB;         /* hairlines */
  --line: #2B2A27;

  --debt: #A23A2A;           /* the debt: the one alarming colour */
  --debt-soft: #EBDCD3;
  --btc: #C7A04C;            /* the coin (fills, rings, lines) */
  --btc-ink: #7A5A1E;        /* gold dark enough to read as text */
  --btc-soft: #EEE5CF;
  --accent: #44626C;         /* slate blue */
  --warn: #8C4F2A;           /* burnt umber for the hidden tax */
  --warn-soft: #EADFD2;
  --good: #4E7A55;

  --font-num: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-ui: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --maxw: 1160px;

  /* flat cut-paper: square corners, no drop shadows */
  --wobble: 0;
  --pop: none;
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  padding: 0 clamp(14px, 4vw, 40px) 60px;
}

/* Faint graph-paper grid — the "notebook" the whole thing is sketched on */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(36, 31, 26, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 31, 26, 0.035) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at 50% 20%, #000 0%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at 50% 20%, #000 0%, transparent 85%);
}

.tabular,
.hero-number,
.value,
.ring-pct,
.ring-mined,
[data-metric] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ---------- Odometer (digit-roll) ---------- */
.odometer {
  display: inline-flex;
  align-items: flex-start;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.od-prefix,
.od-sep { display: inline-block; }
.od-digit {
  display: inline-block;
  height: 1em;
  width: 1ch;
  overflow: hidden;
  position: relative;
}
.od-ribbon { display: flex; flex-direction: column; will-change: transform; }
.od-ribbon span { display: block; height: 1em; text-align: center; }

/* ---------- Header ---------- */
.topbar {
  max-width: none;
  margin: 0 calc(-1 * clamp(14px, 4vw, 40px)) 22px;
  padding: 16px clamp(14px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font-weight: 700;
  font-size: clamp(19px, 3.2vw, 27px);
  letter-spacing: 0.2px;
  color: var(--ink);
}
.brand-doodle {
  width: 46px;
  height: 46px;
  flex: none;
}
.brand-name { color: var(--ink); }

.status-pill {
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #fff;
  white-space: nowrap;
  color: var(--muted);
}
.status-pill.live { color: var(--good); border-color: rgba(47, 158, 68, 0.45); background: #f3fbf5; }
.status-pill.seed { color: var(--muted); }

.tagline {
  max-width: var(--maxw);
  margin: 4px auto 26px;
  color: var(--ink-soft);
  font-size: clamp(14px, 2vw, 18px);
  text-align: center;
}
.tagline strong { color: var(--btc-ink); font-weight: 700; }

/* ---------- Section doodles ---------- */
.head-doodle { width: 56px; height: 56px; flex: none; display: block; }
.hero-doodle { width: 64px; height: 64px; margin: 0 auto 6px; display: block; }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto 34px;
  text-align: center;
  padding: 34px 22px 30px;
  border: 2.5px solid var(--line);
  border-radius: var(--wobble);
  background: var(--bg);
  box-shadow: var(--pop);
}
.hero-label {
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: 3.4px;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.hero-number {
  font-family: var(--font-num);
  font-weight: 700;
  font-size: clamp(21px, 7vw, 74px);
  letter-spacing: -1px;
  line-height: 1.05;
}
.debt { color: var(--debt); }
.hero-sub {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: clamp(13px, 1.8vw, 17px);
}
.accent { color: var(--accent); font-family: var(--font-num); font-weight: 700; }
.hero-context {
  margin-top: 12px;
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.dot { opacity: 0.4; }

/* ---------- Grid + cards ---------- */
.grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.two { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--wobble);
  padding: 20px 20px 18px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 3px 4px 0 -1px rgba(36, 31, 26, 0.05);
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--line);
  box-shadow: 5px 7px 0 -1px rgba(36, 31, 26, 0.10);
}
.card h3 {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.35;
  min-height: 2.7em; /* reserve 2 lines so the big numbers line up across a row */
}
.value {
  font-family: var(--font-num);
  font-weight: 700;
  font-size: clamp(21px, 3vw, 30px);
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: var(--ink);
}
.value.warn { color: var(--warn); }
.hint { margin-top: 10px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.hint .accent { color: var(--accent); }

/* ---------- Interest band ---------- */
.interest-band {
  max-width: var(--maxw);
  margin: 34px auto 0;
  padding: 30px clamp(18px, 3vw, 40px);
  border-radius: var(--wobble);
  text-align: center;
  border: 2.5px solid var(--debt);
  background: var(--debt-soft);
  box-shadow: var(--pop);
}
.interest-label {
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: 2.6px;
  font-size: 11.5px;
  text-transform: uppercase;
  color: var(--debt);
  margin-bottom: 12px;
}
.interest-number {
  font-family: var(--font-num);
  font-weight: 700;
  font-size: clamp(27px, 5.5vw, 56px);
  letter-spacing: -1px;
  line-height: 1;
  color: var(--debt);
}
.interest-sub {
  margin: 16px auto 0;
  max-width: 720px;
  color: var(--ink-soft);
  font-size: clamp(13px, 1.8vw, 16px);
}
.interest-sub strong { color: var(--ink); }
.interest-sub .accent { color: var(--debt); }

/* ---------- Panels ---------- */
.panel {
  max-width: var(--maxw);
  margin: 34px auto 0;
  padding: 30px clamp(18px, 3vw, 34px);
  border-radius: var(--wobble);
  border: 2px solid var(--line);
  background: var(--paper);
  box-shadow: var(--pop);
}
.panel.austrian { background: var(--warn-soft); border-color: var(--warn); }
.panel.bitcoin { background: var(--btc-soft); border-color: var(--btc); }
.panel.provinces { background: var(--paper); }

.panel-head { margin-bottom: 22px; max-width: 780px; }
.ph-title {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}
.panel-head h2 {
  font-size: clamp(22px, 3.4vw, 32px);
  letter-spacing: -0.4px;
  line-height: 1.1;
  color: var(--ink);
}
.panel.austrian .panel-head h2 { color: var(--warn); }
.panel.bitcoin .panel-head h2 { color: var(--btc-ink); }
.panel-head p { color: var(--ink-soft); font-size: clamp(13px, 1.7vw, 16px); }
.panel-head strong { color: var(--ink); }
.panel-head em { color: var(--ink); font-style: italic; }
.btc-mark { color: var(--btc); }

/* ---------- Provinces ---------- */
.prov-bars { display: flex; flex-direction: column; gap: 9px; }
.prov-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
}
.prov-name {
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
}
.prov-track {
  height: 14px;
  background: #ece9e3;
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
}
.prov-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.prov-val {
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.prov-foot { margin-top: 16px; font-size: 12px; color: var(--muted); text-align: center; }

/* ---------- True Return ---------- */
.panel.truereturn { background: var(--paper); }
.panel.truereturn .panel-head h2 { color: var(--ink); }
.tr-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.tr-label {
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
}
.tr-input {
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px 11px 13px 11px / 11px 13px 11px 12px;
  padding: 10px 14px;
  width: 210px;
  max-width: 100%;
  box-shadow: 3px 4px 0 -1px rgba(36, 31, 26, 0.10);
}
.tr-input:focus { outline: none; border-color: var(--btc); box-shadow: 3px 4px 0 -1px rgba(247, 147, 26, 0.35); }
.tr-input::placeholder { color: var(--faint); text-transform: none; font-weight: 400; }
.tr-go { padding: 11px 18px; font-size: 14px; }
.tr-ranges {
  display: inline-flex;
  gap: 0;
  border: 2px solid var(--line);
  border-radius: 12px 11px 13px 11px / 11px 13px 11px 12px;
  overflow: hidden;
  background: #fff;
  margin-left: auto;
  box-shadow: 3px 4px 0 -1px rgba(36, 31, 26, 0.10);
}
.tr-range {
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  border-right: 1.5px solid var(--border);
  padding: 9px 13px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.tr-range:last-child { border-right: none; }
.tr-range:hover { background: var(--paper-2); }
.tr-range.on { background: var(--ink); color: #fff; }

.tr-status {
  font-size: 14px;
  color: var(--ink-soft);
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--paper-2);
  border: 1.5px solid var(--border);
  margin-bottom: 14px;
}
.tr-status.err { color: var(--debt); background: var(--debt-soft); border-color: rgba(217, 45, 32, 0.35); }
.tr-status.ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-color: var(--btc); background: var(--btc-soft); }
.tr-pick {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px 9px 11px 9px / 9px 11px 9px 10px;
  padding: 7px 12px;
  cursor: pointer;
  box-shadow: 2px 3px 0 -1px rgba(36, 31, 26, 0.12);
}
.tr-pick:hover { border-color: var(--btc); background: var(--btc-soft); }
.tr-alt {
  flex-basis: 100%;
  font-size: 12.5px;
  color: var(--btc-ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed rgba(185, 100, 10, 0.5);
  width: fit-content;
}
.tr-alt:hover { border-bottom-style: solid; }

.tr-chart-wrap {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--wobble);
  box-shadow: var(--pop);
  padding: 18px clamp(14px, 2.4vw, 24px) 16px;
}
.tr-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.tr-sym { font-family: var(--font-num); font-weight: 700; font-size: 22px; color: var(--ink); }
.tr-name { font-weight: 600; font-size: 15px; color: var(--ink-soft); }
.tr-ex { font-family: var(--font-num); font-size: 12px; color: var(--muted); }

.tr-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.tr-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px 11px 13px 11px / 11px 13px 11px 12px;
  background: var(--paper);
}
.tr-stat.real { border-color: rgba(47, 111, 143, 0.4); }
.tr-stat.m2 { border-color: var(--debt); background: var(--debt-soft); }
.tr-stat.btc { border-color: var(--btc); background: var(--btc-soft); }
.tr-k { font-size: 11px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted); }
.tr-k em { font-style: normal; text-transform: none; letter-spacing: 0; }
.tr-v { font-family: var(--font-num); font-weight: 700; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.1; }
.tr-v.pos { color: var(--good); }
.tr-v.neg { color: var(--debt); }
.tr-stat.m2 .tr-v.pos { color: #1f7a33; }
.tr-s { font-size: 12px; color: var(--muted); }

.tr-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 8px; }
.tr-legend i, .tr-tip i { display: inline-block; width: 12px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

.tr-canvas-box { position: relative; }
.tr-chart { display: block; width: 100%; height: 320px; cursor: crosshair; }
.tr-tip {
  position: absolute;
  pointer-events: none;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  color: var(--ink-soft);
  box-shadow: 3px 4px 0 -1px rgba(36, 31, 26, 0.12);
  white-space: nowrap;
  z-index: 2;
}
.tr-tip .tt-d { font-family: var(--font-num); font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.tr-tip b { font-family: var(--font-num); color: var(--ink); margin-left: 6px; }

.tr-note { margin-top: 14px; }
.tr-punch { font-size: clamp(15px, 1.9vw, 17px); color: var(--ink); line-height: 1.55; }
.tr-punch strong { color: var(--debt); }
.tr-punch strong.btc { color: var(--btc-ink); }
.tr-method { margin-top: 10px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.tr-method strong { color: var(--ink-soft); font-weight: 600; }

/* ---------- Bitcoin layout ---------- */
.ring-wrap { position: relative; display: grid; place-items: center; margin: 4px auto 22px; }
.btc-grid { margin-top: 0; }
.ring { width: 220px; height: 220px; }
.ring-track { fill: none; stroke: #efe7da; stroke-width: 12; }
.ring-progress {
  fill: none;
  stroke: var(--btc);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 603.19; /* 2πr, r=96 */
  stroke-dashoffset: 603.19;
  transition: stroke-dashoffset 0.4s ease;
}
.ring-center { position: absolute; text-align: center; }
.ring-pct { font-family: var(--font-num); font-size: 30px; font-weight: 700; color: var(--btc-ink); }
.ring-label { font-size: 11px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.ring-mined { font-family: var(--font-num); font-weight: 700; font-size: 13px; color: var(--ink); margin-top: 6px; }

.btc-card { background: var(--bg); border-color: #f0dcc0; }
.btc-card:hover { border-color: var(--btc); }
.btc-val { color: var(--btc-ink); }

.maxi-grid { margin-top: 18px; }

/* ---------- Scarcity gut-punch ---------- */
.scarcity-note {
  margin-top: 22px;
  padding: 24px clamp(18px, 3vw, 30px);
  border-radius: var(--wobble);
  border: 2px solid var(--btc);
  background: var(--bg);
  color: var(--ink-soft);
  font-size: clamp(14px, 1.9vw, 17px);
  line-height: 1.65;
  text-align: center;
  box-shadow: 4px 5px 0 -1px rgba(247, 147, 26, 0.18);
}
.scarcity-note strong { color: var(--ink); }
.scarcity-head {
  color: var(--ink);
  font-weight: 800;
  font-size: clamp(17px, 2.4vw, 22px);
  margin-bottom: 20px;
}
.gut-punch { display: flex; align-items: stretch; justify-content: center; gap: 8px; }
.gp-side { flex: 1 1 0; min-width: 0; max-width: 360px; padding: 6px 16px; }
.gp-label {
  display: block;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
  margin-bottom: 10px;
}
.gp-val {
  display: block;
  font-family: var(--font-num);
  font-weight: 700;
  font-size: clamp(20px, 3.4vw, 32px);
  letter-spacing: -0.5px;
}
.gp-val.debt { color: var(--debt); }
.gp-vs {
  align-self: center;
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--faint);
  padding: 0 4px;
}
.scarcity-punch {
  margin-top: 22px;
  font-size: clamp(16px, 2.3vw, 21px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
}
.scarcity-punch [data-metric] {
  color: var(--btc-ink);
  font-family: var(--font-num);
  font-weight: 800;
}
.maxi-cta {
  display: block;
  margin-top: 14px;
  color: var(--btc-ink);
  font-weight: 700;
  font-size: clamp(15px, 2vw, 18px);
}

/* ---------- Share card button ---------- */
.share-row {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}
.share-btn {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 15px;
  color: #2a1a05;
  background: var(--btc);
  border: 2px solid var(--line);
  border-radius: 12px 11px 13px 11px / 11px 13px 11px 12px;
  padding: 14px 22px;
  cursor: pointer;
  box-shadow: 4px 5px 0 -1px rgba(36, 31, 26, 0.18);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.share-btn:hover { transform: translateY(-2px); box-shadow: 5px 8px 0 -1px rgba(36, 31, 26, 0.22); }
.share-btn:active { transform: translateY(0); box-shadow: 2px 3px 0 -1px rgba(36, 31, 26, 0.2); }
.share-btn:disabled { opacity: 0.65; cursor: default; transform: none; }
.share-hint { font-size: 13px; color: var(--muted); }

/* ---------- Lightning tip ---------- */
.tip-row {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  text-align: left;
  font-size: 13px;
}
.tip-qr {
  display: block;
  width: 120px;
  height: 120px;
  background: #fff;
  padding: 8px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  image-rendering: pixelated;
}
.tip-info { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.tip-actions { display: flex; align-items: center; gap: 10px; }
.tip-zap { color: var(--btc); font-size: 16px; }
.tip-label { color: var(--muted); max-width: 260px; }
.tip-addr {
  font-family: var(--font-num);
  font-weight: 700;
  color: var(--btc-ink);
  text-decoration: none;
  border-bottom: 1px dashed rgba(185, 100, 10, 0.5);
}
.tip-addr:hover { border-bottom-style: solid; }
.tip-copy {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 12px;
  color: var(--btc-ink);
  background: var(--btc-soft);
  border: 1.5px solid rgba(247, 147, 26, 0.5);
  border-radius: 8px;
  padding: 4px 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.tip-copy:hover { background: #ffecd0; }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--maxw);
  margin: 50px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; }
.footer h4 { color: var(--ink); font-size: 14px; margin-bottom: 10px; }
.footer p { font-size: 13px; }
.footer code { font-family: var(--font-num); color: var(--accent); background: #eef3f6; padding: 1px 6px; border-radius: 5px; }
.sources { list-style: none; font-size: 13px; }
.sources li { padding: 3px 0; border-bottom: 1px dashed var(--border); }
.foot-note { margin-top: 24px; font-size: 12.5px; text-align: center; }
.foot-note strong { color: var(--btc-ink); }
.foot-credit { margin-top: 10px; font-size: 12.5px; text-align: center; color: var(--muted); }
.foot-credit a { color: var(--btc-ink); font-weight: 700; text-decoration: none; }
.foot-credit a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid, .grid.three { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  body { padding: 0 12px 48px; }
  .topbar { margin: 0 -12px 20px; padding: 14px 12px; justify-content: center; gap: 10px; }
  .grid, .grid.three, .grid.two { grid-template-columns: 1fr; }

  .status-pill { white-space: normal; max-width: 100%; text-align: center; font-size: 11px; }

  .hero { padding: 26px 14px 24px; }
  .hero-label { letter-spacing: 2px; }
  .hero-number { letter-spacing: 0; }
  .hero-context { gap: 6px 10px; }

  .panel, .interest-band { padding: 22px 16px; }
  .interest-sub { font-size: 13px; }
  .card { padding: 16px; }
  .ph-title { justify-content: center; }
  .head-doodle { width: 48px; height: 48px; }

  .prov-row { grid-template-columns: 30px 1fr auto; gap: 9px; }

  .share-row { flex-direction: column; gap: 10px; }
  .tip-row { flex-direction: column; text-align: center; }
  .tip-info { align-items: center; }
  .tip-label { max-width: 100%; }

  /* True Return stacks */
  .tr-form { justify-content: center; }
  .tr-input { width: 100%; }
  .tr-ranges { margin-left: 0; width: 100%; justify-content: center; }
  .tr-range { flex: 1; padding: 9px 6px; }
  .tr-summary { grid-template-columns: 1fr; }
  .tr-chart { height: 240px; }
  .tr-title { justify-content: center; }
  .tr-legend { justify-content: center; }

  .gut-punch { flex-direction: column; align-items: center; }
  .gp-side { max-width: 100%; }
  .gp-vs { padding: 6px 0; }

  .tagline,
  .panel-head,
  .card,
  .footer,
  .foot-grid > div { text-align: center; }
  .sources { display: inline-block; text-align: left; }
}

/* =============================================================================
   AMBIENT SLEEVE THEME (shared with limestonecitybitcoin.com)
   Warm paper, flat cut-paper panels, quiet type, a red hairline, film grain.
   These rules sit last so they restyle the components above without changing
   any layout or behaviour.
   ============================================================================= */

body {
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

strong, b { font-weight: 500; }

/* The old graph-paper layer becomes a film-grain layer */
.bg-grid {
  z-index: 50;
  pointer-events: none;
  background-image: url("../assets/grain.svg");
  background-size: 220px 220px;
  opacity: 0.16;
  mix-blend-mode: multiply;
  mask-image: none;
  -webkit-mask-image: none;
}

/* Plex Mono has one weight: keep every numeral at 400 so nothing is faux-bold */
.hero-number, .value, .interest-number, .prov-name, .prov-val, .tr-input,
.tr-range, .tr-sym, .tr-v, .tr-tip .tt-d, .tr-tip b, .ring-pct, .ring-mined,
.gp-val, .gp-vs, .scarcity-punch [data-metric], .tip-addr, .status-pill,
.hero-context, .accent, .footer code {
  font-weight: 400;
}

:focus-visible { outline: 1px solid var(--debt); outline-offset: 3px; }
::selection { background: #BCCDD3; color: var(--ink); }

/* ---------- Header ---------- */
.topbar {
  background: transparent;
  border-bottom: 0;
  padding-top: 32px;
  padding-bottom: 8px;
  align-items: flex-start;
}
.brand { gap: 14px; align-items: center; }
.brand-doodle { width: 52px; height: 52px; }
.brand-text { display: flex; flex-direction: column; gap: 7px; }
.brand-name {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.brand-rule { display: block; width: 200px; max-width: 100%; height: 1px; background: var(--debt); }
.brand-sub { font-size: 13px; font-weight: 300; color: var(--muted); line-height: 1.2; }

.status-pill {
  border-radius: 0;
  border: 1px solid var(--border);
  background: transparent;
  font-size: 12px;
  color: var(--muted);
}
.status-pill.live { color: var(--good); border-color: var(--good); background: transparent; }

.tagline {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(22px, 3.4vw, 34px);
  line-height: 1.25;
  color: var(--ink);
  margin: 56px auto 40px;
  max-width: 760px;
}
.tagline strong { color: var(--btc-ink); font-weight: 300; font-style: italic; }

/* ---------- Hero ---------- */
.hero {
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 40px 0 36px;
}
.hero-label,
.interest-label,
.card h3,
.tr-label,
.tr-k,
.ring-label {
  font-family: var(--font-ui);
  font-weight: 400;
  letter-spacing: 0.18em;
}
.hero-label { font-size: 12px; color: var(--muted); }
.hero-number { letter-spacing: -0.02em; }
.hero-sub { font-weight: 300; }
.hero-doodle { width: 72px; height: 72px; margin-bottom: 14px; }

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.card:hover {
  transform: none;
  box-shadow: inset 0 -1px 0 var(--debt);
}
.card h3 { font-size: 11px; color: var(--muted); }
.value { letter-spacing: -0.02em; }
.hint { font-weight: 300; color: var(--muted); }

/* ---------- Interest band ---------- */
.interest-band {
  border: 0;
  border-radius: 0;
  background: var(--debt-soft);
  box-shadow: none;
}
.interest-label { font-size: 11.5px; }
.interest-number { letter-spacing: -0.02em; }

/* ---------- Panels ---------- */
.panel,
.panel.provinces,
.panel.truereturn {
  border: 0;
  border-radius: 0;
  background: var(--paper);
  box-shadow: none;
}
.panel.austrian { background: var(--warn-soft); border: 0; }
.panel.bitcoin { background: var(--btc-soft); border: 0; }

.panel-head h2 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.panel-head p { font-weight: 300; }
.panel-head strong { font-weight: 500; }
.panel.austrian .panel-head h2 { color: var(--warn); }
.panel.bitcoin .panel-head h2 { color: var(--ink); }
.btc-mark { color: var(--btc-ink); }

/* Cards inside coloured panels sit on lighter paper */
.panel.austrian .card,
.panel.bitcoin .card,
.btc-card { background: var(--bg); border: 0; }
.btc-card:hover { box-shadow: inset 0 -1px 0 var(--btc); }

/* ---------- Provinces ---------- */
.prov-track { background: var(--paper-2); border: 0; border-radius: 0; height: 12px; }
.prov-fill { border-radius: 0; }

/* ---------- True Return ---------- */
.tr-input,
.tr-ranges,
.tr-pick,
.tr-chart-wrap {
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  background: var(--bg);
}
.tr-input:focus { border-color: var(--debt); box-shadow: none; }
.tr-input::placeholder { color: var(--faint); }
.tr-range { font-size: 13px; border-right: 1px solid var(--border); }
.tr-range:hover { background: var(--paper-2); }
.tr-range.on { background: var(--ink); color: var(--bg); }
.tr-status { border-radius: 0; border: 0; background: var(--paper-2); }
.tr-status.err { background: var(--debt-soft); border: 0; }
.tr-status.ask { background: var(--btc-soft); border: 0; }
.tr-pick:hover { border-color: var(--ink); background: var(--btc-soft); }
.tr-alt { border-bottom: 1px solid var(--btc); font-weight: 400; }
.tr-chart-wrap { background: var(--bg); border: 0; }
.tr-stat,
.tr-stat.real,
.tr-stat.m2,
.tr-stat.btc { border: 0; border-radius: 0; background: var(--paper-2); }
.tr-stat.m2 { background: var(--debt-soft); }
.tr-stat.btc { background: var(--btc-soft); }
.tr-stat.m2 .tr-v.pos { color: var(--good); }
.tr-name { font-weight: 400; }
.tr-tip { border: 1px solid var(--line); border-radius: 0; box-shadow: none; background: var(--bg); }

/* Shared button: the "Chart it" button (and anything else using .btn) */
.btn,
.tr-go,
.share-btn {
  font-family: var(--font-ui);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--bg);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
  min-height: 44px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.btn:hover,
.tr-go:hover,
.share-btn:hover {
  background: var(--debt);
  border-color: var(--debt);
  transform: none;
  box-shadow: none;
}
.share-btn:active { transform: none; box-shadow: none; }

/* ---------- Bitcoin ring ---------- */
.ring-track { stroke: var(--paper-2); }
.ring-progress { stroke: var(--btc); stroke-linecap: butt; }
.ring-pct { color: var(--btc-ink); }

/* ---------- Scarcity note ---------- */
.scarcity-note {
  border: 0;
  border-top: 1px solid var(--btc);
  border-radius: 0;
  background: var(--bg);
  box-shadow: none;
}
.scarcity-head {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(22px, 3vw, 30px);
}
.gp-label { font-weight: 300; }
.gp-vs { color: var(--faint); }
.scarcity-punch { font-weight: 400; }
.maxi-cta { font-weight: 400; color: var(--btc-ink); }

/* ---------- Tip ---------- */
.tip-qr { border: 0; border-radius: 0; background: #ffffff; }
.tip-zap { color: var(--btc); }
.tip-addr { border-bottom: 1px solid var(--btc); }
.tip-copy {
  border: 1px solid var(--btc-ink);
  border-radius: 0;
  background: transparent;
  font-weight: 400;
  min-height: 32px;
}
.tip-copy:hover { background: var(--btc-soft); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); }
.footer h4 {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer p, .sources { font-weight: 300; }
.footer code { color: var(--ink); background: var(--paper-2); border-radius: 0; }
.sources li { border-bottom: 1px solid var(--border); }
.foot-note strong { color: var(--debt); font-weight: 500; }
.foot-credit a { color: var(--ink); font-weight: 400; border-bottom: 1px solid var(--debt); }
.foot-credit a:hover { color: var(--debt); text-decoration: none; }

@media (max-width: 540px) {
  .topbar { padding-top: 20px; }
  .brand { flex-direction: row; text-align: left; }
  .brand-rule { width: 150px; }
  .tagline { margin: 32px auto 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .btn, .tr-go, .share-btn { transition: none; }
}

/* =============================================================================
   AMBIENT II — open space, hairlines, abstract plates
   No boxes or tinted panels: sections are separated by hairlines and marked
   with a small abstract "plate" and a track number, like a record sleeve.
   ============================================================================= */

@font-face { font-family: "IBM Plex Mono"; src: url("../assets/fonts/ibm-plex-mono-light.woff2") format("woff2"); font-weight: 300; font-display: swap; }

body { counter-reset: track; }

/* Plates: small abstract covers */
.hero-plate,
.head-doodle {
  display: block;
  flex: none;
  box-shadow: 0 1px 2px rgba(43, 42, 39, 0.14), 0 14px 36px rgba(43, 42, 39, 0.12);
}

/* ---------- Header ---------- */
.brand-text { gap: 6px; }
.status-pill { border: 0; padding: 6px 0; }

/* ---------- Hero: one quiet, enormous number beside a plate ---------- */
.hero,
.interest-band {
  display: flex;
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 7vw, 80px);
}
.hero-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.hero-plate { width: clamp(180px, 24vw, 300px); height: auto; aspect-ratio: 1 / 1; }
.interest-band .hero-plate { width: clamp(150px, 18vw, 220px); }

.hero-label, .interest-label { margin: 0; color: var(--muted); }
.hero-number,
.interest-number {
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 1;
}
.hero-number { font-size: clamp(26px, 6.4vw, 80px); }
.hero-number.debt { color: var(--ink); }
.interest-number { font-size: clamp(26px, 5vw, 60px); color: var(--debt); }
.hero-rule { display: block; width: 96px; height: 1px; background: var(--debt); }
.hero-sub, .interest-sub { margin: 0; text-align: left; max-width: 620px; }
.hero-context { justify-content: flex-start; margin: 0; font-weight: 300; }
.interest-band { border-top-color: var(--border); }
.interest-sub .accent { color: var(--debt); }

/* ---------- Stat rows: hairline columns instead of cards ---------- */
.grid { gap: 0 28px; }
.card,
.panel.austrian .card,
.panel.bitcoin .card,
.btc-card {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  padding: 22px 0 26px;
}
.card:hover, .btc-card:hover { box-shadow: none; border-top-color: var(--ink); }
.value { font-weight: 300; font-size: clamp(22px, 2.6vw, 28px); }
.value.warn { color: var(--ink); }

/* ---------- Sections: numbered, open, separated by a hairline ---------- */
.panel,
.panel.provinces,
.panel.truereturn,
.panel.austrian,
.panel.bitcoin {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  padding: clamp(40px, 6vw, 64px) 0 0;
  margin-top: clamp(56px, 8vw, 96px);
  counter-increment: track;
}
.panel-head { position: relative; max-width: 820px; margin-bottom: 36px; }
.ph-title {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  column-gap: 32px;
  row-gap: 14px;
  margin-bottom: 18px;
}
.head-doodle { width: 120px; height: 120px; grid-row: span 2; }
.ph-title::after {
  content: counter(track, decimal-leading-zero);
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  font-family: var(--font-num);
  font-size: 13px;
  color: var(--debt);
}
.panel-head h2,
.panel.austrian .panel-head h2,
.panel.bitcoin .panel-head h2 {
  grid-column: 2;
  grid-row: 2;
  color: var(--ink);
  font-size: clamp(30px, 4.4vw, 46px);
}
.btc-mark { color: var(--ink); }
.panel-head p { max-width: 640px; line-height: 1.75; }

/* ---------- Provinces: thin lines ---------- */
.prov-track { height: 6px; background: var(--paper-2); }
.prov-name, .prov-val { font-weight: 300; }

/* ---------- True Return ---------- */
.tr-chart-wrap { padding: 18px 0 0; border-top: 1px solid var(--border); }
.tr-stat, .tr-stat.m2, .tr-stat.btc { background: transparent; border-top: 1px solid var(--border); padding: 14px 0; }
.tr-stat.m2 { border-top-color: var(--debt); }
.tr-stat.btc { border-top-color: var(--btc); }
.tr-v { font-weight: 300; }

/* ---------- Bitcoin ring: a fine line ---------- */
.ring-track, .ring-progress { stroke-width: 3; }
.ring-pct { font-weight: 300; color: var(--ink); }

/* ---------- Scarcity ---------- */
.scarcity-note { background: transparent; border-top: 1px solid var(--border); padding-left: 0; padding-right: 0; }
.gp-val { font-weight: 300; }
.scarcity-punch [data-metric] { font-weight: 300; }

/* ---------- Phones ---------- */
@media (max-width: 700px) {
  .hero, .interest-band { flex-direction: column-reverse; align-items: flex-start; }
  .interest-band { flex-direction: column; }
  .hero-plate { width: 160px; }
  .interest-band .hero-plate { width: 120px; }
  .ph-title { column-gap: 20px; }
  .head-doodle { width: 88px; height: 88px; }
}
@media (max-width: 540px) {
  .tagline, .panel-head, .card, .hero-text { text-align: left; }
  .ph-title { justify-content: start; }
}
.value.debt { color: var(--debt); }
@media (max-width: 540px) {
  .topbar { justify-content: space-between; align-items: flex-start; }
  .brand-text { align-items: flex-start; }
  .status-pill { text-align: right; max-width: 45%; }
}

/* Plates sit beside a section's text, never above its title */
.ph-title { display: flex; flex-direction: column; gap: 10px; }
.ph-title::after { order: -1; }
.ph-body { display: flex; align-items: flex-start; gap: clamp(24px, 4vw, 48px); }
.ph-body p { flex: 1 1 auto; min-width: 0; margin: 0; }
.ph-body .head-doodle { width: 140px; height: 140px; grid-row: auto; }
@media (max-width: 540px) {
  .ph-body { gap: 16px; }
  .ph-body .head-doodle { width: 88px; height: 88px; }
}
.ph-title { align-items: flex-start; text-align: left; }
.ph-title h2 { text-align: left; }
.ph-title::after { align-self: flex-start; }


/* =============================================================================
   SITE BAR — the Limestone City Bitcoin top bar, so the clock sits inside
   the main site. Sticks to the top; scrolls sideways on narrow phones.
   ============================================================================= */
/* clip (not hidden) so the bar can stick to the top of the window */
body { overflow-x: clip; }
.site-bar { position: sticky; top: 0; z-index: 50; margin: 0 calc(-1 * clamp(14px, 4vw, 40px)); background: #F4F1EB; border-bottom: 1px solid #CBC6BB; }
.site-bar-inner { max-width: 1184px; margin: 0 auto; padding: 10px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-bar-brand { display: flex; align-items: center; gap: 12px; flex: none; color: #2B2A27; text-decoration: none; font-family: "Work Sans", system-ui, sans-serif; font-size: 16px; font-weight: 500; letter-spacing: 0.02em; }
.site-bar-brand img { width: 36px; height: 36px; display: block; }
.site-bar-nav { display: flex; align-items: center; gap: 24px; overflow-x: auto; scrollbar-width: none; }
.site-bar-nav::-webkit-scrollbar { display: none; }
.site-bar-nav a { flex: none; display: inline-flex; align-items: center; min-height: 44px; color: #2B2A27; text-decoration: none; font-family: "Work Sans", system-ui, sans-serif; font-size: 15px; font-weight: 400; white-space: nowrap; }
.site-bar-nav a:hover, .site-bar-nav a[aria-current="page"] { color: #A23A2A; }
@media (max-width: 860px) {
  .site-bar-inner { padding: 8px 20px; gap: 16px; }
  .site-bar-brand span { display: none; }
  .site-bar-nav { gap: 20px; }
}
