/* Hoardwise: a minted-ledger look for btcxau.me.
   Palette: six colors built around hue 243 degrees. */

:root {
  --paper: #f1f1f9;
  --tint: #dbdaf1;
  --ink: #141236;
  --muted: #3c396a;
  --accent: #2f29a3;
  --rule: #aeaccd;

  --font-display: "Arial Black", Impact, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: 16px;
  --max-width: 72rem;
  --radius: 2px;
}

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0 0 0.6em;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.04;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 1.3rem + 3.6vw, 4.5rem);
}

h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.6rem);
}

h3 {
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.6rem);
  line-height: 1.12;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background-color: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.5rem;
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Header and navigation */

.site-header {
  background-color: var(--paper);
  border-bottom: 4px solid var(--ink);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover .brand-name {
  color: var(--accent);
}

.brand-mark {
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
}

.mark-ring {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5;
}

.mark-core {
  fill: var(--accent);
}

.mark-bar {
  fill: none;
  stroke: var(--paper);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 3px solid var(--paper);
}

.site-nav a:hover {
  border-bottom-color: var(--accent);
}

.site-nav a[aria-current="page"] {
  border-bottom-color: var(--ink);
}

/* Shared page structure */

.hero {
  padding-top: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
  border-bottom: 1px solid var(--rule);
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 3.5rem;
  }
}

.page-head {
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--rule);
}

.page-body {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.section {
  padding-top: clamp(2.75rem, 5vw, 4.5rem);
  padding-bottom: clamp(2.75rem, 5vw, 4.5rem);
  border-bottom: 1px solid var(--rule);
}

.section-flush {
  border-bottom: 0;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lede {
  max-width: 38rem;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
}

.section-lede {
  max-width: 40rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
}

.prose p {
  max-width: 42rem;
}

.prose h2 {
  margin-top: 2.25rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 1.25rem;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  background-color: var(--accent);
  color: var(--paper);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  border-color: var(--ink);
  background-color: var(--ink);
  color: var(--paper);
}

.btn-ghost {
  border-color: var(--ink);
  background-color: var(--paper);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
  background-color: var(--ink);
  color: var(--paper);
}

.notice {
  max-width: 46rem;
  margin: 2.5rem 0 0;
  padding: 1.1rem 1.3rem;
  background-color: var(--tint);
  border-left: 6px solid var(--accent);
}

.notice p {
  margin: 0;
}

/* Hero medallion */

.hero-art {
  justify-self: center;
  width: min(100%, 26rem);
  margin: 0;
}

.hero-coin {
  display: block;
  width: 100%;
  height: auto;
}

.coin-reeds {
  fill: none;
  stroke: var(--accent);
  stroke-width: 16;
  stroke-dasharray: 3 5;
}

.coin-spin {
  transform-box: view-box;
  transform-origin: 200px 200px;
  animation: coin-turn 90s linear infinite;
}

.coin-face {
  fill: var(--tint);
}

.coin-rim {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
}

.coin-ring {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
}

.coin-text {
  fill: var(--ink);
  font-family: var(--font-display);
  font-size: 58px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-anchor: middle;
}

.coin-divider {
  fill: var(--accent);
}

.hero-art figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

@keyframes coin-turn {
  to {
    transform: rotate(360deg);
  }
}

/* Commitments on the home page */

.commitments {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 760px) {
  .commitments {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }
}

.commitments li {
  padding-top: 1rem;
  border-top: 4px solid var(--ink);
}

.commitments .lead {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.3;
}

.commitments p {
  margin: 0;
}

/* Vertical timeline: a central rail with entries alternating left and right */

.timeline {
  position: relative;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 1.25rem;
  bottom: 1rem;
  left: 1.3rem;
  width: 10px;
  transform: translateX(-50%);
  background-image: repeating-linear-gradient(to bottom, var(--ink) 0 3px, var(--paper) 3px 7px);
}

.tl-entry {
  position: relative;
  margin: 0;
  padding: 0 0 clamp(2rem, 4vw, 3rem) 3.6rem;
}

.tl-marker {
  position: absolute;
  top: 0.15rem;
  left: 1.3rem;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  transform: translateX(-50%);
  border: 3px solid var(--ink);
  border-radius: 50%;
  background-color: var(--paper);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.tl-body {
  padding: 0.35rem 0.85rem 0.6rem;
  border-radius: var(--radius);
  transition: background-color 0.25s ease;
}

.tl-body p {
  margin: 0;
}

.tl-body .tl-date {
  margin: 0 0 0.3rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.tl-title {
  margin-bottom: 0.45rem;
}

.tl-title a {
  color: var(--ink);
  text-decoration-color: var(--accent);
}

.tl-title a:hover {
  color: var(--accent);
}

.tl-entry.is-passed .tl-marker {
  background-color: var(--tint);
}

.tl-entry.is-active .tl-marker {
  transform: translateX(-50%) scale(1.12);
  border-color: var(--accent);
  background-color: var(--accent);
  color: var(--paper);
}

.tl-entry.is-active .tl-body {
  background-color: var(--tint);
}

@media (min-width: 760px) {
  .timeline {
    margin-top: 3rem;
  }

  .timeline::before {
    left: 50%;
  }

  .tl-entry {
    width: 50%;
    padding: 0 2.7rem clamp(2.25rem, 4vw, 3.25rem);
  }

  .tl-entry:nth-child(odd) {
    margin-left: 0;
    text-align: right;
  }

  .tl-entry:nth-child(even) {
    margin-left: 50%;
    text-align: left;
  }

  .tl-entry:nth-child(odd) .tl-marker {
    left: 100%;
  }

  .tl-entry:nth-child(even) .tl-marker {
    left: 0;
  }
}

/* Timeline scrubber (only shown when JavaScript runs) */

.scrubber {
  margin: 0 0 3rem;
  padding: 1.25rem clamp(1rem, 3vw, 1.75rem) 1.5rem;
  background-color: var(--tint);
  border-top: 4px solid var(--ink);
}

.scrubber h2 {
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem);
}

.scrubber-help {
  max-width: 40rem;
  color: var(--muted);
}

.scrub-control {
  display: grid;
  gap: 0.25rem;
}

.scrub-control label {
  font-weight: 800;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2.75rem;
  margin: 0;
  background: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background-color: var(--accent);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -10px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background-color: var(--paper);
}

input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background-color: var(--accent);
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background-color: var(--paper);
}

input[type="range"]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

input[type="range"]:focus-visible::-webkit-slider-thumb {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

input[type="range"]:focus-visible::-moz-range-thumb {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.scrub-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.scrub-readout {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 3px solid var(--ink);
}

.scrub-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scrub-year {
  margin: 0.3rem 0 0.2rem;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  font-weight: 900;
  line-height: 1;
}

.scrub-title {
  margin: 0 0 0.6rem;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  font-weight: 800;
}

/* Comparison table, stacked on phones */

.compare-table {
  width: 100%;
  margin-top: 2rem;
  border-collapse: collapse;
}

.compare-table caption {
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: left;
}

.compare-table th,
.compare-table td {
  padding: 0.9rem 0.75rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.compare-table thead th {
  border-bottom: 4px solid var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.25rem);
  font-weight: 900;
}

.compare-table tbody th {
  width: 22%;
  font-weight: 800;
}

@media (max-width: 719px) {
  .compare-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .compare-table,
  .compare-table tbody,
  .compare-table tr,
  .compare-table th,
  .compare-table td {
    display: block;
    width: 100%;
  }

  .compare-table tr {
    padding: 0.9rem 0;
    border-bottom: 4px solid var(--ink);
  }

  .compare-table th,
  .compare-table td {
    padding: 0.2rem 0;
    border-bottom: 0;
  }

  .compare-table tbody th {
    width: 100%;
    margin-bottom: 0.35rem;
    font-size: 1.1rem;
  }

  .compare-table td::before {
    display: block;
    margin-bottom: 0.1rem;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    content: attr(data-label);
  }
}

/* Chart (inline SVG) */

.figure {
  max-width: 44rem;
  margin: 2.5rem 0 0;
}

.figure svg {
  display: block;
  width: 100%;
  height: auto;
}

.figure figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.chart-base {
  stroke: var(--ink);
  stroke-width: 2;
}

.chart-bar {
  fill: var(--accent);
}

.chart-value {
  fill: var(--ink);
  font-family: var(--font-display);
  font-size: 22px;
  text-anchor: middle;
}

.chart-era {
  fill: var(--ink);
  font-size: 17px;
  text-anchor: middle;
}

.chart-note {
  fill: var(--muted);
  font-size: 15px;
}

/* Glossary and lists */

.glossary {
  max-width: 46rem;
  margin: 2rem 0 0;
}

.glossary > div {
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}

.glossary dt {
  font-weight: 800;
}

.glossary dd {
  margin: 0.25rem 0 0;
}

.ledger-list {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.ledger-list li {
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}

.ledger-list li:last-child {
  border-bottom: 1px solid var(--rule);
}

.contact-action {
  margin: 2rem 0 0;
}

/* Footer */

.site-footer {
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
  background-color: var(--ink);
  color: var(--paper);
}

.site-footer a {
  color: var(--tint);
}

.site-footer :focus-visible {
  outline-color: var(--tint);
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1.6fr 1fr;
    gap: 3rem;
  }
}

.footer-brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-domain {
  margin-bottom: 0.75rem;
  color: var(--tint);
  font-weight: 700;
}

.footer-label {
  margin-bottom: 0.4rem;
  color: var(--tint);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Reduced motion: every animation and transition gets a static version */

@media (prefers-reduced-motion: reduce) {
  .coin-spin {
    animation: none;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
