:root {
  --bg: #0a0a0a;
  --surface: rgba(255, 255, 255, 0.05);
  --surface2: rgba(255, 255, 255, 0.09);
  --signal: #ffffff;
  --text: #e5e5e5;
  --white: #ffffff;
  --muted: rgba(255, 255, 255, 0.6);
  --dim: rgba(255, 255, 255, 0.45);
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.14);
  --ok: #3fb950;
  --warn: #e3b341;
  --danger: #ff5555;
  --r-sm: 10px;
  --r-md: 20px;
  --r-lg: 24px;
  --r-pill: 999px;
  --display: "Unbounded", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --edge: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -1px 0 rgba(255, 255, 255, 0.05);
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 18px 48px rgba(0, 0, 0, 0.35);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select { font-family: inherit; color: inherit; }
button { cursor: pointer; }
code { font-family: var(--mono); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.55); outline-offset: 2px; }

.flow-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 78% 68% at 50% 45%, #000 38%, transparent 92%);
  mask-image: radial-gradient(ellipse 78% 68% at 50% 45%, #000 38%, transparent 92%);
}

/* ---------- shell and sidebar ---------- */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: rgba(10, 10, 10, 0.6);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  z-index: 5;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 22px;
  font-family: var(--display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
}
.sidebar-brand b { color: var(--text); }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: var(--surface2);
  border: 1px solid var(--line2);
  box-shadow: var(--edge);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-tag {
  margin-left: auto;
  font: 600 9.5px var(--mono);
  letter-spacing: 0.12em;
  color: var(--dim);
  border: 1px solid var(--line2);
  padding: 2px 7px;
  border-radius: var(--r-pill);
}

.nav-items { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; scrollbar-width: none; }
.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--r-pill);
  color: var(--dim);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  border: 1px solid transparent;
}
.nav-btn:hover { background: var(--surface); color: var(--white); }
.nav-btn.on { background: var(--surface2); border-color: var(--line2); box-shadow: var(--edge); color: var(--white); }
.nav-btn svg { flex: none; }

.sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.side-user { display: flex; align-items: center; gap: 10px; padding: 4px 8px 6px; min-width: 0; }
.side-user img, .side-user .ava {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line2); background: var(--surface); flex: none;
}
.side-user span { font-size: 13px; font-weight: 600; color: var(--white); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foot-note { padding: 6px 10px 0; font-size: 11px; color: var(--dim); line-height: 1.5; }

/* ---------- main ---------- */

.main {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  padding: 36px 44px 64px;
  max-width: 1280px;
}

.eyebrow { font: 600 11px var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.eyebrow.ok { color: var(--ok); }

.ph { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; gap: 16px; }
.ph h1 {
  font-family: var(--display);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--white);
  margin: 8px 0 8px;
  line-height: 1.15;
}
.ph p { margin: 0; color: var(--muted); font-size: 14px; max-width: 620px; line-height: 1.55; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--edge);
  padding: 22px;
  transition: background 0.25s, border-color 0.25s;
}
.card:hover { background: var(--surface2); border-color: var(--line2); }
.card-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}
.card-sub { font-family: "Inter", system-ui, sans-serif; font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card-head .card-title { margin-bottom: 0; }

@keyframes elIn {
  from { opacity: 0; transform: translateY(8px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.fade-in > * { animation: elIn 0.42s var(--ease) both; }
.fade-in > *:nth-child(2) { animation-delay: 40ms; }
.fade-in > *:nth-child(3) { animation-delay: 80ms; }
.fade-in > *:nth-child(4) { animation-delay: 120ms; }
.fade-in > *:nth-child(5) { animation-delay: 160ms; }
.fade-in > *:nth-child(n + 6) { animation-delay: 200ms; }

.stack { display: flex; flex-direction: column; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.grid-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 > *, .grid-hero > *, .grid-3 > * { min-width: 0; }

/* ---------- buttons, inputs ---------- */

.btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--r-pill);
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.12s, border-color 0.12s, transform 0.15s ease, background 0.2s;
}
.btn-primary {
  background: linear-gradient(180deg, #f4f4f6, #cfcfd6);
  color: #111;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 6px 20px rgba(0, 0, 0, 0.45);
}
.btn-primary:hover { background: linear-gradient(180deg, #ffffff, #dcdce2); }
.btn-ghost { background: var(--surface); border-color: var(--line2); color: var(--white); box-shadow: var(--edge); }
.btn-ghost:hover { background: var(--surface2); }
.btn:active { opacity: 0.7; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-sm { padding: 8px 16px; font-size: 12.5px; }
.btn svg { width: 16px; height: 16px; flex: none; }

.pw-input {
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 13px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.12s;
}
.pw-input:focus { border-color: var(--line2); }
.pw-input::placeholder { color: var(--dim); }

.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); flex-wrap: wrap; }
.seg-btn {
  border: 0; background: transparent; color: var(--dim);
  font-size: 11.5px; font-weight: 600; padding: 5px 12px; border-radius: 999px; white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.seg-btn:hover { color: var(--white); }
.seg-btn.on { background: linear-gradient(180deg, #f4f4f6, #cfcfd6); color: #111; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 9px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line2); box-shadow: var(--edge);
  font-size: 11.5px; font-weight: 600; color: var(--white); white-space: nowrap; text-decoration: none;
}
.chip svg { color: var(--muted); flex: none; }
a.chip:hover { background: var(--surface2); }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--r-pill);
  font: 700 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid var(--line2); color: var(--muted);
}
.pill.low, .pill.danger { color: #ff8a8a; border-color: rgba(255, 85, 85, 0.5); background: rgba(255, 85, 85, 0.1); }
.pill.mid, .pill.warn { color: var(--warn); border-color: rgba(227, 179, 65, 0.5); background: rgba(227, 179, 65, 0.1); }
.pill.high, .pill.ok { color: #5fd37a; border-color: rgba(63, 185, 80, 0.5); background: rgba(63, 185, 80, 0.1); }

.skeleton {
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- home ---------- */

.search-card { padding: 26px; }
.search-row { display: flex; gap: 12px; }
.search-row .pw-input { flex: 1; min-width: 0; font-size: 15px; padding: 14px 18px; border-radius: var(--r-pill); }
.search-row .btn { padding: 14px 28px; }
.search-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; color: var(--muted); font-size: 13px; }
.search-err { margin-top: 12px; color: #ff8a8a; font-size: 13px; }
.recent { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.recent-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.recent-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line2); font-size: 12.5px; font-weight: 600; color: var(--white); text-decoration: none; transition: background 0.2s; }
.recent-chip:hover { background: var(--surface2); }
.recent-chip img, .recent-chip .ava { width: 24px; height: 24px; border-radius: 50%; background: var(--surface2); flex: none; }
.recent-chip small { font: 600 11px var(--mono); color: var(--dim); }

.feature { display: flex; flex-direction: column; gap: 10px; }
.feature .ic { width: 38px; height: 38px; border-radius: var(--r-sm); background: var(--surface2); border: 1px solid var(--line2); box-shadow: var(--edge); display: flex; align-items: center; justify-content: center; color: var(--white); }
.feature b { font-family: var(--display); font-size: 14px; font-weight: 600; color: var(--white); }
.feature p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.55; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step { display: flex; flex-direction: column; gap: 6px; }
.step i { font: 600 11px var(--mono); letter-spacing: 0.16em; color: var(--dim); font-style: normal; }
.step b { color: var(--white); font-size: 14px; }
.step p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

/* ---------- profile header ---------- */

.pf-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.pf-ava { width: 64px; height: 64px; border-radius: 16px; border: 1px solid var(--line2); background: var(--surface2); object-fit: cover; flex: none; display: flex; align-items: center; justify-content: center; font: 700 22px var(--display); color: var(--white); }
.pf-id { min-width: 0; flex: 1 1 240px; }
.pf-name { font: 700 clamp(20px, 2.6vw, 26px) var(--display); letter-spacing: -0.02em; color: var(--white); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-sub { margin-top: 5px; color: var(--muted); font-size: 13px; }
.pf-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.pf-meta small { color: var(--dim); font-size: 12px; }
.pf-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--r-md); border: 1px solid var(--line2); background: var(--surface); font-size: 13px; color: var(--muted); line-height: 1.55; }
.notice svg { flex: none; margin-top: 1px; color: var(--warn); }
.notice b { color: var(--white); }
.notice.demo svg { color: var(--white); }

/* ---------- trust factor ---------- */

.tf-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tf-main { display: flex; align-items: center; gap: 28px; margin: 18px 0 22px; flex-wrap: wrap; }
.tf-score { display: flex; align-items: baseline; gap: 8px; }
.tf-score b { font: 700 clamp(64px, 8vw, 92px) var(--display); letter-spacing: -0.05em; line-height: 1; }
.tf-score i { font: 500 16px var(--mono); color: var(--dim); font-style: normal; }
.tf-main.low b { color: #ff7b7b; }
.tf-main.mid b { color: var(--warn); }
.tf-main.high b { color: #5fd37a; }
.tf-pot { padding-left: 28px; border-left: 1px solid var(--line2); display: flex; flex-direction: column; gap: 6px; }
.tf-pot .v { font: 700 38px var(--display); letter-spacing: -0.03em; color: #5fd37a; line-height: 1; }
.tf-pot .v small { margin-left: 8px; font: 700 14px var(--mono); letter-spacing: 0; }
.tf-pot .n { font: 12px var(--mono); color: var(--dim); }

.tf-bar { position: relative; padding-top: 22px; }
.tf-zones { display: flex; gap: 6px; }
.zone { position: relative; height: 9px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.zone .hatch, .zone .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--r-pill); }
.zone .hatch { background: repeating-linear-gradient(135deg, rgba(95, 211, 122, 0.8) 0 4px, rgba(95, 211, 122, 0.18) 4px 8px); }
.zone.z-low .fill { background: #ff7b7b; }
.zone.z-mid .fill { background: var(--warn); }
.zone.z-high .fill { background: #5fd37a; }
.tf-marks { display: flex; gap: 6px; margin-top: 9px; font: 11px var(--mono); color: var(--dim); }
.tf-marks b { display: block; font: 600 12px "Inter", sans-serif; color: var(--muted); margin-bottom: 1px; }
.tf-marks .on b { color: var(--white); }
.tf-pin { position: absolute; top: 0; transform: translateX(-50%); font: 700 11px var(--mono); }
.tf-pin.you { color: var(--white); }
.tf-pin.pot { color: #5fd37a; }

.risk-row { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 14px 18px; border-radius: var(--r-md); border: 1px solid var(--line2); background: rgba(0, 0, 0, 0.25); flex-wrap: wrap; }
.risk-row .t { font-weight: 700; color: var(--white); font-size: 13.5px; }
.risk-row .lv { font-weight: 700; font-size: 14px; }
.risk-row .num { margin-left: auto; font: 700 20px var(--display); color: var(--white); }
.risk-row .num small { font: 12px var(--mono); color: var(--dim); }
.dashes { display: inline-flex; gap: 4px; }
.dashes i { width: 20px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); }
.band-min { color: #5fd37a; }
.band-low { color: #9bd96a; }
.band-mid { color: var(--warn); }
.band-high { color: #ff9a6b; }
.band-vhigh { color: #ff7b7b; }
.dashes.band-min i.on { background: #5fd37a; }
.dashes.band-low i.on { background: #9bd96a; }
.dashes.band-mid i.on { background: var(--warn); }
.dashes.band-high i.on { background: #ff9a6b; }
.dashes.band-vhigh i.on { background: #ff7b7b; }

.tf-sum { margin-top: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.tf-sum b { color: var(--white); font-size: 15px; font-family: var(--display); font-weight: 600; }

.mini-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mini { padding: 14px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(0, 0, 0, 0.22); }
.mini .l { font: 600 10px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.mini .v { margin-top: 8px; font: 700 22px var(--display); letter-spacing: -0.02em; color: var(--white); }
.mini .v.ok { color: #5fd37a; }
.mini .v.warn { color: var(--warn); }
.mini .v.danger { color: #ff7b7b; }
.mini .s { margin-top: 4px; font-size: 11.5px; color: var(--muted); }

/* ---------- risk card ---------- */

.risk-hero { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; }
.risk-num { font: 700 56px var(--display); letter-spacing: -0.04em; line-height: 1; }
.risk-scale { flex: 1; min-width: 240px; }
.risk-scale .track { display: flex; gap: 4px; }
.risk-scale .track i { flex: 1; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); }
.risk-scale .track i.on { opacity: 1; }
.risk-scale .labels { display: flex; gap: 4px; margin-top: 8px; font: 11px var(--mono); color: var(--dim); }
.risk-scale .labels span { flex: 1; }
.risk-scale .labels span.on { color: var(--white); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: var(--r-sm); font-size: 12.5px; font-weight: 600; color: var(--white); border: 1px solid var(--line2); background: rgba(255, 255, 255, 0.04); }
.tag.up { border-color: rgba(255, 138, 107, 0.4); background: rgba(255, 138, 107, 0.07); }
.tag.up svg { color: #ff9a6b; }
.tag.down { border-color: rgba(63, 185, 80, 0.35); background: rgba(63, 185, 80, 0.07); }
.tag.down svg { color: #5fd37a; }
.sub-h { margin: 20px 0 10px; font: 600 11px var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); display: flex; align-items: center; gap: 8px; }
.sub-h:first-child { margin-top: 0; }

/* ---------- stat tiles ---------- */

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { position: relative; padding: 16px 18px; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(0, 0, 0, 0.22); overflow: hidden; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; }
.tile.ok::before { background: #3fb950; }
.tile.warn::before { background: var(--warn); }
.tile.danger::before { background: var(--danger); }
.tile .l { font: 600 10px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); display: flex; justify-content: space-between; gap: 8px; }
.tile .v { margin-top: 9px; font: 600 clamp(18px, 2vw, 22px) var(--mono); color: var(--white); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.tile.ok .v { color: #5fd37a; }
.tile.warn .v { color: var(--warn); }
.tile.danger .v { color: #ff7b7b; }
.tile .s { margin-top: 5px; font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.more-row { display: flex; justify-content: flex-start; margin-top: 14px; }
.link-btn { background: none; border: 0; color: var(--white); font-size: 13px; font-weight: 600; padding: 4px 0; display: inline-flex; align-items: center; gap: 6px; }
.link-btn:hover { color: var(--muted); }

.kd-hero { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.kd-hero .tile .v { font: 700 clamp(26px, 3vw, 36px) var(--display); }

/* ---------- weapons and maps ---------- */

.wtable { display: flex; flex-direction: column; }
.wrow { display: grid; grid-template-columns: minmax(130px, 1.1fr) minmax(0, 1.6fr) 74px 82px 74px 66px; gap: 12px; align-items: center; padding: 10px 6px; border-top: 1px solid var(--line); font-size: 13px; }
.wrow.head { border-top: 0; padding-top: 2px; font: 600 10px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.wrow .n { font-weight: 600; color: var(--white); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrow .num { text-align: right; font: 12.5px var(--mono); color: var(--text); }
.wrow.head .num { color: var(--dim); font-size: 10px; }
.wbar { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.wbar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #8b8b95, #ffffff); }
.wbar i.warm { background: linear-gradient(90deg, #7a6a30, var(--warn)); }

.wrow.maps { grid-template-columns: minmax(110px, 1fr) minmax(0, 1.6fr) 90px 90px; }
.last-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }

/* ---------- factors ---------- */

.f-col { display: flex; flex-direction: column; }
.f-title { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-weight: 700; color: var(--white); font-size: 14px; }
.f-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-left: 3px solid var(--line2); border-top: 1px solid var(--line); }
.f-row:first-of-type { border-top: 0; }
.f-row.weak { border-left-color: var(--danger); }
.f-row.ok { border-left-color: var(--warn); }
.f-row.strong { border-left-color: var(--ok); }
.f-row.unknown { border-left-color: rgba(255, 255, 255, 0.25); }
.f-main { flex: 1; min-width: 0; }
.f-main b { display: block; font-size: 13.5px; color: var(--white); }
.f-main span { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.f-main em { font-style: normal; color: var(--dim); }
.f-state { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 11.5px; font-weight: 600; flex: none; }
.f-state .d { display: inline-flex; gap: 3px; }
.f-state .d i { width: 14px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.14); }
.f-row.weak .f-state { color: #ff8a8a; }
.f-row.weak .d i.on { background: var(--danger); }
.f-row.ok .f-state { color: var(--warn); }
.f-row.ok .d i.on { background: var(--warn); }
.f-row.strong .f-state { color: #5fd37a; }
.f-row.strong .d i.on { background: var(--ok); }
.f-row.unknown .f-state { color: var(--dim); }
.f-empty { padding: 14px; color: var(--dim); font-size: 13px; border-top: 1px solid var(--line); }

/* ---------- plan ---------- */

.path { position: relative; display: flex; flex-direction: column; gap: 12px; }
.node { display: flex; gap: 16px; align-items: flex-start; }
.node .dot { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line2); display: flex; align-items: center; justify-content: center; font: 700 13px var(--mono); color: var(--white); flex: none; background: var(--bg); position: relative; z-index: 1; }
.node .dot.now { border-color: var(--warn); color: var(--warn); }
.node .dot.goal { border-color: #5fd37a; color: #5fd37a; background: rgba(63, 185, 80, 0.12); }
.node .dot.step { border-color: rgba(95, 211, 122, 0.6); }
.node .dot.warn { border-color: rgba(255, 154, 107, 0.6); color: #ff9a6b; }
.node .body { flex: 1; min-width: 0; padding: 2px 0 8px; }
.node .body > b { display: block; color: var(--white); font-size: 14px; }
.node .box { padding: 16px 18px; border-radius: var(--r-md); border: 1px solid rgba(95, 211, 122, 0.35); background: rgba(63, 185, 80, 0.06); }
.node .box.plain { border-color: var(--line2); background: rgba(255, 255, 255, 0.03); }
.node .box.cant { border-color: rgba(255, 154, 107, 0.3); background: rgba(255, 154, 107, 0.05); }
.node .box p { margin: 6px 0 0; font-size: 13px; color: var(--muted); line-height: 1.55; }
.node .box .gain { float: right; font: 700 11.5px var(--mono); color: #5fd37a; margin-left: 10px; }
.node .box .src { margin-top: 8px; font-size: 11.5px; color: var(--dim); }
.node .box .kicker { font: 600 10px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); display: block; margin-bottom: 6px; }
.path::before { content: ""; position: absolute; left: 17.5px; top: 18px; bottom: 18px; width: 1.5px; background: linear-gradient(180deg, rgba(227, 179, 65, 0.6), rgba(95, 211, 122, 0.6)); }

.disclaimer { font-size: 12.5px; color: var(--dim); line-height: 1.6; padding: 4px 6px; }

/* ---------- about ---------- */

.about-list { display: flex; flex-direction: column; }
.about-row { display: grid; grid-template-columns: minmax(0, 1.2fr) 70px minmax(0, 2fr); gap: 14px; padding: 11px 4px; border-top: 1px solid var(--line); font-size: 13px; align-items: baseline; }
.about-row:first-child { border-top: 0; }
.about-row b { color: var(--white); }
.about-row .pts { font: 600 12px var(--mono); color: var(--muted); text-align: right; }
.about-row span { color: var(--muted); }
.prose { color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.prose p { margin: 0 0 10px; }
.prose b { color: var(--white); }
.prose ul { margin: 0 0 10px; padding-left: 20px; }

/* ---------- toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 80;
  transform: translate(-50%, 14px); opacity: 0; pointer-events: none; filter: blur(4px);
  background: rgba(18, 18, 18, 0.92);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--line2); border-radius: var(--r-pill); box-shadow: var(--edge), var(--shadow);
  padding: 11px 20px; font-weight: 600; font-size: 13px; color: var(--white);
  transition: opacity 0.25s, transform 0.4s var(--ease), filter 0.25s;
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); filter: blur(0); }
.toast.err { border-color: var(--danger); color: #ffb4b6; }
.toast.ok::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 10px; }

.loading-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; height: 40vh; color: var(--dim); font: 13px var(--mono); }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--white); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.error-card { text-align: center; padding: 48px 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.error-card b { font-family: var(--display); font-size: 18px; color: var(--white); }
.error-card p { margin: 0; color: var(--muted); max-width: 420px; line-height: 1.55; }

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .tiles, .kd-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .last-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .grid-hero, .grid-2, .grid-3, .steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .shell { display: block; }
  .sidebar {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; height: auto;
    flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-right: 0; border-top: 1px solid var(--line2); z-index: 60;
  }
  .sidebar-brand, .sidebar-foot { display: none; }
  .nav-items { flex-direction: row; justify-content: space-around; gap: 0; width: 100%; overflow: visible; }
  .nav-btn { flex: 1; flex-direction: column; gap: 3px; padding: 7px 4px; font-size: 10.5px; border-radius: 14px; text-align: center; align-items: center; }
  .main { padding: 22px 16px calc(96px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .search-row { flex-direction: column; }
  .tf-pot { padding-left: 0; border-left: 0; }
  .pf-meta { align-items: flex-start; }
  .pf-actions { justify-content: flex-start; }
  .wrow { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 62px 56px; gap: 8px; }
  .wrow .hide-m { display: none; }
  .wrow.maps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 62px 62px; }
  .about-row { grid-template-columns: minmax(0, 1fr) 54px; }
  .about-row span { grid-column: 1 / -1; }
  .last-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .tiles, .kd-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
