:root {
  color-scheme: dark;
  --bg: #07111f; --panel: #0d1c2e; --raised: #12263d; --field: #091727;
  --ink: #e6f1ff; --muted: #9eb2cc; --line: #25415f;
  --accent: #79ceff; --accent-hover: #a4dfff; --button-ink: #061625;
  font: 16px/1.5 system-ui, -apple-system, sans-serif;
  color: var(--ink); background: var(--bg); accent-color: var(--accent);
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 15% 0, #123354 0, transparent 45%), var(--bg); min-height: 100vh; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
header, main, footer { max-width: 1260px; margin: auto; padding: 24px 28px; }
header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; border-bottom: 1px solid var(--line); gap: 18px; }
.brand { font-size: 27px; letter-spacing: -.8px; font-weight: 750; text-decoration: none; color: var(--ink); }
.brand span { display: block; letter-spacing: .12em; font-size: 10px; text-transform: uppercase; font-weight: 600; color: var(--accent); }
.right { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; margin-left: auto; font-size: 13px; }
.pill { font-size: 12px; border: 1px solid var(--line); border-radius: 30px; padding: 5px 12px; }
.intro { display: grid; grid-template-columns: 1.3fr 1fr; gap: 72px; align-items: start; padding: 64px 0; }
h1 { font-size: 44px; line-height: 1.12; letter-spacing: -1.3px; margin: 8px 0 22px; }
h2 { font-size: 21px; margin: 0 0 16px; line-height: 1.3; }
.eyebrow { font-size: 11px; letter-spacing: .12em; color: var(--accent); }
.lead { font-size: 19px; color: #bfd0e4; max-width: 560px; }
.note { border-left: 3px solid var(--accent); background: #102a43; padding: 15px 18px; margin: 24px 0; font-size: 14px; border-radius: 0 10px 10px 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; margin-bottom: 20px; min-width: 0; box-shadow: 0 16px 42px #02091340; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 12px; }
label { display: block; font-size: 13px; font-weight: 550; margin: 16px 0; }
input:not([type=checkbox]), select { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; border: 1px solid #355778; border-radius: 9px; font: inherit; color: var(--ink); background: var(--field); }
input::placeholder { color: #8ca2bd; }
input[type=checkbox] { accent-color: var(--accent); }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
input:-webkit-autofill { -webkit-text-fill-color: var(--ink); box-shadow: 0 0 0 1000px var(--field) inset; caret-color: var(--ink); }
button, .button { font: inherit; font-size: 14px; border: 1px solid #355778; border-radius: 9px; padding: 10px 15px; cursor: pointer; text-decoration: none; display: inline-block; background: var(--raised); color: var(--ink); transition: background .15s ease, border-color .15s ease; }
button:hover, .button:hover { background: #1a3856; border-color: var(--accent); color: var(--ink); }
button:disabled { opacity: .5; cursor: not-allowed; }
.primary { background: var(--accent); border-color: var(--accent); color: var(--button-ink); font-weight: 700; width: 100%; margin: 8px 0; }
.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--button-ink); }
.quiet { border: none; background: transparent; font-size: 13px; padding: 4px 8px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.error { color: #ffb1bb; font-size: 13px; }
.title-row { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-top: 28px; }
.title-row h1 { font-size: 35px; }
.balance { text-align: right; }
.balance strong { font-size: 29px; display: block; color: var(--accent); }
.balance span { font-size: 12px; color: var(--muted); }
.layout { display: grid; grid-template-columns: 345px 1fr; gap: 24px; align-items: start; }
.drop { border: 1px dashed #4f7ba5; border-radius: 10px; padding: 15px; background: #0a2035; }
.drop input { border: none; font-size: 12px; padding: 12px 0; background: transparent; }
.drop span { display: block; font-size: 11px; font-weight: 400; }
.consent { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; }
.history h2 { font-size: 18px; }
.job { display: block; text-align: left; width: 100%; border: none; border-radius: 8px; background: transparent; padding: 12px 10px; margin: 4px 0; overflow-wrap: anywhere; }
.job:hover, .job.active { background: #173552; }
.job strong { display: block; font-size: 13px; font-weight: 550; }
.job small { font-size: 11px; color: var(--muted); }
.detail { min-height: 530px; }
.empty { padding: 75px 10px; text-align: center; max-width: 440px; margin: auto; }
.empty-icon { font: 65px Georgia; color: #5a96c6; display: block; }
.result-head { display: flex; justify-content: space-between; align-items: start; gap: 15px; }
.result-head h2 { overflow-wrap: anywhere; }
.score { font-size: 48px; line-height: 1.25; font-weight: 700; letter-spacing: -2px; color: var(--accent); }
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 15px 0; margin: 20px 0; display: flex; gap: 30px; flex-wrap: wrap; }
.stats strong { display: block; }
.stats span { font-size: 12px; color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.paper { white-space: pre-wrap; font: 16px/1.9 Georgia, serif; overflow-wrap: anywhere; max-height: 510px; overflow: auto; border-top: 1px solid var(--line); padding-top: 18px; }
.hit { background: #614b1c; color: #ffeba9; }
#message { background: #17334d; color: #d5eaff; border: 1px solid #365d80; border-radius: 10px; padding: 12px 18px; margin: 16px 0; }
.source { border-top: 1px solid var(--line); padding: 13px 0; font-size: 13px; overflow-wrap: anywhere; }
.source a { color: var(--accent); }
.source p { margin: 5px 0; color: var(--muted); }
.status { padding: 55px 8px; text-align: center; }
.status .spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid #28425f; border-top-color: var(--accent); margin: 0 auto 20px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; margin-top: 35px; line-height: 2; }
[hidden] { display: none !important; }
.invoice { margin: 24px 0; padding: 20px; border: 1px solid #355778; border-radius: 12px; background: #10283f; }
.invoice h3 { margin: 0 0 12px; }
.invoice dl { margin: 0; }
.invoice dl div { display: flex; gap: 16px; padding: 6px 0; flex-wrap: wrap; }
.invoice dt { min-width: 65px; color: var(--muted); }
.invoice dd { margin: 0; overflow-wrap: anywhere; }
.payment-order { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; width: 100%; text-align: left; margin: 8px 0; }
.payment-order small { flex-basis: 100%; overflow-wrap: anywhere; }
.invoice .primary { color: var(--button-ink); }
#topup-presets { margin-bottom: 12px; }
@media (max-width: 850px) {
  header, main, footer { padding: 18px; }
  .intro { grid-template-columns: 1fr; gap: 24px; padding: 30px 0; }
  .intro h1 { font-size: 36px; }
  .layout { grid-template-columns: 1fr; }
  .right { gap: 10px; }
  .right a { font-size: 12px; }
  .pill { font-size: 10px; }
  .brand { font-size: 23px; }
  #identity { display: none; }
  .title-row h1 { font-size: 29px; }
  .card { padding: 20px; }
  .detail { min-height: 350px; }
  .empty { padding: 50px 0; }
  .score { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
