:root {
  --bg: #0e0e0e;
  --surface: #1f1f1f;
  --surface-high: #2a2a2a;
  --cyan: #00bfff;
  --cyan-soft: #8fd6ff;
  --text: #e2e2e2;
  --mute: #bcc8d1;
  --line: #3d4850;
  --up: #14f195;
  --down: #ffb4ab;
  --sidebar: 16rem;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, system-ui, sans-serif; min-height: 100%; max-width: 100%; overflow-x: clip; }
a { color: var(--cyan); text-decoration: none; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 0.5rem; top: 0.5rem; background: var(--cyan); color: #001e2c; padding: 0.4rem; z-index: 60; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.shell { display: flex; min-height: 100vh; min-width: 0; }
.sidebar {
  width: var(--sidebar);
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--bg);
  border-right: 1px solid rgba(61, 72, 80, 0.4);
  padding: 2rem 0 1.2rem;
  display: flex;
  flex-direction: column;
  z-index: 40;
}
.brand {
  padding: 0 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--cyan);
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.brand small { display: block; font-size: 0.7rem; letter-spacing: 0.16em; opacity: 0.6; margin-top: 0.35rem; font-weight: 600; }
.sidebar nav { display: flex; flex-direction: column; flex: 1; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1.5rem;
  color: var(--mute);
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.sidebar nav a.on { color: var(--cyan); background: #1a1a1a; border-right: 2px solid var(--cyan); }
.sidebar nav a:hover { color: #fff; background: #131313; }
.ico { font-family: "Material Symbols Outlined"; font-size: 1.2rem; font-weight: 400; }
.sys {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(61,72,80,.4);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.dot { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--cyan); }

.content { margin-left: var(--sidebar); padding: 2.2rem 2rem 4rem; min-height: 100vh; width: calc(100% - var(--sidebar)); min-width: 0; }
.content.is-loading { opacity: 0.55; pointer-events: none; }
.hero { position: relative; padding: 2.2rem 0 1.8rem; border-bottom: 1px solid rgba(61,72,80,.25); margin-bottom: 1.2rem; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(0,191,255,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,191,255,.05) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: .35;
  pointer-events: none;
}
.hero h1 {
  position: relative;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  line-height: 0.92;
  margin: 0;
  text-shadow: 0 0 20px rgba(0,191,255,.35);
}
.hero h1 span { color: var(--cyan); }
.hero p { position: relative; max-width: 38rem; color: var(--mute); font-weight: 300; }

.section-head { display: flex; justify-content: space-between; align-items: end; margin: 1.4rem 0 0.8rem; }
.section-head h3 { margin: 0; font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; }
.section-head span { font-family: "Space Grotesk", sans-serif; font-size: 0.65rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; margin-bottom: 2rem; }
.card {
  background: var(--surface-high);
  min-height: 8.5rem;
  padding: 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 2px solid var(--cyan);
}
.card.alt { background: #1b1b1b; }
.card label {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 0.4rem;
}
.card .val { font-family: "Space Grotesk", sans-serif; font-size: 1.85rem; font-weight: 800; letter-spacing: -0.04em; margin: 0; }
.card .val.glow { color: var(--cyan-soft); text-shadow: 0 0 20px rgba(143,214,255,.4); }
.card .hint { font-family: "Space Grotesk", sans-serif; font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cyan); margin-top: 0.45rem; }
.card .hint.mute { color: var(--mute); }
.pair { display: flex; gap: 1rem; align-items: baseline; }
.pair .up { color: var(--up); }
.pair .down { color: var(--down); }

.chart-panel { background: var(--surface-high); border-top: 2px solid var(--cyan); padding: 1.8rem 1.6rem 1.4rem; margin-bottom: 2rem; }
.chart-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.chart-head h2 { margin: 0; font-size: 1.1rem; font-weight: 800; letter-spacing: -0.02em; text-transform: uppercase; }
.chart-head p { margin: 0.3rem 0 0; font-family: "Space Grotesk", sans-serif; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.legend { display: flex; gap: 1rem; font-family: "Space Grotesk", sans-serif; font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); }
.swatch { width: 0.7rem; height: 0.7rem; display: inline-block; margin-right: 0.35rem; vertical-align: middle; }
.swatch.solid { background: var(--cyan); }
.swatch.hollow { background: rgba(0,191,255,.2); border: 1px solid var(--cyan); }

.bars { display: flex; align-items: end; justify-content: space-around; height: 16rem; border-bottom: 1px solid rgba(61,72,80,.35); position: relative; padding: 0 0.4rem 0.4rem; }
.bars::before, .bars::after {
  content: "";
  position: absolute; left: 0; right: 0;
  border-top: 1px dashed rgba(61,72,80,.25);
}
.bars::before { top: 0; }
.bars::after { top: 50%; }
.col { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: end; }
.pair-bars { display: flex; align-items: end; gap: 0.35rem; height: 100%; width: 70%; justify-content: center; }
.bar { width: 42%; max-width: 2.4rem; min-height: 4px; }
.bar.vol { background: var(--cyan); }
.bar.cap { background: rgba(0,191,255,.2); border: 1px solid var(--cyan); border-bottom: 0; }
.col span { margin-top: 0.7rem; font-family: "Space Grotesk", sans-serif; font-size: 0.72rem; font-weight: 700; color: var(--mute); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { font-family: "Space Grotesk", sans-serif; font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); text-align: left; padding: 0.45rem 0.3rem; border-bottom: 1px solid var(--line); }
td { padding: 0.5rem 0.3rem; border-bottom: 1px solid rgba(61,72,80,.35); }
.up { color: var(--up); }
.down { color: var(--down); }
.banner { border: 1px dashed var(--line); padding: 0.7rem 0.9rem; font-family: "Space Grotesk", sans-serif; font-size: 0.75rem; }
.banner.warn { border-color: #ffc184; color: #ffc184; }
.lede { color: var(--mute); max-width: 40rem; }
.inline, .stack { display: flex; gap: 0.5rem; align-items: end; margin: 1rem 0; }
.stack { flex-direction: column; align-items: stretch; max-width: 40rem; }
input, textarea, button {
  font-family: "Space Grotesk", sans-serif;
  background: #1b1b1b;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 0.65rem 0.75rem;
}
button { background: var(--cyan); color: #001e2c; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; cursor: pointer; }
.answer { border-left: 3px solid var(--cyan); padding-left: 0.9rem; white-space: pre-wrap; }
.note { font-size: 0.8rem; color: var(--mute); max-width: 44rem; }
.insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.8rem; margin: 1.2rem 0 1.8rem; }
.insight { background: #1b1b1b; padding: 1rem 1.1rem; border-left: 2px solid var(--cyan); }
.insight.warn { border-color: #ffc184; }
.insight.ok { border-color: var(--up); }
.insight.mute { border-color: var(--line); }
.insight label { display: block; font-family: "Space Grotesk", sans-serif; font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); margin-bottom: 0.35rem; }
.insight p { margin: 0; font-size: 0.92rem; }
.horizons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; margin: 1rem 0; }
.horizons article { background: #1b1b1b; padding: 0.8rem; }
.tag { display: inline-block; font-family: "Space Grotesk", sans-serif; font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid #ffc184; color: #ffc184; padding: 0.1rem 0.35rem; margin-left: 0.35rem; }
.gates { list-style: none; padding: 0; }
.gates li { padding: 0.35rem 0; border-bottom: 1px solid rgba(61,72,80,.3); font-size: 0.88rem; }
h2.page { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); }
footer.slim { margin-top: 3rem; color: var(--mute); font-size: 0.75rem; }

.dial { margin-top: 0.85rem; }
.dial-track {
  position: relative;
  height: 0.45rem;
  background: linear-gradient(90deg, var(--cyan) 0%, #3d4850 50%, #ffc184 100%);
  border-radius: 99px;
}
.dial-needle {
  position: absolute;
  top: -0.28rem;
  width: 0.18rem;
  height: 1rem;
  background: #fff;
  transform: translateX(-50%);
  box-shadow: 0 0 8px rgba(0,191,255,.6);
}
.dial-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}
.gap-banner {
  border-left: 3px solid var(--cyan);
  background: #161616;
  padding: 0.9rem 1.1rem;
  margin: 0.4rem 0 1.6rem;
  font-size: 1.02rem;
}
.surface-card {
  background: #1b1b1b;
  padding: 1.1rem 1.2rem;
}
.surface-card strong { color: var(--cyan-soft); font-weight: 700; }

.heat { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.8rem; }
.heat-cell {
  flex: 1 1 6.5rem;
  min-width: 6.2rem;
  min-height: 5.2rem;
  padding: 0.75rem 0.8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--text);
  gap: 0.15rem;
}
.heat-cell strong { font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase; }
.heat-cell .hint { margin: 0; }
.heat-cell.up { background: rgba(0, 191, 255, 0.28); }
.heat-cell.up-hard { background: rgba(0, 191, 255, 0.5); }
.heat-cell.down { background: rgba(255, 180, 171, 0.22); }
.heat-cell.down-hard { background: rgba(255, 180, 171, 0.42); }
.heat-cell.flat { background: #1b1b1b; }
.heat-cell:hover { outline: 1px solid var(--cyan); }

@media (max-width: 960px) {
  .shell { flex-direction: column; }
  .sidebar {
    position: sticky;
    inset: auto;
    top: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    flex-direction: column;
    padding: max(0.7rem, env(safe-area-inset-top)) 0.85rem 0.35rem;
    border-right: 0;
    border-bottom: 1px solid rgba(61, 72, 80, 0.4);
  }
  .brand { padding: 0 0.2rem 0.55rem; letter-spacing: 0.1em; }
  .brand small { letter-spacing: 0.08em; }
  .brand .ico, .sidebar nav a .ico { display: none; }
  .sidebar nav {
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    min-width: 0;
    gap: 0.2rem;
  }
  .sidebar nav a {
    flex: 0 0 auto;
    padding: 0.55rem 0.5rem;
    min-height: 44px;
    border: 0;
    letter-spacing: 0.02em;
    font-size: 0.78rem;
    text-transform: none;
    white-space: nowrap;
  }
  .sidebar nav a.on { border-right: 0; border-bottom: 2px solid var(--cyan); }
  .sys { display: none; }
  .content { margin-left: 0; width: 100%; padding: 1rem 0.9rem 2.4rem; }
  .kpis, .split, .horizons { grid-template-columns: 1fr 1fr; }
  .card { min-height: 0; padding: 1rem 1rem; }
  .card .val { font-size: 1.4rem; }
  .hero { padding: 1.1rem 0 1rem; }
  .hero h1 { font-size: clamp(1.55rem, 8vw, 2.4rem); line-height: 1.05; }
  .bars { height: 11rem; }
  .insights { grid-template-columns: 1fr; }
  .inline { flex-wrap: wrap; align-items: stretch; }
  .inline input, .inline button { min-height: 44px; }
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 640px) {
  .kpis, .split, .horizons { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* RYO feed status: shown only when a feed failed on this request */
.feed-banner { margin: 0 0 1.2rem; font-size: 0.8rem; line-height: 1.5; }
.gates .mute { color: var(--mute); font-size: 0.85em; }
