html, body { overflow-x: clip; }
/* Portal, hub and bank pages. Tokens come from demo.css (light + dark). */
:root { --hub: #0b1f4d; --hub-2: #12306f; --gov: #7a1f1f; --bank: #0c266f; }

/* ---------- government portal ---------- */
.gov-top { background: var(--gov); color: #fff; }
.gov-in { max-width: 980px; margin: 0 auto; padding: 16px; display: flex; align-items: center; gap: 12px; }
.gov-in b { font-size: 18px; }
.gov-flag { width: 30px; height: 20px; border-radius: 3px; background: linear-gradient(90deg, #fff 0 30%, #e8b4b4 30% 70%, #fff 70%); }
.gov-fic { margin-left: auto; font-size: 12px; opacity: .75; }
.gov-main { max-width: 640px; margin: 0 auto; padding: 48px 16px 80px; }
.gov-main h1 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -.02em; }
.lead { color: var(--muted); font-size: 17px; margin: 0 0 22px; }
.svc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.svc label { cursor: pointer; }
.svc input { position: absolute; opacity: 0; pointer-events: none; }
.svc span { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px; transition: all .15s; }
.svc input:checked + span { background: var(--text); color: var(--bg); border-color: var(--text); }
.svc input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
.gov-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; border-radius: 16px; background: var(--gov); color: #fff; text-decoration: none; box-shadow: 0 10px 30px rgba(122, 31, 31, .25); transition: transform .15s, box-shadow .15s; }
.gov-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(122, 31, 31, .32); }
.gov-cta b { display: block; font-size: 20px; }
.gov-cta small { color: rgba(255, 255, 255, .85); }
.gov-cta .arrow { font-size: 28px; }
.gov-alt { display: block; margin-top: 14px; color: var(--muted); font-size: 14px; }
.welcome { display: flex; gap: 16px; align-items: center; margin-bottom: 24px; }
.ok-ring { width: 56px; height: 56px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; font-size: 28px; font-weight: 800; flex: none; animation: pop .4s ease-out; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.welcome h1 { margin: 0; }
.welcome .lead { margin: 2px 0 0; }
.dash { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dash-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.dash-card small { color: var(--muted); }
.dash-card b { font-size: 18px; }
.dash-card span { font-size: 13px; color: var(--muted); }
@media (max-width: 640px) { .dash { grid-template-columns: 1fr; } }
.again { display: flex; gap: 10px; margin-top: 22px; }

/* ---------- sign-in hub ---------- */
.hub-body { background: var(--bg); }
.hub-top { background: var(--hub); color: #fff; }
.hub-top-in { max-width: 1080px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 14px; }
.hub-top .hub-top-in { height: 76px; }
.hub-brand { display: flex; align-items: center; gap: 10px; font-size: 22px; letter-spacing: -.01em; }
.hub-brand b { color: #7dd3fc; }
.hub-logo { width: 42px; height: 42px; border-radius: 11px; background: linear-gradient(135deg, #38bdf8, #6366f1); display: grid; place-items: center; font-size: 22px; font-weight: 800; }
.hub-tag { margin-left: auto; font-size: 12px; opacity: .7; }
.hub-nav { background: var(--hub-2); }
.hub-nav .hub-top-in { height: 48px; gap: 26px; }
.hub-nav a { color: #e2e8f0; text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; }
.hub-nav a:hover { color: #fff; }
.hub-nav .sp { flex: 1; }
.hub-nav .exit { background: #fff; color: var(--hub); padding: 5px 14px; border-radius: 7px; }
@media (max-width: 640px) { .hub-nav .hub-top-in { overflow-x: auto; gap: 18px; } }
.hub-main { max-width: 1080px; margin: 0 auto; padding: 32px 16px 120px; }
.hub-notice { display: flex; flex-direction: column; gap: 4px; padding: 20px 24px; border: 1px solid #7dd3fc; background: var(--surface); border-radius: 12px; }
.hub-notice b { font-size: 19px; }
.hub-notice span { color: var(--muted); }
.hub-h1 { text-align: center; font-size: clamp(26px, 3.4vw, 34px); margin: 34px 0 6px; letter-spacing: -.01em; }
.hub-sub { text-align: center; color: var(--muted); margin: 0 0 26px; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .tiles { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.tile { position: relative; height: 120px; display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; border: 1px solid #e2e8f0; border-radius: 6px; box-shadow: 0 1px 3px rgba(15, 23, 42, .08); cursor: pointer; font: inherit; color: var(--c); transition: transform .15s, box-shadow .15s, border-color .15s; overflow: hidden; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15, 23, 42, .12); border-color: var(--c); }
.tile:focus-visible { outline: 3px solid var(--c); outline-offset: 2px; }
.tile .wm { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.tile .wm b { font-size: 24px; letter-spacing: -.02em; font-weight: 800; }
.tile .wm small { color: inherit; font-size: 9.5px; letter-spacing: .3em; margin-top: 4px; font-weight: 700; opacity: .85; }
@media (max-width: 620px) { .tile { height: 96px; } .tile .wm b { font-size: 18px; } .tile svg { width: 26px; height: 26px; } }
.tile-check { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; gap: 10px; background: rgba(255, 255, 255, .94); color: #0f172a; font-weight: 700; font-size: 14px; }
.tile-check i { width: 18px; height: 18px; border: 3px solid #cbd5e1; border-top-color: var(--c); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tile.checking .tile-check { display: flex; }
.tiles.busy .tile:not(.checking) { opacity: .45; pointer-events: none; }
:root[data-theme="dark"] .tile { background: #f8fafc; }

.oneline { margin: 40px auto 0; max-width: 720px; display: grid; gap: 6px; justify-items: center; text-align: center; padding: 18px; border: 1px dashed var(--orange); border-radius: 14px; }
.oneline-k { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }
.oneline code { font-size: 13px; padding: 8px 12px; max-width: 100%; overflow-x: auto; white-space: nowrap; }
.oneline-n { font-size: 13px; color: var(--muted); }

dialog#stepup { border: 0; border-radius: 18px; padding: 28px; max-width: 420px; background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); text-align: center; }
dialog#stepup::backdrop { background: rgba(10, 16, 32, .6); backdrop-filter: blur(3px); }
.su-icon { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 50%; background: var(--warn-bg); color: var(--warn); display: grid; place-items: center; font-size: 26px; font-weight: 800; }
dialog#stepup ul { text-align: left; color: var(--muted); font-size: 14px; background: var(--surface-2); border-radius: 10px; padding: 12px 12px 12px 30px; }

/* ---------- bank ---------- */
.bank-body { background: var(--bg); }
.bank-top { background: var(--bank); color: #fff; }
.bank-top-in { max-width: 980px; margin: 0 auto; padding: 18px 16px; display: flex; align-items: center; gap: 12px; }
.bank-mark { display: grid; place-items: center; }
.bank-wm { display: flex; flex-direction: column; line-height: 1; }
.bank-wm b { font-size: 24px; letter-spacing: -.02em; }
.bank-wm small { color: inherit; font-size: 9.5px; letter-spacing: .3em; margin-top: 4px; opacity: .85; font-weight: 700; }
.bank-main { max-width: 440px; margin: 0 auto; padding: 48px 16px 80px; }
.bank-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 30px; box-shadow: var(--shadow); }
.bank-card h1 { font-size: 26px; margin: 0; }
.bank-card label { display: block; font-size: 13px; color: var(--muted); margin: 16px 0 6px; }
.bank-card input { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--text); font: inherit; }
.bank-btn { margin-top: 22px; width: 100%; padding: 14px; border: 0; border-radius: 12px; background: var(--bank); color: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; transition: filter .15s; }
.bank-btn:hover { filter: brightness(1.1); }
.bank-btn:disabled { opacity: .8; cursor: progress; }
.bank-steps { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; }
.bank-steps[hidden] { display: none; }
.bank-steps li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.bank-steps li::before { content: ''; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex: none; transition: all .2s; }
.bank-steps li.done { color: var(--text); }
.bank-steps li.done::before { background: var(--ok); border-color: var(--ok); box-shadow: inset 0 0 0 3px var(--surface); }
.bank-fine { text-align: center; color: var(--muted); font-size: 12px; margin-top: 16px; }

/* ---------- behind the scenes ---------- */
.bts-tab { position: fixed; right: 0; top: 50%; transform: translateY(-50%) rotate(180deg); writing-mode: vertical-rl; z-index: 70; background: #f15a0e; color: #fff; border: 0; border-radius: 0 12px 12px 0; padding: 18px 10px; font: inherit; font-weight: 700; font-size: 14px; letter-spacing: .02em; cursor: pointer; box-shadow: 0 6px 24px rgba(241, 90, 14, .4); display: flex; align-items: center; gap: 8px; }
.bts-tab.hide { display: none; }
.bts-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; opacity: .6; }
.bts-tab.new .bts-dot { opacity: 1; animation: blink 1s ease-in-out infinite; }
@keyframes blink { 50% { transform: scale(1.6); } }
.bts { position: fixed; top: 0; right: 0; bottom: 0; width: 400px; max-width: 100vw; z-index: 80; background: radial-gradient(120% 60% at 100% 0, #1b2a55 0, #0b1226 60%); color: #e7ecf6; display: none; flex-direction: column; }
.bts.open { display: flex; box-shadow: -20px 0 60px rgba(0, 0, 0, .35); animation: slidein .22s ease-out; }
@keyframes slidein { from { transform: translateX(100%); } }
.bts-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 18px 20px 14px; border-bottom: 1px solid #1f2a44; }
.bts-head div { display: flex; flex-direction: column; gap: 3px; }
.bts-head b { font-size: 19px; }
.bts-head small { color: #9aa8c3; font-size: 13px; }
.bts-logo { height: 15px; width: auto; align-self: flex-start; margin-bottom: 4px; }
.bts-x { background: none; border: 0; color: #9aa8c3; font-size: 28px; cursor: pointer; line-height: 1; }
.bts-body { padding: 18px 20px; overflow-y: auto; display: grid; gap: 14px; align-content: start; flex: 1; }
.bts-foot { padding: 14px 20px 20px; border-top: 1px solid #1f2a44; }
.bts-console { display: block; text-align: center; padding: 12px; border-radius: 12px; background: #f15a0e; color: #fff; text-decoration: none; font-weight: 700; }
.bts-wait { text-align: center; padding: 40px 10px; color: #9aa8c3; }
.bts-wait b { display: block; color: #e7ecf6; font-size: 17px; margin: 14px 0 6px; }
.bts-pulse { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: #f15a0e; animation: ping 1.4s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(241, 90, 14, .6); } 100% { box-shadow: 0 0 0 22px rgba(241, 90, 14, 0); } }
.bts-hero { border-radius: 16px; padding: 16px; background: #111a2e; border: 1px solid #26324d; }
.bts-hero-top { display: flex; align-items: center; gap: 12px; }
.bts-hero-top > div { flex: 1; }
.bts-hero small { display: block; font-size: 11px; color: #9aa8c3; text-transform: uppercase; letter-spacing: .1em; }
.bts-hero b { font-size: 22px; letter-spacing: -.01em; }
.bts-hero p { margin: 10px 0 0; color: #cbd5e1; font-size: 14px; }
.bts-badge { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 900; font-size: 20px; flex: none; }
.bts-hero.ok { border-color: #166534; } .bts-hero.ok .bts-badge { background: #14532d; color: #4ade80; } .bts-hero.ok b { color: #4ade80; }
.bts-hero.warn { border-color: #854d0e; } .bts-hero.warn .bts-badge { background: #422006; color: #fbbf24; } .bts-hero.warn b { color: #fbbf24; }
.bts-hero.bad { border-color: #991b1b; } .bts-hero.bad .bts-badge { background: #450a0a; color: #f87171; } .bts-hero.bad b { color: #f87171; }
.bts-hero.info { border-color: #1e40af; } .bts-hero.info .bts-badge { background: #172554; color: #8fb4ff; } .bts-hero.info b { color: #8fb4ff; }
.bts-gauge { width: 96px; flex: none; }
.bts-gauge path { fill: none; stroke-width: 10; stroke-linecap: round; }
.bts-gauge .g-bg { stroke: #1f2a44; }
.bts-gauge.ok .g-fg { stroke: #4ade80; } .bts-gauge.warn .g-fg { stroke: #fbbf24; } .bts-gauge.bad .g-fg { stroke: #f87171; } .bts-gauge.info .g-fg { stroke: #8fb4ff; }
.bts-gauge text { fill: #e7ecf6; font-size: 22px; font-weight: 800; }
.bts-gauge .g-l { font-size: 8px; fill: #9aa8c3; letter-spacing: .15em; font-weight: 700; }
.bts-compare { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 14px; background: #111a2e; border: 1px solid #26324d; }
.bts-compare small { display: block; font-size: 11px; color: #9aa8c3; text-transform: uppercase; letter-spacing: .08em; }
.bts-compare b { font-size: 15px; }
.bts-compare > div:last-child { text-align: right; }
.bts-compare .vs { font-size: 22px; font-weight: 800; color: #4ade80; }
.bts-compare.mismatch { border-color: #854d0e; }
.bts-compare.mismatch .vs { color: #fbbf24; }
.bts-signals { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bts-signals li { display: grid; grid-template-columns: 24px 110px 1fr; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: #0f1830; font-size: 14px; }
.bts-signals .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 900; }
.bts-signals .k { color: #9aa8c3; }
.bts-signals li.ok .ic { background: #14532d; color: #4ade80; }
.bts-signals li.warn .ic { background: #422006; color: #fbbf24; }
.bts-signals li.bad .ic { background: #450a0a; color: #f87171; }
.bts-signals li.info .ic { background: #172554; color: #8fb4ff; }
.animate .bts-signals li { animation: tick .35s ease-out both; animation-delay: calc(var(--i) * 120ms + 150ms); }
.animate .bts-hero { animation: tick .35s ease-out both; }
@keyframes tick { from { opacity: 0; transform: translateX(14px); } }
.bts-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.bts-meta span { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: #17223a; color: #cbd5e1; }
.bts-policy { margin: 0; font-size: 13px; color: #9aa8c3; }

/* scenario picker in the ribbon */
.ribbon .scenario { display: flex; align-items: center; gap: 6px; margin-left: 12px; font-size: 12px; }
.ribbon .scenario span { opacity: .75; }
.ribbon .scenario select { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12.5px; }
.ribbon .scenario option { color: #0f1b33; }
@media (max-width: 720px) { .ribbon .scenario span { display: none; } }
