/* HordeLedger.com site styles. Same tokens as the launch-week blog post (dataviz default palette, validated
   light/dark steps). Site chrome uses .sh-/.sf- classes so it never collides with a post's own styles. */
:root {
  --page: #f3f5f7; --surface: #fcfcfb; --ink: #12151a; --ink-2: #4a4f57; --muted: #80848b;
  --rule: #dde0e4; --grid: #e1e0d9; --axis: #c3c2b7;
  --gold: #b8891a; --silver: #8d96a0; --copper: #b4683a;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --up: #1b7f5a; --down: #c93b3a; --accent: #b3261e; --accent-ink: #fff;
  --tip-bg: #12151a; --tip-fg: #f3f5f7;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Newsreader", Georgia, "Times New Roman", serif;
  --ui: system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --page: #0f1114; --surface: #1a1a19; --ink: #eeeeea; --ink-2: #b9bcc2; --muted: #898781; --rule: #2a2d32;
  --grid: #2c2c2a; --axis: #383835; --gold: #e0b44a; --silver: #b5bdc6; --copper: #d98a5a;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --up: #3fbf8a; --down: #ee7270;
  --accent: #e0574e; --accent-ink: #12151a; --tip-bg: #eeeeea; --tip-fg: #12151a; color-scheme: dark } }
:root[data-theme="dark"] {
  --page: #0f1114; --surface: #1a1a19; --ink: #eeeeea; --ink-2: #b9bcc2; --muted: #898781; --rule: #2a2d32;
  --grid: #2c2c2a; --axis: #383835; --gold: #e0b44a; --silver: #b5bdc6; --copper: #d98a5a;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --up: #3fbf8a; --down: #ee7270;
  --accent: #e0574e; --accent-ink: #12151a; --tip-bg: #eeeeea; --tip-fg: #12151a; color-scheme: dark }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--ui); font-size: 16px; line-height: 1.55; }
a { color: var(--s1); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--s1); outline-offset: 2px; }
img, svg { max-width: 100%; }

/* site header / footer */
.sh { border-bottom: 1px solid var(--rule); background: var(--page); position: sticky; top: 0; z-index: 20; }
.sh-in, .sf-in, .main { max-width: 1080px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.sh-in { display: flex; align-items: center; gap: 18px; min-height: 56px; flex-wrap: wrap; }
.sh-logo { font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; letter-spacing: -.01em; }
.sh-logo .coins { display: inline-flex; gap: 3px; } .coins i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.sh-nav { display: flex; gap: 4px 16px; flex-wrap: wrap; font-size: 15px; margin-left: auto; }
.sh-nav a { color: var(--ink-2); text-decoration: none; padding: 6px 0; }
.sh-nav a:hover, .sh-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--accent); }
.sf { border-top: 1px solid var(--rule); margin-top: 72px; font-size: 13.5px; color: var(--muted); }
.sf-in { padding-block: 28px 40px; display: grid; gap: 10px; }
.sf a { color: var(--ink-2); }
.sf-links { display: flex; gap: 6px 18px; flex-wrap: wrap; }

/* page */
.main { padding-block: 36px 0; }
.kicker { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
h1 { font-family: var(--display); font-weight: 800; font-size: clamp(32px, 6vw, 54px); line-height: 1.04; letter-spacing: -.02em; margin: 12px 0 14px; text-wrap: balance; }
h2 { font-family: var(--display); font-weight: 600; font-size: clamp(22px, 3.4vw, 28px); line-height: 1.2; margin: 44px 0 12px; letter-spacing: -.01em; }
h3 { font-family: var(--display); font-weight: 600; font-size: 18px; margin: 24px 0 8px; }
.lede { font-family: var(--body); font-size: 21px; line-height: 1.45; color: var(--ink-2); max-width: 62ch; margin: 0 0 18px; }
.prose { font-family: var(--body); font-size: 18.5px; line-height: 1.6; max-width: 64ch; }
.prose p { margin: 0 0 14px; }
.muted { color: var(--muted); } .small { font-size: 13.5px; }
.updated { font-size: 13.5px; color: var(--muted); }

.coin { white-space: nowrap; font-variant-numeric: tabular-nums; }
.coin .u { font-weight: 600; } .coin .ug { color: var(--gold); } .coin .us { color: var(--silver); } .coin .uc { color: var(--copper); }
.pos { color: var(--up); } .neg { color: var(--down); }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 26px 0 8px; }
.tiles div { border-top: 2px solid var(--ink); padding-top: 10px; min-width: 0; }
.tiles b { display: block; font-family: var(--display); font-size: 30px; font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }
.tiles span { font-size: 13.5px; color: var(--ink-2); line-height: 1.35; display: block; margin-top: 4px; }
@media (max-width: 700px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tiles b { font-size: 24px; } }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 820px) { .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 16px 18px; min-width: 0; }
.card h3 { margin-top: 0; }
a.card { display: block; color: inherit; text-decoration: none; } a.card:hover { border-color: var(--ink-2); }
.card .go { color: var(--s1); font-size: 14px; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; padding: 10px 16px; border-radius: 8px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule); }

table.t { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 14.5px; }
.t th, .t td { text-align: left; padding: 7px 10px 7px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.t th { color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.t td.n, .t th.n { text-align: right; padding-right: 0; padding-left: 10px; white-space: nowrap; }
.t td a { color: var(--ink); text-decoration-color: var(--rule); } .t td a:hover { text-decoration-color: var(--ink); }
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.q-Poor { color: #9d9d9d; } .q-Uncommon { color: #1a9e2a; } .q-Rare { color: #0b70d6; } .q-Epic { color: #9435d6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .q-Uncommon { color: #3ccd4e; } :root:not([data-theme="light"]) .q-Rare { color: #3d9bff; } :root:not([data-theme="light"]) .q-Epic { color: #b56cf2; } }
:root[data-theme="dark"] .q-Uncommon { color: #3ccd4e; } :root[data-theme="dark"] .q-Rare { color: #3d9bff; } :root[data-theme="dark"] .q-Epic { color: #b56cf2; }

/* item page */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; border-top: 1px solid var(--rule); margin: 22px 0; }
.facts div { border-bottom: 1px solid var(--rule); padding: 12px 12px 12px 0; min-width: 0; }
.facts dt { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.facts dd { margin: 2px 0 0; font-size: 18px; font-weight: 600; }
.tip-box { border-left: 3px solid var(--accent); background: var(--surface); padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 18px 0; max-width: 70ch; }
.tip-box b { display: block; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 2px; }
figure.pchart { margin: 18px 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 16px 16px 10px; position: relative; }
figure.pchart .ft { font-weight: 600; margin: 0; } figure.pchart .fs { font-size: 13px; color: var(--ink-2); margin: 0 0 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); margin: 0 0 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; } .legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.legend i.dash { background: repeating-linear-gradient(90deg, var(--ink-2) 0 4px, transparent 4px 7px) !important; height: 2px; }
.pchart svg { display: block; width: 100%; height: auto; overflow: visible; }
.pchart svg text { font-family: var(--ui); font-size: 11px; fill: var(--muted); }
.pchart .gl { stroke: var(--grid); stroke-width: 1; } .pchart .ax { stroke: var(--axis); stroke-width: 1; }
.pchart .ln { fill: none; stroke: var(--s1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pchart .lo { fill: none; stroke: var(--ink-2); stroke-width: 1.2; stroke-dasharray: 4 3; opacity: .75; }
.pchart .ar { fill: var(--s1); opacity: .08; }
.pchart .hx { stroke: var(--ink-2); stroke-width: 1; } .pchart .hd { fill: var(--s1); stroke: var(--surface); stroke-width: 2; }
.ctip { position: absolute; pointer-events: none; background: var(--tip-bg); color: var(--tip-fg); font-size: 12.5px; line-height: 1.4; padding: 7px 9px; border-radius: 6px; z-index: 5; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.crumbs { font-size: 13.5px; color: var(--muted); } .crumbs a { color: var(--ink-2); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; padding: 0; list-style: none; }
.chips a { display: inline-block; border: 1px solid var(--rule); border-radius: 999px; padding: 4px 12px; font-size: 14px; color: var(--ink); text-decoration: none; background: var(--surface); }
.chips a:hover { border-color: var(--ink-2); }
.cols { columns: 3 240px; column-gap: 28px; font-size: 14.5px; }
.cols a { display: block; padding: 2px 0; break-inside: avoid; color: var(--ink); text-decoration: none; } .cols a:hover { text-decoration: underline; }

/* market dashboard */
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 12px; }
.controls input, .controls select { font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); color: var(--ink); min-width: 0; }
.controls input[type=search] { flex: 1 1 240px; }
.controls .count { font-size: 13.5px; color: var(--muted); margin-left: auto; }
.t th button { all: unset; cursor: pointer; } .t th button:hover { color: var(--ink); }
.t th[aria-sort] button::after { content: " ↓"; } .t th[aria-sort="ascending"] button::after { content: " ↑"; }
.speed { font-size: 12.5px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--rule); white-space: nowrap; }
.more { margin: 16px 0; }
button.btn { border: 0; cursor: pointer; font: inherit; font-weight: 600; }
@media (max-width: 640px) { .hide-sm { display: none; } .t { font-size: 13.5px; } }
