/* Perliv — design system "Data-Dense Dashboard" (ui-ux-pro-max): Fira Sans / Fira Code, blue data + amber highlights,
   light and dark themes from one set of semantic tokens. Components never use raw hex — only these variables. */
:root {
  --bg: #f8fafc;
  --bg2: #f1f5f9;          /* inputs, wells, table heads */
  --card: #ffffff;
  --card2: #f8fafc;        /* raised element inside a card */
  --line: #e2e8f0;
  --line2: #cbd5e1;        /* hover / strong border */
  --text: #0f172a;
  --heading: #1e3a8a;
  --muted: #475569;        /* 7.5:1 on white */
  --dim: #64748b;          /* 4.8:1 on white — smallest text never goes lighter than this */
  --primary: #1e40af;
  --primary-hover: #1e3a8a;
  --on-primary: #ffffff;
  --primary-soft: #dbeafe;
  --accent: #b45309;       /* amber, readable as text */
  --accent-soft: #fef3c7;
  --good: #15803d;  --good-soft: #dcfce7;
  --warn: #b45309;  --warn-soft: #fef3c7;
  --bad: #b91c1c;   --bad-soft: #fee2e2;
  --info: #0e7490;  --info-soft: #cffafe;
  --violet: #6d28d9; --violet-soft: #ede9fe;
  --ring: #1e40af;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .14);
  --overlay: rgba(15, 23, 42, .55);
  --radius: 10px;
  --radius-sm: 6px;
  --font: "Fira Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Fira Code", ui-monospace, "SF Mono", Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1120; --bg2: #0f172a; --card: #111a2e; --card2: #16213a;
  --line: #1e2b45; --line2: #2c3d5f;
  --text: #e2e8f0; --heading: #e2e8f0; --muted: #a3b1c6; --dim: #8796ad;
  --primary: #3b82f6; --primary-hover: #60a5fa; --on-primary: #ffffff; --primary-soft: rgba(59, 130, 246, .16);
  --accent: #fbbf24; --accent-soft: rgba(251, 191, 36, .14);
  --good: #4ade80; --good-soft: rgba(74, 222, 128, .13);
  --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .13);
  --bad: #f87171;  --bad-soft: rgba(248, 113, 113, .13);
  --info: #22d3ee; --info-soft: rgba(34, 211, 238, .12);
  --violet: #a78bfa; --violet-soft: rgba(167, 139, 250, .15);
  --ring: #60a5fa;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 16px 40px rgba(0, 0, 0, .45); --overlay: rgba(2, 6, 23, .7);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg: #0b1120; --bg2: #0f172a; --card: #111a2e; --card2: #16213a;
    --line: #1e2b45; --line2: #2c3d5f;
    --text: #e2e8f0; --heading: #e2e8f0; --muted: #a3b1c6; --dim: #8796ad;
    --primary: #3b82f6; --primary-hover: #60a5fa; --on-primary: #ffffff; --primary-soft: rgba(59, 130, 246, .16);
    --accent: #fbbf24; --accent-soft: rgba(251, 191, 36, .14);
    --good: #4ade80; --good-soft: rgba(74, 222, 128, .13);
    --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .13);
    --bad: #f87171;  --bad-soft: rgba(248, 113, 113, .13);
    --info: #22d3ee; --info-soft: rgba(34, 211, 238, .12);
    --violet: #a78bfa; --violet-soft: rgba(167, 139, 250, .15);
    --ring: #60a5fa;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 16px 40px rgba(0, 0, 0, .45); --overlay: rgba(2, 6, 23, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
button { font: inherit; color: inherit; }
[v-cloak] { display: none; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--primary-soft); }
.ic { width: 16px; height: 16px; flex: none; stroke-width: 2; vertical-align: -3px; }
.ic.sm { width: 14px; height: 14px; }
.ic.lg { width: 20px; height: 20px; }
.ic.xl { width: 32px; height: 32px; stroke-width: 1.5; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- shell ---------- */
.layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 16px 12px; border-right: 1px solid var(--line);
  background: var(--card); display: flex; flex-direction: column; gap: 2px; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 16px; font-weight: 700; font-size: 16px; color: var(--heading); }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); }
.nav-group { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); padding: 14px 12px 6px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 7px 12px; border-radius: 8px;
  color: var(--muted); font-weight: 500; transition: background .15s var(--ease), color .15s var(--ease);
}
.nav a:hover { background: var(--bg2); color: var(--text); }
.nav a.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav a.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.nav .badge { margin-left: auto; }
.side .foot { margin-top: auto; padding: 12px 10px 4px; display: flex; flex-direction: column; gap: 10px; font-size: 12.5px; color: var(--dim); border-top: 1px solid var(--line); }
.theme-switch { display: inline-flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 2px; gap: 2px; width: fit-content; }
.theme-switch button { display: grid; place-items: center; width: 32px; height: 28px; border: 0; background: none; border-radius: 6px; cursor: pointer; color: var(--dim); }
.theme-switch button:hover { color: var(--text); }
.theme-switch button.on { background: var(--card); color: var(--primary); box-shadow: var(--shadow); }
.topbar { display: none; }
.scrim { display: none; }

.main { padding: 24px 32px 64px; max-width: 1560px; width: 100%; min-width: 0; }
.head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.head h1 { font: 600 22px/1.3 var(--mono); margin: 0; letter-spacing: -.01em; color: var(--heading); }
.head .sub { color: var(--muted); font-size: 13.5px; }
.head .sp { flex: 1; }

/* ---------- surfaces ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.card h3 { margin: 0 0 12px; font-size: 12px; color: var(--dim); font-weight: 600; text-transform: uppercase; letter-spacing: .07em; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
a.kpi:hover { border-color: var(--primary); color: inherit; box-shadow: var(--shadow-lg); }
.kpi .v { font: 600 26px/1.2 var(--mono); letter-spacing: -.02em; color: var(--heading); display: flex; align-items: center; gap: 8px; }
.kpi .l { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.kpi.accent { border-color: var(--primary); box-shadow: inset 3px 0 0 var(--primary), var(--shadow); }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 7px 14px; border-radius: 8px;
  border: 1px solid var(--line2); background: var(--card); cursor: pointer; font-weight: 500; white-space: nowrap; color: var(--text);
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
.btn.good { background: var(--good-soft); border-color: transparent; color: var(--good); }
.btn.good:hover { border-color: var(--good); }
.btn.bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.btn.bad:hover { border-color: var(--bad); }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--bg2); color: var(--text); }
.btn.sm { min-height: 30px; padding: 4px 10px; font-size: 12.5px; border-radius: 6px; gap: 5px; }
.btn.icon { padding: 0; width: 32px; min-height: 32px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 99px; font-size: 12px; line-height: 20px;
  background: var(--bg2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
a.chip, .chip[role="button"] { cursor: pointer; transition: border-color .15s var(--ease), color .15s var(--ease); }
a.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.p { color: var(--violet); border-color: transparent; background: var(--violet-soft); }
.chip.c { color: var(--info); border-color: transparent; background: var(--info-soft); }
.chip.g { color: var(--good); border-color: transparent; background: var(--good-soft); }
.chip.w { color: var(--warn); border-color: transparent; background: var(--warn-soft); }
.chip.r { color: var(--bad); border-color: transparent; background: var(--bad-soft); }
.badge { background: var(--accent-soft); color: var(--accent); border-radius: 99px; font: 600 11.5px/18px var(--mono); padding: 0 7px; }
.nav a.on .badge { background: var(--primary); color: var(--on-primary); }

input, textarea, select {
  background: var(--card); border: 1px solid var(--line2); color: var(--text); border-radius: 8px; padding: 7px 11px; min-height: 36px;
  font: inherit; outline: none; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); max-width: 100%;
}
input:hover, textarea:hover, select:hover { border-color: var(--dim); }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
input[type="checkbox"] { min-height: 0; width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
textarea { width: 100%; min-height: 90px; resize: vertical; font: 12.5px/1.5 var(--mono); }
select { cursor: pointer; }
label.f { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 12.5px; font-weight: 500; }

.tabs { display: flex; gap: 2px; background: var(--bg2); border: 1px solid var(--line); padding: 3px; border-radius: 10px; width: fit-content; max-width: 100%; overflow-x: auto; margin-bottom: 16px; }
.tabs button {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; min-height: 32px; padding: 5px 14px; border-radius: 7px;
  cursor: pointer; color: var(--muted); font-weight: 500; white-space: nowrap; transition: background .15s var(--ease), color .15s var(--ease);
}
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--card); color: var(--primary); font-weight: 600; box-shadow: var(--shadow); }

/* ---------- people ---------- */
.av {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--primary-soft); flex: none;
  display: grid; place-items: center; font-weight: 600; color: var(--primary); font-size: 14px; overflow: hidden;
}
.av.lg { width: 72px; height: 72px; font-size: 26px; }
.av.sm { width: 26px; height: 26px; font-size: 11px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who .n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.who .n a:first-child { color: var(--text); }
.who .n a:first-child:hover { color: var(--primary); }
.who .ext { color: var(--dim); display: inline-grid; }
.who .ext:hover { color: var(--primary); }
.who .s { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- tables ---------- */
.card:has(> table), .tbl { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th {
  position: sticky; top: 0; z-index: 1; text-align: left; color: var(--dim); font-weight: 600; font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .06em; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--card); white-space: nowrap;
}
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
td.num, td .btn, td .chip { overflow-wrap: normal; }
tr:last-child td { border-bottom: 0; }
tbody tr, table tr { transition: background .12s var(--ease); }
tr:hover td { background: var(--bg2); }
tr.click { cursor: pointer; }
.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
td.num b { font-weight: 600; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 12.5px; }
.bio { color: var(--muted); font-size: 12.5px; white-space: pre-line; max-height: 4.5em; overflow: hidden; line-height: 1.5; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sp { flex: 1; }
.help { color: var(--dim); font-size: 12.5px; line-height: 1.55; }
.status-line { display: flex; gap: 8px 18px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; }
.status-line b { color: var(--text); font-weight: 600; }
.up { color: var(--good); }
.down { color: var(--bad); }

/* ---------- cards & feeds ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--bg); }
.login { width: min(360px, 100%); display: flex; flex-direction: column; gap: 10px; }
.login input[type=password] { width: 100%; }
.niche-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.niche-card { display: flex; flex-direction: column; gap: 8px; min-height: 150px; color: inherit; text-decoration: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.niche-card:hover, .niche-card:focus-visible { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.niche-card h2 { margin: 0; font: 600 15px/1.3 var(--mono); color: var(--heading); text-transform: capitalize; }
.nc-desc { color: var(--muted); font-size: 12.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nc-avs { display: flex; }
.nc-avs .av { border: 2px solid var(--card); margin-left: -6px; }
.nc-avs .av:first-child { margin-left: 0; }
.pcard { cursor: pointer; display: flex; flex-direction: column; gap: 12px; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.pcard:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats3 div { background: var(--bg2); border-radius: 8px; padding: 8px 10px; }
.stats3 b { display: block; font: 600 15px/1.3 var(--mono); }
.stats3 span { color: var(--dim); font-size: 12px; }

.progress { height: 6px; background: var(--bg2); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--primary); transition: width .4s var(--ease); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 var(--good-soft); animation: pulse 1.6s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.post { position: relative; border-radius: 8px; overflow: hidden; background: var(--bg2); aspect-ratio: 4/5; border: 1px solid var(--line); display: block; transition: border-color .15s var(--ease); }
.post:hover { border-color: var(--primary); }
.post img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post .cap { position: absolute; inset: auto 0 0 0; padding: 22px 8px 8px; font-size: 12px; color: #fff; line-height: 1.4; background: linear-gradient(transparent, rgba(0, 0, 0, .82)); }
.post .ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--dim); font-size: 12px; padding: 10px; text-align: center; }
.post.gone img { filter: grayscale(1); opacity: .45; }
.post .gone-chip { position: absolute; top: 6px; left: 6px; }
.post .n-media { position: absolute; top: 6px; right: 6px; background: rgba(0, 0, 0, .62); color: #fff; border-color: transparent; }
.post .n-media.g { background: #15803d; color: #fff; right: auto; left: 6px; }
.vcard { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.vcard .post { border: 0; border-radius: 0; }
.vcard .meta { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }

/* ---------- states ---------- */
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--muted); padding: 36px 16px; }
.empty .ic { color: var(--dim); }
.skel { display: grid; gap: 12px; }
.skel i { display: block; height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--bg2), var(--line), var(--bg2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.skel i.blk { height: 92px; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }

pre.log { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 14px; max-height: 560px; overflow: auto; margin: 0;
          font: 12px/1.6 var(--mono); white-space: pre-wrap; color: var(--text); }
.toast { position: fixed; right: 20px; bottom: 20px; display: flex; gap: 10px; align-items: flex-start; background: var(--card); color: var(--text);
         border: 1px solid var(--line); border-left: 3px solid var(--good); padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow-lg);
         z-index: 60; max-width: min(440px, calc(100vw - 40px)); animation: toast-in .2s var(--ease); }
.toast.err { border-left-color: var(--bad); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.spark { display: block; }

/* ---------- votes ---------- */
.vote { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.vb { display: inline-grid; place-items: center; width: 32px; height: 30px; background: var(--card); border: 1px solid var(--line2); border-radius: 6px;
      cursor: pointer; color: var(--dim); transition: color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease); }
.vb:hover { color: var(--good); border-color: var(--good); }
.vb.down:hover { color: var(--bad); border-color: var(--bad); }
.vb.on { color: var(--good); background: var(--good-soft); border-color: var(--good); }
.vb.down.on { color: var(--bad); background: var(--bad-soft); border-color: var(--bad); }
.reasons { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.reasons .chip { cursor: pointer; }
.reasons .chip:hover { color: var(--text); border-color: var(--line2); }

/* ---------- graph / misc ---------- */
#cy { width: 100%; height: calc(100vh - 190px); min-height: 520px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.graph-wrap { position: relative; }
.graph-wrap #cy { height: calc(100vh - 230px); }
.gpanel { position: absolute; top: 12px; right: 12px; width: 320px; max-height: calc(100% - 24px); overflow: auto; box-shadow: var(--shadow-lg); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; }
.legend-card .lg { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; padding: 5px 0; color: var(--muted); }
.legend-card .lg b { color: var(--text); }
.legend-card .lg .dot { width: 12px; height: 12px; margin-top: 3px; }
.legend-card .lg-title, .lg-title { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--dim); margin: 2px 0 6px; }
.ln { width: 26px; height: 3px; flex: none; margin-top: 8px; border-radius: 2px; display: inline-block; }
.ln.dash { height: 0; border-top: 2px dashed; background: none; }
.teardown { font-size: 13.5px; line-height: 1.55; }
.teardown ul, .teardown ol { margin: 0; padding-left: 18px; }
.acc-head { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(280px, 340px); gap: 18px; align-items: start; }
.acc-side { display: flex; flex-direction: column; gap: 8px; }
.acc-side .row { justify-content: flex-end; }
@media (max-width: 1100px) { .acc-head { grid-template-columns: auto minmax(0, 1fr); } .acc-side { grid-column: 1 / -1; } .acc-side .row { justify-content: flex-start; } }
@media (max-width: 480px) { .acc-head { grid-template-columns: minmax(0, 1fr); } }
.find-row { display: grid; grid-template-columns: 250px minmax(0, 1fr) 290px; gap: 18px; align-items: start; }
.find-row .teardown { grid-column: 1 / -1; }
@media (max-width: 1100px) { .find-row { grid-template-columns: 220px minmax(0, 1fr); } .find-row > :last-child { grid-column: 1 / -1; } }
@media (max-width: 640px) { .find-row { grid-template-columns: minmax(0, 1fr); } }
.niche h2 { margin: 0; font: 600 16px/1.3 var(--mono); text-transform: capitalize; color: var(--heading); }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); background: var(--accent-soft); color: var(--text); border: 1px solid transparent; }
.callout .ic { color: var(--accent); margin-top: 2px; }
.callout.info { background: var(--primary-soft); }
.callout.info .ic { color: var(--primary); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- responsive: 1024 / 768 / 375 ---------- */
@media (max-width: 1100px) {
  .split, .g3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; transform: translateX(-100%); transition: transform .2s var(--ease); box-shadow: var(--shadow-lg); }
  .layout.menu-open .side { transform: none; }
  .layout.menu-open .scrim { display: block; position: fixed; inset: 0; background: var(--overlay); z-index: 25; }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
  .topbar .brand { padding: 0; }
  .main { padding: 16px 16px 48px; }
  .g2 { grid-template-columns: minmax(0, 1fr); }
  .gpanel { position: static; width: auto; margin-top: 12px; }
}
@media (max-width: 480px) {
  .head h1 { font-size: 19px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .v { font-size: 21px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
