@font-face {
  font-family: "Geist Pixel";
  src: url("/assets/geist-pixel-square.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #101010;
  --surface: #161616;
  --hover: #222222;
  --text: #f4f4f4;
  --secondary: #cdcdcd;
  --muted: #a7a7a7;
  --rule: #333333;
  --control: #666666;
  --sans: "Geist Pixel", ui-monospace, monospace;
  --mono: "Geist Pixel", ui-monospace, monospace;
  font: 100% / 1.6 var(--sans);
  font-synthesis: none;
  color: var(--text);
  background: var(--background);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .21em; }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }

:where(a, button, input, textarea, select):focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

::selection { background: #e0e0e0; color: #101010; }
.wrap { width: min(calc(100% - 64px), 1184px); margin-inline: auto; }
.skip { position: absolute; top: -90px; left: 12px; z-index: 5; padding: 10px; background: var(--text); color: var(--background); }
.skip:focus { top: 8px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 400; line-height: 1.15; letter-spacing: 0; text-wrap: pretty; }
[hidden] { display: none !important; }

.mast, .mast-tools, .ticker-inner, .quote, .story-meta, .foot, .actions {
  display: flex;
  align-items: center;
}

.mast { gap: 16px; min-height: 78px; }
.brand { font-family: var(--sans); font-size: 1.4rem; font-weight: 400; letter-spacing: 0; line-height: 1.25; }
.brand:hover { text-decoration: none; }
.mast-tools { margin-left: auto; gap: 24px; }
.dateline, .byline, .credits { color: var(--muted); font-size: .8125rem; }
.search-icon { display: grid; width: 44px; height: 44px; flex: none; place-items: center; }
.search-icon:hover { background: var(--hover); }
.search-icon i { position: relative; width: 14px; height: 14px; border: 1.5px solid; border-radius: 50%; }
.search-icon i::after { content: ""; position: absolute; right: -5px; bottom: -3px; width: 6px; height: 1.5px; background: currentColor; transform: rotate(45deg); }

.ticker { border-block: 1px solid var(--rule); background: var(--surface); }
.ticker-inner { display: block; padding-block: 12px; }
.ticker-name { display: inline-block; color: var(--muted); font-size: .75rem; margin-bottom: 6px; }
.ticker-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.quote { display: flex; min-width: 0; min-height: 34px; gap: 8px; align-items: center; font: .875rem var(--mono); }
.quote b { color: var(--text); min-width: 3em; }
.quote span { white-space: nowrap; }
.quote i { color: var(--muted); font-style: normal; white-space: nowrap; }
.quote:focus-visible { outline-offset: -2px; }

main { min-height: 50vh; padding-block: 38px 72px; }
.read, .outline { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 9px 14px; border: 1px solid var(--control); border-radius: 3px; font-size: .875rem; font-weight: 650; line-height: 1.3; }
.read { border-color: var(--text); background: var(--text); color: var(--background); }
.read:hover { background: #d6d6d6; text-decoration: none; }
.outline { background: transparent; color: var(--text); }
.outline:hover, .outline[aria-pressed="true"] { background: var(--hover); border-color: var(--secondary); }

.page-heading { margin-bottom: 22px; }
.page-heading h1, .home-news .page-heading h2 { font-size: clamp(1.45rem, 3.2vw, 2rem); }
.story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px clamp(14px, 2.4vw, 30px);
}
.story-card {
  padding-top: 12px;
  border-top: 2px solid var(--story-accent, var(--rule));
  overflow-wrap: anywhere;
}
.story-card h2 { font-size: clamp(1.0625rem, 2.25vw, 1.6rem); line-height: 1.2; }
.story-card h2 a { text-decoration-color: var(--story-accent, currentColor); }
.story-card time {
  display: block;
  margin-block: 8px 6px;
  color: var(--muted);
  font-size: .75rem;
}
.story-card p { color: var(--secondary); font-size: clamp(.9375rem, 1.55vw, 1rem); line-height: 1.55; }
.story-grid > .empty { grid-column: 1 / -1; }
.search-form + .story-grid:not(:empty), .load-more { margin-top: 24px; }
.back, .source-link { font-size: .875rem; font-weight: 650; text-decoration: underline; text-underline-offset: 4px; }

@media (min-width: 640px) {
  .story-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .story-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.story-wrap { max-width: 760px; margin-inline: auto; }
.back { display: inline-block; margin-bottom: 20px; }
.story-wrap h1 { font-size: clamp(2.1rem, 5vw, 4rem); }
.story-dek { margin-block: 14px; color: var(--secondary); font-size: 1.18rem; }
.story-meta { flex-wrap: wrap; justify-content: space-between; gap: 10px; border-block: 1px solid var(--rule); margin-block: 18px; padding-block: 10px; color: var(--muted); font-size: .875rem; }
.prose { max-width: 67ch; }
.prose h2, .desk-box h2, .market-table h2 { margin-block: 26px 8px; font-size: 1.45rem; }
.prose p { color: var(--secondary); font-size: 1.0625rem; line-height: 1.68; }
.prose p + p { margin-top: 1em; }
.figure { float: right; max-width: 170px; margin: 25px 0 14px 22px; border-top: 1px solid var(--control); padding: 12px; background: var(--surface); }
.figure span, .figure small { display: block; }
.figure span { font-size: 1.8rem; font-weight: 650; }
.figure small { color: var(--muted); font-size: .8125rem; }
.source-box { display: grid; justify-items: start; gap: 8px; margin-top: 30px; border-top: 1px solid var(--rule); padding-top: 14px; }
.source-box .kicker { margin: 0; color: var(--muted); font-size: .875rem; letter-spacing: 0; }
.source-link, .figure span { color: var(--story-accent, var(--secondary)); }
.figure { border-top-color: var(--story-accent, var(--control)); }

.market-table, .desk-box { max-width: 850px; margin-block: 16px; border: 1px solid var(--rule); padding: 16px; }
.market-table h2, .desk-box h2 { margin: 0 0 8px; }
.market-table table { width: 100%; margin-top: 10px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.market-table :is(th, td) { border-top: 1px solid var(--rule); padding: 8px; text-align: right; }
.market-table :is(th, td):first-child { text-align: left; }
.desk-box :is(p, small) { margin-block: 9px; color: var(--secondary); }
.desk-box form, .search-form { display: grid; max-width: 650px; gap: 12px; }
.desk-box label, .search-form label { display: grid; gap: 4px; font-weight: 600; }
.desk-box .inline { display: flex; align-items: center; }
.desk-box .read { justify-self: start; }
.desk-box input:not([type="checkbox"]), .desk-box textarea, .desk-box select, .search-form input {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--control);
  border-radius: 3px;
  padding: 9px 11px;
  background: var(--surface);
  color: var(--text);
}
.desk-box select {
  appearance: none;
  padding-right: 35px;
  background-image: linear-gradient(45deg, transparent 48%, var(--secondary) 50% 67%, transparent 69%), linear-gradient(135deg, transparent 32%, var(--secondary) 34% 50%, transparent 52%);
  background-position: right 16px center, right 10px center;
  background-repeat: no-repeat;
  background-size: 6px 6px;
}
::placeholder { color: var(--muted); opacity: 1; }
.actions { gap: 10px; }
.search-form > div { display: flex; gap: 8px; }
.search-form input { flex: 1; }
.empty, .notice { margin-top: 12px; padding: 16px; background: var(--surface); color: var(--secondary); }
.foot { flex-wrap: wrap; justify-content: space-between; gap: 14px; border-top: 1px solid var(--rule); padding-block: 18px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 12px 20px; font-size: .875rem; }
.smallbrand { font-size: 1rem; }
.credits { padding-bottom: 26px; }
.credits a { text-decoration: underline; }

@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .mast { min-height: 64px; gap: 10px; }
  .brand { font-size: 1.125rem; }
  .dateline { display: none; }
  .ticker-values { gap: 0 12px; }
  .quote { font-size: .75rem; gap: 6px; }
  main { padding-block: 24px 45px; }
  .smallbrand { font-size: .95rem; }
  .figure { float: none; margin: 16px 0; max-width: none; }
  .figure span, .figure small { display: inline-block; margin-right: 8px; }
}

@media (max-width: 370px) {
  .market-table { padding-inline: 9px; }
  .market-table :is(th, td) { padding-inline: 5px; }
}

/* One accent per story. */
.accent-amber { --story-accent: #e6ab64; }
.accent-rose { --story-accent: #f0a6c3; }
.accent-mint { --story-accent: #91dbb3; }
.accent-blue { --story-accent: #96baff; }
.accent-violet { --story-accent: #c1a6fa; }
.accent-coral { --story-accent: #f29a85; }
.accent-yellow { --story-accent: #e4ca6d; }
.accent-teal { --story-accent: #79d2d9; }
.accent-lime { --story-accent: #bad98a; }

.sponsor { border-top: 1px solid var(--rule); padding-block: 18px; font-size: .875rem; color: var(--secondary); }
.sponsor a { text-decoration: underline; text-underline-offset: 4px; }

.signals-link { color: var(--secondary); font-size: .875rem; }
.signals-link:hover { color: var(--text); }
.signals-intro, .signal-status, .signal-panel p, .signal-heading p { color: var(--secondary); }
.signals-intro { max-width: 70ch; }
.coin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 12px; }
.coin-tabs button { color: var(--text); background: transparent; border: 1px solid var(--rule); padding: 9px 16px; min-height: 44px; }
.coin-tabs button[aria-pressed="true"] { border-color: var(--text); background: var(--text); color: var(--background); }
.signal-status { color: var(--muted); font-size: .875rem; margin-bottom: 22px; }
.signal-heading { display: flex; gap: 16px; align-items: end; justify-content: space-between; padding: 18px 0; border-top: 1px solid var(--rule); }
.signal-heading h2 { font-size: clamp(1.4rem, 4vw, 2.2rem); margin: 6px 0; }
.signal-heading .signal-eyebrow { font-size: .75rem; color: var(--muted); }
.signal-heading p { font-size: .875rem; }
.signal-state { border: 1px solid var(--control); padding: 7px 12px; flex: none; }
.signal-notice { border-left: 2px solid #e6ab64; padding: 10px 12px; margin-bottom: 16px; background: var(--surface); }
.signal-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.signal-panel { border-top: 1px solid var(--rule); padding: 20px 0; min-width: 0; }
.signal-panel h2 { font-size: 1.4rem; margin-bottom: 8px; }
.signal-panel h3 { font-size: 1.1rem; margin-top: 22px; }
.signal-panel p { margin-top: 9px; line-height: 1.55; }
.signal-panel strong { color: var(--text); }
.signal-panel .model-value { color: #e6ab64; font-size: 1.4rem; }
.signal-panel canvas { display: block; width: 100%; height: 230px; margin-top: 14px; }
@media (max-width: 640px) {
  .signals-link { font-size: .8125rem; }
  .signal-panels { grid-template-columns: 1fr; gap: 0; }
  .signal-heading { align-items: start; flex-direction: column; }
  .mast-tools { gap: 10px; }
}

.signal-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 4px 0 22px; }
.signal-action { min-width: 0; padding: 16px; border: 1px solid var(--rule); background: var(--surface); }
.signal-action h2 { color: var(--secondary); font-size: .95rem; line-height: 1.3; }
.signal-action-value { margin: 10px 0 8px; color: #e6ab64; font-size: clamp(1.05rem, 2.8vw, 1.55rem); line-height: 1.25; overflow-wrap: anywhere; }
.signal-action time { color: var(--muted); font-size: .8rem; }
.signal-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 640px) {
  .signal-actions { gap: 9px; }
  .signal-action { padding: 12px; }
  .signal-stats { grid-template-columns: 1fr; gap: 0; }
}

.home-news { margin-top: 48px; }

.foot { color: var(--secondary); font-size: .875rem; }
.foot nav a { text-decoration: underline; text-underline-offset: 4px; }
