/* CernBank: a quiet, precise banking surface. Ink navy, cool paper, one teal accent. */
:root {
  --ink: #0c1a2b; --ink-2: #1e2d40; --muted: #5b6878; --line: #d9dfe6; --line-2: #eef1f4;
  --paper: #f3f5f7; --card: #ffffff; --accent: #0f6f68; --accent-2: #0b5550; --accent-soft: #e3f1ef;
  --gold: #a7802c; --good: #1f7a4d; --good-soft: #e5f3eb; --warn: #9a5b00; --warn-soft: #fbf0dc;
  --bad: #b42318; --bad-soft: #fbe9e7;
  --radius: 10px; --shadow: 0 1px 2px rgba(12,26,43,.06), 0 8px 24px rgba(12,26,43,.06);
  --serif: 'IBM Plex Serif', Georgia, serif; --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.2; margin: 0; text-wrap: balance; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
.num, .money { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.eyebrow { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
button, .btn { font: 600 .92rem var(--sans); border-radius: 8px; border: 1px solid transparent; padding: .7rem 1.1rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; } .btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); } .btn-ghost:hover { border-color: var(--ink-2); }
.btn-danger { background: var(--card); color: var(--bad); border-color: #f0c4bf; } .btn-danger:hover { background: var(--bad-soft); }
.btn-link { background: none; border: 0; color: var(--accent); padding: .3rem; }
button:disabled { opacity: .55; cursor: not-allowed; }
:focus-visible { outline: 3px solid #7cc4bd; outline-offset: 2px; }
input, select, textarea { font: 1rem var(--sans); color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .7rem .8rem; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
label.field { display: grid; gap: .35rem; font-weight: 600; font-size: .88rem; }
label.field .hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.stack { display: grid; gap: 1rem; } .row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 600; padding: .2rem .55rem; border-radius: 999px; background: var(--line-2); color: var(--ink-2); }
.pill.good { background: var(--good-soft); color: var(--good); } .pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.bad { background: var(--bad-soft); color: var(--bad); }
.notice { border-radius: 8px; padding: .8rem 1rem; font-size: .9rem; border: 1px solid var(--line); background: #fff; }
.notice.good { background: var(--good-soft); border-color: #bfe0cd; } .notice.warn { background: var(--warn-soft); border-color: #efd6a8; } .notice.bad { background: var(--bad-soft); border-color: #f0c4bf; }
.mono-box { font: .85rem/1.5 var(--mono); background: var(--line-2); border-radius: 8px; padding: .7rem .8rem; word-break: break-all; }

/* ── landing ── */
.landing { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 1rem clamp(1rem, 4vw, 3rem); }
.brand { display: flex; align-items: center; gap: .6rem; font: 600 1.15rem var(--serif); color: var(--ink); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--ink); display: grid; place-items: center; }
.brand-mark svg { width: 18px; height: 18px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding: 2rem clamp(1rem, 4vw, 3rem) 4rem; max-width: 1180px; margin: 0 auto; width: 100%; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); line-height: 1.08; }
.hero .lede { font-size: 1.1rem; color: var(--ink-2); max-width: 36ch; margin-top: 1rem; }
.signin { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 2rem; box-shadow: var(--shadow); display: grid; gap: 1rem; }
.signin h2 { font-size: 1.4rem; }
.provider { width: 100%; justify-content: flex-start; padding: .85rem 1rem; background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 600; }
.provider:hover { border-color: var(--ink-2); } .provider svg { width: 20px; height: 20px; flex: none; }
.provider[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; max-width: 1180px; margin: 0 auto 3rem; padding: 0 clamp(1rem, 4vw, 3rem); width: 100%; }
.fact { border-top: 2px solid var(--ink); padding-top: .9rem; }
.fact h3 { margin-bottom: .35rem; }
.foot { padding: 1.5rem clamp(1rem, 4vw, 3rem); border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } .facts { grid-template-columns: 1fr; } }

/* ── app shell ── */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--ink); color: #dfe6ee; padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 0; height: 100vh; }
.side .brand { color: #fff; } .side .brand-mark { background: var(--accent); }
.nav { display: grid; gap: .2rem; }
.nav a { color: #c9d3de; text-decoration: none; padding: .6rem .75rem; border-radius: 8px; display: flex; gap: .7rem; align-items: center; font-weight: 500; }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav a:hover { background: var(--ink-2); color: #fff; }
.nav a[aria-current="page"] { background: #fff; color: var(--ink); } .nav a[aria-current="page"] svg { opacity: 1; }
.side-foot { margin-top: auto; font-size: .78rem; color: #93a1b1; }
.main { min-width: 0; }
.appbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem clamp(1rem, 3vw, 2rem); border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 5; }
.appbar .who { display: flex; align-items: center; gap: .6rem; font-size: .9rem; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; font-weight: 700; color: var(--accent); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.lockstate { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 600; }
.content { padding: clamp(1rem, 3vw, 2rem); max-width: 1100px; display: grid; gap: 1.5rem; }
.page-head { display: grid; gap: .3rem; }
.tabbar { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; } .side { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; background: var(--card); border-top: 1px solid var(--line); z-index: 10; padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: grid; justify-items: center; gap: .15rem; padding: .5rem 0; font-size: .7rem; color: var(--muted); text-decoration: none; }
  .tabbar a svg { width: 20px; height: 20px; } .tabbar a[aria-current="page"] { color: var(--accent); }
  .content { padding-bottom: 5.5rem; }
}

/* ── dashboard ── */
.balance { background: var(--ink); color: #fff; border-radius: 14px; padding: 1.5rem; display: grid; gap: 1rem; }
.balance .amount { font: 600 clamp(2rem, 5vw, 2.8rem) var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.balance .amount small { font-size: .45em; color: #9fb0c2; margin-left: .35rem; }
.balance .split { display: flex; gap: 2rem; flex-wrap: wrap; font-size: .88rem; color: #b8c4d1; }
.balance .split b { color: #fff; font-family: var(--mono); font-weight: 600; }
.balance .actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.balance .actions .btn-ghost { background: transparent; color: #fff; border-color: #3a4a5e; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 960px) { .grid-2 { grid-template-columns: 1fr; } }
.list { display: grid; }
.list-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .9rem; align-items: center; padding: .85rem 0; border-bottom: 1px solid var(--line-2); }
.list-item:last-child { border-bottom: 0; }
.icon-dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); color: var(--ink-2); }
.icon-dot.in { background: var(--good-soft); color: var(--good); } .icon-dot.out { background: var(--line-2); }
.icon-dot svg { width: 18px; height: 18px; }
.item-title { font-weight: 600; } .item-sub { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amt-in { color: var(--good); } .amt-out { color: var(--ink); }
.account-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; padding: .9rem 0; border-bottom: 1px solid var(--line-2); }
.account-row:last-child { border-bottom: 0; }
.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }

/* ── forms, steps, modal ── */
.steps { display: flex; gap: .5rem; flex-wrap: wrap; }
.step { font-size: .78rem; font-weight: 600; color: var(--muted); padding: .3rem .6rem; border-radius: 999px; background: var(--line-2); }
.step[aria-current="step"] { background: var(--ink); color: #fff; } .step.done { background: var(--good-soft); color: var(--good); }
.dropzone { border: 2px dashed var(--line); border-radius: 12px; padding: 1.75rem; text-align: center; background: #fff; cursor: pointer; }
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.choice button { flex-direction: column; align-items: flex-start; text-align: left; background: #fff; border: 1px solid var(--line); color: var(--ink); padding: 1.1rem; gap: .3rem; }
.choice button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.choice small { font-weight: 400; color: var(--muted); }
@media (max-width: 600px) { .choice { grid-template-columns: 1fr; } }
.review { display: grid; grid-template-columns: auto 1fr; gap: .55rem 1.25rem; }
.review dt { color: var(--muted); font-size: .88rem; } .review dd { margin: 0; text-align: right; font-weight: 600; word-break: break-all; }
.review .total { border-top: 1px solid var(--line); padding-top: .6rem; }
dialog { border: 0; border-radius: 14px; padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(12,26,43,.25); }
dialog::backdrop { background: rgba(12,26,43,.55); }
.modal { padding: 1.5rem; display: grid; gap: 1rem; }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.pinpad button { background: var(--line-2); color: var(--ink); font: 600 1.2rem var(--mono); padding: .9rem; }
.pin-dots { display: flex; gap: .5rem; justify-content: center; min-height: 18px; }
.pin-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); }
.qr { width: 200px; height: 200px; image-rendering: pixelated; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table th { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.table .r { text-align: right; }
.table-wrap { overflow-x: auto; }
.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: 8px; font-size: .9rem; z-index: 50; }
@media (max-width: 860px) { .toast { bottom: 5rem; } }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* ── printable statement ── */
.statement { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 2rem; }
.statement header { display: flex; justify-content: space-between; border-bottom: 2px solid var(--ink); padding-bottom: 1rem; margin-bottom: 1rem; }
@media print {
  body { background: #fff; } .side, .appbar, .tabbar, .no-print { display: none !important; }
  .shell { display: block; } .content { padding: 0; max-width: none; } .statement { border: 0; padding: 0; }
}
.btn svg, button svg { width: 18px; height: 18px; flex: none; }
.lockstate svg { width: 16px; height: 16px; vertical-align: -3px; }
.brand-logo { width: 32px; height: 32px; border-radius: 50%; flex: none; }

/* ═══ Acid theme: the DLT / xCoin brutalist look. Layout above is unchanged; this re-skins it. ═══ */
:root {
  --ink: #0a0a0a; --ink-2: #1c1c1c; --muted: #5e5e5e; --line: #0a0a0a; --line-2: #e4e4e4;
  --paper: #ffffff; --card: #ffffff; --accent: #c7ff2e; --accent-2: #b4ee12; --accent-ink: #101600; --accent-soft: #f2ffd0;
  --wash: #f7ffd9; --panel: #f6f6f3;
  --good: #1a6b2f; --good-soft: #e3f7c8; --warn: #7a4a00; --warn-soft: #fff1c9; --bad: #b3140c; --bad-soft: #ffe3df;
  --radius: 0; --shadow: 8px 8px 0 var(--accent);
  --mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  --serif: var(--mono); --sans: var(--mono);
}
body { background: var(--panel); font-size: 14px; }
a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
h1, h2, h3 { font-weight: 800; letter-spacing: -.04em; }
h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); text-transform: uppercase; }
h2 { font-size: 1.15rem; text-transform: uppercase; letter-spacing: -.02em; }
.eyebrow, label.field, .table th, .step, .pill { text-transform: uppercase; letter-spacing: .08em; }
label.field { font-size: .74rem; font-weight: 800; }
label.field .hint { text-transform: none; letter-spacing: 0; font-weight: 400; }

/* hard edges everywhere */
.card, .signin, .statement, .dropzone, .notice, .mono-box, input, select, textarea, button, .btn, dialog, .qr, .avatar, .pill, .step, .icon-dot, .toast, .pinpad button { border-radius: 0; }
.card { border: 2px solid var(--ink); box-shadow: none; }
.signin { border: 2px solid var(--ink); box-shadow: 12px 12px 0 var(--accent); }
input, select, textarea { border: 2px solid var(--ink); background: #fff; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 4px 4px 0 var(--accent); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--accent); }

/* buttons: lime block, black text, hard shadow on press */
button, .btn { font: 800 .8rem var(--mono); text-transform: uppercase; letter-spacing: .06em; border: 2px solid var(--ink); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); box-shadow: 4px 4px 0 var(--ink); transform: translate(-2px, -2px); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--wash); }
.btn-danger { background: #fff; color: var(--bad); border-color: var(--bad); }
.btn-link { border: 0; text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .btn-primary:hover { transform: none; } }

/* landing */
.landing { background: #fff; }
.topbar { border-bottom: 2px solid var(--ink); }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1; }
.hero h1::after { content: ""; display: block; width: 96px; height: 12px; background: var(--accent); margin-top: 1rem; border: 2px solid var(--ink); }
.provider { border: 2px solid var(--ink); text-transform: none; letter-spacing: 0; font-size: .92rem; }
.provider:hover { background: var(--wash); }
.fact { border-top: 4px solid var(--ink); }
.foot { border-top: 2px solid var(--ink); background: var(--ink); color: #cfcfcf; }
.foot a { color: var(--accent); }

/* app shell */
.side { background: var(--ink); border-right: 2px solid var(--ink); }
.side .brand { color: #fff; }
.nav a { color: #d9d9d9; border: 2px solid transparent; border-radius: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.nav a:hover { background: transparent; color: var(--accent); border-color: #333; }
.nav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.side-foot { color: #9a9a9a; }
.appbar { border-bottom: 2px solid var(--ink); background: #fff; }
.avatar { background: var(--accent); color: var(--accent-ink); border: 2px solid var(--ink); }
.tabbar { border-top: 2px solid var(--ink); }
.tabbar a[aria-current="page"] { color: var(--accent-ink); background: var(--accent); }

/* balance: black slab with lime shadow, like the DLT stat grid */
.balance { border-radius: 0; border: 2px solid var(--ink); box-shadow: 12px 12px 0 var(--accent); }
.balance .amount { color: var(--accent); }
.balance .amount small { color: #bdbdbd; }
.balance .actions .btn-ghost { background: transparent; color: #fff; border-color: #fff; }
.balance .actions .btn-ghost:hover { background: #fff; color: var(--ink); }

/* lists, pills, notices */
.list-item, .account-row { border-bottom: 1px solid var(--line-2); }
.icon-dot { border: 2px solid var(--ink); background: #fff; }
.icon-dot.in { background: var(--accent); color: var(--accent-ink); }
.pill { border: 1px solid var(--ink); background: #fff; font-size: .66rem; font-weight: 800; }
.pill.good { background: var(--accent); color: var(--accent-ink); border-color: var(--ink); }
.notice { border: 2px solid var(--ink); }
.notice.good { background: var(--wash); border-color: var(--ink); }
.step { border: 1px solid var(--ink); background: #fff; }
.step[aria-current="step"] { background: var(--ink); color: var(--accent); }
.step.done { background: var(--accent); color: var(--accent-ink); }
.choice button { border: 2px solid var(--ink); text-transform: none; letter-spacing: 0; }
.choice button[aria-pressed="true"] { background: var(--wash); box-shadow: 6px 6px 0 var(--accent); }
.dropzone { border: 2px dashed var(--ink); }
.dropzone.drag { background: var(--wash); }
.mono-box { background: var(--wash); border: 2px solid var(--ink); }
.table th { border-bottom: 2px solid var(--ink); }
dialog { border: 2px solid var(--ink); box-shadow: 12px 12px 0 var(--accent); }
dialog::backdrop { background: rgba(10,10,10,.6); }
.pinpad button { background: #fff; border: 2px solid var(--ink); }
.pinpad button:hover { background: var(--accent); }
.pin-dots i { border-radius: 0; background: var(--ink); }
.qr { border: 2px solid var(--ink); }
.toast { border: 2px solid var(--ink); background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.statement { border: 2px solid var(--ink); }
.statement header { border-bottom: 4px solid var(--ink); }
.brand-logo { border: 2px solid var(--ink); }
[hidden] { display: none !important; }
.mark { display: inline-block; line-height: 0; border: 2px solid var(--ink); background: #0b0f1a; flex: none; }
.mark svg { display: block; width: 100%; height: 100%; }
.mark { cursor: zoom-in; }
.mark:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.mark-zoom { position: fixed; z-index: 60; background: #0b0f1a; border: 2px solid var(--ink); box-shadow: 10px 10px 0 var(--accent); pointer-events: none; }
.mark-zoom svg { display: block; width: 100%; height: auto; }
.mark-zoom-seed { background: #fff; color: var(--ink); font: 600 .7rem/1.4 var(--mono); padding: .45rem .55rem; word-break: break-all; border-top: 2px solid var(--ink); }
