:root {
  --bg: #f6f7fb; --bg2: #ffffff; --surface: #ffffff; --surface2: #f0f2f8; --line: #e3e6ef; --text: #0d1324; --muted: #5b6478;
  --accent: #12c98a; --accent-2: #2f6bff; --accent-ink: #ffffff; --buy: #0ea371; --sell: #e0384c; --warn: #d98a00;
  --hero1: #0a1024; --hero2: #0d1a44; --shadow: 0 6px 24px rgba(13, 19, 36, .08); --radius: 14px;
  /* chart series (categorical, fixed order; validated for CVD and contrast on --surface) */
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; --series-5: #e87ba4; --series-6: #008300; --series-7: #6250d6; --series-8: #e34948;
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif; --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
:root[data-theme="dark"] {
  --bg: #080c18; --bg2: #0c1222; --surface: #10182b; --surface2: #162036; --line: #222d47; --text: #e8ecf6; --muted: #8a94ad;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
  --accent: #2ee6a6; --accent-2: #6d95ff; --accent-ink: #04140f; --buy: #22c58b; --sell: #ff5468; --warn: #ffb020; --shadow: 0 8px 30px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.55; font-size: 15px; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
:root[data-theme="dark"] a { color: var(--accent); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 4.6vw, 54px); margin: 0 0 16px; }
h2 { font-size: clamp(22px, 2.6vw, 32px); margin: 32px 0 14px; }
h3 { font-size: 18px; margin: 0 0 8px; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.container { max-width: 1220px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.lead { font-size: 18px; color: var(--muted); max-width: 760px; }
.up { color: var(--buy); } .down { color: var(--sell); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 10px; top: 10px; z-index: 999; background: var(--surface); padding: 8px 12px; }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; padding: 11px 20px; border-radius: 10px; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none !important; font-family: inherit; transition: transform .08s, background .2s, box-shadow .2s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink) !important; }
.btn-primary:hover { box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-secondary { background: var(--accent-2); color: #fff !important; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text) !important; }
.btn-ghost:hover { background: var(--surface2); }
.btn-buy { background: var(--buy); color: #fff !important; } .btn-sell { background: var(--sell); color: #fff !important; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-xs { padding: 3px 8px; font-size: 12px; border-radius: 6px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 20%, transparent); }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 12px 0 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--text); font-size: 14px; }
.check input { width: auto; margin-top: 3px; }
.row { display: flex; gap: 12px; } .row > * { flex: 1; }
.err { color: var(--sell); font-size: 14px; min-height: 20px; margin-top: 8px; }
.ok { color: var(--buy); }

/* header */
.topbar { background: #0a0f1c; color: #c5cbe0; font-size: 12.5px; text-align: center; padding: 7px 12px; }
.topbar b { color: #fff; }
header.site { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg2) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.site .bar { display: flex; align-items: center; gap: 24px; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--text) !important; text-decoration: none !important; letter-spacing: -.02em; }
.logo svg { width: 32px; height: 32px; }
.logo .demo-pill { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 5px; background: var(--warn); color: #111; letter-spacing: .04em; }
nav.main { display: flex; gap: 4px; flex: 1; }
nav.main > .item { position: relative; }
nav.main > .item > button { background: none; border: 0; color: var(--text); font: inherit; font-weight: 600; font-size: 14px; padding: 10px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
@media (max-width: 1320px) { .hdr-right #langSel { display: none; } header.site .bar { gap: 14px; } }
nav.main > .item > button:hover, nav.main > .item.open > button { background: var(--surface2); }
.mega { display: none; position: absolute; top: 100%; left: 0; min-width: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
nav.main > .item.open .mega, nav.main > .item:hover .mega, nav.main > .item:focus-within .mega { display: grid; }
.mega a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text) !important; text-decoration: none !important; }
.mega a:hover { background: var(--surface2); }
.mega a small { display: block; color: var(--muted); font-size: 12.5px; }
.hdr-right { display: flex; gap: 8px; align-items: center; }
.icon-btn { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 9px; height: 38px; min-width: 38px; cursor: pointer; font: inherit; font-size: 13px; padding: 0 8px; }
select.icon-btn { width: auto; padding: 0 6px; }
.burger { display: none; }
@media (max-width: 1060px) {
  nav.main { display: none; position: fixed; inset: 66px 0 0 0; background: var(--bg2); flex-direction: column; padding: 12px 20px; overflow: auto; }
  nav.main.show { display: flex; }
  .mega { position: static; display: grid; min-width: 0; box-shadow: none; border: 0; grid-template-columns: 1fr; padding: 0 0 8px 8px; }
  nav.main > .item > button { width: 100%; text-align: left; font-size: 16px; }
  .burger { display: inline-block; }
  .hdr-right .hide-m { display: none; }
}

/* sections */
section { padding: 64px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
@media (max-width: 960px) { .grid3, .grid4 { grid-template-columns: repeat(2, 1fr); } .grid6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } .grid6 { grid-template-columns: repeat(2, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card.hover:hover { box-shadow: var(--shadow); transform: translateY(-2px); transition: .2s; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--surface2); color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.tag-ok { background: color-mix(in srgb, var(--buy) 15%, transparent); color: var(--buy); }
.tag-warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.tag-bad { background: color-mix(in srgb, var(--sell) 15%, transparent); color: var(--sell); }
.notice { border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 9%, transparent); border-radius: 12px; padding: 14px 16px; margin: 16px 0; font-size: 14.5px; }

/* hero */
.hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(1200px 500px at 85% -10%, rgba(47, 107, 255, .55), transparent 60%), radial-gradient(900px 500px at 0% 110%, rgba(15, 180, 138, .35), transparent 60%), linear-gradient(160deg, var(--hero1), var(--hero2)); padding: 90px 0 80px; }
.hero .grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero p.sub { font-size: 19px; color: #c7cce0; max-width: 560px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero .btn-ghost { color: #fff !important; border-color: rgba(255, 255, 255, .3); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.hero .badge { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15); margin-bottom: 18px; }
.hero .badge i { width: 8px; height: 8px; border-radius: 50%; background: #2ee6a6; box-shadow: 0 0 10px #2ee6a6; }
.hero-card { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px; padding: 18px; backdrop-filter: blur(6px); }
.hero-card table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hero-card td { padding: 9px 6px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.hero-card tr:last-child td { border: 0; }
.hero-card .sym { font-weight: 700; }
.hero small.risk { display: block; margin-top: 22px; color: #9aa2bd; font-size: 12.5px; max-width: 560px; }
@media (max-width: 900px) { .hero .grid { grid-template-columns: 1fr; } .hero { padding: 60px 0; } }

/* ticker */
.ticker-wrap { background: var(--bg2); border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.ticker { display: flex; gap: 12px; overflow: hidden; padding: 12px 0 16px; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker .track { display: flex; gap: 12px; animation: scroll 60s linear infinite; }
.ticker:hover .track { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker .track { animation: none; } .ticker { overflow-x: auto; } }
.tick { flex: 0 0 auto; display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 250px; }
.tick .s { font-weight: 700; } .tick .c { font-size: 12px; }
.tick .px { display: flex; gap: 6px; }
.tick .px span { font-family: var(--mono); font-size: 13px; padding: 3px 7px; border-radius: 6px; background: var(--surface2); }

/* figures */
.figure { text-align: left; }
.figure .v { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.figure .v small { font-size: 15px; color: var(--muted); font-weight: 600; margin-left: 3px; }
.figure .l { color: var(--muted); font-size: 13.5px; }

/* account type cards */
.acct-card { display: flex; flex-direction: column; gap: 10px; }
.acct-card .big { font-size: 26px; font-weight: 800; }
.acct-card ul { list-style: none; padding: 0; margin: 6px 0 14px; flex: 1; }
.acct-card li { padding: 7px 0; border-bottom: 1px dashed var(--line); display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.acct-card li span:first-child { color: var(--muted); }
.acct-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface2); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface2); }
.table td.r, .table th.r { text-align: right; }
.page-body .table { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: block; overflow-x: auto; }
.flash-up { animation: fu .6s; } .flash-down { animation: fd .6s; }
@keyframes fu { from { background: color-mix(in srgb, var(--buy) 30%, transparent); } }
@keyframes fd { from { background: color-mix(in srgb, var(--sell) 30%, transparent); } }

/* platform block */
.mock { border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface), var(--surface2)); padding: 14px; box-shadow: var(--shadow); }
.mock .chart { height: 260px; }
.checks { list-style: none; padding: 0; }
.checks li { padding: 6px 0 6px 28px; position: relative; }
.checks li::before { content: ''; position: absolute; left: 0; top: 10px; width: 16px; height: 16px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 20%, transparent); border: 2px solid var(--accent); }

/* markets carousel */
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.carousel > * { scroll-snap-align: start; }
.mkt-card { position: relative; overflow: hidden; min-height: 210px; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; border: 0; }
.mkt-card .art { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .95; }
.mkt-card { background: #111827; }
.icon-btn svg { width: 18px; height: 18px; display: block; margin: auto; }
.mkt-card > *:not(.art) { position: relative; }
.mkt-card p { color: rgba(255, 255, 255, .85); font-size: 14px; margin: 4px 0 12px; }

.counter .v { font-size: 40px; font-weight: 800; }
.cta-band { background: linear-gradient(120deg, var(--accent-2), #2b1f8f); color: #fff; border-radius: 20px; padding: 44px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band .btn-ghost { color: #fff !important; border-color: rgba(255, 255, 255, .35); }

/* page */
.page-hero { background: linear-gradient(160deg, var(--hero1), var(--hero2)); color: #fff; padding: 56px 0 46px; }
.page-hero p { color: #c7cce0; max-width: 720px; font-size: 17px; margin: 0; }
.crumbs { font-size: 13px; color: #9aa2bd; margin-bottom: 10px; }
.crumbs a { color: #c7cce0; }
.page-layout { display: grid; grid-template-columns: 240px 1fr; gap: 40px; padding: 40px 0 70px; }
.page-layout aside nav { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 2px; }
.page-layout aside a { padding: 8px 12px; border-radius: 8px; color: var(--text); font-size: 14px; text-decoration: none; }
.page-layout aside a.active, .page-layout aside a:hover { background: var(--surface2); }
.page-body { min-width: 0; }
.page-body ol.steps { list-style: none; counter-reset: s; padding: 0; display: grid; gap: 12px; }
.page-body ol.steps li { counter-increment: s; padding: 16px 16px 16px 64px; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.page-body ol.steps li::before { content: counter(s); position: absolute; left: 16px; top: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; }
.page-body ol.steps p { margin: 0; color: var(--muted); }
@media (max-width: 860px) { .page-layout { grid-template-columns: 1fr; } .page-layout aside { display: none; } }

/* footer */
footer.site { background: #070a14; color: #a6adc4; padding: 56px 0 30px; font-size: 13.5px; margin-top: 40px; }
footer.site a { color: #c9cfe3; }
footer.site h4 { color: #fff; font-size: 14px; margin: 0 0 12px; }
footer.site .cols { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; }
footer.site .cols a { display: block; padding: 3px 0; }
footer.site .legal { border-top: 1px solid #1c2236; margin-top: 36px; padding-top: 24px; display: grid; gap: 12px; }
footer.site .risk { border: 1px solid #2a3150; border-radius: 12px; padding: 14px; color: #d3d8ea; }
@media (max-width: 900px) { footer.site .cols { grid-template-columns: repeat(2, 1fr); } }

/* misc */
.toast-wrap { position: fixed; right: 16px; bottom: 16px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow); font-size: 14px; animation: tin .2s; }
.toast.err { border-left-color: var(--sell); } .toast.warn { border-left-color: var(--warn); }
@keyframes tin { from { transform: translateY(10px); opacity: 0; } }
.cookie { position: fixed; left: 16px; bottom: 16px; z-index: 900; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); font-size: 14px; }
.cookie .row { margin-top: 10px; }
.modal-bg { position: fixed; inset: 0; background: rgba(5, 8, 18, .6); z-index: 500; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; width: min(520px, 100%); max-height: 90vh; overflow: auto; padding: 24px; box-shadow: var(--shadow); }
.modal h3 { margin-bottom: 12px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
[dir="rtl"] .page-body ol.steps li { padding: 16px 64px 16px 16px; }
[dir="rtl"] .page-body ol.steps li::before { left: auto; right: 16px; }
[dir="rtl"] .table th, [dir="rtl"] .table td { text-align: right; }

/* FX24Pro wordmark */
.wm { font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.wm i { font-style: normal; font-weight: 700; color: var(--accent); letter-spacing: .02em; margin-left: 1px; }

/* ---------- global asset search (App.searchPalette) ---------- */
.sp-bg { place-items: start center; padding-top: min(12vh, 90px); }
.sp-box { width: min(640px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; max-height: min(640px, 80vh); overflow: hidden; font-size: 14px; }
.sp-in { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.sp-in svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.sp-in input { border: 0; padding: 4px 0; font-size: 16px; background: none; box-shadow: none !important; }
.sp-box kbd { font-family: var(--mono); font-size: 11px; background: var(--surface2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; color: var(--muted); }
.sp-chips { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.sp-chips button { border: 1px solid var(--line); background: none; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 99px; cursor: pointer; white-space: nowrap; }
.sp-chips button.on { background: var(--text); border-color: var(--text); color: var(--surface); }
.sp-res { overflow-y: auto; flex: 1; padding: 4px 6px 8px; }
.sp-g { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 8px 4px; }
.sp-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto 70px auto; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.sp-row.sel, .sp-row:hover { background: var(--surface2); }
.sp-row .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .5; }
.sp-row .dot.on { background: var(--buy); opacity: 1; }
.sp-sym { min-width: 0; } .sp-sym b { display: block; } .sp-sym small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-px, .sp-ch { font-family: var(--mono); font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; }
.sp-add { border: 1px solid var(--line); background: var(--surface); color: var(--text); width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; cursor: pointer; }
.sp-add:hover { border-color: var(--accent-2); color: var(--accent-2); } .sp-add svg { width: 14px; height: 14px; }
.sp-empty { padding: 36px 16px; text-align: center; }
.sp-foot { display: flex; gap: 16px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
@media (max-width: 640px) { .modal-bg.sp-bg { padding: 0; place-items: stretch; grid-template-columns: 100%; } .sp-box { width: 100%; } .sp-box { max-height: none; height: 100%; border-radius: 0; border: 0; } .sp-foot { display: none; } .sp-row { grid-template-columns: 8px minmax(0, 1fr) auto auto; } .sp-ch { display: none; } }

/* ---------- portfolio & performance (perf.js) ---------- */
.perf { display: flex; flex-direction: column; gap: 12px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi span { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.kpi b { font-family: var(--mono); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.perf-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 12px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.pcard.full { grid-column: 1 / -1; }
.pcard header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.pcard h4 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pcard .readout { font-family: var(--mono); font-size: 12px; color: var(--text); }
.pcard .note { margin: 6px 0 0; }
.pchart { height: 220px; position: relative; } .pchart.short { height: 160px; }
.alloc { display: flex; gap: 16px; align-items: center; margin-bottom: 10px; }
.donut { width: 132px; height: 132px; flex: none; } .donut .seg { transition: stroke-width .15s; } .donut .seg:hover { stroke-width: 22; }
.alloc-legend { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; font-size: 12.5px; }
.alloc-legend div { display: grid; grid-template-columns: 10px 1fr auto; gap: 2px 8px; align-items: center; }
.alloc-legend i { width: 10px; height: 10px; border-radius: 3px; }
.alloc-legend b { font-family: var(--mono); font-weight: 600; text-align: right; }
.alloc-legend small { grid-column: 2 / -1; color: var(--muted); font-family: var(--mono); font-size: 11px; margin-top: -3px; }
.ptable { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ptable th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 5px 6px; border-bottom: 1px solid var(--line); font-weight: 600; }
.ptable td { padding: 6px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); white-space: nowrap; }
.ptable .n { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ptable .bar { display: inline-block; width: 48px; height: 6px; background: var(--surface2); border-radius: 3px; margin-right: 6px; vertical-align: 1px; overflow: hidden; }
.ptable .bar i { display: block; height: 100%; background: var(--accent-2); border-radius: 3px; }
.spec2 { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; font-size: 12.5px; }
.spec2 span { color: var(--muted); } .spec2 b { font-family: var(--mono); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.empty-mini { color: var(--muted); font-size: 13px; padding: 18px 4px; text-align: center; }
@media (max-width: 900px) { .perf-grid { grid-template-columns: 1fr; } .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* accessibility: visible keyboard focus everywhere, calmer motion on request */
button:focus-visible, a:focus-visible, [tabindex]:focus-visible, select:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* staff "log in as client" banner */
.imp-bar { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 950; display: flex; align-items: center; gap: 10px; background: #7c3aed; color: #fff; padding: 6px 8px 6px 12px; border-radius: 99px; box-shadow: var(--shadow); font-size: 13px; max-width: calc(100vw - 16px); }
.imp-bar svg { width: 16px; height: 16px; flex: none; }
.imp-bar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imp-bar .btn { background: #fff; color: #4c1d95 !important; border: 0; white-space: nowrap; }

/* segmented control (shared by the terminal and the portals) */
.seg { display: flex; background: var(--surface2); border-radius: 9px; padding: 3px; gap: 3px; margin-bottom: 8px; }
.seg button { flex: 1; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; padding: 7px; border-radius: 7px; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.seg.sm button { padding: 5px; }
