:root {
  font-family: Inter, system-ui, sans-serif;
  color: #11223c;
  background: #f2f5fa;
  --muted: #5d6e83;
  --line: #dce3ed;
  --blue: #245ee6;
  --navy: #0d1931;
  --green: #067a67;
  --red: #ad3249;
}
* { box-sizing: border-box; }
body { margin: 0; }
.shell { max-width: 480px; margin: auto; min-height: 100dvh; }
header { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px 10px; }
a { color: var(--blue); text-decoration: none; }
.brand { display: inline-flex; gap: 9px; align-items: center; color: inherit; font-size: 21px; letter-spacing: -.06em; }
.brand img { width: 32px; height: auto; }
.badge { background: #e5edfc; color: #174ab4; border-radius: 12px; padding: 8px 12px; font-size: 13px; font-weight: 650; }
main { padding: 4px 20px calc(92px + env(safe-area-inset-bottom)); }
h1 { margin: 12px 0 16px; font-size: 29px; letter-spacing: -.04em; }
h2 { font-size: 17px; margin: 0 0 4px; letter-spacing: -.02em; }
p { margin: 0; line-height: 1.5; }
small, .muted { color: var(--muted); font-size: 13px; }
.card { border: 1px solid var(--line); background: white; border-radius: 19px; padding: 20px; margin: 0 0 17px; }
.dark { background: var(--navy); color: #f5f8ff; border-color: var(--navy); padding: 21px 19px; }
.dark .muted, .dark strong, .dark .link { color: #c6d4e9; }
.dark .rule { border-color: #324059; }
.balance { display: block; font-size: clamp(30px, 9vw, 40px); font-weight: 570; letter-spacing: -.06em; margin: 4px 0 11px; }
.rule { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; }
.flex { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.leading { display: flex; gap: 12px; align-items: center; }
.tile { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: #eaf0ff; color: var(--blue); flex: none; }
.icon { width: 21px; height: 21px; vertical-align: middle; }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 10px; margin: 20px 0; }
.fields b, .metrics b { display: block; margin-top: 6px; }
.money-up { color: var(--green); }
.money-down { color: var(--red); }
.status { font-size: 13px; font-weight: 650; }
.status::before { content: '●'; margin-right: 6px; font-size: 10px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.button { display: block; width: 100%; min-height: 48px; padding: 12px; border: 1px solid var(--blue); border-radius: 13px; color: white; background: var(--blue); text-align: center; font-weight: 680; }
.button.secondary { background: white; color: inherit; border-color: #cad6e5; }
button:disabled { opacity: .55; cursor: default; }
.link { border: 0; background: transparent; padding: 4px 0; color: var(--blue); font-weight: 650; }
.subhead { margin: 23px 0 11px; }
.result { font-size: 28px; font-weight: 750; }
.center { text-align: center; padding: 26px 0 12px; }
.center .tile { margin: 0 auto 14px; width: 62px; height: 62px; background: #203554; color: #a1c3ff; border: 1px solid #779cda; }
.center h2 { font-size: 22px; }
.center p { margin-top: 9px; }
.metrics { display: grid; grid-template-columns: 1.2fr .8fr 1fr; gap: 11px; }
.metrics > div + div { border-left: 1px solid var(--line); padding-left: 11px; }
.metrics b { font-size: 19px; }
.list { padding: 0; overflow: hidden; }
.row { min-height: 68px; padding: 12px 15px; }
.row + .row { border-top: 1px solid var(--line); }
.row small { display: block; margin-top: 3px; }
.row strong { font-size: 14px; }
.right { text-align: right; }
.tabs { display: flex; gap: 8px; margin: 0 0 19px; }
.tabs button { border: 1px solid var(--line); border-radius: 11px; padding: 10px 14px; background: white; color: var(--muted); }
.tabs button[aria-pressed=true] { background: var(--blue); color: white; border-color: var(--blue); }
label { display: grid; gap: 6px; font-size: 14px; margin-bottom: 15px; font-weight: 650; }
input, select { min-width: 0; width: 100%; border: 1px solid #cad6e5; border-radius: 10px; padding: 10px; background: white; color: inherit; }
form .fields { margin: 0; }
.notice { margin: 10px 0 0; min-height: 1.5em; font-size: 13px; }
nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); display: grid; width: min(100%,480px); grid-template-columns: repeat(5,1fr); padding: 5px 5px calc(5px + env(safe-area-inset-bottom)); background: white; border-top: 1px solid var(--line); }
nav a { text-align: center; color: var(--muted); font-size: clamp(10px, 3.1vw, 12px); padding: 9px 2px; border-radius: 12px; white-space: nowrap; }
nav .icon { display: block; margin: 0 auto 4px; }
nav a[aria-current=page] { background: #eef3ff; color: var(--blue); font-weight: 700; }
:focus-visible { outline: 2px solid #336ee9; outline-offset: 3px; }
