:root {
  --bg: #070c18; --bg-2: #0b1324; --surface: #101a30; --surface-2: #15213c; --surface-3: #1b2a4a;
  --border: #22335a; --border-soft: #1a2849;
  --text: #eaf0fb; --muted: #93a4c6; --faint: #5f7299;
  --accent: #22d3ee; --accent-2: #3b82f6; --accent-ink: #04202a;
  --good: #34d399; --bad: #fb7185; --warn: #fbbf24; --flag-green: #22c55e;
  --glow: 0 0 0 1px rgba(34, 211, 238, .25), 0 18px 60px -18px rgba(34, 211, 238, .35);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .55);
  --radius: 18px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f3f6fc; --bg-2: #e9eff9; --surface: #ffffff; --surface-2: #f6f9fe; --surface-3: #ecf2fb;
  --border: #d6e0f0; --border-soft: #e4ebf6;
  --text: #0b1b33; --muted: #52648a; --faint: #8a9abb;
  --accent: #0891b2; --accent-2: #2563eb; --accent-ink: #ffffff;
  --good: #059669; --bad: #e11d48; --warn: #d97706; --flag-green: #16a34a;
  --glow: 0 0 0 1px rgba(8, 145, 178, .25), 0 18px 50px -20px rgba(8, 145, 178, .35);
  --shadow: 0 10px 30px -14px rgba(20, 40, 90, .25);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg);
  color: var(--text); line-height: 1.55; -webkit-font-smoothing: antialiased; min-height: 100vh;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(34, 211, 238, .13), transparent 60%),
    radial-gradient(800px 460px at 92% 4%, rgba(59, 130, 246, .13), transparent 60%),
    linear-gradient(var(--border-soft) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: linear-gradient(#000 0, #000 45%, transparent 85%); mask-image: linear-gradient(#000 0, #000 45%, transparent 85%);
  opacity: .55;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; padding: 12px clamp(14px, 3vw, 32px);
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border-soft);
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -.02em; font-size: 17px; cursor: pointer; }
.logo { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0ea5c6, #2563eb); box-shadow: 0 6px 18px -6px rgba(34, 211, 238, .6); }
.logo svg { width: 20px; height: 20px; }
.logo::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, #1eb53a 33%, #fff 33% 66%, #ce1126 66%); opacity: .95; }
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); letter-spacing: 0; margin-top: -3px; }
.nav { display: flex; gap: 4px; margin-left: 10px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border-soft); }
.nav button { border: 0; background: none; padding: 7px 16px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px; transition: .2s; }
.nav button:hover { color: var(--text); }
.nav button[aria-selected="true"] { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 6px 16px -8px var(--accent); }
.spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; color: var(--muted); background: var(--surface); border: 1px solid var(--border-soft); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.dot.on { background: var(--good); box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--surface); border: 1px solid var(--border-soft); color: var(--muted); transition: .2s; }
.icon-btn:hover { color: var(--text); border-color: var(--border); }

/* ---------- layout ---------- */
main { width: 100%; }
.wrap { width: min(920px, 100% - 28px); margin: 0 auto; }
.wrap.wide { width: min(1240px, 100% - 28px); }

/* ---------- hero ---------- */
.hero { padding: clamp(34px, 8vh, 84px) 0 26px; text-align: center; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.hero h1 { font-size: clamp(32px, 6vw, 58px); line-height: 1.05; letter-spacing: -.035em; margin: 20px auto 16px; max-width: 18ch; font-weight: 800; }
.grad { background: linear-gradient(100deg, #22d3ee 10%, #60a5fa 45%, #a78bfa 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { max-width: 62ch; margin: 0 auto; color: var(--muted); font-size: clamp(15px, 2vw, 17.5px); }
.hero p.lead b { color: var(--text); font-weight: 600; }

.composer-box { margin: 30px auto 0; max-width: 780px; text-align: left; }
.composer {
  display: flex; align-items: flex-end; gap: 10px; padding: 10px 10px 10px 18px; border-radius: 22px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s;
}
.composer:focus-within { border-color: var(--accent); box-shadow: var(--glow); }
.composer textarea { flex: 1; resize: none; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 16px; line-height: 1.5; padding: 9px 0; max-height: 150px; }
.composer textarea::placeholder { color: var(--faint); }
.send { width: 44px; height: 44px; border-radius: 15px; border: 0; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; transition: .2s; flex: none; }
.send:hover { transform: translateY(-1px) scale(1.04); box-shadow: 0 10px 22px -10px var(--accent); }
.send:disabled { opacity: .45; transform: none; cursor: default; box-shadow: none; }
.hint { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--faint); font-size: 12.5px; margin: 10px 6px 0; }
kbd { font: 600 11px ui-monospace, Consolas, monospace; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-top: 22px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 14px; font-size: 13.5px; color: var(--text); text-align: left;
  background: var(--surface); border: 1px solid var(--border-soft); transition: .2s;
}
.chip:hover { border-color: var(--accent); transform: translateY(-2px); background: var(--surface-2); }
.chip.small { padding: 6px 11px; font-size: 12.5px; border-radius: 999px; color: var(--muted); }
.chip.small:hover { color: var(--text); }
.chip.accent { border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 38px auto 0; max-width: 860px; }
.stat { padding: 16px 12px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--border-soft); }
.stat b { display: block; font-size: clamp(20px, 3.4vw, 28px); font-weight: 800; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 12.5px; }
.history { margin-top: 20px; }
.history h4 { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }

/* ---------- chat feed ---------- */
#feed > * { scroll-margin-top: 84px; }
#feed { padding: 24px 0 8px; display: flex; flex-direction: column; gap: 22px; }
.msg-user { align-self: flex-end; max-width: 82%; padding: 12px 18px; border-radius: 20px 20px 6px 20px; font-weight: 500;
  background: linear-gradient(135deg, var(--accent-2), #6366f1); color: #fff; box-shadow: 0 12px 26px -14px #4f46e5; animation: rise .35s both; }
.msg-bot { display: flex; flex-direction: column; gap: 14px; animation: rise .4s both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.answer { position: relative; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border-soft); box-shadow: var(--shadow); overflow: hidden; }
.answer::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.answer.ok::before { background: linear-gradient(var(--accent), var(--accent-2)); }
.answer.warn::before { background: var(--warn); }
.answer.bad::before { background: var(--bad); }
.a-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 14px 20px 0 22px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; border: 1px solid var(--border); color: var(--muted); background: var(--surface-2); }
.tag.good { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); background: color-mix(in srgb, var(--good) 10%, transparent); }
.tag.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.tag.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.a-text { padding: 12px 22px 6px 22px; font-size: 16px; }
.a-text p { margin: 0 0 8px; }
.a-text ul { margin: 6px 0 8px; padding-left: 20px; }
.a-text li { margin: 3px 0; }
.a-text strong { color: var(--text); font-weight: 700; }
.visual { padding: 6px 22px 18px 22px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.meta { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 10px; font-size: 12.5px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border-soft); }
.meta b { color: var(--text); font-weight: 600; }

.big { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px 14px; margin: 4px 0 6px; }
.big .v { font-size: clamp(38px, 8vw, 62px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; background: linear-gradient(100deg, var(--text), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.big .u { color: var(--muted); font-size: 15px; font-weight: 500; }
.delta { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 14px; font-weight: 800; font-size: 20px; }
.delta.up { color: var(--good); background: color-mix(in srgb, var(--good) 13%, transparent); }
.delta.down { color: var(--bad); background: color-mix(in srgb, var(--bad) 13%, transparent); }
.delta.flat { color: var(--muted); background: var(--surface-2); }
.fromto { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; margin: 6px 0 14px; }
.ft { padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border-soft); }
.ft small { color: var(--muted); font-size: 12.5px; display: block; }
.ft b { font-size: clamp(20px, 4vw, 30px); letter-spacing: -.02em; }
.arrow { color: var(--faint); font-size: 26px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.tile { padding: 11px 13px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--border-soft); }
.tile small { color: var(--muted); font-size: 11.5px; display: block; }
.tile b { font-size: 15.5px; }
.tile em { font-style: normal; color: var(--faint); font-size: 11.5px; display: block; }

.chart { position: relative; width: 100%; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .tip { position: absolute; pointer-events: none; transform: translate(-50%, -112%); padding: 7px 11px; border-radius: 11px; font-size: 12.5px; white-space: nowrap; background: var(--surface-3); border: 1px solid var(--border); box-shadow: var(--shadow); opacity: 0; transition: opacity .12s; z-index: 5; }
.chart .tip b { display: block; font-size: 14px; }
.chart .tip span { color: var(--muted); }
.axis text { fill: var(--faint); font-size: 11px; font-family: inherit; }
.grid line { stroke: var(--border-soft); stroke-dasharray: 3 5; }
.line-path { fill: none; stroke: url(#lg); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.1s .1s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.area-path { opacity: 0; animation: fade .8s .6s ease forwards; }
@keyframes fade { to { opacity: 1; } }
.hl { fill: var(--accent); stroke: var(--surface); stroke-width: 3; }
.hl-ring { fill: none; stroke: var(--accent); stroke-opacity: .45; animation: ring 2s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ring { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }

.rank { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.rank-row { display: grid; grid-template-columns: 26px minmax(110px, 190px) 1fr auto; align-items: center; gap: 12px; font-size: 14px; }
.rank-row .n { color: var(--faint); font-weight: 700; text-align: center; }
.rank-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.rank-row .bar { height: 12px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.rank-row .bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.rank-row:first-child .bar i { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.rank-row .val { font-weight: 700; text-align: right; min-width: 6ch; }

.details { border-top: 1px solid var(--border-soft); }
.details > button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 22px; border: 0; background: none; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.details > button:hover { color: var(--text); background: var(--surface-2); }
.details .chev { transition: transform .25s; }
.details.open .chev { transform: rotate(180deg); }
.details .body { display: none; padding: 4px 22px 18px; font-size: 13.5px; }
.details.open .body { display: block; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; margin: 0 0 14px; }
.kv dt { color: var(--faint); } .kv dd { margin: 0; word-break: break-word; }
.steps { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 12px; }
.step { display: flex; align-items: center; gap: 10px; padding: 7px 11px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border-soft); font-family: ui-monospace, Consolas, monospace; font-size: 12px; overflow-x: auto; }
.step .st { margin-left: auto; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.st.ok { color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); }
.st.no_data, .st.ambiguous, .st.no_match, .st.refused, .st.not_found { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
table.facts { width: 100%; border-collapse: collapse; font-size: 13px; }
table.facts th, table.facts td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border-soft); }
table.facts th { color: var(--faint); font-weight: 600; font-size: 12px; }
.a-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 22px 16px; border-top: 1px solid var(--border-soft); }
.a-foot .label { color: var(--faint); font-size: 12px; margin-right: 2px; }
.a-actions { margin-left: auto; display: flex; gap: 6px; }
.ghost { border: 1px solid var(--border-soft); background: var(--surface-2); color: var(--muted); padding: 5px 11px; border-radius: 10px; font-size: 12.5px; transition: .2s; }
.ghost:hover { color: var(--text); border-color: var(--border); }
.alt-list { padding: 4px 22px 14px; }
.alt-list .label { color: var(--faint); font-size: 12px; display: block; margin-bottom: 6px; }
.alt { display: block; width: 100%; text-align: left; padding: 8px 12px; margin-bottom: 6px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border-soft); font-size: 13px; color: var(--text); transition: .2s; }
.alt:hover { border-color: var(--accent); }
.alt small { color: var(--muted); }

.loading { padding: 18px 22px; }
.sk { height: 14px; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; margin: 10px 0; }
@keyframes shimmer { to { background-position: -200% 0; } }
.loading .status { color: var(--muted); font-size: 13.5px; display: flex; align-items: center; gap: 10px; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid var(--border); border-top-color: var(--accent); animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* docked composer */
.dock { position: sticky; bottom: 0; z-index: 20; padding: 34px 0 16px; background: linear-gradient(transparent, var(--bg) 40%); }
.dock .composer-box { margin: 0 auto; }
.dock .hint { margin-top: 6px; }

/* ---------- catalog ---------- */
.cat-layout { display: grid; grid-template-columns: 290px 1fr; gap: 22px; padding: 28px 0 60px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); box-shadow: var(--shadow); }
.side { position: sticky; top: 78px; padding: 12px; max-height: calc(100vh - 100px); overflow: auto; }
.side h3 { margin: 6px 8px 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.tree-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--muted); font-size: 13.5px; transition: .15s; }
.tree-item:hover { background: var(--surface-2); color: var(--text); }
.tree-item.active { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 700; }
.tree-item .c { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tree-sub { margin-left: 12px; border-left: 1px solid var(--border-soft); padding-left: 6px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 15px; background: var(--surface); border: 1px solid var(--border); }
.search:focus-within { border-color: var(--accent); box-shadow: var(--glow); }
.search input { flex: 1; border: 0; outline: 0; background: none; color: var(--text); font: inherit; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-soft); }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 9px; font-size: 13px; color: var(--muted); font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }
.count { color: var(--muted); font-size: 13px; margin: 4px 2px 12px; }
.ind { display: block; width: 100%; text-align: left; padding: 14px 18px; margin-bottom: 10px; border-radius: 15px; background: var(--surface); border: 1px solid var(--border-soft); transition: .2s; }
.ind:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.ind .t { font-weight: 650; font-size: 15px; margin-bottom: 7px; }
.ind .m { display: flex; flex-wrap: wrap; gap: 7px; font-size: 12px; color: var(--muted); }
.ind .code { font-family: ui-monospace, Consolas, monospace; color: var(--faint); }
.more { width: 100%; padding: 12px; border-radius: 14px; border: 1px dashed var(--border); background: none; color: var(--muted); }
.more:hover { color: var(--text); border-color: var(--accent); }

.drawer-back { position: fixed; inset: 0; z-index: 40; background: rgba(2, 6, 16, .6); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s; }
.drawer-back.show { opacity: 1; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 100%); z-index: 41; background: var(--bg-2); border-left: 1px solid var(--border); overflow-y: auto; transform: translateX(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); padding: 22px 24px 60px; }
.drawer.show { transform: none; }
.drawer h2 { font-size: 21px; letter-spacing: -.02em; margin: 6px 0 12px; line-height: 1.25; padding-right: 40px; }
.drawer .close { position: absolute; top: 16px; right: 16px; }
.drawer .controls { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; align-items: center; }
select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 8px 12px; max-width: 100%; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 8px; }
.data-table th, .data-table td { padding: 7px 10px; border-bottom: 1px solid var(--border-soft); text-align: left; }
.data-table td:last-child, .data-table th:last-child { text-align: right; }
.data-table th { color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 12px; border: 0; font-weight: 700; font-size: 13.5px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.btn.sec { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn:hover { filter: brightness(1.08); }

/* ---------- about ---------- */
.about { padding: 44px 0 70px; }
.about h2 { font-size: clamp(26px, 4vw, 38px); letter-spacing: -.03em; margin: 0 0 12px; }
.about .lead { color: var(--muted); max-width: 70ch; font-size: 16.5px; }
.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 30px 0; }
.step-card { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border-soft); position: relative; }
.step-card .no { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; margin-bottom: 12px; }
.step-card h3 { margin: 0 0 6px; font-size: 16px; }
.step-card p { margin: 0; color: var(--muted); font-size: 14px; }
.guarantees { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.g { padding: 18px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border-soft); display: flex; gap: 14px; }
.g .ic { font-size: 22px; line-height: 1; }
.g h4 { margin: 0 0 4px; font-size: 15px; } .g p { margin: 0; color: var(--muted); font-size: 13.5px; }
footer { padding: 26px 0 40px; color: var(--faint); font-size: 12.5px; text-align: center; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 30px); padding: 10px 18px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--border); box-shadow: var(--shadow); opacity: 0; transition: .3s; z-index: 60; font-size: 14px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  .cat-layout { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .pill.status { display: none; }
}
@media (max-width: 560px) {
  .brand small { display: none; }
  .brand > div:last-child { display: none; }
  .topbar { gap: 10px; } .nav { margin-left: 0; }
  .nav button { padding: 7px 11px; font-size: 13px; }
  .guarantees, .pipeline { grid-template-columns: 1fr; }
  .fromto { grid-template-columns: 1fr; } .fromto .arrow { transform: rotate(90deg); text-align: center; }
  .rank-row { grid-template-columns: 22px 1fr auto; } .rank-row .bar { grid-column: 2 / 4; grid-row: 2; }
  .kv { grid-template-columns: 1fr; gap: 0; } .kv dd { margin-bottom: 8px; }
  .msg-user { max-width: 94%; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* region profile */
.profile { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 4px; }
.pf { text-align: left; padding: 13px 15px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border-soft); transition: .2s; display: flex; flex-direction: column; gap: 2px; }
.pf:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.pf small { color: var(--muted); font-size: 12px; font-weight: 600; }
.pf b { font-size: 22px; letter-spacing: -.02em; line-height: 1.2; margin-top: 2px; }
.pf .u { color: var(--muted); font-size: 12px; }
.pf em { font-style: normal; color: var(--faint); font-size: 11.5px; margin-top: 2px; }

/* ---------- forecast (estimate, visually distinct from published data) ---------- */
.fc-line { fill: none; stroke: #f59e0b; stroke-width: 2.4; stroke-dasharray: 6 5; }
.fc-band { fill: #f59e0b; fill-opacity: .16; stroke: none; }
.big .v.fc { background: none; color: #f59e0b; -webkit-text-fill-color: #f59e0b; }
.fc-range { color: var(--muted); font-size: 13.5px; margin: 2px 0 10px; }
