:root {
  color-scheme: light;
  font: 100%/1.5 "Inter Variable", "Noto Sans SC Variable", system-ui, sans-serif;
  --night: #091a22;
  --night-soft: #102a34;
  --ink: #142229;
  --muted: #68777d;
  --canvas: #eef2ef;
  --paper: #fbfcf9;
  --line: rgba(20, 34, 41, .11);
  --mint: #b9ffdc;
  --cyan: #75dbff;
  --acid: #d9ff70;
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 28%, rgba(117, 219, 255, .13), transparent 25rem),
    var(--canvas);
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
}
button, select, input { font: inherit; }

.app-shell { width: min(1240px, 100%); min-height: 100dvh; margin: 0 auto; padding: 16px; }
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 390px;
  padding: 30px 34px 38px;
  color: #f8fff9;
  border-radius: 32px;
  background:
    radial-gradient(circle at 82% 30%, rgba(117,219,255,.16), transparent 24%),
    radial-gradient(circle at 64% 110%, rgba(217,255,112,.14), transparent 34%),
    var(--night);
  box-shadow: 0 26px 70px rgba(9, 26, 34, .18);
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.11) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.11) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg, transparent 12%, #000 70%);
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 380px;
  height: 380px;
  right: -92px;
  top: -120px;
  border: 1px solid rgba(185,255,220,.2);
  border-radius: 50%;
  box-shadow: 0 0 0 58px rgba(117,219,255,.025), 0 0 0 116px rgba(217,255,112,.018);
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand { animation: rise-in .55s cubic-bezier(.22,1,.36,1) both; }
.brand p, .detail-head p { margin: 0 0 2px; color: rgba(248,255,249,.5); font-size: 10px; font-weight: 650; letter-spacing: .16em; }
.brand h1 { margin: 0; font-size: 18px; font-weight: 680; letter-spacing: .02em; }
.hero-content { display: flex; align-items: center; justify-content: space-between; gap: 30px; min-height: 265px; }
.eyebrow { margin-bottom: 12px; color: var(--mint); font-size: 13px; font-weight: 650; letter-spacing: .08em; }
.hero-copy { animation: rise-in .65s .08s cubic-bezier(.22,1,.36,1) both; }
.eyebrow { font-size: clamp(18px, 3vw, 27px); letter-spacing: .02em; }
.live-line { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.live-line > p { margin: 0; color: rgba(248,255,249,.55); font-size: 13px; font-variant-numeric: tabular-nums; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; color: var(--mint); font-size: 12px; font-weight: 650; }
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #70f5ad; box-shadow: 0 0 0 5px rgba(112,245,173,.12); }
.status-pill::before { animation: status-pulse 2.4s ease-out infinite; }
.status-pill.warn { color: #ffd27d; }
.status-pill.warn::before { background: #ffd27d; box-shadow: 0 0 0 5px rgba(255,210,125,.12); }
.total-orbit {
  position: relative;
  display: grid;
  align-content: center;
  width: 210px;
  aspect-ratio: 1;
  padding: 36px;
  flex: 0 0 auto;
  border: 1px solid rgba(185,255,220,.3);
  border-radius: 50%;
  background: rgba(255,255,255,.035);
  backdrop-filter: blur(12px);
  animation: orbit-arrive .7s .12s cubic-bezier(.22,1,.36,1) both;
}
.total-orbit::before { content: ""; position: absolute; inset: 13px; border: 1px dashed rgba(117,219,255,.17); border-radius: 50%; animation: orbit-spin 24s linear infinite; }
.orbit-dot { position: absolute; width: 9px; height: 9px; right: 27px; top: 34px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 18px var(--acid); animation: dot-glow 2.2s ease-in-out infinite; }
.total-orbit > span { color: rgba(248,255,249,.55); font-size: 12px; letter-spacing: .1em; }
.total-orbit strong { font-size: 50px; line-height: 1.1; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.total-orbit small { margin-left: 5px; color: var(--mint); font-size: 14px; }
.total-orbit p { margin: 3px 0 0; color: rgba(248,255,249,.36); font-size: 11px; }

.workspace { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.major-panel, .detail-card { border: 1px solid rgba(255,255,255,.75); border-radius: 28px; background: rgba(251,252,249,.82); box-shadow: 0 18px 50px rgba(30,47,51,.07); }
.major-panel { padding: 25px; align-self: start; }
.section-title > div, .ladder-head > div { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.section-title span, .ladder-head span { display: grid; place-items: center; width: 24px; height: 24px; color: var(--night); border-radius: 50%; background: var(--acid); font-size: 10px; font-weight: 800; }
.section-title p, .ladder-head p { margin: 0; font-size: 12px; letter-spacing: .08em; }
.section-title h2 { margin: 8px 0 20px; font-size: 25px; line-height: 1.15; letter-spacing: -.035em; }
.major-grid { display: grid; gap: 10px; }
.major-tile {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 11px;
  min-height: 74px;
  padding: 11px 13px;
  color: var(--ink);
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.55);
  cursor: pointer;
  transition: transform .12s ease-out, border-color .18s ease, background .18s ease, box-shadow .18s ease;
  -webkit-tap-highlight-color: transparent;
  animation: tile-in .45s calc(var(--i, 0) * 55ms) cubic-bezier(.22,1,.36,1) both;
}
.major-tile:hover { border-color: rgba(20,34,41,.23); transform: translateY(-1px); }
.major-tile:active { transform: scale(.975); }
.major-tile:focus-visible { outline: 3px solid rgba(117,219,255,.55); outline-offset: 2px; }
.major-tile.active { color: #f8fff9; border-color: var(--night); background: var(--night); box-shadow: 0 12px 28px rgba(9,26,34,.15); }
.tile-index { display: grid; place-items: center; width: 38px; height: 38px; color: var(--muted); border-radius: 12px; background: var(--canvas); font-size: 11px; font-weight: 750; }
.major-tile.active .tile-index { color: var(--night); background: var(--acid); }
.tile-copy { min-width: 0; }
.tile-copy strong { display: block; overflow: hidden; font-size: 15px; font-weight: 680; white-space: nowrap; text-overflow: ellipsis; }
.tile-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.major-tile.active .tile-copy span { color: rgba(248,255,249,.52); }
.tile-count { text-align: right; }
.tile-count strong { display: block; font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; }
.tile-count span { color: var(--muted); font-size: 10px; }
.major-tile.active .tile-count span { color: var(--mint); }
.snapshot-bar { display: grid; gap: 7px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.snapshot-bar[hidden] { display: none; }
.snapshot-bar label { color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .08em; }
.snapshot-bar select { width: 100%; padding: 10px 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 13px; }

.detail-card { overflow: hidden; }
.detail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; padding: 30px 32px 25px; color: #f8fff9; background: var(--night-soft); }
.detail-head p { color: rgba(248,255,249,.45); }
.detail-head h2 { margin: 8px 0 0; max-width: 480px; font-size: clamp(27px, 4vw, 40px); line-height: 1.08; letter-spacing: -.045em; }
.stat-pills { display: flex; gap: 8px; flex: 0 0 auto; }
.stat-pills > div { min-width: 108px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: rgba(255,255,255,.06); }
.stat-pills span { display: block; color: rgba(248,255,249,.5); font-size: 11px; }
.stat-pills strong { margin-right: 3px; font-size: 27px; font-variant-numeric: tabular-nums; }
.stat-pills small { color: var(--mint); }
.ladder-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 30px 14px; }
.ladder-head > p { color: var(--muted); font-size: 11px; }
.score-scale { display: grid; grid-template-columns: repeat(5,1fr); margin: 0 35px 0 132px; color: #9aa6aa; font-size: 10px; font-variant-numeric: tabular-nums; }
.score-scale span:not(:first-child) { text-align: right; }
.score-ladder { padding: 6px 30px 30px; }
.score-rung { display: grid; grid-template-columns: 88px 1fr 118px; align-items: center; gap: 14px; min-height: 54px; border-bottom: 1px solid var(--line); }
.score-rung:last-child { border-bottom: 0; }
.rank { color: var(--muted); font-size: 13px; font-weight: 620; font-variant-numeric: tabular-nums; }
.range-track { position: relative; height: 7px; border-radius: 99px; background: #e8ece8; }
.range-track::before { content: ""; position: absolute; inset: -5px 25% -5px auto; width: 1px; background: rgba(20,34,41,.05); }
.range-fill { position: absolute; top: 0; height: 100%; min-width: 7px; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--acid)); box-shadow: 0 3px 10px rgba(117,219,255,.25); }
.range-fill { transform-origin: left center; animation: range-grow .55s calc(var(--i, 0) * 35ms) cubic-bezier(.22,1,.36,1) both; }
.score-values { display: flex; justify-content: flex-end; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.score-values strong { font-size: 18px; }
.score-values i { width: 13px; height: 1px; background: #b3bdc0; }
.score-values span { color: var(--muted); font-size: 13px; }
footer { display: flex; justify-content: space-between; gap: 18px; padding: 23px 8px calc(14px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 11px; }
footer p { margin: 0; }
footer span { letter-spacing: .11em; }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes orbit-arrive {
  from { opacity: 0; transform: scale(.9); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes orbit-spin { to { transform: rotate(360deg); } }
@keyframes dot-glow {
  50% { opacity: .55; transform: scale(.72); box-shadow: 0 0 8px var(--acid); }
}
@keyframes status-pulse {
  70%, 100% { box-shadow: 0 0 0 9px rgba(112,245,173,0); }
}
@keyframes tile-in {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes range-grow {
  from { opacity: .25; transform: scaleX(0); }
  to { opacity: 1; transform: scaleX(1); }
}

@media (max-width: 800px) {
  .app-shell { padding: 10px; }
  .hero { min-height: auto; padding: 23px 21px 28px; border-radius: 25px; }
  .hero-content { align-items: center; margin-top: 44px; }
  .hero-content { min-height: 220px; margin-top: 0; }
  .total-orbit { width: 168px; padding: 28px; }
  .total-orbit strong { font-size: 42px; }
  .workspace { grid-template-columns: 1fr; }
  .major-panel, .detail-card { border-radius: 23px; }
  .major-grid { grid-template-columns: 1fr 1fr; }
  .major-tile { grid-template-columns: 35px 1fr; min-height: 82px; padding: 10px; }
  .tile-index { width: 32px; height: 32px; grid-row: 1 / 3; }
  .tile-count { grid-column: 2; display: flex; align-items: baseline; gap: 4px; text-align: left; }
  .tile-count strong { font-size: 16px; }
  .detail-head { align-items: flex-start; }
}

@media (max-width: 560px) {
  .brand p { font-size: 8px; }
  .brand h1 { font-size: 16px; }
  .hero-content { align-items: flex-end; gap: 8px; }
  .hero-content { min-height: 190px; }
  .live-line { display: grid; gap: 7px; margin-top: 20px; }
  .total-orbit { width: 126px; padding: 21px; }
  .total-orbit::before { inset: 8px; }
  .total-orbit strong { font-size: 34px; }
  .total-orbit p { display: none; }
  .major-panel { padding: 20px 15px; }
  .major-grid { gap: 8px; }
  .major-tile { grid-template-columns: 1fr; align-content: space-between; min-height: 112px; }
  .tile-index { display: none; }
  .tile-copy strong { white-space: normal; font-size: 14px; line-height: 1.25; }
  .tile-copy span { display: none; }
  .tile-count { grid-column: 1; }
  .detail-head { display: grid; padding: 24px 19px 20px; }
  .stat-pills { width: 100%; }
  .stat-pills > div { min-width: 0; flex: 1; }
  .ladder-head { align-items: flex-end; padding: 20px 17px 10px; }
  .ladder-head > p { max-width: 145px; text-align: right; }
  .score-scale { margin: 0 18px 0 77px; }
  .score-ladder { padding: 4px 17px 22px; }
  .score-rung { grid-template-columns: 52px 1fr; gap: 8px; min-height: 63px; }
  .score-values { grid-column: 2; grid-row: 2; justify-content: flex-start; margin-top: -18px; }
  .score-values strong { font-size: 14px; }
  footer { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .total-orbit { backdrop-filter: none; }
  .major-panel, .detail-card { background: var(--paper); }
}
@media (prefers-contrast: more) {
  .major-panel, .detail-card, .major-tile, .snapshot-bar select { border-color: #59666b; }
  .range-track { background: #cfd6d2; }
}
