/* Copyright (c) 2026 LB IT Cloud SAS. All rights reserved.
   Proprietary source of the LB IT Cloud website. See LICENSE.

   Lifted out of demo.html, for the same reason as demo.js: what the browser
   executes and renders comes from files this origin served. */

/* ---------------------------------------------------------------
     Palette — the application's own, both themes.
     The app paints its selected states in --brand-2 (indigo-600 in
     stock trim, a client's second colour once branded), so the rail
     and the tabs read that one variable rather than a literal.
     --------------------------------------------------------------- */
  :root {
    --ground:    #070c18;
    --rail:      #0a1122;
    --panel:     #0d1526;
    --card:      #111b30;
    --card-2:    #16223a;
    --line:      #22304e;
    --line-soft: #1a2740;
    --ink:       #e7ecf7;
    --ink-2:     #9fb0cd;
    --ink-3:     #8496b5;
    --brand:     #34527e;
    --brand-2:   #4f5fe0;
    --brand-2-on:#ffffff;
    --accent:    #6f8bf5;
    --ok:        #4ade80;
    --ok-ink:    #6ee7a8;
    --warn:      #f0a132;
    --danger:    #ef5a63;
    --chart-1:   #4f7cf7;
    --chart-2:   #e8912a;
    --chart-3:   #6ecf9a;
    --chart-4:   #a78bfa;
    --chart-5:   #f87171;
    --chart-6:   #38bdf8;
    --shadow:    0 18px 40px rgba(0,0,0,.45);
    --logo-spine:#5d84ba;
    --logo-bars: #eef2f9;
    --pill-bg:   rgba(79,124,247,.14);
    --pill-ink:  #93b0fb;
    --ok-bg:     rgba(74,222,128,.13);
    --danger-bg: rgba(239,90,99,.15);
    --warn-bg:   rgba(240,161,50,.15);
    --row-hover: rgba(79,124,247,.07);
    --row-sel:   #2d47a3;
  }

  html[data-theme="light"] {
    --ground:    #f4f6fb;
    --rail:      #ffffff;
    --panel:     #ffffff;
    --card:      #ffffff;
    --card-2:    #f6f8fc;
    --line:      #e1e7f2;
    --line-soft: #edf1f8;
    --ink:       #101a2e;
    --ink-2:     #56637f;
    --ink-3:     #66738f;
    --brand:     #34527e;
    --brand-2:   #4f46e5;
    --brand-2-on:#ffffff;
    --accent:    #4256cd;
    --ok:        #16a34a;
    --ok-ink:    #15803d;
    --warn:      #b45309;
    --danger:    #dc2626;
    --chart-1:   #4f7cf7;
    --chart-2:   #e8912a;
    --chart-3:   #34b374;
    --chart-4:   #8b5cf6;
    --chart-5:   #ef4444;
    --chart-6:   #0ea5e9;
    --shadow:    0 14px 34px rgba(21,35,71,.13);
    --logo-spine:#34527e;
    --logo-bars: #1d2a44;
    --pill-bg:   #e8eefe;
    --pill-ink:  #2f4fbf;
    --ok-bg:     #e7f7ee;
    --danger-bg: #fdeaea;
    --warn-bg:   #fdf1e0;
    --row-hover: #f2f5fc;
    --row-sel:   #3b52c4;
  }

  * { box-sizing: border-box; }
  html, body { height: 100%; }
  body {
    margin: 0; background: var(--ground); color: var(--ink);
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
    font-size: 13.5px; overflow: hidden;
    /* A column: the site header is a row of the page now, and the console takes what is
       left. Without this the console kept asking for the full viewport height and the
       header pushed its bottom edge off screen. */
    display: flex; flex-direction: column;
  }
  button, input, select { font: inherit; color: inherit; }
  button { cursor: pointer; background: none; border: none; padding: 0; }
  h1, h2, h3, h4, p { margin: 0; }
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
  ::-webkit-scrollbar-track { background: transparent; }

  /* ---------------------------------------------------------------
     Shell: fixed rail + scrolling page, the same geometry as the app
     (256 / 64 px, see SideNav.tsx).
     --------------------------------------------------------------- */
  .app { display: flex; flex: 1; min-height: 0; }

  .rail {
    width: 256px; flex: none; background: var(--rail); border-right: 1px solid var(--line);
    display: flex; flex-direction: column; transition: width .18s ease; overflow: hidden;
  }
  .rail.collapsed { width: 64px; }

  .rail-head { display: flex; align-items: center; gap: 10px; padding: 14px 12px; height: 56px; flex: none; }
  .rail-mark { width: 26px; height: 26px; flex: none; }
  .rail-mark .spine { fill: var(--logo-spine); }
  .rail-mark .bars  { fill: var(--logo-bars); }
  .rail-title { font-weight: 700; font-size: 15px; letter-spacing: .01em; white-space: nowrap; }
  .rail.collapsed .rail-title { display: none; }
  .rail-toggle {
    margin-left: auto; width: 26px; height: 26px; border-radius: 7px; color: var(--ink-3);
    display: flex; align-items: center; justify-content: center; flex: none;
  }
  .rail-toggle:hover { background: var(--card-2); color: var(--ink); }
  .rail.collapsed .rail-toggle { margin-left: 0; }
  .rail.collapsed .rail-head { padding: 14px 0; justify-content: center; }
  .rail.collapsed .rail-head .rail-mark { display: none; }

  .rail-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 6px 8px 54px; } /* 54px: the back-to-deck pill floats over the bottom-left corner */
  .rail.collapsed .rail-scroll { padding: 6px 6px 14px; }

  .nav-item {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px;
    border-radius: 8px; color: var(--ink-2); font-size: 13px; text-align: left;
    white-space: nowrap; margin-bottom: 2px;
  }
  .nav-item:hover { background: var(--card-2); color: var(--ink); }
  .nav-item.sel { background: var(--brand-2); color: var(--brand-2-on); font-weight: 500; }
  .nav-item .ic { width: 16px; height: 16px; flex: none; }
  .nav-item .chev { margin-left: auto; opacity: .65; transition: transform .15s; }
  .nav-item.open .chev { transform: rotate(180deg); }
  .rail.collapsed .nav-item { justify-content: center; padding: 9px 0; }
  .rail.collapsed .nav-item .lbl, .rail.collapsed .nav-item .chev { display: none; }

  .nav-sub { overflow: hidden; }
  .nav-sub .nav-item { padding-left: 36px; font-size: 12.5px; }
  .rail.collapsed .nav-sub { display: none; }
  .nav-sep { height: 1px; background: var(--line); margin: 10px 4px; }

  /* Collapsed rail: a group's items appear in a flyout, as in the product. */
  .flyout {
    position: fixed; z-index: 60; min-width: 210px; background: var(--panel);
    border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px;
  }
  .flyout .fly-head { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--ink-3); padding: 6px 10px 8px; }

  .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

  /* ---------------------------------------------------------------
     Top bar
     --------------------------------------------------------------- */
  .topbar {
    height: 56px; flex: none; display: flex; align-items: center; gap: 12px;
    padding: 0 16px; background: var(--rail); border-bottom: 1px solid var(--line);
  }
  .page-title { font-size: 17px; font-weight: 700; white-space: nowrap; }
  .page-crumb { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
  .demo-badge {
    font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--warn); background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent);
    padding: 3px 8px; border-radius: 999px; white-space: nowrap;
  }
  .spacer { flex: 1; }

  .btn {
    display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 8px;
    border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
    font-size: 12.5px; font-weight: 600; white-space: nowrap;
  }
  .btn:hover { color: var(--ink); border-color: var(--accent); }
  .btn.primary { background: var(--brand-2); border-color: var(--brand-2); color: var(--brand-2-on); }
  .btn.primary:hover { filter: brightness(1.08); color: var(--brand-2-on); }
  .btn.ghost { border-color: transparent; background: transparent; }
  .btn.ghost:hover { background: var(--card-2); }
  .btn.sm { padding: 5px 9px; font-size: 12px; }
  .btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
  .btn[disabled] { opacity: .5; pointer-events: none; }
  .btn .ic { width: 15px; height: 15px; }

  .split { display: inline-flex; }
  .split .btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
  .split .btn:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; padding: 7px 8px; }

  .freshness {
    font-size: 12px; color: var(--ink-2); border: 1px solid var(--line); background: var(--card);
    padding: 6px 11px; border-radius: 8px; white-space: nowrap;
  }
  .icon-btn {
    width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--card);
    display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2);
  }
  .icon-btn:hover { color: var(--ink); border-color: var(--accent); }
  .icon-btn.on { color: var(--brand-2-on); background: var(--brand-2); border-color: var(--brand-2); }

  /* Scan progress — the stripe animation the app uses while a job runs. */
  .scanbar { height: 3px; background: var(--line-soft); flex: none; }
  .scanbar > i { display: block; height: 100%; width: 0; background: var(--brand-2); transition: width .35s linear; }
  .scan-note {
    display: flex; align-items: center; gap: 10px; padding: 8px 18px; font-size: 12.5px;
    color: var(--ink-2); background: var(--panel); border-bottom: 1px solid var(--line);
  }

  .page { flex: 1; overflow-y: auto; padding: 16px 18px 40px; }

  /* ---------------------------------------------------------------
     Panels, KPI cards, charts
     --------------------------------------------------------------- */
  .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; }
  .panel-head {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer;
  }
  .panel-head h3 {
    font-size: 13px; font-weight: 700; color: var(--accent);
    border-bottom: 2px solid var(--accent); padding-bottom: 3px;
  }
  .panel-head .count { font-size: 12px; color: var(--ink-3); }
  .panel-body { padding: 0 14px 14px; }
  .panel.closed .panel-body { display: none; }
  .panel.closed .panel-head .caret { transform: rotate(180deg); }
  .caret { margin-left: auto; color: var(--ink-3); transition: transform .15s; }

  .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
  .kpi {
    background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
    display: flex; flex-direction: column; gap: 8px; position: relative; min-height: 92px;
  }
  .kpi .top { display: flex; align-items: center; gap: 9px; }
  .kpi .n { font-size: 26px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
  .kpi .tag {
    font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
    background: var(--warn-bg); color: var(--warn);
  }
  .kpi .tag.ok { background: var(--ok-bg); color: var(--ok-ink); }
  .kpi .tag.info { background: var(--pill-bg); color: var(--pill-ink); }
  .kpi .lbl { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
  .kpi .ic { width: 16px; height: 16px; color: var(--ink-3); }
  .kpi.clickable { cursor: pointer; }
  .kpi.clickable:hover { border-color: var(--accent); }
  .kpi .kebab { position: absolute; top: 8px; right: 8px; color: var(--ink-3); opacity: 0; }
  .kpi:hover .kebab { opacity: 1; }

  .charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
  .chart {
    background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px;
    display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative;
  }
  .chart .ctitle { font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-align: center; }
  .chart .kebab { position: absolute; top: 8px; right: 8px; color: var(--ink-3); opacity: 0; }
  .chart:hover .kebab { opacity: 1; }
  .legend { display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: center; font-size: 12px; color: var(--ink-2); }
  .legend span.sw { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 6px; }
  .legend b { color: var(--ink); font-variant-numeric: tabular-nums; margin-left: 5px; }
  .hbar-row { display: grid; grid-template-columns: 120px 1fr auto; align-items: center; gap: 8px; font-size: 11.5px; margin-bottom: 5px; }
  .hbar-row .nm { color: var(--ink-2); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hbar-row .tr { background: var(--line-soft); border-radius: 3px; height: 11px; overflow: hidden; }
  .hbar-row .tr > i { display: block; height: 100%; border-radius: 3px; }
  .hbar-row .vl { color: var(--ink-3); font-variant-numeric: tabular-nums; }

  /* ---------------------------------------------------------------
     Filters
     --------------------------------------------------------------- */
  .filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
  .field { display: flex; flex-direction: column; gap: 5px; }
  .field label { font-size: 12px; color: var(--ink-2); }
  .input, select.input {
    background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
    font-size: 12.5px; color: var(--ink); width: 100%; appearance: none;
  }
  select.input {
    background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
    background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px;
    background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 28px;
  }
  .input:focus, select.input:focus { outline: none; border-color: var(--accent); }
  .input::placeholder { color: var(--ink-3); }

  /* ---------------------------------------------------------------
     Tables
     --------------------------------------------------------------- */
  .tbl-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; flex-wrap: wrap; }
  .tbl-head h3 { font-size: 13.5px; font-weight: 700; }
  .chip {
    font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
    background: var(--pill-bg); color: var(--pill-ink);
  }
  .chip.muted { background: var(--card-2); color: var(--ink-2); }
  .chip.ok { background: var(--ok-bg); color: var(--ok-ink); }
  .chip.bad { background: var(--danger-bg); color: var(--danger); }
  .chip.warn { background: var(--warn-bg); color: var(--warn); }
  .tbl-tools { margin-left: auto; display: flex; gap: 6px; }

  .tblwrap { overflow-x: auto; border-top: 1px solid var(--line); }
  table.grid { width: 100%; border-collapse: collapse; font-size: 12.5px; }
  table.grid th {
    text-align: left; font-weight: 600; color: var(--ink-2); padding: 10px 14px;
    border-bottom: 1px solid var(--line); background: var(--card-2); white-space: nowrap;
    position: sticky; top: 0; cursor: pointer; user-select: none;
  }
  table.grid th .sort { color: var(--ink-3); margin-left: 5px; font-size: 10px; }
  table.grid td {
    padding: 9px 14px; border-bottom: 1px solid var(--line-soft); white-space: nowrap;
    max-width: 340px; overflow: hidden; text-overflow: ellipsis;
  }
  table.grid tbody tr { cursor: default; }
  table.grid tbody tr:hover { background: var(--row-hover); }
  table.grid tbody tr.sel { background: var(--row-sel); color: #fff; }
  table.grid tbody tr.sel td { border-bottom-color: transparent; }
  table.grid tbody tr.sel .chip { background: rgba(255,255,255,.16); color: #fff; }
  .val-true { background: var(--ok-bg); color: var(--ok-ink); padding: 2px 8px; border-radius: 5px; font-weight: 600; }
  .val-false { background: var(--danger-bg); color: var(--danger); padding: 2px 8px; border-radius: 5px; font-weight: 600; }
  .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 11.5px; }

  .tbl-foot {
    display: flex; align-items: center; gap: 12px; padding: 10px 14px; font-size: 12px; color: var(--ink-2);
    flex-wrap: wrap;
  }
  .pager { margin-left: auto; display: flex; align-items: center; gap: 6px; }
  .pager .page-of {
    border: 1px solid var(--line); border-radius: 8px; padding: 6px 14px; font-size: 12px; font-weight: 600;
    background: var(--card);
  }

  /* ---------------------------------------------------------------
     Context menu (right-click a row — the Actions entry point)
     --------------------------------------------------------------- */
  .ctx {
    position: fixed; z-index: 70; min-width: 232px; background: var(--panel);
    border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px;
  }
  .ctx button {
    display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 11px; border-radius: 7px;
    font-size: 13px; color: var(--ink); text-align: left;
  }
  .ctx button:hover { background: var(--card-2); }
  .ctx button .ic { width: 16px; height: 16px; color: var(--accent); flex: none; }
  .ctx button .arrow { margin-left: auto; color: var(--ink-3); }
  .ctx .sep { height: 1px; background: var(--line); margin: 5px 6px; }
  .ctx .ctx-head { font-size: 11px; color: var(--ink-3); padding: 6px 11px; }

  /* ---------------------------------------------------------------
     Modals, toasts
     --------------------------------------------------------------- */
  .overlay {
    position: fixed; inset: 0; z-index: 80; background: rgba(4,8,18,.62);
    display: flex; align-items: center; justify-content: center; padding: 30px;
  }
  html[data-theme="light"] .overlay { background: rgba(19,28,53,.38); }
  .modal {
    background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
    width: min(880px, 100%); max-height: 88vh; display: flex; flex-direction: column; overflow: hidden;
  }
  .modal.wide { width: min(1120px, 100%); }
  .modal.narrow { width: min(560px, 100%); }
  .modal-head {
    display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line);
  }
  .modal-head h3 { font-size: 15px; font-weight: 700; }
  .modal-head .ic { width: 18px; height: 18px; color: var(--accent); }
  .modal-body { padding: 16px 18px; overflow-y: auto; }
  .modal-foot {
    display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line);
    background: var(--card-2);
  }
  .modal-foot .note { font-size: 11.5px; color: var(--ink-3); margin-right: auto; max-width: 60%; }

  .acc { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: var(--card); }
  .acc-head { display: flex; align-items: center; gap: 10px; padding: 11px 13px; cursor: pointer; font-size: 13px; }
  .acc-head b { font-weight: 600; }
  .acc-head .n { color: var(--accent); font-weight: 700; }
  .acc-head .sub { color: var(--ink-3); font-size: 12px; }
  .acc-body { padding: 4px 13px 13px; border-top: 1px solid var(--line-soft); }
  .acc.closed .acc-body { display: none; }
  .kv { display: grid; grid-template-columns: 220px 1fr; gap: 6px 16px; font-size: 12.5px; padding-top: 10px; }
  .kv .k { color: var(--ink-2); }
  .kv .v { color: var(--ink); }

  .diff { display: flex; align-items: center; gap: 10px; font-size: 13px; margin: 4px 0; }
  .diff .old { color: var(--danger); text-decoration: line-through; }
  .diff .new { color: var(--ok-ink); font-weight: 600; }

  .toasts { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; flex-direction: column; gap: 9px; }
  .toast {
    background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--ok);
    border-radius: 10px; box-shadow: var(--shadow); padding: 11px 14px; min-width: 290px;
    display: flex; align-items: center; gap: 12px; font-size: 12.5px;
    animation: slidein .2s ease;
  }
  .toast.info { border-left-color: var(--accent); }
  .toast.warn { border-left-color: var(--warn); }
  .toast b { display: block; font-size: 13px; margin-bottom: 2px; }
  .toast .undo { margin-left: auto; color: var(--accent); font-weight: 700; font-size: 12px; }
  @keyframes slidein { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

  /* ---------------------------------------------------------------
     Dashboards
     --------------------------------------------------------------- */
  .dash-tabs { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
  .tab {
    padding: 8px 18px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--ink-2);
  }
  .tab:hover { background: var(--card-2); color: var(--ink); }
  .tab.sel { background: var(--brand-2); color: var(--brand-2-on); }
  .dash-note { font-size: 12.5px; color: var(--ink-2); margin-bottom: 16px; }
  .sect-head { display: flex; align-items: center; gap: 6px; margin: 18px 0 12px; }
  .sect-head h4 {
    font-size: 13.5px; font-weight: 600; color: var(--accent); border-bottom: 2px solid var(--accent);
    padding-bottom: 3px; margin-right: 6px;
  }
  .mini-btn {
    width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-3);
    display: inline-flex; align-items: center; justify-content: center; background: var(--card);
  }
  .mini-btn:hover { color: var(--accent); border-color: var(--accent); }
  .widget-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; }
  .widget {
    background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px;
    position: relative; min-height: 120px;
  }
  .widget h5 { font-size: 13px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
  .widget .kebab { position: absolute; top: 10px; right: 10px; color: var(--ink-3); opacity: 0; }
  .widget:hover .kebab { opacity: 1; }
  .rule-line { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center;
    font-size: 12px; padding: 6px 0; border-left: 3px solid var(--ok); padding-left: 9px; margin-bottom: 3px; }
  .rule-line.bad { border-left-color: var(--danger); }
  .rule-line .pc { font-weight: 700; font-variant-numeric: tabular-nums; }
  .rule-line .cnt { color: var(--ink-3); font-size: 11.5px; }

  /* ---------------------------------------------------------------
     Standards / naming cards
     --------------------------------------------------------------- */
  .cmpl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
  .cmpl {
    background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px;
    display: flex; flex-direction: column; gap: 10px;
  }
  .cmpl h5 { font-size: 13px; font-weight: 700; border-bottom: 1px solid var(--line); padding-bottom: 9px; }
  .cmpl .body { display: flex; align-items: center; justify-content: center; padding: 6px 0; }
  .cmpl .split2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .cmpl .box { border: 1px solid var(--line); border-radius: 8px; padding: 9px; text-align: center; }
  .cmpl .box .k { font-size: 11.5px; color: var(--ink-2); }
  .cmpl .box .v { font-size: 16px; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; }
  .cmpl .box .v.ok { color: var(--ok-ink); }
  .cmpl .box .v.bad { color: var(--danger); }

  .rule-row { border-bottom: 1px solid var(--line-soft); }
  .rule-row .rr {
    display: grid; grid-template-columns: 1fr 250px 130px 30px; gap: 12px; align-items: center;
    padding: 11px 14px; cursor: pointer; font-size: 12.5px;
  }
  .rule-row .rr:hover { background: var(--row-hover); }
  .rule-row .rname { font-weight: 600; }
  .rule-row .stds { display: flex; gap: 5px; flex-wrap: wrap; }
  .std-chip { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 5px; background: var(--card-2); color: var(--ink-2); }
  .rule-detail { padding: 4px 16px 16px; font-size: 12.5px; color: var(--ink-2); background: var(--card-2); }
  .rule-detail b { color: var(--ink); }
  .rule-detail a { color: var(--accent); }
  .rule-detail .lic { background: var(--ok-bg); color: var(--ok-ink); padding: 2px 8px; border-radius: 5px; font-size: 11.5px; }

  .empty { padding: 40px; text-align: center; color: var(--ink-3); font-size: 13px; }

  /* Back-to-deck pill, bottom-left — the way home during a presentation. */

  /* The top bar drops what it cannot afford rather than clipping it — a projector
     is often 1280 wide, and the Run Scan button must survive that. */
  @media (max-width: 1180px) { .page-crumb { display: none; } }
  @media (max-width: 1000px) { .freshness { display: none; } }
  @media (max-width: 860px) { #scanLabel { display: none; } .page-title { font-size: 15px; } }

  @media (max-width: 900px) {
    /* Fixed here, so it has to start below the site header rather than under it. */
    .rail { position: fixed; top: 70px; z-index: 40; height: calc(100% - 70px); }
    .rail:not(.collapsed) { box-shadow: var(--shadow); }
    .main { margin-left: 64px; }
  }
