:root {
  color-scheme: light; font: 16px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #171d38; --muted: #5d657c; --paper: #f5f6fb; --white: #fff; --line: #e3e7f1;
  --red: #b5123b; --red-dark: #8e102e; --navy: #191d3d; --blue: #17469c; --green: #116d54;
  --shadow: 0 9px 30px #25294e0d;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
h1, h2, h3, p, dl { margin: 0; }
h1 { font-size: clamp(1.65rem, 3vw, 2.5rem); line-height: 1.1; letter-spacing: -.04em; }
h2 { font-size: 1.22rem; line-height: 1.2; letter-spacing: -.025em; }
h3 { font-size: 1rem; line-height: 1.25; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid #325ed3; outline-offset: 3px; }
[hidden] { display: none !important; }
svg { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; }
.wrap, .section-stack { display: grid; gap: 18px; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.eyebrow { font-weight: 750; font-size: .75rem; letter-spacing: .11em; text-transform: uppercase; }
.skip { position: fixed; z-index: 5; left: 12px; top: -80px; color: var(--blue); background: white; padding: 12px; }
.skip:focus { top: 12px; }
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.rail { background: var(--navy); color: #fff; padding: 26px 16px 20px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 850; letter-spacing: -.035em; font-size: 1.35rem; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; background: #bd1544; color: #fff; border-radius: 12px; }
.brand-mark svg { width: 23px; height: 23px; }
.brand-sub { color: #c7cadc; font-size: .73rem; font-weight: 600; letter-spacing: 0; display: block; }
.rail .brand { padding-left: 8px; }
.rail nav { display: grid; gap: 4px; }
.rail .nav-item { justify-content: flex-start; text-align: left; }
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; min-height: 44px; border: 0; border-radius: 10px; color: inherit; background: transparent; font-weight: 650; }
.rail .nav-item { color: #d3d8eb; }
.rail .nav-item:hover, .rail .nav-item[aria-current] { background: #30385b; color: #fff; }
.rail .nav-item[aria-current] { box-shadow: inset 3px 0 #f25b76; }
.rail-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid #444969; color: #d3d8eb; }
.workspace { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 2; min-height: 68px; background: var(--white); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 10px clamp(16px, 3vw, 34px); gap: 12px; }
.topbar-title { font-size: .98rem; font-weight: 780; }
.topbar-actions, .action-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.topbar .brand { display: none; }
.status-pill, .tag { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 5px 11px; font-size: .75rem; font-weight: 760; background: #ebeffa; color: #2d4270; }
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-pill.live, .tag.committed { background: #e5f6ed; color: #086048; }
.tag.pending { background: #fff2d0; color: #775000; }
.tag.failed { background: #fce8ee; color: #8b1430; }
.icon-button { background: var(--white); color: var(--ink); min-width: 42px; min-height: 42px; border: 1px solid var(--line); border-radius: 10px; display: grid; place-items: center; }
.icon-button:hover, .btn.secondary:hover { background: #eef1f9; }
#main { max-width: 1260px; margin: 0 auto; padding: 23px clamp(16px, 3vw, 34px) 40px; min-height: 70vh; }
#main:focus { outline: none; }
.dock { display: none; }
.hero { overflow: hidden; background: linear-gradient(120deg, #202c57 0%, #25204a 52%, #8d153e 100%); color: #fff; border-radius: 21px; min-height: 228px; padding: clamp(21px, 4vw, 36px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, 31%); align-items: center; gap: 18px; position: relative; }
.hero p { max-width: 490px; color: #eff1ff; margin-top: 9px; }
.hero .eyebrow { color: #ffbacd; margin-bottom: 10px; }
.hero button { margin-top: 18px; }
.hero-art { color: #fff; border-radius: 50%; display: grid; place-items: center; width: min(164px, 100%); aspect-ratio: 1; margin: auto; background: #fff2; border: 1px solid #ffffff35; box-shadow: 0 0 0 14px #ffffff0b, 0 0 0 28px #ffffff09; }
.hero-art svg { width: 46%; height: 46%; }
.columns { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(245px, 1fr); gap: 18px; align-items: start; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.page-heading { display: grid; gap: 7px; }
.card { background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 16px; padding: 18px; min-width: 0; }
.card h2 + p, .card h3 + p, .card > p + p { margin-top: 6px; }
.launcher { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { text-align: left; display: flex; flex-direction: column; gap: 7px; color: var(--ink); background: white; min-height: 108px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; font-weight: 740; overflow-wrap: anywhere; }
.tile:hover, .list-button:hover { border-color: #9ba9cf; background: #fafbff; }
.tile .small { font-weight: 500; color: var(--muted); }
.glyph { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #e9effe; color: #224d9d; flex: 0 0 auto; }
.glyph.red { background: #fae8ef; color: #9c1640; }
.glyph.gold { background: #fff1d7; color: #855600; }
.glyph.violet { background: #efe8ff; color: #6437a6; }
.glyph.green { background: #e4f5ee; color: #0c704e; }
.glyph.cyan { background: #e0f4f8; color: #075c73; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 7px; padding: 9px 14px; min-height: 42px; border: 1px solid transparent; border-radius: 10px; font-weight: 760; text-decoration: none; color: white; background: var(--red); }
.btn:hover { background: var(--red-dark); }
.btn.secondary { color: var(--ink); background: white; border-color: #d9deec; }
.btn.light { background: white; color: var(--navy); }
.btn.link { background: transparent; color: var(--blue); padding-inline: 2px; }
.btn.full { width: 100%; }
.list { display: grid; gap: 8px; }
.list-button { width: 100%; display: flex; align-items: center; gap: 11px; padding: 11px; text-align: left; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.list-main { flex: 1; min-width: 0; overflow-wrap: anywhere; display: grid; gap: 2px; }
.list-main strong { display: block; }
.list-button > svg:last-child { color: var(--muted); width: 16px; }
.notice { background: #edf1fc; color: #294473; border: 1px solid #d9e2f7; padding: 10px 13px; border-radius: 10px; font-size: .89rem; }
.notice.error { background: #fff0f3; color: #872039; border-color: #f3c5d0; }
.wallet-hero { background: linear-gradient(114deg, #233760, #33244e 62%, #86163e); color: white; border-radius: 17px; padding: clamp(17px, 3vw, 25px); display: grid; gap: 7px; }
.wallet-hero .eyebrow { color: #ffd5df; }
.total { font-size: clamp(1.7rem, 5vw, 2.65rem); letter-spacing: -.045em; font-weight: 850; line-height: 1.08; overflow-wrap: anywhere; }
.wallet-hero .muted { color: #e3eaff; }
.bill-list { display: grid; gap: 9px; }
.bill { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.bill-title { display: flex; gap: 9px; min-width: 0; align-items: center; }
.bill-title > div { min-width: 0; overflow-wrap: anywhere; }
.bill-price { text-align: right; display: grid; justify-items: end; gap: 6px; }
.receipt-data { display: grid; gap: 7px; }
.receipt-data div { display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.receipt-data dt { color: var(--muted); }
.receipt-data dd { margin: 0; overflow-wrap: anywhere; font-weight: 730; }
.steps { padding-left: 21px; margin: 7px 0; }
.steps li + li { margin-top: 5px; }
.search { display: flex; align-items: center; gap: 8px; }
.search label { flex: 1; min-width: 0; }
.search input { margin: 0; }
.field { display: grid; gap: 5px; font-weight: 700; }
input, textarea, select { width: 100%; min-height: 42px; border: 1px solid #abb5cd; border-radius: 9px; padding: 8px 11px; color: var(--ink); background: white; }
textarea { resize: vertical; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs button { border: 1px solid #d9deec; background: white; color: var(--ink); border-radius: 99px; min-height: 36px; padding: 5px 12px; font-weight: 720; }
.tabs button[aria-pressed=true] { background: #26365d; border-color: #26365d; color: white; }
.chat-log { max-height: 45vh; min-height: 125px; overflow: auto; display: flex; flex-direction: column; gap: 9px; padding: 4px 3px 8px; }
.bubble { max-width: 86%; width: fit-content; padding: 9px 12px; border-radius: 12px 12px 12px 3px; background: #edf0fa; overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble.own { margin-left: auto; background: #fee9ef; border-radius: 12px 12px 3px 12px; }
.chat-compose { display: flex; align-items: center; gap: 7px; }
.chat-compose input { flex: 1; min-width: 0; }
.preview { max-width: 100%; background: var(--navy); border-radius: 10px; }
dialog { width: min(500px, calc(100vw - 24px)); max-height: min(85vh, 740px); overflow: auto; padding: 0; border: 1px solid var(--line); color: var(--ink); border-radius: 17px; box-shadow: 0 24px 100px #14183055; }
dialog::backdrop { background: #16213a85; }
#dialog-content { padding: 18px; display: grid; gap: 14px; }
#dialog-content header { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.toast { z-index: 4; position: fixed; right: 20px; bottom: 23px; padding: 9px 13px; border-radius: 9px; color: white; background: #222b4a; max-width: min(450px, calc(100% - 30px)); }
@media (max-width: 960px) {
  .shell { grid-template-columns: 184px minmax(0, 1fr); }
  .rail { padding-inline: 10px; }
  .columns { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 690px) {
  .shell { display: block; }
  .rail, .topbar-title { display: none; }
  .topbar { min-height: 58px; padding: 8px 13px; }
  .topbar .brand { display: flex; font-size: 1.04rem; }
  .topbar .brand-sub { display: none; }
  .topbar .brand-mark { width: 33px; height: 33px; border-radius: 9px; }
  .topbar .icon-button { min-height: 36px; min-width: 36px; }
  .topbar-actions { gap: 5px; }
  #main { padding: 15px 13px calc(83px + env(safe-area-inset-bottom)); }
  .dock { position: fixed; z-index: 2; inset: auto 0 0; color: #3d4563; background: white; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 3px 3px max(4px, env(safe-area-inset-bottom)); }
  .dock .nav-item { flex-direction: column; justify-content: center; gap: 3px; padding: 4px 1px; font-size: .68rem; min-height: 49px; }
  .dock .nav-item[aria-current] { color: var(--red-dark); background: #fdf0f4; }
  .hero { grid-template-columns: minmax(0, 1fr) 64px; min-height: 178px; padding: 18px 14px; gap: 6px; }
  .hero-art { box-shadow: 0 0 0 8px #ffffff0a; }
  .hero p { font-size: .87rem; }
  .hero .eyebrow { font-size: .65rem; }
  .card { padding: 13px; }
  .tile { min-height: 89px; padding: 8px; gap: 5px; font-size: .83rem; }
  .tile .small { display: none; }
  .glyph { width: 33px; height: 33px; border-radius: 9px; }
  .toast { bottom: 68px; right: 12px; }
  .bill { gap: 6px; padding: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }