:root {
  --bg: #0D1B2A;
  --panel: #13263A;
  --line: #1F3A55;
  --text: #E8EEF4;
  --muted: #9FB3C8;
  --teal: #14B8A6;
  --teal-dark: #0F8F82;
  --error: #F87171;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 24px; border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 20px; letter-spacing: 0.2px; }
.brand .dot { color: var(--teal); }
.brand .sub { font-weight: 400; color: var(--muted); font-size: 14px; margin-left: 8px; }
.who { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
main { max-width: 1040px; margin: 0 auto; padding: 32px 24px 48px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 32px; max-width: 480px; }
h1 { margin: 0 0 8px; font-size: 24px; }
button { font: inherit; cursor: pointer; border-radius: 8px; padding: 9px 18px; }
.primary { background: var(--teal); color: #04221F; border: 1px solid var(--teal); font-weight: 600; }
.primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.ghost:hover { border-color: var(--teal); }
button:focus-visible, input:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.range { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; margin-bottom: 8px; }
.range label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 13px; }
.range input {
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; font: inherit; color-scheme: dark;
}
.status { min-height: 1.5em; color: var(--muted); font-size: 14px; }
.status.error { color: var(--error); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 8px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--teal); border-radius: 10px; padding: 18px; }
.tile .label { color: var(--muted); font-size: 13px; }
.tile .value { font-size: 30px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.asat { color: var(--muted); font-size: 13px; margin-top: 20px; }
@media (max-width: 520px) {
  .bar { padding: 12px 16px; }
  main { padding: 24px 16px 40px; }
  .brand .sub { display: none; }
}

.tile .sub { color: var(--muted); font-size: 12px; margin-top: 4px; min-height: 1.2em; }
.tile .info { font-size: 12px; opacity: .7; cursor: help; }
.tile { cursor: help; }
.basis { color: var(--muted); font-size: 13px; margin-top: 14px; }
.how { margin-top: 18px; color: var(--muted); font-size: 13px; }
.how summary { cursor: pointer; color: var(--text, inherit); font-weight: 600; }
.how table { border-collapse: collapse; width: 100%; margin-top: 10px; }
.how th, .how td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.how th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.how td:first-child { white-space: nowrap; font-weight: 600; }
@media (max-width: 560px) { .how td:first-child { white-space: normal; } }
