/* Mizan — calm professional: neutral paper, one blue accent, colour only where it carries meaning.
   Layout: two-column sign-in (quiet brand panel | form) → soft cross-fade → light app shell (white sider, plain header, card grid). */
:root {
  --accent: #3157D5;        /* the single brand colour */
  --accent-hover: #2647B8;
  --accent-soft: #EDF1FD;
  --accent-text: #2A4CC0;
  --g1: #3157D5; --g2: #3157D5;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --sans: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, -apple-system, sans-serif;
  --display: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --ar: "IBM Plex Sans Arabic", "Noto Naskh Arabic", Tahoma, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --header-h: 60px;
  --sider-w: 240px;
  --radius: 10px;

  --bg: #F6F7F9; --surface: #FFFFFF; --surface-2: #F8F9FB; --line: #E4E7EC; --line-2: #D5DAE1;
  --text: #18202C; --text-2: #556070; --text-3: #8A94A3;
  --hover: rgba(24, 32, 44, 0.045); --track: #EEF0F3;
  --shadow: 0 1px 2px rgba(24, 32, 44, 0.04), 0 1px 3px rgba(24, 32, 44, 0.04);
  --shadow-lg: 0 12px 32px -12px rgba(24, 32, 44, 0.18);
  --map-empty: #ECEFF3; --map-line: #FFFFFF;
  --seq-1: #DCE4FB; --seq-2: #B3C4F4; --seq-3: #7E9BEA; --seq-4: #4C72DD; --seq-5: #2647B8;
  --good: #1F7A4D; --good-bg: #E5F4EC; --warn: #8A5A00; --warn-bg: #FBF1DC; --bad: #B4322A; --bad-bg: #FBE8E6; --neutral-bg: #EEF0F3;
  --cat-1: #3157D5; --cat-2: #C27C0E; --cat-3: #1F8A5B; --cat-4: #9AA3AE;
  --focus: rgba(49, 87, 213, 0.22);
  --ink: #18202C;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #6F8FF0; --accent-hover: #87A2F4; --accent-soft: rgba(111, 143, 240, 0.14); --accent-text: #93ABF6; --g1: #6F8FF0; --g2: #6F8FF0;
    --bg: #0F1217; --surface: #161A21; --surface-2: #1B2029; --line: #262C36; --line-2: #333A46;
    --text: #E8ECF2; --text-2: #A3ACB9; --text-3: #737D8B; --hover: rgba(255, 255, 255, 0.05); --track: #232933;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3); --shadow-lg: 0 16px 40px -16px rgba(0, 0, 0, 0.6);
    --map-empty: #1F2530; --map-line: #0F1217;
    --seq-1: #1E2A4D; --seq-2: #26397A; --seq-3: #3653B0; --seq-4: #6F8FF0; --seq-5: #BFCDF9;
    --good: #6CCB97; --good-bg: rgba(108, 203, 151, 0.12); --warn: #E8B85A; --warn-bg: rgba(232, 184, 90, 0.12); --bad: #EF8A80; --bad-bg: rgba(239, 138, 128, 0.12); --neutral-bg: #232933;
    --cat-1: #6F8FF0; --cat-2: #E0A43A; --cat-3: #5CC28E; --cat-4: #6B7482;
    --focus: rgba(111, 143, 240, 0.3); --ink: #0B0D11;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent: #6F8FF0; --accent-hover: #87A2F4; --accent-soft: rgba(111, 143, 240, 0.14); --accent-text: #93ABF6; --g1: #6F8FF0; --g2: #6F8FF0;
  --bg: #0F1217; --surface: #161A21; --surface-2: #1B2029; --line: #262C36; --line-2: #333A46;
  --text: #E8ECF2; --text-2: #A3ACB9; --text-3: #737D8B; --hover: rgba(255, 255, 255, 0.05); --track: #232933;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3); --shadow-lg: 0 16px 40px -16px rgba(0, 0, 0, 0.6);
  --map-empty: #1F2530; --map-line: #0F1217;
  --seq-1: #1E2A4D; --seq-2: #26397A; --seq-3: #3653B0; --seq-4: #6F8FF0; --seq-5: #BFCDF9;
  --good: #6CCB97; --good-bg: rgba(108, 203, 151, 0.12); --warn: #E8B85A; --warn-bg: rgba(232, 184, 90, 0.12); --bad: #EF8A80; --bad-bg: rgba(239, 138, 128, 0.12); --neutral-bg: #232933;
  --cat-1: #6F8FF0; --cat-2: #E0A43A; --cat-3: #5CC28E; --cat-4: #6B7482;
  --focus: rgba(111, 143, 240, 0.3); --ink: #0B0D11;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 2px; }
button { font: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; letter-spacing: -0.01em; font-weight: 600; }
.ar { font-family: var(--ar); direction: rtl; unicode-bidi: plaintext; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.small { font-size: 12.5px; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* logo mark */
.mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff; flex: none; }
.mark svg { width: 62%; height: 62%; overflow: visible; }
.mark .beam { transform-origin: 12px 7px; }
.mark.animated .beam { animation: balance 5s ease-in-out infinite; }
@keyframes balance { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot .mark { width: 52px; height: 52px; border-radius: 13px; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(.94); opacity: .75; } }

/* ======================================================== sign-in */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--surface); transition: opacity .35s var(--ease); }
.login.leaving { opacity: 0; }
.login__art { position: relative; overflow: hidden; padding: 40px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; background: var(--surface-2); border-right: 1px solid var(--line); min-height: 100vh; }
.login__brandrow { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 16px; color: var(--text); }
.login__brandrow small { color: var(--text-3); font-weight: 400; font-size: 14px; }
.login__hero { max-width: 520px; position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; }
.login__headline { font-size: clamp(30px, 3.2vw, 42px); line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.login__ar { font-family: var(--ar); font-size: 18px; color: var(--text-2); }
.login__lead { color: var(--text-2); font-size: 15.5px; line-height: 1.65; margin: 0; max-width: 480px; }
.login__stats { display: flex; gap: 36px; flex-wrap: wrap; margin-top: 10px; padding-top: 20px; border-top: 1px solid var(--line); }
.login__stats b { display: block; font-family: var(--mono); font-size: 22px; font-weight: 500; color: var(--text); }
.login__stats span { font-size: 12.5px; color: var(--text-3); }
.login__map { position: absolute; right: -30px; bottom: -10px; width: min(58%, 500px); pointer-events: none; }
.login__map path { fill: var(--surface); stroke: var(--line-2); stroke-width: 1.2; }
.login__map circle { fill: var(--accent); }
.login__map .halo { fill: var(--accent); opacity: .18; transform-box: fill-box; transform-origin: center; animation: halo 3.6s ease-out infinite; }
@keyframes halo { 0% { transform: scale(.6); opacity: .28; } 100% { transform: scale(2.6); opacity: 0; } }
.login__foot-art { font-size: 12.5px; color: var(--text-3); position: relative; z-index: 1; }
.login__panel { display: flex; flex-direction: column; justify-content: center; align-items: center; padding-block: 48px; padding-inline: clamp(24px, 6vw, 80px); }
.login__form { max-width: 380px; width: 100%; display: flex; flex-direction: column; gap: 18px; }
.login__form h2 { font-size: 24px; }
.login__form p.sub { color: var(--text-2); margin: -10px 0 4px; }
.fade-up { opacity: 0; animation: fadeUp .6s var(--ease) forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--text); }
.input { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 0 12px; background: var(--surface); transition: border-color .2s, box-shadow .2s; min-height: 44px; }
.input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.input svg { color: var(--text-3); flex: none; }
.input input { border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; flex: 1; min-width: 0; height: 42px; }
.input button { all: unset; cursor: pointer; color: var(--text-3); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; }
.input button:hover { color: var(--text); background: var(--hover); }
.form-error { color: var(--bad); background: var(--bad-bg); border-radius: 8px; padding: 8px 12px; font-size: 13px; animation: fadeIn .2s ease; }
.btn-primary { all: unset; box-sizing: border-box; cursor: pointer; background: var(--accent); color: #fff; font-weight: 600; border-radius: var(--radius); min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 10px; transition: background .2s, transform .1s; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-primary[aria-busy="true"] { pointer-events: none; opacity: .85; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login__foot { margin-top: 16px; color: var(--text-3); font-size: 12px; }
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login__art { min-height: auto; padding: 28px 24px; border-right: 0; border-bottom: 1px solid var(--line); }
  .login__map { display: none; }
  .login__stats { gap: 22px; }
}

/* ======================================================== shell */
.shell { display: grid; grid-template-columns: var(--sider-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .3s var(--ease);
  background: linear-gradient(90deg, var(--surface) calc(var(--sider-w) - 1px), var(--line) calc(var(--sider-w) - 1px) var(--sider-w), transparent var(--sider-w)); }
.shell.entering { animation: fadeUp .5s var(--ease) both; }
.shell.collapsed { --sider-w: 68px; }
.sider { background: var(--surface); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow: hidden; z-index: 20; }
.sider__brand { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 0 16px; height: var(--header-h); border-bottom: 1px solid var(--line); flex: none; }
.sider__product { font-weight: 600; font-size: 16px; color: var(--text); line-height: 1.1; }
.sider__tag { color: var(--text-3); font-size: 11.5px; white-space: nowrap; }
.shell.collapsed .sider__text, .shell.collapsed .nav__label, .shell.collapsed .nav__count, .shell.collapsed .nav__group { display: none; }
.nav { flex: 1; overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; }
.nav__group { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); padding: 16px 10px 6px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-weight: 500; white-space: nowrap; transition: background .15s, color .15s; min-height: 38px; }
.nav a svg { flex: none; opacity: .85; }
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a.on { background: var(--accent-soft); color: var(--accent-text); }
.nav a.on svg { opacity: 1; }
.nav__count { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.sider__toggle { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; height: 44px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 13px; }
.sider__toggle:hover { color: var(--text); background: var(--hover); }
.main { min-width: 0; display: flex; flex-direction: column; }
.header { position: sticky; top: 0; z-index: 15; height: var(--header-h); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding-inline: 24px; }
.header__title { min-width: 0; flex: 1; }
.header__title h1 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header__title span { display: block; color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search { position: relative; }
.search input { width: 260px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); padding: 0 12px 0 34px; font: inherit; font-size: 13px; transition: border-color .2s, box-shadow .2s, background .2s; }
.search input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); background: var(--surface); }
.search svg { position: absolute; left: 11px; top: 10px; color: var(--text-3); }
.search__results { position: absolute; right: 0; top: 42px; width: 440px; max-width: 80vw; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 60vh; overflow: auto; padding: 6px; z-index: 30; animation: fadeIn .15s ease; }
.search__results a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--text); }
.search__results a:hover, .search__results a.active { background: var(--hover); }
.icon-btn { all: unset; box-sizing: border-box; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; color: var(--text-2); transition: background .15s, color .15s; flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.sync-pill { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; border-radius: 8px; padding: 0 10px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; height: 36px; transition: background .15s; }
.sync-pill:hover { background: var(--hover); color: var(--text); }
.sync-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.sync-pill.running i { background: var(--cat-2); animation: pulse 1.2s ease-in-out infinite; }
.sync-pill.failed i { background: var(--bad); }
@keyframes pulse { 50% { opacity: .3; } }
.user-chip { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 8px; border-radius: 8px; padding: 0 8px 0 4px; height: 36px; position: relative; transition: background .15s; }
.user-chip:hover { background: var(--hover); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-weight: 600; font-size: 12.5px; }
.role-tag { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--neutral-bg); color: var(--text-2); font-weight: 500; text-transform: capitalize; }
.menu { position: absolute; right: 0; top: 42px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 220px; padding: 6px; z-index: 40; animation: fadeIn .15s ease; }
.menu button, .menu a { all: unset; box-sizing: border-box; display: flex; width: 100%; padding: 8px 12px; border-radius: 8px; cursor: pointer; color: var(--text); font-size: 13px; }
.menu button:hover, .menu a:hover { background: var(--hover); }
.menu .menu__who { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: 12px; color: var(--text-2); }
.content { flex: 1; padding-block: 24px 48px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); min-width: 0; }
.page { max-width: 1480px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.page > * { min-width: 0; }
.page-enter { animation: pageIn .35s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; animation: fadeUp .5s var(--ease) forwards; }
.footer { border-top: 1px solid var(--line); padding: 12px 24px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--text-3); font-size: 12px; }

/* ======================================================== panels & grid */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; box-shadow: var(--shadow); min-width: 0; position: relative; display: flex; flex-direction: column; gap: 12px; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.panel__head h2, .panel h2 { font-size: 15px; }
.panel__head small { color: var(--text-3); font-size: 12px; }
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.g-main-r { grid-template-columns: minmax(0, 1fr) 360px; }
.ribbon { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 12px; box-shadow: var(--shadow); min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.kpi__v { font-family: var(--mono); font-size: 21px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; color: var(--text); }
.kpi.gold .kpi__v { color: var(--accent-text); }
.kpi__l { font-size: 12px; color: var(--text-2); line-height: 1.35; }
.kpi svg.spark { width: 100%; height: 24px; margin-top: 4px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head h2 { font-size: 22px; }
.page-head p { margin: 4px 0 0; color: var(--text-2); max-width: 820px; }
@media (max-width: 1400px) { .ribbon { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1150px) { .g-main, .g-main-r, .g-3 { grid-template-columns: 1fr; } .search input { width: 180px; } }
@media (max-width: 760px) {
  .shell, .shell.collapsed { grid-template-columns: minmax(0, 1fr); background: none; }
  .sider { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; transform: translateX(-105%); transition: transform .3s var(--ease); box-shadow: var(--shadow-lg); }
  .shell.mobile-open .sider { transform: none; }
  .shell.collapsed .sider__text, .shell.collapsed .nav__label, .shell.collapsed .nav__count, .shell.collapsed .nav__group { display: revert; }
  .g-2 { grid-template-columns: 1fr; }
  .ribbon { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header { padding-inline: 12px; gap: 6px; }
  .search, .sync-pill span, .user-chip .uc-name, .user-chip .role-tag { display: none; }
  .content { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-top: 16px; }
}
.mobile-only { display: none; }
@media (max-width: 760px) { .mobile-only { display: grid; } }

/* ======================================================== tables, pills, meters, controls */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); font-weight: 600; background: var(--surface-2); position: sticky; top: 0; white-space: nowrap; z-index: 1; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); }
th.sorted { color: var(--text); }
th.sorted::after { content: " ↓"; }
th.sorted.asc::after { content: " ↑"; }
td.num, th.num { text-align: right; white-space: nowrap; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--surface-2); }
tr.link { cursor: pointer; }
.cell-title { display: flex; flex-direction: column; gap: 3px; min-width: 260px; max-width: 520px; }
.cell-title .en { font-size: 12.5px; color: var(--text-2); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.go { background: var(--good-bg); color: var(--good); }
.pill.jv { background: var(--accent-soft); color: var(--accent-text); }
.pill.sub { background: var(--warn-bg); color: var(--warn); }
.pill.watch, .pill.late, .pill.low { background: var(--neutral-bg); color: var(--text-2); }
.pill.high { background: var(--bad-bg); color: var(--bad); }
.pill.medium { background: var(--warn-bg); color: var(--warn); }
.pill.ai { background: var(--accent-soft); color: var(--accent-text); }
.pill svg { width: 12px; height: 12px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-size: 11.5px; margin: 0 4px 4px 0; }
.tag.core { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.meter { display: flex; align-items: center; gap: 8px; min-width: 96px; }
.meter .track { display: block; flex: 1; height: 5px; background: var(--track); border-radius: 3px; overflow: hidden; }
.meter .fill { display: block; height: 100%; background: var(--accent); border-radius: 3px; transform-origin: left; animation: grow .8s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
.meter b { font-family: var(--mono); font-weight: 500; font-size: 12px; width: 26px; text-align: right; color: var(--text-2); }
.score { font-family: var(--mono); font-weight: 600; font-size: 15px; }
.score-ring { --v: 50; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-weight: 500; font-size: 12.5px; color: var(--text);
  background: radial-gradient(closest-side, var(--surface) 80%, transparent 81% 100%), conic-gradient(var(--accent) calc(var(--v) * 1%), var(--track) 0); flex: none; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters input[type=search], .filters select, .text-input { font: inherit; font-size: 13px; height: 36px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--text); min-width: 0; transition: border-color .2s, box-shadow .2s; }
.filters input[type=search]:focus, .filters select:focus, .text-input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.filters input[type=search] { width: 280px; max-width: 100%; }
.check-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.check-inline input, ul.check input { accent-color: var(--accent); }
.btn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--text); font-size: 13px; font-weight: 500; background: var(--surface); transition: background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { background: var(--surface-2); border-color: var(--text-3); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.gold { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.btn.gold:hover { border-color: var(--accent); }
.btn.danger { color: var(--bad); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: var(--surface-2); gap: 2px; }
.seg button { all: unset; cursor: pointer; font-size: 12.5px; padding: 5px 11px; border-radius: 6px; color: var(--text-2); transition: background .2s, color .2s, box-shadow .2s; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); font-weight: 500; }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; font-size: 12px; color: var(--text-2); }

/* ======================================================== charts & map */
.chart { width: 100%; display: block; overflow: visible; }
.chart text { fill: var(--text-3); font-family: var(--sans); font-size: 11px; }
.chart .grid line { stroke: var(--line); }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .dot { transition: opacity .2s; cursor: pointer; stroke: var(--surface); stroke-width: 1.5; }
.chart .dot:hover { opacity: 1 !important; }
.chart .draw { stroke-dasharray: 2400; stroke-dashoffset: 2400; animation: draw 1.4s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .pop { transform-box: fill-box; transform-origin: 50% 100%; animation: pop .7s var(--ease) both; }
@keyframes pop { from { transform: scaleY(0); } }
.chart .fadein { animation: fadeIn .6s ease both; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(110px, 200px) minmax(0, 1fr) 70px; gap: 10px; align-items: center; font-size: 13px; }
.hbar .lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.hbar .track { height: 8px; position: relative; background: var(--track); border-radius: 4px; }
.hbar .b { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 4px; min-width: 2px; transform-origin: left; animation: grow .8s var(--ease) both; }
.hbar .val { font-family: var(--mono); font-size: 12px; text-align: right; color: var(--text-2); }
.tooltip { position: fixed; pointer-events: none; background: var(--ink); color: #fff; padding: 7px 10px; border-radius: 8px; font-size: 12px; z-index: 5000; box-shadow: var(--shadow-lg); max-width: 320px; line-height: 1.45; }
.map-wrap { position: relative; min-height: 0; }
.map svg { width: 100%; height: auto; display: block; max-height: 640px; }
.map .prov { stroke: var(--map-line); stroke-width: 1.4; cursor: pointer; transition: fill .4s ease, opacity .2s; }
.map .prov:hover { opacity: .82; }
.map .prov.sel { stroke: var(--text); stroke-width: 2.2; }
.map .prov-label { font-size: 15px; fill: var(--text); pointer-events: none; font-weight: 500; paint-order: stroke; stroke: var(--surface); stroke-width: 3.5px; stroke-linejoin: round; }
.map .city { fill: var(--text); stroke: var(--surface); stroke-width: 1.5; pointer-events: none; opacity: .7; }
.map .city-ring, .map .flow { display: none; }
.map-legend { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-3); flex-wrap: wrap; }
.map-legend .ramp { height: 6px; width: 120px; border-radius: 3px; background: linear-gradient(90deg, var(--seq-1), var(--seq-2), var(--seq-3), var(--seq-4), var(--seq-5)); }
.list { display: flex; flex-direction: column; }
.list a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); border-radius: 8px; transition: background .15s; }
.list a:hover { background: var(--surface-2); }
.list a:last-child { border-bottom: 0; }
.countdown { font-family: var(--mono); font-size: 12px; text-align: right; color: var(--text-2); white-space: nowrap; }
.countdown.hot { color: var(--bad); }
.scroll { overflow: auto; min-height: 0; }
.treemap { position: relative; width: 100%; height: 320px; }
.treemap div { position: absolute; border: 2px solid var(--surface); border-radius: 8px; padding: 7px 9px; overflow: hidden; color: #fff; font-size: 12px; line-height: 1.3; cursor: pointer; transition: filter .2s; animation: fadeIn .6s ease both; }
.treemap div:hover { filter: brightness(1.08); }
.treemap b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.treemap span { font-family: var(--mono); font-size: 11px; opacity: .9; }

/* ======================================================== report */
.report-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: start; }
.report-title { font-size: 1.5rem; font-weight: 600; line-height: 1.5; }
.scorecard { display: grid; grid-template-columns: repeat(3, minmax(96px, auto)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.scorecard div { background: var(--surface); padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.scorecard .v { font-family: var(--mono); font-size: 1.25rem; }
.scorecard .big { grid-column: span 3; background: var(--accent-soft); flex-direction: row; justify-content: space-between; align-items: center; }
.scorecard .big .v { font-size: 1.9rem; color: var(--accent-text); }
dl.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 0; }
dl.facts dt { color: var(--text-3); font-size: 12.5px; padding-top: 1px; }
dl.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.prose p { margin: 0 0 10px; max-width: 78ch; }
.prose ul, .prose ol { margin: 0 0 10px; padding-left: 20px; max-width: 78ch; }
.prose li { margin-bottom: 5px; }
.analyst { border-left: 2px solid var(--accent); padding: 2px 0 2px 16px; display: flex; flex-direction: column; gap: 10px; }
.analyst p { margin: 0; max-width: 78ch; }
.analyst ul { margin: 0; padding-left: 18px; }
ul.check { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
ul.check li { display: grid; grid-template-columns: 18px 96px minmax(0, 1fr); gap: 8px; align-items: start; }
ul.check input { margin-top: 3px; }
ul.check .g { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); padding-top: 3px; }
.gantt { display: flex; flex-direction: column; gap: 10px; }
.gantt .row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px; align-items: center; }
.gantt .bar-track { position: relative; height: 14px; background: var(--track); border-radius: 4px; }
.gantt .bar { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 4px; min-width: 4px; transform-origin: left; animation: grow .8s var(--ease) both; }
.gantt .detail { grid-column: 2; font-size: 12.5px; color: var(--text-2); margin-top: -4px; }
.risk { display: flex; gap: 10px; align-items: flex-start; }
.risk p { margin: 0; }
.clause { display: flex; flex-direction: column; gap: 6px; }
.clause blockquote { margin: 0; padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; line-height: 1.85; }
details.doc { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
details.doc summary { padding: 10px 14px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
details.doc pre { margin: 0; padding: 14px; border-top: 1px solid var(--line); white-space: pre-wrap; font-family: var(--ar); direction: rtl; font-size: 13.5px; line-height: 1.9; max-height: 520px; overflow: auto; }
.money { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.money div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.money .v { font-family: var(--mono); font-size: 1.05rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.step { background: var(--surface-2); border: 1px solid var(--line); padding: 14px; border-radius: 10px; display: flex; flex-direction: column; gap: 8px; }
.step ul { margin: 0; padding-left: 18px; font-size: 13px; }
.callout { background: var(--accent-soft); border-radius: 10px; padding: 14px 16px; }
pre.code { background: var(--surface-2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 12px 14px; font-family: var(--mono); font-size: 12px; overflow-x: auto; margin: 0; white-space: pre; }
.log { background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); border-radius: 8px; padding: 10px 12px; font-family: var(--mono); font-size: 11.5px; height: 300px; overflow: auto; white-space: pre-wrap; margin: 0; }
.stepper { display: flex; flex-direction: column; gap: 8px; }
.stepper div { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.stepper i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; border: 2px solid var(--line-2); color: var(--text-3); flex: none; }
.stepper .done i { background: var(--good); border-color: var(--good); color: #fff; }
.stepper .running i { border-color: var(--accent); border-top-color: transparent; animation: spin .9s linear infinite; }
.stepper .failed i { background: var(--bad); border-color: var(--bad); color: #fff; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 6000; box-shadow: var(--shadow-lg); animation: fadeIn .25s ease; font-size: 13px; }
.modal-back { position: fixed; inset: 0; background: rgba(15, 18, 23, 0.4); z-index: 4000; display: grid; place-items: center; padding: 16px; animation: fadeIn .2s; }
.modal { background: var(--surface); border-radius: 14px; padding: 22px; width: min(460px, 100%); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 14px; animation: fadeUp .25s var(--ease); }
.secret { font-family: var(--mono); font-size: 12px; background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 8px; padding: 10px; word-break: break-all; }
@media (max-width: 760px) {
  .report-head { grid-template-columns: 1fr; }
  .hbar { grid-template-columns: minmax(80px, 120px) minmax(0, 1fr) 56px; }
  .gantt .row { grid-template-columns: 110px minmax(0, 1fr); }
  ul.check li { grid-template-columns: 18px minmax(0, 1fr); }
  ul.check .g { display: none; }
  .treemap { height: 260px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .reveal, .fade-up { opacity: 1 !important; } }

/* ======================================================== colour layer: brand gradient + validated categorical palette */
:root {
  --brand-grad: linear-gradient(135deg, #3157D5 0%, #6A4FE0 55%, #8E5CF0 100%);
  --brand-grad-h: linear-gradient(90deg, #3157D5, #7C5CFC);
  --c1: #2a78d6; --c2: #eb6834; --c3: #1baf7a; --c4: #eda100; --c5: #e87ba4; --c6: #008300; --c7: #6250d6; --c8: #e34948;
  --tint-1: rgba(42, 120, 214, .12); --tint-2: rgba(235, 104, 52, .12); --tint-3: rgba(27, 175, 122, .13); --tint-4: rgba(237, 161, 0, .14);
  --tint-5: rgba(232, 123, 164, .15); --tint-6: rgba(0, 131, 0, .11); --tint-7: rgba(98, 80, 214, .13); --tint-8: rgba(227, 73, 72, .12);
  --zoom: 1;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c4: #c98500; --c5: #d55181; --c6: #2e9a2e; --c7: #9085e9; --c8: #e66767; } }
:root[data-theme="dark"] { --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c4: #c98500; --c5: #d55181; --c6: #2e9a2e; --c7: #9085e9; --c8: #e66767; }

/* 80% density on desktop (the user's preferred zoom); phones and tablets stay at 100% */
@media (min-width: 1100px) {
  :root { --zoom: 0.8; }
  html { zoom: 0.8; }
  .login, .login__art, .shell, .boot { min-height: calc(100vh / var(--zoom)); }
  .sider { height: calc(100vh / var(--zoom)); }
}

.mark { background: var(--brand-grad); box-shadow: 0 4px 14px -6px rgba(78, 80, 220, .55); }
.btn-primary, .btn.primary { background: var(--brand-grad); border-color: transparent; }
.btn-primary:hover, .btn.primary:hover { background: var(--brand-grad); filter: brightness(1.08); }
.header { box-shadow: inset 0 -1px 0 var(--line); border-bottom: 0; }
.header::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--brand-grad-h); opacity: .9; }
.nav a.on { background: linear-gradient(90deg, var(--accent-soft), transparent 140%); color: var(--accent-text); box-shadow: inset 3px 0 0 #6A4FE0; }
.nav a:nth-of-type(7n+1) svg { color: var(--c1); } .nav a:nth-of-type(7n+2) svg { color: var(--c7); } .nav a:nth-of-type(7n+3) svg { color: var(--c3); }
.nav a:nth-of-type(7n+4) svg { color: var(--c2); } .nav a:nth-of-type(7n+5) svg { color: var(--c5); } .nav a:nth-of-type(7n+6) svg { color: var(--c4); } .nav a:nth-of-type(7n) svg { color: var(--c8); }
.score-ring { background: radial-gradient(closest-side, var(--surface) 80%, transparent 81% 100%), conic-gradient(#3157D5 0, #8E5CF0 calc(var(--v) * 1%), var(--track) 0); }
.meter .fill, .hbar .b, .gantt .bar { background: var(--brand-grad-h); }
.avatar { background: var(--brand-grad); color: #fff; }
.role-tag { background: var(--tint-7); color: var(--c7); }
.kpi { position: relative; overflow: hidden; }
.kpi__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi__icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.kpi__icon svg { width: 16px; height: 16px; }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--kpi-tint, transparent); filter: blur(4px); pointer-events: none; }
.kpi.gold .kpi__v { color: var(--text); }
.panel__head h2 { display: flex; align-items: center; gap: 9px; }
.panel__head h2 .dot { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.content { background: radial-gradient(50% 40% at 100% 0%, rgba(124, 92, 252, .06), transparent 70%), radial-gradient(40% 35% at 0% 100%, rgba(42, 120, 214, .05), transparent 70%); }
.treemap div { border-radius: 10px; }
.tag.core { background: var(--tint-7); color: var(--c7); }

/* ======================================================== sign-in: drifting colour panel */
.login__art { background: #1B2363; color: #fff; border-right: 0; isolation: isolate; }
.login__art::before, .login__art::after, .aurora { content: ""; position: absolute; border-radius: 50%; filter: blur(60px); opacity: .75; z-index: -1; pointer-events: none; }
.login__art::before { width: 60%; height: 60%; left: -10%; top: -10%; background: #3D63F0; animation: driftA 18s ease-in-out infinite alternate; }
.login__art::after { width: 55%; height: 55%; right: -12%; top: 25%; background: #8E5CF0; animation: driftB 22s ease-in-out infinite alternate; }
.aurora { width: 50%; height: 50%; left: 15%; bottom: -18%; background: #18B49A; opacity: .55; animation: driftC 26s ease-in-out infinite alternate; }
@keyframes driftA { to { transform: translate(18%, 22%) scale(1.15); } }
@keyframes driftB { to { transform: translate(-22%, -12%) scale(.9); } }
@keyframes driftC { to { transform: translate(28%, -18%) scale(1.2); } }
.login__brandrow, .login__headline { color: #fff; }
.login__brandrow small, .login__ar, .login__lead, .login__foot-art, .login__stats span { color: rgba(255, 255, 255, .78); }
.login__stats { border-top-color: rgba(255, 255, 255, .2); }
.login__stats b { color: #fff; }
.login__art .mark { background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); backdrop-filter: blur(6px); }
.login__map path { fill: rgba(255, 255, 255, .06); stroke: rgba(255, 255, 255, .28); }
.login__map circle { fill: #FFD36B; }
.login__map .halo { fill: #FFD36B; }
.login__chips { display: flex; gap: 8px; flex-wrap: wrap; }
.login__chips span { font-size: 12px; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); color: #fff; backdrop-filter: blur(6px); }

/* ======================================================== sign-in hand-off: the colour panel flows over the screen */
.handoff { position: fixed; inset: 0; z-index: 3000; background: #1B2363; overflow: hidden; isolation: isolate;
  clip-path: var(--clip-start, inset(0 50% 0 0)); animation: flowOver .8s cubic-bezier(.65, 0, .35, 1) forwards; }
.handoff .aurora, .handoff .blob { position: absolute; border-radius: 50%; filter: blur(70px); z-index: -1; }
.handoff .blob.a { width: 60vw; height: 60vw; left: -10vw; top: -20vw; background: #3D63F0; opacity: .8; animation: driftA 6s ease-in-out infinite alternate; }
.handoff .blob.b { width: 55vw; height: 55vw; right: -15vw; bottom: -20vw; background: #8E5CF0; opacity: .8; animation: driftB 7s ease-in-out infinite alternate; }
.handoff .blob.c { width: 40vw; height: 40vw; left: 30vw; top: 30vh; background: #18B49A; opacity: .5; animation: driftC 8s ease-in-out infinite alternate; }
@keyframes flowOver { from { clip-path: var(--clip-start, inset(0 50% 0 0)); } to { clip-path: inset(0 0 0 0); } }
.handoff__center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 16px; color: #fff; }
.handoff__center .mark { width: 76px; height: 76px; border-radius: 20px; background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3), 0 20px 50px -20px rgba(0, 0, 0, .5); animation: markIn .9s cubic-bezier(.2, .9, .3, 1.2) .15s both; position: relative; }
.handoff__center .mark::before, .handoff__center .mark::after { content: ""; position: absolute; inset: -2px; border-radius: 22px; border: 2px solid rgba(255, 211, 107, .7); animation: ringOut 1.6s ease-out .5s infinite; }
.handoff__center .mark::after { animation-delay: 1.1s; border-color: rgba(255, 255, 255, .5); }
.handoff__center b { font-size: 20px; font-weight: 600; letter-spacing: .01em; animation: fadeUp .6s var(--ease) .45s both; }
.handoff__center span { font-size: 13px; color: rgba(255, 255, 255, .75); animation: fadeUp .6s var(--ease) .6s both; }
@keyframes markIn { from { opacity: 0; transform: scale(.4) rotate(-20deg); } to { opacity: 1; transform: none; } }
@keyframes ringOut { from { transform: scale(1); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }
.handoff.leaving { clip-path: inset(0 0 0 0); animation: handoffOut .7s ease forwards; }
@keyframes handoffOut { to { opacity: 0; transform: scale(1.04); } }
.shell.entering .page > * { animation: cardIn .7s var(--ease) both; }
.shell.entering .page > *:nth-child(2) { animation-delay: .08s; } .shell.entering .page > *:nth-child(3) { animation-delay: .16s; }
.shell.entering .page > *:nth-child(4) { animation-delay: .24s; } .shell.entering .page > *:nth-child(n+5) { animation-delay: .32s; }
.shell.entering .sider { animation: siderIn .7s var(--ease) both; }
@keyframes siderIn { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

/* scoring page */
.slider-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 64px; gap: 12px; align-items: center; font-size: 13px; }
.slider-row input[type=range] { width: 100%; accent-color: #6A4FE0; }
.slider-row output { font-family: var(--mono); font-size: 12.5px; text-align: right; color: var(--text-2); }
.share-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--track); }
.share-bar span { height: 100%; transition: width .3s var(--ease); }
.thresholds { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.thresholds label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.preview-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.preview-counts div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); }
.preview-counts b { display: block; font-family: var(--mono); font-size: 20px; font-weight: 500; }
.preview-counts small { color: var(--text-3); }
@media (max-width: 760px) { .slider-row { grid-template-columns: 1fr 52px; } .slider-row label { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .handoff { clip-path: none; } }
.slider-row input[type=range] { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--fill, var(--accent)) var(--p, 50%), var(--track) var(--p, 50%)); outline-offset: 4px; }
.slider-row input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 3px solid var(--fill, var(--accent)); box-shadow: 0 1px 4px rgba(0, 0, 0, .2); cursor: pointer; transition: transform .15s; }
.slider-row input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.12); }
.slider-row input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--fill, var(--accent)); cursor: pointer; }
.slider-row input[type=range]:disabled { opacity: .6; }
