/* Aster UI concepts. All three systems share accessible, responsive primitives.
   Themes affect presentation only; the studio contains no service integration. */
:root {
  color-scheme: dark;
  --bg: #101216;
  --panel: #191c21;
  --panel-alt: #20242c;
  --text: #e9edf4;
  --muted: #a2aaba;
  --accent: #d6e2f7;
  --on-accent: #162033;
  --line: #303641;
  --radius: 10px;
  --font-display: "Segoe UI", Arial, sans-serif;
  --font-body: "Segoe UI", Arial, sans-serif;
  --font-data: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --positive: #a1d4b8;
  --positive-bg: #22392e;
  --warning: #e9c990;
  --warning-bg: #3a3223;
  --shadow: 0 12px 28px #00000014;
}
body[data-theme="2"] {
  color-scheme: light;
  --bg: #f6f7f2;
  --panel: #ffffff;
  --panel-alt: #edf1e9;
  --text: #1d392d;
  --muted: #617166;
  --accent: #254e3a;
  --on-accent: #ffffff;
  --line: #d6ded4;
  --radius: 5px;
  --font-display: Georgia, "Times New Roman", serif;
  --positive: #28613c;
  --positive-bg: #e7f1e6;
  --warning: #815c19;
  --warning-bg: #f5edda;
  --shadow: 0 12px 28px #183b2b08;
}
body[data-theme="3"] {
  color-scheme: light;
  --bg: #eef3f9;
  --panel: #ffffff;
  --panel-alt: #f0f5fc;
  --text: #1e324e;
  --muted: #64758c;
  --accent: #244eaa;
  --on-accent: #ffffff;
  --line: #d5e0ef;
  --radius: 14px;
  --font-display: "Trebuchet MS", "Segoe UI", sans-serif;
  --positive: #226c59;
  --positive-bg: #e6f4ef;
  --warning: #89641b;
  --warning-bg: #fbf3df;
  --shadow: 0 10px 32px #254eaa08;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 140px; }
body { margin: 0; min-width: 280px; background: var(--bg); color: var(--text); font: 15px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
button, input, textarea, select { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; max-width: 100%; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.22; }
p { margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }
h1, h2 { font-family: var(--font-display); }
h2 { margin-bottom: 18px; font-size: 25px; font-weight: 600; letter-spacing: -.035em; }
h3 { margin-bottom: 10px; font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
small { font-size: 12px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--on-accent); }
.wrap { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
#content { min-height: calc(100dvh - 250px); padding-bottom: 64px; }
#content:focus { outline: none; }
.skip-link { position: fixed; top: 8px; left: 16px; z-index: 500; padding: 12px 20px; background: var(--accent); color: var(--on-accent); transform: translateY(-150%); border-radius: 6px; }
.skip-link:focus { transform: translateY(0); }
.muted, .subtle { color: var(--muted); }
.eyebrow { margin-bottom: 12px; font: 11px/1.5 var(--font-data); font-weight: 500; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); }
.stack { display: grid; gap: 18px; min-width: 0; }
.concept-bar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 52px; padding-inline: max(24px, calc((100vw - 1160px) / 2)); border-bottom: 1px solid var(--line); background: var(--panel-alt); }
.concept-note { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; letter-spacing: .02em; }
.concept-note strong { color: var(--text); font-weight: 600; }
.version-switch { display: flex; align-items: center; gap: 3px; flex: 0 0 auto; }
.version-switch button { min-width: 44px; height: 44px; padding: 0 12px; border: 0; border-radius: 5px; background: transparent; font-size: 12px; color: var(--muted); }
.version-switch button[aria-pressed="true"] { color: var(--on-accent); background: var(--accent); }
.version-switch button:hover:not([aria-pressed="true"]) { color: var(--text); background: var(--bg); }
.app-header { position: sticky; top: 52px; z-index: 50; display: flex; align-items: center; gap: 30px; width: 100%; min-height: 76px; padding: 12px max(24px, calc((100vw - 1160px) / 2)); border-bottom: 1px solid var(--line); background: var(--bg); }
.app-header.wrap { width: 100%; max-width: none; }
.brand, .drawer-brand { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font-size: 23px; font-weight: 650; letter-spacing: -.065em; }
.brand svg, .drawer-brand svg { width: 27px; height: 27px; flex: 0 0 27px; color: var(--accent); }
.desktop-nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.desktop-nav a { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; font-size: 13px; color: var(--muted); }
.desktop-nav a:hover, .desktop-nav a[aria-current="page"] { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions > a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; gap: 6px; font-size: 13px; }
.menu-toggle, .drawer-close, .modal-close { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; min-height: 44px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--text); }
.menu-toggle:hover, .drawer-close:hover, .modal-close:hover { background: var(--panel-alt); }
.menu-toggle svg, .drawer-close svg, .modal-close svg { width: 22px; height: 22px; }
.menu-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.6; }
.drawer-close, .modal-close { font-size: 28px; font-weight: 300; line-height: 1; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 11px 18px; border: 1px solid transparent; border-radius: calc(var(--radius) * .75); background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 600; line-height: 1.5; text-align: center; transition: background .15s ease, box-shadow .15s ease; }
.button:hover:not(:disabled) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.button.secondary, .button.ghost { border-color: var(--line); background: transparent; color: var(--text); }
.button.secondary:hover:not(:disabled), .button.ghost:hover:not(:disabled) { background: var(--panel-alt); box-shadow: none; }
.button.ghost { border-color: transparent; }
.button svg { width: 17px; height: 17px; }
.button.wide { width: 100%; }
.inline-actions, .action-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin: 44px 0 28px; }
.page-heading h1 { max-width: 850px; margin: 0 0 10px; font-size: clamp(30px, 4vw, 44px); font-weight: 600; letter-spacing: -.055em; }
.page-heading p { max-width: 650px; margin-bottom: 0; color: var(--muted); font-size: 14px; }
.page-heading .eyebrow { font-size: 11px; margin-bottom: 12px; }
.page-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 24px; }
.panel { min-width: 0; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.panel + .panel, .panel + .list, .list + .panel { margin-top: 20px; }
.page-grid > .panel + .panel, .stack > .panel + .panel, .stat-grid > .panel + .panel { margin-top: 0; }
.page-grid > .trade-card + .trade-card { margin-top: 0; }
.page-grid + .panel, .detail-grid + .page-grid { margin-top: 24px; }
.page-grid + .note, .form-grid + .note { margin-top: 24px; }
.panel-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.panel-heading h2, .panel-heading h3, .section-heading h2, .section-heading h3 { margin-bottom: 0; }
.panel-heading p { margin: 5px 0 0; font-size: 13px; color: var(--muted); }
.panel-title { margin-bottom: 20px; }
.panel-body { min-width: 0; }
.stat-grid, .summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.stat { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.stat p, .stat dt, .metric-label { margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.stat strong, .stat dd, .metric-value { display: block; margin: 0; font-size: clamp(25px, 3vw, 36px); font-weight: 500; line-height: 1.2; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat small { display: block; margin-top: 8px; color: var(--muted); }
.metric-value small { display: inline; font-size: 14px; letter-spacing: 0; color: var(--muted); }
.status { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; gap: 5px; width: fit-content; max-width: 100%; padding: 5px 9px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: var(--panel-alt); font-size: 11px; font-weight: 500; line-height: 1.45; }
.status.success, .status.active { color: var(--positive); background: var(--positive-bg); border-color: transparent; }
.status.pending { color: var(--warning); background: var(--warning-bg); border-color: transparent; }
.status.neutral { color: var(--muted); background: var(--panel-alt); }
.trade-card { position: relative; min-width: 0; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.trade-card + .trade-card { margin-top: 16px; }
.trade-card h2, .trade-card h3 { margin-bottom: 18px; }
.trade-card .panel-heading { align-items: flex-start; }
.trade-card .panel-heading h2, .trade-card .panel-heading h3 { margin-bottom: 0; }
.trade-info { display: grid; grid-template-columns: minmax(0, 1fr) 145px; align-items: center; gap: 24px; min-width: 0; }
.trade-info .definition-grid { grid-template-columns: minmax(0, 1fr); }
.trade-info .definition-grid > div { padding: 10px 0; border: 0; }
.trade-info dt, .trade-info .muted { font-size: 12px; }
.trade-info dd { margin: 6px 0 0; font-variant-numeric: tabular-nums; }
.trade-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.trade-info .trade-actions { flex-direction: column; align-items: stretch; margin-top: 0; }
.detail-grid, .definition-grid, .meta-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; }
.detail-grid > div, .definition-grid > div, .meta-list > div { min-width: 0; padding: 17px 0; border-bottom: 1px solid var(--line); }
.detail-grid dt, .definition-grid dt, .meta-list dt { margin-bottom: 7px; font-size: 12px; color: var(--muted); }
.detail-grid dd, .definition-grid dd, .meta-list dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.split-panel { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px; }
.split-panel > * { min-width: 0; }
.list { margin: 0; padding: 0; list-style: none; }
.list-row, .record-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 80px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child, .record-row:last-child { border-bottom: 0; }
a.list-row { border-radius: 4px; }
a.list-row:hover { background: var(--panel-alt); }
.list-row > div, .record-row > div { min-width: 0; }
.list-row strong, .record-row strong { display: block; font-size: 14px; font-weight: 600; }
.list-row p, .record-row p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.list-row small, .record-row small, .notice-date { display: block; color: var(--muted); font-size: 12px; }
.list-row > span:last-child, .record-row > span:last-child { flex-shrink: 0; }
.list-row svg { flex: 0 0 18px; width: 18px; height: 18px; }
.tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; width: fit-content; max-width: 100%; padding: 4px; margin: 0 0 24px; border: 1px solid var(--line); border-radius: calc(var(--radius) * .8); background: var(--panel); }
.tabs button, .tabs a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 13px; }
.tabs .active, .tabs [aria-selected="true"], .tabs [aria-pressed="true"] { background: var(--panel-alt); color: var(--text); }
.form-grid, .field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 9px; min-width: 0; margin-bottom: 20px; }
.form-grid .field, .field-grid .field { margin-bottom: 0; }
.field label, label.field, .field > span:first-child { font-size: 13px; font-weight: 500; }
input, select, textarea { width: 100%; max-width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid var(--line); border-radius: calc(var(--radius) * .7); background: var(--bg); color: var(--text); outline: none; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:read-only { color: var(--muted); }
input[type="radio"], input[type="checkbox"] { width: 18px; min-height: 18px; accent-color: var(--accent); }
textarea { min-height: 112px; resize: vertical; }
.field small { color: var(--muted); font-weight: 400; }
.form-grid + .inline-actions, .field-grid + .inline-actions { margin-top: 24px; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; background: var(--panel); text-align: left; }
.data-table th { padding: 14px 18px; background: var(--panel-alt); color: var(--muted); font-size: 11px; font-weight: 500; white-space: nowrap; }
.data-table td { padding: 18px; border-top: 1px solid var(--line); font-size: 13px; white-space: nowrap; }
.data-table td:first-child { white-space: normal; min-width: 140px; }
.data-table td strong { display: block; font-weight: 600; }
.data-table td small { display: block; margin-top: 4px; color: var(--muted); }
.data-table .status { white-space: nowrap; }
.allocation-bar { display: flex; width: 100%; height: 8px; overflow: hidden; border-radius: 4px; background: var(--line); margin: 22px 0 16px; }
.allocation-bar > * { min-width: 0; background: var(--accent); }
.allocation-bar > :nth-child(1) { width: 55.56%; }
.allocation-bar > :nth-child(2) { width: 35.56%; opacity: .6; }
.allocation-bar > :nth-child(3) { width: 8.89%; opacity: .25; }
.allocation-key { display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: 12px; color: var(--muted); }
.allocation-key span { display: inline-flex; align-items: center; gap: 8px; }
.allocation-key i { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.note { padding: 16px 18px; border: 1px solid var(--line); border-radius: calc(var(--radius) * .7); background: var(--panel-alt); font-size: 13px; color: var(--muted); }
.note strong { color: var(--text); }
.review-list { margin: 0; padding: 0; list-style: none; }
.review-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.review-list li:last-child { border: 0; }
.article-body { max-width: 740px; font-size: 15px; line-height: 1.85; color: var(--muted); }
.article-body h2 { margin: 30px 0 14px; font-size: 23px; color: var(--text); }
.article-body h3 { margin: 26px 0 10px; font-size: 17px; color: var(--text); }
.article-body ul, .article-body ol { padding-left: 22px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--text); font-weight: 600; }
.article-body .notice-date { margin-bottom: 25px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 250px; padding: 40px 24px; text-align: center; }
.empty-state h2, .empty-state h3, .empty-state p { max-width: 470px; margin: 0; }
.empty-state p { color: var(--muted); font-size: 14px; }
.empty-icon { display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid var(--line); border-radius: 50%; background: var(--panel-alt); font-size: 22px; color: var(--accent); }
.identity-steps, .stepper, .progress-steps { display: flex; gap: 12px; padding: 0; margin: 0 0 28px; list-style: none; }
.identity-steps > *, .stepper > *, .progress-steps > * { flex: 1; padding-top: 12px; border-top: 2px solid var(--line); font-size: 12px; color: var(--muted); }
.identity-steps .active, .identity-steps .complete, .stepper .active, .progress-steps .active { border-color: var(--accent); color: var(--text); }
.document-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 22px 0; }
.document-card { position: relative; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; min-width: 0; min-height: 220px; padding: 20px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--bg); text-align: center; }
.document-card h3 { margin-bottom: 0; font-size: 15px; }
.document-card p { margin: 0; color: var(--muted); font-size: 12px; }
.sample-document { position: relative; display: flex; align-items: stretch; flex-direction: column; justify-content: space-between; gap: 12px; width: 100%; max-width: 300px; min-height: 180px; padding: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-alt); text-align: left; }
.sample-document .eyebrow { font-size: 9px; margin-bottom: 0; }
.sample-document > .subtle { font-size: 10px; }
.document-watermark { position: absolute; inset: 0; display: grid; place-items: center; color: var(--accent); opacity: .1; font: 700 36px/1 var(--font-data); letter-spacing: .08em; transform: rotate(-20deg); pointer-events: none; }
.document-face { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; }
.document-avatar { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 56px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 20px; }
.document-lines { position: relative; flex: 1; min-width: 0; }
.document-lines strong { display: block; margin-bottom: 5px; font-size: 12px; }
.document-lines span { display: block; width: 100%; margin: 4px 0; color: var(--muted); font-size: 9px; }
.country-list { display: grid; gap: 6px; }
.country-option, .language-option { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 10px 12px; border: 1px solid var(--line); border-radius: calc(var(--radius) * .7); background: var(--panel); color: var(--text); text-align: left; font-size: 14px; }
.country-option:hover, .language-option:hover { background: var(--panel-alt); }
.country-option[aria-pressed="true"], .language-option[aria-checked="true"], .language-option.active { border-color: var(--accent); background: var(--panel-alt); }
.country-flag { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 24px; }
.country-flag svg { width: 32px; height: 22px; }
.language-option + .language-option { margin-top: 10px; }
.language-option > :last-child { margin-left: auto; }
.profile-summary { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.profile-summary h2, .profile-summary h3 { margin: 0 0 5px; }
.profile-summary p { color: var(--muted); font-size: 13px; }
.avatar { display: grid; place-items: center; flex: 0 0 56px; width: 56px; height: 56px; border: 1px solid var(--line); border-radius: 50%; background: var(--panel-alt); font: 500 19px var(--font-display); color: var(--accent); }
.security-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.timeline { list-style: none; padding: 0 0 0 20px; margin: 0; border-left: 1px solid var(--line); }
.timeline li { position: relative; padding: 0 0 28px 12px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 8px; width: 9px; height: 9px; border: 2px solid var(--panel); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--line); }
.timeline time { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.timeline h3 { margin-bottom: 6px; font-size: 16px; }
.timeline p { color: var(--muted); font-size: 13px; }
.chat-thread { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; min-height: 290px; padding: 8px 0 24px; }
.chat-bubble { max-width: 85%; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-alt); font-size: 14px; overflow-wrap: anywhere; }
.chat-bubble.own, .chat-bubble.sent { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-color: transparent; }
.chat-bubble.mine { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-color: transparent; }
.chat-bubble small { display: block; margin-top: 8px; opacity: .7; }
.chat-compose { display: flex; align-items: flex-end; gap: 10px; border-top: 1px solid var(--line); padding-top: 18px; }
.chat-compose input, .chat-compose textarea { flex: 1; min-width: 0; min-height: 46px; }
.chat-compose textarea { height: 46px; max-height: 150px; }
.app-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: min(1160px, calc(100% - 48px)); margin: 0 auto; padding: 24px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.app-footer nav { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 24px; }
.app-footer a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; }
.app-footer a:hover { color: var(--text); }
dialog { color: var(--text); font: inherit; }
dialog::backdrop { background: #060c1499; backdrop-filter: blur(3px); }
.drawer { position: fixed; inset: 0 0 0 auto; width: min(280px, 76vw); max-width: none; height: 100dvh; max-height: none; margin: 0 0 0 auto; padding: 0; border: 0; border-left: 1px solid var(--line); background: var(--bg); box-shadow: -20px 0 70px #0002; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 88px; padding: 16px; border-bottom: 1px solid var(--line); }
.drawer-brand { font-size: 23px; width: 92px; }
.drawer-close { border-color: transparent; }
.drawer-nav { display: grid; gap: 4px; padding: 12px; }
.drawer-nav a { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px; border-radius: calc(var(--radius) * .7); font-size: 14px; color: var(--muted); }
.drawer-nav a:hover, .drawer-nav a[aria-current="page"] { background: var(--panel-alt); color: var(--text); }
.drawer-nav a > svg { width: 18px; height: 18px; flex: 0 0 18px; margin: 0 8px; }
.drawer-nav .nav-icon { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 6px; }
.drawer-nav .nav-icon svg { width: 18px; height: 18px; }
.drawer-nav a > span:last-child { min-width: 0; }
.drawer-note { margin: 12px 20px 24px; color: var(--muted); font-size: 11px; }
.drawer-foot { margin: 12px 20px 24px; color: var(--muted); font-size: 11px; }
.drawer-nav .menu-icon { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 6px; }
.drawer-nav .menu-icon svg { width: 18px; height: 18px; }
.drawer-nav .menu-arrow { margin-left: auto; font-size: 20px; }
.drawer-nav a > span:nth-child(2) { flex: 1; min-width: 0; line-height: 1.3; }
.modal { width: min(460px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: max(12px, var(--radius)); background: var(--panel); box-shadow: 0 24px 90px #0005; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px 16px 24px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 21px; }
.modal-close { border: 0; }
.modal-body { padding: 24px; font-size: 14px; }
.modal-body > p { color: var(--muted); }
.modal-body .metric-value { margin-bottom: 18px; }
.modal-body .field:last-child { margin-bottom: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 0 24px 24px; }
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 300; width: max-content; max-width: calc(100% - 32px); padding: 13px 18px; border: 1px solid var(--line); border-radius: 9px; background: var(--text); color: var(--bg); box-shadow: 0 10px 30px #0002; transform: translateX(-50%); font-size: 13px; text-align: center; }
html.dialog-open { overflow: hidden; }
.country-options { display: grid; gap: 8px; }
.country-option > img { width: 30px; height: 22px; object-fit: cover; border: 1px solid var(--line); border-radius: 2px; }
.country-option > :last-child { margin-left: auto; }
.dialog-summary { display: grid; gap: 0; margin: 22px 0 0; padding: 0; border-top: 1px solid var(--line); }
.dialog-summary > div { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.dialog-summary dt { color: var(--muted); font-size: 12px; }
.dialog-summary dd { max-width: 65%; margin: 0; text-align: right; font-size: 13px; }
.confirmation-mark { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 0 22px; border: 1px solid var(--line); border-radius: 50%; color: var(--positive); background: var(--positive-bg); font-size: 24px; }
.prose { color: var(--muted); font-size: 14px; line-height: 1.7; }
.screen-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.screen-grid .screen-link { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 88px; margin: 0; padding: 20px; font-size: 14px; }
.screen-link:hover { background: var(--panel-alt); }
.screen-link > span:first-child { min-width: 0; }
.reading-width { max-width: 820px; width: 100%; }
.article-lead { color: var(--text); font: 24px/1.5 var(--font-display); letter-spacing: -.025em; }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--accent); font-size: 13px; font-weight: 500; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.row-end { display: inline-flex; align-items: center; gap: 14px; text-align: right; }
.row-arrow { font-size: 23px; line-height: 1; color: var(--muted); }
.record-symbol { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); }
.record-description { flex: 1; min-width: 0; }
.record-value { text-align: right; font-variant-numeric: tabular-nums; }
.record-value .status { margin-top: 6px; }
.stat .metric-label { display: block; }
.stat .subtle { display: block; margin-top: 6px; font-size: 11px; }
.stat-grid.panel { padding: 0; }
.stat-grid.panel > .stat { border: 0; border-right: 1px solid var(--line); border-radius: 0; background: transparent; }
.stat-grid.panel > .stat:last-child { border-right: 0; }
.account-hero { padding: 32px; }
.account-hero .display-value { font-size: clamp(40px, 6vw, 64px); margin-bottom: 28px; }
.account-hero .panel-heading { margin-bottom: 24px; }
.product-summary > .display-value { margin: 14px 0 24px; font-size: 42px; }
.bond-card > .metric-value { margin: 10px 0 16px; }
.bond-card > .button { margin-top: 24px; }
.profile-summary > div { min-width: 0; }
.profile-summary strong, .profile-summary small { display: block; }
.profile-summary small { color: var(--muted); }
.profile-summary > .status { margin-left: auto; }
.readonly-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 11px 13px; border: 1px solid var(--line); border-radius: calc(var(--radius) * .7); background: var(--bg); color: var(--muted); font-size: 14px; }
.identity-steps .is-active { border-color: var(--accent); color: var(--text); }
.identity-steps li span { margin-right: 5px; font-family: var(--font-data); }
.tabs a[aria-current="page"] { color: var(--text); background: var(--panel-alt); }
.tabs .count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; margin-left: 7px; border-radius: 4px; background: var(--bg); font-size: 10px; }
.chat-panel .profile-summary { margin-bottom: 0; }
.chat-date { align-self: center; margin: 0 0 8px; font-size: 11px; color: var(--muted); }
.chat-compose > .muted { margin-right: auto; font-size: 12px; }
.login-concept { display: flex; flex-direction: column; align-items: center; padding: 44px 32px; text-align: center; }
.login-concept > .avatar.large { width: 76px; height: 76px; flex-basis: 76px; margin-bottom: 24px; font-size: 28px; }
.login-concept > p { max-width: 400px; color: var(--muted); }
.login-concept .profile-summary { padding: 16px 20px; margin: 14px 0 24px; border: 1px solid var(--line); border-radius: var(--radius); text-align: left; }
.login-concept > .note { margin-top: 24px; }
.step-number { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-bottom: 24px; border: 1px solid var(--line); border-radius: 50%; font: 13px var(--font-data); color: var(--accent); }
details { border-bottom: 1px solid var(--line); }
details:last-child { border-bottom: 0; }
summary { display: list-item; min-height: 56px; padding: 16px 0; cursor: pointer; font-size: 14px; font-weight: 500; }
details > p { padding-bottom: 18px; font-size: 13px; color: var(--muted); }
/* Theme 1 is a dense product workspace: flatter surfaces and utility numerals. */
body[data-theme="1"] .stat strong, body[data-theme="1"] .metric-value { font-family: var(--font-data); font-size: clamp(25px, 3vw, 34px); letter-spacing: -.07em; }
body[data-theme="1"] .page-heading { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
body[data-theme="1"] .trade-card { border-left: 3px solid var(--line); }
body[data-theme="1"] .trade-card:hover { border-left-color: var(--accent); }
body[data-theme="1"] .panel { box-shadow: none; }
body[data-theme="1"] .data-table th { font-family: var(--font-data); letter-spacing: .02em; }
/* Theme 2 uses the cadence of a printed statement, with a quieter green accent. */
body[data-theme="2"] .brand, body[data-theme="2"] .drawer-brand { font-family: Georgia, serif; font-weight: 600; letter-spacing: -.06em; }
body[data-theme="2"] .page-heading { border-top: 3px solid var(--accent); padding-top: 26px; }
body[data-theme="2"] .page-heading h1 { font-size: clamp(34px, 4.4vw, 50px); font-weight: 400; letter-spacing: -.045em; }
body[data-theme="2"] .panel-heading h2, body[data-theme="2"] .trade-card h2 { font-weight: 400; font-size: 27px; }
body[data-theme="2"] .stat { border-width: 0 0 1px; border-radius: 0; background: transparent; padding: 12px 0 24px; }
body[data-theme="2"] .stat-grid { gap: 28px; }
body[data-theme="2"] .stat strong, body[data-theme="2"] .metric-value { font-family: Georgia, serif; letter-spacing: -.035em; }
body[data-theme="2"] .trade-card { padding-top: 30px; border-top: 3px solid var(--accent); }
body[data-theme="2"] .panel { box-shadow: none; }
body[data-theme="2"] .button { border-radius: 3px; }
body[data-theme="2"] .status { border-radius: 3px; }
body[data-theme="2"] .tabs { padding: 0; border-width: 0 0 1px; border-radius: 0; background: transparent; gap: 16px; }
body[data-theme="2"] .tabs button, body[data-theme="2"] .tabs a { padding-inline: 3px; border-radius: 0; border-bottom: 2px solid transparent; }
body[data-theme="2"] .tabs .active, body[data-theme="2"] .tabs [aria-selected="true"], body[data-theme="2"] .tabs [aria-pressed="true"] { border-bottom-color: var(--accent); background: transparent; }
body[data-theme="2"] .tabs a[aria-current="page"] { border-bottom-color: var(--accent); background: transparent; }
body[data-theme="2"] .account-hero { border-top: 3px solid var(--accent); background: var(--accent); color: var(--on-accent); }
body[data-theme="2"] .account-hero .metric-label { color: #d2dfd3; }
body[data-theme="2"] .account-hero .status { background: #ffffff13; border-color: #ffffff38; color: #e4ebe3; }
body[data-theme="2"] .account-hero .button { background: #f2f5e9; color: #254e3a; }
body[data-theme="2"] .account-hero .button.secondary { background: transparent; color: #ffffff; border-color: #ffffff54; }
/* Theme 3 is an airy instrument panel with broad rows and blue emphasis. */
body[data-theme="3"] .app-header { background: var(--panel); }
body[data-theme="3"] .page-heading h1 { font-weight: 600; letter-spacing: -.04em; }
body[data-theme="3"] .stat { border-top: 3px solid var(--accent); }
body[data-theme="3"] .panel-heading { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
body[data-theme="3"] .trade-card { padding: 28px; box-shadow: var(--shadow); }
body[data-theme="3"] .button { border-radius: 8px; }
body[data-theme="3"] .list-row { min-height: 88px; }
@media (min-width: 1000px) {
  .page-grid.wide-first { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .bond-grid, .guide-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body[data-theme="2"] .page-grid { gap: 32px; }
}
@media (max-width: 760px) {
  .desktop-nav { display: none; }
  .header-actions { margin-left: auto; }
  .page-grid, .split-panel { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  #content > .detail-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .screen-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel { padding: 22px; }
  .app-header { gap: 16px; min-height: 68px; }
  .page-heading { margin-top: 30px; }
  .page-heading h1 { font-size: 34px; }
  .stat-grid { gap: 10px; }
  .stat { padding: 16px; }
  .stat strong { font-size: 26px; }
  body[data-theme="2"] .stat-grid { gap: 16px; }
  .app-footer { align-items: flex-start; }
  .app-footer nav { gap: 8px 16px; }
}
@media (max-width: 540px) {
  .wrap, .app-footer { width: calc(100% - 32px); }
  #content { padding-bottom: 40px; }
  .concept-bar { padding-inline: 16px; gap: 6px; }
  .concept-note { gap: 6px; font-size: 10px; line-height: 1.3; }
  .concept-note span { max-width: 110px; }
  .version-switch button { padding-inline: 8px; }
  .version-switch button span { display: none; }
  .app-header { padding: 10px 16px; }
  .brand { font-size: 22px; }
  .header-actions > .button { display: none; }
  .header-actions .header-account { display: none; }
  .page-heading { align-items: flex-start; gap: 16px; margin: 28px 0 22px; }
  .page-heading h1 { font-size: 30px; margin-bottom: 8px; }
  .page-heading p { font-size: 13px; line-height: 1.65; }
  .page-heading > .inline-actions { width: 100%; }
  .panel { padding: 20px 18px; }
  .panel-heading, .section-heading { gap: 12px; margin-bottom: 20px; }
  .panel-heading h2, h2 { font-size: 23px; }
  .stat-grid, .summary-grid { grid-template-columns: minmax(0, 1fr); gap: 0; margin: 18px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
  .stat { padding: 18px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
  .stat:last-child { border-bottom: 0; }
  .stat strong, .metric-value { font-size: 30px; }
  .stat p, .stat dt, .metric-label { margin-bottom: 6px; }
  .trade-card, body[data-theme="3"] .trade-card { padding: 20px 18px; }
  .trade-card h2, .trade-card h3 { font-size: 20px; }
  .trade-info { gap: 16px; }
  .trade-info { grid-template-columns: minmax(0, 1fr) 116px; }
  .trade-info .definition-grid { grid-template-columns: minmax(0, 1fr); }
  .trade-info .trade-actions { margin-top: 0; }
  .trade-info .trade-actions .button { padding-inline: 8px; font-size: 11px; }
  .trade-info dd { font-size: 14px; }
  .trade-actions { margin-top: 20px; gap: 8px; }
  .trade-actions .button { flex: 1; padding-inline: 10px; }
  .detail-grid, .definition-grid, .meta-list { gap: 0 16px; }
  .detail-grid dd, .definition-grid dd, .meta-list dd { font-size: 14px; }
  .detail-grid dt, .definition-grid dt, .meta-list dt { font-size: 11px; }
  .form-grid, .field-grid, .document-grid { grid-template-columns: minmax(0, 1fr); }
  .list-row, .record-row { gap: 12px; padding: 17px 0; }
  .list-row strong, .record-row strong { font-size: 13px; }
  .list-row p, .record-row p { font-size: 12px; }
  .list-row .status { font-size: 10px; padding: 4px 7px; }
  .record-row .record-symbol { display: none; }
  .record-row .record-value strong { font-size: 12px; }
  .record-row .record-description small { font-size: 10px; }
  .row-end { gap: 8px; }
  .row-end strong { font-size: 12px; }
  .screen-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .screen-grid .screen-link { min-height: 66px; padding: 16px 18px; }
  .tabs { width: 100%; }
  .tabs button, .tabs a { flex: 1; padding: 8px 10px; font-size: 12px; }
  .document-card { min-height: 210px; }
  .document-grid { gap: 12px; }
  .identity-steps, .stepper, .progress-steps { gap: 10px; }
  .identity-steps > *, .stepper > *, .progress-steps > * { font-size: 11px; }
  .sample-document { max-width: 275px; }
  .stat-grid.panel > .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat-grid.panel > .stat:last-child { border-bottom: 0; }
  .account-hero { padding: 24px 20px; }
  .account-hero .display-value { font-size: 44px; }
  .product-summary > .display-value { font-size: 36px; }
  .profile-summary { gap: 12px; flex-wrap: wrap; }
  .profile-summary h2 { font-size: 21px; }
  .profile-summary > .status { margin-left: 68px; }
  .profile-summary .avatar { flex-basis: 48px; width: 48px; height: 48px; }
  .login-concept { padding: 32px 20px; }
  .chat-panel .panel-heading > .status { display: none; }
  .article-lead { font-size: 21px; }
  .empty-state { min-height: 250px; padding-inline: 12px; }
  .empty-state h2 { font-size: 24px; }
  .article-body { font-size: 14px; }
  .chat-bubble { max-width: 94%; padding: 12px 14px; font-size: 13px; }
  .chat-compose { flex-wrap: wrap; }
  .chat-compose input, .chat-compose textarea { flex-basis: calc(100% - 90px); }
  .chat-compose .button { padding-inline: 14px; }
  .app-footer { flex-direction: column; gap: 10px; padding: 20px 0 24px; font-size: 11px; }
  .app-footer p { margin: 0; }
  .modal-head { padding: 12px 12px 12px 20px; }
  .modal-head h2 { font-size: 20px; }
  .modal-body { padding: 20px; }
  .modal-actions { padding: 0 20px 20px; flex-wrap: wrap; }
  .modal-actions .button { flex: 1; }
  body[data-theme="1"] .page-heading { padding-bottom: 20px; }
  body[data-theme="2"] .page-heading { padding-top: 20px; }
  body[data-theme="2"] .page-heading h1 { font-size: 36px; }
  body[data-theme="2"] .stat-grid { gap: 0; border: 0; background: transparent; }
  body[data-theme="2"] .stat { padding: 18px 0; border-bottom: 1px solid var(--line); }
  body[data-theme="2"] .trade-card { padding-top: 23px; }
  body[data-theme="2"] .trade-card h2 { font-size: 25px; }
  body[data-theme="3"] .stat { border-top: 0; }
  body[data-theme="3"] .stat-grid { border-top: 3px solid var(--accent); }
}
@media (max-width: 359px) {
  .wrap, .app-footer { width: calc(100% - 24px); }
  .concept-bar, .app-header { padding-inline: 12px; }
  .concept-note { max-width: 130px; }
  .concept-note span { display: none; }
  .drawer { width: min(264px, 82vw); }
  .panel, .trade-card { padding-inline: 16px; }
  .button { padding-inline: 13px; }
  .detail-grid, .definition-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
