/* Hoard - hoardforever.com */
:root {
  --vault: #13222c;
  --panel: #1a2e3a;
  --panel-2: #213845;
  --line: #2c4655;
  --bone: #e9e3d1;
  --mist: #8fa3ae;
  --gold: #d8a93b;
  --silver: #b9c0c6;
  --copper: #c07a45;
  --gain: #6fb38a;
  --loss: #d0655a;
  --display: "Marcellus", "Palatino Linotype", Palatino, Georgia, serif;
  --text: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --measure: 70ch;
}
* { box-sizing: border-box; }
html { background: var(--vault); color: var(--bone); font-family: var(--text); font-size: 16px; line-height: 1.55; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #f0c65a; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
p { max-width: var(--measure); margin: 0 0 1em; }
.muted { color: var(--mist); }
.num { font-variant-numeric: tabular-nums; }

/* header */
.top { border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1100px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 28px; }
.wordmark { font-family: var(--display); font-size: 1.7rem; color: var(--bone); text-decoration: none; letter-spacing: .04em; }
.wordmark span { color: var(--gold); }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--mist); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--bone); }
.nav a[aria-current="page"] { color: var(--bone); border-bottom-color: var(--gold); }

main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 36px 20px 64px; }

/* buttons */
.btn { display: inline-block; font: 500 1rem var(--text); padding: 11px 20px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--bone); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--mist); color: var(--bone); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #1b1606; }
.btn.gold:hover { background: #e8bb4f; color: #1b1606; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* home */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; padding: 20px 0 36px; }
.hero p { font-size: 1.15rem; color: #cfd6d6; }
.ledger { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.ledger h3 { font-size: 1.05rem; color: var(--mist); font-family: var(--text); font-weight: 500; margin-bottom: 10px; }
.ledger-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.ledger-row:first-of-type { border-top: 0; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.facts h3 { color: var(--bone); }
.facts p { color: var(--mist); font-size: .98rem; }

/* money */
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.money .g, .money .s, .money .c { margin-right: .35em; }
.money .g::after, .money .s::after, .money .c::after { content: ""; display: inline-block; width: .55em; height: .55em; border-radius: 50%; margin-left: .15em; vertical-align: .05em; }
.money .g::after { background: var(--gold); }
.money .s::after { background: var(--silver); }
.money .c::after { background: var(--copper); }
.money > span:last-child { margin-right: 0; }

/* download steps */
.steps { list-style: none; padding: 0; margin: 28px 0; counter-reset: step; max-width: 760px; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 30px 64px; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: -4px; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--gold); color: var(--gold); font-family: var(--display); font-size: 1.3rem; display: grid; place-items: center; }
.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 21px; top: 44px; bottom: 6px; width: 1px; background: var(--line); }
.steps h3 { margin-bottom: .3em; }
kbd, code { font-family: Consolas, "IBM Plex Mono", monospace; font-size: .92em; background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.note { background: var(--panel); border-left: 3px solid var(--gold); padding: 14px 18px; border-radius: 0 8px 8px 0; max-width: 760px; margin: 8px 0 24px; }
.note p:last-child { margin-bottom: 0; }
.qa { max-width: 760px; }
.qa details { border-top: 1px solid var(--line); padding: 12px 0; }
.qa summary { cursor: pointer; font-weight: 500; }
.qa details p { margin: 10px 0 0; color: #cfd6d6; }

/* market picker */
.picker { display: grid; gap: 18px; margin: 18px 0 28px; }
.pick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pick-row > .label { width: 90px; color: var(--mist); }
.chip { font: 500 .98rem var(--text); padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--bone); cursor: pointer; }
.chip:hover { border-color: var(--mist); }
.chip[aria-pressed="true"] { background: var(--bone); color: var(--vault); border-color: var(--bone); }
.chip:disabled { opacity: .4; cursor: default; }
.chip small { color: inherit; opacity: .7; margin-left: 4px; }
.market-line { color: var(--mist); margin-bottom: 18px; }

/* search and lists */
.search { display: flex; gap: 10px; margin-bottom: 22px; position: relative; }
.search input { flex: 1; font: 1.05rem var(--text); padding: 12px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--bone); }
.search input::placeholder { color: var(--mist); }
.results { position: absolute; top: 100%; left: 0; right: 0; z-index: 5; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; margin-top: 6px; overflow: hidden; }
.results a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; color: var(--bone); text-decoration: none; border-top: 1px solid var(--line); }
.results a:first-child { border-top: 0; }
.results a:hover, .results a:focus { background: var(--panel-2); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.tab { font: 500 1rem var(--text); background: none; border: 0; color: var(--mist); padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab[aria-selected="true"] { color: var(--bone); border-bottom-color: var(--gold); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--mist); font-weight: 500; font-size: .92rem; }
td.r, th.r { text-align: right; }
tr:hover td { background: rgba(255,255,255,.02); }
.up { color: var(--gain); }
.down { color: var(--loss); }
.empty { padding: 28px 0; color: var(--mist); }

/* item page */
.back { display: inline-block; margin-bottom: 14px; }
.item-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; margin-bottom: 20px; }
.item-head h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 30px; }
.stat { background: var(--panel); padding: 16px 18px; }
.stat .k { color: var(--mist); font-size: .9rem; }
.stat .v { font-size: 1.35rem; margin-top: 2px; }
.stat .h { color: var(--mist); font-size: .82rem; margin-top: 2px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 26px; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.panel-head h2 { margin: 0; font-size: 1.4rem; }
.range { display: flex; gap: 6px; }
.chart-box { position: relative; height: 320px; }

/* best time to buy: weekday x hour */
.heat { display: grid; grid-template-columns: 44px repeat(24, minmax(0, 1fr)); gap: 2px; font-size: .78rem; }
.heat .day { color: var(--mist); align-self: center; }
.heat .hr { color: var(--mist); text-align: center; }
.heat .cell { aspect-ratio: 1 / 1; border-radius: 3px; background: var(--panel-2); min-width: 0; }
.heat .cell[data-v] { cursor: default; }
.heat-key { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--mist); font-size: .88rem; flex-wrap: wrap; }
.heat-key .bar { width: 140px; height: 10px; border-radius: 5px; background: linear-gradient(90deg, #2f8f6a, var(--panel-2), #b8862a); }
.best { margin-top: 10px; }

/* footer */
.foot { border-top: 1px solid var(--line); color: var(--mist); font-size: .9rem; }
.foot-inner { max-width: 1100px; margin: 0 auto; padding: 22px 20px; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.foot p { margin: 0; }

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .facts { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .top-inner { gap: 16px; }
  .nav { gap: 16px; }
  .heat { grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 1px; font-size: .66rem; }
  .heat .hr.odd { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
