:root {
  color-scheme: dark;
  --midnight: #101724;
  --midnight-deep: #0b111c;
  --slate: #283448;
  --slate-soft: #344157;
  --ember: #ff795b;
  --copper: #e6b69a;
  --ivory: #f5f1eb;
  --muted: #aeb6c3;
  --line: rgba(230, 182, 154, .18);
  --line-strong: rgba(230, 182, 154, .34);
  --panel: rgba(20, 29, 43, .9);
  --panel-2: rgba(13, 20, 31, .9);
  --header-height: 68px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--midnight);
  color: var(--ivory);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 86% 8%, rgba(255, 121, 91, .09), transparent 28rem),
    linear-gradient(180deg, #111a29 0, var(--midnight) 26rem, var(--midnight-deep) 100%);
  color: var(--ivory);
  font-size: 16px;
  line-height: 1.55;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(230, 182, 154, .026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 182, 154, .026) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
  content: "";
  pointer-events: none;
}

a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  transform: translateY(-150%);
  border: 1px solid var(--copper);
  border-radius: 4px;
  background: var(--midnight);
}
.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-height);
  border-bottom: 1px solid rgba(230, 182, 154, .14);
  background: rgba(16, 23, 36, .98);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .18);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: min(100% - 40px, 1280px);
  min-height: var(--header-height);
  margin: 0 auto;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
}
.brand-mark { width: 36px; height: 36px; object-fit: contain; }
.brand-wordmark { width: 112px; height: auto; object-fit: contain; }
.beta-tag {
  margin-left: 2px;
  padding: 3px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--copper);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.product-nav { justify-self: center; display: flex; align-items: stretch; min-height: var(--header-height); }
.product-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
}
.product-nav a:hover, .product-nav a[aria-current="page"] { color: var(--ivory); }
.product-nav a[aria-current="page"]::after {
  position: absolute;
  right: 18px;
  bottom: 0;
  left: 18px;
  height: 2px;
  background: var(--ember);
  box-shadow: 0 0 16px rgba(255, 121, 91, .55);
  content: "";
}

.header-state { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; }
.header-state::before { width: 6px; height: 6px; border-radius: 50%; background: var(--copper); box-shadow: 0 0 12px rgba(230, 182, 154, .65); content: ""; }
.nav-toggle { display: none; min-width: 44px; min-height: 44px; border: 0; background: none; color: var(--ivory); }
.nav-toggle span, .nav-toggle::before, .nav-toggle::after { display: block; width: 22px; height: 1px; margin: 5px auto; background: currentColor; content: ""; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span { opacity: 0; }
.nav-toggle[aria-expanded="true"]::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"]::after { transform: translateY(-6px) rotate(-45deg); }

.shell { width: min(100% - 40px, 1280px); margin: 0 auto; padding: 54px 0 72px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; color: var(--copper); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow::before { width: 28px; height: 1px; background: var(--ember); content: ""; }

.page-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); gap: 48px; align-items: end; margin-bottom: 28px; }
.page-hero h1 { max-width: 820px; margin: 0; font-size: clamp(2.2rem, 6vw, 4.7rem); font-weight: 560; letter-spacing: -.055em; line-height: .98; }
.page-hero h1 span { color: var(--copper); }
.hero-copy { margin: 0; color: var(--muted); font-size: 1rem; }

.beta-boundary {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin: 24px 0 36px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--ember);
  background: linear-gradient(90deg, rgba(255, 121, 91, .07), rgba(40, 52, 72, .18));
}
.beta-boundary strong { font-size: .73rem; letter-spacing: .12em; text-transform: uppercase; }
.beta-boundary span { color: var(--muted); font-size: .82rem; text-align: right; }

.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: clamp(1.25rem, 2.5vw, 1.8rem); font-weight: 560; }
.section-head p { margin: 0; color: var(--muted); font-size: .8rem; }

.market-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.market-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(230, 182, 154, .18);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(40, 52, 72, .5), rgba(15, 22, 34, .93) 58%);
  box-shadow: 0 22px 48px rgba(0, 0, 0, .18);
}
.market-card::before { position: absolute; top: 0; left: 0; width: 42%; height: 1px; background: linear-gradient(90deg, var(--ember), transparent); content: ""; }
.market-card.withheld::before { background: linear-gradient(90deg, var(--copper), transparent); opacity: .55; }
.card-main { padding: 22px; }
.market-card-head { display: flex; justify-content: space-between; align-items: start; gap: 18px; }
.market-kicker { margin: 0 0 4px; color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.market-card h3 { margin: 0; font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 580; letter-spacing: -.035em; }
.pool-line { margin: 5px 0 0; color: var(--copper); font: .78rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }

.state-pill { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; width: fit-content; padding: 6px 8px; border: 1px solid rgba(255, 121, 91, .42); border-radius: 4px; background: rgba(255, 121, 91, .08); color: var(--ivory); font-size: .65rem; font-weight: 750; letter-spacing: .1em; line-height: 1.3; text-transform: uppercase; }
.state-pill::before { width: 6px; height: 6px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 10px rgba(255, 121, 91, .72); content: ""; }
.state-pill.withheld { border-color: rgba(230, 182, 154, .28); background: rgba(230, 182, 154, .045); color: var(--copper); }
.state-pill.withheld::before { border: 1px solid currentColor; border-radius: 1px; background: transparent; box-shadow: none; transform: rotate(45deg); }

.freshness { display: flex; align-items: center; gap: 9px; margin: 18px 0; color: var(--muted); font-size: .82rem; }
.freshness::before { width: 18px; height: 1px; background: var(--slate-soft); content: ""; }
.market-stats { display: grid; grid-template-columns: 1fr 1fr; margin: 18px 0 20px; border-block: 1px solid rgba(230, 182, 154, .12); }
.market-stat { padding: 13px 12px 13px 0; }
.market-stat + .market-stat { padding-left: 16px; border-left: 1px solid rgba(230, 182, 154, .12); }
.market-stat span { display: block; color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.market-stat strong { display: block; margin-top: 4px; font-size: .9rem; font-weight: 560; }
.market-stat strong.unavailable { color: var(--copper); }

.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.primary-action, .secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: .73rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}
.primary-action { border: 1px solid var(--ember); background: var(--ember); color: #151b25; }
.primary-action:hover { background: #ff8a70; }
.secondary-action { border: 1px solid var(--line-strong); color: var(--copper); background: transparent; }
.action-arrow { margin-left: 20px; font-size: 1rem; }

.identity { margin: 0; border-top: 1px solid rgba(230, 182, 154, .12); }
.identity summary { display: flex; align-items: center; min-height: 46px; padding: 0 22px; color: var(--muted); cursor: pointer; font-size: .72rem; font-weight: 700; letter-spacing: .08em; list-style: none; text-transform: uppercase; }
.identity summary::-webkit-details-marker { display: none; }
.identity summary::after { margin-left: auto; color: var(--copper); content: "+"; font-size: 1rem; }
.identity[open] summary::after { content: "−"; }
.identity dl { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 7px 14px; margin: 0; padding: 0 22px 20px; }
.identity dt { color: var(--muted); font-size: .72rem; }
.identity dd { min-width: 0; margin: 0; font: .72rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }

.market-card.withheld .card-main { background: radial-gradient(circle at 90% 10%, rgba(230, 182, 154, .065), transparent 16rem); }
.withheld-note { display: flex; gap: 12px; align-items: start; margin: 18px 0 20px; padding: 13px 14px; border: 1px solid rgba(230, 182, 154, .16); background: rgba(11, 17, 28, .52); }
.withheld-note img { width: 26px; height: 26px; object-fit: contain; opacity: .52; }
.withheld-note p { margin: 0; color: var(--muted); font-size: .8rem; }
.withheld-note strong { color: var(--ivory); font-weight: 600; }

.product-footnote { display: flex; justify-content: space-between; gap: 24px; margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; }

/* Analyze */
.analyze-shell { padding-top: 26px; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--copper); font-size: .73rem; font-weight: 700; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.back-link::before { margin-right: 9px; content: "←"; }
.market-strip { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 22px; margin: 4px 0 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.market-strip h1 { margin: 0; font-size: clamp(1.75rem, 4vw, 3.1rem); font-weight: 560; letter-spacing: -.045em; line-height: 1.05; }
.market-strip p { margin: 5px 0 0; color: var(--copper); font: .78rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.market-state { display: grid; justify-items: end; gap: 7px; }
.market-state small { color: var(--muted); font-size: .72rem; }

.qualified-summary { display: grid; grid-template-columns: 1.4fr .6fr .6fr; gap: 1px; margin: 0 0 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--line); }
.summary-cell { min-width: 0; padding: 15px 17px; background: rgba(17, 25, 39, .96); }
.summary-cell span { display: block; color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.summary-cell strong { display: block; margin-top: 3px; font-size: .9rem; font-weight: 560; }
.summary-cell.primary strong { color: var(--ivory); font-size: clamp(1.3rem, 3vw, 2rem); letter-spacing: -.035em; }

.chart-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .55fr); gap: 14px; }
.chart-card { min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.chart-price { grid-column: 1 / -1; }
.chart-head { display: flex; justify-content: space-between; align-items: start; gap: 18px; padding: 16px 18px 11px; }
.chart-head h2, .chart-head h3, .chart-head h4 { margin: 0; font-size: 1rem; font-weight: 600; }
.chart-head p { margin: 3px 0 0; color: var(--muted); font-size: .73rem; }
.chart-limit { color: var(--copper) !important; font-size: .66rem !important; font-weight: 700; letter-spacing: .08em; text-align: right; text-transform: uppercase; }
.chart-plot { position: relative; margin: 0 8px; overflow: hidden; border: 1px solid rgba(230, 182, 154, .1); border-radius: 6px; background: rgba(9, 15, 25, .66); }
.chart-card canvas { display: block; width: 100%; height: 17.5rem; }
.chart-card figcaption { margin: 0; padding: 9px 18px 13px; color: var(--muted); font-size: .69rem; }
.chart-inspection { position: absolute; inset: 8px 8px auto auto; max-width: calc(100% - 16px); margin: 0; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 4px; background: rgba(16, 23, 36, .96); color: var(--ivory); font-size: .7rem; pointer-events: none; }
.chart-inspection[hidden] { display: none; }
.chart-exact { margin: 0; border-top: 1px solid var(--line); }
.chart-exact summary { display: flex; align-items: center; min-height: 44px; padding: 0 18px; color: var(--muted); cursor: pointer; font-size: .7rem; }
.chart-exact ol { max-height: 230px; margin: 0; padding: 10px 18px 16px 38px; overflow: auto; color: var(--muted); font-size: .7rem; }

.activity-card { padding-bottom: 16px; }
.activity-total { margin: 6px 18px 16px; font-size: 1.2rem; font-weight: 600; }
.activity-list { display: grid; gap: 12px; margin: 0; padding: 0 18px; list-style: none; }
.activity-label { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .76rem; }
.activity-track { height: 4px; margin-top: 7px; overflow: hidden; background: var(--slate); }
.activity-track meter { display: block; width: 100%; height: 4px; border: 0; background: transparent; }
.activity-track meter::-webkit-meter-bar { border: 0; background: transparent; }
.activity-track meter::-webkit-meter-optimum-value { background: linear-gradient(90deg, var(--ember), var(--copper)); }
.activity-track meter::-moz-meter-bar { background: linear-gradient(90deg, var(--ember), var(--copper)); }
.activity-list li:nth-child(2) .activity-track { opacity: .62; }

.reserve-card { padding-bottom: 6px; }
.reserve-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 8px 8px; }
.reserve-figure { margin: 0; border: 1px solid rgba(230, 182, 154, .1); border-radius: 6px; background: rgba(9, 15, 25, .46); }
.reserve-figure h4 { margin: 0; padding: 10px 10px 0; font-size: .78rem; }
.reserve-figure canvas { height: 9.5rem; }
.reserve-figure figcaption { padding: 6px 10px 9px; }

.evidence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.evidence-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.evidence-card h2 { margin: 0 0 13px; font-size: .93rem; }
.evidence-card dl { display: grid; grid-template-columns: 126px minmax(0, 1fr); gap: 8px 14px; margin: 0; }
.evidence-card dt { color: var(--muted); font-size: .72rem; }
.evidence-card dd { min-width: 0; margin: 0; font-size: .74rem; overflow-wrap: anywhere; }
.evidence-card code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .7rem; }

.withheld-stage { position: relative; display: grid; place-items: center; min-height: 440px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: radial-gradient(circle at 50% 32%, rgba(230, 182, 154, .07), transparent 24rem), var(--panel-2); }
.withheld-stage::before { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, transparent 0 18px, rgba(230, 182, 154, .018) 18px 19px); content: ""; }
.withheld-content { position: relative; max-width: 620px; padding: 54px 24px; text-align: center; }
.withheld-content img { width: 62px; height: 62px; object-fit: contain; opacity: .5; filter: saturate(.65); }
.withheld-content h2 { margin: 16px 0 8px; font-size: clamp(1.45rem, 4vw, 2.3rem); font-weight: 560; letter-spacing: -.035em; }
.withheld-content > p { max-width: 520px; margin: 0 auto; color: var(--muted); }
.withheld-reasons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 24px 0; padding: 0; list-style: none; text-align: left; }
.withheld-reasons li { padding: 11px; border: 1px solid rgba(230, 182, 154, .12); background: rgba(16, 23, 36, .55); color: var(--muted); font-size: .7rem; }
.withheld-reasons strong { display: block; margin-bottom: 3px; color: var(--copper); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; }

.review-fixture { margin: 18px 0 0; color: #818b9b; font-size: .66rem; text-align: right; }

@media (max-width: 900px) {
  .header-state { display: none; }
  .page-hero { grid-template-columns: 1fr; gap: 20px; }
  .market-grid, .chart-grid, .evidence-grid { grid-template-columns: 1fr; }
  .chart-price { grid-column: auto; }
  .qualified-summary { grid-template-columns: 1.2fr .8fr .8fr; }
}

@media (max-width: 700px) {
  :root { --header-height: 62px; }
  body.menu-open { position: fixed; width: 100%; overflow: hidden; }
  .header-inner { grid-template-columns: 1fr auto; width: min(100% - 24px, 1280px); }
  .brand-mark { width: 32px; height: 32px; }
  .brand-wordmark { width: 96px; }
  .beta-tag { display: none; }
  .nav-toggle { display: block; }
  .product-nav { position: fixed; top: var(--header-height); right: 0; bottom: 0; left: 0; display: none; align-content: start; justify-self: stretch; min-height: auto; padding: 18px 12px; background: rgba(16, 23, 36, .995); }
  .product-nav.is-open { display: grid; }
  .product-nav a { min-height: 54px; padding: 0 14px; border-bottom: 1px solid var(--line); font-size: .88rem; }
  .product-nav a[aria-current="page"]::after { top: 14px; right: auto; bottom: 14px; left: 0; width: 2px; height: auto; }
  .shell { width: min(100% - 24px, 1280px); padding: 34px 0 52px; }
  .page-hero h1 { font-size: clamp(2.3rem, 12vw, 3.5rem); }
  .beta-boundary { display: grid; gap: 5px; }
  .beta-boundary span { text-align: left; }
  .market-card-head { display: grid; }
  .state-pill { order: -1; }
  .market-strip { grid-template-columns: 1fr; }
  .market-state { justify-items: start; }
  .chart-head { display: grid; gap: 4px; }
  .chart-limit { text-align: left; }
  .chart-card canvas { height: 13rem; }
  .reserve-grid { grid-template-columns: 1fr; }
  .reserve-figure canvas { height: 9rem; }
  .withheld-reasons { grid-template-columns: 1fr; }
  .product-footnote { display: grid; gap: 6px; }
}

@media (max-width: 430px) {
  .shell { width: calc(100% - 16px); }
  .card-main { padding: 16px; }
  .identity summary { padding-inline: 16px; }
  .identity dl { grid-template-columns: 1fr; padding-inline: 16px; }
  .market-stats { grid-template-columns: 1fr; }
  .market-stat + .market-stat { padding-left: 0; border-top: 1px solid rgba(230, 182, 154, .12); border-left: 0; }
  .analyze-shell { padding-top: 12px; }
  .analyze-shell .back-link { min-height: 30px; }
  .analyze-shell .market-strip { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; margin-top: 0; margin-bottom: 6px; padding-bottom: 6px; }
  .analyze-shell .market-strip .eyebrow { display: none; }
  .analyze-shell .market-strip h1 { font-size: 1.3rem; }
  .analyze-shell .market-strip p { margin-top: 2px; font-size: .7rem; }
  .analyze-shell .market-state { justify-items: end; }
  .analyze-shell .market-state small { display: none; }
  .analyze-shell .beta-boundary { display: flex; min-height: 36px; margin: 6px 0 8px; padding: 6px 10px; align-items: center; }
  .analyze-shell .beta-boundary span { display: none; }
  .qualified-summary { display: block; margin-bottom: 8px; }
  .qualified-summary .summary-cell:not(.primary) { display: none; }
  .summary-cell.primary { padding: 8px 12px; }
  .summary-cell.primary strong { font-size: 1.08rem; }
  .chart-head { padding: 10px 12px 6px; }
  .chart-head h2, .chart-head h3, .chart-head h4 { font-size: .94rem; }
  .chart-plot { margin: 0 4px; }
  .chart-card figcaption { padding-inline: 12px; }
  .chart-card canvas { height: 13rem; }
  .evidence-card { padding: 14px; }
  .evidence-card dl { grid-template-columns: 1fr; gap: 3px; }
  .evidence-card dd { margin-bottom: 7px; }
  .withheld-stage { min-height: 420px; }
  .review-fixture { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
