/* I-BRICK Atlas theme – v3.0 enterprise foundation.
   Built on the Phase 2A dark theme. All existing component styles preserved;
   shell organised around one responsive top navigation. */
:root {
  --bg:#0D1A28; --bg2:#12212f; --panel:#16283a; --panel2:#1c2b3c;
  --border:#243247; --text:#E4EFF5; --muted:#9aa5ad;
  /* --dim was #6b7785 (3.29:1 on --panel) and --red #e74c3c (3.93:1) - both
     below the WCAG AA 4.5:1 floor for normal text, and both carry a lot of it:
     --dim backs every note/caption/meta line, --red every critical finding.
     Retuned to the same hues at AA-passing luminance. The translucent fills
     that pair with them (rgba(231,76,60,.15) and friends) are literal rgba in
     the component rules, so backgrounds are unchanged. */
  --dim:#8b98a6; --red:#ff6b5b;
  --cyan:#00C8DC; --blue:#3498db; --green:#2ecc71; --amber:#f39c12;
  --brick:#C4531A;
  /* Inter was named here but never loaded, so the whole product fell through
     to plain system-ui. Use the platform UI face deliberately instead, and turn
     on the OpenType features that matter for a dashboard: tabular figures so
     columns of numbers align and do not jitter as they refresh, and contextual
     alternates. */
  font-family:system-ui,-apple-system,'Segoe UI Variable Text','Segoe UI',
              Roboto,'Helvetica Neue',Arial,sans-serif;
  font-feature-settings:'cv05' 1,'ss01' 1;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  /* Tells the browser to render native controls - select popups, checkboxes,
     scrollbars, focus rings - with the dark palette. Without it the OS drew
     them light-on-dark, which is what read as "unstyled native inputs". */
  color-scheme:dark;
  accent-color:var(--cyan);

  /* ── Motion ──
     One scale, used everywhere, so the interface moves at a consistent speed
     instead of each component picking its own .15s/.2s/.4s. Durations are
     deliberately short: this is an operations dashboard people use all day, and
     motion that reads as "premium" once reads as latency by the fiftieth time.
     --ease-out is a decelerating curve (fast start, soft landing) - the right
     feel for something arriving; --ease is symmetric, for state changes. */
  --dur-fast:110ms;
  --dur:170ms;
  --dur-slow:260ms;
  --dur-draw:650ms;
  --ease:cubic-bezier(.4,0,.2,1);
  --ease-out:cubic-bezier(.16,1,.3,1);

  /* ── Type ──
     One scale, whole pixels only. Before this the stylesheet carried 28
     distinct font sizes, six of them on half-pixels: 9.5, 10.5, 11.5, 12.5,
     13.5 and 14.5. Nothing chose them, they accumulated, and the half-steps
     are most of what read as unfinished - a caption at 11.5 beside a caption
     at 11 is not a decision anyone made, it is two components that never met.

     The steps are close together at the bottom on purpose. This is a dense
     operations dashboard: the difference between a meta line and a caption is
     genuinely one pixel, and a airier scale would cost rows on every table.
     The gaps widen above body size, where the job changes from fitting text
     to ranking it.

     Named by role, not by size, so a rule says what it is rather than
     restating its value: --fs-micro is the uppercase eyebrow over a tile,
     --fs-body is prose, --fs-stat is a number meant to be read across a
     room.

     Nothing is set below 11px, and captions are 12px. At 10 and 11 the table
     headers, eyebrows and captions were the hardest text in the product to
     read, and captions are much of what a page says (D-079). */
  --fs-micro:11px;     /* uppercase table headers and eyebrows, axis ends */
  --fs-caption:12px;   /* captions, meta, sub-lines under a value */
  --fs-small:12px;     /* secondary prose, chips, dense rows */
  --fs-body:13px;      /* default reading size */
  --fs-lead:14px;      /* section headings, the sentence that carries a card */
  --fs-title:16px;     /* the one heading inside a card */
  --fs-stat-sm:18px;   /* a value in a small tile */
  --fs-stat:24px;      /* a value in a KPI card */
  --fs-stat-lg:30px;   /* the headline number on a page */

  /* Line height by job, not by component. Tight for numbers that must not
     drift apart, loose for the dense meta lines that need air to stay
     scannable. */
  --lh-none:1;
  --lh-tight:1.2;
  --lh-snug:1.45;
  --lh-body:1.55;
  --lh-loose:1.7;

  --fw-regular:400;
  --fw-medium:500;
  --fw-semibold:600;
  --fw-bold:700;

  /* Tracking. Uppercase micro-text needs opening up or it sets as a block;
     large numerals need closing up or they read as separate figures. Both
     were being hand-picked per rule at .7/1/2.2px and -.2/-.3/-.4/-.6px. */
  --ls-caps:.7px;
  --ls-caps-wide:1px;
  --ls-tight:-.3px;
  --ls-tighter:-.6px;

  /* ── Corners ──
     One scale, because the stylesheet had eleven radii between 5px and 20px
     and no two components agreed. Sizes are the shapes this product has: a
     chip or a swatch (xs), a control or a small tile (sm), a card (md), a
     hero or a modal (lg), and anything that should read as a pill. */
  --r-xs:6px;
  --r-sm:9px;
  --r-md:12px;
  --r-lg:16px;
  --r-pill:999px;
}
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--text); }
.ib-boot,.ib-state { padding:40px; text-align:center; color:var(--muted); }
/* States carry a leading icon; keep it centred with the message. */
.ib-state { display:flex; align-items:center; justify-content:center; gap:8px; }

/* ── Icons ── */
.ib-icon { display:inline-block; vertical-align:-2px; flex-shrink:0; }

/* ── Brand ──
   The lockup follows docs/assets/ibrick_logo_updated.html: cube mark, "I-BRICK"
   wordmark with the separator as a lighter-weight Circuit-cyan em dash, and an
   optional tagline. The wordmark sits in the sidebar's fixed 244px column, so
   it no longer competes with navigation for space; at rail width the wordmark
   drops and the cube stands alone, which is the brand sheet's icon variant. */
.ib-logo { display:inline-flex; align-items:center; gap:14px; min-width:0; }
.ib-logo-mark { flex-shrink:0; display:block; }
.ib-logo-texts { display:flex; flex-direction:column; gap:5px; min-width:0; }
.ib-logo-tag { font-size:8.5px; font-weight:500; letter-spacing:2.2px;
  text-transform:uppercase; color:var(--muted); }

.ib-brand { display:flex; flex-direction:column; gap:3px; flex-shrink:0; min-width:0; }
.ib-wordmark { font-weight:700; letter-spacing:.5px; font-size:17px; line-height:1;
  color:var(--text); white-space:nowrap; }
/* Lighter weight + no tracking, exactly as the brand sheet specifies. */
.ib-wm-dash { color:var(--cyan); font-weight:400; letter-spacing:0; }
.ib-brand-atlas { font-size:9px; font-weight:700; letter-spacing:2.6px; color:var(--cyan);
  white-space:nowrap; }

/* ── Login ── */
.ib-login { min-height:100vh; display:grid; place-items:center;
  background:radial-gradient(1200px 600px at 50% -10%, #16324a 0%, var(--bg) 60%); }
.ib-login-card { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-lg);
  padding:34px 32px; width:392px; max-width:92vw; box-shadow:0 20px 60px rgba(0,0,0,.4); }
/* The login lockup is the one place the full brand runs at size, tagline and
   all, so the wordmark steps up from its 17px sidebar setting. */
.ib-login-card .ib-wordmark { font-size:30px; letter-spacing:.5px; }
.ib-login-sub { color:var(--muted); font-size:13px; margin:20px 0 22px; }
.ib-login form { display:flex; flex-direction:column; gap:12px; }
.ib-login input { background:var(--bg2); border:1px solid var(--border); border-radius:var(--r-sm);
  padding:11px 13px; color:var(--text); font-size:14px; }
.ib-login input:focus { outline:none; border-color:var(--cyan); }
.ib-login-err { color:var(--red); font-size:13px; }
.ib-login .ib-btn-primary { width:100%; }

/* ── Application shell ────────────────────────────────────────────────────
   Sidebar owns navigation; the header owns context and identity. The header
   used to carry eleven responsibilities in one row and its nav overflowed by
   176px at Super Admin width - with navigation moved out, the header has four
   children and cannot overflow regardless of role or viewport. */
.ib-shell { min-height:100vh; display:flex; }
.ib-shell-main { flex:1; min-width:0; display:flex; flex-direction:column; }

/* ── Sidebar ── */
/* Sized with the flex shorthand, not `width`: as a flex item the used main size
   comes from flex-basis, and a bare `width` was being ignored here - the rail
   state hid its labels but the column stayed 244px wide. */
.ib-sidebar { flex:0 0 244px; width:244px; display:flex; flex-direction:column;
  background:#0A1521; border-right:1px solid var(--border);
  position:sticky; top:0; height:100vh; z-index:30;
  transition:flex-basis var(--dur) var(--ease), width var(--dur) var(--ease); }
.ib-sidebar-brand { display:flex; align-items:center; gap:10px; height:60px; padding:0 18px;
  flex-shrink:0; text-decoration:none; border-bottom:1px solid var(--border); }
.ib-sidebar-nav { flex:1; min-height:0; overflow-y:auto; padding:14px 12px; }
.ib-navgroup + .ib-navgroup { margin-top:18px; }
.ib-navgroup-label { font-size:var(--fs-micro); font-weight:700; text-transform:uppercase;
  letter-spacing:.9px; color:var(--dim); padding:0 10px; margin-bottom:6px; white-space:nowrap; }
.ib-navitem { display:flex; align-items:center; gap:11px; padding:8px 10px; border-radius:var(--r-sm);
  color:var(--muted); text-decoration:none; font-size:var(--fs-body); font-weight:500;
  white-space:nowrap; position:relative; transition:background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.ib-navitem .ib-icon { flex-shrink:0; }
.ib-navitem:hover { color:var(--text); background:rgba(255,255,255,.05); }
.ib-navitem.active { color:var(--cyan); background:rgba(0,200,220,.1); font-weight:600; }
/* Active marker is a left bar, the convention every sidebar product uses; the
   old nav used an inset bottom shadow, which reads as an underline in a row. */
.ib-navitem.active::before { content:""; position:absolute; left:-12px; top:6px; bottom:6px;
  width:3px; border-radius:0 3px 3px 0; background:var(--cyan); }
.ib-sidebar-foot { flex-shrink:0; padding:10px 12px; border-top:1px solid var(--border); }
.ib-railtoggle { display:flex; align-items:center; gap:11px; width:100%; padding:8px 10px;
  border:0; border-radius:var(--r-sm); background:transparent; color:var(--dim); cursor:pointer;
  font:inherit; font-size:var(--fs-small); font-weight:500; white-space:nowrap; }
.ib-railtoggle:hover { color:var(--text); background:rgba(255,255,255,.05); }

/* Rail: icons only. Labels are hidden rather than removed so the accessible
   name survives, and every item keeps its title attribute as a tooltip. */
.ib-shell.is-rail .ib-sidebar { flex-basis:64px; width:64px; }
.ib-shell.is-rail .ib-brand,
.ib-shell.is-rail .ib-navgroup-label,
.ib-shell.is-rail .ib-navitem span,
.ib-shell.is-rail .ib-railtoggle span { display:none; }
/* The cube stays - on its own it is the brand sheet's icon variant. */
.ib-shell.is-rail .ib-sidebar-brand { justify-content:center; padding:0; }
.ib-shell.is-rail .ib-navitem,
.ib-shell.is-rail .ib-railtoggle { justify-content:center; padding:9px 0; }
.ib-shell.is-rail .ib-navgroup + .ib-navgroup { margin-top:10px; padding-top:10px;
  border-top:1px solid var(--border); }
.ib-shell.is-rail .ib-railtoggle .ib-icon { transform:rotate(180deg); }

.ib-scrim { display:none; }

/* ── Header ── */
.ib-header { min-height:60px; display:flex; align-items:center; gap:14px; padding:0 22px;
  background:var(--bg); border-bottom:1px solid var(--border);
  position:sticky; top:0; z-index:20; }
.ib-header-utils { margin-left:auto; display:flex; align-items:center; gap:10px; flex-shrink:0; }
.ib-icon-button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:34px;
  border:1px solid var(--border); border-radius:var(--r-sm); padding:6px 9px; background:transparent;
  color:var(--muted); cursor:pointer; font:inherit; font-size:var(--fs-small); font-weight:var(--fw-semibold); }
.ib-icon-button:hover { color:var(--text); background:rgba(255,255,255,.06); }

/* Search reads as a field rather than a button: it is the primary way into the
   command palette, and a bare icon under-advertises it. */
.ib-searchfield { display:flex; align-items:center; gap:9px; flex:1 1 auto; max-width:380px;
  min-width:0; height:36px; padding:0 10px; border:1px solid var(--border); border-radius:var(--r-sm);
  background:var(--bg2); color:var(--dim); cursor:pointer; font:inherit; font-size:13px;
  text-align:left; transition:border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); }
.ib-searchfield:hover { border-color:rgba(0,200,220,.4); background:var(--panel); color:var(--muted); }
.ib-searchfield-t { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ib-kbd { flex-shrink:0; font-family:inherit; font-size:var(--fs-micro); font-weight:600; color:var(--dim);
  background:rgba(255,255,255,.05); border:1px solid var(--border); border-radius:var(--r-xs);
  padding:2px 6px; white-space:nowrap; }

.ib-nav-menu { position:relative; }
.ib-nav-menu summary { display:flex; align-items:center; gap:6px; min-height:34px; padding:6px 8px;
  border-radius:var(--r-sm); color:var(--muted); cursor:pointer; list-style:none; font-size:var(--fs-small); font-weight:600; }
.ib-nav-menu summary::-webkit-details-marker { display:none; }
.ib-nav-menu summary:hover,.ib-nav-menu[open] summary { color:var(--text); background:rgba(255,255,255,.06); }
.ib-nav-menu[open] summary .ib-icon:last-child { transform:rotate(180deg); }
.ib-nav-popover { position:absolute; right:0; top:calc(100% + 8px); min-width:210px; padding:6px;
  background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md);
  box-shadow:0 14px 34px rgba(0,0,0,.35); z-index:25; }
.ib-nav-popover-link { display:flex; align-items:center; gap:9px; width:100%; border:0;
  border-radius:var(--r-xs); padding:9px 10px; background:transparent; color:var(--muted);
  text-decoration:none; text-align:left; cursor:pointer; font-family:inherit;
  font-size:13px; font-weight:500; }
.ib-nav-popover-link:hover,.ib-nav-popover-link.active { color:var(--text); background:rgba(255,255,255,.06); }
.ib-popover-head { padding:8px 10px 10px; margin-bottom:4px; border-bottom:1px solid var(--border); }
.ib-popover-sub { font-size:var(--fs-caption); color:var(--dim); margin-top:2px; }
.ib-profile-menu summary { gap:8px; padding:3px 6px 3px 3px; }
.ib-profile-label { display:flex; flex-direction:column; align-items:flex-start; line-height:1.2; }
.ib-drawer-trigger { display:none; }

.ib-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.ib-apistat { display:inline-flex; align-items:center; gap:6px; font-size:var(--fs-caption);
  color:var(--muted); white-space:nowrap; cursor:default; }
.ib-apidot { width:7px; height:7px; border-radius:50%; background:var(--dim); }
.ib-apidot.ok { background:var(--green); } .ib-apidot.warn { background:var(--amber); }
.ib-apidot.bad { background:var(--red); }

.ib-user-avatar { width:32px; height:32px; border-radius:50%;
  background:rgba(0,200,220,.1); border:1px solid rgba(0,200,220,.25);
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:13px; color:var(--cyan); flex-shrink:0; }
.ib-user-name { font-weight:600; font-size:13px; }
.ib-user-role { font-size:var(--fs-micro); color:var(--cyan); }

.ib-main { flex:1; padding:24px 26px 40px; max-width:1400px; width:100%; margin:0 auto; }
/* The server and these pages are of different ages (D-119). */
.ib-serverwarn { display:flex; align-items:flex-start; gap:12px; max-width:calc(1400px - 52px);
  width:calc(100% - 52px); margin:16px auto 0; padding:12px 16px; border-radius:var(--r-md);
  border:1px solid rgba(243,156,18,.45); background:rgba(243,156,18,.10); color:var(--text);
  font-size:var(--fs-small); line-height:var(--lh-body); }
.ib-serverwarn[hidden] { display:none; }
.ib-serverwarn > .ib-icon { color:var(--amber); flex-shrink:0; margin-top:1px; }
.ib-serverwarn-body { flex:1; min-width:0; }
.ib-serverwarn-body b { color:var(--amber); margin-right:4px; }
.ib-serverwarn-how { margin-top:6px; color:var(--muted); }
.ib-serverwarn-how code { display:block; margin-top:4px; padding:4px 8px; border-radius:var(--r-sm);
  background:rgba(0,0,0,.25); color:var(--text); font-size:var(--fs-caption); overflow-x:auto; white-space:nowrap; }
.ib-serverwarn .ib-btn { flex-shrink:0; }
@media (max-width:760px) {
  .ib-serverwarn { width:calc(100% - 28px); margin-top:12px; flex-wrap:wrap; }
}

/* ── Pages ──
   Type scale tuned for engineering density (Datadog / Grafana territory)
   rather than consumer-dashboard scale: the headline numerals were ~25%
   larger before, which cost vertical space without adding information. */
.ib-page-title { font-size:var(--fs-stat); font-weight:var(--fw-bold);
  letter-spacing:var(--ls-tight); margin:2px 0 18px; }
/* Detail pages put the title under a back link, so it needs tighter leading
   and a subtitle beneath it. Was an inline style on Building detail only. */
.ib-detail-title { margin:8px 0 4px; }
.ib-h2 { font-size:var(--fs-title); font-weight:var(--fw-semibold); letter-spacing:var(--ls-tight);
  color:var(--text); margin:26px 0 12px; }
.ib-kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:14px; }
.ib-kpi { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); padding:14px 16px; }
/* One step down from a page's headline number, and semibold rather than bold.
   These tiles run six across and their values are not all numbers: "Poor" and
   "Moisture ingress" sit in the same row as "2" and "100 %". At 24px bold in a
   saturated tone, a two-word value wrapped to a second line and shouted over
   the number beside it. 18px carries a figure perfectly well at this density
   and lets the longest phrase sit on one line. */
.ib-kpi-v { font-size:var(--fs-stat-sm); font-weight:var(--fw-semibold);
  letter-spacing:var(--ls-tight); line-height:var(--lh-tight);
  font-variant-numeric:tabular-nums; }
.ib-kpi-l { font-size:var(--fs-caption); color:var(--muted); margin-top:4px; font-weight:var(--fw-medium); }
.ib-kpi.red .ib-kpi-v { color:var(--red); } .ib-kpi.green .ib-kpi-v { color:var(--green); }

.ib-sensors { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:12px; }
.ib-sensor { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); padding:14px; }
.ib-sensor-v { font-size:var(--fs-stat); font-weight:var(--fw-bold); letter-spacing:var(--ls-tight);
  font-variant-numeric:tabular-nums; } .ib-sensor-v span { font-size:var(--fs-small); color:var(--dim); margin-left:3px; }
.ib-sensor-n { font-size:var(--fs-caption); color:var(--muted); text-transform:uppercase; letter-spacing:.5px; margin-top:4px; }

/* ── Tables ── */
.ib-table { width:100%; border-collapse:collapse; background:var(--panel);
  border:1px solid var(--border); border-radius:var(--r-md); overflow:hidden; font-size:var(--fs-body); }
.ib-table th { text-align:left; padding:11px 14px; background:var(--panel2); color:var(--muted);
  text-transform:uppercase; font-size:var(--fs-micro); letter-spacing:.6px; }
.ib-table td { padding:10px 14px; border-top:1px solid var(--border); }
.ib-row { cursor:pointer; } .ib-row:hover td { background:rgba(52,152,219,.06); }

/* ── Pills / alerts ── */
.ib-pill { padding:3px 9px; border-radius:var(--r-pill); font-size:var(--fs-micro); font-weight:var(--fw-bold); }
.ib-pill-red{background:rgba(231,76,60,.15);color:var(--red);}
.ib-pill-amber{background:rgba(243,156,18,.15);color:var(--amber);}
.ib-pill-green{background:rgba(46,204,113,.15);color:var(--green);}
.ib-pill-grey{background:rgba(150,160,170,.12);color:var(--muted);}
.ib-alerts { display:flex; flex-direction:column; gap:8px; }
.ib-alert { background:var(--panel); border:1px solid var(--border); border-left:3px solid var(--dim);
  border-radius:var(--r-sm); padding:11px 14px; }
.ib-alert.ib-sev-critical{border-left-color:var(--red);} .ib-alert.ib-sev-high{border-left-color:var(--amber);}
.ib-alert-msg { font-size:var(--fs-small); color:var(--muted); margin-top:3px; }

/* ── Toolbars / tabs ── */
/* `font:inherit` first, then the scale. Form controls do not inherit type
   from the page by default, so every select and input on the product was
   rendering at the browser's own 13.3333px next to text on the scale. */
.ib-select { background:var(--bg2); border:1px solid var(--border); border-radius:var(--r-sm); color:var(--text);
  padding:7px 10px; margin-left:6px; font:inherit; font-size:var(--fs-small); }
.ib-tabs { display:flex; gap:6px; margin-bottom:16px; }
.ib-tab { background:var(--panel); border:1px solid var(--border); color:var(--muted);
  padding:8px 16px; border-radius:var(--r-sm); cursor:pointer; font-size:13px; }
.ib-tab.active { background:rgba(0,200,220,.12); color:var(--cyan); border-color:rgba(0,200,220,.3); }

/* ── Buttons ──
   inline-flex + gap so an icon and its label align in every button and every
   .ib-btn anchor, without each call site adding spacing of its own. */
.ib-btn { display:inline-flex; align-items:center; justify-content:center; gap:7px;
  border:none; border-radius:var(--r-sm); padding:10px 16px; font-size:var(--fs-body); font-weight:600;
  cursor:pointer; transition:opacity var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); text-decoration:none; }
.ib-btn:disabled { opacity:.55; cursor:not-allowed; }
.ib-btn-primary { background:var(--cyan); color:#04222a; }
.ib-btn-primary:hover:not(:disabled) { opacity:.9; }
.ib-btn-ghost { background:rgba(255,255,255,.06); color:var(--text); border:1px solid var(--border); }
.ib-btn-ghost:hover:not(:disabled) { background:rgba(255,255,255,.1); }
.ib-btn-danger { background:var(--red); color:#fff; }
.ib-btn-danger:hover:not(:disabled) { opacity:.9; }

/* ── States / spinner / toasts / modals ── */
.ib-loading .ib-spinner { display:inline-block; width:14px; height:14px; margin-right:8px;
  border:2px solid var(--border); border-top-color:var(--cyan); border-radius:50%;
  animation:ibspin .7s linear infinite; vertical-align:-2px; }
@keyframes ibspin { to { transform:rotate(360deg); } }
.ib-error { color:var(--red); } .ib-empty { color:var(--muted); }
.ib-toasts { position:fixed; bottom:20px; right:20px; display:flex; flex-direction:column; gap:8px; z-index:100; }
.ib-toast { background:var(--panel2); border:1px solid var(--border); border-radius:var(--r-sm);
  padding:11px 16px; font-size:var(--fs-body); opacity:0; transform:translateY(8px); transition:opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.ib-toast.show { opacity:1; transform:none; }
.ib-toast-success { border-left:3px solid var(--green); } .ib-toast-error { border-left:3px solid var(--red); }
.ib-toast-info { border-left:3px solid var(--blue); }

.ib-modal-back { position:fixed; inset:0; background:rgba(0,0,0,.5); display:grid;
  place-items:center; z-index:200; backdrop-filter:blur(6px);
  animation:ibFadeIn var(--dur-fast) var(--ease-out); }
.ib-modal { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-lg);
  padding:24px; width:360px; animation:ibScaleIn var(--dur) var(--ease-out); }
.ib-modal-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:20px; }
@keyframes ibFadeIn { from { opacity:0; } }
@keyframes ibScaleIn { from { opacity:0; transform:scale(.96) translateY(6px); } }

/* ── 2B: lists, search, detail, notes, forms, charts ── */
.ib-search-box { width:100%; max-width:320px; margin-bottom:12px; background:var(--bg2);
  border:1px solid var(--border); border-radius:var(--r-sm); padding:9px 12px; color:var(--text); }
.ib-search-box:focus { outline:none; border-color:var(--cyan); }
.ib-sortable { cursor:pointer; user-select:none; } .ib-sortable:hover { color:var(--cyan); }
.ib-listfoot { margin-top:8px; color:var(--dim); font-size:12px; }
.ib-back { display:inline-flex; align-items:center; gap:5px; margin-bottom:14px;
  color:var(--cyan); text-decoration:none; font-size:13px; }
.ib-mb { margin-bottom:12px; } .ib-mt { margin-top:16px; }
.ib-btn-sm { padding:5px 10px; font-size:12px; }
.ib-dk { color:var(--muted); width:180px; }
/* .ib-chart is the measured host; the SVG inside is drawn at its exact size. */
.ib-chart { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md);
  padding:8px; overflow:hidden; }
.ib-chart > svg { display:block; }

/* One toolbar primitive. Four names survive from earlier phases (anbar =
   Analytics/Reports pickers, livebar = Live Monitor, actions-bar = detail page
   actions, overbar = Overview refresh row); they differ only in gap and
   alignment, so the shared layout lives here once. */
.ib-anbar,.ib-livebar,.ib-actions-bar,.ib-overbar {
  display:flex; align-items:center; flex-wrap:wrap; margin-bottom:16px; }
.ib-anbar,.ib-livebar { gap:14px; color:var(--muted); font-size:13px; }
.ib-actions-bar { gap:8px; }
.ib-overbar { gap:12px; justify-content:space-between; color:var(--muted); font-size:var(--fs-small); }
.ib-noteform { display:flex; gap:8px; margin-bottom:12px; }
.ib-noteform input { flex:1; background:var(--bg2); border:1px solid var(--border); border-radius:var(--r-sm);
  padding:9px 12px; color:var(--text); }
.ib-notes { display:flex; flex-direction:column; gap:8px; }
.ib-note { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-sm); padding:11px 14px; font-size:var(--fs-body); }
.ib-note-meta { color:var(--dim); font-size:var(--fs-caption); margin-bottom:4px; }
/* A note that qualifies the numbers under it rather than merely adding to
   them: the data-quality factor every confidence in the list was multiplied
   by. Marked only when the factor actually damped something, so an undamped
   cycle stays quiet. */
.ib-note-warn { border-left:3px solid var(--amber); }
/* Wall conditions (D-121): what has been seen on the wall, open ones marked
   in amber because the analysis is counting them; resolved ones faded. */
.ib-conditions > .ib-h2-note { display:block; margin:-4px 0 10px; }
.ib-wallconds { display:flex; flex-direction:column; gap:8px; }
.ib-wallcond { background:var(--panel); border:1px solid var(--border); border-left:3px solid var(--amber);
  border-radius:var(--r-sm); padding:11px 14px; font-size:var(--fs-body); }
.ib-wallcond.is-resolved { border-left-color:var(--border); opacity:.75; }
.ib-wallcond-top { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; }
.ib-wallcond-meta { color:var(--dim); font-size:var(--fs-caption); margin-top:4px; }
.ib-wallcond-note { margin-top:6px; white-space:pre-line; overflow-wrap:anywhere; }
.ib-wallcond-why { margin-top:6px; color:var(--muted); font-size:var(--fs-small); }
.ib-wallcond-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.ib-form { display:flex; flex-direction:column; gap:12px; }
.ib-form label { display:flex; flex-direction:column; gap:4px; font-size:12px; color:var(--muted); }
.ib-form input,.ib-form select { background:var(--bg2); border:1px solid var(--border); border-radius:var(--r-sm);
  padding:9px 11px; color:var(--text); font-size:var(--fs-body); }
.ib-search-modal { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-lg);
  width:520px; max-width:92vw; padding:16px; }
.ib-search-input { width:100%; background:var(--bg2); border:1px solid var(--border); border-radius:var(--r-md);
  padding:12px 14px; color:var(--text); font-size:15px; }
.ib-search-input:focus { outline:none; border-color:var(--cyan); }
.ib-search-results { margin-top:10px; max-height:50vh; overflow:auto; }
.ib-search-row { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:var(--r-sm); cursor:pointer; }
.ib-search-row:hover { background:rgba(52,152,219,.08); }
.ib-tag { font-size:var(--fs-micro); text-transform:uppercase; letter-spacing:.5px; color:var(--cyan);
  background:rgba(0,200,220,.1); border:1px solid rgba(0,200,220,.3); padding:2px 7px; border-radius:var(--r-xs); }
.ib-role-sel { background:var(--bg2); border:1px solid var(--border); border-radius:var(--r-xs); color:var(--text); padding:5px 8px; }

/* ── Demo-ready v1.0: dashboard cards, fleet bar, attention list, feed ── */
.ib-kpi-sub { font-size:var(--fs-caption); color:var(--dim); margin-top:5px; }
.ib-kpi.amber .ib-kpi-v { color:var(--amber); }
.ib-danger { color:var(--red); }

.ib-fleetbar { display:flex; gap:3px; height:38px; border-radius:var(--r-sm); overflow:hidden;
  border:1px solid var(--border); }
/* min-width:max-content, not 0: a lopsided split (1 online / 24 offline) must
   never shrink a segment below its own label and clip it mid-word. */
.ib-fleet-seg { display:flex; align-items:center; justify-content:center; gap:6px;
  font-size:var(--fs-caption); text-transform:uppercase; letter-spacing:.5px; min-width:max-content;
  white-space:nowrap; padding:0 10px; }
.ib-fleet-seg span { font-size:15px; font-weight:700; }
.ib-fleet-online { background:rgba(46,204,113,.16); color:var(--green); }
.ib-fleet-offline { background:rgba(243,156,18,.14); color:var(--amber); }
.ib-ahead { display:flex; flex-direction:column; gap:1px; background:var(--border);
  border:1px solid var(--border); border-radius:var(--r-md); overflow:hidden; }
.ib-ahead-row { display:flex; align-items:baseline; gap:12px; flex-wrap:wrap;
  padding:11px 14px; background:var(--panel); color:inherit; text-decoration:none; }
.ib-ahead-row:hover { background:var(--panel2); }
.ib-ahead-id { font-weight:var(--fw-bold); }
.ib-ahead-move { color:var(--muted); font-size:13px; }
.ib-ahead + .ib-h2-row { margin-top:22px; }
.ib-fleet-note { color:var(--dim); font-size:var(--fs-caption); margin-top:7px; }
/* A third state the Fleet status block does not have to name: devices the
   collector probe could not answer for at all, which is neither reporting nor
   known to be silent. */
.ib-fleet-unknown { background:rgba(150,160,170,.06); color:var(--dim); }
/* The same bar in the hero, where it stands in for a line of counts. Shorter,
   because it sits under a sentence rather than under a heading of its own. */
.ib-fleetbar.is-compact { height:26px; border-radius:var(--r-xs); margin:12px 0 8px; }
.ib-fleetbar.is-compact .ib-fleet-seg { font-size:11px; gap:5px; }
.ib-fleetbar.is-compact .ib-fleet-seg span { font-size:13px; }

/* Needs attention: a row plus the alerts it expands to reveal. */
.ib-attn { display:flex; flex-direction:column; gap:8px; }
.ib-attn-item { background:var(--panel); border:1px solid var(--border);
  border-left:3px solid var(--red); border-radius:var(--r-md); overflow:hidden; }
.ib-attn-item .ib-attn-row { background:transparent; border:0; border-radius:0; }
.ib-attn-toggle { padding:4px 6px; min-height:28px; }
.ib-attn-toggle .ib-icon { transition:transform var(--dur) var(--ease); }
.ib-attn-toggle.is-open .ib-icon { transform:rotate(180deg); }
.ib-attn-alerts { display:flex; flex-direction:column; gap:8px;
  padding:0 15px 14px; }
.ib-attn-alerts[hidden] { display:none; }
.ib-attn-alert { background:var(--bg2); border:1px solid var(--border);
  border-left:3px solid var(--dim); border-radius:var(--r-sm); padding:11px 14px; }
.ib-attn-alert.ib-sev-critical { border-left-color:var(--red); }
.ib-attn-alert.ib-sev-high,.ib-attn-alert.ib-sev-medium { border-left-color:var(--amber); }
.ib-attn-alert-head { display:flex; align-items:center; gap:9px; flex-wrap:wrap; font-size:var(--fs-body); }
.ib-attn-loading { color:var(--dim); font-size:var(--fs-small); padding:10px 12px; }
.ib-attn-alert-actions { display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }

/* Disclosure: a section that is present but folded away until asked for. */
.ib-disclosure > summary { display:flex; align-items:center; gap:8px; cursor:pointer;
  list-style:none; padding:10px 13px; border:1px solid var(--border); border-radius:var(--r-sm);
  background:var(--panel); color:var(--muted); font-size:var(--fs-small); font-weight:600;
  transition:background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.ib-disclosure > summary::-webkit-details-marker { display:none; }
.ib-disclosure > summary::before { content:"▸"; color:var(--cyan); font-size:11px;
  transition:transform var(--dur) var(--ease); }
.ib-disclosure[open] > summary::before { transform:rotate(90deg); }
.ib-disclosure > summary:hover { background:var(--panel2); color:var(--text); }
.ib-disclosure[open] > summary { border-radius:var(--r-sm) var(--r-sm) 0 0; border-bottom:0; }
.ib-disclosure[open] > .ib-feed { border:1px solid var(--border); border-top:0;
  border-radius:0 0 9px 9px; padding:10px; }
.ib-attn-row { display:flex; align-items:center; justify-content:space-between; gap:14px;
  background:var(--panel); border:1px solid var(--border); border-left:3px solid var(--red);
  border-radius:var(--r-md); padding:12px 15px; transition:background var(--dur) var(--ease); }
.ib-attn-row:hover { background:var(--panel2); }
.ib-attn-id { font-weight:600; font-size:14px; }
.ib-attn-sub { color:var(--muted); font-size:12px; margin-top:3px; }
.ib-attn-metrics { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.ib-attn-num { font-size:var(--fs-caption); color:var(--muted); white-space:nowrap; }

.ib-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:14px; }
.ib-card { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); padding:16px;
  transition:border-color var(--dur) var(--ease); }
.ib-card:hover { border-color:rgba(0,200,220,.4); }
.ib-card-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.ib-card-title { font-weight:600; font-size:var(--fs-lead); }
.ib-card-sub { color:var(--muted); font-size:12px; margin-top:4px; }
.ib-card-stats { display:flex; gap:22px; margin-top:14px; flex-wrap:wrap; }
.ib-card-stats div { display:flex; flex-direction:column; }
.ib-card-stats b { font-size:19px; font-weight:700; font-variant-numeric:tabular-nums; }
.ib-card-stats span { font-size:var(--fs-micro); text-transform:uppercase; letter-spacing:.6px; color:var(--muted); margin-top:2px; }

.ib-feed { display:flex; flex-direction:column; gap:6px; }
.ib-feed-row { display:flex; align-items:center; gap:10px; background:var(--panel);
  border:1px solid var(--border); border-radius:var(--r-sm); padding:9px 13px; font-size:13px; }
.ib-feed-title { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ib-feed-meta { color:var(--dim); font-size:var(--fs-caption); white-space:nowrap; }

/* ── Overview: refresh bar, greeting hero, health score, at-a-glance ── */
.ib-overbar-ctrl { display:flex; align-items:center; gap:12px; }
.ib-refreshed { color:var(--dim); }
.ib-refreshed.is-failed { color:var(--amber); }

/* Three columns, not three flex items that fall where they may: the score, the
   sentence the page exists to say, and the region table. As flex children the
   table's 380px basis could not sit beside a sentence asking for 320, so from
   about 1200px to 1600px it wrapped onto a row of its own and took 380 of the
   1000 available - a hero 593px tall with 620px of nothing beside the table,
   and the first two sections pushed under the fold. A grid states the columns
   instead of leaving them to the leftovers, and below 1190px the table crosses
   the foot of the hero, where its five columns have the width they want. */
.ib-hero { background:linear-gradient(135deg,#16324a 0%,var(--panel) 65%);
  border:1px solid var(--border); border-radius:var(--r-lg); padding:26px 28px; margin-bottom:18px;
  display:grid; grid-template-columns:196px minmax(320px,1fr) auto;
  align-items:center; gap:32px; position:relative; overflow:hidden; }
/* The frieze lives in the hero's top 56px, which is its own padding and the
   badge row, and that row's text ends some 200px short of it. Nothing else in
   the hero reaches the band at any headline length or any width, so "never
   behind text or a number" is a matter of geometry here rather than of how
   faint the thing is. The mask takes it from the corner to nothing along the
   diagonal. Its weight is one token, so it can go to zero without touching
   markup. Off below 760px, where the hero stacks and every pixel is text.
   Drawn in the text colour rather than the brand cyan: at this weight cyan
   reads as a glow, and graphite reads as a drawing. */
.ib-hero > * { position:relative; }
.ib-hero-art { position:absolute; top:0; right:0; width:340px; height:56px;
  color:var(--text); opacity:var(--hero-art,.11); pointer-events:none;
  -webkit-mask-image:radial-gradient(150% 200% at 100% 0%,#000 0%,rgba(0,0,0,.5) 45%,transparent 80%);
  mask-image:radial-gradient(150% 200% at 100% 0%,#000 0%,rgba(0,0,0,.5) 45%,transparent 80%); }
@media (max-width:760px) { .ib-hero-art { display:none; } }
@media (max-width:1190px) {
  .ib-hero { grid-template-columns:196px minmax(0,1fr); }
  /* Named through the hero so it outweighs the panel's own bounds, which are
     declared further down this file: a media query carries no weight of its
     own, so the later rule would win and the table would sit at 360px on a
     row of its own with the rest of the hero empty beside it. */
  .ib-hero > .ib-regions { grid-column:1 / -1; max-width:none; }
}
.ib-hero-main { flex:1 1 320px; min-width:0; }
.ib-hero-badges { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin-bottom:8px; }
.ib-hero-time { color:var(--muted); font-size:var(--fs-small); }
/* The headline and, in Simple, the ⓘ holding the hero's small print (D-260). */
.ib-hero-greetrow { display:flex; align-items:baseline; gap:8px; min-width:0; }
.ib-hero-greet { font-size:var(--fs-stat); font-weight:var(--fw-semibold); margin:0;
  letter-spacing:var(--ls-tight);
  line-height:1.3; }
.ib-hero-sub { color:var(--muted); font-size:var(--fs-body); margin:7px 0 0;
  line-height:1.55; max-width:62ch; }
.ib-hero-meta { color:var(--dim); font-size:var(--fs-small); margin:12px 0 0;
  font-variant-numeric:tabular-nums; }
/* The active filter, named where the numbers it scopes are. */
.ib-hero-meta b { color:var(--cyan); font-weight:600; }
/* What "not reporting" is made of. It was a title attribute, which does not
   exist on a touch screen. */
.ib-hero-fleetnote { color:var(--dim); font-size:var(--fs-caption); margin:-2px 0 0;
  line-height:1.45; }

/* Health score, folded into the status band. It previously occupied a second
   full-width block below the hero, restating a number the at-a-glance card and
   the trend chart both show again. */
.ib-hero-score { flex:0 0 196px; padding-right:30px; border-right:1px solid var(--border); }
/* The score as a ring, against a full circle: 75 is three quarters green.
   Coverage is said in words in the note below, not folded into this shape,
   because a shortened sweep made a good score over few devices look like a
   poor one. */
.ib-gauge { position:relative; width:112px; height:112px; margin:2px auto 10px; }
.ib-gauge-svg { width:100%; height:100%; display:block; overflow:visible; }
.ib-gauge-svg circle { stroke-width:9; }
.ib-gauge-track { stroke:var(--bg2); }
.ib-gauge-fill { stroke-linecap:round;
  transition:stroke-dasharray var(--dur-draw) var(--ease-out); }
.ib-gauge-c { position:absolute; inset:0; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:3px; }
.ib-gauge-num { font-size:30px; font-weight:750; line-height:1; letter-spacing:-1px;
  font-variant-numeric:tabular-nums; }
.ib-gauge-num span { font-size:13px; color:var(--dim); font-weight:600; letter-spacing:0; }
.ib-gauge-label { font-size:11px; font-weight:700; text-transform:uppercase;
  letter-spacing:.6px; }
.ib-hero-scorecap { font-size:var(--fs-micro); text-transform:uppercase; letter-spacing:.7px;
  color:var(--muted); margin-bottom:4px; }
/* Coverage and staleness in one bordered note rather than two loose lines.
   Both are caveats on the score above them, and a caveat that looks like a
   caption gets read as one: an average of one device in three is not the
   portfolio's health, however calmly it is printed. */
.ib-hero-note { display:flex; align-items:flex-start; gap:7px; margin-top:9px;
  padding:7px 9px; border:1px solid rgba(243,156,18,.35); border-radius:var(--r-sm);
  background:rgba(243,156,18,.07); }
.ib-hero-note .ib-icon { flex:0 0 auto; color:var(--amber); margin-top:1px; }
.ib-hero-note b { display:block; font-size:11px; font-weight:600; color:var(--amber);
  line-height:1.4; }
.ib-hero-note i { display:block; font-style:normal; font-size:var(--fs-micro); color:var(--muted);
  line-height:1.45; margin-top:3px; }
/* The critical count is the one thing on this page worth clicking first, so it
   is a button that looks like the pill it replaced. */
.ib-hero-crit { border:0; font:inherit; font-size:var(--fs-small);
  font-weight:var(--fw-bold); letter-spacing:.1px; padding:4px 10px; cursor:pointer; }
.ib-hero-crit:hover, .ib-hero-crit:focus-visible { filter:brightness(1.15); }
/* The direction of travel, next to the number it belongs to. */
/* Stacked, not side by side: the column is 176px wide, and a 96px sparkline
   left the caption seventy pixels to wrap "Compared with 7 days ago" into
   three lines. Full width takes both to one line each. */
.ib-hero-trend { display:flex; flex-direction:column; align-items:stretch;
  gap:3px; margin:6px 0 8px; }
.ib-hero-trend .ib-spark { width:100%; height:26px; margin:0; flex:0 0 auto; }
.ib-hero-move { font-size:var(--fs-micro); font-weight:600; color:var(--muted);
  font-variant-numeric:tabular-nums; }
.ib-hero-movebox { display:flex; flex-direction:column; gap:1px; }
.ib-hero-move.is-up { color:var(--green); } .ib-hero-move.is-down { color:var(--red); }
.ib-hero-movecap { font-size:var(--fs-micro); text-transform:uppercase; letter-spacing:.5px; color:var(--dim); }
/* The denominator when there is nothing to warn about: every device scored and
   every score current. Anything less becomes the note above. */
.ib-hero-cover { font-size:var(--fs-caption); color:var(--muted); margin-top:8px;
  line-height:var(--lh-snug); }
/* The coverage line is a caveat when coverage is partial or the scores are
   old, and a plain denominator when it is not. It was a bordered amber panel
   in the hero, which is a lot of furniture for a sentence that has a section
   of its own to explain itself in. */
.ib-hero-cover.is-warn { color:var(--amber); }
/* The gauge as a control: no chrome of its own, because the ring is the
   affordance and a button frame around it would read as a second element. */
.ib-gaugelink { display:block; width:100%; padding:0; border:0; background:none;
  color:inherit; font:inherit; cursor:pointer; border-radius:var(--r-md); }
.ib-gaugelink:focus-visible { outline:2px solid var(--cyan); outline-offset:3px; }
.ib-hero-more { display:inline-block; margin-top:8px; padding:0; border:0; background:none;
  color:var(--cyan); font:inherit; font-size:var(--fs-caption); font-weight:var(--fw-semibold);
  cursor:pointer; }
.ib-hero-more:hover { text-decoration:underline; }
.ib-gaugelink:hover .ib-gauge-num { color:var(--cyan); }

/* Portfolio health: the facts behind the average, above the line that draws
   its direction. */
.ib-hstats { display:flex; flex-wrap:wrap; gap:10px 28px; margin-bottom:14px; }
.ib-hstat { display:flex; flex-direction:column; gap:2px; }
.ib-hstat b { font-size:var(--fs-stat-sm); font-weight:var(--fw-bold); line-height:var(--lh-none);
  font-variant-numeric:tabular-nums; }
.ib-hstat b span { font-size:var(--fs-caption); color:var(--dim); font-weight:var(--fw-semibold); }
.ib-hstat b.is-up { color:var(--green); } .ib-hstat b.is-down { color:var(--amber); }
.ib-hstat > span { font-size:var(--fs-caption); color:var(--muted); }
.ib-hnote { font-size:var(--fs-caption); color:var(--dim); line-height:var(--lh-snug);
  margin:0 0 14px; max-width:70ch; }
@media (max-width:760px) {
  .ib-hero { grid-template-columns:minmax(0,1fr); }
  /* A 300px floor is wider than the column on a 375px phone, and the panel
     hung out of the hero by the difference. */
  .ib-hero > .ib-regions { min-width:0; }
  .ib-hero-score { padding-right:0; padding-bottom:16px;
    border-right:0; border-bottom:1px solid var(--border); }
}

/* Section heading row: title, a note, and a right-aligned link. */
.ib-h2-link { margin-left:auto; color:var(--cyan); text-decoration:none;
  font-size:var(--fs-small); font-weight:var(--fw-semibold); white-space:nowrap; }
.ib-h2-link:hover { text-decoration:underline; }

/* Four cards, so the row divides evenly at every size: one column on a phone,
   two on a tablet, four on a desktop. auto-fit with a minimum width is the
   usual way to do this and was what stood here, but at around 1100px it fits
   three and leaves the fourth card alone on a row of its own. */
.ib-glance { display:grid; grid-template-columns:1fr; gap:14px; }
@media (min-width:600px) { .ib-glance { grid-template-columns:repeat(2,1fr); } }
@media (min-width:1200px) { .ib-glance { grid-template-columns:repeat(4,1fr); } }
.ib-glance-card { background:var(--panel); border:1px solid var(--border); border-left:3px solid var(--border);
  border-radius:var(--r-md); padding:14px 16px; transition:border-color var(--dur) var(--ease); }
.ib-glance-green { border-left-color:var(--green); } .ib-glance-amber { border-left-color:var(--amber); }
.ib-glance-red { border-left-color:var(--red); }
.ib-glance-label { display:flex; align-items:center; gap:6px; font-size:var(--fs-caption);
  text-transform:uppercase; letter-spacing:.6px; color:var(--muted); }
.ib-glance-v { font-size:var(--fs-stat); font-weight:var(--fw-bold); margin:8px 0 5px;
  letter-spacing:-.5px; font-variant-numeric:tabular-nums; }
.ib-glance-v span { font-size:var(--fs-body); color:var(--dim); font-weight:var(--fw-semibold); margin-left:4px; }
.ib-glance-sub { font-size:var(--fs-small); color:var(--muted); line-height:var(--lh-snug); }
.ib-glance-link { font-size:var(--fs-small); color:var(--cyan); margin-top:10px; }
/* Severity in the API's own words, under the count it qualifies. "5 alerts"
   does not separate five nuisances from one emergency, and the rows carrying
   severity are already fetched for this page. */
.ib-sevbreak { display:flex; flex-wrap:wrap; align-items:baseline; gap:3px 10px;
  margin-top:8px; }
.ib-sev { display:flex; align-items:baseline; gap:4px; font-size:var(--fs-micro);
  text-transform:uppercase; letter-spacing:.5px; color:var(--muted); }
.ib-sev b { font-size:13px; font-weight:700; font-variant-numeric:tabular-nums; }
.ib-sev-crit b { color:var(--red); }
.ib-sev-warn b { color:var(--amber); }
.ib-sev-info b { color:var(--dim); }
.ib-sev-good b { color:var(--green); }
/* Said when the rows on hand do not cover every alert, so the tally reads as a
   floor rather than a total. */
.ib-sev-cap { font-size:var(--fs-micro); text-transform:uppercase; letter-spacing:.5px;
  color:var(--dim); font-style:italic; }

.ib-flag { font-size:var(--fs-micro); font-weight:700; letter-spacing:.5px; color:var(--cyan);
  background:rgba(0,200,220,.1); border:1px solid rgba(0,200,220,.3); border-radius:var(--r-xs);
  padding:1px 6px; margin-right:8px; vertical-align:middle; }
.ib-card-worst { margin-top:12px; padding-top:10px; border-top:1px solid var(--border);
  font-size:12px; color:var(--amber); }

/* ── AI Highlights strip + portfolio lifetime stats (Overview) ── */
/* ── Daily briefing (overview) ── The one thing on this page a model wrote, so
   it is set apart from the rule-based chips under it and carries its own
   provenance line. The answer renderer draws the text, so .ib-md-* rules from
   the AI Insights block below apply to it too. */
.ib-brief { background:var(--panel); border:1px solid var(--border); border-left:3px solid var(--cyan);
  border-radius:var(--r-md); padding:14px 16px; }
.ib-brief.is-stale { border-left-color:var(--amber); }
.ib-brief-text { font-size:var(--fs-body); line-height:1.6; }
.ib-brief-text > :first-child { margin-top:0; }
.ib-brief-text > :last-child { margin-bottom:0; }
.ib-brief-foot { display:flex; align-items:center; flex-wrap:wrap; gap:8px 14px;
  margin-top:12px; padding-top:10px; border-top:1px solid var(--border); }
.ib-brief-meta { display:inline-flex; align-items:center; gap:6px; flex:1 1 260px;
  font-size:var(--fs-caption); color:var(--muted); }
.ib-brief.is-stale .ib-brief-meta { color:var(--amber); }
.ib-brief-open { margin-left:auto; }
.ib-brief-write { margin-left:auto; }
.ib-brief-asks { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.ib-brief-ask { color:var(--cyan); background:rgba(0,200,220,.08); border-color:rgba(0,200,220,.28);
  text-decoration:none; cursor:pointer; white-space:normal; }
.ib-brief-ask:hover, .ib-brief-ask:focus-visible { background:rgba(0,200,220,.16); }
.ib-brief-old { color:var(--amber); }

.ib-highlights { display:flex; flex-direction:column; gap:12px; }
.ib-chips { display:flex; flex-wrap:wrap; gap:8px; }
.ib-chip { font-size:var(--fs-small); font-weight:var(--fw-semibold); padding:6px 12px; border-radius:var(--r-pill);
  border:1px solid var(--border); white-space:nowrap; }
.ib-chip-good { color:var(--green); background:rgba(46,204,113,.12); border-color:rgba(46,204,113,.3); }
.ib-chip-watch { color:var(--amber); background:rgba(243,156,18,.12); border-color:rgba(243,156,18,.3); }
.ib-chip-warn { color:var(--amber); background:rgba(243,156,18,.12); border-color:rgba(243,156,18,.3); }
.ib-chip-crit { color:var(--red); background:rgba(231,76,60,.14); border-color:rgba(231,76,60,.35); }
.ib-chip-info { color:var(--cyan); background:rgba(0,200,220,.1); border-color:rgba(0,200,220,.3); }
.ib-rec { background:var(--panel); border:1px solid var(--border); border-left:3px solid var(--cyan);
  border-radius:var(--r-md); padding:13px 16px; }
.ib-rec-crit { border-left-color:var(--red); } .ib-rec-warn { border-left-color:var(--amber); }
.ib-rec-good { border-left-color:var(--green); }
.ib-rec-stale { border-left-color:var(--dim); }
.ib-rec-title { font-weight:var(--fw-semibold); font-size:var(--fs-lead); }
.ib-rec-text { color:var(--muted); font-size:var(--fs-body); margin-top:5px; line-height:var(--lh-body); }
.ib-rec-link { display:inline-block; margin-top:8px; color:var(--cyan); text-decoration:none; font-size:var(--fs-small); }

/* Secondary band: fleet status, portfolio trend, lifetime totals and the
   activity feed. Each is supporting detail, and as four full-width rows they
   roughly doubled the length of the Overview for very little information. Two
   columns above 1000px, one below. */
/* Two columns above 1000px. Each child is a complete section (.ib-sblock), so
   a heading can never be separated from the content it labels - grid places
   whole blocks, and previously it was placing loose headings and loose bodies
   into alternating cells. */
/* Exactly two columns, not auto-fit: the rules below separate the blocks with
   nth-child, which needs a known column count. auto-fit would have allowed a
   third column on a wide monitor and put the dividers in the wrong places. */
.ib-secondary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:start; margin-top:36px; }
.ib-sblock { min-width:0; padding:0 0 30px; border-top:1px solid var(--border); }
/* Even breathing room either side of the rule: 36px above from the band's
   margin, 22px below before the heading it introduces. */
.ib-sblock .ib-h2-row { margin-top:22px; }
/* Second row: the rule needs the same clearance from the block above it as the
   first row gets from the Buildings grid. */
.ib-sblock:nth-child(n+3) { margin-top:14px; }
/* Vertical rule between the columns, drawn on the right-hand block so it sits
   in the gutter rather than adding a stray edge at the far right. */
.ib-sblock:nth-child(even) { border-left:1px solid var(--border); padding-left:28px; }
.ib-sblock:nth-child(odd) { padding-right:28px; }
@media (max-width:1000px) {
  .ib-secondary { grid-template-columns:1fr; }
  .ib-sblock:nth-child(even) { border-left:0; padding-left:0; }
  .ib-sblock:nth-child(odd) { padding-right:0; }
}

/* Brief highlight when a card scrolls you to a section, so it is obvious where
   the click landed. */
@keyframes ibFlash {
  from { background:rgba(0,200,220,.16); box-shadow:0 0 0 6px rgba(0,200,220,.16); }
}
.ib-flash { animation:ibFlash 1.1s var(--ease) 1; border-radius:var(--r-sm); }

.ib-lifegrid { display:grid; grid-template-columns:repeat(auto-fit,minmax(112px,1fr)); gap:12px; }
.ib-life { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md);
  padding:15px; text-align:center; }
.ib-life-v { font-size:23px; font-weight:700; color:var(--cyan);
  letter-spacing:-.3px; font-variant-numeric:tabular-nums; }
.ib-life-l { font-size:var(--fs-micro); text-transform:uppercase; letter-spacing:.6px; color:var(--muted); margin-top:5px; }

/* ── Explained empty states (never hide a section, explain it) ── */
.ib-unavail { background:var(--panel); border:1px dashed var(--border); border-radius:var(--r-md);
  padding:15px 17px; }
.ib-unavail-head { display:flex; align-items:center; gap:9px; font-size:var(--fs-body); font-weight:600; }
.ib-unavail-tag { font-size:var(--fs-micro); color:var(--dim);
  background:rgba(150,160,170,.12); border:1px solid var(--border); padding:2px 7px; border-radius:var(--r-xs); }
.ib-unavail-why { color:var(--muted); font-size:var(--fs-small); margin-top:7px; line-height:1.5; }
.ib-unavail-hint { color:var(--dim); font-size:var(--fs-caption); margin-top:6px; line-height:1.5; }

/* ── Live Monitor: view toggle, sparklines, stored banner, finding ── */
/* The auto-refresh toggle had no rule at all, so it rendered as a bare OS
   checkbox against a lowercase label - the one control in the app that did.
   accent-color (set on :root) now colours the box; this aligns and sizes it. */
.ib-refresh { display:inline-flex; align-items:center; gap:7px; color:var(--muted);
  font-size:var(--fs-small); cursor:pointer; white-space:nowrap; }
.ib-refresh input { width:14px; height:14px; margin:0; cursor:pointer; }

.ib-viewtoggle { display:inline-flex; border:1px solid var(--border); border-radius:var(--r-sm); overflow:hidden; }
.ib-vt { background:var(--bg2); color:var(--muted); border:none; padding:6px 14px; cursor:pointer;
  font:inherit; font-size:var(--fs-small); font-weight:var(--fw-semibold); }
.ib-vt.active { background:rgba(0,200,220,.14); color:var(--cyan); }
.ib-vt + .ib-vt { border-left:1px solid var(--border); }

/* One line under the Simple/Expert toggle saying what the chosen view is for.
   Two words on a segmented control cannot say which view a reader wants, and
   the AI Insights modes already carry the same explanation. */
.ib-viewnote { color:var(--muted); font-size:var(--fs-small); line-height:var(--lh-body);
  margin:-2px 0 16px; }
.ib-viewnote-t { color:var(--text); font-weight:var(--fw-semibold); }

.ib-spark { width:100%; height:26px; margin-top:10px; display:block; }
.ib-sensor-range { font-size:var(--fs-micro); color:var(--dim); margin-top:4px; }

/* ── The verdict card ──────────────────────────────────────────────────────
   The same component on Live Monitor (both views) and the device page, so one
   stored recommendation cannot be styled three ways. The tone comes from the
   verdict's own severity via .ib-rec-crit / -warn / -good. */
.ib-verdict { padding:16px 18px; }
.ib-verdict-head { display:flex; align-items:flex-start; gap:12px; }
.ib-verdict-icon { display:inline-flex; align-items:center; flex-shrink:0;
  color:var(--muted); margin-top:1px; }
.ib-verdict-heading { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.ib-verdict .ib-rec-title { font-size:var(--fs-title); }
.ib-verdict-action { font-size:var(--fs-lead); line-height:var(--lh-body); margin-top:8px; }
.ib-verdict-foot { font-size:var(--fs-small); margin-top:10px; }
.ib-verdict-prov { border-top:1px solid var(--border); margin-top:14px; padding-top:12px; }
.ib-verdict-evidence { font-size:var(--fs-body); color:var(--muted); line-height:var(--lh-body); }
.ib-verdict-evidence-t { color:var(--text); font-weight:var(--fw-semibold); margin-right:4px; }
.ib-provgrid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:10px 16px; margin:12px 0 0; }
.ib-provgrid dt { font-size:var(--fs-micro); color:var(--dim); text-transform:uppercase;
  letter-spacing:.5px; }
.ib-provgrid dd { margin:2px 0 0; font-size:var(--fs-body); font-family:var(--mono,ui-monospace,
  SFMono-Regular,Menlo,monospace); word-break:break-word; }

/* ── Simple view ───────────────────────────────────────────────────────────
   Fewer, larger figures than the Expert tiles: a reader who is not diagnosing
   anything needs the two or three numbers they can act on, with the movement
   stated in words rather than drawn as a sparkline. */
/* Sized so a device reporting seven to ten channels fits one or two rows
   without a lone tile stranded on a line of its own. The value still leads,
   but at 34px a humidity reading was taller than the sentence explaining it. */
.ib-bigtiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(142px,1fr)); gap:10px; }
.ib-bigtile { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md);
  padding:13px 15px; }
.ib-bigtile-v { font-size:var(--fs-stat); font-weight:var(--fw-bold); letter-spacing:var(--ls-tight); line-height:var(--lh-tight); }
.ib-bigtile-v span { font-size:var(--fs-small); font-weight:var(--fw-semibold); color:var(--muted); margin-left:4px; }
.ib-bigtile-n { font-size:var(--fs-caption); color:var(--muted); margin-top:4px; }
.ib-bigtile-c { font-size:var(--fs-small); color:var(--muted); margin-top:4px; }

.ib-simplecard { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md);
  padding:16px 18px; display:flex; align-items:flex-start; gap:14px; flex-wrap:wrap; }
.ib-simplecard-t { flex:1; min-width:220px; font-size:var(--fs-body); color:var(--muted); line-height:1.55; }
.ib-simplewhere { display:flex; align-items:center; flex-wrap:wrap; gap:7px; font-size:var(--fs-small); margin-bottom:12px; }
/* An offline device, said once at the top of Live's plain view (D-261). */
.ib-simplewhere .ib-flagnote { margin-left:4px; }
/* The plain view is a short column of statements, not a dashboard: it has no
   section rules, and its blocks sit closer together than ib-sections allows. */
.ib-simpleview > * { margin-bottom:16px; }
.ib-simpleview > *:last-child { margin-bottom:0; }
.ib-simpleline { display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  font-size:var(--fs-body); color:var(--muted); }

/* ── Simple: the situation at a glance ──────────────────────────────────────
   A drawn score beside the facts that qualify it. The ring carries the number
   so a reader does not have to weigh it against a scale in their head.

   Named -simpleglance-, not -glance-: the Overview has its own .ib-glance
   card grid, and these rules sit later in this file, so sharing the name
   silently restyled that grid into two lopsided columns inside a second
   panel, with its card numbers shrunk from 27px to 17px. */
/* Three bounded columns, divided rather than spaced. Two columns with a 28px
   gap gave the right-hand half no structure: three facts spread across 1200px
   of panel sat so far apart that nothing read as grouped, and the card was
   mostly empty. Each section now has a width it cannot exceed and a rule
   between it and the next, so the eye moves score -> finding -> status
   instead of scanning open space. Columns stretch to the tallest, which is
   the score with its axis and caption. */
/* Health on its own row, the finding and the status pair beneath it.
   Three equal columns could not work: the score needs an axis, which needs
   width, and the two cells beside it were stretching to match a column they
   had nothing to fill. Health now spans the card with its scale beside the
   number rather than under it, which is the one place on this card that
   genuinely uses the width - ten devices separate on it instead of bunching -
   and the two facts below are short enough to sit level. */
.ib-simpleglance { display:grid;
  grid-template-columns:minmax(0,1fr) minmax(230px,300px);
  align-items:stretch; background:var(--panel); border:1px solid var(--border);
  border-radius:var(--r-lg); }
.ib-sg-health { grid-column:1 / -1; display:grid;
  grid-template-columns:auto minmax(0,1fr); column-gap:26px; align-items:start; }
.ib-sg-health .ib-score-top { padding-top:3px; }
.ib-sg-health .ib-score-slot { min-width:0; }
.ib-sg-health .ib-sg-asof { grid-column:1 / -1; }
/* Row two draws its own rule; the automatic left border would put one between
   the health row and nothing. */
.ib-sg-primary, .ib-sg-ops { border-top:1px solid var(--border); }
.ib-sg-primary { border-left:0 !important; }
.ib-sg-cell { padding:16px 20px; min-width:0; }
.ib-sg-cell + .ib-sg-cell { border-left:1px solid var(--border); }

/* The finding, as a heading with its grade beside it rather than a grade with
   a label underneath. "Critical" is not the subject; heat loss is. */
.ib-sg-primary-h { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.ib-sg-primary-i { display:inline-flex; color:var(--amber); }
.ib-sg-primary-t { font-size:var(--fs-title); font-weight:var(--fw-semibold);
  letter-spacing:var(--ls-tight); }
.ib-sg-primary-d { font-size:var(--fs-small); color:var(--muted); margin-top:8px;
  line-height:var(--lh-snug); max-width:52ch; }
.ib-sg-action { display:inline-flex; align-items:center; gap:4px; margin-top:12px;
  background:none; border:0; padding:0; cursor:pointer; color:var(--cyan);
  font:inherit; font-size:var(--fs-small); font-weight:var(--fw-semibold); }
.ib-sg-action:hover { text-decoration:underline; }

/* Connection and alerts are one question - can this device still tell me
   anything, and is it shouting - so they share a cell and a rule rather than
   sitting as two more equal facts in a row of four. */
.ib-sg-ops { display:flex; flex-direction:column; justify-content:center; gap:12px; }
.ib-sg-op { display:flex; align-items:flex-start; gap:10px; }
.ib-sg-op + .ib-sg-op { border-top:1px solid var(--border); padding-top:12px; }
.ib-sg-op-i { display:inline-flex; color:var(--dim); flex-shrink:0; margin-top:2px; }
.ib-sg-op-b { min-width:0; }
/* Value and label on one line. Stacked, each fact was three lines tall and
   this column ran half again as long as the finding beside it, which is where
   the empty space came from. */
.ib-sg-op-head { display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.ib-sg-op-v { font-size:var(--fs-lead); font-weight:var(--fw-semibold);
  line-height:var(--lh-tight); }
.ib-sg-op-l { font-size:var(--fs-micro); text-transform:uppercase;
  letter-spacing:var(--ls-caps); color:var(--muted); }
.ib-sg-op-s { font-size:var(--fs-caption); color:var(--dim); margin-top:3px;
  line-height:var(--lh-snug); }

/* Said only when the link is down or the data is overdue: a score describes
   the last cycle, and while a device is reporting that is indistinguishable
   from now. The moment it stops, it is not. */
/* Beside a wide axis the two sentences sit next to each other rather than
   stacking into a three-line column: what the bands mean on the left, where
   this device sits among its peers on the right. */
.ib-sg-health .ib-peers { display:grid; grid-template-columns:1fr 1fr;
  gap:2px 28px; align-items:start; }
.ib-sg-health .ib-peers-track { grid-column:1 / -1; margin-top:0; }
.ib-sg-health .ib-score-cap { margin-top:0; }

.ib-sg-asof { display:flex; align-items:flex-start; gap:6px; margin-top:9px;
  font-size:var(--fs-caption); color:var(--amber); line-height:var(--lh-snug); }
.ib-sg-asof svg { flex-shrink:0; margin-top:1px; }

/* Three columns need room for all three. Below about 1100px the score column
   was still taking its 320px maximum while the finding it exists to qualify
   was squeezed to 127px, which is the same wasted-space problem in the other
   direction. The status pair drops to a full-width row first, because it is
   the section that reads just as well horizontally; the finding keeps the
   width. */
@media (max-width:860px) {
  /* One column of text under the axis once the card is this narrow: two
     half-width sentences at 11px are four lines each. */
  .ib-sg-health .ib-peers { grid-template-columns:1fr; gap:3px; }
}

@media (max-width:620px) {
  /* One column, and the score drops above its own axis rather than beside it:
     a 0-100 scale sharing 340px with a three-digit number is not a scale. */
  .ib-simpleglance { grid-template-columns:1fr; }
  .ib-sg-cell + .ib-sg-cell { border-left:0; border-top:1px solid var(--border); }
  .ib-sg-health { grid-template-columns:1fr; row-gap:10px; }
}

/* Health as a bar. The ring this replaces was 132px plus a caption, for one
   number whose second slice was only 100 minus the first. */
.ib-score-top { display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.ib-score-v { font-size:var(--fs-stat-lg); font-weight:var(--fw-bold); letter-spacing:var(--ls-tighter); line-height:var(--lh-none); }
.ib-score-u { font-size:var(--fs-caption); color:var(--muted); text-transform:uppercase; letter-spacing:var(--ls-caps); }
.ib-score-top .ib-pill { margin-left:auto; }
.ib-score-cap { font-size:var(--fs-caption); margin-top:7px; line-height:var(--lh-snug); }

/* Where this wall sits among its siblings. A dot per device on a 0-100 axis,
   this one filled and labelled: the same pixels the meter used, carrying the
   comparison a lone score cannot make. */
/* Room above the bar for this device's flag (D-299). */
.ib-peers-track { position:relative; height:46px; margin-top:4px; }
.ib-peers-line { position:absolute; left:0; right:0; top:28px; height:10px;
  border-radius:var(--r-pill); overflow:hidden; background:linear-gradient(90deg,
    rgba(255,107,91,.55), rgba(243,156,18,.5), rgba(46,204,113,.55)); }
/* Banded axis. The gradient above is the degraded picture, drawn only when
   GET /schema/health did not load: a smooth ramp puts no boundary anywhere,
   so its colours land wherever they land relative to the engine's cutoffs.
   With the schema in hand the bar is cut at the real ones and the segment
   under a device always matches the status pill beside it. The boundaries are
   never written here - they arrive as percentages from app/schema. */
.ib-peers-line.is-banded { background:none; }
.ib-band { position:absolute; top:0; bottom:0; }
.ib-band + .ib-band { border-left:1px solid var(--bg2); }
.ib-band-red { background:rgba(255,107,91,.55); }
.ib-band-amber { background:rgba(243,156,18,.5); }
.ib-band-green { background:rgba(46,204,113,.3); }
.ib-band-green.is-strong { background:rgba(46,204,113,.6); }
.ib-band-grey { background:rgba(148,163,184,.3); }
/* Size comes from .ib-dimtext, which both of these carry. Declaring it here
   as well only looked like a decision: .ib-dimtext is declared later at the
   same specificity, so the value written here never applied. */
.ib-peers-legend { margin-top:3px; }
/* Peers are ticks, this device is the dot. Nine-pixel circles for every
   device turned into overlapping blobs the moment a building had ten of them,
   and ten identical markers on one axis read as ten values rather than as one
   value with its context. A tick carries the same position and cannot be
   mistaken for the score. */
.ib-peer-dot { position:absolute; top:25px; width:3px; height:16px; margin-left:-1.5px;
  border-radius:2px; background:var(--text); opacity:.6; box-shadow:0 0 0 1px var(--panel); }
.ib-dot-green { background:var(--green); } .ib-dot-amber { background:var(--amber); }
.ib-dot-red { background:var(--red); } .ib-dot-grey { background:var(--dim); }
/* This device: its score in a flag of its band's colour, pointing at a pin on
   the bar (D-299). The 13 px dot it replaces was lost on a bar that runs most
   of a wide screen, the more so sitting on a band's edge. Near either end the
   flag keeps inside the card and its point moves instead. */
.ib-peers-here { position:absolute; top:0; bottom:0; width:0; z-index:1; --here:var(--dim);
  --here-soft:rgba(148,163,184,.28); }
.ib-here-green { --here:var(--green); --here-soft:rgba(46,204,113,.28); }
.ib-here-amber { --here:var(--amber); --here-soft:rgba(243,156,18,.3); }
.ib-here-red { --here:var(--red); --here-soft:rgba(255,107,91,.3); }
.ib-peers-flag { position:absolute; bottom:24px; left:0; transform:translateX(-50%);
  padding:1px 9px; border-radius:var(--r-pill); background:var(--here); color:var(--bg);
  font-size:var(--fs-caption); font-weight:var(--fw-bold); line-height:1.45; white-space:nowrap;
  font-variant-numeric:tabular-nums; }
.ib-peers-flag::after { content:""; position:absolute; top:100%; left:50%; margin-left:-5px;
  border:5px solid transparent; border-top-color:var(--here); border-bottom-width:0; }
.ib-peers-here.is-start .ib-peers-flag { transform:none; left:-12px; }
.ib-peers-here.is-start .ib-peers-flag::after { left:12px; }
.ib-peers-here.is-end .ib-peers-flag { transform:none; left:auto; right:-12px; }
.ib-peers-here.is-end .ib-peers-flag::after { left:auto; right:7px; margin-left:0; }
.ib-peers-pin { position:absolute; top:24px; left:-9px; width:18px; height:18px; border-radius:50%;
  box-sizing:border-box; background:var(--here); border:3px solid var(--panel);
  box-shadow:0 0 0 3px var(--here-soft); }
/* The bands by name under the bar, this device's one in its colour. */
.ib-peers-words { position:relative; height:1.4em; margin-top:3px; font-size:var(--fs-micro); color:var(--dim); }
.ib-peers-word { position:absolute; top:0; transform:translateX(-50%); white-space:nowrap; }
.ib-peers-word.is-here { font-weight:var(--fw-bold); }
.ib-sg-health .ib-peers-words { grid-column:1 / -1; }
.ib-peers-scale { display:flex; justify-content:space-between; margin-top:2px; }
.ib-tone-green { color:var(--green); } .ib-tone-amber { color:var(--amber); }
.ib-tone-red { color:var(--red); } .ib-tone-grey { color:var(--muted); }

/* ── Simple: readings said in words ───────────────────────────────────────── */
.ib-explaingrid { display:grid; grid-template-columns:repeat(auto-fit,minmax(270px,1fr)); gap:12px; }
.ib-explain { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md);
  padding:14px 16px; }
.ib-explain-h { display:flex; align-items:center; gap:8px; font-size:var(--fs-caption); font-weight:var(--fw-semibold);
  text-transform:uppercase; letter-spacing:var(--ls-caps); color:var(--muted); }
.ib-explain-dir { margin-left:auto; text-transform:none; letter-spacing:0; font-size:var(--fs-caption); white-space:nowrap; }
.ib-explain-up { color:var(--amber); } .ib-explain-down { color:var(--blue); }
.ib-explain-flat { color:var(--dim); }
.ib-explain-m { font-size:var(--fs-body); line-height:var(--lh-body); margin-top:9px; }
.ib-explain-w { font-size:var(--fs-small); color:var(--muted); line-height:var(--lh-body); margin-top:7px;
  padding-top:7px; border-top:1px solid var(--border); }
.ib-explain-sum { border-left:3px solid var(--cyan); grid-column:1/-1; }
.ib-linkbtn { background:none; border:none; padding:0; color:var(--cyan); cursor:pointer;
  font-size:inherit; font-family:inherit; text-decoration:underline; }

@media (max-width:720px) {
  /* Stacked, so the 28px column gap becomes dead vertical space. */
  .ib-glance { gap:16px; }
}

/* Expert vitals: link state, analysis currency and the shape of the window.
   Metadata about the reading, not a reading, so it is a line rather than more
   cards - and an expert parses a dense line faster than three more boxes. */
.ib-vitals { font-size:var(--fs-small); line-height:var(--lh-loose); margin:10px 0 0;
  padding:9px 13px; background:var(--bg2); border:1px solid var(--border);
  border-radius:var(--r-sm); }
.ib-vitals b { color:var(--text); font-weight:var(--fw-semibold); }

/* Expert disclosure: the channels behind the first few charts. */
.ib-more { margin-top:10px; }
.ib-more > summary { cursor:pointer; color:var(--muted); font-size:var(--fs-small);
  padding:7px 12px; background:var(--bg2); border:1px solid var(--border);
  border-radius:var(--r-sm); list-style:none; }
.ib-more > summary::-webkit-details-marker { display:none; }
.ib-more > summary::before { content:"▸ "; color:var(--cyan); }
.ib-more[open] > summary::before { content:"▾ "; }
.ib-more > summary:hover { color:var(--text); border-color:var(--cyan); }

/* Expert jump strip: a dozen sections deep, the reader arrives wanting one. */
/* Positive top margin, deliberately. A -4px pull tightened the gap to the KPI
   strip above and put the chips' rounded borders straight across the bottom
   edge of the cards, so the two read as one overlapping mess. */
.ib-jump { display:flex; flex-wrap:wrap; gap:6px; margin:12px 0 4px; }
.ib-jump-l { background:var(--bg2); border:1px solid var(--border); border-radius:var(--r-pill);
  color:var(--muted); font-size:var(--fs-small); padding:4px 11px; cursor:pointer; }
.ib-jump-l:hover { color:var(--cyan); border-color:var(--cyan); }

/* ── Expert: one finding, as evidence ──────────────────────────────────── */
.ib-evidence .ib-valchips { display:flex; flex-wrap:wrap; gap:7px; margin-top:10px; }
.ib-valchip { background:var(--bg2); border:1px solid var(--border); border-radius:var(--r-xs);
  padding:4px 9px; font-size:var(--fs-small); }
.ib-valchip-k { color:var(--dim); margin-right:5px; }
.ib-valchip.is-driver { border-color:var(--amber); background:rgba(230,160,30,.10); }
.ib-valchip-u { color:var(--dim); margin-left:6px; }
.ib-pill-cyan { background:rgba(0,200,220,.14); color:var(--cyan); }


.ib-finding { display:flex; align-items:center; gap:12px; border-radius:var(--r-md); padding:15px 18px;
  margin-bottom:16px; border:1px solid var(--border); border-left-width:3px; background:var(--panel); }
.ib-finding-icon { display:inline-flex; align-items:center; flex-shrink:0; }
.ib-finding-text { font-size:var(--fs-title); font-weight:600; }
.ib-finding-good { border-left-color:var(--green); }
.ib-finding-info { border-left-color:var(--cyan); }
.ib-finding-warn { border-left-color:var(--amber); }
.ib-finding-crit { border-left-color:var(--red); }
.ib-finding-crit .ib-finding-text { color:var(--red); }
/* A finding with a second line: the state, then where to start (D-068). */
.ib-finding-body { display:flex; flex-direction:column; gap:4px; min-width:0; }
.ib-finding-sub { font-size:var(--fs-small); color:var(--muted); line-height:var(--lh-snug); }

.ib-h2-row { display:flex; align-items:baseline; gap:12px; margin:24px 0 12px; flex-wrap:wrap; }
/* The row owns the spacing, so the heading inside it must not add its own.
   Was repeated as style="margin:0" at six call sites. */
.ib-h2-row .ib-h2 { margin:0; }
.ib-h2-note { font-size:var(--fs-caption); color:var(--dim); }

/* ── Live Monitor: metadata grid, context cards, richer alerts ── */
.ib-metagrid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; }
.ib-meta { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); padding:12px 14px; }
.ib-meta-k { font-size:var(--fs-micro); text-transform:uppercase; letter-spacing:.6px; color:var(--muted); }
.ib-meta-v { font-size:var(--fs-lead); font-weight:var(--fw-semibold); margin-top:5px; word-break:break-word; }

.ib-ctxgrid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:14px; align-items:start; }
.ib-ctxcard { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); padding:15px 17px; }
.ib-ctx-head { font-size:var(--fs-body); font-weight:var(--fw-semibold); margin-bottom:10px; }
.ib-ctx-rows { display:flex; flex-direction:column; gap:7px; }
.ib-ctx-row { display:flex; justify-content:space-between; gap:12px; font-size:var(--fs-small); }
.ib-ctx-row span { color:var(--muted); }

.ib-alert-top { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.ib-alert-conf { font-size:var(--fs-caption); color:var(--dim); }
.ib-alert-meta { font-size:var(--fs-caption); color:var(--dim); margin-top:5px; }
.ib-alert.ib-sev-medium { border-left-color:var(--amber); }
.ib-alert.ib-sev-low,.ib-alert.ib-sev-info { border-left-color:var(--dim); }

/* ── Buildings: the building floor by floor (D-113) + hotspots ──
   Every floor drawn top first, each a small plan with north at the top; a
   device sits on the side its wall faces, in the engine's status colour. */
.ib-fl-sum { margin:0 0 10px; color:var(--muted); }
.ib-fl-building { display:flex; flex-direction:column; gap:6px; padding:12px 14px 14px;
  border:1px solid var(--border); border-radius:var(--r-md);
  background:linear-gradient(180deg, rgba(0,200,220,.05), transparent 45%), var(--panel); }
.ib-fl-roof { height:9px; margin:0 0 2px 120px; border-radius:8px 8px 0 0;
  background:linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.13), rgba(255,255,255,.04)); }
.ib-fl-floor { display:grid; grid-template-columns:108px minmax(0,1fr); gap:12px; align-items:stretch; }
.ib-fl-label { display:flex; flex-direction:column; justify-content:center; gap:2px; min-width:0; }
.ib-fl-label b { font-size:var(--fs-body); }
.ib-fl-label span { color:var(--dim); font-size:var(--fs-caption); line-height:1.3; }
.ib-fl-label .ib-fl-hot { display:inline-flex; align-items:center; gap:4px; color:var(--red); font-weight:var(--fw-semibold); }
/* A score more than a day old keeps its colour, faded and dashed: still there,
   but it cannot pass for today's (D-068). */
.ib-fl-slab { --fl-tone:rgba(150,160,170,.06); display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  grid-template-rows:repeat(3, minmax(24px, auto));
  grid-template-areas:"nw n ne" "w c e" "sw s se"; gap:4px; padding:8px 8px 8px 22px; position:relative;
  border-radius:10px; border:1px solid var(--border);
  background:linear-gradient(0deg, var(--fl-tone), var(--fl-tone)), rgba(255,255,255,.015);
  transition:box-shadow var(--dur) var(--ease); }
.ib-fl-floor.is-green .ib-fl-slab { --fl-tone:rgba(46,204,113,.07); border-color:rgba(46,204,113,.28); }
.ib-fl-floor.is-amber .ib-fl-slab { --fl-tone:rgba(243,156,18,.09); border-color:rgba(243,156,18,.38); }
.ib-fl-floor.is-red .ib-fl-slab { --fl-tone:rgba(231,76,60,.10); border-color:rgba(231,76,60,.5); }
.ib-fl-floor.is-hot .ib-fl-slab { box-shadow:0 0 0 2px rgba(231,76,60,.35), 0 0 18px rgba(231,76,60,.18); }
.ib-fl-cell { display:flex; flex-wrap:wrap; gap:4px; align-content:center; min-width:0; }
/* A small north mark on each floor's plan, so its top reads as north. */
.ib-fl-slab::before { content:"N"; position:absolute; left:7px; top:6px; font-size:9px; font-weight:var(--fw-bold);
  color:var(--dim); letter-spacing:.04em; }
.ib-fl-slab::after { content:""; position:absolute; left:9px; top:18px; width:1px; height:calc(100% - 26px);
  background:linear-gradient(180deg, var(--dim), transparent); opacity:.6; }
.ib-fl-cell.c-nw { grid-area:nw; }
.ib-fl-cell.c-n { grid-area:n; justify-content:center; }
.ib-fl-cell.c-ne { grid-area:ne; justify-content:flex-end; }
.ib-fl-cell.c-w { grid-area:w; }
.ib-fl-cell.c-c { grid-area:c; justify-content:center; }
.ib-fl-cell.c-e { grid-area:e; justify-content:flex-end; }
.ib-fl-cell.c-sw { grid-area:sw; }
.ib-fl-cell.c-s { grid-area:s; justify-content:center; }
.ib-fl-cell.c-se { grid-area:se; justify-content:flex-end; }
.ib-fl-dev { display:inline-flex; align-items:center; gap:6px; max-width:100%; padding:5px 10px;
  border-radius:var(--r-pill); border:1px solid var(--border); background:var(--panel2); color:var(--text);
  font:inherit; font-size:var(--fs-small); cursor:pointer;
  transition:transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); }
.ib-fl-dev:hover { transform:translateY(-1px); box-shadow:0 4px 12px rgba(0,0,0,.3); }
.ib-fl-dev:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
.ib-fl-dot { width:9px; height:9px; border-radius:50%; flex:0 0 auto; background:var(--dim); }
.ib-fl-dev.is-green .ib-fl-dot { background:var(--green); box-shadow:0 0 0 3px rgba(46,204,113,.18); }
.ib-fl-dev.is-amber .ib-fl-dot { background:var(--amber); box-shadow:0 0 0 3px rgba(243,156,18,.2); }
.ib-fl-dev.is-red .ib-fl-dot { background:var(--red); box-shadow:0 0 0 3px rgba(231,76,60,.22); }
.ib-fl-dev.is-red:not(.is-stale) .ib-fl-dot { animation:ib-fl-pulse 2s var(--ease-out) infinite; }
@keyframes ib-fl-pulse { 0% { box-shadow:0 0 0 0 rgba(231,76,60,.55); } 70%,100% { box-shadow:0 0 0 8px rgba(231,76,60,0); } }
.ib-fl-room { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.ib-fl-risk { font-variant-numeric:tabular-nums; }
.ib-fl-dev.is-green .ib-fl-risk { color:var(--green); }
.ib-fl-dev.is-amber .ib-fl-risk { color:var(--amber); }
.ib-fl-dev.is-red .ib-fl-risk { color:var(--red); }
.ib-fl-dev.is-grey .ib-fl-risk { color:var(--muted); }
.ib-fl-dev.is-stale { opacity:.62; border-style:dashed; }
.ib-fl-alerts { display:inline-flex; align-items:center; gap:2px; color:var(--red); font-size:var(--fs-caption);
  font-weight:var(--fw-bold); }
.ib-fl-age { color:var(--dim); font-size:var(--fs-micro); white-space:nowrap; }
.ib-fl-gap { display:grid; grid-template-columns:108px minmax(0,1fr); gap:12px; align-items:center;
  color:var(--dim); font-size:var(--fs-caption); }
.ib-fl-gap i { font-style:normal; height:20px; display:flex; align-items:center; padding-left:10px;
  border-radius:8px; border:1px dashed var(--border); }
.ib-fl-unplaced { margin-top:10px; }
.ib-fl-list { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.ib-fl-legend { display:flex; flex-wrap:wrap; gap:8px 16px; margin-top:10px; color:var(--muted); font-size:var(--fs-caption); }
.ib-fl-legend i { display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:6px; }
.ib-fl-legend i.is-green { background:var(--green); }
.ib-fl-legend i.is-amber { background:var(--amber); }
.ib-fl-legend i.is-red { background:var(--red); }
.ib-fl-legend i.is-grey { background:var(--dim); }
.ib-fl-legend i.is-stale { background:transparent; border:1px dashed var(--muted); }

/* ── Floor by floor from the IFC (D-287) ──
   Each floor a section: its plan cut from the model, its devices where they
   are pinned, what each reads now; a strip of the floors leads to any. */
.ib-fs-mode { margin:0 0 12px; }
.ib-fs { container-type:inline-size; display:flex; flex-direction:column; gap:10px; }
.ib-fs-head { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:6px 14px; }
.ib-fs-head .ib-fl-sum { margin:0; }
.ib-fs-live { display:inline-flex; align-items:center; gap:7px; color:var(--muted); font-size:var(--fs-caption); }
.ib-fs-live i, .ib-fs-dot { display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--green);
  box-shadow:0 0 0 3px rgba(46,204,113,.18); }
.ib-fs-body { display:grid; grid-template-columns:64px minmax(0, 1fr); gap:12px; align-items:start; }
.ib-fs-nav { position:sticky; top:72px; display:flex; flex-direction:column; gap:3px; padding:6px; border:1px solid var(--border);
  border-radius:var(--r-md); background:var(--panel); max-height:calc(100vh - 100px); overflow:auto; }
.ib-fs-navfl { display:flex; flex-direction:column; align-items:center; gap:3px; min-height:40px; padding:5px 2px; border:1px solid transparent;
  border-radius:7px; background:var(--panel2); color:var(--muted); font:inherit; cursor:pointer; }
.ib-fs-navfl b { font-size:var(--fs-small); font-variant-numeric:tabular-nums; }
.ib-fs-navfl span { display:flex; flex-wrap:wrap; justify-content:center; gap:2px; max-width:48px; }
.ib-fs-navfl span i { width:6px; height:6px; border-radius:50%; background:var(--dim); }
.ib-fs-navfl span i.is-green { background:var(--green); } .ib-fs-navfl span i.is-amber { background:var(--amber); }
.ib-fs-navfl span i.is-red { background:var(--red); }
.ib-fs-navfl span small { font-size:9px; color:var(--muted); }
.ib-fs-navfl.has-dev { color:var(--text); border-color:var(--border); }
.ib-fs-navfl.has-dev.is-red { border-color:rgba(255,107,91,.55); }
.ib-fs-navfl.has-dev.is-amber { border-color:rgba(243,156,18,.5); }
.ib-fs-navfl:hover, .ib-fs-navfl:focus-visible { border-color:var(--cyan); outline:none; }
.ib-fs-floors { display:flex; flex-direction:column; gap:10px; min-width:0; }
.ib-fs-floor { border:1px solid var(--border); border-left:3px solid var(--border); border-radius:var(--r-md); background:var(--panel);
  scroll-margin-top:80px; }
.ib-fs-floor.is-green { border-left-color:var(--green); } .ib-fs-floor.is-amber { border-left-color:var(--amber); }
.ib-fs-floor.is-red { border-left-color:var(--red); }
.ib-fs-fhead { display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; padding:10px 12px; }
.ib-fs-num { flex:none; display:grid; place-items:center; width:40px; height:36px; border-radius:8px; background:var(--panel2);
  border:1px solid var(--border); font-size:var(--fs-lead); font-weight:var(--fw-bold); font-variant-numeric:tabular-nums; }
.ib-fs-ftitle { display:flex; flex-direction:column; min-width:0; flex:1 1 180px; }
.ib-fs-ftitle b { font-size:var(--fs-lead); }
.ib-fs-ftitle small { color:var(--muted); font-size:var(--fs-caption); }
.ib-fs-count { color:var(--muted); font-size:var(--fs-small); }
.ib-fs-count b.is-red { color:var(--red); } .ib-fs-count b.is-amber { color:var(--amber); } .ib-fs-count b.is-green { color:var(--green); }
.ib-fs-acts { display:inline-flex; gap:6px; margin-left:auto; }
.ib-fs-fbody { display:grid; grid-template-columns:minmax(0, 1fr); gap:12px; padding:0 12px 12px; }
@container (min-width:820px) { .ib-fs-fbody { grid-template-columns:minmax(0, 1.75fr) minmax(250px, 1fr); } }
.ib-fs-plan { min-height:220px; border:1px solid var(--border); border-radius:var(--r-sm); background:#0e1c2a; overflow:hidden;
  display:flex; align-items:center; justify-content:center; }
.ib-fs-svg { display:block; width:100%; height:auto; max-height:520px; }
.ib-fs-slab { fill:#1a2c3f; }
.ib-fs-room { fill:rgba(0,200,220,.06); stroke:rgba(0,200,220,.35); stroke-width:.12; stroke-dasharray:.5 .35; }
.ib-fs-cut { fill:#c9d6e2; stroke:none; }
.ib-fs-cut.is-other { fill:#7d8c9c; }
.ib-fs-cut.is-slab { fill:#55687c; }
.ib-fs-cut.is-open { fill:none; stroke:#c9d6e2; }
.ib-fs-win { fill:rgba(52,152,219,.35); stroke:#59b6f0; }
.ib-fs-door { fill:none; stroke:#d9a066; }
.ib-fs-rname { fill:#9fb2c4; text-anchor:middle; font-weight:600; paint-order:stroke; stroke:#0e1c2a; stroke-width:.25; }
.ib-fs-rarea { fill:#6f8296; text-anchor:middle; paint-order:stroke; stroke:#0e1c2a; stroke-width:.2; }
.ib-fs-scale path { fill:none; stroke:#9fb2c4; }
.ib-fs-scale text { fill:#9fb2c4; text-anchor:middle; }
.ib-fs-pin { cursor:pointer; outline:none; }
.ib-fs-pin .ib-fs-mark { fill:var(--dim); stroke:#fff; }
.ib-fs-pin.is-green .ib-fs-mark { fill:var(--green); } .ib-fs-pin.is-amber .ib-fs-mark { fill:var(--amber); }
.ib-fs-pin.is-red .ib-fs-mark { fill:var(--red); }
.ib-fs-pin.is-stale .ib-fs-mark { fill-opacity:.55; stroke-dasharray:.6 .4; }
.ib-fs-pin .ib-fs-wall { fill:#fff; }
.ib-fs-pin .ib-fs-lead { stroke:#fff; stroke-opacity:.8; }
.ib-fs-pin .ib-fs-health { fill:#0d1a28; font-weight:700; text-anchor:middle; }
.ib-fs-pin.is-red .ib-fs-health { fill:#fff; }
.ib-fs-pin .ib-fs-label { fill:#e4eff5; font-weight:600; paint-order:stroke; stroke:#0e1c2a; stroke-width:.45; }
.ib-fs-pin .ib-fs-vals { fill:#00c8dc; font-weight:600; paint-order:stroke; stroke:#0e1c2a; stroke-width:.45; }
.ib-fs-pin:hover .ib-fs-mark, .ib-fs-pin:focus-visible .ib-fs-mark { stroke:var(--cyan); }
.ib-fs-devs { display:flex; flex-direction:column; gap:4px; min-width:0; }
.ib-fs-dev { display:flex; align-items:center; gap:10px; width:100%; min-height:48px; padding:8px 10px; border:1px solid var(--border);
  border-radius:var(--r-sm); background:var(--panel2); color:var(--text); font:inherit; text-align:left; cursor:pointer; }
.ib-fs-dev:hover, .ib-fs-dev:focus-visible { border-color:var(--cyan); outline:none; }
.ib-fs-dev.is-stale { opacity:.75; }
.ib-fs-dev-main { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; }
.ib-fs-dev-main b { font-weight:var(--fw-semibold); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ib-fs-dev-main small { color:var(--muted); font-size:var(--fs-caption); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ib-fs-dev-now { flex:none; display:flex; flex-direction:column; align-items:flex-end; text-align:right; }
.ib-fs-dev-now b { color:var(--cyan); font-variant-numeric:tabular-nums; font-size:var(--fs-body); }
.ib-fs-dev-now small { display:inline-flex; align-items:center; gap:5px; color:var(--muted); font-size:var(--fs-caption); }
.ib-fs-dev-now.is-old b { color:var(--muted); }
.ib-fs-else { display:flex; flex-direction:column; gap:6px; padding:10px 12px; border:1px dashed var(--border); border-radius:var(--r-md); }
.ib-fs-else > div { display:flex; flex-wrap:wrap; gap:6px; }
@media (max-width:600px) {
  .ib-fs-body { grid-template-columns:minmax(0, 1fr); }
  .ib-fs-nav { position:static; flex-direction:row; overflow-x:auto; max-height:none; }
  .ib-fs-navfl { min-width:44px; }
  .ib-fs-acts { margin-left:0; width:100%; }
  .ib-fs-acts .ib-btn { flex:1 1 0; justify-content:center; min-height:44px; }
}
.ib-fl-compass { flex-basis:100%; color:var(--dim); }
.ib-fl-dir { display:none; font-size:var(--fs-micro); font-weight:var(--fw-bold); color:var(--muted);
  letter-spacing:.04em; }
/* On a phone the plan becomes a list, north first, each device with its
   direction: three columns left the room names no width at all. */
@media (max-width:640px) {
  .ib-fl-floor, .ib-fl-gap { grid-template-columns:minmax(0,1fr); gap:6px; }
  .ib-fl-roof { margin-left:0; }
  .ib-fl-slab { display:flex; flex-direction:column; gap:4px; }   /* cells come north first */
  .ib-fl-cell, .ib-fl-cell.c-n, .ib-fl-cell.c-ne, .ib-fl-cell.c-c, .ib-fl-cell.c-e,
  .ib-fl-cell.c-s, .ib-fl-cell.c-se { justify-content:flex-start; }
  .ib-fl-cell:empty { display:none; }
  .ib-fl-dir { display:inline; }
}
@media (prefers-reduced-motion: reduce) {
  .ib-fl-dev.is-red .ib-fl-dot { animation:none !important; }
}

a.ib-chip { text-decoration:none; }
a.ib-chip:hover, a.ib-chip:focus-visible { filter:brightness(1.15); }
.ib-chip-dim { color:var(--muted); background:rgba(150,160,170,.08); }

.ib-hotspots { display:flex; flex-direction:column; gap:10px; }
.ib-hotspot { background:var(--panel); border:1px solid var(--border); border-left:3px solid var(--red);
  border-radius:var(--r-md); padding:13px 16px; }
.ib-hotspot-head { font-weight:600; font-size:var(--fs-body); }
.ib-hotspot-bricks { display:flex; flex-wrap:wrap; gap:7px; margin-top:9px; }

/* ── Settings: storage breakdown ── */
.ib-storage { display:flex; flex-direction:column; gap:7px; }
.ib-storage-row { display:grid; grid-template-columns:150px 1fr 78px 84px; align-items:center;
  gap:12px; background:var(--panel); border:1px solid var(--border); border-radius:var(--r-sm);
  padding:9px 13px; font-size:var(--fs-small); }
.ib-storage-name { font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ib-storage-bar { background:var(--bg2); border-radius:var(--r-xs); height:8px; overflow:hidden; }
.ib-storage-bar div { background:var(--cyan); height:100%; }
.ib-storage-size { text-align:right; color:var(--muted); }
.ib-storage-rows { text-align:right; color:var(--dim); font-size:11px; }
@media (max-width:720px) {
  .ib-storage-row { grid-template-columns:1fr 70px; }
  .ib-storage-bar,.ib-storage-rows { display:none; }
}

/* ── 2B.1: modal forms, settings, user management ── */
.ib-modal-form { width:520px; max-width:94vw; max-height:88vh; overflow:auto; }
.ib-modal-title { font-size:16px; margin:0 0 16px; }
.ib-form textarea { background:var(--bg2); border:1px solid var(--border); border-radius:var(--r-sm);
  padding:9px 11px; color:var(--text); font-size:var(--fs-body); font-family:inherit; resize:vertical; }
.ib-form input:focus,.ib-form select:focus,.ib-form textarea:focus { outline:none; border-color:var(--cyan); }
.ib-form input[readonly] { color:var(--muted); }
.ib-form-help { color:var(--dim); font-size:11px; line-height:1.45; }
.ib-form-err { color:var(--red); font-size:var(--fs-small); background:rgba(231,76,60,.08);
  border:1px solid rgba(231,76,60,.3); border-radius:var(--r-sm); padding:9px 11px; }
.ib-form-check { flex-direction:row !important; align-items:center; gap:8px !important; }
.ib-form-card { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); padding:18px; }
.ib-form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:14px; }
.ib-form-actions { display:flex; justify-content:flex-end; margin-top:16px; }
/* Reports cards had no rule, so their descriptions rendered at the 16px
   full-brightness default while every equivalent card subtitle in the app is
   12px muted - the page read as belonging to a different product. */
.ib-report { display:flex; flex-direction:column; }
.ib-report-desc { color:var(--muted); font-size:var(--fs-small); line-height:1.5; margin-top:8px; flex:1; }

.ib-panel-bar { display:flex; gap:8px; flex-wrap:wrap; }
td.ib-actions { display:flex; gap:6px; flex-wrap:wrap; }

/* ── Analytics workbench (trends, energy, alert analytics, compare) ── */
.ib-chip-tog { cursor:pointer; background:var(--panel); color:var(--muted); font-family:inherit; }
.ib-chip-tog:hover:not(:disabled) { border-color:rgba(0,200,220,.45); color:var(--text); }
.ib-chip-tog.on { color:var(--cyan); background:rgba(0,200,220,.12); border-color:rgba(0,200,220,.4); }
.ib-chip-tog:disabled { opacity:.4; cursor:not-allowed; }
.ib-chip-dot { display:inline-block; width:8px; height:8px; border-radius:50%;
  margin-right:7px; vertical-align:middle; }
/* Channel toggles sat directly on top of the chart grid with no separation, so
   the controls and the charts they drive read as one collided block. */
.ib-chips-toolbar { padding-bottom:16px; margin-bottom:22px;
  border-bottom:1px solid var(--border); }

.ib-chartgrid { display:grid; grid-template-columns:repeat(auto-fit,minmax(340px,1fr)); gap:14px; }
.ib-chartbox { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); padding:12px 14px; }
.ib-chartbox .ib-chart { background:transparent; border:none; padding:0; }
.ib-chartbox-t { font-size:var(--fs-caption);
  color:var(--muted); margin-bottom:8px; font-weight:var(--fw-semibold); }
/* ── Energy inefficiency scale ──
   A bare "62/100" is unreadable on an inverted scale, and reads as good to
   anyone used to the health and confidence scores elsewhere in the product.
   The banded track puts the number in context: the five engine bands to scale,
   with a marker where this wall sits. */
.ib-escale { background:var(--panel); border:1px solid var(--border);
  border-radius:var(--r-md); padding:15px 17px; }
.ib-escale-head { display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.ib-escale-v { font-size:30px; font-weight:800; line-height:1; }
.ib-escale-v span { font-size:14px; color:var(--dim); font-weight:600; margin-left:2px; }
.ib-escale-green { color:var(--green); } .ib-escale-amber { color:var(--amber); }
.ib-escale-red { color:var(--red); }
.ib-escale-band { font-size:13px; font-weight:600; color:var(--text); }
.ib-escale-delta { margin-left:auto; font-size:12px; color:var(--muted); white-space:nowrap; }
.ib-ebands { position:relative; display:flex; gap:2px; height:26px; }
.ib-eband { position:relative; display:flex; align-items:center; justify-content:center;
  min-width:0; overflow:hidden; }
.ib-eband:first-child { border-radius:var(--r-xs) 0 0 var(--r-xs); } .ib-eband:last-child { border-radius:0 var(--r-xs) var(--r-xs) 0; }
.ib-eband-green { background:rgba(46,204,113,.22); } .ib-eband-amber { background:rgba(243,156,18,.22); }
.ib-eband-red { background:rgba(231,76,60,.22); }
.ib-eband-l { font-size:var(--fs-micro);
  color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; padding:0 4px; }
/* Marker sits on the track, so it must not be clipped by a band's overflow. */
.ib-emarker { position:absolute; top:-3px; bottom:-3px; width:3px; border-radius:2px;
  background:var(--text); box-shadow:0 0 0 2px var(--panel); transform:translateX(-1.5px);
  transition:left var(--dur-slow) var(--ease-out); }
@media (max-width:720px) { .ib-eband-l { display:none; } }

.ib-ctx-hint { font-size:var(--fs-micro); text-transform:uppercase; letter-spacing:.5px;
  color:var(--dim); font-weight:var(--fw-semibold); margin-left:auto; }
.ib-ctx-head { display:flex; align-items:center; gap:7px; }

.ib-statgrid td.ib-statspark { width:130px; padding:4px 14px; }
.ib-statgrid .ib-spark { height:22px; margin:0; }
.ib-dimtext { color:var(--dim); font-size:var(--fs-caption); margin-left:4px; }

/* ── Region insights + region/state scope (Overview) ── */
/* One row per region, not a card that rotates through them: the comparison a
   multi-region portfolio exists to make is between regions, and a carousel
   makes that a memory test. */
.ib-regions { min-width:300px; max-width:360px; display:flex; flex-direction:column; gap:2px;
  background:rgba(13,26,40,.55); border:1px solid var(--border); border-radius:var(--r-md);
  padding:12px 14px; }
.ib-regions-head { display:flex; align-items:center; justify-content:space-between;
  gap:10px; margin-bottom:6px; }
.ib-regions-title { font-size:var(--fs-micro); text-transform:uppercase; letter-spacing:.7px; color:var(--cyan); }
/* This panel ignores the region filter on purpose, because it is how you find a
   region. Saying so stops it being read as a second opinion on the numbers to
   its left, which is exactly how "Italy: 0 alerts" beside a scoped "2 critical
   alerts" gets read. */
.ib-regions-scope { font-size:var(--fs-micro); text-transform:uppercase; letter-spacing:.5px;
  color:var(--dim); border:1px solid var(--border); border-radius:var(--r-pill);
  padding:2px 8px; cursor:help; white-space:nowrap; }
.ib-region-cols, .ib-region-row { display:flex; align-items:center; gap:10px; width:100%; }
/* 9px, not 8: the rows carry a 1px transparent border for their hover state,
   so the header needs the same pixel back to sit over them. */
.ib-region-cols { padding:0 9px 5px; border-bottom:1px solid var(--border);
  margin-bottom:2px; }
.ib-region-cols .ib-region-name, .ib-region-cols .ib-region-stat {
  font-size:var(--fs-micro); font-weight:600; text-transform:uppercase; letter-spacing:.5px;
  color:var(--dim); }
.ib-region-row { padding:7px 8px; border:1px solid transparent; border-radius:var(--r-sm);
  background:none; color:inherit; font:inherit; text-align:left; cursor:pointer;
  transition:border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.ib-region-row:hover, .ib-region-row:focus-visible {
  border-color:rgba(0,200,220,.45); background:rgba(0,200,220,.06); }
/* The flag and the header's empty first cell share a width, so "Region" sits
   over the country names rather than over the badges. */
.ib-region-flagcell { flex:0 0 28px; margin-right:0; text-align:center; }
.ib-region-name { flex:1 1 auto; min-width:0; font-size:var(--fs-body); font-weight:600;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* Fixed widths: the numbers line up under their heading instead of wandering
   with the length of the value above them. */
.ib-region-stat { display:flex; justify-content:flex-end; text-align:right; }
.ib-rs-health { flex:0 0 42px; }
.ib-rs-live { flex:0 0 58px; }
.ib-rs-alerts { flex:0 0 40px; }
.ib-region-stat b { font-size:14px; font-weight:700; color:var(--text);
  font-variant-numeric:tabular-nums; }
.ib-region-stat b i { font-style:normal; font-size:11px; color:var(--dim); }
.ib-region-stat.ib-danger b { color:var(--red); }
.ib-region-stat.ib-warnstat b { color:var(--amber); }
.ib-region-stat.is-quiet b { color:var(--dim); }
/* The affordance, per row. A chevron would promise a region page we do not
   have, so the active row swaps it for the way back out of the filter. */
.ib-region-go { flex:0 0 12px; text-align:center; font-size:15px; line-height:1;
  color:var(--dim); }
.ib-region-row:hover .ib-region-go, .ib-region-row:focus-visible .ib-region-go {
  color:var(--cyan); }
.ib-region-row.is-active { border-color:rgba(0,200,220,.5); background:rgba(0,200,220,.08); }
.ib-region-row.is-active .ib-region-go { color:var(--cyan); font-size:11px; }
.ib-regions-foot { display:flex; align-items:baseline; justify-content:space-between;
  gap:8px; font-size:var(--fs-micro); color:var(--dim); padding:7px 8px 0; }
.ib-regions-more { white-space:nowrap; }
@media (max-width:760px) {
  .ib-region-cols, .ib-region-row { gap:8px; }
  .ib-rs-live { flex:0 0 52px; }
  /* min-width:auto keeps a flex item from shrinking below its own text, so at
     this width "Reporting" was three pixels wider than the column it heads and
     pushed the header out of line with the rows. */
  .ib-region-cols .ib-region-stat { font-size:9px; letter-spacing:.3px; }
}
/* On a phone the fixed columns and the card's padding left the name about
   43 px: "Ger..." (D-180). After the 760 px block, which it narrows further. */
@media (max-width:600px) {
  .ib-regions { padding:10px; }
  .ib-region-cols, .ib-region-row { gap:6px; }
  .ib-region-row { padding:7px 4px; }
  .ib-region-cols { padding:0 5px 5px; }
  .ib-rs-health { flex:0 0 32px; }
  .ib-rs-live { flex:0 0 46px; }
  .ib-rs-alerts { flex:0 0 28px; }
  .ib-region-cols .ib-region-stat { font-size:8.5px; letter-spacing:.2px; }
}

.ib-regionbar { display:flex; align-items:center; justify-content:space-between; gap:14px;
  flex-wrap:wrap; background:var(--panel); border:1px solid var(--border);
  border-radius:var(--r-md); padding:11px 16px; margin-bottom:16px; }
.ib-regionbar-view { display:flex; align-items:center; gap:7px; font-size:var(--fs-small); color:var(--muted); }
.ib-regionbar-view b { color:var(--text); }
.ib-regionbar-count { color:var(--dim); font-size:var(--fs-caption); }
.ib-regionbar-ctrl { display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  font-size:var(--fs-small); color:var(--muted); }

/* ── AI Insights ──
   D-244: one header row (title, scope, the conversation's tools); the status
   in a column beside the conversation on a wide screen and above it on a
   narrow one; answers set as text rather than cards inside cards; the answer
   style on the composer. */
/* The page ends where the conversation panel does, so the panel can be sized to
   the window without leaving the page a few pixels of scroll. */
.ib-main:has(.ib-ai-page) { padding-bottom:16px; }

/* Header row: title, building and focus, then History, Export and Clear. */
.ib-ai-top { display:flex; align-items:center; flex-wrap:wrap; gap:10px 18px; margin:2px 0 14px; }
.ib-ai-top .ib-page-title { margin:0; }
.ib-ai-top .ib-ai-bar { flex:1 1 420px; min-width:0; margin:0; gap:8px 14px; }
/* The two pickers share a row and shrink before either wraps under the other. */
.ib-ai-bar > .ib-ai-scopepanel > label { display:inline-flex; align-items:center; flex:1 1 200px; max-width:340px; min-width:0;
  color:var(--dim); font-size:var(--fs-caption); }
.ib-ai-bar .ib-select { flex:1 1 auto; width:100%; min-width:0; background:var(--panel); border-radius:var(--r-sm); }
.ib-ai-bar .ib-select:hover { border-color:#30425a; }
.ib-ai-tools { margin-left:auto; }
.ib-ai-head { position:relative; display:flex; align-items:center; gap:6px; }
.ib-ai-head .ib-btn { background:transparent; border-color:transparent; color:var(--muted); }
.ib-ai-head .ib-btn:hover:not(:disabled) { background:rgba(255,255,255,.06); color:var(--text); }
.ib-ai-head .ib-btn:focus-visible { outline:2px solid var(--cyan); outline-offset:1px; }
/* The liveness line beside the pickers: the status column says it on a wide
   screen, so there it shows only while the next scope loads. */
.ib-ai-collector { color:var(--dim); font-size:var(--fs-caption); }
.ib-ai-collector .ib-loading { display:inline-flex; align-items:center; }
.ib-ai-page.is-wide .ib-ai-collector:not(:has(.ib-loading)) { display:none; }

/* ── Workspace: conversation and status ── */
.ib-ai { display:flex; flex-direction:column; gap:10px; }
.ib-ai.is-wide { display:grid; grid-template-columns:minmax(0,1fr) clamp(272px, 27%, 330px);
  grid-template-areas:"convo side"; gap:16px; align-items:start; }
.ib-ai.is-wide .ib-convo { grid-area:convo; }
.ib-ai.is-wide .ib-ai-side { grid-area:side; max-height:var(--ai-h, 640px); overflow-y:auto;
  scrollbar-width:thin; border-radius:var(--r-lg); }
/* The page being left while the next scope loads: kept in place, dimmed. */
.ib-ai.is-loading { opacity:.5; transition:opacity var(--dur-fast) var(--ease); }

/* Status: the verdict from sensor data, the devices, what answers draw on. */
.ib-aisum { --tone:var(--dim); position:relative; background:var(--panel); border:1px solid var(--border);
  border-radius:var(--r-md); padding:10px 14px; box-shadow:inset 3px 0 0 var(--tone); }
.ib-aisum-good { --tone:var(--green); }
.ib-aisum-warn { --tone:var(--amber); }
.ib-aisum-crit { --tone:var(--red); }
.ib-aisum-head { display:flex; align-items:center; gap:10px; min-width:0; }
.ib-aisum-head .ib-pill { flex:none; }
.ib-aisum-title { flex:1 1 auto; min-width:0; font-size:var(--fs-lead); font-weight:var(--fw-semibold); line-height:var(--lh-snug); }
.ib-aisum.is-collapsed .ib-aisum-title { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ib-aisum-toggle { flex:none; display:inline-flex; align-items:center; gap:4px; padding:4px 6px;
  background:none; border:0; border-radius:var(--r-xs); color:var(--muted); font:inherit; font-size:var(--fs-caption); cursor:pointer; }
.ib-aisum-toggle:hover { color:var(--text); }
.ib-aisum-toggle:focus-visible { outline:2px solid var(--cyan); outline-offset:1px; }
.ib-aisum-toggle[aria-expanded="true"] .ib-icon { transform:rotate(180deg); }
.ib-aisum-explain { flex:none; }
.ib-aisum-more { margin-top:8px; }
.ib-aisum-body { color:var(--muted); font-size:var(--fs-small); line-height:var(--lh-body); }
.ib-aisum-meta { color:var(--text); font-size:var(--fs-caption); line-height:var(--lh-snug); margin-top:8px;
  padding:8px 10px; border-radius:var(--r-sm); background:rgba(255,255,255,.035); }
.ib-aisum-tag { display:flex; align-items:center; gap:6px; margin-top:8px; font-size:var(--fs-micro); color:var(--dim); }
/* Wide: a column of its own, the verdict on top, nothing folded. */
.ib-ai.is-wide .ib-aisum { border-radius:var(--r-lg); padding:16px; box-shadow:inset 0 3px 0 var(--tone); }
.ib-ai.is-wide .ib-aisum-head { flex-wrap:wrap; align-items:flex-start; gap:8px; }
.ib-ai.is-wide .ib-aisum-title { flex-basis:100%; }
.ib-ai.is-wide .ib-aisum-toggle { display:none; }
.ib-ai.is-wide .ib-aisum-explain { order:3; }
.ib-ai:not(.is-wide) .ib-ai-sect { display:none; }

.ib-ai-sect { margin-top:16px; padding-top:14px; border-top:1px solid var(--border); }
.ib-ai-sect-h { display:flex; justify-content:space-between; align-items:baseline; gap:8px; margin-bottom:8px;
  font-size:var(--fs-micro); font-weight:var(--fw-semibold); letter-spacing:var(--ls-caps); text-transform:uppercase; color:var(--dim); }
.ib-ai-sect-h span + span { text-transform:none; letter-spacing:0; font-weight:var(--fw-medium); }
.ib-ai-sect-more { margin-top:8px; font-size:var(--fs-micro); color:var(--dim); line-height:var(--lh-snug); }
.ib-ai-rows { list-style:none; margin:0 -8px; padding:0; display:flex; flex-direction:column; gap:1px; }
.ib-ai-row { width:100%; display:flex; align-items:center; gap:10px; padding:7px 8px; border:0; border-radius:var(--r-sm);
  background:none; color:var(--text); font:inherit; text-align:left; cursor:pointer;
  transition:background var(--dur-fast) var(--ease); }
.ib-ai-row:hover { background:rgba(255,255,255,.045); }
.ib-ai-row:focus-visible { outline:2px solid var(--cyan); outline-offset:-2px; }
.ib-ai-row.is-on { background:rgba(0,200,220,.1); box-shadow:inset 2px 0 0 var(--cyan); cursor:default; }
.ib-ai-row-dot { flex:none; width:8px; height:8px; border-radius:50%; }
.ib-ai-row-dot.is-live { background:var(--green); box-shadow:0 0 0 3px rgba(46,204,113,.14); }
.ib-ai-row-dot.is-off { border:1.5px solid var(--dim); }
.ib-ai-row-ic { flex:none; display:inline-grid; place-items:center; width:8px; color:var(--cyan); }
.ib-ai-row-name { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:1px; }
.ib-ai-row-name b, .ib-ai-row-name small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ib-ai-row-name b { font-size:var(--fs-small); font-weight:var(--fw-semibold); }
.ib-ai-row-name small { font-size:var(--fs-micro); color:var(--dim); }
.ib-ai-row-h { flex:none; min-width:26px; text-align:right; font-size:var(--fs-small); font-weight:var(--fw-bold);
  font-variant-numeric:tabular-nums; }
.ib-ai-row-h.is-good { color:var(--green); }
.ib-ai-row-h.is-warn { color:var(--amber); }
.ib-ai-row-h.is-crit { color:var(--red); }
.ib-ai-row-h.is-none { color:var(--dim); font-weight:var(--fw-regular); }
.ib-ai-reads { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px;
  font-size:var(--fs-small); line-height:var(--lh-snug); color:var(--muted); }
.ib-ai-reads li { display:flex; align-items:flex-start; gap:9px; }
.ib-ai-reads .ib-icon { color:var(--cyan); margin-top:1px; opacity:.85; }

/* ── Conversation panel ──
   Transcript and composer in one column whose height pages_ai.js fits to the
   window, so the composer is on screen when the page opens and stays pinned
   under a transcript that scrolls inside. The height here is only the
   fallback until that measurement runs. */
.ib-convo { display:flex; flex-direction:column; height:min(70vh, 640px); min-width:0;
  background:var(--bg2); border:1px solid var(--border); border-radius:var(--r-lg); overflow:hidden; }
/* No scroll-behavior:smooth here. Pinning the transcript to the newest message
   is a correctness concern, and a smooth scroll is an animation - it does not
   complete in a document whose timeline is not running (a background tab),
   leaving the newest reply off-screen. */
.ib-thread { display:flex; flex-direction:column; align-items:center; gap:18px; flex:1 1 auto; min-height:0;
  overflow-y:auto; padding:22px 24px 18px; scrollbar-width:thin; }
/* Centred by its own auto margins, not justify-content: a centred flex column
   taller than the panel overflows upwards, where it cannot be scrolled to. */
.ib-thread > * { width:min(780px, 100%); flex:none; }
/* The transcript's frame: it positions the jump button and a device link's menu
   over the scrolling transcript without scrolling with it. */
.ib-thread-wrap { position:relative; display:flex; flex-direction:column; flex:1 1 auto; min-height:0; }
.ib-ai-jump { position:absolute; left:50%; bottom:10px; transform:translateX(-50%); z-index:2;
  display:inline-flex; align-items:center; gap:5px; padding:6px 12px; border-radius:var(--r-pill);
  border:1px solid rgba(0,200,220,.4); background:var(--panel); color:var(--cyan); font:inherit; font-size:var(--fs-caption);
  cursor:pointer; box-shadow:0 4px 14px rgba(0,0,0,.35); }
.ib-ai-jump[hidden] { display:none; }
.ib-ai-jump:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
.ib-thread::-webkit-scrollbar { width:8px; }
.ib-thread::-webkit-scrollbar-thumb { background:var(--border); border-radius:var(--r-xs); }
/* Taking back a removal: a cleared conversation, or messages dropped to edit or
   re-ask a question. */
.ib-ai-undo { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap;
  padding:6px 8px 6px 12px; border:1px dashed var(--border); border-radius:var(--r-sm); color:var(--muted); font-size:var(--fs-small); }

/* The assistant's mark: the brand's circuit cyan into its brick. */
.ib-ai-mark { display:inline-grid; place-items:center; flex:none; width:48px; height:48px; border-radius:14px;
  color:#f2fdff; background:linear-gradient(135deg, #00C8DC 0%, #2f8fd0 55%, #C4531A 120%);
  box-shadow:0 10px 28px rgba(0,200,220,.16), inset 0 1px 0 rgba(255,255,255,.28); }
.ib-ai-mark-sm { width:22px; height:22px; border-radius:7px; box-shadow:inset 0 1px 0 rgba(255,255,255,.25); }

/* Empty conversation: what can be asked, how it is answered, the briefing,
   and four starters. */
.ib-ai-empty { margin:auto 0; display:flex; flex-direction:column; align-items:center; gap:10px; text-align:center;
  padding:8px 0; }
.ib-ai-empty-h { margin:8px 0 0; max-width:600px; font-size:20px; font-weight:var(--fw-bold); line-height:var(--lh-tight);
  letter-spacing:var(--ls-tight); color:var(--text); text-wrap:balance; }
.ib-ai-empty-p { margin:0; max-width:520px; color:var(--muted); font-size:var(--fs-body); line-height:var(--lh-body); text-wrap:pretty; }
.ib-ai-keptnote { margin:0; color:var(--dim); font-size:var(--fs-caption); }
.ib-ai-brief { margin-top:6px; border-radius:var(--r-pill); padding:10px 20px; }
.ib-ai-starters { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; width:100%; max-width:640px; margin-top:16px; }
/* Suggestions ask a question when pressed, so they look like actions. */
.ib-ai-sugg { font:inherit; cursor:pointer; }
.ib-ai-sugg:focus-visible { outline:2px solid var(--cyan); outline-offset:1px; }
.ib-ai-sugg:disabled { opacity:.45; cursor:not-allowed; }
.ib-ai-starter { display:flex; align-items:center; gap:11px; padding:11px 13px; text-align:left;
  background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); color:var(--text);
  font-size:var(--fs-small); font-weight:var(--fw-medium); line-height:var(--lh-snug);
  transition:border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.ib-ai-starter:hover:not(:disabled) { border-color:rgba(0,200,220,.45); background:var(--panel2); transform:translateY(-1px); }
.ib-ai-starter-ic { flex:none; display:inline-grid; place-items:center; width:30px; height:30px; border-radius:9px;
  background:rgba(0,200,220,.1); color:var(--cyan); }

/* ── Messages ── */
.ib-msg { min-width:0; }
/* A question: a bubble on the right, Edit beside it. */
.ib-msg-user { display:flex; flex-direction:row-reverse; align-items:center; gap:6px; }
.ib-msg-user .ib-msg-text { max-width:min(82%, 620px); padding:10px 15px; border-radius:18px 18px 5px 18px;
  background:rgba(0,200,220,.11); color:var(--text); }
.ib-msg-edit { flex:none; display:inline-grid; place-items:center; width:28px; height:28px; padding:0; border:0;
  border-radius:var(--r-xs); background:none; color:var(--dim); cursor:pointer; opacity:0;
  transition:opacity var(--dur-fast) var(--ease); }
.ib-msg-user:hover .ib-msg-edit, .ib-msg-edit:focus-visible { opacity:1; }
.ib-msg-edit:hover:not(:disabled) { color:var(--text); background:rgba(255,255,255,.06); }
.ib-msg-edit:focus-visible { outline:2px solid var(--cyan); outline-offset:1px; }
.ib-msg-edit:disabled { opacity:0; cursor:not-allowed; }
@media (hover:none) { .ib-msg-edit { opacity:1; } }
/* An answer: the page's own text under the assistant's mark. */
.ib-msg-who { display:flex; align-items:center; gap:9px; margin-bottom:8px; font-size:var(--fs-caption);
  font-weight:var(--fw-semibold); color:var(--muted); }
.ib-msg-text { font-size:var(--fs-body); line-height:1.6; word-break:break-word; }
.ib-msg-ai .ib-msg-text { font-size:calc(var(--fs-body) + 1px); line-height:1.68; color:var(--text); padding-left:31px; }
.ib-msg-text strong { color:var(--text); font-weight:var(--fw-semibold); }
.ib-msg-ai .ib-md-li { margin:4px 0; }
.ib-msg-ai .ib-md-mark { color:var(--cyan); }
.ib-msg-ai .ib-md-table { margin:12px 0; }
/* While nothing has arrived: three dots and what is being read. */
.ib-ai-typing { display:inline-flex; align-items:center; gap:10px; color:var(--muted); font-size:var(--fs-small); }
.ib-ai-dots { display:inline-flex; gap:4px; }
.ib-ai-dots i { width:6px; height:6px; border-radius:50%; background:var(--cyan); opacity:.35; animation:ibDots 1.2s infinite ease-in-out; }
.ib-ai-dots i:nth-child(2) { animation-delay:.15s; }
.ib-ai-dots i:nth-child(3) { animation-delay:.3s; }
@keyframes ibDots { 0%, 80%, 100% { opacity:.25; transform:translateY(0); } 40% { opacity:1; transform:translateY(-2px); } }

/* The labels of an Expert answer: a quiet tag with a coloured dot. */
.ib-epi { display:inline-flex; align-items:center; gap:4px; margin:0 1px; padding:0 7px 0 6px; border-radius:var(--r-pill);
  background:rgba(255,255,255,.05); color:var(--muted); font-size:11px; font-weight:var(--fw-medium); line-height:18px;
  vertical-align:1px; white-space:nowrap; cursor:help; text-indent:0; }
.ib-epi::before { content:""; width:5px; height:5px; border-radius:50%; background:var(--dim); }
.ib-tag-measured::before { background:var(--green); }
.ib-tag-inferred::before { background:var(--amber); }
.ib-tag-estimated::before { background:var(--cyan); }
.ib-tag-unavailable::before { background:var(--red); }
.ib-tag-unavailable { color:var(--text); }

/* Device IDs named in an answer link to that device's Live Monitor. */
.ib-ai-devlink { color:var(--cyan); text-decoration:none; border-bottom:1px dotted rgba(0,200,220,.5); }
.ib-ai-devlink:hover { border-bottom-style:solid; }
/* Buildings named in a portfolio answer. */
.ib-ai-bldlink { color:var(--cyan); text-decoration:none; border-bottom:1px dotted rgba(0,200,220,.5); }
.ib-ai-bldlink:hover { border-bottom-style:solid; }
/* Links, fenced code and quotes the model writes. */
.ib-md-link { color:var(--cyan); text-decoration:underline; text-underline-offset:2px; word-break:break-all; }
.ib-md-pre { margin:8px 0; padding:8px 10px; overflow-x:auto; background:var(--bg2); border:1px solid var(--border);
  border-radius:var(--r-sm); font-family:ui-monospace,monospace; font-size:12px; line-height:1.5; white-space:pre; word-break:normal; }
.ib-md-quote { margin:8px 0; padding:2px 0 2px 12px; border-left:3px solid var(--border); color:var(--muted); }
/* Markdown blocks in answers. A wide table scrolls inside the answer instead of
   widening it; break-word would let its columns shrink to one letter. */
.ib-md-table { overflow-x:auto; margin:8px 0; border:1px solid var(--border); border-radius:var(--r-sm); }
.ib-md-table table { width:100%; border-collapse:collapse; font-size:var(--fs-small); line-height:1.45;
  word-break:normal; }
.ib-md-table th, .ib-md-table td { padding:7px 11px; text-align:left; vertical-align:top;
  border-top:1px solid var(--border); }
.ib-md-table th { border-top:0; background:var(--panel2); color:var(--muted); font-weight:600;
  white-space:nowrap; }
.ib-md-table .ib-md-right { text-align:right; }
.ib-md-table .ib-md-center { text-align:center; }
.ib-md-rule { border:0; border-top:1px solid var(--border); margin:10px 0; }
.ib-md-code { font-family:ui-monospace,monospace; font-size:.92em; padding:1px 5px;
  border-radius:var(--r-xs); background:var(--bg2); border:1px solid var(--border); }
/* List items keep their nesting, with wrapped lines hanging under the text
   rather than the marker; an indented line after an item continues it. */
.ib-md-li { padding-left:1.3em; text-indent:-1.3em; }
.ib-md-mark { display:inline-block; min-width:1em; text-indent:0; color:var(--muted); }
.ib-md-l1 { margin-left:1.2em; } .ib-md-l2 { margin-left:2.4em; } .ib-md-l3 { margin-left:3.6em; }
/* Visually hidden, still read out. */
.ib-ai-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* An answer's citations of the building's own documents (D-189). */
.ib-doc-ref { display:inline-block; font:inherit; font-size:11px; font-weight:var(--fw-bold); line-height:1.2;
  padding:0 5px; margin:0 1px; vertical-align:1px; border-radius:var(--r-pill); cursor:pointer;
  color:var(--cyan); background:rgba(0,200,220,.1); border:1px solid rgba(0,200,220,.35); }
.ib-doc-ref:hover, .ib-doc-ref:focus-visible { background:rgba(0,200,220,.2); }
.ib-msg-docs { display:flex; flex-direction:column; gap:4px; margin:12px 0 0 31px; }
.ib-msg-docs-lead { display:inline-flex; align-items:center; gap:6px; font-size:var(--fs-micro);
  color:var(--dim); text-transform:uppercase; letter-spacing:var(--ls-caps); font-weight:var(--fw-semibold); }
.ib-doc { border:1px solid var(--border); border-radius:var(--r-md); background:var(--panel); }
.ib-doc summary { display:flex; align-items:baseline; gap:8px; padding:6px 10px; cursor:pointer;
  font-size:var(--fs-small); color:var(--muted); list-style:none; }
.ib-doc summary::-webkit-details-marker { display:none; }
.ib-doc summary b { color:var(--cyan); font-size:var(--fs-micro); flex-shrink:0; }
.ib-doc summary span { overflow-wrap:anywhere; }
.ib-doc[open] summary { color:var(--text); }
.ib-doc blockquote { margin:0 10px 8px; padding:2px 0 2px 10px; border-left:3px solid rgba(0,200,220,.4);
  color:var(--muted); font-size:var(--fs-small); line-height:1.55; white-space:pre-line; overflow-wrap:anywhere; }
.ib-doc .ib-btn { margin:0 10px 8px; }

/* Under an answer: what it was based on and how fresh, then its actions. */
.ib-msg-foot { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; margin:10px 0 0 31px; }
.ib-msg-sources { flex:1 1 auto; min-width:0; font-size:var(--fs-micro); color:var(--dim); }
.ib-src-list { display:flex; flex-wrap:wrap; align-items:center; gap:2px 0; }
.ib-src-lead { margin-right:6px; }
/* The toggle only exists on a phone, where the sources fold away. */
.ib-src-toggle { display:none; align-items:center; gap:4px; padding:4px 8px; border-radius:var(--r-xs);
  border:1px solid var(--border); background:var(--bg2); color:var(--muted); font:inherit; font-size:var(--fs-caption); cursor:pointer; }
.ib-src-toggle[aria-expanded="true"] .ib-icon { transform:rotate(180deg); }
.ib-src-toggle:focus-visible { outline:2px solid var(--cyan); outline-offset:1px; }
/* Sources as one quiet line, dot-separated, each a link where it has a page. */
.ib-src-chip { font-size:var(--fs-micro); color:var(--muted); white-space:nowrap; }
.ib-src-chip + .ib-src-chip::before { content:"·"; margin:0 6px; color:var(--dim); }
.ib-src-link { text-decoration:none; cursor:pointer; border-radius:3px; }
.ib-src-link:hover, .ib-src-link:focus-visible { color:var(--cyan); outline:none; text-decoration:underline; text-underline-offset:2px; }
.ib-msg-asof { font-size:var(--fs-micro); color:var(--dim); margin-left:10px; font-variant-numeric:tabular-nums; }
/* Data that was already old when the answer was written. */
.ib-msg-asof.is-stale { color:var(--amber); }
.ib-src-stale { display:inline-block; width:6px; height:6px; margin-left:4px; border-radius:50%; background:var(--amber); }
.ib-msg-actions { display:flex; align-items:center; gap:2px; margin-left:auto; }
.ib-msg-act { display:inline-grid; place-items:center; width:28px; height:28px; padding:0;
  border-radius:var(--r-xs); border:1px solid transparent; background:none; color:var(--dim); cursor:pointer;
  transition:color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); }
.ib-msg-act:hover:not(:disabled) { color:var(--text); background:rgba(255,255,255,.06); }
.ib-msg-act:focus-visible { outline:2px solid var(--cyan); outline-offset:1px; }
.ib-msg-act[aria-pressed="true"] { color:var(--cyan); background:rgba(0,200,220,.12); border-color:rgba(0,200,220,.35); }
.ib-msg-act:disabled { opacity:.4; cursor:not-allowed; }
.ib-msg-note { font-size:var(--fs-caption); color:var(--amber); }
/* Why a thumbs-down, in one tap. */
.ib-msg-reasons { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:8px 0 0 31px; }
.ib-msg-reasons-q { font-size:var(--fs-caption); color:var(--muted); margin-right:2px; }
.ib-ai-reason { cursor:pointer; background:transparent; color:var(--text); font-family:inherit; font-weight:500; }
.ib-ai-reason:hover, .ib-ai-reason:focus-visible { border-color:rgba(0,200,220,.45); color:var(--cyan); outline:none; }
.ib-ai-reason-skip { border:0; background:none; color:var(--dim); font:inherit; font-size:var(--fs-caption); cursor:pointer; padding:4px 6px; }
.ib-ai-reason-skip:hover, .ib-ai-reason-skip:focus-visible { color:var(--text); outline:none; text-decoration:underline; }

/* What to ask next, right under the newest answer. */
.ib-ai-next { display:flex; flex-direction:column; align-items:flex-start; gap:2px; padding-left:31px; margin-top:-4px; }
.ib-ai-next-h { margin:0 0 4px; font-size:var(--fs-micro); font-weight:var(--fw-semibold); letter-spacing:var(--ls-caps);
  text-transform:uppercase; color:var(--dim); }
.ib-ai-nextq { display:inline-flex; align-items:center; gap:8px; max-width:100%; padding:6px 10px 6px 6px; border:0;
  border-radius:var(--r-sm); background:none; color:var(--text); font-size:var(--fs-small); text-align:left;
  transition:background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.ib-ai-nextq .ib-icon { color:var(--cyan); }
.ib-ai-nextq:hover:not(:disabled) { background:rgba(0,200,220,.08); color:var(--cyan); }

/* A caret while the answer is still arriving. */
.ib-msg-streaming:not(.ib-msg-pending) .ib-msg-text::after { content:"▍"; color:var(--cyan);
  margin-left:1px; animation:ibCaret 1s steps(1) infinite; }
@keyframes ibCaret { 50% { opacity:0; } }
@media (prefers-reduced-motion: reduce) {
  .ib-msg-streaming:not(.ib-msg-pending) .ib-msg-text::after, .ib-ai-dots i { animation:none; }
  .ib-ai-starter:hover:not(:disabled) { transform:none; }
}

/* ── Composer ── One rounded box: the question, then a bar with the answer
   style, the keyboard hint and Send. flex:none: only the transcript gives up
   height. */
.ib-ai-form { flex:none; display:flex; justify-content:center; padding:0 18px 16px; }
.ib-ai-box { width:min(780px, 100%); display:flex; flex-direction:column; gap:4px; padding:10px 10px 8px 14px;
  background:var(--panel); border:1px solid var(--border); border-radius:var(--r-lg);
  box-shadow:0 8px 28px rgba(0,0,0,.22); transition:border-color var(--dur-fast) var(--ease); }
.ib-ai-box:focus-within { border-color:rgba(0,200,220,.55); }
.ib-ai-input { width:100%; min-width:0; background:transparent; border:0; padding:4px 2px; color:var(--text);
  font-size:var(--fs-body); font-family:inherit; }
.ib-ai-input:focus { outline:none; }
/* The browser's default placeholder grey read at about 3.5:1 on this input.
   opacity:1 because Firefox dims placeholders further by default. */
.ib-ai-input::placeholder { color:var(--dim); opacity:1; }
/* A textarea that grows with its content up to a few lines. */
textarea.ib-ai-input { resize:none; line-height:1.5; max-height:140px; overflow-y:auto; }
.ib-ai-boxbar { display:flex; align-items:center; gap:10px; min-width:0; }
/* .ib-btn sets display, which would otherwise beat the [hidden] attribute. */
.ib-ai-form [hidden] { display:none !important; }
.ib-ai-send { margin-left:auto; padding:7px 14px; border-radius:var(--r-pill); font-size:var(--fs-small); }
.ib-ai-hint { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:var(--fs-micro); color:var(--dim); }
/* The answer style: Plain words or Expert, the product's one mode. */
.ib-ai-style { flex:none; display:inline-flex; padding:2px; border-radius:var(--r-pill); background:var(--bg2);
  border:1px solid var(--border); }
.ib-ai-style-b { padding:4px 11px; border:0; border-radius:var(--r-pill); background:none; color:var(--muted);
  font:inherit; font-size:var(--fs-caption); font-weight:var(--fw-semibold); cursor:pointer;
  transition:background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.ib-ai-style-b:hover { color:var(--text); }
.ib-ai-style-b.on { background:rgba(0,200,220,.16); color:var(--cyan); }
.ib-ai-style-b:focus-visible { outline:2px solid var(--cyan); outline-offset:1px; }

/* Menu rows that carry two lines (a kept conversation and where it was had),
   and the line of explanation under a menu that needs one. */
.ib-ai-menu { position:absolute; z-index:30; min-width:190px; max-width:min(340px, calc(100vw - 32px)); padding:4px;
  display:flex; flex-direction:column; background:var(--panel); border:1px solid var(--border); border-radius:var(--r-sm);
  box-shadow:0 8px 24px rgba(0,0,0,.45); }
.ib-ai-menu [role=menuitem] { display:flex; align-items:center; gap:8px; padding:8px 10px; border:0; border-radius:var(--r-xs);
  background:none; color:var(--text); font:inherit; font-size:13px; text-align:left; text-decoration:none; cursor:pointer; }
.ib-ai-menu [role=menuitem]:hover, .ib-ai-menu [role=menuitem]:focus-visible {
  background:rgba(0,200,220,.1); color:var(--cyan); outline:none; }
.ib-ai-menu .ib-ai-hist { display:block; }
.ib-ai-hist-title, .ib-ai-hist-meta { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ib-ai-hist-meta { margin-top:2px; font-size:11px; color:var(--muted); }
.ib-ai-menu [role=menuitem][aria-current=true] .ib-ai-hist-title { color:var(--cyan); }
.ib-ai-menu [role=menuitem]:hover .ib-ai-hist-meta,
.ib-ai-menu [role=menuitem]:focus-visible .ib-ai-hist-meta { color:inherit; }
.ib-ai-menu-note { padding:8px 10px; border-top:1px solid var(--border); margin-top:4px;
  font-size:11px; line-height:1.5; color:var(--muted); white-space:normal; }
.ib-ai-menu-note:first-child { border-top:0; margin-top:0; }

/* The phone's scope button; on a wider screen the panel lays out as the bar. */
.ib-ai-scopebtn { display:none; }
.ib-ai-scopepanel { display:contents; }

/* Narrower than a desktop column: the hint gives way before the style switch. */
@media (max-width:900px) {
  .ib-ai-hint { display:none; }
}

/* Phone: the title with the tools as icons, the pickers folded behind one
   button naming the scope, the composer and answers with less inset, and each
   answer's sources folded behind a toggle so its actions keep one row. */
@media (max-width:600px) {
  .ib-ai-top { gap:8px 10px; margin-bottom:10px; }
  .ib-ai-top .ib-ai-bar { order:3; flex-basis:100%; display:block; }
  .ib-ai-head .ib-btn-label { display:none; }
  .ib-ai-head .ib-btn { padding:8px; }
  .ib-ai-scopebtn { display:flex; width:100%; align-items:center; gap:8px; min-height:44px; padding:5px 12px;
    text-align:left; background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md);
    color:var(--text); font:inherit; cursor:pointer; }
  .ib-ai-scopebtn:focus-visible { outline:2px solid var(--cyan); outline-offset:1px; }
  .ib-ai-scopebtn-text { flex:1; min-width:0; display:flex; flex-direction:column; }
  .ib-ai-scopebtn-main { font-size:13px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .ib-ai-scopebtn-note { font-size:11px; color:var(--dim); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .ib-ai-bar.is-open .ib-ai-scopebtn .ib-icon { transform:rotate(180deg); }
  .ib-ai-scopepanel { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px 10px; margin-top:8px; }
  .ib-ai-bar:not(.is-open) .ib-ai-scopepanel { display:none; }
  .ib-ai-bar > .ib-ai-scopepanel > label { display:flex; flex-direction:column; align-items:stretch; gap:3px; min-width:0; font-size:11px; }
  .ib-ai-scopepanel > label:only-of-type { grid-column:1 / -1; }
  .ib-ai-bar .ib-select { margin-left:0; width:100%; min-width:0; max-width:none; }
  /* Already shown under the scope on the button. */
  .ib-ai-collector { display:none; }
  .ib-thread { padding:14px 12px 12px; gap:14px; }
  .ib-msg-ai .ib-msg-text, .ib-msg-foot, .ib-msg-docs, .ib-msg-reasons, .ib-ai-next { padding-left:0; margin-left:0; }
  .ib-msg-user .ib-msg-text { max-width:88%; }
  .ib-ai-empty-h { font-size:18px; }
  .ib-ai-starters { grid-template-columns:1fr; margin-top:10px; }
  .ib-ai-form { padding:0 8px 8px; }
  .ib-ai-box { padding:8px 8px 6px 12px; }
  .ib-ai-send .ib-btn-label, .ib-aisum-explain .ib-btn-label { display:none; }
  .ib-ai-menu { max-width:calc(100vw - 24px); }
  .ib-msg-sources { display:contents; }
  .ib-src-toggle { display:inline-flex; order:1; }
  .ib-msg-actions { order:2; }
  .ib-src-list { order:3; flex-basis:100%; }
  .ib-msg-sources:not(.is-open) .ib-src-list { display:none; }
}
/* Touch: every control in the conversation is at least 44 px, the size a
   fingertip can hit reliably. */
@media (max-width:600px), (pointer:coarse) {
  .ib-msg-act { width:44px; height:44px; }
  .ib-src-toggle, .ib-aisum-toggle, .ib-ai-clear, .ib-ai-export, .ib-ai-history, .ib-ai-sugg, .ib-ai-style-b,
  .ib-brief-ask, .ib-brief-open, .ib-region-row, .ib-hero-crit,
  .ib-ai-empty .ib-btn, .ib-msg-actions .ib-btn, .ib-ai-undo .ib-btn, .ib-ai-jump,
  .ib-ai-reason, .ib-ai-reason-skip, .ib-ai-menu [role=menuitem], .ib-ai-row { min-height:44px; }
  .ib-aisum-explain { min-width:44px; min-height:44px; }
  .ib-ai-head .ib-btn { min-width:44px; min-height:44px; }
  .ib-msg-edit { width:44px; height:44px; }
  .ib-ai-send { min-width:44px; min-height:44px; }
  textarea.ib-ai-input { min-height:44px; }
  .ib-ai-bar .ib-select { min-height:44px; }
}

/* ── In-page Brick Inspector (Buildings) ── */
.ib-inspector-host:not(:empty) { margin-top:14px; }
.ib-inspector { border-color:rgba(0,200,220,.4); }
.ib-inspector .ib-card-head { margin-bottom:14px; flex-wrap:wrap; }
.ib-inspector:hover { border-color:rgba(0,200,220,.4); }

/* ── Motion ─────────────────────────────────────────────────────────────────
   Only transform and opacity are animated on anything that repeats (rows,
   cards, buttons): both are compositor properties, so a table of 26 hover
   targets costs no layout. Colour and border transitions are cheap enough to
   pair with them. Everything here is switched off wholesale by the
   prefers-reduced-motion block at the end of this file. */

@keyframes ibPageIn { from { opacity:0; transform:translateY(6px); } }
@keyframes ibRise    { from { opacity:0; transform:translateY(9px); } }
/* Explicit from-value, read from the per-element --draw-len that charts.js
   sets. A bare `to { stroke-dashoffset:0 }` would interpolate from whatever the
   element's resting offset is - which must stay 0 so an un-animated line is a
   drawn line, and interpolating 0→0 draws nothing. */
@keyframes ibDraw    { from { stroke-dashoffset:var(--draw-len,0); } to { stroke-dashoffset:0; } }
@keyframes ibGrowX   { from { transform:scaleX(0); } }

/* Route change. Applied to the content host by the router, then restarted on
   every navigation - the page arriving is the one moment worth animating.
   fill-mode is `backwards`, never `both`: backwards covers the stagger delay
   (so a delayed card does not flash in before its turn), while leaving the
   element's resting style - fully opaque - as its natural state. With `both`
   the end state is held by the animation instead, so anywhere the animation
   timeline does not advance the content would sit permanently at opacity 0. */
.ib-enter { animation:ibPageIn var(--dur-slow) var(--ease-out) backwards; }

/* Card grids get a short stagger so a dashboard assembles rather than snapping
   in. Capped at six: beyond that the last card waits long enough to read as a
   slow page, and grids here (KPIs, at-a-glance, buildings) are small by design.
   Long lists - tables, alert feeds - are deliberately excluded. */
.ib-kpis > *,.ib-glance > *,.ib-cards > *,.ib-lifegrid > *,.ib-sensors > * {
  animation:ibRise var(--dur-slow) var(--ease-out) backwards;
}
.ib-kpis > :nth-child(1),.ib-glance > :nth-child(1),.ib-cards > :nth-child(1),
.ib-lifegrid > :nth-child(1),.ib-sensors > :nth-child(1) { animation-delay:0ms; }
.ib-kpis > :nth-child(2),.ib-glance > :nth-child(2),.ib-cards > :nth-child(2),
.ib-lifegrid > :nth-child(2),.ib-sensors > :nth-child(2) { animation-delay:30ms; }
.ib-kpis > :nth-child(3),.ib-glance > :nth-child(3),.ib-cards > :nth-child(3),
.ib-lifegrid > :nth-child(3),.ib-sensors > :nth-child(3) { animation-delay:60ms; }
.ib-kpis > :nth-child(4),.ib-glance > :nth-child(4),.ib-cards > :nth-child(4),
.ib-lifegrid > :nth-child(4),.ib-sensors > :nth-child(4) { animation-delay:90ms; }
.ib-kpis > :nth-child(5),.ib-glance > :nth-child(5),.ib-cards > :nth-child(5),
.ib-lifegrid > :nth-child(5),.ib-sensors > :nth-child(5) { animation-delay:120ms; }
.ib-kpis > :nth-child(n+6),.ib-glance > :nth-child(n+6),.ib-cards > :nth-child(n+6),
.ib-lifegrid > :nth-child(n+6),.ib-sensors > :nth-child(n+6) { animation-delay:150ms; }

/* Chart line draw-in. charts.js measures each polyline and sets the dash
   properties; the animation itself lives here so reduced-motion disables it. */
.ib-chart polyline[data-draw] { animation:ibDraw var(--dur-draw) var(--ease) backwards; }
.ib-chart rect[data-grow] { animation:ibGrowX var(--dur-slow) var(--ease-out) backwards;
  transform-origin:left center; }

/* Interactive feedback. A press that moves 1px is the difference between a
   button that feels connected and one that feels like a picture of a button. */
.ib-btn:active:not(:disabled),.ib-icon-button:active,.ib-vt:active { transform:translateY(1px); }
.ib-btn,.ib-icon-button { transition:background var(--dur-fast) var(--ease),
  opacity var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
  border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.ib-card,.ib-glance-card { transition:border-color var(--dur) var(--ease),
  transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.ib-card:hover,.ib-glance-card.ib-row:hover { transform:translateY(-2px);
  box-shadow:0 8px 22px rgba(0,0,0,.28); }
.ib-attn-row { transition:background var(--dur) var(--ease), transform var(--dur) var(--ease); }
.ib-attn-row:hover { transform:translateX(2px); }
.ib-table td { transition:background var(--dur-fast) var(--ease); }
.ib-chip,.ib-pill { transition:background var(--dur-fast) var(--ease),
  border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.ib-navitem.active::before { animation:ibGrowY var(--dur) var(--ease-out) backwards; }
@keyframes ibGrowY { from { transform:scaleY(0); } }
.ib-navitem.active::before { transform-origin:center; }
.ib-searchfield,.ib-search-box,.ib-ai-input,.ib-select {
  transition:border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); }

/* ── Focus & accessibility ── */
:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
button:focus:not(:focus-visible), a:focus:not(:focus-visible),
input:focus:not(:focus-visible), select:focus:not(:focus-visible) { outline:none; }

/* ── Responsive ──
   Only two shell breakpoints remain. Navigation no longer competes with the
   header utilities, so the old 1460/1300/1180 ladder (which progressively hid
   the device selector, the clock, then four nav links, and still overlapped
   between 1180px and ~1690px) is gone. */

/* Below 1120px the sidebar costs more than it gives: force the rail regardless
   of preference, but leave the stored preference alone so widening restores it. */
@media (max-width:1120px) {
  .ib-sidebar { flex-basis:64px; width:64px; }
  .ib-brand,.ib-navgroup-label,.ib-navitem span,.ib-railtoggle span { display:none; }
  .ib-sidebar-brand { justify-content:center; padding:0; }
  .ib-navitem,.ib-railtoggle { justify-content:center; padding:9px 0; }
  .ib-navgroup + .ib-navgroup { margin-top:10px; padding-top:10px; border-top:1px solid var(--border); }
  .ib-sidebar-foot { display:none; }        /* rail is enforced, not chosen */
  .ib-profile-label { display:none; }
}

/* Below 860px the sidebar becomes an off-canvas drawer. Identity and sign-out
   stay in the header profile menu at every width, so - unlike the previous
   shell, which hid the header utilities and needed a duplicate account row in
   the mobile menu - there is exactly one sign-out control. */
@media (max-width:860px) {
  /* Out of flow, so flex sizing no longer applies - width is authoritative. */
  .ib-sidebar { position:fixed; left:0; top:0; flex-basis:244px; width:244px;
    transform:translateX(-100%);
    transition:transform var(--dur-slow) var(--ease-out); box-shadow:0 0 40px rgba(0,0,0,.5); }
  .ib-shell.is-drawer .ib-sidebar { transform:none; }
  .ib-navitem span { display:inline; }
  .ib-brand { display:flex; }
  .ib-navgroup-label { display:block; }
  .ib-railtoggle span { display:inline; }
  .ib-sidebar-brand { justify-content:flex-start; padding:0 18px; }
  .ib-navitem { justify-content:flex-start; padding:8px 10px; }
  .ib-navgroup + .ib-navgroup { margin-top:18px; padding-top:0; border-top:0; }
  .ib-scrim { display:block; position:fixed; inset:0; z-index:29;
    background:rgba(0,0,0,.5); backdrop-filter:blur(2px); }
  .ib-scrim[hidden] { display:none; }
  .ib-drawer-trigger { display:inline-flex; }
  .ib-header { gap:10px; padding:0 14px; }
  .ib-searchfield-t,.ib-kbd { display:none; }
  .ib-searchfield { flex:0 0 auto; width:36px; padding:0; justify-content:center; }
  .ib-main { padding:16px 14px 32px; }
  .ib-form-grid { grid-template-columns:1fr; }
  .ib-table { display:block; overflow-x:auto; }
  .ib-hero-greet { font-size:17px; }
}

/* ── Reduced motion ──
   A single wholesale switch rather than per-component opt-outs, so a motion
   rule added later is covered by default instead of being remembered. Durations
   collapse to ~0 rather than `animation:none`, because several elements use
   `both` fill mode and would otherwise be left at their from-state (invisible).
   The one non-decorative animation, the loading spinner, is exempt: it conveys
   that work is in progress, and freezing it would read as a hung page. */
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation-duration:.01ms !important;
    animation-delay:0ms !important;
    transition-duration:.01ms !important;
    scroll-behavior:auto !important;
  }
  .ib-spinner { animation-duration:.7s !important; }
  .ib-card:hover,.ib-glance-card.ib-row:hover,.ib-attn-row:hover,
  .ib-fl-dev:hover,.ib-btn:active:not(:disabled) { transform:none; }
  /* Entrance animations are removed outright, not merely shortened. Collapsing
     the duration relies on the animation still *running* to reach its end
     state; these rules assert the end state directly, so content is visible
     even if the animation never starts. */
  .ib-enter,.ib-kpis > *,.ib-glance > *,.ib-cards > *,
  .ib-lifegrid > *,.ib-sensors > *,.ib-navitem.active::before {
    animation:none !important; opacity:1 !important; transform:none !important;
  }
  .ib-chart polyline[data-draw] { animation:none !important; stroke-dashoffset:0 !important; }
  .ib-chart rect[data-grow] { animation:none !important; transform:none !important; }
}

/* ── Clickable KPIs (Buildings) ──
   A KPI that filters the list below has to look like it does something; a flat
   card that happens to respond to clicks is worse than one that does not. */
.ib-kpi-action { cursor:pointer; position:relative; }
.ib-kpi-action::after { content:""; position:absolute; inset:auto 0 0 0; height:2px;
  background:var(--cyan); border-radius:0 0 12px 12px; opacity:0;
  transition:opacity var(--dur-fast) var(--ease); }
.ib-kpi-action:hover::after { opacity:.5; }
.ib-kpi-action.is-on { border-color:rgba(0,200,220,.5); background:var(--panel2); }
.ib-kpi-action.is-on::after { opacity:1; }

.ib-filterbar { display:flex; align-items:center; justify-content:space-between;
  gap:12px; flex-wrap:wrap; margin-bottom:12px; padding:9px 14px;
  background:rgba(0,200,220,.07); border:1px solid rgba(0,200,220,.3);
  border-radius:var(--r-sm); color:var(--muted); font-size:var(--fs-small); }

/* ── Expandable charts (Analytics) ──
   A 170px chart in a three-across grid shows a shape; reading one needs room.
   The expand control sits in the box header so it is discoverable without a
   hover, and stays quiet until the box is hovered or it takes focus. */
.ib-chartbox-head { display:flex; align-items:flex-start; justify-content:space-between;
  gap:10px; margin-bottom:8px; }
.ib-chartbox-head .ib-chartbox-t { margin-bottom:0; }
.ib-chart-expand { flex-shrink:0; padding:3px 5px; min-height:24px; opacity:0;
  transition:opacity var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.ib-chartbox:hover .ib-chart-expand,
.ib-chart-expand:focus-visible { opacity:1; }
/* Touch has no hover, so the control would never appear. */
@media (hover:none) { .ib-chart-expand { opacity:1; } }

.ib-chart-modal { background:var(--panel); border:1px solid var(--border);
  border-radius:var(--r-lg); padding:20px 22px; width:min(1180px, 94vw);
  animation:ibScaleIn var(--dur) var(--ease-out); }
.ib-chart-modal-head { display:flex; align-items:center; justify-content:space-between;
  gap:14px; margin-bottom:14px; }
.ib-chart-modal-t { font-size:var(--fs-lead); font-weight:var(--fw-semibold); }
.ib-chart-modal-body .ib-chart { background:transparent; border:0; padding:0; }

/* ── Material comparison (Analytics) ──
   The current device's material leads, then a reference table where its row is
   marked so the eye can find it among six. */
.ib-matcard { background:var(--panel); border:1px solid var(--border);
  border-left:3px solid var(--brick); border-radius:var(--r-md); padding:16px 18px; }
.ib-matcard-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.ib-matcard-name { font-size:16px; font-weight:700; }
.ib-matcard-desc { color:var(--muted); font-size:var(--fs-small); margin-top:4px; max-width:70ch; line-height:1.5; }
/* --brick is the logo's masonry colour and was otherwise unused in the UI;
   the material section is the one place it belongs. */
.ib-mat-current td { background:rgba(196,83,26,.10); }
.ib-mat-current td:first-child { box-shadow:inset 3px 0 0 var(--brick); }

/* ── Material profile card (Analytics) ── */
.ib-matstats { display:flex; gap:34px; flex-wrap:wrap; margin-top:16px;
  padding-top:14px; border-top:1px solid var(--border); }
.ib-matstat { display:flex; flex-direction:column; min-width:0; }
.ib-matstat b { font-size:18px; font-weight:700; letter-spacing:-.3px;
  font-variant-numeric:tabular-nums; }
.ib-matstat span { font-size:var(--fs-micro);
  color:var(--muted); margin-top:4px; }
.ib-matsecondary { color:var(--dim); font-size:12px; margin-top:14px; line-height:1.6; }

/* ── Heat flux: measured against prediction ──
   The gap between the two bars is the whole finding; the score is derived from
   it. Previously both numbers sat as plain cells in a six-cell grid. */
.ib-fluxcard { background:var(--panel); border:1px solid var(--border);
  border-radius:var(--r-md); padding:15px 17px; }
.ib-fluxcard-head { display:flex; align-items:baseline; justify-content:space-between;
  gap:14px; flex-wrap:wrap; margin-bottom:14px; }
.ib-fluxcard-verdict { font-size:var(--fs-small); font-weight:600; }
.ib-fluxcard-bad { color:var(--red); } .ib-fluxcard-good { color:var(--green); }
.ib-fluxrow { display:grid; grid-template-columns:78px 1fr 92px; align-items:center;
  gap:12px; margin-bottom:9px; }
.ib-fluxrow-l { font-size:var(--fs-caption); color:var(--muted); font-weight:var(--fw-medium); }
.ib-fluxrow-v { text-align:right; font-size:13px; font-weight:600;
  font-variant-numeric:tabular-nums; }
.ib-fluxtrack { background:var(--bg2); border-radius:var(--r-xs); height:14px; overflow:hidden; }
.ib-fluxfill { display:block; height:100%; border-radius:var(--r-xs);
  transition:width var(--dur-draw) var(--ease-out); }
.ib-fluxfill-bad { background:var(--red); } .ib-fluxfill-good { background:var(--green); }
/* The reference bar is deliberately quiet - it is the baseline, not a reading. */
.ib-fluxfill-ref { background:repeating-linear-gradient(45deg,
  var(--border) 0 6px, var(--panel2) 6px 12px); }
@media (max-width:600px) { .ib-fluxrow { grid-template-columns:64px 1fr 78px; gap:8px; } }

/* ── Risk outlook (Analytics + Live Monitor, D-061) ──
   One row per horizon: the verified ranges on the left, the engine's projected
   status on the right. Colour comes from the status label only. */
.ib-olcard { background:var(--panel); border:1px solid var(--border);
  border-left:3px solid var(--cyan); border-radius:var(--r-md); padding:14px 18px;
  display:flex; flex-direction:column; gap:10px; }
.ib-ol-top { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap;
  font-size:var(--fs-small); }
.ib-ol-row { display:grid; grid-template-columns:72px 1fr auto; gap:12px; align-items:start;
  padding-top:10px; border-top:1px solid var(--border); }
.ib-ol-off { grid-template-columns:72px 1fr; }
.ib-ol-h { font-size:var(--fs-micro);
  color:var(--muted); padding-top:2px; font-weight:var(--fw-semibold); }
.ib-ol-body { display:flex; flex-direction:column; gap:3px; min-width:0; }
.ib-ol-ch { font-size:var(--fs-small); font-variant-numeric:tabular-nums; }
.ib-ol-note { font-size:var(--fs-small); color:var(--amber); }
@media (max-width:620px) { .ib-ol-row, .ib-ol-off { grid-template-columns:1fr; } }

/* Compact variant inside the Live Monitor context card. */
.ib-ctx-drivers { margin-top:12px; padding-top:11px; border-top:1px solid var(--border); }
.ib-ctx-drivers-t { font-size:var(--fs-micro); text-transform:uppercase; letter-spacing:.6px;
  color:var(--muted); margin-bottom:7px; }
.ib-driverlist { margin:0; padding-left:16px; color:var(--text);
  font-size:var(--fs-small); line-height:var(--lh-loose); }
.ib-driverlist li::marker { color:var(--cyan); }
@media (max-width:620px) { .ib-fcverdict { margin-left:0; text-align:left; flex:1 1 100%; } }

/* ── Sticky Analytics toolbar ──
   Device and window are the context for four screens of analysis; scrolled
   away, the reader loses the statement of what they are looking at. */
.ib-anbar-sticky { position:sticky; top:60px; z-index:15; margin-bottom:0;
  padding:12px 0; background:var(--bg); border-bottom:1px solid var(--border); }
@media (max-width:860px) { .ib-anbar-sticky { top:60px; } }

/* Region scope, folded into the Overview toolbar. Compact: the bar's own
   "Viewing X" summary and counts are redundant next to the hero, which already
   states the portfolio size. */
.ib-overbar-region { display:flex; min-width:0; }
.ib-regionbar-inline { margin-bottom:0; padding:0; background:transparent;
  border:0; border-radius:0; gap:10px; }
.ib-regionbar-inline .ib-regionbar-view { display:none; }
.ib-regionbar-inline .ib-regionbar-ctrl { gap:10px; }
.ib-regionbar-inline .ib-select { font-size:12px; padding:5px 8px; }
@media (max-width:900px) { .ib-overbar-region { flex:1 1 100%; } }

/* Material row expanded to the devices built from it. */
.ib-matdetail > td { padding:0 14px 12px; background:rgba(196,83,26,.06); }
.ib-mat-current.is-open td,.ib-row.is-open td { background:rgba(0,200,220,.07); }
.ib-matdevices { display:flex; flex-wrap:wrap; gap:8px; padding-top:10px; }
.ib-matdevice { display:flex; flex-direction:column; gap:3px; padding:8px 12px;
  background:var(--panel); border:1px solid var(--border); border-radius:var(--r-sm);
  text-decoration:none; color:var(--text); font-size:var(--fs-small);
  transition:border-color var(--dur-fast) var(--ease); }
.ib-matdevice:hover { border-color:rgba(0,200,220,.45); }
.ib-matdevice span { color:var(--muted); font-size:var(--fs-caption); }

/* ── Section separation ──
   Live Monitor and the detail pages stack a dozen blocks in a single column.
   With only a margin between a heading and the block above it, the page reads
   as one undifferentiated scroll - "Latest sensor values" ran straight into
   whatever preceded it with nothing marking where one section ended. A hairline
   rule above each heading gives the eye a boundary without wrapping every
   section in a box, which at this density would be heavier than the content.

   Scoped to `.ib-sections` rather than applied to `.ib-h2` globally: headings
   also appear inside cards and dialogs, where a full-width rule would cut
   across the card rather than separate anything. */
.ib-sections > .ib-h2,
.ib-sections > .ib-h2-row { border-top:1px solid var(--border);
  padding-top:22px; margin-top:30px; }
/* The first heading has nothing above it to be separated from. */
.ib-sections > .ib-h2:first-child,
.ib-sections > .ib-h2-row:first-child { border-top:none; padding-top:0; margin-top:8px; }

/* Explanatory notes sit under the heading they qualify, not floating between
   sections, so they lose the card treatment and keep the indent. */
.ib-sections > .ib-note { background:transparent; border:none; padding:0 0 4px;
  margin-bottom:12px; font-size:var(--fs-small); line-height:var(--lh-body); max-width:78ch; }

/* Charts and grids need air beneath them before the next rule. */
.ib-sections > .ib-chartgrid,
.ib-sections > .ib-sensors,
.ib-sections > .ib-metagrid,
.ib-sections > .ib-tablewrap { margin-bottom:6px; }

/* ── Wide tables ──
   The Expert channel-statistics table is eight columns; on a narrow viewport it
   must scroll inside its own box rather than push the page sideways. */
.ib-tablewrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.ib-tablewrap > .ib-table { min-width:640px; }

/* Two-up chart grid for Live Monitor and device detail.
   The base `.ib-chartgrid` is tuned for Analytics, where a dense three-across
   wall of small multiples is the point. On a monitoring page the charts are the
   content, and at 340px minimum a 1440px screen packs four across - narrow
   enough that the axis labels crowd the plot. A 480px floor lands on two across
   at desktop widths and collapses to one on a tablet, and the expand control in
   each box header covers the case where two is still not enough. */
.ib-chartgrid-2 { grid-template-columns:repeat(auto-fit,minmax(min(100%,480px),1fr)); }

/* A frozen channel is a fault, not a reading - tint the row so it is findable
   in a table of eight columns without hunting for the badge. */
.ib-row-flag > td { background:rgba(243,156,18,.06); }
.ib-row-flag .ib-pill { margin-left:8px; font-size:var(--fs-micro); vertical-align:middle; }

/* A row of page-level actions, so a second button does not stack under the
   first with mismatched margins. */
.ib-toolbar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }

/* ── USB provisioning dialog ──
   A summary line of what the board currently thinks it is, so the operator can
   see at a glance which of the four settings is the broken one before editing
   any of them. */
.ib-prov-status { display:flex; flex-wrap:wrap; gap:6px 14px; align-items:center;
  background:var(--bg2); border:1px solid var(--border); border-radius:var(--r-sm);
  padding:9px 12px; margin-bottom:14px; font-size:var(--fs-small); color:var(--muted); }
.ib-prov-status .ib-icon { vertical-align:-2px; }
.ib-prov-status .ib-ok { color:var(--green); }
.ib-prov-status .ib-warn { color:var(--amber); }
.ib-prov-out { font-size:var(--fs-small); line-height:var(--lh-body); border-radius:var(--r-sm); padding:9px 12px;
  background:rgba(255,255,255,.04); color:var(--muted); }
.ib-prov-out .ib-icon { vertical-align:-3px; margin-right:4px; }
.ib-prov-out.is-ok { background:rgba(46,204,113,.1); color:var(--green); }
.ib-prov-out.is-bad { background:rgba(231,76,60,.1); color:var(--red); }

/* ── Risk formation (Analytics, D-069) ─────────────────────────────────────
   Readings, the engine's checks and the score, joined by what reads what.
   Every colour is a token: the level a reading has reached against this
   device's own lines, or what a check concluded. */
.ib-fm-head { margin-bottom:10px; }
.ib-fm-stale { color:var(--amber); font-size:var(--fs-small); margin:-2px 0 10px; }
.ib-fm-svg text { font-family:inherit; }
.ib-fm-col { fill:var(--muted); font-size:var(--fs-micro); letter-spacing:var(--ls-caps); font-weight:var(--fw-semibold); }
/* In the look of Zahir's map (D-118): each level, check severity and status
   sets --tone, the map's colour for it, and every mark of that thing takes it:
   a reading's diamond, a check's dot, the score's diamond, a line. */
.ib-fm-svg .lv-normal, .ib-fm-svg .sev-low, .ib-fm-svg .is-low, .ib-fm-svg .tone-grey { --tone:#5AC8FA; }
.ib-fm-svg .lv-warning, .ib-fm-svg .sev-medium, .ib-fm-svg .is-medium, .ib-fm-svg .tone-amber { --tone:#FF9F0A; }
.ib-fm-svg .lv-alert, .ib-fm-svg .sev-high, .ib-fm-svg .is-high { --tone:#FF6B35; }
.ib-fm-svg .lv-critical, .ib-fm-svg .tone-red { --tone:#FF3B30; }
.ib-fm-svg .tone-green { --tone:#2ECC71; }
.ib-fm-box { fill:rgba(12,22,34,.82); stroke:rgba(255,255,255,.08); stroke-width:1; }
.ib-fm-box.lv-warning, .ib-fm-box.lv-alert, .ib-fm-box.lv-critical,
.ib-fm-box.sev-high, .ib-fm-box.sev-medium, .ib-fm-box.sev-low { stroke:var(--tone); stroke-opacity:.45; }
.ib-fm-item.is-quiet .ib-fm-box { fill:rgba(12,22,34,.45); }
.ib-fm-item.is-quiet .ib-fm-t { fill:var(--muted); }
.ib-fm-t { fill:#E4EFF5; font-size:12px; font-weight:var(--fw-semibold); }
.ib-fm-big { fill:#E4EFF5; font-size:20px; font-weight:var(--fw-bold); font-variant-numeric:tabular-nums; }
.ib-fm-big.is-small { font-size:14px; }
.ib-fm-cap { fill:var(--muted); font-size:9px; }
.ib-fm-s { fill:var(--muted); font-size:11px; }
.ib-fm-s.lv-warning, .ib-fm-s.lv-alert, .ib-fm-s.lv-critical,
.ib-fm-s.sev-high, .ib-fm-s.sev-medium, .ib-fm-s.sev-low,
.ib-fm-s.tone-green, .ib-fm-s.tone-amber, .ib-fm-s.tone-red { fill:var(--tone); }
.ib-fm-gem { fill:rgba(12,22,34,.96); stroke:var(--tone, #7D8A96); stroke-width:1.6; }
.ib-fm-gem.lv-alert, .ib-fm-gem.lv-critical { stroke-width:2.4; filter:drop-shadow(0 0 5px rgba(255,59,48,.55)); }
.ib-fm-gem.lv-warning { filter:drop-shadow(0 0 4px rgba(255,159,10,.4)); }
.ib-fm-score { stroke-width:2.4; filter:drop-shadow(0 0 10px rgba(0,200,220,.25));
  filter:drop-shadow(0 0 10px color-mix(in srgb, var(--tone) 40%, transparent)); }
.ib-fm-dot { fill:var(--tone, #7D8A96); }
.ib-fm-dot.sev-none { fill:none; stroke:#7D8A96; stroke-width:1.2; }
.ib-fm-dot.sev-high { filter:drop-shadow(0 0 4px rgba(255,107,53,.7)); }
.ib-fm-ring { fill:none; stroke:var(--tone, #7D8A96); stroke-width:1; opacity:0; }
.ib-fm-ring.lv-alert, .ib-fm-ring.lv-critical, .ib-fm-ring.sev-high, .ib-fm-ring.tone-red {
  opacity:.5; animation:ib-rel-ring 2s ease-in-out infinite; }
.ib-fm-edge { fill:none; stroke:var(--dim); stroke-width:1.2; }
.ib-fm-edge.is-clear { stroke-dasharray:3 4; opacity:0; transition:opacity var(--dur-fast) var(--ease); }
.ib-fm-edge.is-clear.is-hot { opacity:.9; }
.ib-fm-item[data-check] { cursor:default; }
/* An active line is a soft glow of its colour; the flow draws the dashes on it. */
.ib-fm-edge.is-high, .ib-fm-edge.is-medium, .ib-fm-edge.is-low { stroke:var(--tone); stroke-width:5; opacity:.16;
  stroke-linecap:round; }
.ib-fm-edge.is-hot:not(.is-clear) { opacity:.32; stroke-width:7; }
.ib-fm-stage { border-radius:14px; padding:12px 14px;
  background:
    radial-gradient(420px 220px at 92% 45%, rgba(0,200,220,.09), transparent 70%),
    radial-gradient(900px 260px at 80% -30%, rgba(255,107,53,.06), transparent 50%),
    radial-gradient(900px 260px at 10% 120%, rgba(0,200,220,.07), transparent 55%),
    var(--panel); }
.ib-rel-leg i.none { background:#7D8A96; }
.ib-rel-leg i.flow, .ib-rel-leg i.clear { width:18px; height:0; border-radius:0; transform:none; background:none;
  border-top:2.4px dashed #FF6B35; }
.ib-rel-leg i.clear { border-top:1.5px dashed var(--dim); }
.ib-fm-specific td:nth-child(4) { color:var(--cyan); }
.ib-fm-rule td:nth-child(2) { color:var(--cyan); }

/* ── Risk outlook chart (Analytics, D-070) ─────────────────────────────────
   Recent readings, then each horizon's range at its true time, the device's
   own lines across them, and the projected status per horizon above. */
.ib-oc-head { font-size:var(--fs-lead); font-weight:var(--fw-semibold); color:var(--text); margin-bottom:10px; }
.ib-oc-track { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; margin-bottom:12px; }
.ib-oc-step { display:inline-flex; flex-direction:column; align-items:flex-start; gap:3px; }
.ib-oc-when { font-size:var(--fs-micro); color:var(--muted); font-weight:var(--fw-medium); }
.ib-oc-arrow { color:var(--dim); font-size:var(--fs-small); margin-top:14px; }
.ib-oc-svg text { font-family:inherit; }
.ib-oc-title { fill:var(--muted); font-size:var(--fs-caption); font-weight:var(--fw-semibold); }
.ib-oc-tick { fill:var(--dim); font-size:var(--fs-micro); }
.ib-oc-tick.is-now { fill:var(--cyan); font-weight:var(--fw-semibold); }
.ib-oc-tick.is-off { fill:var(--dim); font-style:italic; }
.ib-oc-base { stroke:var(--border); stroke-width:1; }
.ib-oc-nowline { stroke:var(--cyan); stroke-width:1; stroke-dasharray:2 3; opacity:.8; }
.ib-oc-hline { stroke:var(--border); stroke-width:1; opacity:.6; }
.ib-oc-line { stroke:var(--dim); stroke-width:1; stroke-dasharray:5 4; }
.ib-oc-line.lv-warning { stroke:var(--amber); }
.ib-oc-line.lv-alert, .ib-oc-line.lv-critical { stroke:var(--red); }
.ib-oc-linelabel { fill:var(--dim); font-size:var(--fs-micro); }
.ib-oc-linelabel.lv-warning { fill:var(--amber); }
.ib-oc-linelabel.lv-alert, .ib-oc-linelabel.lv-critical { fill:var(--red); }
.ib-oc-fan { fill:var(--cyan); opacity:.12; }
.ib-oc-hist { fill:none; stroke:var(--text); stroke-width:1.5; opacity:.85; }
.ib-oc-point { fill:none; stroke:var(--cyan); stroke-width:1.2; stroke-dasharray:4 4; }
.ib-oc-now-dot { fill:var(--cyan); stroke:var(--panel); stroke-width:1.5; }
.ib-oc-bar line { stroke:var(--dim); stroke-width:2; }
.ib-oc-bar circle { fill:var(--dim); }
.ib-oc-bar.tone-green line { stroke:var(--green); } .ib-oc-bar.tone-green circle { fill:var(--green); }
.ib-oc-bar.tone-amber line { stroke:var(--amber); } .ib-oc-bar.tone-amber circle { fill:var(--amber); }
.ib-oc-bar.tone-red line { stroke:var(--red); } .ib-oc-bar.tone-red circle { fill:var(--red); }
.ib-oc-legend { display:flex; flex-wrap:wrap; gap:6px 16px; margin-top:10px; font-size:var(--fs-caption); color:var(--muted); }
.ib-oc-legend b { display:inline-block; width:18px; height:0; margin-right:6px; vertical-align:3px; }
.ib-oc-key-hist { border-top:1.5px solid var(--text); }
.ib-oc-key-bar { border-top:2px solid var(--amber); }
.ib-oc-key-line { border-top:1.5px dashed var(--red); }

/* ── What if (Analytics, D-071) ────────────────────────────────────────────
   Risk against one condition, on this material's lines and the default ones,
   over the engine's own status bands. */
.ib-wi-pick { display:inline-flex; gap:6px; }
.ib-wi-head { margin-bottom:10px; }
.ib-wi-svg text { font-family:inherit; }
.ib-wi-band { opacity:.07; fill:var(--dim); }
.ib-wi-band.tone-green { fill:var(--green); }
.ib-wi-band.tone-amber { fill:var(--amber); }
.ib-wi-band.tone-red { fill:var(--red); }
.ib-wi-bandlabel { fill:var(--dim); font-size:var(--fs-micro); }
.ib-wi-tick { fill:var(--dim); font-size:var(--fs-micro); }
.ib-wi-tick.is-now { fill:var(--cyan); font-weight:var(--fw-semibold); }
.ib-wi-mline { stroke:var(--dim); stroke-width:1; stroke-dasharray:4 4; }
.ib-wi-mline.lv-warning { stroke:var(--amber); }
.ib-wi-mline.lv-alert, .ib-wi-mline.lv-critical { stroke:var(--red); }
.ib-wi-mlabel { fill:var(--dim); font-size:var(--fs-micro); }
.ib-wi-mlabel.lv-warning { fill:var(--amber); }
.ib-wi-mlabel.lv-alert, .ib-wi-mlabel.lv-critical { fill:var(--red); }
/* The curve's colour is a gradient by rating, set inline by whatif.js. */
.ib-wi-here { fill:none; stroke:var(--text); stroke-width:2.4; stroke-linejoin:round; stroke-linecap:round; }
.ib-wi-default { fill:none; stroke:var(--dim); stroke-width:1.5; stroke-dasharray:5 4; }
.ib-wi-change { fill:var(--dim); stroke:var(--panel); stroke-width:1; }
.ib-wi-change.tone-green { fill:var(--green); }
.ib-wi-change.tone-amber { fill:var(--amber); }
.ib-wi-change.tone-red { fill:var(--red); }
.ib-wi-best { fill:var(--dim); }
.ib-wi-best.tone-green { fill:var(--green); }
.ib-wi-best.tone-amber { fill:var(--amber); }
.ib-wi-now { stroke:var(--cyan); stroke-width:1; stroke-dasharray:2 3; }
.ib-wi-nowdot { fill:var(--cyan); stroke:var(--panel); stroke-width:1.5; }
.ib-wi-legend { display:flex; flex-wrap:wrap; gap:6px 16px; margin-top:10px; font-size:var(--fs-caption); color:var(--muted); }
.ib-wi-legend b { display:inline-block; width:18px; height:0; margin-right:6px; vertical-align:3px; }
.ib-wi-key-here { border-top:3px solid; border-image:linear-gradient(90deg, var(--green), var(--amber), var(--red)) 1; }
.ib-wi-key-lane { border-top:5px solid var(--amber); border-radius:2px; }
.ib-wi-key-default { border-top:1.5px dashed var(--dim); }
.ib-wi-key-best { border-top:5px solid var(--green); border-radius:2px; }
.ib-wi-key-now { border-top:1.5px dashed var(--cyan); }

/* ── Condition now (Analytics, D-073) ──────────────────────────────────────
   The wall's latest score, dated, with what it is, where it is and whether it
   is reporting, above everything else on the page. */
.ib-cond { background:var(--panel); border:1px solid var(--border); border-left:3px solid var(--dim);
  border-radius:var(--r-md); padding:14px 18px; margin:14px 0 16px; }
.ib-cond-green { border-left-color:var(--green); }
.ib-cond-amber { border-left-color:var(--amber); }
.ib-cond-red { border-left-color:var(--red); }
.ib-cond-id { font-size:var(--fs-caption); font-weight:var(--fw-semibold); color:var(--muted); }
.ib-cond-head { font-size:var(--fs-stat); font-weight:var(--fw-semibold); color:var(--text);
  margin:6px 0 4px; line-height:var(--lh-tight); }
.ib-cond-meta { display:flex; flex-wrap:wrap; gap:4px 14px; font-size:var(--fs-small); color:var(--muted); }
.ib-cond-meta > span + span::before { content:"·"; margin-right:14px; color:var(--dim); }
/* A colour-coded card (Zahir, 2026-10-22): the rating in its colour beside a
   donut of the risk on the engine's bands, tinted from the left. */
.ib-cond { display:flex; align-items:center; gap:18px; --tone:var(--dim); }
.ib-cond-green { --tone:var(--green); background:linear-gradient(90deg, rgba(46,204,113,.11), transparent 55%), var(--panel); }
.ib-cond-amber { --tone:var(--amber); background:linear-gradient(90deg, rgba(243,156,18,.12), transparent 55%), var(--panel); }
.ib-cond-red { --tone:var(--red); background:linear-gradient(90deg, rgba(255,107,91,.13), transparent 55%), var(--panel); }
.ib-cond-body { flex:1; min-width:0; }
.ib-cond-head { color:var(--tone); margin:2px 0 2px; }
.ib-cond-grey .ib-cond-head { color:var(--text); }
.ib-cond-sub { font-size:var(--fs-small); color:var(--text); opacity:.85; margin-bottom:6px; }
.ib-cond-ring { position:relative; width:84px; height:84px; flex-shrink:0; }
.ib-cond-ring svg { display:block; width:100%; height:100%; }
.ib-cond-band { stroke:var(--border); stroke-width:8; }
.ib-cond-band-green { stroke:rgba(46,204,113,.22); }
.ib-cond-band-amber { stroke:rgba(243,156,18,.24); }
.ib-cond-band-red { stroke:rgba(255,107,91,.22); }
.ib-cond-arc { stroke:var(--tone); stroke-width:8; stroke-linecap:round;
  filter:drop-shadow(0 0 4px color-mix(in srgb, var(--tone) 55%, transparent)); }
.ib-cond-arc.ib-anim { animation:ibCondArc 900ms var(--ease-out) 120ms backwards; }
@keyframes ibCondArc { from { stroke-dasharray:0 100; } }
.ib-cond-ring-c { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.ib-cond-ring-c b { font-size:24px; line-height:1; font-weight:var(--fw-bold); color:var(--tone); font-variant-numeric:tabular-nums; }
.ib-cond-grey .ib-cond-ring-c b { color:var(--text); }
.ib-cond-ring-c span { margin-top:3px; font-size:var(--fs-micro); letter-spacing:var(--ls-caps); text-transform:uppercase; color:var(--muted); }
/* The risk by cause in the ring's gap, and a centre that turns between
   health and risk (D-225). */
/* The board of risks (D-227) takes the same colours, so a cause reads the same in both. */
.ib-cond, .ib-rb { --cause-damp:#4aa3df; --cause-heat:#e8743b; --cause-warmth:#f6c453; --cause-structure:#a77bd6;
  --cause-heritage:#e06c9f; --cause-air:#5dcaa5; --cause-pattern:#8e9bd8; --cause-other:#8b98a6;
  --cause-rest:#5d6b7a; --cause-floor:rgba(255,255,255,.14); }
.ib-cond-cause { stroke-width:8; }
.ib-cond-cause.is-damp { stroke:var(--cause-damp); } .ib-cond-part i.is-damp { background:var(--cause-damp); }
.ib-cond-cause.is-heat { stroke:var(--cause-heat); } .ib-cond-part i.is-heat { background:var(--cause-heat); }
.ib-cond-cause.is-warmth { stroke:var(--cause-warmth); } .ib-cond-part i.is-warmth { background:var(--cause-warmth); }
.ib-cond-cause.is-structure { stroke:var(--cause-structure); } .ib-cond-part i.is-structure { background:var(--cause-structure); }
.ib-cond-cause.is-heritage { stroke:var(--cause-heritage); } .ib-cond-part i.is-heritage { background:var(--cause-heritage); }
.ib-cond-cause.is-air { stroke:var(--cause-air); } .ib-cond-part i.is-air { background:var(--cause-air); }
.ib-cond-cause.is-pattern { stroke:var(--cause-pattern); } .ib-cond-part i.is-pattern { background:var(--cause-pattern); }
.ib-cond-cause.is-other { stroke:var(--cause-other); } .ib-cond-part i.is-other { background:var(--cause-other); }
.ib-cond-cause.is-rest { stroke:var(--cause-rest); } .ib-cond-part i.is-rest { background:var(--cause-rest); }
.ib-cond-cause.is-floor { stroke:var(--cause-floor); } .ib-cond-part i.is-floor { background:var(--cause-floor); }
.ib-cond-ring.has-parts .ib-cond-arc { stroke-linecap:butt; }
.ib-cond-ring.is-old .ib-cond-cause { opacity:.55; }
button.ib-cond-ring-c { background:none; border:0; padding:0; margin:0; font:inherit; color:inherit; cursor:pointer;
  border-radius:50%; perspective:300px; }
button.ib-cond-ring-c span::after { content:" ⇄"; letter-spacing:0; }
button.ib-cond-ring-c:hover span { color:var(--text); }
button.ib-cond-ring-c:focus-visible { outline:2px solid var(--cyan); outline-offset:-12px; }
.ib-cond-ring-c.is-turning b, .ib-cond-ring-c.is-turning span { animation:ibRingTurn 380ms var(--ease-out); }
@keyframes ibRingTurn { from { transform:rotateX(90deg); opacity:.15; } to { transform:none; opacity:1; } }
@media (prefers-reduced-motion: reduce) { .ib-cond-ring-c.is-turning b, .ib-cond-ring-c.is-turning span { animation:none; } }
.ib-cond-parts { display:flex; flex-wrap:wrap; align-items:center; gap:5px 6px; margin:2px 0 8px; }
.ib-cond-parts-k { font-size:var(--fs-small); color:var(--muted); margin-right:2px; }
.ib-cond-part { display:inline-flex; align-items:center; gap:5px; padding:1px 9px; border-radius:var(--r-pill);
  border:1px solid var(--border); background:transparent; color:var(--text); font:inherit; font-size:var(--fs-caption); line-height:1.6; }
button.ib-cond-part { cursor:pointer; }
button.ib-cond-part:hover { border-color:var(--cyan); }
button.ib-cond-part:focus-visible { outline:2px solid var(--cyan); outline-offset:1px; }
.ib-cond-part b { font-weight:var(--fw-semibold); font-variant-numeric:tabular-nums; }
.ib-cond-part i { width:8px; height:8px; border-radius:2px; flex-shrink:0; }
.ib-cond-part.is-floor, .ib-cond-part.is-rest { color:var(--muted); border-style:dashed; }
/* The same line on the device page (D-240), and a wall's biggest cause on the
   building page, in the ring's colours. */
.ib-dev-split, .ib-mainly, .ib-md-why { --cause-damp:#4aa3df; --cause-heat:#e8743b; --cause-warmth:#f6c453; --cause-structure:#a77bd6;
  --cause-heritage:#e06c9f; --cause-air:#5dcaa5; --cause-pattern:#8e9bd8; --cause-other:#8b98a6;
  --cause-rest:#5d6b7a; --cause-floor:rgba(255,255,255,.14); }
.ib-dev-split { margin:10px 0 20px; }
.ib-dev-split .ib-cond-parts { margin:0; }
a.ib-cond-part { color:var(--text); text-decoration:none; cursor:pointer; }
a.ib-cond-part:hover { border-color:var(--cyan); }
a.ib-cond-part:focus-visible { outline:2px solid var(--cyan); outline-offset:1px; }
.ib-dev-split .ib-cond-part i.is-damp, .ib-mainly i.is-damp, .ib-md-why i.is-damp { background:var(--cause-damp); }
.ib-dev-split .ib-cond-part i.is-heat, .ib-mainly i.is-heat, .ib-md-why i.is-heat { background:var(--cause-heat); }
.ib-dev-split .ib-cond-part i.is-warmth, .ib-mainly i.is-warmth, .ib-md-why i.is-warmth { background:var(--cause-warmth); }
.ib-dev-split .ib-cond-part i.is-structure, .ib-mainly i.is-structure, .ib-md-why i.is-structure { background:var(--cause-structure); }
.ib-dev-split .ib-cond-part i.is-heritage, .ib-mainly i.is-heritage, .ib-md-why i.is-heritage { background:var(--cause-heritage); }
.ib-dev-split .ib-cond-part i.is-air, .ib-mainly i.is-air, .ib-md-why i.is-air { background:var(--cause-air); }
.ib-dev-split .ib-cond-part i.is-pattern, .ib-mainly i.is-pattern, .ib-md-why i.is-pattern { background:var(--cause-pattern); }
.ib-dev-split .ib-cond-part i.is-other, .ib-mainly i.is-other, .ib-md-why i.is-other { background:var(--cause-other); }
.ib-dev-split .ib-cond-part i.is-rest, .ib-md-why i.is-rest { background:var(--cause-rest); }
.ib-dev-split .ib-cond-part i.is-floor { background:var(--cause-floor); }
.ib-dev-split.is-old .ib-cond-part i { opacity:.55; }
.ib-mainly { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
.ib-mainly i { width:8px; height:8px; border-radius:2px; flex-shrink:0; }
.ib-mainly b { font-weight:var(--fw-semibold); font-variant-numeric:tabular-nums; }
/* ── The wall's risks (D-227, compact D-229) ──
   A card per risk the engine judges, in the cause's colour from the header's
   ring. Simple is a card to take in at a glance: the risk and its state, the
   points it costs, the measurement that decides it, where to go. Expert adds
   what the risk is, the findings and the readings it rests on. Raised cards
   carry their colour; the calm ones keep it to the edge, so a wall with
   nothing wrong reads quiet and a wall with one problem shows it. */
.ib-rb { margin:0 0 6px; }
.ib-rb-tally { display:flex; flex-wrap:wrap; align-items:center; gap:4px 14px; margin:0 0 10px;
  font-size:var(--fs-caption); color:var(--muted); }
.ib-rb-t { display:inline-flex; align-items:center; gap:5px; }
.ib-rb-t i { width:7px; height:7px; border-radius:50%; background:var(--dim); }
.ib-rb-t.is-raised i { background:var(--red); }
.ib-rb-t.is-noted i { background:var(--cyan); }
.ib-rb-t.is-wait i { background:var(--amber); }
.ib-rb-t.is-clear i { background:var(--green); }
.ib-rb-t.is-absent i { background:transparent; border:1px dashed var(--dim); }
.ib-rb-when { margin-left:auto; color:var(--dim); }
/* At most four across in Simple (seven risks sit 4 + 3), three in Expert. */
.ib-rb-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(max(230px, calc((100% - 30px) / 4)), 1fr));
  gap:10px; align-items:stretch; }
.ib-rb.is-expert .ib-rb-grid { grid-template-columns:repeat(auto-fill, minmax(max(290px, calc((100% - 20px) / 3)), 1fr)); }
.ib-rb-card { --rc:var(--dim); position:relative; display:flex; flex-direction:column; gap:7px; min-width:0;
  padding:10px 12px 9px 15px; background:var(--panel); border:1px solid var(--border); border-radius:10px;
  overflow:hidden; transition:border-color var(--dur) var(--ease); }
.ib-rb.is-expert .ib-rb-card { gap:9px; padding:12px 14px 10px 17px; }
.ib-rb-card::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--rc); opacity:.45; }
.ib-rb-card.is-raised { border-color:color-mix(in srgb, var(--rc) 40%, var(--border));
  background:radial-gradient(420px 120px at 0% 0%, color-mix(in srgb, var(--rc) 10%, transparent), transparent 65%), var(--panel); }
.ib-rb-card.is-raised::before, .ib-rb-card.is-noted::before { opacity:1; }
.ib-rb-card.is-unjudged { background:var(--bg2); }
.ib-rb-card.is-wide { grid-column:1 / -1; }
.ib-rb-card.ib-flash { border-radius:10px; }
/* The last card alone on its row spans it, laid out across: in Simple one
   row (the risk, its measurement, its links), in Expert what it is, its
   measurement, then what it rests on. */
.ib-rb-card.is-span { grid-column:1 / -1; }
@media (min-width:900px) {
  .ib-rb-card.is-span { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) auto; gap:6px 24px;
    grid-template-areas:"head measure foot"; align-items:center; }
  .ib-rb.is-expert .ib-rb-card.is-span { grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) minmax(0,1fr); gap:8px 24px;
    grid-template-areas:"head measure reads" "what measure found" "foot foot foot"; align-items:start; }
  .ib-rb-card.is-span > .ib-rb-head { grid-area:head; }
  .ib-rb-card.is-span > .ib-rb-what { grid-area:what; }
  .ib-rb-card.is-span > .ib-rb-measure { grid-area:measure; }
  .ib-rb-card.is-span > .ib-rb-found { grid-area:found; }
  .ib-rb-card.is-span > .ib-rb-reads { grid-area:reads; }
  .ib-rb-card.is-span > .ib-rb-ladder { grid-column:1 / -1; }
  .ib-rb-card.is-span > .ib-rb-foot { grid-area:foot; }
  .ib-rb:not(.is-expert) .ib-rb-card.is-span > .ib-rb-foot { margin:0; padding:0; border:0; }
}
.ib-rb-head { display:flex; align-items:flex-start; gap:9px; min-width:0; }
.ib-rb-ic { display:inline-grid; place-items:center; width:24px; height:24px; flex-shrink:0; margin-top:1px; border-radius:7px;
  color:var(--rc); background:color-mix(in srgb, var(--rc) 15%, transparent); }
.ib-rb-title { flex:1; min-width:0; }
.ib-rb-name { margin:0; font-size:var(--fs-body); font-weight:var(--fw-semibold); color:var(--text); line-height:1.3; }
.ib-rb-state { display:inline-flex; align-items:center; gap:5px; margin-top:1px; font-size:var(--fs-caption); color:var(--muted); line-height:1.4; }
.ib-rb-state i { width:6px; height:6px; border-radius:50%; background:var(--dim); flex-shrink:0; }
.ib-rb-state.is-red { color:var(--red); }
.ib-rb-state.is-red i { background:var(--red); }
.ib-rb-state.is-amber { color:var(--amber); }
.ib-rb-state.is-amber i { background:var(--amber); }
.ib-rb-state.is-soft { color:var(--text); }
.ib-rb-state.is-soft i { background:var(--cyan); }
.ib-rb-state.is-ok i { background:var(--green); }
.ib-rb-state.is-wait i { background:var(--amber); }
.ib-rb-pts { display:flex; flex-direction:column; align-items:flex-end; flex-shrink:0; line-height:1.1; }
.ib-rb-pts b { font-size:var(--fs-stat-sm); font-weight:var(--fw-semibold); color:var(--rc); font-variant-numeric:tabular-nums; }
.ib-rb-pts small { font-size:var(--fs-micro); color:var(--dim); }
.ib-rb-what { margin:0; color:var(--muted); font-size:var(--fs-small); line-height:1.45; }
.ib-rb-measure { display:flex; flex-direction:column; gap:6px; }
.ib-rb-measure > span { color:var(--text); font-size:var(--fs-small); line-height:1.4; font-variant-numeric:tabular-nums; }
.ib-rb.is-expert .ib-rb-measure { padding:8px 10px; border-radius:8px; background:rgba(0,0,0,.2); }
.ib-rb-meter { position:relative; display:flex; gap:2px; height:5px; margin:1px 0; }
.ib-rb-meter i { flex:1; border-radius:2px; }
.ib-rb-meter i.is-normal, .ib-rb-meter i.tone-green { background:rgba(46,204,113,.38); }
.ib-rb-meter i.is-warning, .ib-rb-meter i.tone-amber { background:rgba(243,156,18,.5); }
.ib-rb-meter i.is-alert { background:rgba(232,116,59,.65); }
.ib-rb-meter i.is-critical, .ib-rb-meter i.tone-red { background:rgba(255,107,91,.72); }
.ib-rb-meter i.tone-none { background:rgba(255,255,255,.12); }
.ib-rb-meter b { position:absolute; top:-3px; width:3px; height:11px; margin-left:-1.5px; border-radius:2px;
  background:var(--text); box-shadow:0 0 0 2px var(--panel); }
.ib-rb-progress { height:5px; border-radius:3px; background:rgba(255,255,255,.08); overflow:hidden; }
.ib-rb-progress i { display:block; height:100%; border-radius:3px; background:var(--rc); }
.ib-rb-found { display:flex; flex-wrap:wrap; gap:2px 12px; font-size:var(--fs-small); color:var(--text); line-height:1.45; }
.ib-rb-found span::before { content:""; display:inline-block; width:5px; height:5px; margin:0 6px 2px 0; border-radius:50%; background:var(--rc); }
.ib-rb-found em { font-style:normal; color:var(--dim); }
.ib-rb-reads { display:flex; flex-wrap:wrap; gap:4px; }
.ib-rb-read { display:inline-flex; align-items:center; gap:5px; padding:0 7px; border-radius:var(--r-pill);
  border:1px solid var(--border); color:var(--muted); font-size:var(--fs-micro); line-height:1.7; }
.ib-rb-read i { width:6px; height:6px; border-radius:50%; background:var(--rd); }
.ib-rb-read.is-off { color:var(--dim); border-style:dashed; }
.ib-rb-read.is-off i { background:transparent; border:1px solid var(--rd); }
.ib-rb-read.is-pseudo .ib-icon { color:var(--dim); }
.ib-rb-ladder > summary { cursor:pointer; color:var(--cyan); font-size:var(--fs-caption); }
.ib-rb-ladder[open] > summary { margin-bottom:8px; }
.ib-rb-ladder .ib-mould { margin:0; }
.ib-rb-foot { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:2px 12px; margin-top:auto; padding-top:6px;
  border-top:1px solid rgba(255,255,255,.05); }
.ib-rb-foot:empty { display:none; }
.ib-rb-link { padding:1px 0; border:0; background:none; color:var(--cyan); font:inherit; font-size:var(--fs-caption); cursor:pointer; }
.ib-rb-link:hover { text-decoration:underline; }
.ib-rb-link:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; border-radius:3px; }
.ib-rb-absent { display:flex; align-items:flex-start; gap:7px; margin:10px 0 0; color:var(--muted); font-size:var(--fs-caption); line-height:1.5; }
.ib-rb-absent .ib-icon { margin-top:2px; color:var(--dim); flex-shrink:0; }
/* Old readings (D-224): the cards keep their words and drop their colour. */
.ib-rb.is-old .ib-rb-state, .ib-rb.is-old .ib-rb-state.is-soft { color:var(--muted); }
.ib-rb.is-old .ib-rb-state i { background:var(--dim); }
.ib-rb.is-old .ib-rb-card.is-raised { background:var(--panel); border-color:var(--border); }
@media (max-width:560px) {
  .ib-rb-grid, .ib-rb.is-expert .ib-rb-grid { grid-template-columns:minmax(0,1fr); }
  .ib-rb-when { margin-left:0; flex-basis:100%; }
}
/* The smaller ring has no room beside the label: the turn mark goes under it. */
@media (max-width:560px) {
  button.ib-cond-ring-c span { letter-spacing:.02em; }
  button.ib-cond-ring-c span::after { content:"⇄"; display:block; margin-top:1px; line-height:1; }
}
@media (max-width:560px) {
  .ib-cond { gap:12px; align-items:flex-start; }
  .ib-cond-ring { width:64px; height:64px; }
  .ib-cond-ring-c b { font-size:19px; }
  .ib-cond-meta { flex-direction:column; gap:3px; }
  .ib-cond-meta > span + span::before { content:none; }
}

/* ── Analytics refresh (D-074) ───────────────────────────────────────────────
   A refresh keeps the page, dimmed, instead of blanking it and losing the
   reader's place. The toolbar's tabs are D-081's, below. */
.ib-page-body.is-refreshing { opacity:.55; pointer-events:none; transition:opacity .15s; }
/* Track record (D-076): its one-sentence verdict leads the section; a
   subheading per table; a horizon the outlook does not draw, muted. */
.ib-record-head { font-size:var(--fs-body); color:var(--text); line-height:1.5; margin:6px 0 4px; }
.ib-h3 { font-size:var(--fs-caption); font-weight:var(--fw-semibold); color:var(--muted); margin:16px 0 6px; font-size:var(--fs-body); color:var(--text); }
.ib-table tr.is-quiet td { color:var(--dim); }
/* The four areas as tabs on the toolbar's bottom edge (D-081): the active
   tab's rule lies over the toolbar's own. */
.ib-anbar-sticky { row-gap:8px; padding-bottom:0; }
.ib-an-tabs { display:flex; flex-basis:100%; gap:2px; margin:2px 0 -1px; overflow-x:auto; scrollbar-width:none; }
.ib-an-tabs::-webkit-scrollbar { display:none; }
.ib-an-tabs button { flex:0 0 auto; background:transparent; border:0; border-bottom:2px solid transparent;
  color:var(--muted); font:inherit; font-size:var(--fs-body); font-weight:var(--fw-medium);
  padding:8px 14px 10px; cursor:pointer; transition:color var(--dur-fast) var(--ease); }
.ib-an-tabs button:first-child { padding-left:2px; }
.ib-an-tabs button:hover { color:var(--text); }
.ib-an-tabs button:focus-visible { outline:2px solid var(--cyan); outline-offset:-2px; border-radius:var(--r-sm); }
.ib-an-tabs button.is-active { color:var(--text); font-weight:var(--fw-semibold); border-bottom-color:var(--cyan); }
/* One set of tab names in both modes, the short ones (D-273): switching
   modes never renames a tab. The full name is each tab's accessible name. */
.ib-an-tab-l { display:none; }
.ib-an-tab-s { display:inline; }
/* A label sets display on a phone, which would otherwise beat [hidden]. */
.ib-an-for[hidden], .ib-an-panel[hidden] { display:none !important; }
/* The picker names each device by where it is, which can run long; the
   closed picker shows the start of it and the open list shows it whole. */
.ib-dev { max-width:240px; }
@media (max-width:640px) {
  .ib-anbar-sticky { gap:8px 10px; padding-top:8px; }
  /* Stacked label over a full-width picker. */
  .ib-anbar-sticky > label { flex:1 1 110px; min-width:0; display:flex; flex-direction:column; gap:2px; }
  .ib-anbar-sticky .ib-select { width:100%; min-width:0; max-width:none; margin-left:0; }
  /* Tighter tabs keep all four full names on one row down to 400 px. */
  .ib-an-tabs button { padding:8px 10px 10px; }
  .ib-an-tabs button:first-child { padding-left:2px; }
}

/* ── Analytics polish (D-079) ──────────────────────────────────────────────
   Live state as a drawn dot. The emoji it replaces is drawn by the platform
   in its own colours and shape, so "offline" came out as a glossy pearl. */
.ib-dot { display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--dim);
  vertical-align:middle; margin-right:7px; flex:none; }
.ib-dot-green { background:var(--green); box-shadow:0 0 0 3px rgba(46,204,113,.18); }
.ib-dot-amber { background:var(--amber); }
.ib-dot-red { background:var(--red); }
/* Filters on the left; the page's one action menu on the right. */
.ib-anbar-export { margin-left:auto; position:relative; }
.ib-menu > summary { list-style:none; cursor:pointer; }
.ib-menu > summary::-webkit-details-marker { display:none; }
.ib-menu[open] > summary { background:rgba(255,255,255,.1); }
.ib-menu-list { position:absolute; right:0; top:calc(100% + 6px); z-index:30; min-width:210px;
  display:flex; flex-direction:column; padding:6px; background:var(--panel); border:1px solid var(--border);
  border-radius:var(--r-md); box-shadow:0 14px 34px rgba(0,0,0,.45); }
.ib-menu-item { display:flex; align-items:center; gap:8px; width:100%; text-align:left; padding:8px 10px;
  border:0; border-radius:var(--r-sm); background:none; color:var(--text); font:inherit;
  font-size:var(--fs-body); cursor:pointer; text-decoration:none; }
.ib-menu-item:hover, .ib-menu-item:focus-visible { background:rgba(255,255,255,.07); outline:none; }
.ib-menu-item:disabled { color:var(--muted); cursor:progress; }
/* "This device" beside the id in a compare chip. */
.ib-chip-tag { font-weight:var(--fw-regular); color:var(--muted); margin-left:6px; }
/* The outlook's track as one row of evenly sized steps. */
.ib-oc-step { min-width:64px; }
@media (max-width:640px) {
  /* The device picker takes the row's spare width and Export becomes its
     icon, so the id, the part that tells devices apart, is never cut. */
  .ib-anbar-sticky > label { flex:0 0 auto; }
  .ib-anbar-sticky > label:first-child { flex:1 1 0; }
  .ib-anbar-export { align-self:flex-end; }
  .ib-anbar-export > summary { padding-left:10px; padding-right:10px; }
  .ib-anbar-export-t { position:absolute; width:1px; height:1px; overflow:hidden;
    clip:rect(0 0 0 0); white-space:nowrap; }
}
/* On a phone the areas take their short names, so all four fit; the row
   scrolls rather than widening the page if a font sets them wider. */
@media (max-width:400px) {
  .ib-an-tabs { justify-content:space-between; }
  .ib-an-tabs button, .ib-an-tabs button:first-child { padding:8px 6px 10px; }
  .ib-an-tab-l { display:none; }
  .ib-an-tab-s { display:inline; }
}

/* ── Charts (D-080) ────────────────────────────────────────────────────────
   Every chart's structure in the theme's colours: gridlines, ticks, the unit,
   the legend and the hover readout were hex values typed into charts.js, the
   tick labels at 10 px and about 2.4:1 against the panel. */
.ib-ch-grid { stroke:var(--border); stroke-width:1; }
.ib-ch-xgrid { stroke:var(--panel2); stroke-width:1; }
.ib-ch-tick { fill:var(--dim); font-size:var(--fs-micro); }
/* Bands, reference lines and marks on a line chart, and the Climate tab (D-166). */
.ib-ch-ribbon { fill:var(--green); opacity:.13; }
.ib-ch-ref { stroke:var(--amber); stroke-width:1.2; stroke-dasharray:5 4; }
.ib-ch-ref.is-floor { stroke:var(--blue); }
.ib-ch-reflabel { fill:var(--amber); font-size:var(--fs-micro); paint-order:stroke; stroke:var(--panel); stroke-width:3px; stroke-linejoin:round; }
.ib-ch-reflabel.is-floor { fill:var(--blue); }
.ib-ch-mark { stroke:var(--panel); stroke-width:.8; }
.ib-ch-mark.is-wet { fill:var(--blue); }
.ib-ch-mark.is-dry { fill:var(--amber); }
.ib-clim-tiles { display:grid; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); gap:12px; margin:12px 0 16px; }
/* Two to a row on a phone (D-180): one a row ran the Air tab's five to a
   screen and a half, where the summary tiles above them sit two across. */
@media (max-width:600px) {
  .ib-clim-tiles { grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
  .ib-clim-tile { padding:10px 11px; min-width:0; }
  .ib-clim-v { overflow-wrap:anywhere; }
}
.ib-clim-tile { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); padding:12px 14px; }
.ib-clim-tile.is-warn { border-color:var(--amber); }
.ib-clim-tile.is-ok { border-color:var(--border); }
.ib-clim-v { font-size:var(--fs-stat-sm); font-weight:var(--fw-semibold); color:var(--text); font-variant-numeric:tabular-nums; }
.ib-clim-l { font-size:var(--fs-small); color:var(--muted); margin-top:2px; }
.ib-clim-n { font-size:var(--fs-caption); color:var(--dim); margin-top:6px; line-height:var(--lh-snug); }
.ib-clim-stuck { font-size:var(--fs-small); color:var(--muted); margin:8px 0; }
.ib-clim-notes { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); padding:12px 14px; margin:14px 0 4px; }
.ib-clim-notes-h { font-size:var(--fs-small); color:var(--muted); font-weight:var(--fw-semibold); margin-bottom:6px; }
.ib-clim-notes ul { margin:0; padding-left:18px; display:grid; gap:6px; font-size:var(--fs-small); line-height:var(--lh-snug); }
/* The mould ladder (D-167). */
.ib-mould { display:grid; grid-template-columns:minmax(0, 3fr) minmax(0, 2fr); gap:16px; margin:12px 0 8px; }
@media (max-width: 760px) { .ib-mould { grid-template-columns:minmax(0, 1fr); } }
.ib-mould-ladder { list-style:none; margin:0; padding:0; display:grid; gap:0; }
.ib-mould-step { display:grid; grid-template-columns:22px minmax(0, 1fr); gap:10px; padding:10px 0; border-bottom:1px solid var(--border); }
.ib-mould-dot { width:12px; height:12px; border-radius:50%; margin:4px 0 0 4px; border:2px solid var(--border); background:var(--panel); }
.ib-mould-step.is-reached.is-watch .ib-mould-dot { background:var(--amber); border-color:var(--amber); }
.ib-mould-step.is-reached.is-alert .ib-mould-dot { background:var(--amber); border-color:var(--amber); }
.ib-mould-step.is-reached.is-critical .ib-mould-dot { background:var(--red); border-color:var(--red); }
.ib-mould-step.is-next .ib-mould-dot { border-color:var(--amber); }
.ib-mould-name { font-weight:var(--fw-semibold); color:var(--text); display:flex; align-items:center; gap:8px; }
.ib-mould-step.is-off .ib-mould-name { color:var(--muted); }
.ib-mould-cond { font-size:var(--fs-small); color:var(--muted); margin-top:2px; line-height:var(--lh-snug); }
.ib-mould-tag { font-size:var(--fs-micro); font-weight:var(--fw-semibold); padding:1px 7px; border-radius:var(--r-pill); border:1px solid var(--border); color:var(--muted); }
.ib-mould-tag.is-on { color:var(--amber); border-color:var(--amber); }
.ib-mould-step.is-critical .ib-mould-tag.is-on { color:var(--red); border-color:var(--red); }
.ib-mould-tag.is-next { color:var(--text); }
.ib-mould-bar { height:6px; border-radius:3px; background:var(--panel2); margin-top:8px; overflow:hidden; }
.ib-mould-bar i { display:block; height:100%; background:var(--amber); border-radius:3px; }
.ib-mould-held { font-size:var(--fs-caption); color:var(--muted); margin-top:4px; }
.ib-mould-alt { font-size:var(--fs-caption); color:var(--dim); padding:8px 0 0 32px; }
.ib-mould-now { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); padding:12px 14px; font-size:var(--fs-small); line-height:var(--lh-snug); }
.ib-mould-now p { margin:0 0 8px; }
.ib-mould-when { color:var(--dim); font-size:var(--fs-caption); }
.ib-clim-keys { display:flex; flex-wrap:wrap; gap:4px 14px; font-size:var(--fs-caption); color:var(--muted); margin:0 0 6px; }
.ib-clim-key { display:inline-flex; align-items:center; gap:6px; }
.ib-clim-key i { display:inline-block; width:14px; height:3px; border-radius:2px; }
.ib-clim-key i.is-band { height:10px; background:var(--green); opacity:.35; }
.ib-clim-key i.is-ref { height:0; border-top:2px dashed var(--amber); }
.ib-clim-key i.is-ref.is-floor { border-top-color:var(--blue); }
.ib-clim-key i.is-mark { width:7px; height:7px; border-radius:50%; background:linear-gradient(90deg, var(--blue) 50%, var(--amber) 50%); }
/* How the wall moves (D-168): the usual range, the flagged hours and the day's pattern. */
.ib-ch-ribbon.is-usual { fill:var(--green); opacity:.16; }
.ib-ch-mark.is-high { fill:var(--red); }
.ib-ch-mark.is-medium { fill:var(--amber); }
.ib-ch-mark.is-low, .ib-ch-mark.is-info { fill:var(--blue); }
.ib-clim-key i.is-mark.is-flag { background:linear-gradient(90deg, var(--red) 50%, var(--amber) 50%); }
.ib-clim-key i.is-mark.is-weekend { background:var(--amber); }
.ib-mv-dot { fill:var(--amber); stroke:var(--panel); stroke-width:1.2; }
.ib-mv-col { transition:opacity .15s; }
.ib-mv-col:hover { opacity:1; }
.ib-vent-row .ib-mv-open { margin-top:8px; }
.ib-vent-at { color:var(--dim); }
/* The device's sensors (D-177). */
.ib-sensor-card { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); padding:12px 14px; margin:12px 0 4px; }
.ib-sensor-lead { margin:0 0 8px; font-size:var(--fs-small); color:var(--muted); }
.ib-sensor-chips { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 10px; }
.ib-sensor-chip { font-size:var(--fs-small); padding:3px 9px; border-radius:999px; border:1px solid var(--border); color:var(--text); }
.ib-sensor-chip.is-seen { border-color:var(--green); }
.ib-sensor-chip.is-silent { border-color:var(--amber); color:var(--amber); }
.ib-sensor-note { font-size:var(--fs-caption); color:var(--dim); margin:0 0 10px; }
/* The air in the room (D-176): the times fresh air came in. */
.ib-ch-mark.is-rise { fill:var(--green); }
.ib-ch-ref.is-rise { stroke:var(--green); }
.ib-ch-reflabel.is-rise { fill:var(--green); }
.ib-clim-key i.is-mark.is-rise { background:var(--green); }
.ib-ch-unit { fill:var(--muted); font-size:var(--fs-micro); font-weight:var(--fw-semibold); }
.ib-ch-legend { fill:var(--muted); font-size:var(--fs-micro); }
.ib-ch-empty { fill:var(--muted); font-size:var(--fs-small); }
.ib-ch-cross { stroke:var(--dim); stroke-width:1; stroke-dasharray:3 3; }
.ib-ch-dot { stroke:var(--bg); stroke-width:1.5; }
.ib-ch-tip { fill:var(--panel2); stroke:var(--border); stroke-width:1; }
.ib-ch-tiptext { fill:var(--text); font-size:var(--fs-micro); }
.ib-ch-tipsub { fill:var(--muted); }
.ib-ch-barlabel { fill:var(--muted); font-size:var(--fs-small); }
.ib-ch-barvalue { fill:var(--text); font-size:var(--fs-small); font-weight:var(--fw-semibold); }
/* The channels a device does not report, named at the end of the toggle row. */
.ib-chips-note { align-self:center; color:var(--dim); font-size:var(--fs-caption); margin-left:6px; }
/* An icon leading a chip's text keeps its distance from it. */
.ib-chip > svg:first-child { margin-right:6px; vertical-align:-2px; }

/* ── Analytics areas and "About this" (D-081) ───────────────────────────────
   Sections within an area are divided by a hairline, as Live Monitor's are. */
.ib-an-panel > div + div { border-top:1px solid var(--border); margin-top:30px; }
.ib-an-panel > div + div > .ib-h2-row:first-child { margin-top:22px; }
/* A section's method, folded at its foot: a quiet link rather than a panel,
   so it reads as a footnote to the findings above it. */
.ib-about { margin-top:14px; }
.ib-about > summary { display:inline-flex; align-items:center; gap:6px; cursor:pointer; list-style:none;
  color:var(--muted); font-size:var(--fs-small); font-weight:var(--fw-medium); padding:3px 2px;
  border-radius:var(--r-sm); transition:color var(--dur-fast) var(--ease); }
.ib-about > summary::-webkit-details-marker { display:none; }
.ib-about > summary svg { color:var(--cyan); flex:none; }
.ib-about > summary:hover, .ib-about[open] > summary { color:var(--text); }
.ib-about > summary:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
.ib-about-body { margin-top:8px; padding:11px 14px; max-width:820px; background:var(--panel);
  border:1px solid var(--border); border-left:2px solid var(--cyan); border-radius:var(--r-sm); }
.ib-about-body p { margin:0; color:var(--muted); font-size:var(--fs-small); line-height:var(--lh-body); }
.ib-about-body p + p { margin-top:8px; }
/* The outlook's statuses rate temperature and humidity only, said at the
   start of their track; when the outlook was made ends its legend. */
.ib-oc-cap { flex-basis:100%; font-size:var(--fs-caption); color:var(--dim); margin-bottom:-2px; }
.ib-oc-made { margin-left:auto; color:var(--dim); }
/* A headline figure in words ("Moisture ingress") wraps inside its card. */
.ib-an-kpis .ib-kpi-v { overflow-wrap:anywhere; }

/* ── What if as a simulation (D-086) ──────────────────────────────────────────
   Bands in their rating's colours, named in a margin of their own; a cursor a
   finger, a mouse or the arrow keys move, read out above the chart; what it
   takes to reach each better rating; where along the sweep each finding is
   raised. */
.ib-wi-band.st-excellent { fill:var(--green); opacity:.13; }
.ib-wi-band.st-good { fill:var(--green); opacity:.055; }
.ib-wi-band.st-fair { fill:var(--amber); opacity:.08; }
.ib-wi-band.st-poor { fill:var(--red); opacity:.09; }
.ib-wi-bandlabel.st-excellent, .ib-wi-bandlabel.st-good { fill:var(--green); }
.ib-wi-bandlabel.st-fair { fill:var(--amber); }
.ib-wi-bandlabel.st-poor { fill:var(--red); }
.ib-wi-tick2 { fill:var(--dim); font-size:var(--fs-micro); }
.ib-wi-lanelabel { fill:var(--muted); font-size:var(--fs-micro); transition:fill var(--dur-fast) var(--ease); }
.ib-wi-lanebar { fill:var(--dim); opacity:.55; transition:fill var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease); }
.ib-wi-lane.is-on .ib-wi-lanebar { fill:var(--amber); opacity:1; }
.ib-wi-lane.is-on .ib-wi-lanelabel { fill:var(--text); }
.ib-wi-cursorline { stroke:var(--text); stroke-width:1; opacity:.5; pointer-events:none; }
.ib-wi-cursordot { fill:var(--panel); stroke:var(--text); stroke-width:2.2; pointer-events:none; }
.ib-wi-cursordot.tone-green { stroke:var(--green); }
.ib-wi-cursordot.tone-amber { stroke:var(--amber); }
.ib-wi-cursordot.tone-red { stroke:var(--red); }
/* Horizontal drags move the cursor; vertical ones still scroll the page. */
.ib-wi-capture { fill:transparent; cursor:crosshair; touch-action:pan-y; }
.ib-wi-chart:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
.ib-wi-readrow { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
  gap:6px 14px; margin:12px 0 8px; min-height:26px; }
.ib-wi-readout { display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; font-size:var(--fs-small); color:var(--text); }
.ib-wi-ro-at { font-weight:var(--fw-semibold); }
.ib-wi-ro-raises { color:var(--muted); }
.ib-wi-hint { font-size:var(--fs-caption); color:var(--dim); }
.ib-wi-ladder { display:flex; flex-direction:column; gap:6px; margin:10px 0 4px; }
.ib-wi-ladder-h { font-size:var(--fs-caption); font-weight:var(--fw-semibold); color:var(--muted); }
.ib-wi-rung { display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; width:100%; text-align:left;
  background:var(--panel); border:1px solid var(--border); border-radius:var(--r-sm); padding:8px 12px;
  color:var(--text); font:inherit; font-size:var(--fs-body); cursor:pointer;
  transition:border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); }
.ib-wi-rung:hover { border-color:rgba(0,200,220,.45); background:var(--panel2); }
.ib-wi-rung:focus-visible { outline:2px solid var(--cyan); outline-offset:1px; }
.ib-wi-rung.is-none { cursor:default; color:var(--muted); }
.ib-wi-rung-c { color:var(--muted); font-size:var(--fs-small); }
.ib-wi-host.is-refreshing { opacity:.5; pointer-events:none; transition:opacity var(--dur) var(--ease); }

/* ── Motion that plays once (D-087) ───────────────────────────────────────────
   Entrance motion belongs to a chart's first appearance. A chart's host
   settles 1.4 s after its first paint (charts.js), and a page that repaints
   what is already on screen marks itself quiet (Live Monitor's 30-second
   refresh), so neither replays it. Only transform, opacity and dash offsets
   move. Everything here is off under reduced motion, below. */
@keyframes ibFmIn { from { opacity:0; transform:translateX(-8px); } }
@keyframes ibDrop { from { opacity:0; transform:translateY(-8px); } }
@keyframes ibPulseBox { 0%, 30% { stroke:var(--cyan); stroke-opacity:1; stroke-width:2.5; } }
@keyframes ibMarkerIn { from { left:0; opacity:0; } }
.ib-chart [data-draw] { animation:ibDraw var(--dur-draw) var(--ease) backwards; }
.ib-anim.ib-fade { animation:ibFadeIn 420ms var(--ease-out) backwards; }
.ib-anim.ib-drop { animation:ibDrop 360ms var(--ease-out) backwards; }
.ib-anim.ib-grow-x { animation:ibGrowX 420ms var(--ease-out) backwards; transform-box:fill-box; transform-origin:left center; }
.ib-anim.ib-grow-y { animation:ibGrowY 360ms var(--ease-out) backwards; transform-box:fill-box; transform-origin:center; }
.ib-anim.ib-fm-in { animation:ibFmIn var(--dur-slow) var(--ease-out) backwards; }
.ib-rise { animation:ibRise var(--dur-slow) var(--ease-out) backwards; }
.ib-oc-track .ib-oc-arrow { animation:ibFadeIn 300ms var(--ease-out) 180ms backwards; }
.ib-anim-in { animation:ibFadeIn 220ms var(--ease-out); }
/* An area rises in softly, never from blank (D-238). */
.ib-panel-in { animation:ibPanelIn 220ms var(--ease-out); }
@keyframes ibPanelIn { from { opacity:.35; transform:translateY(6px); } }
.ib-emarker { animation:ibMarkerIn 700ms var(--ease-out) 120ms backwards; }
.ib-ch-hover { transition:opacity var(--dur-fast) var(--ease); }
.is-settled [data-draw], .is-settled [data-grow], .is-settled .ib-anim,
.ib-quiet [data-draw], .ib-quiet [data-grow], .ib-quiet .ib-anim, .ib-quiet .ib-rise, .ib-quiet .ib-anim-in,
.ib-quiet .ib-kpis > *, .ib-quiet .ib-glance > *, .ib-quiet .ib-cards > *, .ib-quiet .ib-lifegrid > *,
.ib-quiet .ib-sensors > *, .ib-quiet .ib-emarker, .ib-quiet .ib-oc-arrow { animation:none !important; }
/* An Analytics area read before comes back as it was left (D-238): no chart
   draws itself again, nothing rises again; the map's flow runs on. */
.is-settled .ib-rise, .is-settled .ib-anim-in, .is-settled .ib-emarker, .is-settled .ib-oc-arrow,
.is-settled .ib-fm-item.is-changed .ib-fm-box { animation:none !important; }
.is-settled .ib-fm-flow { animation:ibFmDash 1.6s linear infinite; }

/* The risk formation map: active lines carry a slow flow of dots toward the
   score while the map is on screen; pointing at a check traces it, its lines,
   readings and score lit and the rest dimmed; a reading whose level changed
   since this device was last drawn is outlined once. */
.ib-fm-flow { fill:none; stroke:var(--tone, var(--text)); stroke-width:2.4; stroke-linecap:round;
  stroke-dasharray:6 8; opacity:.9; pointer-events:none;
  animation:ibFadeIn 400ms var(--ease-out) 800ms backwards, ibFmDash 1.6s linear 800ms infinite; }
.ib-fm-flow.is-hot { stroke-width:3; opacity:1; }
@keyframes ibFmDash { to { stroke-dashoffset:-28; } }
.is-offscreen .ib-fm-flow { animation-play-state:paused; }
.ib-fm-item { transition:opacity var(--dur) var(--ease); }
.ib-fm-edge { transition:opacity var(--dur) var(--ease), stroke-width var(--dur-fast) var(--ease); }
.ib-fm-svg.has-hot .ib-fm-item:not(.is-lit) { opacity:.4; }
.ib-fm-svg.has-hot .ib-fm-edge:not(.is-hot):not(.is-clear) { opacity:.05; }
.ib-fm-svg.has-hot .ib-fm-flow:not(.is-hot) { opacity:0; }
.ib-fm-item.is-changed .ib-fm-box { animation:ibPulseBox 1.8s var(--ease-out) 420ms backwards; }

@media (prefers-reduced-motion:reduce) {
  .ib-anim, .ib-rise, .ib-anim-in, .ib-panel-in, .ib-emarker, .ib-oc-track .ib-oc-arrow,
  .ib-chart [data-draw], .ib-fm-item.is-changed .ib-fm-box { animation:none !important; }
  .ib-chart [data-draw] { stroke-dashoffset:0 !important; }
  .ib-fm-flow, .ib-fm-ring { animation:none !important; }
  .ib-an-ink { transition:none; }
}

/* ── Both levers, what warming costs, a range of one's own (D-088) ─────────── */
.ib-wi-bar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 16px; }
.ib-wi-range { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; font-size:var(--fs-small); color:var(--muted); }
.ib-wi-range[hidden] { display:none; }
.ib-wi-range label { display:inline-flex; align-items:center; gap:6px; }
.ib-wi-range input { width:5.5em; background:var(--bg2); border:1px solid var(--border); border-radius:var(--r-sm);
  color:var(--text); font:inherit; padding:4px 8px; }
.ib-wi-range input:focus { outline:none; border-color:var(--cyan); }
.ib-wi-range-err { color:var(--red); font-size:var(--fs-caption); }
.ib-wi-range-err:empty { display:none; }
.ib-wi-ro-heat, .ib-wi-heat { color:var(--amber); }
.ib-wm-cell { stroke:var(--panel); stroke-width:.5; }
.ib-wm-cell.st-excellent { fill:var(--green); opacity:.55; }
.ib-wm-cell.st-good { fill:var(--green); opacity:.26; }
.ib-wm-cell.st-fair { fill:var(--amber); opacity:.38; }
.ib-wm-cell.st-poor { fill:var(--red); opacity:.45; }
.ib-wm-key.st-excellent, .ib-wm-td.st-excellent { background:color-mix(in srgb, var(--green) 55%, transparent); }
.ib-wm-key.st-good, .ib-wm-td.st-good { background:color-mix(in srgb, var(--green) 26%, transparent); }
.ib-wm-key.st-fair, .ib-wm-td.st-fair { background:color-mix(in srgb, var(--amber) 38%, transparent); }
.ib-wm-key.st-poor, .ib-wm-td.st-poor { background:color-mix(in srgb, var(--red) 45%, transparent); }
.ib-wm-td { text-align:center; font-variant-numeric:tabular-nums; }
.ib-wm-table th, .ib-wm-table td { padding:3px 5px; font-size:var(--fs-caption); white-space:nowrap; }
.ib-wm-warm { fill:none; stroke:var(--text); stroke-width:1.8; stroke-dasharray:6 4; opacity:.85; }
.ib-wm-dry { stroke:var(--text); stroke-width:1.8; stroke-dasharray:1.5 3.5; stroke-linecap:round; opacity:.85; }
.ib-wm-now { fill:var(--panel); stroke:var(--cyan); stroke-width:2.4; }
.ib-wm-cursor { fill:none; stroke:var(--text); stroke-width:2; pointer-events:none; }
.ib-wm-key { width:14px !important; height:10px !important; border-radius:2px; vertical-align:-1px !important; }
.ib-wm-key-warm { border-top:2px dashed var(--text); }
.ib-wm-key-dry { border-top:2px dotted var(--text); }
.ib-wm-key-now { width:10px !important; height:10px !important; border:2px solid var(--cyan); border-radius:50%; vertical-align:-1px !important; }

/* ── Plain words, an ⓘ, a glossary, Simple and Expert (D-089) ──────────────────
   Simple is the default and reads larger: older eyes and a site office's
   screen. Expert keeps the denser engineering scale. Chart tick labels stay
   at --fs-micro in both: the charts place them by measured widths. */
html:not(.ib-expert) { --fs-caption:13px; --fs-small:13px; --fs-body:15px; --fs-lead:16px; --fs-title:17px; }
.ib-info { display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px;
  margin:0 2px; padding:0; border-radius:50%; border:1.5px solid var(--dim); background:transparent;
  color:var(--muted); font:italic 700 11px/1 Georgia, 'Times New Roman', serif; cursor:pointer;
  text-transform:none; letter-spacing:0; vertical-align:2px; flex-shrink:0; transition:border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.ib-info:hover, .ib-info[aria-expanded="true"] { border-color:var(--cyan); color:var(--cyan); }
.ib-info:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
/* A finger needs more than 18 px: the hit area is larger than the ring,
   44 px across (D-260; it was 38). */
.ib-info { position:relative; }
.ib-info::after { content:""; position:absolute; inset:-13px; }
.ib-info-pop { position:fixed; z-index:1000; background:var(--panel2); border:1px solid var(--border);
  border-radius:var(--r-md); padding:12px 14px; box-shadow:0 12px 32px rgba(0,0,0,.45);
  font-size:var(--fs-body); color:var(--text); line-height:1.45; animation:ibFadeIn 140ms var(--ease-out); }
.ib-term-name { display:block; font-size:var(--fs-lead); font-weight:var(--fw-semibold); margin:0 0 4px; }
.ib-term-term { color:var(--muted); font-weight:400; }
.ib-term-means { margin:0 0 6px; color:var(--text); }
.ib-term-caveat { margin:0 0 6px; color:var(--amber); font-size:var(--fs-small); }
.ib-term-caveat b { font-weight:var(--fw-semibold); }
.ib-term-more { display:inline-block; margin-top:2px; color:var(--cyan); font-size:var(--fs-small); text-decoration:none; }
.ib-term-more:hover { text-decoration:underline; }

/* ── Small print by level (D-260, D-273) ──────────────────────────────────────
   Both modes show what must be read. Helpful context (ui.js MORE) waits
   behind the card's ⓘ, which lists it, in Simple and in Expert alike: an
   expert needs the depth, not the newcomer's explanations in line (D-273).
   A context figure (DATA) is behind the ⓘ in Simple and in line in Expert,
   whose depth is figures. Expert detail (EXPERT) is Expert's, in line. One
   rule for every page, so no page keeps its own. By value: a bare
   data-detail is the Administration page's own select. */
[data-detail="more"] { display:none !important; }
html:not(.ib-expert) :is([data-detail="data"], [data-detail="expert"]) { display:none !important; }
/* A card with a Details fold of its own (data-more-open) needs no ⓘ: opened,
   it shows its helpful context in place (D-262). */
[data-more-open].is-open :is([data-detail="more"], [data-detail="data"]) { display:revert !important; }
.ib-more-list { margin:4px 0 6px; padding-left:18px; color:var(--muted); font-size:var(--fs-small); line-height:1.5; }
.ib-more-list li + li { margin-top:5px; }
.ib-more-list b { color:var(--text); font-weight:var(--fw-semibold); }
/* Parts of a line drawn side by side on the page keep a space in the list (D-263). */
.ib-more-list li > span + span { margin-left:.4em; }
.ib-term-means + .ib-more-list, .ib-term-caveat + .ib-more-list { margin-top:8px; }
/* A note that changes what a figure means, in a few words; a tap opens its
   sentence. Amber where the figure is out of date, grey where qualified. */
.ib-flagnote { position:relative; display:inline-flex; align-items:center; gap:6px; max-width:100%;
  padding:2px 10px; border-radius:999px; border:1px solid var(--border); background:rgba(255,255,255,.04);
  color:var(--muted); font:inherit; font-size:var(--fs-small); font-weight:var(--fw-semibold); line-height:1.4;
  text-align:left; cursor:pointer; vertical-align:middle; }
.ib-flagnote::before { content:""; width:7px; height:7px; border-radius:50%; background:currentColor; flex:none; }
.ib-flagnote::after { content:""; position:absolute; inset:-11px -4px; }
.ib-flagnote.is-amber { color:var(--amber); background:rgba(243,156,18,.10); border-color:rgba(243,156,18,.35); }
.ib-flagnote:hover, .ib-flagnote[aria-expanded="true"] { border-color:currentColor; }
.ib-flagnote:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
/* The review aid (terms.js initMode): Expert's own lines outlined, in Expert.
   Helpful context is behind the ⓘ in both modes, so there is none to outline. */
html.ib-expert.ib-detail-outline [data-detail="expert"] { outline:1px dashed var(--blue); outline-offset:2px; }
.ib-gl-lead { color:var(--muted); font-size:var(--fs-body); max-width:70ch; margin:-8px 0 16px; line-height:1.5; }
.ib-gl-search { width:100%; max-width:420px; background:var(--bg2); border:1px solid var(--border);
  border-radius:var(--r-sm); color:var(--text); font:inherit; font-size:var(--fs-body); padding:9px 12px; }
.ib-gl-search:focus { outline:none; border-color:var(--cyan); }
.ib-gl-sub { color:var(--dim); font-size:var(--fs-small); margin:-6px 0 12px; }
.ib-gl-list { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:12px; }
.ib-gl-item { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); padding:14px 16px; }
.ib-gl-item[hidden], .ib-gl-group[hidden] { display:none; }
.ib-gl-item h3.ib-term-name { margin:0 0 6px; }
.ib-gl-item.is-focus { border-color:var(--cyan); box-shadow:0 0 0 1px var(--cyan); }
.ib-gl-tag { margin:0; color:var(--dim); font-size:var(--fs-caption); }
.ib-gl-empty { color:var(--muted); }
.ib-modeswitch { display:inline-flex; align-items:center; gap:8px; background:none; border:1px solid var(--border);
  border-radius:var(--r-pill); padding:5px 12px 5px 6px; color:var(--muted); font:inherit; font-size:var(--fs-caption);
  cursor:pointer; white-space:nowrap; }
.ib-modeswitch:hover { border-color:rgba(0,200,220,.45); color:var(--text); }
.ib-modeswitch:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
.ib-modeswitch-track { position:relative; width:30px; height:16px; border-radius:var(--r-pill); background:var(--border);
  transition:background var(--dur-fast) var(--ease); }
.ib-modeswitch-knob { position:absolute; top:2px; left:2px; width:12px; height:12px; border-radius:50%;
  background:var(--muted); transition:transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); }
.ib-modeswitch[aria-checked="true"] { color:var(--text); }
.ib-modeswitch[aria-checked="true"] .ib-modeswitch-track { background:rgba(0,200,220,.35); }
.ib-modeswitch[aria-checked="true"] .ib-modeswitch-knob { transform:translateX(14px); background:var(--cyan); }
@media (max-width:720px) { .ib-modeswitch-t { display:none; } .ib-modeswitch { padding:5px 6px; } }

.ib-wi-range [hidden] { display:none; }

/* ── The next hours, for everyone (D-090) ─────────────────────────────────────
   A word and an icon for every rating, never colour alone; zone names in the
   chart at a size meant to be read, not decoded. */
.ib-fs-head { margin-bottom:14px; }
.ib-fs-steps { display:flex; flex-wrap:wrap; align-items:stretch; gap:8px; margin:0 0 16px; }
.ib-fs-step { display:flex; flex-direction:column; gap:6px; min-width:118px; padding:10px 14px;
  background:var(--panel); border:1px solid var(--border); border-left:4px solid var(--dim); border-radius:var(--r-sm); }
.ib-fs-step.tone-green { border-left-color:var(--green); }
.ib-fs-step.tone-amber { border-left-color:var(--amber); }
.ib-fs-step.tone-red { border-left-color:var(--red); }
.ib-fs-when { font-size:var(--fs-caption); color:var(--muted); }
.ib-fs-word { display:inline-flex; align-items:center; gap:7px; font-size:var(--fs-lead); font-weight:var(--fw-semibold); color:var(--text); }
.ib-fs-step.tone-green .ib-fs-word .ib-icon { color:var(--green); }
.ib-fs-step.tone-amber .ib-fs-word .ib-icon { color:var(--amber); }
.ib-fs-step.tone-red .ib-fs-word .ib-icon { color:var(--red); }
.ib-fs-arrow { align-self:center; color:var(--dim); font-size:20px; }
.ib-fs-same { align-self:center; color:var(--muted); font-size:var(--fs-body); padding:0 6px; }
.ib-fs-charthead { font-size:var(--fs-body); font-weight:var(--fw-semibold); color:var(--text); margin:4px 0 8px; }
.ib-fs-zone.tone-green { fill:var(--green); opacity:.10; }
.ib-fs-zone.tone-amber { fill:var(--amber); opacity:.11; }
.ib-fs-zone.tone-red { fill:var(--red); opacity:.14; }
.ib-fs-zword { font-size:13px; font-weight:600; }
.ib-fs-zword.tone-green { fill:var(--green); }
.ib-fs-zword.tone-amber { fill:var(--amber); }
.ib-fs-zword.tone-red { fill:var(--red); }
.ib-fs-edge { stroke:var(--dim); stroke-width:1; stroke-dasharray:3 4; opacity:.7; }
.ib-fs-tick { fill:var(--muted); font-size:13px; }
.ib-fs-tick.is-now { fill:var(--cyan); font-weight:600; }
.ib-fs-nowline { stroke:var(--cyan); stroke-width:1.2; stroke-dasharray:4 4; opacity:.8; }
.ib-fs-past { fill:none; stroke:var(--text); stroke-width:2.4; stroke-linejoin:round; stroke-linecap:round; }
.ib-fs-ahead { fill:none; stroke:var(--text); stroke-width:2.4; stroke-dasharray:2 6; stroke-linecap:round; }
.ib-fs-range { fill:var(--text); opacity:.13; }
.ib-fs-nowdot { fill:var(--panel); stroke:var(--cyan); stroke-width:2.6; }
.ib-fs-legend { display:flex; flex-wrap:wrap; gap:6px 18px; margin-top:10px; font-size:var(--fs-caption); color:var(--muted); }
.ib-fs-legend b { display:inline-block; width:20px; height:0; margin-right:7px; vertical-align:3px; }
.ib-fs-key-past { border-top:2.4px solid var(--text); }
.ib-fs-key-ahead { border-top:2.4px dotted var(--text); }
.ib-fs-key-range { height:10px !important; vertical-align:-1px !important; background:var(--text); opacity:.25; border-radius:2px; }
.ib-fs-sure { margin-top:14px; font-size:var(--fs-body); color:var(--text); line-height:1.5; }
.ib-fs-sure p { margin:0 0 6px; }
.ib-fs-foot { display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; margin-top:8px; font-size:var(--fs-caption); }

/* ── The formation map keeps itself current (D-091) ───────────────────────────
   A dot that breathes only while readings are arriving: an offline device's
   map does not pretend to be live. */
/* The links, day by day (D-239) */
.ib-fm-rel ul.ib-fm-days-list { list-style:none; margin:8px 0 0; padding:0; display:block; }
.ib-fm-rel ul.ib-fm-days-list li { display:grid; grid-template-columns:minmax(0, 15em) 168px minmax(0, 1fr); gap:4px 14px;
  align-items:center; padding:4px 0; }
.ib-fm-dspark { display:block; overflow:visible; }
.ib-fm-dspark path { fill:none; stroke:#B794F6; stroke-width:1.4; }
.ib-fm-dspark circle { fill:#B794F6; opacity:.55; }
.ib-fm-dspark circle.on { opacity:1; }
.ib-fm-dspark .zero { stroke:var(--muted); opacity:.45; stroke-width:1; stroke-dasharray:2 3; }
@media (max-width: 640px) { .ib-fm-rel ul.ib-fm-days-list li { grid-template-columns:minmax(0, 1fr) 168px; }
  .ib-fm-rel ul.ib-fm-days-list li .ib-fm-rel-what { grid-column:1 / -1; } }
/* A reading not sent lately (D-236): kept, dimmed. */
.ib-fm-item.is-stale .ib-fm-box { stroke-dasharray:4 4; opacity:.7; }
.ib-fm-item.is-stale text { opacity:.75; }
/* The risk network (D-235): a clear risk's inputs stay drawn, faint; a
   reading the risk does not read joins it dashed, in the moved-together violet. */
.ib-fm-edge.is-clear.is-net { opacity:.38; stroke-dasharray:none; }
.ib-fm-edge.is-clear.is-net.is-hot { opacity:.95; }
.ib-fm-edge.is-support { stroke:#B794F6; stroke-width:1.3; stroke-dasharray:5 4; opacity:.75; }
.ib-fm-edge.is-support.is-hot { opacity:1; stroke-width:2; }
.ib-fm-supl { font-size:10px; fill:#B794F6; font-weight:600; pointer-events:none; opacity:0; transition:opacity var(--dur-fast) var(--ease); }
.ib-fm-supl.is-hot { opacity:1; }
.ib-rel-leg i.support { width:18px; height:0; border-radius:0; transform:none; background:none; border-top:2px dashed #B794F6; }
.ib-fm-uncons .ib-fm-unc-list { display:block; margin:8px 0 0; padding-left:18px; list-style:disc; }
.ib-fm-uncons .ib-fm-unc-list li { display:list-item; margin:5px 0; font-size:var(--fs-small); line-height:1.5; }
/* Why no measured link is drawn (D-234) */
.ib-fm-nolinks { display:flex; align-items:flex-start; gap:8px; margin:4px 0 10px; padding:8px 12px; border-radius:10px;
  border:1px solid var(--border); font-size:var(--fs-caption); color:var(--muted); line-height:1.45; }
.ib-fm-nolinks-i { flex-shrink:0; width:16px; height:16px; border-radius:50%; border:1px solid currentColor; display:inline-flex;
  align-items:center; justify-content:center; font-size:11px; font-weight:700; font-style:italic; margin-top:1px; }
.ib-fm-fresh { display:flex; align-items:center; gap:8px; margin:-4px 0 10px; font-size:var(--fs-caption); color:var(--muted); }
.ib-fm-livedot { width:9px; height:9px; border-radius:50%; background:var(--dim); flex-shrink:0; }
.ib-fm-livedot.is-on { background:var(--green); box-shadow:0 0 0 0 rgba(46,204,113,.55); animation:ibLiveDot 2.4s ease-out infinite; }
@keyframes ibLiveDot { 0% { box-shadow:0 0 0 0 rgba(46,204,113,.55); } 70%, 100% { box-shadow:0 0 0 8px rgba(46,204,113,0); } }
.ib-fm-spark { fill:none; stroke:var(--muted); stroke-width:1.6; stroke-linejoin:round; stroke-linecap:round; opacity:.9; }
.ib-fm-spark.lv-warning { stroke:var(--amber); }
.ib-fm-spark.lv-alert, .ib-fm-spark.lv-critical { stroke:var(--red); }
.ib-fm-fine { margin-top:12px; font-size:var(--fs-body); color:var(--muted); line-height:1.5; }
.ib-fm-fine p { margin:0 0 4px; }
.ib-fm-fine b { color:var(--text); font-weight:var(--fw-semibold); }
/* Under a readings picture, one fold (D-305): its title, then in counts what
   it holds; inside, a block a part, each with its own ⓘ. */
.ib-fm-more { margin-top:12px; }
.ib-fm-more > summary { flex-wrap:wrap; row-gap:2px; }
.ib-fm-more-t { color:var(--text); }
.ib-fm-more-n { color:var(--muted); font-weight:400; }
.ib-fm-more-n::before { content:"·"; margin-right:8px; color:var(--dim); }
.ib-fm-more-body { display:grid; grid-template-columns:minmax(0, 1fr); gap:16px; }
/* A wide table scrolls within its part, never the page. */
.ib-fm-more-part { min-width:0; overflow-x:auto; }
.ib-fm-more-h { display:flex; align-items:center; gap:6px; font-weight:var(--fw-semibold); color:var(--text); }
.ib-fm-more-part > p { margin:3px 0 0; font-size:var(--fs-body); color:var(--muted); line-height:1.5; }
.ib-fm-more-part .ib-table { margin-top:8px; }
.ib-fm-more-body .ib-fm-rel { margin-top:0; padding:0; border:0; border-radius:0; }
.ib-fm-rel-h .ib-info { margin-left:6px; }
@media (max-width:600px) {
  .ib-fm-more-n { flex-basis:100%; padding-left:19px; }
  .ib-fm-more-n::before { content:none; }
}
.ib-fm-all { margin-top:8px; }
.ib-fm-feed { margin-top:14px; padding:12px 14px; background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); }
.ib-fm-feed-h { font-size:var(--fs-caption); font-weight:var(--fw-semibold); color:var(--muted); margin-bottom:6px; }
.ib-fm-feed ul { margin:0; padding:0; list-style:none; }
.ib-fm-feed li { padding:4px 0; font-size:var(--fs-body); color:var(--text); border-top:1px solid var(--border); }
.ib-fm-feed li:first-child { border-top:0; animation:ibFadeIn 400ms var(--ease-out); }
.ib-fm-feed time { color:var(--cyan); font-variant-numeric:tabular-nums; margin-right:8px; }
.ib-fm-item[data-check] { cursor:pointer; }
@media (prefers-reduced-motion:reduce) { .ib-fm-livedot.is-on { animation:none; } }

/* ── How the risk formed, replayed (D-092) ──────────────────────────────────── */
.ib-rp-start { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0 0 12px; font-size:var(--fs-small); color:var(--muted); }
.ib-rp-start[hidden] { display:none; }
.ib-rp { border:1px solid rgba(0,200,220,.35); border-radius:var(--r-md); padding:12px 14px; background:var(--bg2); }
.ib-rp-bar { display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; }
.ib-rp-time { font-size:var(--fs-lead); font-weight:var(--fw-semibold); color:var(--text); font-variant-numeric:tabular-nums; min-width:14ch; }
.ib-rp-speed { display:inline-flex; align-items:center; gap:6px; font-size:var(--fs-caption); color:var(--muted); }
.ib-rp-speed select { background:var(--bg2); color:var(--text); border:1px solid var(--border); border-radius:var(--r-sm); font:inherit; padding:3px 6px; }
.ib-rp-bar [data-exit] { margin-left:auto; }
.ib-rp-scrub { width:100%; margin:12px 0 4px; accent-color:var(--cyan); height:28px; }
.ib-rp-span { font-size:var(--fs-caption); color:var(--dim); margin-bottom:10px; }
.ib-rp-log { margin-top:12px; }
.ib-rp-log ol { margin:0; padding:0; list-style:none; max-height:220px; overflow:auto; }
.ib-rp-log li { padding:5px 0; font-size:var(--fs-body); color:var(--muted); border-top:1px solid var(--border); }
.ib-rp-log li:first-child { border-top:0; }
.ib-rp-log li.is-now { color:var(--text); }
.ib-rp-log time { color:var(--cyan); font-variant-numeric:tabular-nums; margin-right:8px; }

/* ── Would opening the windows help now? (D-094) ────────────────────────────── */
.ib-vent { margin:0 0 14px; }
.ib-vent-row { display:flex; gap:12px; align-items:flex-start; padding:12px 14px; background:var(--panel);
  border:1px solid var(--border); border-left:4px solid var(--dim); border-radius:var(--r-sm); }
.ib-vent-row.tone-green { border-left-color:var(--green); }
.ib-vent-row.tone-amber { border-left-color:var(--amber); }
.ib-vent-row.tone-red { border-left-color:var(--red); }
.ib-vent-ic { flex-shrink:0; margin-top:2px; color:var(--dim); }
.tone-green > .ib-vent-ic { color:var(--green); }
.tone-amber > .ib-vent-ic { color:var(--amber); }
.tone-red > .ib-vent-ic { color:var(--red); }
.ib-vent-head { font-size:var(--fs-lead); font-weight:var(--fw-semibold); color:var(--text); }
.ib-vent-why { font-size:var(--fs-body); color:var(--text); margin-top:4px; line-height:1.45; }
.ib-vent-note { font-size:var(--fs-small); color:var(--muted); margin-top:4px; }
.ib-fs-airing { margin-top:6px; font-size:var(--fs-body); font-weight:var(--fw-semibold); color:var(--text); }

/* ── The replay plays as one picture (D-096) ──────────────────────────────────
   The map stays put and changes in place: lines light and fade, colours
   shift, the score counts. Off under reduced motion, where steps still show. */
.ib-rp-start { gap:10px 12px; margin:0 0 14px; }
.ib-rp-go { font-size:var(--fs-body); padding:9px 16px; }
.ib-rp-or { color:var(--dim); }
.ib-rp-hint { color:var(--muted); font-size:var(--fs-caption); }
.ib-rp-bar .ib-rp-span { font-size:var(--fs-caption); color:var(--dim); margin:0; flex:1 1 220px; }
.ib-rp-tlhost { margin-top:12px; }
.ib-rp-tl { display:block; }
.ib-rp-tick { fill:var(--dim); font-size:11px; }
.ib-rp-area { fill:var(--text); opacity:.07; }
.ib-rp-line { fill:none; stroke:var(--text); stroke-width:2; stroke-linejoin:round; }
.ib-rp-mark.is-start path { fill:var(--red); }
.ib-rp-mark.is-clear path { fill:var(--green); }
.ib-rp-head { transition:transform 600ms var(--ease-out); }
.ib-rp-headline { stroke:var(--cyan); stroke-width:1.6; }
.ib-rp-headdot { fill:var(--panel); stroke:var(--cyan); stroke-width:2.6; transition:cy 600ms var(--ease-out); }
.ib-rp-capture { fill:transparent; cursor:pointer; touch-action:pan-y; }
.ib-rp-scrub { height:18px; margin:2px 0 8px; opacity:.8; }
.ib-rp-caption { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; margin:6px 0 4px; min-height:30px; }
.ib-rp-caption.is-new { animation:ibRpCaption 500ms var(--ease-out); }
@keyframes ibRpCaption { from { opacity:0; transform:translateY(4px); } }
.ib-rp-when { font-size:var(--fs-title); font-weight:var(--fw-bold); color:var(--cyan); font-variant-numeric:tabular-nums; }
.ib-rp-what { font-size:var(--fs-title); font-weight:var(--fw-semibold); color:var(--text); }
.ib-rp-head-sentence { font-size:var(--fs-body); color:var(--muted); margin-bottom:10px; }
.ib-rp-stage .ib-fm-box { transition:stroke 600ms var(--ease), fill 600ms var(--ease); }
.ib-rp-stage .ib-fm-gem, .ib-rp-stage .ib-fm-dot, .ib-rp-stage .ib-fm-ring,
.ib-rp-stage .ib-fm-s, .ib-rp-stage .ib-fm-t { transition:fill 600ms var(--ease), stroke 600ms var(--ease); }
.ib-rp-stage .ib-fm-edge { transition:opacity 700ms var(--ease), stroke 700ms var(--ease), stroke-width 700ms var(--ease); }
.ib-rp-stage .ib-fm-flow { transition:opacity 700ms var(--ease); }
.ib-rp-stage .ib-fm-flow.is-clear { opacity:0; }
.ib-rp-stage .ib-fm-item { transition:opacity 600ms var(--ease); }
.ib-rp.is-playing .ib-rp-headdot { stroke-width:3; }
@media (prefers-reduced-motion:reduce) {
  .ib-rp-head, .ib-rp-headdot, .ib-rp-stage * { transition:none !important; }
  .ib-rp-caption.is-new { animation:none; }
}

/* ── Language (D-097) ── */
.ib-langpick select { background:var(--bg2); color:var(--text); border:1px solid var(--border); border-radius:var(--r-pill);
  font:inherit; font-size:var(--fs-caption); padding:4px 8px; cursor:pointer; }
.ib-langpick select:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }

/* ── Administration (D-098) ──
   A control room rather than three tables: one line that says whether
   anything is wrong, what needs attention with a way to it, tiles that each
   open their tab, and the detail behind them. Colour is never the only
   signal: every tone carries a word. */
.ib-adm { --adm-green:rgba(46,204,113,.14); --adm-amber:rgba(243,156,18,.15); --adm-red:rgba(255,107,91,.15);
  --adm-cyan:rgba(0,200,220,.13); }
.ib-adm .tone-green, .ib-adm .is-green { --tone:var(--green); --tone-bg:var(--adm-green); }
.ib-adm .tone-amber, .ib-adm .is-amber { --tone:var(--amber); --tone-bg:var(--adm-amber); }
.ib-adm .tone-red, .ib-adm .is-red { --tone:var(--red); --tone-bg:var(--adm-red); }
.ib-adm .tone-cyan, .ib-adm .is-info { --tone:var(--cyan); --tone-bg:var(--adm-cyan); }
.ib-adm .tone-grey { --tone:var(--dim); --tone-bg:rgba(150,160,170,.1); }

.ib-adm-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.ib-adm-lead { margin:6px 0 0; color:var(--muted); font-size:var(--fs-lead); line-height:var(--lh-snug); }
.ib-adm-live { display:inline-flex; align-items:center; gap:8px; padding:6px 12px; border-radius:var(--r-pill);
  border:1px solid rgba(46,204,113,.3); background:rgba(46,204,113,.08); color:var(--green);
  font-size:var(--fs-small); font-weight:var(--fw-semibold); font-variant-numeric:tabular-nums; white-space:nowrap; }
.ib-adm-livedot { width:8px; height:8px; border-radius:50%; background:var(--green); animation:ib-adm-ping 2s var(--ease-out) infinite; }
@keyframes ib-adm-ping { 0% { box-shadow:0 0 0 0 rgba(46,204,113,.55); } 70%,100% { box-shadow:0 0 0 8px rgba(46,204,113,0); } }

.ib-adm-tabs { display:flex; gap:2px; margin:18px 0 20px; border-bottom:1px solid var(--border);
  overflow-x:auto; scrollbar-width:none; }
/* Scrollers must not widen the page: without inline-size containment their
   content's width is what the main column sizes to, and a phone scrolls sideways. */
.ib-adm-tabs, .ib-adm .ib-tablewrap { contain:inline-size; }
.ib-adm-tabs::-webkit-scrollbar { display:none; }
.ib-adm-tab { display:inline-flex; align-items:center; gap:8px; padding:10px 14px; margin-bottom:-1px; background:none;
  border:0; border-bottom:2px solid transparent; color:var(--muted); font:inherit; font-size:var(--fs-body);
  font-weight:var(--fw-semibold); cursor:pointer; white-space:nowrap; transition:color var(--dur) var(--ease); }
.ib-adm-tab:hover { color:var(--text); }
.ib-adm-tab.active { color:var(--cyan); border-bottom-color:var(--cyan); }
.ib-adm-tab:focus-visible { outline:2px solid var(--cyan); outline-offset:-2px; border-radius:6px; }
.ib-adm-badge { min-width:18px; height:18px; padding:0 5px; border-radius:9px; display:inline-grid; place-items:center;
  font-size:var(--fs-micro); font-weight:var(--fw-bold); background:var(--amber); color:#1d1300; }
.ib-adm-badge.is-red { background:var(--red); color:#fff; }
.ib-adm-badge[hidden] { display:none; }
/* The same count on the sidebar's Administration entry (D-099). */
.ib-nav-badge { margin-left:auto; min-width:18px; height:18px; padding:0 5px; border-radius:9px; display:inline-grid;
  place-items:center; font-size:var(--fs-micro); font-weight:var(--fw-bold); background:var(--amber); color:#1d1300; }
.ib-nav-badge.is-red { background:var(--red); color:#fff; }
.ib-shell.is-rail .ib-nav-badge { position:absolute; top:2px; right:8px; min-width:15px; height:15px; padding:0 3px;
  font-size:10px; margin:0; box-shadow:0 0 0 2px var(--bg2); }
@media (max-width:1120px) { .ib-nav-badge { position:absolute; top:2px; right:8px; min-width:15px; height:15px;
  padding:0 3px; font-size:10px; margin:0; box-shadow:0 0 0 2px var(--bg2); } }

/* Status: the one line that says whether anything is wrong */
.ib-adm-status { position:relative; overflow:hidden; display:flex; align-items:center; gap:18px; flex-wrap:wrap;
  padding:22px 24px; border-radius:var(--r-lg); background:var(--panel);
  border:1px solid color-mix(in srgb, var(--tone) 35%, var(--border)); }
.ib-adm-status::before { content:""; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(110% 160% at 0% 0%, var(--tone-bg) 0%, transparent 60%); }
.ib-adm-status > * { position:relative; }
.ib-adm-status-ic { width:54px; height:54px; border-radius:15px; display:grid; place-items:center; flex:none;
  color:var(--tone); background:var(--tone-bg); box-shadow:0 0 0 1px color-mix(in srgb, var(--tone) 30%, transparent) inset; }
.ib-adm-status-txt { flex:1 1 320px; min-width:0; }
.ib-adm-status-h { font-size:22px; font-weight:var(--fw-bold); letter-spacing:var(--ls-tight); line-height:var(--lh-tight); }
.ib-adm-status-sub { margin-top:6px; color:var(--muted); font-size:var(--fs-body); }

.ib-adm-engine { display:flex; align-items:center; gap:12px; padding:8px 14px 8px 8px; border-radius:var(--r-pill);
  background:rgba(0,0,0,.18); border:1px solid var(--border); }
.ib-adm-ring { width:46px; height:46px; transform:rotate(-90deg); flex:none; }
.ib-adm-ring circle { fill:none; stroke-width:4; }
.ib-adm-ring-bg { stroke:rgba(255,255,255,.08); }
.ib-adm-ring-fg { stroke:var(--cyan); stroke-linecap:round; transition:stroke-dashoffset 1s linear; }
.ib-adm-engine-txt b { display:block; font-size:var(--fs-lead); font-variant-numeric:tabular-nums; white-space:nowrap; }
.ib-adm-engine-txt span { font-size:var(--fs-caption); color:var(--muted); white-space:nowrap; font-variant-numeric:tabular-nums; }

/* What needs attention */
.ib-adm-attn { margin-top:14px; border:1px solid var(--border); border-radius:var(--r-md); overflow:hidden; background:var(--panel); }
.ib-adm-attn-row { display:flex; align-items:center; gap:14px; padding:13px 16px; border-top:1px solid var(--border);
  box-shadow:3px 0 0 0 var(--tone) inset; }
.ib-adm-attn-row:first-child { border-top:0; }
.ib-adm-attn-ic { width:32px; height:32px; border-radius:9px; display:grid; place-items:center; flex:none;
  color:var(--tone); background:var(--tone-bg); }
.ib-adm-attn-txt { flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
.ib-adm-attn-txt b { font-size:var(--fs-lead); }
.ib-adm-attn-txt span { color:var(--muted); font-size:var(--fs-small); line-height:var(--lh-snug); }
.ib-adm-attn-row .ib-btn { flex:none; }

/* Tiles: each opens its tab */
.ib-adm-tiles { margin-top:16px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.ib-adm-tile { position:relative; overflow:hidden; display:flex; flex-direction:column; gap:6px; padding:16px 16px 14px 18px;
  text-align:left; font:inherit; color:inherit; cursor:pointer; border-radius:var(--r-md);
  background:linear-gradient(180deg, rgba(255,255,255,.03), transparent 55%), var(--panel); border:1px solid var(--border);
  transition:border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.ib-adm-tile::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--tone); }
.ib-adm-tile:hover { border-color:rgba(0,200,220,.45); transform:translateY(-2px); box-shadow:0 10px 24px -14px rgba(0,0,0,.6); }
.ib-adm-tile:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
.ib-adm-tile-top { display:flex; align-items:center; gap:9px; color:var(--muted); font-size:var(--fs-micro);
  font-weight:var(--fw-bold); letter-spacing:var(--ls-caps); text-transform:uppercase; }
.ib-adm-tile-top > .ib-icon:last-child { margin-left:auto; opacity:.45; }
.ib-adm-tile:hover .ib-adm-tile-top > .ib-icon:last-child { opacity:1; color:var(--cyan); }
.ib-adm-tile-ic { width:28px; height:28px; border-radius:8px; display:grid; place-items:center; color:var(--tone); background:var(--tone-bg); }
.ib-adm-tile-v { margin-top:4px; font-size:var(--fs-stat-lg); font-weight:var(--fw-bold); letter-spacing:var(--ls-tighter);
  line-height:var(--lh-tight); font-variant-numeric:tabular-nums; }
.ib-adm-tile-v small { font-size:var(--fs-lead); font-weight:var(--fw-semibold); letter-spacing:0; color:var(--muted); }
.ib-adm-tile-v .is-bad { color:var(--red); }
.ib-adm-tile-sub { color:var(--muted); font-size:var(--fs-small); }
.ib-adm-tile-viz { margin-top:auto; padding-top:10px; min-height:44px; display:flex; flex-direction:column; justify-content:flex-end; }

.ib-adm-ekg { width:100%; height:28px; overflow:visible; }
.ib-adm-ekg path { fill:none; stroke-width:1.6; stroke-linejoin:round; stroke-linecap:round; }
.ib-adm-ekg-base { stroke:rgba(255,255,255,.12); }
.ib-adm-ekg-pulse { stroke:none; }
.ib-adm-ekg.is-on .ib-adm-ekg-pulse { stroke:var(--green); stroke-width:2; stroke-dasharray:16 84;
  animation:ib-adm-ekg 2.6s linear infinite; filter:drop-shadow(0 0 3px rgba(46,204,113,.6)); }
@keyframes ib-adm-ekg { from { stroke-dashoffset:16; } to { stroke-dashoffset:-84; } }

.ib-adm-segbar { display:flex; gap:2px; height:8px; border-radius:4px; overflow:hidden; background:rgba(255,255,255,.05); }
.ib-adm-seg { display:block; min-width:3px; }
.ib-adm-seg.is-now, .ib-adm-dot.is-now, .ib-adm-cov-bar.is-now { background:var(--green); }
.ib-adm-seg.is-late, .ib-adm-dot.is-late, .ib-adm-cov-bar.is-late { background:var(--amber); }
.ib-adm-seg.is-silent, .ib-adm-dot.is-silent, .ib-adm-cov-bar.is-silent { background:var(--red); }
.ib-adm-seg.is-long, .ib-adm-dot.is-long, .ib-adm-cov-bar.is-long { background:#5d6d80; }
.ib-adm-seg.is-never, .ib-adm-dot.is-never, .ib-adm-cov-bar.is-never { background:rgba(150,160,170,.28); }
.ib-adm-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:8px; vertical-align:1px; flex:none; }

.ib-adm-faces { display:flex; align-items:center; }
.ib-adm-face { position:relative; width:32px; height:32px; margin-left:-6px; border-radius:50%; flex:none; display:grid;
  place-items:center; font-size:var(--fs-micro); font-weight:var(--fw-bold); color:var(--text);
  background:linear-gradient(145deg, #2a4560, #1d3045); border:2px solid var(--panel); }
.ib-adm-faces .ib-adm-face:first-child { margin-left:0; }
.ib-adm-face.is-on::after { content:""; position:absolute; right:-2px; bottom:-2px; width:10px; height:10px;
  border-radius:50%; background:var(--green); border:2px solid var(--panel); }
.ib-adm-face.is-more { background:rgba(255,255,255,.06); color:var(--muted); }

.ib-adm-bars { display:block; width:100%; height:120px; }
.ib-adm-bars.is-mini { height:34px; }
.ib-adm-bar-ok { fill:var(--green); opacity:.8; }
.ib-adm-bar-bad { fill:var(--red); }
.ib-adm-bar-none { fill:rgba(255,255,255,.1); }
.ib-adm-bar-hit { fill:transparent; }
.ib-adm-bars g:hover .ib-adm-bar-hit { fill:rgba(255,255,255,.05); }
.ib-adm-axis { display:flex; justify-content:space-between; margin-top:6px; font-size:var(--fs-micro); color:var(--dim); }

.ib-adm-stack { display:flex; gap:2px; height:10px; border-radius:5px; overflow:hidden; }
.ib-adm-stack > span { display:block; min-width:3px; }
.ib-adm-stack.is-big { height:14px; border-radius:7px; margin-bottom:12px; }
.ib-adm-stack .s0, .ib-adm-swatch.s0 { background:var(--cyan); }
.ib-adm-stack .s1, .ib-adm-swatch.s1 { background:#3d8fe0; }
.ib-adm-stack .s2, .ib-adm-swatch.s2 { background:#8e7dff; }
.ib-adm-stack .s3, .ib-adm-swatch.s3 { background:var(--amber); }
.ib-adm-stack .s4, .ib-adm-swatch.s4 { background:var(--green); }
.ib-adm-stack .s5, .ib-adm-swatch.s5 { background:#5d6d80; }

.ib-adm-keep { height:8px; border-radius:4px; overflow:hidden; background:rgba(255,107,91,.45); }
.ib-adm-keep > span { display:block; height:100%; background:var(--green); }
.ib-adm-keep-l { margin-top:6px; font-size:var(--fs-caption); color:var(--muted); }

/* Activity, as sentences */
.ib-adm-audit { list-style:none; margin:0; padding:0; overflow:hidden; background:var(--panel);
  border:1px solid var(--border); border-radius:var(--r-md); }
.ib-adm-day { padding:8px 16px; background:var(--panel2); color:var(--dim); font-size:var(--fs-micro);
  font-weight:var(--fw-bold); letter-spacing:var(--ls-caps); text-transform:uppercase; }
.ib-adm-day:not(:first-child) { border-top:1px solid var(--border); }
.ib-adm-ev { display:flex; align-items:center; gap:12px; padding:10px 16px; border-top:1px solid var(--border); }
.ib-adm-audit.is-compact .ib-adm-ev:first-child { border-top:0; }
.ib-adm-ev-ic { width:28px; height:28px; border-radius:50%; display:grid; place-items:center; flex:none;
  color:var(--muted); background:rgba(255,255,255,.05); }
.ib-adm-ev.cat-signin .ib-adm-ev-ic { color:var(--cyan); background:var(--adm-cyan); }
.ib-adm-ev.cat-people .ib-adm-ev-ic { color:#a597ff; background:rgba(142,125,255,.14); }
.ib-adm-ev.cat-places .ib-adm-ev-ic { color:var(--amber); background:var(--adm-amber); }
.ib-adm-ev.cat-notes .ib-adm-ev-ic { color:var(--green); background:var(--adm-green); }
.ib-adm-ev.cat-data .ib-adm-ev-ic { color:#6fb3ff; background:rgba(61,143,224,.15); }
.ib-adm-ev-t { flex:1; min-width:0; line-height:var(--lh-snug); }
.ib-adm-ev-code { display:none; margin-left:6px; font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size:var(--fs-micro); color:var(--dim); }
html.ib-expert .ib-adm-ev-code { display:inline; }
.ib-adm-ev-m { flex:none; color:var(--dim); font-size:var(--fs-caption); white-space:nowrap; font-variant-numeric:tabular-nums; }

.ib-adm-toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.ib-adm-toolbar > .ib-chips { flex:1 1 100%; }
.ib-adm-toolbar > .ib-adm-search { flex:1 1 240px; width:auto; max-width:360px; }
.ib-adm-search { min-width:0; width:240px; max-width:100%; padding:7px 12px; border-radius:var(--r-sm);
  background:var(--panel); border:1px solid var(--border); color:var(--text); font:inherit; font-size:var(--fs-body); }
.ib-adm-search:focus { outline:none; border-color:rgba(0,200,220,.55); box-shadow:0 0 0 3px rgba(0,200,220,.12); }
.ib-chip .ib-icon { margin-right:5px; vertical-align:-2px; }
.ib-chip b { margin-left:4px; font-variant-numeric:tabular-nums; opacity:.75; }

/* Sign-ins */
.ib-adm-secgrid { display:grid; grid-template-columns:minmax(0,3fr) minmax(0,2fr); gap:14px; align-items:start; }
.ib-adm-legend { display:flex; align-items:center; gap:6px; font-size:var(--fs-caption); color:var(--muted); }
.ib-adm-legend > span { display:inline-block; width:10px; height:10px; margin-left:8px; border-radius:3px; }
.ib-adm-legend > .is-ok { background:var(--green); }
.ib-adm-legend > .is-bad { background:var(--red); }
.ib-adm-secstats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:14px 0 16px; }
.ib-adm-secstats b { display:block; font-size:var(--fs-stat); font-weight:var(--fw-bold); font-variant-numeric:tabular-nums; }
.ib-adm-secstats span { font-size:var(--fs-caption); color:var(--muted); }
.ib-adm-secstats .is-bad b { color:var(--red); }
.ib-adm-pairlist { display:flex; flex-direction:column; gap:10px; margin-top:12px; }
.ib-adm-pair { padding:12px 14px; border-radius:var(--r-sm); background:var(--bg2); border:1px solid var(--border);
  box-shadow:3px 0 0 0 var(--dim) inset; }
.ib-adm-pair.is-guessing { box-shadow:3px 0 0 0 var(--amber) inset; }
.ib-adm-pair.is-signed_in_after { box-shadow:3px 0 0 0 var(--green) inset; }
.ib-adm-pair-top { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.ib-adm-pair-line { margin-top:5px; font-size:var(--fs-small); }
.ib-adm-pair-adv { margin-top:4px; font-size:var(--fs-caption); color:var(--muted); line-height:var(--lh-snug); }
.ib-adm-calm { display:flex; align-items:center; gap:8px; padding:8px 0; color:var(--green); }
.ib-adm-details { margin-top:22px; }
.ib-adm-details > summary { cursor:pointer; padding:8px 0; color:var(--muted); font-weight:var(--fw-semibold); }
.ib-adm-details > summary:hover { color:var(--text); }

/* Devices */
.ib-adm-sumline { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-bottom:14px; color:var(--muted); }
.ib-adm-sumline .ib-adm-segbar { width:220px; flex:none; height:10px; border-radius:5px; }
.ib-adm-chips { margin-bottom:14px; }
.ib-adm-fleet td { vertical-align:middle; }
.ib-adm-fleet td a { color:var(--text); font-weight:var(--fw-semibold); text-decoration:none; }
.ib-adm-fleet td a:hover { color:var(--cyan); text-decoration:underline; }
.ib-adm-subtxt { margin-top:2px; font-size:var(--fs-caption); color:var(--dim); }
.ib-adm-cov-h { min-width:200px; }
.ib-adm-cov-h > div { display:flex; justify-content:space-between; gap:8px; margin-top:3px; color:var(--dim);
  font-weight:var(--fw-medium); text-transform:none; letter-spacing:0; }
.ib-adm-devid { display:flex; align-items:center; white-space:nowrap; }
.ib-adm-devcell .ib-adm-subtxt { padding-left:16px; }
.ib-adm-covtrack { position:relative; height:8px; border-radius:4px; background:rgba(255,255,255,.05); }
.ib-adm-cov-bar { position:absolute; top:0; bottom:0; border-radius:4px; }
.ib-adm-alerts { color:var(--amber); }
.ib-num { text-align:right; font-variant-numeric:tabular-nums; }

/* People */
.ib-people-bar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:14px; }
.ib-people-roles { flex:1 1 300px; }
.ib-people-who { display:flex; align-items:center; gap:12px; }
.ib-people-who .ib-adm-face { width:36px; height:36px; margin-left:0; font-size:var(--fs-caption); border-color:var(--panel); }
.ib-people-never { color:var(--amber); }
.ib-people-now { margin-top:2px; font-size:var(--fs-caption); color:var(--green); }
.ib-people-table tr.is-off td:not(.ib-actions) { opacity:.6; }
.ib-people-table td > .ib-adm-subtxt:empty { display:none; }
.ib-people-table th { white-space:nowrap; }
.ib-people-table td.ib-actions { display:table-cell; }
.ib-people-acts { display:flex; gap:6px; justify-content:flex-end; flex-wrap:nowrap; white-space:nowrap; }
.ib-people-id { min-width:0; }
.ib-people-id .ib-adm-subtxt { max-width:240px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ib-people-table .ib-role-sel { max-width:170px; }

/* System */
.ib-adm-checks { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:10px; }
.ib-adm-check { display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:var(--r-md);
  background:var(--panel); border:1px solid var(--border); }
.ib-adm-check-ic { width:34px; height:34px; border-radius:10px; display:grid; place-items:center; flex:none;
  color:var(--tone); background:var(--tone-bg); }
.ib-adm-check > div { flex:1; min-width:0; }
.ib-adm-check-n { font-weight:var(--fw-semibold); }
.ib-adm-check-d { margin-top:2px; font-size:var(--fs-caption); color:var(--muted); }
.ib-adm-check-s { flex:none; font-size:var(--fs-micro); font-weight:var(--fw-bold); letter-spacing:var(--ls-caps);
  text-transform:uppercase; color:var(--tone); }
.ib-adm-facts { display:grid; grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:10px; }
.ib-adm-fact { padding:12px 14px; border-radius:var(--r-md); background:var(--panel); border:1px solid var(--border); }
.ib-adm-fact > span { display:block; font-size:var(--fs-caption); color:var(--muted); }
.ib-adm-fact > b { display:block; margin-top:4px; font-size:var(--fs-stat-sm); font-variant-numeric:tabular-nums;
  color:var(--tone, var(--text)); }
.ib-adm-strow { display:grid; grid-template-columns:12px minmax(130px,1.3fr) minmax(80px,2fr) 72px 96px; gap:12px;
  align-items:center; padding:7px 0; font-size:var(--fs-small); border-top:1px solid rgba(255,255,255,.04); }
.ib-adm-swatch { width:10px; height:10px; border-radius:3px; }
.ib-adm-strow-bar { height:6px; border-radius:3px; overflow:hidden; background:rgba(255,255,255,.05); }
.ib-adm-strow-bar > span { display:block; height:100%; background:var(--cyan); opacity:.65; }
.ib-adm-strow-s, .ib-adm-strow-r { text-align:right; font-variant-numeric:tabular-nums; }
.ib-adm-strow-r { color:var(--dim); }
/* A device far from its building (D-245) */
.ib-place-warn { display:flex; gap:10px; align-items:flex-start; margin:0 0 12px; padding:12px 14px; border-radius:var(--r-md);
  border:1px solid rgba(243,156,18,.4); background:rgba(243,156,18,.08); color:var(--amber); }
.ib-place-warn b { color:var(--text, inherit); }
.ib-place-warn p { margin:4px 0 0; color:var(--muted); font-size:var(--fs-small); }
.ib-place-warn-act { display:flex; gap:8px; margin-top:8px; }
.ib-bloc-far { display:flex; align-items:center; gap:5px; color:var(--amber); margin-top:2px; }
/* The clean-up switched on the page (D-243) */
.ib-adm-ret-ctl { display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px; margin-top:10px; }
.ib-adm-ret-detail { display:inline-flex; align-items:center; gap:8px; font-size:var(--fs-small); color:var(--muted); }
.ib-adm-ret-detail select, .ib-adm-rettable select { background:var(--bg); color:inherit; border:1px solid var(--border);
  border-radius:8px; padding:4px 8px; font:inherit; font-size:var(--fs-small); }
.ib-adm-ret { display:flex; gap:14px; margin-bottom:12px; padding:16px 18px; border-radius:var(--r-md); border:1px solid; }
.ib-adm-ret.is-off { background:rgba(46,204,113,.07); border-color:rgba(46,204,113,.3); }
.ib-adm-ret.is-on { background:rgba(243,156,18,.08); border-color:rgba(243,156,18,.38); }
.ib-adm-ret-ic { flex:none; width:38px; height:38px; border-radius:10px; display:grid; place-items:center; }
.ib-adm-ret.is-off .ib-adm-ret-ic { color:var(--green); background:var(--adm-green); }
.ib-adm-ret.is-on .ib-adm-ret-ic { color:var(--amber); background:var(--adm-amber); }
.ib-adm-ret b { font-size:var(--fs-lead); }
.ib-adm-ret p { margin:5px 0 0; line-height:var(--lh-snug); }
.ib-adm-ret p.ib-adm-ret-how { color:var(--muted); font-size:var(--fs-caption); }
.ib-adm-rettable td.is-bad { color:var(--red); }
.ib-adm-share { display:inline-block; width:80px; height:6px; margin-right:8px; vertical-align:middle;
  border-radius:3px; overflow:hidden; background:rgba(255,255,255,.06); }
.ib-adm-share > span { display:block; height:100%; background:var(--red); opacity:.8; }
.ib-adm-rettable small { color:var(--muted); font-variant-numeric:tabular-nums; }
.ib-adm-moved { display:flex; align-items:center; gap:12px; color:var(--muted); }
.ib-adm-moved > span { flex:1; }

/* AI answers: the thumbs under AI Insights answers, summed up (D-245) */
.ib-adm-aiwhy { display:flex; flex-direction:column; gap:12px; margin-top:14px; }
.ib-adm-aiwhy-row.is-zero { opacity:.55; }
.ib-adm-aiwhy-top, .ib-adm-mix-top { display:flex; align-items:baseline; justify-content:space-between; gap:10px;
  font-size:var(--fs-small); }
.ib-adm-aiwhy-top > span { font-weight:var(--fw-bold); font-variant-numeric:tabular-nums; }
.ib-adm-aiwhy-bar { height:6px; margin-top:5px; border-radius:3px; overflow:hidden; background:rgba(255,255,255,.06); }
.ib-adm-aiwhy-bar > span { display:block; height:100%; border-radius:3px; }
.ib-adm-aiwhy-bar > .is-red { background:var(--red); }
.ib-adm-aiwhy-bar > .is-amber { background:var(--amber); }
.ib-adm-aiwhy-bar > .is-grey { background:var(--dim); }
.ib-adm-aisplit { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:14px; align-items:start; }
.ib-adm-mix { display:flex; flex-direction:column; gap:12px; margin-top:14px; }
.ib-adm-mix-top > span { color:var(--muted); font-variant-numeric:tabular-nums; text-align:right; }
.ib-adm-mix-bar { display:flex; gap:2px; height:10px; margin-top:6px; border-radius:5px; overflow:hidden;
  background:rgba(255,255,255,.05); }
.ib-adm-mix-bar > .is-ok { background:var(--green); opacity:.8; }
.ib-adm-mix-bar > .is-bad { background:var(--red); }
.ib-adm-aidown { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
.ib-adm-aiq { padding:12px 14px; border-radius:var(--r-sm); background:var(--panel); border:1px solid var(--border);
  box-shadow:3px 0 0 0 var(--red) inset; }
.ib-adm-aiq-top { display:flex; align-items:center; flex-wrap:wrap; gap:6px 8px; font-size:var(--fs-caption); }
.ib-adm-aiq-where { display:inline-flex; align-items:center; gap:5px; min-width:0; color:var(--muted); }
.ib-adm-aiq-where a { color:var(--text); font-weight:var(--fw-semibold); text-decoration:none; }
.ib-adm-aiq-where a:hover { color:var(--cyan); text-decoration:underline; }
.ib-adm-aiq-when { margin-left:auto; color:var(--dim); white-space:nowrap; }
.ib-adm-aiq-q { display:flex; gap:8px; margin-top:9px; font-weight:var(--fw-semibold); line-height:var(--lh-snug);
  overflow-wrap:anywhere; }
.ib-adm-aiq-q > .ib-icon { flex:none; margin-top:3px; color:var(--cyan); }
.ib-adm-aiq-a { margin:7px 0 0 22px; padding:0 0 0 10px; border-left:2px solid var(--border); color:var(--muted);
  font-size:var(--fs-small); line-height:var(--lh-snug); overflow-wrap:anywhere; }

@media (max-width:1100px) { .ib-adm-tiles { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:900px) { .ib-adm-secgrid, .ib-adm-aisplit { grid-template-columns:minmax(0,1fr); } }
@media (max-width:640px) {
  .ib-adm-tiles { grid-template-columns:minmax(0,1fr); }
  .ib-adm-status { padding:18px; }
  .ib-adm-status-h { font-size:19px; }
  .ib-adm-attn-row { flex-wrap:wrap; }
  .ib-adm-attn-row .ib-btn { margin-left:46px; }
  .ib-adm-secstats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ib-adm-search { width:100%; }
  .ib-adm-strow { grid-template-columns:12px minmax(0,1fr) auto; }
  .ib-adm-strow-bar, .ib-adm-strow-r { display:none; }
  .ib-adm-ev { align-items:flex-start; }
  .ib-adm-aiq-when { margin-left:0; flex-basis:100%; }
  .ib-adm-aiq-a { margin-left:0; }
}
@media (prefers-reduced-motion:reduce) {
  .ib-adm-livedot, .ib-adm-ekg.is-on .ib-adm-ekg-pulse { animation:none; }
  .ib-adm-ring-fg, .ib-adm-tile { transition:none; }
}

/* ── Customers and the company page (D-103) ──
   Built on the Administration pieces (status line, attention rows, tiles):
   a customer is read the same way the platform is. */
.ib-co-mark { width:40px; height:40px; border-radius:11px; flex:none; display:grid; place-items:center;
  font-size:var(--fs-lead); font-weight:var(--fw-bold); letter-spacing:.3px; color:#fff;
  background:linear-gradient(145deg, hsl(var(--co-h) 55% 42%), hsl(calc(var(--co-h) + 30) 55% 30%));
  box-shadow:0 0 0 1px rgba(255,255,255,.08) inset; }
.ib-co-mark.is-big { width:56px; height:56px; border-radius:15px; font-size:var(--fs-stat-sm); }
.ib-co-strip { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:1px; margin-bottom:16px;
  border:1px solid var(--border); border-radius:var(--r-md); overflow:hidden; background:var(--border); }
.ib-co-strip > div { padding:14px 16px; background:var(--panel); }
.ib-co-strip b { display:block; font-size:var(--fs-stat); font-weight:var(--fw-bold); font-variant-numeric:tabular-nums; }
.ib-co-strip b small { font-size:var(--fs-lead); color:var(--muted); font-weight:var(--fw-semibold); }
.ib-co-strip span { font-size:var(--fs-caption); color:var(--muted); }
.ib-co-strip .is-bad b { color:var(--red); }

.ib-co-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.ib-co-card { position:relative; overflow:hidden; display:flex; flex-direction:column; gap:14px; padding:18px 18px 16px 20px;
  border-radius:var(--r-lg); color:inherit; text-decoration:none; border:1px solid var(--border);
  background:linear-gradient(180deg, rgba(255,255,255,.03), transparent 50%), var(--panel);
  transition:border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.ib-co-card::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--tone); }
.ib-co-card:hover { border-color:rgba(0,200,220,.45); transform:translateY(-2px); box-shadow:0 12px 26px -16px rgba(0,0,0,.7); }
.ib-co-card:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
.ib-co-card-head { display:flex; align-items:center; gap:12px; }
.ib-co-card-name { flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
.ib-co-card-name b { font-size:var(--fs-title); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ib-co-card-name span { font-size:var(--fs-caption); color:var(--muted); }
.ib-co-find { display:flex; align-items:center; gap:9px; padding:9px 12px; border-radius:var(--r-sm);
  font-size:var(--fs-small); font-weight:var(--fw-semibold); color:var(--tone, var(--text)); background:var(--tone-bg, rgba(255,255,255,.04)); }
.ib-co-find > span { flex:1; min-width:0; }
.ib-co-find em { font-style:normal; font-weight:var(--fw-medium); color:var(--muted); white-space:nowrap; }
.ib-co-find.is-green { --tone:var(--green); --tone-bg:var(--adm-green); }
.ib-co-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.ib-co-stats > div { display:flex; flex-direction:column; gap:5px; min-width:0; }
.ib-co-stats > div > span:first-child { font-size:var(--fs-micro); font-weight:var(--fw-bold); letter-spacing:var(--ls-caps);
  text-transform:uppercase; color:var(--dim); }
.ib-co-stats b { font-size:var(--fs-stat-sm); font-variant-numeric:tabular-nums; }
.ib-co-stats b small { font-size:var(--fs-small); color:var(--muted); font-weight:var(--fw-semibold); }
.ib-co-stats .ib-pill { align-self:flex-start; }
.ib-co-alerts { display:flex; flex-wrap:wrap; gap:4px; }
.ib-co-alerts .ib-chip { padding:3px 8px; font-size:var(--fs-micro); }
.ib-co-none { color:var(--dim); font-size:var(--fs-caption); }

.ib-co-back { display:inline-flex; align-items:center; gap:6px; margin-bottom:10px; color:var(--muted);
  font-size:var(--fs-small); text-decoration:none; }
.ib-co-back:hover { color:var(--cyan); }
.ib-co-title { display:flex; align-items:center; gap:14px; }
.ib-co-title .ib-page-title { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.ib-co-title .ib-page-title .ib-pill { font-size:var(--fs-micro); }
.ib-co .ib-adm-status { margin-top:18px; }
.ib-co-tiles { margin-top:16px; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.ib-co-tiles .ib-adm-tile-v { font-size:var(--fs-stat); }
.ib-co-btable td, .ib-co-ptable td { vertical-align:middle; }
.ib-co-btable td a { color:var(--text); text-decoration:none; }
.ib-co-btable td a:hover { color:var(--cyan); }
.ib-co-rep { display:flex; align-items:center; gap:8px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.ib-co-rep .ib-adm-segbar { width:70px; flex:none; }
.ib-co-score { margin-left:6px; font-weight:var(--fw-semibold); font-variant-numeric:tabular-nums; }
.ib-co-who { display:flex; align-items:center; gap:0; }
.ib-co-who .ib-adm-face { width:30px; height:30px; margin-left:-5px; font-size:10px; border-color:var(--panel); }
.ib-co-admins { margin-right:10px; padding:3px 8px; border-radius:var(--r-pill); font-size:var(--fs-micro);
  font-weight:var(--fw-bold); color:var(--cyan); background:var(--adm-cyan); }

.ib-co-ptable tr.is-off td { opacity:.6; }
.ib-co-ptable .ib-chips { gap:5px; }
.ib-co-ptable .ib-chip { padding:3px 9px; }
/* Switching off and removing, and devices in no building (D-104). */
.ib-co-actions { display:flex; gap:8px; flex-wrap:wrap; }
.ib-co-card.is-off { opacity:.75; }
.ib-co-card.is-off:hover { opacity:1; }
.ib-co-ltable td { vertical-align:middle; }
.ib-co-ltable td a { color:var(--text); text-decoration:none; }
.ib-co-ltable .ib-select { min-width:200px; }

@media (max-width:1100px) {
  .ib-co-tiles { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ib-co-strip { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:900px) { .ib-co-cards { grid-template-columns:minmax(0,1fr); } }
@media (max-width:640px) {
  .ib-co-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ib-co-strip { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ib-co-tiles { grid-template-columns:minmax(0,1fr); }
  .ib-co-title .ib-co-mark.is-big { width:44px; height:44px; }
}
@media (prefers-reduced-motion:reduce) { .ib-co-card { transition:none; } }

/* ── Overview: reporting, today's actions, customers, health fold (D-105) ── */
/* The reporting bar in Administration's buckets: stopped in red, a month or
   more in grey, never reported fainter still. */
.ib-fleet-silent { background:rgba(255,107,91,.14); color:var(--red); }
.ib-fleet-never { background:rgba(150,160,170,.03); color:var(--dim); }
/* Coverage as the score's own label, in sentence case so it reads as one. */
.ib-hero-scorecap.is-cover { text-transform:none; letter-spacing:0; font-size:var(--fs-caption);
  line-height:var(--lh-snug); margin-bottom:2px; }
.ib-hero-scorecap.is-cover b { color:var(--text); font-weight:var(--fw-bold); }
/* Today's actions: the attention rows, toned by how urgent each one is. */
.ib-act .ib-attn-row { align-items:flex-start; }
.ib-act.is-warn { border-left-color:var(--amber); }
.ib-act.is-watch { border-left-color:var(--cyan); }
.ib-act.is-quiet { border-left-color:var(--dim); }
.ib-act-place { font-weight:var(--fw-bold); font-size:14px; }
.ib-act-old { font-weight:var(--fw-semibold); font-size:var(--fs-caption); color:var(--amber); margin-left:6px; }
.ib-act-problem { font-size:var(--fs-body); margin-top:3px; }
.ib-act-todo { color:var(--muted); font-size:var(--fs-small); margin-top:3px; line-height:var(--lh-snug);
  max-width:70ch; }
.ib-act-air { display:flex; align-items:center; gap:6px; margin-top:6px; font-size:var(--fs-small);
  font-weight:var(--fw-semibold); }
.ib-act-air .ib-icon { flex:0 0 auto; }
.ib-act-air.tone-green { color:var(--green); }
.ib-act-air.tone-amber { color:var(--amber); }
.ib-act-air.tone-red { color:var(--red); }
.ib-act-air.tone-grey { color:var(--muted); }
.ib-act-detail { color:var(--dim); font-size:var(--fs-caption); margin-top:5px; font-variant-numeric:tabular-nums; }
.ib-act .ib-attn-metrics { justify-content:flex-end; }
@media (max-width:620px) {
  .ib-act .ib-attn-row { flex-direction:column; align-items:stretch; }
  .ib-act .ib-attn-metrics { justify-content:flex-start; }
}
.ib-ahead-dev { margin-left:auto; color:var(--dim); font-size:var(--fs-caption); }
/* A building with nothing recent to go on. */
.ib-card.is-quiet { opacity:.86; }
.ib-card-stats b.is-quiet { color:var(--dim); }
.ib-card-last { color:var(--amber); }
/* Customers, for a Super Admin: one row each, worst first. */
.ib-cust { display:flex; flex-direction:column; gap:1px; background:var(--border);
  border:1px solid var(--border); border-radius:var(--r-md); overflow:hidden; }
.ib-cust-row { display:grid; grid-template-columns:minmax(0,1.5fr) repeat(3,minmax(0,1fr)); gap:6px 14px;
  align-items:baseline; padding:11px 14px; background:var(--panel); color:inherit; text-decoration:none;
  font-size:var(--fs-small); }
.ib-cust-row:hover { background:var(--panel2); }
.ib-cust-row > b { font-size:14px; }
.ib-cust-row > span { color:var(--muted); }
.ib-cust-row > span.is-crit { color:var(--red); font-weight:var(--fw-semibold); }
@media (max-width:620px) { .ib-cust-row { grid-template-columns:1fr 1fr; } .ib-cust-row > b { grid-column:1 / -1; } }
/* What the gauge is made of, folded at the foot of the page. */
.ib-fold { margin-top:24px; }
.ib-disclosure[open] > .ib-fold-body { border:1px solid var(--border); border-top:0;
  border-radius:0 0 var(--r-sm) var(--r-sm); padding:14px 16px; background:var(--panel); }

/* ── Daily briefing: summary first, the rest folded (D-106) ── */
.ib-brief-lead { font-size:var(--fs-lead); line-height:1.55; }
.ib-brief-more { margin-top:10px; }
.ib-brief-more > summary { display:inline-flex; align-items:center; gap:6px; cursor:pointer; list-style:none;
  color:var(--cyan); font-size:var(--fs-small); font-weight:var(--fw-semibold); }
.ib-brief-more > summary::-webkit-details-marker { display:none; }
.ib-brief-more > summary::before { content:"▸"; font-size:11px; transition:transform var(--dur) var(--ease); }
.ib-brief-more[open] > summary::before { transform:rotate(90deg); }
.ib-brief-more > summary:hover { text-decoration:underline; }
.ib-brief-more > .ib-brief-text { margin-top:10px; }

/* ── Overview bug fixes: badges that must not break, health colours, set-up ── */
/* A count and its arrow, and a building's badge, stay on one line. */
.ib-hero-crit, .ib-card-head .ib-pill, .ib-attn-metrics .ib-pill { white-space:nowrap; }
.ib-card-head .ib-pill { flex:0 0 auto; }
.ib-card-title { min-width:0; }
/* Health in amber below 70 on the building cards too, as on the gauge. */
.ib-card-stats b.ib-warnstat { color:var(--amber); }
/* A company with nothing installed yet. */
.ib-setup { display:flex; flex-direction:column; gap:10px; padding:22px 24px;
  background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); }
.ib-setup .ib-hero-greet { margin:0; }
.ib-setup .ib-hero-sub { margin:0; }
.ib-setup-steps { list-style:none; margin:10px 0 0; padding:0; display:flex; flex-direction:column; gap:16px; }
.ib-setup-steps li { display:flex; gap:14px; align-items:flex-start; }
.ib-setup-mark { flex:0 0 32px; height:32px; border-radius:50%; display:flex; align-items:center;
  justify-content:center; border:1px solid var(--border); color:var(--muted); font-weight:var(--fw-bold); }
.ib-setup-steps li.is-next .ib-setup-mark { border-color:var(--cyan); color:var(--cyan); }
.ib-setup-steps li.is-done .ib-setup-mark { background:rgba(46,204,113,.16); border-color:transparent; color:var(--green); }
.ib-setup-body { display:flex; flex-direction:column; align-items:flex-start; gap:4px; min-width:0; padding-top:4px; }
.ib-setup-body > span { color:var(--muted); font-size:var(--fs-small); max-width:60ch; }
.ib-setup-steps li.is-done .ib-setup-body > b { color:var(--muted); }
.ib-setup-body .ib-btn { margin-top:6px; }

/* ── Overview layout (D-108) ── */
/* Cards: even columns, three or four; with three on a narrower screen the
   Condition card takes the first row, and on a phone they go two up. */
@media (min-width:1200px) {
  .ib-glance.is-4 { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .ib-glance.is-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (min-width:600px) and (max-width:1199px) {
  .ib-glance.is-3 .ib-ovc { grid-column:1 / -1; }
}
@media (max-width:599px) {
  .ib-ov .ib-glance { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .ib-ov .ib-glance.is-3 .ib-ovc { grid-column:1 / -1; }
  .ib-ov .ib-glance-card { padding:12px 13px; }
}
/* The hero on a phone: the headline first, then the gauge beside its notes
   rather than above them, so the first screen holds both the day and the
   score. Nothing is left out, only reordered. */
@media (max-width:760px) {
  .ib-ov .ib-hero > .ib-hero-main { order:-1; padding-bottom:16px; border-bottom:1px solid var(--border); }
  .ib-ov .ib-hero-score { display:grid; grid-template-columns:auto minmax(0,1fr); column-gap:16px;
    align-items:center; padding-bottom:0; border-bottom:0; }
  .ib-ov .ib-hero-score > .ib-gaugelink, .ib-ov .ib-hero-score > .ib-gauge {
    grid-column:1; grid-row:1 / span 5; width:auto; }
  .ib-ov .ib-hero-score > .ib-gaugelink .ib-gauge, .ib-ov .ib-hero-score > .ib-gauge { margin:0; }
  .ib-ov .ib-hero-score > :not(.ib-gaugelink):not(.ib-gauge) { grid-column:2; }
}
button.ib-glance-link { display:inline-block; background:none; border:0; padding:0; font:inherit;
  font-size:var(--fs-small); color:var(--cyan); cursor:pointer; text-align:left; }
button.ib-glance-link:hover { text-decoration:underline; }
button.ib-glance-link:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
.ib-ov .ib-fold { margin:14px 0 4px; }
/* Action rows: the alert count is the control that opens them. */
.ib-pill-btn { display:inline-flex; align-items:center; gap:4px; border:0; font:inherit; cursor:pointer; }
.ib-pill-btn .ib-icon { transition:transform var(--dur) var(--ease); }
.ib-pill-btn.is-open .ib-icon { transform:rotate(180deg); }
.ib-pill-btn:hover { filter:brightness(1.15); }
.ib-pill-btn:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
.ib-act-new { display:inline-block; margin-left:6px; padding:1px 7px; border-radius:var(--r-xs);
  background:rgba(0,200,220,.14); color:var(--cyan); font-size:var(--fs-caption); font-weight:var(--fw-bold); }
.ib-act.is-new { box-shadow:0 0 0 1px rgba(0,200,220,.35); }
/* The toolbar's Live switch. */
.ib-live-toggle { display:inline-flex; align-items:center; gap:7px; }
.ib-ov-livedot { width:8px; height:8px; border-radius:50%; background:var(--green);
  animation:ib-ov-pulse 2s ease-out infinite; }
.ib-ov-livedot.is-paused { background:var(--dim); animation:none; }
@keyframes ib-ov-pulse {
  0% { box-shadow:0 0 0 0 rgba(46,204,113,.45); }
  70% { box-shadow:0 0 0 7px rgba(46,204,113,0); }
  100% { box-shadow:0 0 0 0 rgba(46,204,113,0); }
}
@media (prefers-reduced-motion:reduce) { .ib-ov-livedot { animation:none; } }
/* Simple mode: nothing on the Overview under 13 px, and the small capitals
   of the counts in sentence case. 75 labels were 11 px and three were 9 px. */
html:not(.ib-expert) .ib-ov :is(.ib-sev, .ib-glance-label, .ib-card-stats span, .ib-regions-foot,
  .ib-attn-metrics .ib-pill, .ib-card-sub, .ib-h2-note, .ib-hero-time,
  .ib-hero-meta, .ib-act-old, .ib-act-new, .ib-card-head .ib-pill, .ib-brief-meta,
  .ib-cust-row > span) { font-size:13px; }
html:not(.ib-expert) .ib-ov .ib-sev { text-transform:none; letter-spacing:0; }
html:not(.ib-expert) .ib-ov :is(.ib-hero-move, .ib-card-worst, .ib-btn-sm) { font-size:13px; }
html:not(.ib-expert) .ib-ov .ib-flag { font-size:12px; }
/* Touch: the row controls and the filter at 44 px, and text links given
   room to be tapped. */
@media (pointer:coarse) {
  .ib-ov :is(.ib-pill-btn, .ib-btn-sm, .ib-live-toggle, .ib-select) { min-height:44px; }
  .ib-ov :is(.ib-h2-link, button.ib-glance-link) { display:inline-block; padding-block:12px; }
}
.ib-card-stats b i { font-style:normal; font-size:var(--fs-caption); color:var(--dim); font-weight:var(--fw-semibold); }

/* ── Settings: who hears about alerts (D-109) ── */
.ib-cov-banner { display:flex; align-items:flex-start; gap:12px; padding:14px 16px; margin-bottom:12px;
  border:1px solid var(--border); border-left:3px solid var(--green); border-radius:var(--r-md); background:var(--panel); }
.ib-cov-banner > div { display:flex; flex-direction:column; gap:3px; }
.ib-cov-banner b { font-size:var(--fs-lead); }
.ib-cov-banner span { color:var(--muted); font-size:var(--fs-small); }
.ib-cov-banner .ib-icon { flex:0 0 auto; margin-top:2px; color:var(--green); }
.ib-cov-banner.is-warn { border-left-color:var(--amber); } .ib-cov-banner.is-warn .ib-icon { color:var(--amber); }
.ib-cov-banner.is-crit { border-left-color:var(--red); } .ib-cov-banner.is-crit .ib-icon { color:var(--red); }
.ib-cov-mail { display:flex; align-items:flex-start; gap:8px; margin:-4px 0 12px; color:var(--amber);
  font-size:var(--fs-small); }
.ib-cov-mail .ib-icon { flex:0 0 auto; margin-top:2px; }
.ib-cov-list { display:flex; flex-direction:column; gap:10px; }
.ib-cov-group { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); overflow:hidden; }
.ib-cov-ghead { display:flex; align-items:center; justify-content:space-between; gap:10px 16px; flex-wrap:wrap;
  padding:12px 14px; border-bottom:1px solid var(--border); }
.ib-cov-ghead > div { display:flex; align-items:baseline; gap:6px 12px; flex-wrap:wrap; min-width:0; }
.ib-cov-ghead b { font-size:15px; }
.ib-cov-co { color:var(--muted); font-size:var(--fs-small); }
.ib-cov-count { font-size:var(--fs-small); font-weight:var(--fw-semibold); }
.ib-cov-count.is-good { color:var(--green); } .ib-cov-count.is-warn { color:var(--amber); } .ib-cov-count.is-crit { color:var(--red); }
.ib-cov-row { display:grid; grid-template-columns:minmax(0,1.3fr) auto minmax(0,1fr) minmax(0,1fr) auto;
  align-items:center; gap:8px 14px; padding:10px 14px; border-top:1px solid var(--border); }
.ib-cov-row:first-child { border-top:0; }
.ib-cov-place { display:flex; flex-direction:column; min-width:0; }
.ib-cov-place span { color:var(--dim); font-size:var(--fs-caption); }
.ib-cov-sev { color:var(--muted); font-size:var(--fs-small); }
.ib-cov-open { font-size:var(--fs-small); color:var(--muted); }
.ib-cov-open.is-crit { color:var(--red); font-weight:var(--fw-semibold); }
.ib-cov-act { display:flex; gap:6px; justify-content:flex-end; flex-wrap:wrap; }
.ib-cov-row .ib-pill { white-space:nowrap; justify-self:start; }
@media (max-width:760px) {
  .ib-cov-row { grid-template-columns:minmax(0,1fr) auto; }
  .ib-cov-sev, .ib-cov-open { grid-column:1 / -1; }
  .ib-cov-act { grid-column:1 / -1; justify-content:flex-start; }
}
.ib-cov-note { display:flex; align-items:flex-start; gap:10px; color:var(--muted); }
.ib-cov-note .ib-icon { flex:0 0 auto; margin-top:2px; color:var(--cyan); }
.ib-table-wrap { overflow-x:auto; }
.ib-sent .ib-pill, .ib-sent td:nth-child(3) { white-space:nowrap; }
.ib-cov-more { display:block; width:100%; padding:10px 14px; border:0; border-top:1px solid var(--border);
  background:none; color:var(--cyan); font:inherit; font-size:var(--fs-small); text-align:left; cursor:pointer; }
.ib-cov-more:hover { background:var(--panel2); }
.ib-cov-more:focus-visible { outline:2px solid var(--cyan); outline-offset:-2px; }

/* ── Settings in tabs (D-110) ── */
.ib-set .ib-adm-head { align-items:center; }
.ib-set-pill { display:inline-flex; align-items:center; gap:8px; max-width:100%; padding:6px 12px; border-radius:var(--r-pill);
  border:1px solid var(--border); background:var(--panel); color:var(--muted); font-size:var(--fs-small);
  font-weight:var(--fw-semibold); text-decoration:none; }
a.ib-set-pill { color:var(--cyan); border-color:rgba(0,200,220,.3); background:rgba(0,200,220,.08); }
a.ib-set-pill:hover { background:rgba(0,200,220,.14); }
.ib-set-dot { flex:0 0 auto; width:8px; height:8px; border-radius:50%; background:var(--dim); }
.ib-set-pill.is-good { color:var(--green); border-color:rgba(46,204,113,.3); background:rgba(46,204,113,.08); }
.ib-set-pill.is-good .ib-set-dot { background:var(--green); animation:ib-adm-ping 2s var(--ease-out) infinite; }
.ib-set-pill.is-warn { color:var(--amber); border-color:rgba(243,156,18,.35); background:rgba(243,156,18,.08); }
.ib-set-pill.is-warn .ib-set-dot { background:var(--amber); }
.ib-set-views { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:12px; margin-bottom:8px; }
.ib-set-view { display:grid; grid-template-columns:auto 1fr; grid-template-rows:auto auto; gap:2px 12px; align-items:center;
  padding:14px 16px; text-align:left; background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md);
  color:var(--text); font:inherit; cursor:pointer; transition:border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.ib-set-view:hover { border-color:rgba(0,200,220,.4); }
.ib-set-view:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
.ib-set-view-ic { grid-row:1 / 3; width:38px; height:38px; display:grid; place-items:center; border-radius:50%;
  background:var(--panel2); color:var(--muted); }
.ib-set-view b { font-size:15px; }
.ib-set-view > span:last-child { color:var(--muted); font-size:var(--fs-small); line-height:var(--lh-snug); }
.ib-set-view.active { border-color:var(--cyan); background:rgba(0,200,220,.07); box-shadow:inset 0 0 0 1px var(--cyan); }
.ib-set-view.active .ib-set-view-ic { background:rgba(0,200,220,.16); color:var(--cyan); }
.ib-pw-form .ib-form-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.ib-ses-card { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); overflow:hidden; }
.ib-ses-head { display:flex; align-items:center; justify-content:space-between; gap:10px 16px; flex-wrap:wrap;
  padding:12px 14px; border-bottom:1px solid var(--border); font-weight:var(--fw-semibold); }
.ib-ses-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:12px;
  padding:12px 14px; border-top:1px solid var(--border); }
.ib-ses-row:first-child { border-top:0; }
.ib-ses-row.is-current { background:rgba(46,204,113,.05); }
.ib-ses-ic { width:36px; height:36px; display:grid; place-items:center; border-radius:50%; background:var(--panel2); color:var(--muted); }
.ib-ses-row.is-current .ib-ses-ic { background:rgba(46,204,113,.14); color:var(--green); }
.ib-ses-main { display:flex; flex-direction:column; gap:2px; min-width:0; }
.ib-ses-main .ib-pill { margin-left:6px; vertical-align:1px; }
.ib-ses-sub { color:var(--muted); font-size:var(--fs-small); }
.ib-ses-foot { display:flex; align-items:flex-start; gap:8px; padding:10px 14px; border-top:1px solid var(--border);
  color:var(--dim); font-size:var(--fs-caption); }
.ib-ses-foot .ib-icon { flex:0 0 auto; margin-top:1px; }
.ib-outdoors .ib-ctxgrid { margin-bottom:4px; }
@media (max-width:760px) {
  .ib-set-views { grid-template-columns:minmax(0,1fr); }
  .ib-ses-row { grid-template-columns:auto minmax(0,1fr); }
  .ib-ses-row > .ib-btn { grid-column:2; justify-self:start; }
}

/* ── Zahir's risk projection and formation map (D-111) ──
   His styles from the I-BRICK Atlas Analytics update (2026-10-07), kept as he
   made them; the additions are marked. */
.ib-proj-hero {
  margin: 0 0 20px;
  padding: 16px 18px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background:
    radial-gradient(1200px 280px at 10% -20%, rgba(0,200,220,.08), transparent 55%),
    var(--panel);
}
.ib-proj-head {
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:16px; flex-wrap:wrap; margin-bottom: 8px;
}
.ib-proj-verdict { min-width: 0; flex: 1; }
.ib-proj-verdict-t { font-size: 16px; font-weight: 650; color: var(--text); letter-spacing: -.2px; }
.ib-proj-verdict-s { margin-top: 4px; font-size: 12.5px; color: var(--muted); line-height: 1.45; max-width: 56ch; }
.ib-proj-red .ib-proj-verdict-t { color: var(--red); }
.ib-proj-green .ib-proj-verdict-t { color: var(--green); }
.ib-proj-cyan .ib-proj-verdict-t { color: var(--cyan); }
.ib-proj-scores { display:flex; gap: 14px; flex-wrap:wrap; }
.ib-proj-score {
  min-width: 64px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(0,0,0,.18);
  display:flex; flex-direction:column; align-items:center; gap: 2px;
}
.ib-proj-score b { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ib-proj-score span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--dim); }
.ib-proj-score-muted { opacity: 0.45; }
.ib-proj-score-muted b { color: var(--dim); }
/* Added: each score in the engine's colour for its status. */
.ib-proj-score.is-green b { color: #3DDB8A; }
.ib-proj-score.is-amber b { color: #E8A838; }
.ib-proj-score.is-red b { color: #E85D4C; }
.ib-proj-chart {
  min-height: 300px; width: 100%; margin-top: 4px;
  border-radius: 14px;
  background:
    radial-gradient(800px 200px at 20% 0%, rgba(90,200,250,0.06), transparent 55%),
    radial-gradient(600px 180px at 80% 100%, rgba(232,168,56,0.04), transparent 50%),
    rgba(0,0,0,0.12);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 4px 0 2px;
  overflow: hidden;
}
.ib-proj-chart .ib-chart { width: 100%; border: 0; background: none; }
.ib-proj-chart svg { overflow: visible; }

.ib-proj-svg .ib-proj-trail-draw {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: ib-proj-reveal 1.35s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.ib-proj-svg .ib-proj-trail-glow {
  opacity: 0;
  animation: ib-proj-glow-in 1.6s ease 0.25s forwards;
}
.ib-proj-svg .ib-proj-pillar,
.ib-proj-svg .ib-proj-pillar-pred {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: bottom center;
  animation: ib-proj-rise 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.ib-proj-svg .ib-proj-cap,
.ib-proj-svg .ib-proj-cap-pred,
.ib-proj-svg .ib-proj-val {
  opacity: 0;
  animation: ib-proj-fade 0.7s ease forwards;
}
/* After reveal: only a very soft breath on forecast caps, not a loop flash */
.ib-proj-svg .ib-proj-cap-pred {
  animation: ib-proj-fade 0.7s ease forwards, ib-proj-breathe 4.5s ease-in-out 1.5s infinite;
}
@keyframes ib-proj-reveal { to { stroke-dashoffset: 0; } }
@keyframes ib-proj-glow-in { from { opacity: 0; } to { opacity: 0.22; } }
@keyframes ib-proj-rise { from { opacity: 0; transform: scaleY(0.15); } to { opacity: 1; transform: scaleY(1); } }
@keyframes ib-proj-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ib-proj-breathe { 0%, 100% { opacity: 0.9; } 50% { opacity: 1; } }

.ib-rel-hero {
  margin: 0 0 20px;
  padding: 16px 18px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background:
    radial-gradient(900px 260px at 80% -30%, rgba(255,107,53,.06), transparent 50%),
    radial-gradient(900px 260px at 10% 120%, rgba(0,200,220,.07), transparent 55%),
    var(--panel);
}
.ib-rel-chart { width: 100%; min-height: 380px; }
.ib-rel-chart .ib-chart { border: 0; background: none; }
.ib-rel-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ib-rel-chip {
  font-size: 12px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted); background: rgba(0,0,0,.22);
}
.ib-rel-chip b { color: #E4EFF5; font-weight: 600; }
.ib-rel-chip.watch { border-color: rgba(255,159,10,.45); color: #ffc56b; }
.ib-rel-chip.high, .ib-rel-chip.critical {
  border-color: rgba(255,59,48,.5); color: #ffb0a8; background: rgba(255,59,48,.08);
}
.ib-rel-chip.critical { box-shadow: 0 0 0 1px rgba(255,59,48,.25); }
/* Added: a check this device cannot be given. */
.ib-rel-chip.is-muted { opacity: .6; border-style: dashed; }
@keyframes ib-rel-pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes ib-rel-dash { to { stroke-dashoffset: -24; } }
@keyframes ib-rel-ring { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.75; } }
.ib-rel-node-hot { filter: drop-shadow(0 0 6px rgba(255,107,53,.35)); }
.ib-rel-center { filter: drop-shadow(0 0 10px rgba(0,200,220,.2)); }
.ib-rel-edge-hot { animation: ib-rel-dash 2.4s linear infinite; stroke-dasharray: 6 8; }
.ib-rel-spoke { animation: ib-rel-pulse 3.2s ease-in-out infinite; }
.ib-rel-ring { animation: ib-rel-ring 2s ease-in-out infinite; }
.ib-rel-legend {
  display: flex; flex-wrap: wrap; gap: 12px 18px;
  margin: 8px 0 6px; font-size: 12px; color: var(--muted);
}
.ib-rel-leg { display: inline-flex; align-items: center; gap: 6px; }
.ib-rel-leg i {
  display: inline-block; width: 10px; height: 10px; border-radius: 2px;
  transform: rotate(45deg);
}
.ib-rel-leg i.ok { background: #5AC8FA; }
.ib-rel-leg i.watch { background: #FF9F0A; }
.ib-rel-leg i.high { background: #FF3B30; }
.ib-rel-leg i.line { width: 16px; height: 3px; border-radius: 2px; transform: none; background: #7D8A96; }
/* D-127: how two readings moved together, measured on the server. */
.ib-rel-leg i.moved, .ib-rel-leg i.tie { width: 18px; height: 0; border-radius: 0; transform: none; background: none;
  border-top: 2px dashed #B794F6; }
.ib-rel-leg i.tie { border-top-color: #8FA3B5; }
.ib-fm-rel { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.ib-fm-rel-h { font-weight: var(--fw-semibold); color: var(--text); margin-bottom: 4px; }
.ib-fm-rel-sub { margin: 4px 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.ib-fm-rel ul { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.ib-fm-rel li { display: grid; grid-template-columns: minmax(0, 15em) 4em minmax(0, 1fr); gap: 2px 12px;
  align-items: baseline; font-size: 13px; }
.ib-fm-rel-pair { color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.ib-fm-rel-r { font-variant-numeric: tabular-nums; text-align: right; color: #B794F6; }
.ib-fm-rel-r.opposite { color: #5AC8FA; }
.ib-fm-rel-what { color: var(--muted); }
.ib-fm-rel-tag { grid-column: 3; font-size: 12px; color: var(--muted); }
.ib-fm-rel-tag.new { color: #B794F6; }
.ib-fm-rel-tag.watched { color: var(--text); }
.ib-fm-rel-tag.bad { color: #FF6B35; font-weight: var(--fw-semibold); }
@media (max-width: 640px) {
  .ib-fm-rel li { grid-template-columns: minmax(0, 1fr) auto; }
  .ib-fm-rel-what, .ib-fm-rel-tag { grid-column: 1 / -1; }
}

/* Added: the Map / Step by step switch, and no replayed entrance once a
   chart has settled (a redraw on resize draws straight in, as every chart). */
.ib-fm-views { display:inline-flex; gap:6px; margin: 0 0 12px; }
.is-settled .ib-proj-svg .ib-proj-trail-draw { animation: none; stroke-dashoffset: 0; }
.is-settled .ib-proj-svg .ib-proj-trail-glow { animation: none; opacity: .22; }
.is-settled .ib-proj-svg .ib-proj-pillar, .is-settled .ib-proj-svg .ib-proj-pillar-pred,
.is-settled .ib-proj-svg .ib-proj-cap, .is-settled .ib-proj-svg .ib-proj-val { animation: none; opacity: 1; }
.is-settled .ib-proj-svg .ib-proj-cap-pred { animation: ib-proj-breathe 4.5s ease-in-out infinite; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .ib-proj-svg .ib-proj-trail-draw,
  .ib-proj-svg .ib-proj-trail-glow,
  .ib-proj-svg .ib-proj-pillar,
  .ib-proj-svg .ib-proj-pillar-pred,
  .ib-proj-svg .ib-proj-cap,
  .ib-proj-svg .ib-proj-cap-pred,
  .ib-proj-svg .ib-proj-val {
    animation: none !important;
    opacity: 1 !important;
    stroke-dashoffset: 0 !important;
    transform: none !important;
  }
  .ib-rel-edge-hot, .ib-rel-spoke, .ib-rel-ring { animation: none !important; }
}
@media (max-width:760px) {
  .ib-proj-hero, .ib-rel-hero { padding: 12px 10px 10px; }
  .ib-fm-stage { padding: 8px; }
  .ib-proj-scores { gap: 8px; }
  .ib-proj-score { min-width: 52px; padding: 6px 8px; }
  .ib-proj-score b { font-size: 17px; }
}

/* The formation replay played on Zahir's map (D-112): colours, widths and
   opacities move from frame to frame, as the step-by-step picture's do. */
.ib-rp-stage .ib-relmap polygon, .ib-rp-stage .ib-relmap path, .ib-rp-stage .ib-relmap line,
.ib-rp-stage .ib-relmap rect, .ib-rp-stage .ib-relmap text {
  transition: stroke 600ms var(--ease), fill 600ms var(--ease), opacity 600ms var(--ease), stroke-width 600ms var(--ease);
}
.ib-rp-stage .ib-relmap { display: block; }

/* ── Floor plans and rooms (D-114) ──
   Zahir's building digital twin, one plan per floor: rooms drawn on the plan
   take the engine's colour of their worst device; faded when that is old. */
.ib-fl-planbtn { display:inline-flex; align-items:center; gap:4px; margin-top:4px; padding:2px 8px; width:max-content;
  border-radius:var(--r-pill); border:1px solid rgba(0,200,220,.35); background:rgba(0,200,220,.08); color:var(--cyan);
  font:inherit; font-size:var(--fs-caption); font-weight:var(--fw-semibold); cursor:pointer; }
.ib-fl-planbtn:hover { background:rgba(0,200,220,.16); }
.ib-fl-planbtn.is-add { border-style:dashed; background:none; color:var(--muted); }
.ib-fl-gap i .ib-fl-planbtn { margin:0 0 0 auto; }
.ib-fl-gap i { gap:8px; padding-right:4px; }
.ib-fl-planhost:not(:empty) { margin-top:14px; }
.ib-fp { padding:14px; border:1px solid var(--border); border-radius:var(--r-md);
  background:linear-gradient(180deg, rgba(0,200,220,.05), transparent 40%), var(--panel); }
.ib-fp.is-busy { opacity:.65; pointer-events:none; }
.ib-fp-head { display:flex; align-items:center; gap:10px 14px; flex-wrap:wrap; margin-bottom:10px; }
.ib-fp-title { display:inline-flex; align-items:center; gap:8px; margin-right:auto; }
.ib-fp-title span { color:var(--dim); font-size:var(--fs-caption); }
.ib-fp-pick { display:inline-flex; align-items:center; gap:6px; color:var(--muted); font-size:var(--fs-small); }
.ib-fp-tools { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:10px; }
.ib-fp-upload { cursor:pointer; }
.ib-fp-hint { color:var(--cyan); font-size:var(--fs-small); }
.ib-fp-stage { position:relative; width:100%; max-height:70vh; border-radius:10px; overflow:hidden;
  border:1px solid var(--border); background:#0b141f; touch-action:none; user-select:none; }
.ib-fp-stage.is-noplan { background-image:linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
  linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size:24px 24px; }
.ib-fp.is-drawing .ib-fp-stage { cursor:crosshair; outline:2px dashed var(--cyan); outline-offset:2px; }
.ib-fp-img { position:absolute; inset:0; width:100%; height:100%; object-fit:fill; opacity:.92; }
.ib-fp-rooms { position:absolute; inset:0; }
.ib-fp-room { --rt:150,160,170; position:absolute; display:flex; flex-direction:column; gap:3px; padding:4px 5px;
  min-width:0; overflow:hidden; border:2px solid rgba(var(--rt),.85); border-radius:6px;
  background:rgba(var(--rt),.22); box-shadow:0 0 0 1px rgba(0,0,0,.25) inset; }
.ib-fp-room.is-green { --rt:46,204,113; }
.ib-fp-room.is-amber { --rt:243,156,18; }
.ib-fp-room.is-red { --rt:231,76,60; box-shadow:0 0 14px rgba(231,76,60,.35); }
.ib-fp-room.is-stale { border-style:dashed; background:rgba(var(--rt),.10); }
.ib-fp-room.is-empty { --rt:150,160,170; background:rgba(150,160,170,.06); border-style:dotted; }
.ib-fp.is-drawing .ib-fp-room { pointer-events:none; opacity:.6; }
.ib-fp-room-name { font-size:var(--fs-caption); font-weight:var(--fw-bold); color:#fff; text-shadow:0 1px 2px rgba(0,0,0,.8);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ib-fp-room-devs { display:flex; flex-wrap:wrap; gap:3px; min-width:0; }
.ib-fp-room-tools { position:absolute; right:3px; bottom:3px; display:flex; gap:2px; opacity:0;
  transition:opacity var(--dur-fast) var(--ease); }
.ib-fp-room:hover .ib-fp-room-tools, .ib-fp-room:focus-within .ib-fp-room-tools { opacity:1; }
.ib-fp-room-tools button { display:grid; place-items:center; width:22px; height:22px; border-radius:6px; border:0;
  background:rgba(10,18,28,.85); color:var(--text); cursor:pointer; }
.ib-fp-room-tools button:hover { color:var(--cyan); }
.ib-fp-dev { display:inline-flex; align-items:center; gap:4px; max-width:100%; padding:1px 6px; border-radius:var(--r-pill);
  border:1px solid rgba(255,255,255,.12); background:rgba(10,18,28,.82); color:var(--text); font:inherit;
  font-size:var(--fs-micro); cursor:pointer; }
.ib-fp-dev i { width:7px; height:7px; border-radius:50%; background:var(--dim); flex:0 0 auto; }
.ib-fp-dev.is-green i { background:var(--green); }
.ib-fp-dev.is-amber i { background:var(--amber); }
.ib-fp-dev.is-red i { background:var(--red); }
.ib-fp-dev.is-stale { opacity:.7; border-style:dashed; }
.ib-fp-dev span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.ib-fp-dev:focus-visible { outline:2px solid var(--cyan); outline-offset:1px; }
.ib-fp-draft { position:absolute; border:2px dashed var(--cyan); background:rgba(0,200,220,.12); border-radius:6px; }
.ib-fp-empty { display:flex; flex-direction:column; align-items:center; gap:8px; padding:28px 16px; text-align:center;
  color:var(--muted); border:1px dashed var(--border); border-radius:10px; }
.ib-fp-empty p { margin:0; max-width:52ch; }
.ib-fp-note { margin:8px 0 0; color:var(--dim); font-size:var(--fs-caption); }
.ib-fp-loose { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:10px; color:var(--muted);
  font-size:var(--fs-small); }
.ib-fp-loose .ib-fp-dev { font-size:var(--fs-caption); padding:3px 8px; }

/* ── Issues with the design team, in BCF (D-283) ── */
.ib-md-bcf { margin-top:14px; display:flex; flex-direction:column; gap:8px; }
.ib-md-bcf-head { display:flex; align-items:center; flex-wrap:wrap; gap:6px 12px; }
.ib-md-bcf-head b { display:inline-flex; align-items:center; gap:7px; }
.ib-md-bcf-head b svg { color:var(--cyan); }
.ib-md-bcf-head span { color:var(--muted); font-size:var(--fs-small); }
.ib-md-bcf-head .ib-btn { margin-left:auto; }
.ib-md-bcf-list { display:flex; flex-direction:column; gap:8px; }
.ib-md-issue { display:flex; gap:12px; padding:10px; border:1px solid var(--border); border-radius:10px; background:var(--panel); }
.ib-md-issue.is-on { border-color:rgba(255,138,61,.7); box-shadow:0 0 0 1px rgba(255,138,61,.35); }
.ib-md-issue.is-closed { opacity:.72; }
.ib-md-issue-snap { flex:0 0 112px; height:72px; border-radius:7px; object-fit:cover; background:var(--bg2);
  border:1px solid var(--border); display:grid; place-items:center; color:var(--dim); }
.ib-md-issue-main { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:4px; }
.ib-md-issue-top { display:flex; align-items:flex-start; gap:8px; min-width:0; }
.ib-md-issue-top b { min-width:0; overflow-wrap:anywhere; }
.ib-md-issue-main small { color:var(--muted); font-size:var(--fs-caption); }
.ib-md-issue-devs { display:flex; flex-wrap:wrap; gap:4px; }
.ib-md-issue details summary { cursor:pointer; color:var(--cyan); font-size:var(--fs-caption); }
.ib-md-issue details p { margin:6px 0 0; font-size:var(--fs-small); color:var(--text); white-space:pre-line; }
.ib-md-issue-c { color:var(--muted) !important; }
.ib-md-issue-c b { color:var(--text); }
@media (max-width:600px) {
  .ib-md-issue { flex-direction:column; }
  .ib-md-issue-snap { flex-basis:auto; width:100%; height:140px; }
  .ib-md-bcf-head .ib-btn { margin-left:0; min-height:44px; }
}

/* ── Rooms, devices' places and floors from COBie or a sheet (D-282) ── */
.ib-modal.ib-si { width:640px; max-width:calc(100vw - 24px); }
/* A building's PDF drawings read into its 3D model (D-288): what was read,
   to confirm, the floors beside each plan as drawn. */
.ib-modal.ib-p3 { width:1080px; max-width:calc(100vw - 24px); }
.ib-p3 .ib-modal-actions [hidden] { display:none; }
.ib-p3 .ib-imp-body { max-height:calc(88vh - 150px); gap:12px; }
.ib-p3-head { display:flex; flex-direction:column; gap:8px; }
.ib-p3-name { display:flex; flex-direction:column; gap:4px; color:var(--muted); font-size:var(--fs-caption); }
.ib-p3-name .ib-input { width:100%; max-width:560px; min-height:40px; padding:8px 12px; background:var(--bg2);
  border:1px solid var(--border); border-radius:var(--r-sm); color:var(--text); font:inherit; font-size:var(--fs-body); }
.ib-p3-addr { display:flex; align-items:center; gap:6px; color:var(--muted); }
.ib-p3-addr svg { color:var(--cyan); flex:none; }
.ib-p3-sum { display:flex; flex-wrap:wrap; gap:6px 14px; }
.ib-p3-sum span { display:inline-flex; align-items:baseline; gap:5px; color:var(--muted); }
.ib-p3-sum b { color:var(--text); font-size:var(--fs-lead); font-variant-numeric:tabular-nums; }
.ib-p3-grid { display:grid; grid-template-columns:minmax(0, 1fr); gap:14px; }
@media (min-width:900px) { .ib-p3-grid { grid-template-columns:minmax(430px, 0.95fr) minmax(0, 1.05fr); } }
.ib-p3-floors { display:flex; flex-direction:column; gap:8px; min-width:0; }
.ib-p3-tab { width:100%; border-collapse:collapse; font-size:var(--fs-small); }
.ib-p3-tab th { text-align:left; color:var(--muted); font-weight:var(--fw-semibold); padding:4px 4px 6px; }
.ib-p3-tab td { padding:3px 4px; border-top:1px solid var(--border); vertical-align:middle; }
.ib-p3-tab .ib-input, .ib-p3-tab .ib-select { width:100%; min-width:0; min-height:34px; padding:5px 8px; background:var(--bg2);
  border:1px solid var(--border); border-radius:7px; color:var(--text); font:inherit; font-size:var(--fs-small); }
.ib-p3-tab .ib-p3-n { width:64px; text-align:right; font-variant-numeric:tabular-nums; }
.ib-p3-tab td:nth-child(2) .ib-input { min-width:120px; }
.ib-p3-tab td:nth-child(5) .ib-select { max-width:150px; }
.ib-p3-tab tr.is-shown td { background:rgba(0,200,220,.06); }
.ib-p3-tab input[type=checkbox] { width:18px; height:18px; accent-color:var(--cyan); }
.ib-p3-tab tr.is-off td:not(:first-child) { opacity:.45; }
.ib-p3-tab tr.is-added td:first-child { text-align:center; }
.ib-p3-rm { display:inline-grid; place-items:center; width:24px; height:24px; padding:0; border:1px solid var(--border);
  border-radius:6px; background:transparent; color:var(--muted); cursor:pointer; }
.ib-p3-rm:hover, .ib-p3-rm:focus-visible { color:var(--red); border-color:rgba(255,107,91,.55); }
.ib-p3-add { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; }
.ib-p3-add .ib-p3-n { width:64px; min-height:34px; padding:5px 8px; background:var(--bg2); border:1px solid var(--border);
  border-radius:7px; color:var(--text); font:inherit; font-size:var(--fs-small); text-align:right; }
.ib-p3-add .ib-btn svg { margin-right:4px; }
.ib-p3-ptitle .ib-lib-link { font-size:var(--fs-caption); }
.ib-p3-scale { display:inline-flex; flex-wrap:wrap; align-items:center; gap:6px; }
.ib-p3-scale > span { color:var(--muted); }
.ib-p3-scale .ib-p3-n { width:84px; min-height:32px; padding:4px 8px; background:var(--bg2); border:1px solid var(--border);
  border-radius:7px; color:var(--text); font:inherit; font-size:var(--fs-small); text-align:right; }
.ib-p3-scales { display:flex; flex-direction:column; gap:8px; padding:8px 10px; border:1px dashed var(--border); border-radius:var(--r-sm); }
.ib-p3-sline { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px 12px; }
.ib-p3-sline p { margin:0; }
.ib-p3-sline p span { color:var(--muted); font-size:var(--fs-caption); }
.ib-p3-empty { display:flex; flex-direction:column; gap:10px; max-width:640px; }
.ib-p3-more summary { cursor:pointer; color:var(--muted); font-size:var(--fs-caption); }
.ib-p3-more[open] summary { margin-bottom:6px; }
.ib-p3-note { color:var(--muted); font-size:var(--fs-caption); }
.ib-p3-plan { display:flex; flex-direction:column; gap:8px; min-width:0; }
.ib-p3-pick { display:flex; flex-wrap:wrap; gap:4px; }
.ib-p3-ptitle { display:flex; flex-wrap:wrap; gap:4px 10px; align-items:baseline; }
.ib-p3-ptitle span { color:var(--muted); font-size:var(--fs-caption); }
.ib-p3-draw { border:1px solid var(--border); border-radius:var(--r-sm); background:#0e1c2a; padding:6px; }
.ib-p3-svg { display:block; width:100%; height:auto; max-height:420px; }
.ib-p3-fp { fill:#1a2c3f; }
.ib-p3-room { fill:rgba(0,200,220,.06); stroke:rgba(0,200,220,.35); stroke-width:.08; }
.ib-p3-rname { fill:#c9d6e2; text-anchor:middle; font-weight:600; }
.ib-p3-rarea { fill:#7d8c9c; text-anchor:middle; }
.ib-p3-walls .is-ext { fill:#e4eff5; }
.ib-p3-walls .is-int { fill:#9fb2c4; }
.ib-p3-open .is-window { stroke:#59b6f0; }
.ib-p3-open .is-door { stroke:#f39c12; }
.ib-p3-open .is-opening { stroke:#1a2c3f; }
.ib-p3-col { fill:#e4eff5; }
.ib-p3-key { display:flex; flex-wrap:wrap; gap:6px 14px; color:var(--muted); font-size:var(--fs-caption); }
.ib-p3-key i { display:inline-block; width:14px; height:6px; border-radius:2px; margin-right:6px; vertical-align:middle; }
.ib-p3-key i.is-ext { background:#e4eff5; } .ib-p3-key i.is-int { background:#9fb2c4; }
.ib-p3-key i.is-window { background:#59b6f0; } .ib-p3-key i.is-door { background:#f39c12; }
.ib-p3-key i.is-opening { background:#1a2c3f; box-shadow:inset 0 0 0 1px #9fb2c4; }
/* The review's corrections and doubts (D-295) */
.ib-p3-svg.is-edit .ib-p3-room { cursor:pointer; }
.ib-p3-svg.is-edit .ib-p3-room:hover { fill:rgba(0,200,220,.12); }
.ib-p3-room.is-sel { fill:rgba(0,200,220,.22); stroke:var(--cyan); }
.ib-p3-hit { stroke:transparent; fill:none; pointer-events:stroke; cursor:pointer; }
.ib-p3-walls .is-sel { fill:var(--cyan); }
.ib-p3-walls .is-gone { fill:none; stroke:#9fb2c4; stroke-width:.06; stroke-dasharray:.25 .2; }
.ib-p3-open .is-sel { stroke:#ffffff; }
.ib-p3-open .is-new { stroke-dasharray:.3 .15; }
.ib-p3-mark { cursor:pointer; }
.ib-p3-mark circle { fill:var(--amber); stroke:#0e1c2a; stroke-width:.08; }
.ib-p3-mark text { fill:#0e1c2a; text-anchor:middle; font-weight:700; pointer-events:none; }
.ib-p3-mark.is-done { opacity:.45; }
.ib-p3-mark.is-done circle { fill:#5f7385; }
.ib-p3-mark.is-on circle { stroke:#ffffff; stroke-width:.25; }
.ib-p3-sum .is-check b { color:var(--amber); }
.ib-p3-doubts { display:flex; flex-direction:column; gap:4px; }
.ib-p3-doubts .ib-md-h span { color:var(--amber); }
.ib-p3-doubts ol { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:2px; max-height:160px; overflow:auto; }
.ib-p3-dbt { display:flex; gap:8px; align-items:flex-start; width:100%; padding:4px 6px; border:0; border-radius:6px; background:transparent;
  color:var(--text); font:inherit; font-size:var(--fs-caption); text-align:left; cursor:pointer; }
.ib-p3-dbt:hover, .ib-p3-doubts li.is-on .ib-p3-dbt { background:rgba(0,200,220,.08); }
.ib-p3-dbt b { flex:none; display:inline-grid; place-items:center; min-width:18px; height:18px; border-radius:9px; background:var(--amber); color:#0e1c2a; font-size:11px; }
.ib-p3-doubts li.is-done .ib-p3-dbt { color:var(--muted); text-decoration:line-through; }
.ib-p3-doubts li.is-done .ib-p3-dbt b { background:#5f7385; }
.ib-p3-ed { display:flex; flex-direction:column; gap:6px; padding:8px 10px; border:1px solid var(--border); border-radius:var(--r-sm); }
.ib-p3-ed p { margin:0; }
.ib-p3-edrow { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.ib-p3-edrow > span { color:var(--muted); font-size:var(--fs-caption); }
.ib-p3-edrow .ib-input, .ib-p3-edrow .ib-select { min-height:32px; padding:4px 8px; background:var(--bg2); border:1px solid var(--border);
  border-radius:7px; color:var(--text); font:inherit; font-size:var(--fs-small); }
.ib-p3-edrow .ib-p3-n { width:72px; text-align:right; }
.ib-p3-edrow [data-edn] { flex:1 1 180px; min-width:0; }
/* A scan under the plan read from it, and scanned sheets shown small (D-296) */
.ib-p3-under { opacity:.38; filter:invert(1); pointer-events:none; }
.ib-p3-thumb { flex:none; width:88px; height:62px; object-fit:contain; background:#f4f1ea; border-radius:4px; border:1px solid var(--border); }
.ib-p3-fail { display:flex; gap:10px; padding:10px 12px; border:1px solid rgba(255,107,91,.45); border-radius:var(--r-sm); }
.ib-p3-fail svg { color:var(--red); flex:none; margin-top:2px; }
.ib-p3-fail p { color:var(--muted); margin:4px 0 8px !important; }
.ib-p3-warn { color:var(--amber); }
.ib-p3-steps { display:flex; flex-direction:column; gap:10px; align-items:flex-start; }
.ib-p3-steps p { display:inline-flex; align-items:center; gap:8px; color:var(--muted); }
.ib-p3-steps p.is-now { color:var(--text); } .ib-p3-steps p.is-now svg { color:var(--cyan); }
.ib-p3-steps p.is-done svg { color:var(--green); } .ib-p3-steps p.is-fail svg { color:var(--red); }
@media (max-width:600px) {
  .ib-p3-tab .ib-p3-n { width:56px; }
  .ib-p3-tab th:nth-child(4), .ib-p3-tab td:nth-child(4) { display:none; }
}
.ib-si .ib-select { width:100%; min-width:0; }
.ib-si-head label { min-width:0; flex:1 1 140px; }
.ib-si-head { display:flex; flex-wrap:wrap; align-items:flex-end; gap:8px 14px; }
.ib-si-head label, .ib-si-cols label { display:flex; flex-direction:column; gap:3px; color:var(--muted); font-size:var(--fs-caption); }
.ib-si-head span { color:var(--dim); font-size:var(--fs-caption); padding-bottom:6px; }
.ib-si-cols { display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:8px; margin-top:8px; }
.ib-si-plan { display:flex; flex-direction:column; gap:8px; }
.ib-si-src { display:flex; align-items:center; gap:8px; color:var(--muted); }
.ib-si-src b { color:var(--text); }
.ib-si-part { border:1px solid var(--border); border-radius:var(--r-md); padding:8px 10px; display:flex; flex-direction:column; gap:4px; }
.ib-si-check { display:flex; align-items:center; gap:7px; cursor:pointer; }
.ib-si-check span { color:var(--muted); }
.ib-si-check svg { color:var(--cyan); flex:none; }
.ib-si-part details summary { cursor:pointer; color:var(--cyan); font-size:var(--fs-caption); }
.ib-si-list { margin:4px 0 0; padding-left:18px; display:flex; flex-direction:column; gap:2px; }
.ib-si-list span { color:var(--muted); }
.ib-fp-undrawn { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:10px; color:var(--muted);
  font-size:var(--fs-small); }
.ib-fp-undrawn .ib-lib-chip { display:inline-flex; align-items:center; gap:5px; }
.ib-fp-undrawn .ib-lib-chip b { color:var(--dim); font-weight:var(--fw-semibold); }
@media (max-width:600px) {
  .ib-modal.ib-si { padding:16px; }
  .ib-si-cols { grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); }
  .ib-si .ib-modal-actions .ib-btn { min-height:44px; flex:1 1 0; justify-content:center; }
}

/* ── A floor's plan from the building's drawings, and its scale (D-281) ── */
.ib-fp-drawhost:empty { display:none; }
.ib-fd { margin-bottom:12px; padding:10px 12px; border:1px solid var(--border); border-radius:12px; background:var(--panel); }
.ib-fd-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.ib-fd-body { display:flex; flex-direction:column; gap:8px; }
.ib-fd-row { display:flex; gap:12px; align-items:flex-start; padding:8px; border:1px solid var(--border); border-radius:10px;
  background:var(--bg2); }
.ib-fd-row.is-failed { border-color:rgba(255,107,91,.45); }
.ib-fd-thumb { position:relative; flex:0 0 96px; height:64px; display:grid; place-items:center; border-radius:8px;
  overflow:hidden; background:#fff; border:1px solid var(--border); }
.ib-fd-thumb img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.ib-fd-thumb span { font-weight:var(--fw-bold); letter-spacing:.06em; color:#38506a; font-size:var(--fs-small); }
.ib-fd-main { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:4px; }
.ib-fd-title { display:flex; align-items:center; gap:8px; min-width:0; }
.ib-fd-title b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.ib-fd-fmt { flex:none; padding:1px 6px; border-radius:var(--r-pill); border:1px solid var(--border); color:var(--muted);
  font-size:var(--fs-micro, 11px); font-weight:var(--fw-semibold); }
.ib-fd-main small { color:var(--muted); font-size:var(--fs-caption); }
.ib-fd-state { display:inline-flex; align-items:center; gap:6px; color:var(--cyan) !important; }
.ib-fd-err { display:inline-flex; align-items:flex-start; gap:6px; color:var(--amber) !important; }
.ib-fd-err svg { flex:none; margin-top:2px; }
.ib-fd-acts { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin-top:2px; }
.ib-fd-page { display:inline-flex; align-items:center; gap:6px; color:var(--muted); font-size:var(--fs-small); }
.ib-fd-page input { width:64px; }
.ib-fd-layers { display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px; padding:8px; border-radius:8px;
  background:var(--panel); border:1px solid var(--border); }
.ib-fd-layers label { display:inline-flex; align-items:center; gap:5px; font-size:var(--fs-small); }
.ib-fd-layers small { color:var(--dim); }
.ib-fd-layers .ib-btn { margin-left:auto; }
.ib-fd-shape { display:flex; align-items:center; flex-wrap:wrap; gap:6px 10px; color:var(--muted); font-size:var(--fs-small); }
.ib-fd-shape svg { color:var(--cyan); }
.ib-fd-pics { display:flex; flex-wrap:wrap; align-items:center; gap:6px; color:var(--muted); font-size:var(--fs-small); }
.ib-fd-pics .ib-lib-chip { display:inline-flex; align-items:center; gap:5px; }
.ib-fd-none { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:var(--fs-small); }
.ib-fp-bar { position:absolute; left:10px; bottom:10px; display:flex; flex-direction:column; gap:2px; width:40%;
  pointer-events:none; }
.ib-fp-bar i { display:block; height:6px; border:2px solid #1b2a3a; border-top:0; background:rgba(255,255,255,.85); }
.ib-fp-bar span { font-size:var(--fs-caption); font-weight:var(--fw-bold); color:#1b2a3a; text-shadow:0 0 3px #fff, 0 0 3px #fff; }
.ib-fp-scale { display:flex; align-items:center; flex-wrap:wrap; gap:6px 10px; margin-top:8px; color:var(--muted);
  font-size:var(--fs-small); }
.ib-fp-scale svg { color:var(--cyan); }
.ib-fp-scale b { color:var(--text); }
.ib-fp-room-name small { font-weight:var(--fw-semibold); opacity:.85; }
/* A drawn plan is white: the room's name sits on a dark label to be read on it. */
.ib-fp-room-name { align-self:flex-start; max-width:100%; padding:1px 6px; border-radius:4px; background:rgba(11,20,31,.72); }
.ib-fp.is-measuring .ib-fp-stage { cursor:crosshair; outline:2px dashed var(--amber); outline-offset:2px; }
.ib-fp.is-measuring .ib-fp-room { pointer-events:none; opacity:.5; }
.ib-fp-measure { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.ib-fp-measure line { stroke:var(--amber); stroke-width:3; stroke-dasharray:6 4; vector-effect:non-scaling-stroke; }
.ib-fp-pts { position:absolute; inset:0; pointer-events:none; }
.ib-fp-pts i { position:absolute; width:12px; height:12px; margin:-6px 0 0 -6px; border-radius:50%; background:var(--amber);
  border:2px solid #fff; box-shadow:0 0 0 1px rgba(0,0,0,.4); }
@media (max-width:600px) {
  .ib-fd-row { flex-direction:column; }
  .ib-fd-thumb { flex-basis:auto; width:100%; height:120px; }
  .ib-fd-acts .ib-btn, .ib-fd-shape .ib-btn, .ib-fd-layers .ib-btn { min-height:44px; }
}

/* ── How sure this is (D-115) ──
   Zahir's advisor: two gauges, the next step large, then why, what could
   explain it and the checks; the frame is coloured by how serious it is. */
.ib-adv { --adv:var(--green); position:relative; padding:16px 18px 12px; border-radius:14px; border:1px solid var(--border);
  border-left:4px solid var(--adv); margin-bottom:20px;
  background:radial-gradient(900px 220px at 0% 0%, color-mix(in srgb, var(--adv) 10%, transparent), transparent 60%), var(--panel); }
.ib-adv.is-amber { --adv:var(--amber); }
.ib-adv.is-red { --adv:var(--red); }
.ib-adv.is-grey { --adv:var(--dim); }
.ib-adv-top { display:grid; grid-template-columns:auto minmax(0,1fr); gap:16px 20px; align-items:center; }
.ib-adv-gauges { display:flex; gap:10px; }
.ib-adv-gauge { --g:var(--green); min-width:108px; padding:10px 12px; border-radius:12px; text-align:center;
  border:1px solid color-mix(in srgb, var(--g) 45%, transparent); background:color-mix(in srgb, var(--g) 10%, transparent); }
.ib-adv-gauge.is-amber { --g:var(--amber); }
.ib-adv-gauge.is-red { --g:var(--red); }
.ib-adv-gauge.is-cyan { --g:var(--cyan); }
.ib-adv-gauge.is-grey { --g:var(--muted); }
.ib-adv-gauge span { display:block; font-size:var(--fs-micro); text-transform:uppercase; letter-spacing:.06em; color:var(--dim); }
.ib-adv-gauge b { display:block; margin-top:3px; font-size:15px; color:var(--g); }
.ib-adv-k { font-size:var(--fs-caption); text-transform:uppercase; letter-spacing:.06em; color:var(--dim); margin-bottom:4px; }
.ib-adv-v { font-size:16px; font-weight:var(--fw-semibold); line-height:1.4; color:var(--text); }
.ib-adv-human { display:inline-flex; align-items:center; gap:6px; margin-top:8px; padding:4px 10px; border-radius:var(--r-pill);
  background:rgba(231,76,60,.12); color:var(--red); font-size:var(--fs-small); font-weight:var(--fw-semibold); }
.ib-adv-block { margin-top:14px; }
.ib-adv-why { margin:0; padding-left:18px; color:var(--muted); line-height:1.5; }
.ib-adv-chips { display:flex; flex-wrap:wrap; gap:6px; }
.ib-adv-chip { padding:4px 10px; border-radius:var(--r-pill); border:1px solid var(--border); background:rgba(0,0,0,.18);
  color:var(--muted); font-size:var(--fs-small); }
.ib-adv-checks { list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:6px 16px; font-size:var(--fs-small); }
.ib-adv-checks li { display:inline-flex; align-items:center; gap:5px; color:var(--muted); }
.ib-adv-checks li.is-ok .ib-icon { color:var(--green); }
.ib-adv-checks li.is-bad { color:var(--red); }
.ib-adv-evidence { margin-top:12px; }
.ib-adv-evidence ul { margin:6px 0 0; padding-left:18px; color:var(--muted); font-size:var(--fs-small); line-height:1.5; }
.ib-adv-note { margin:12px 0 0; color:var(--dim); font-size:var(--fs-caption); }
@media (max-width:640px) {
  .ib-adv-top { grid-template-columns:minmax(0,1fr); }
  .ib-adv-gauge { flex:1; min-width:0; }
}

/* ── What to aim for (D-116) ──
   Zahir's recommendation cards (2026-10-21), kept as he styled them. */
.ib-safe-panel { margin:0 0 18px; padding:14px 16px; border-radius:14px; border:1px solid rgba(0,200,220,0.28);
  background:radial-gradient(600px 180px at 100% 0%, rgba(0,200,220,0.07), transparent 55%), var(--panel); }
.ib-safe-title { font-size:15px; font-weight:var(--fw-bold); color:var(--text); }
.ib-safe-meta { font-size:12px; color:var(--muted); margin:6px 0 14px; line-height:1.45; }
.ib-safe-stale { margin:-6px 0 12px; font-size:12px; color:var(--amber); }
.ib-safe-old { margin:0 0 18px; }
.ib-safe-old > .ib-safe-panel { margin:10px 0 0; }
.ib-safe-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:12px; }
.ib-safe-card { position:relative; display:flex; flex-direction:column; gap:8px; background:var(--panel, #0d1824);
  border:1px solid rgba(255,255,255,0.08); border-radius:12px; padding:14px 14px 12px; }
.ib-safe-card.ib-safe-ok { border-color:rgba(46,204,113,0.4); }
.ib-safe-card.ib-safe-watch { border-color:rgba(255,159,10,0.45); }
.ib-safe-card.ib-safe-high { border-color:rgba(255,59,48,0.45); }
.ib-safe-card.ib-safe-none { border-style:dashed; opacity:.85; }
.ib-safe-card.ib-safe-primary { box-shadow:0 0 0 1px rgba(0,200,220,0.25), 0 8px 24px rgba(0,0,0,0.25); }
.ib-safe-badge { position:absolute; top:10px; right:10px; font-size:10px; font-weight:700; letter-spacing:.04em;
  text-transform:uppercase; color:#00c8dc; background:rgba(0,200,220,0.12); padding:3px 8px; border-radius:999px; }
.ib-safe-param { font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); padding-right:72px; }
.ib-safe-compare { display:flex; align-items:center; gap:10px; margin:2px 0; }
.ib-safe-col { flex:1; min-width:0; }
.ib-safe-col-k { font-size:11px; color:var(--muted); }
.ib-safe-col-v { font-size:20px; font-weight:700; color:var(--text); line-height:1.2; word-break:break-word; }
.ib-safe-unit { font-size:12px; font-weight:500; color:var(--muted); margin-left:3px; }
.ib-safe-col-rec .ib-safe-col-v { color:#5ac8fa; }
.ib-safe-arrow { color:var(--muted); font-size:16px; flex-shrink:0; }
.ib-safe-track { margin:2px 0; }
.ib-safe-track-bar { position:relative; height:6px; border-radius:4px; background:rgba(255,255,255,0.06); }
.ib-safe-track-fill { position:absolute; top:0; bottom:0; border-radius:4px;
  background:linear-gradient(90deg, rgba(255,159,10,0.5), rgba(46,204,113,0.55)); }
.ib-safe-track-now, .ib-safe-track-rec { position:absolute; top:50%; width:8px; height:8px; margin:-4px 0 0 -4px; border-radius:50%; }
.ib-safe-track-now { background:#ff9f0a; box-shadow:0 0 0 2px rgba(255,159,10,0.25); }
.ib-safe-track-rec { background:#2ecc71; box-shadow:0 0 0 2px rgba(46,204,113,0.25); }
.ib-safe-track-labels { display:flex; justify-content:space-between; font-size:10px; color:var(--muted); margin-top:4px; }
.ib-safe-cri-row { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; font-size:12px; color:var(--muted); }
.ib-safe-cri-row strong { color:var(--text); font-weight:650; }
.ib-safe-delta { font-size:11px; color:var(--muted); }
.ib-safe-action { padding:7px 9px; border-radius:8px; background:rgba(0,200,220,0.07); border:1px solid rgba(0,200,220,0.14);
  font-size:12.5px; color:var(--text); line-height:1.4; }
.ib-safe-why { font-size:11px; color:var(--muted); line-height:1.35; }
.ib-safe-foot { font-size:11px; color:var(--muted); margin-top:10px; }
.ib-safe-empty { margin-bottom:12px; padding:12px 14px; border-radius:12px; background:rgba(255,255,255,0.03);
  border:1px dashed rgba(255,255,255,0.1); font-size:13px; color:var(--muted); line-height:1.4; }
.ib-safe-empty-title { font-weight:600; color:var(--text); margin-bottom:4px; }
@media (max-width:640px) { .ib-safe-grid { grid-template-columns:minmax(0,1fr); } }

/* ── The building library (D-185): documents and data kept with a building ── */
.ib-library > .ib-h2-note { display:block; margin:-4px 0 10px; }
.ib-lib-bar { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-bottom:10px; }
.ib-lib-add { cursor:pointer; }
.ib-lib-chips { display:flex; flex-wrap:wrap; gap:6px; }
.ib-lib-chip { font:inherit; font-size:var(--fs-small); font-weight:var(--fw-semibold); color:var(--muted);
  background:var(--panel); border:1px solid var(--border); border-radius:var(--r-pill); padding:5px 11px;
  cursor:pointer; white-space:nowrap; transition:background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.ib-lib-chip b { color:var(--dim); font-weight:var(--fw-semibold); margin-left:4px; }
.ib-lib-chip:hover { color:var(--text); }
.ib-lib-chip.is-on { color:var(--cyan); background:rgba(0,200,220,.12); border-color:rgba(0,200,220,.35); }
.ib-lib-chip.is-on b { color:var(--cyan); }
.ib-lib-list { display:flex; flex-direction:column; gap:8px; }
.ib-lib-file { display:flex; align-items:flex-start; gap:12px; background:var(--panel); border:1px solid var(--border);
  border-radius:var(--r-md); padding:10px 12px; }
.ib-lib-badge { --tone:var(--dim); position:relative; flex-shrink:0; width:44px; height:52px; border-radius:var(--r-xs);
  display:flex; align-items:flex-end; justify-content:center; overflow:hidden;
  background:linear-gradient(160deg, color-mix(in srgb, var(--tone) 26%, transparent), color-mix(in srgb, var(--tone) 8%, transparent));
  border:1px solid color-mix(in srgb, var(--tone) 45%, transparent); }
.ib-lib-badge span { font-size:var(--fs-micro); font-weight:var(--fw-bold); letter-spacing:var(--ls-caps); color:var(--tone);
  margin-bottom:6px; position:relative; }
.ib-lib-badge img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.ib-lib-badge.has-thumb span { color:#fff; background:rgba(0,0,0,.55); border-radius:4px; padding:1px 4px; margin-bottom:4px; }
.ib-lib-badge.is-pdf { --tone:var(--red); }
.ib-lib-badge.is-doc { --tone:var(--blue); }
.ib-lib-badge.is-sheet { --tone:var(--green); }
.ib-lib-badge.is-slides { --tone:var(--amber); }
.ib-lib-badge.is-model { --tone:#5eead4; }
.ib-lib-badge.is-data { --tone:var(--cyan); }
.ib-lib-badge.is-image { --tone:#a78bfa; }
.ib-lib-body { flex:1; min-width:0; }
.ib-lib-top { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; }
.ib-lib-title { color:var(--text); overflow-wrap:anywhere; }
.ib-lib-meta { display:flex; flex-wrap:wrap; gap:2px 12px; color:var(--dim); font-size:var(--fs-caption); margin-top:3px; }
.ib-lib-name { overflow-wrap:anywhere; }
.ib-lib-note { margin-top:6px; white-space:pre-line; overflow-wrap:anywhere; font-size:var(--fs-small); color:var(--muted); }
.ib-lib-actions { display:flex; gap:4px; flex-shrink:0; }
.ib-lib-usage { display:flex; align-items:center; gap:10px; margin-top:12px; color:var(--dim); font-size:var(--fs-caption); }
.ib-lib-usage-bar { width:120px; height:6px; border-radius:var(--r-pill); background:var(--panel2); overflow:hidden; flex-shrink:0; }
.ib-lib-usage-bar i { display:block; height:100%; background:var(--cyan); border-radius:inherit; }
.ib-lib-usage.is-full .ib-lib-usage-bar i { background:var(--amber); }
@media (max-width:640px) {
  .ib-lib-file { flex-wrap:wrap; }
  .ib-lib-body { flex-basis:calc(100% - 56px); }
  .ib-lib-actions { width:100%; justify-content:flex-end; }
}

/* ── The building's documents, read for the assistant (D-189) ── */
.ib-lib-ai-note { display:flex; align-items:flex-start; gap:8px; margin:6px 0 12px; padding:8px 10px;
  border-radius:var(--r-md); background:rgba(0,200,220,.07); border:1px solid rgba(0,200,220,.22);
  color:var(--muted); font-size:var(--fs-caption); line-height:1.5; }
.ib-lib-ai-note svg { flex-shrink:0; margin-top:2px; color:var(--cyan); }
.ib-lib-search { display:flex; gap:8px; margin:0 0 10px; }
.ib-lib-search .ib-input { flex:1; min-width:0; background:var(--bg2); border:1px solid var(--border);
  border-radius:var(--r-md); padding:7px 11px; color:var(--text); font:inherit; font-size:var(--fs-small); }
.ib-lib-search .ib-input:focus { outline:none; border-color:var(--cyan); }
.ib-lib-search .ib-input::placeholder { color:var(--dim); }
.ib-lib-hits:empty { display:none; }
.ib-lib-hitlist { display:flex; flex-direction:column; gap:8px; margin-bottom:14px; padding:10px 12px;
  background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); }
.ib-lib-hits-head { display:flex; justify-content:space-between; align-items:center; gap:8px;
  color:var(--dim); font-size:var(--fs-caption); }
.ib-lib-hit { border-top:1px solid var(--border); padding-top:8px; }
.ib-lib-hit-top { display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; font-size:var(--fs-small); }
.ib-lib-hit-top b { color:var(--text); }
.ib-lib-hit-top > span:not(.ib-pill) { color:var(--dim); font-size:var(--fs-caption); }
.ib-lib-hit p { margin:4px 0 0; color:var(--muted); font-size:var(--fs-small); line-height:1.55;
  white-space:pre-line; overflow-wrap:anywhere; }
.ib-lib-hit mark { background:rgba(0,200,220,.18); color:var(--text); border-radius:3px; padding:0 1px; }
.ib-lib-reading { display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; margin-top:7px;
  font-size:var(--fs-caption); }
.ib-lib-read { display:inline-flex; align-items:center; gap:5px; color:var(--dim); overflow-wrap:anywhere; }
.ib-lib-read.is-read { color:var(--green); }
.ib-lib-read.is-fail { color:var(--amber); }
.ib-lib-dot { width:7px; height:7px; border-radius:50%; background:var(--cyan); animation:ib-lib-pulse 1.4s ease-in-out infinite; }
@keyframes ib-lib-pulse { 0%,100% { opacity:.35; } 50% { opacity:1; } }
.ib-lib-ai { display:inline-flex; align-items:center; gap:5px; font:inherit; font-size:var(--fs-caption);
  padding:2px 9px; border-radius:var(--r-pill); border:1px solid var(--border); background:transparent; color:var(--dim); }
button.ib-lib-ai { cursor:pointer; }
button.ib-lib-ai:hover { color:var(--text); border-color:var(--muted); }
.ib-lib-ai.is-on { color:var(--cyan); border-color:rgba(0,200,220,.35); background:rgba(0,200,220,.08); }
.ib-lib-link { display:inline-flex; align-items:center; gap:4px; font:inherit; font-size:var(--fs-caption);
  color:var(--cyan); background:none; border:0; padding:0; cursor:pointer; }
.ib-lib-link:hover { text-decoration:underline; }
@media (prefers-reduced-motion: reduce) { .ib-lib-dot { animation:none; opacity:.8; } }
/* Readings imported from a kept file (D-191) */
.ib-lib-imports { display:flex; flex-direction:column; align-items:flex-start; gap:4px; margin-top:7px; font-size:var(--fs-caption); }
.ib-lib-imports.is-orphan { margin-top:12px; padding:8px 10px; border:1px dashed var(--border); border-radius:var(--r-md); color:var(--muted); }
.ib-lib-imp { display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; color:var(--cyan); }
.ib-lib-imp svg { flex-shrink:0; }
.ib-lib-imp.is-gone { color:var(--dim); }
.ib-lib-impsee { width:100%; display:flex; flex-direction:column; gap:8px; padding:8px 10px; margin:2px 0 4px;
  border:1px solid var(--border); border-radius:var(--r-md); background:var(--panel2); }
.ib-lib-impch-top { display:flex; flex-wrap:wrap; gap:2px 10px; align-items:baseline; color:var(--dim); }
.ib-lib-impch-top b { color:var(--text); }
.ib-lib-impchart { display:block; width:100%; height:54px; margin-top:3px; }
.ib-lib-impnote { margin:0; color:var(--dim); line-height:1.45; }
.ib-imp { max-width:560px; }
.ib-imp-lead { color:var(--muted); font-size:var(--fs-small); line-height:1.5; margin:0 0 10px; }
.ib-imp-body { display:flex; flex-direction:column; gap:8px; font-size:var(--fs-small); color:var(--text); max-height:55vh; overflow:auto; }
.ib-imp-body p { margin:0; line-height:1.5; }
.ib-imp-note { color:var(--muted); }
.ib-imp-why { color:var(--amber); line-height:1.45; }
.ib-imp-pick { display:flex; flex-direction:column; gap:6px; }
.ib-imp-dev { border:1px solid var(--border); border-radius:var(--r-md); padding:8px 10px; display:flex; flex-direction:column; gap:3px; }
.ib-imp-dev.is-ok { border-color:rgba(46,204,113,.35); }
.ib-imp-dev-top { display:flex; align-items:center; gap:6px; }
.ib-imp-dev.is-ok .ib-imp-dev-top svg { color:var(--green); }
.ib-imp-dev.is-no .ib-imp-dev-top svg { color:var(--amber); }
.ib-imp-dev-top span { color:var(--dim); }

/* ── A building's own material lines (D-186) ── */
.ib-ml-bar { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
/* Values found in the documents (D-190) */
.ib-ml-foundbox:empty { display:none; }
.ib-ml-found { margin:0 0 14px; padding:10px 12px; border-radius:var(--r-md);
  background:rgba(0,200,220,.05); border:1px solid rgba(0,200,220,.22); }
.ib-ml-found-head { display:flex; align-items:flex-start; gap:8px; color:var(--muted); font-size:var(--fs-caption); line-height:1.5; }
.ib-ml-found-head svg { flex-shrink:0; margin-top:2px; color:var(--cyan); }
.ib-ml-fcards { display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:8px; margin-top:10px; }
.ib-ml-fcard { display:flex; flex-direction:column; gap:6px; background:var(--panel); border:1px solid var(--border);
  border-radius:var(--r-md); padding:9px 11px; }
.ib-ml-fcard.is-done { opacity:.7; }
.ib-ml-fcard-top { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 10px; font-size:var(--fs-small); }
.ib-ml-fcard-top b { color:var(--text); }
.ib-ml-fval { color:var(--cyan); font-weight:var(--fw-bold); }
.ib-ml-fcard blockquote { margin:0; padding:2px 0 2px 10px; border-left:3px solid rgba(0,200,220,.4);
  color:var(--muted); font-size:var(--fs-small); line-height:1.5; overflow-wrap:anywhere; }
.ib-ml-fsrc { display:flex; align-items:center; gap:6px; color:var(--dim); font-size:var(--fs-caption); overflow-wrap:anywhere; }
.ib-ml-fnote { color:var(--amber); font-size:var(--fs-caption); line-height:1.45; }
.ib-ml-fnote.is-quiet { color:var(--dim); }
.ib-ml-fsrc.is-also { padding-left:18px; }
.ib-ml-factions { display:flex; justify-content:flex-end; margin-top:auto; }
/* What the recorded conditions say (D-192) */
.ib-ml-learnedbox:empty { display:none; }
.ib-ml-learned { margin-top:14px; }
.ib-ml-learn-list { display:flex; flex-direction:column; gap:8px; }
.ib-ml-learn { display:flex; flex-direction:column; gap:5px; padding:9px 11px; border-radius:var(--r-md);
  background:var(--panel); border:1px solid var(--border); border-left:3px solid var(--dim); font-size:var(--fs-small); }
.ib-ml-learn.is-warn { border-left-color:var(--amber); }
.ib-ml-learn.is-ok { border-left-color:var(--green); }
.ib-ml-learn-top { display:flex; align-items:flex-start; gap:7px; color:var(--text); }
.ib-ml-learn-top svg { flex-shrink:0; margin-top:2px; }
.ib-ml-learn.is-warn .ib-ml-learn-top svg { color:var(--amber); }
.ib-ml-learn.is-ok .ib-ml-learn-top svg { color:var(--green); }
.ib-ml-learn-body { color:var(--muted); line-height:1.5; }
.ib-matlines-sec > .ib-h2-note { display:block; margin:-4px 0 10px; }
.ib-ml-mats { display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); gap:10px; }
.ib-ml-mat { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); padding:10px 12px; }
.ib-ml-mat-head { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 10px; margin-bottom:6px; }
.ib-ml-mat-head span { color:var(--dim); font-size:var(--fs-caption); overflow-wrap:anywhere; }
.ib-ml-table, .ib-ml-imp { width:100%; border-collapse:collapse; font-size:var(--fs-small); }
.ib-ml-table th, .ib-ml-imp th { text-align:left; color:var(--muted); font-weight:var(--fw-semibold);
  font-size:var(--fs-micro); text-transform:uppercase; letter-spacing:var(--ls-caps); padding:4px 6px; }
.ib-ml-table td, .ib-ml-imp td { padding:5px 6px; border-top:1px solid var(--border); vertical-align:top; }
.ib-ml-table tr.is-own td { background:rgba(0,200,220,.06); }
.ib-ml-table tr.is-own td:first-child { box-shadow:inset 3px 0 0 var(--cyan); }
.ib-ml-lines { display:flex; flex-direction:column; gap:8px; }
.ib-ml-line { background:var(--panel); border:1px solid var(--border); border-left:3px solid var(--dim);
  border-radius:var(--r-md); padding:10px 12px; }
.ib-ml-line.is-proposed { border-left-color:var(--amber); }
.ib-ml-line.is-confirmed { border-left-color:var(--green); }
.ib-ml-line.is-rejected, .ib-ml-line.is-retired { opacity:.75; }
.ib-ml-line-top { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; }
.ib-ml-value { font-size:var(--fs-stat-sm); font-weight:var(--fw-bold); color:var(--text); }
.ib-ml-cat { color:var(--dim); font-size:var(--fs-caption); }
.ib-ml-meta { color:var(--dim); font-size:var(--fs-caption); margin-top:4px; }
.ib-ml-source { display:flex; gap:8px; margin-top:8px; padding:8px 10px; border-radius:var(--r-sm);
  background:rgba(255,255,255,.03); border:1px solid var(--border); font-size:var(--fs-small); color:var(--muted); }
.ib-ml-source > svg { flex-shrink:0; margin-top:2px; color:var(--cyan); }
.ib-ml-source b { color:var(--text); display:block; }
.ib-ml-source q { display:block; font-style:italic; overflow-wrap:anywhere; margin-top:2px; }
.ib-ml-note { margin-top:6px; font-size:var(--fs-small); white-space:pre-line; overflow-wrap:anywhere; }
.ib-ml-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.ib-ml-actions:empty { display:none; }
.ib-ml-impact { margin-top:10px; overflow-x:auto; }
.ib-ml-imp td small { display:block; color:var(--dim); }
.ib-ml-imp-cell { display:inline-block; margin-right:12px; white-space:nowrap; }
.ib-ml-imp-cell i { font-style:normal; color:var(--muted); }
.ib-ml-imp-note { color:var(--dim); font-size:var(--fs-caption); margin:6px 0 0; }
.ib-ml-past { margin-top:12px; }
.ib-ml-past summary { cursor:pointer; color:var(--muted); font-size:var(--fs-small); margin-bottom:8px; }
.ib-ml-wall { margin-top:10px; background:rgba(0,200,220,.06); border:1px solid rgba(0,200,220,.3);
  border-radius:var(--r-md); padding:10px 12px; }
.ib-ml-wall-head { display:flex; align-items:center; gap:6px; color:var(--cyan); margin-bottom:6px; }
.ib-ml-wall-row { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 10px; font-size:var(--fs-small); padding:3px 0; }
.ib-ml-wall-row > span:first-child { min-width:140px; color:var(--muted); }

/* D-187: every reading connected. */
.ib-rel-leg i.arrow { width: 0; height: 0; border-radius: 0; transform: none; background: none;
  border-left: 8px solid #B794F6; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.ib-rel-leg i.drift, .ib-rel-leg i.broken { width: 18px; height: 0; border-radius: 0; transform: none; background: none;
  border-top: 2px dashed #F5A524; }
.ib-rel-leg i.broken { border-top: 2px dotted #FF6B5B; }
.ib-fm-conn-sec { margin-top: 10px; }
.ib-fm-conn-h { font-size: var(--fs-micro); font-weight: var(--fw-semibold); text-transform: uppercase;
  letter-spacing: var(--ls-caps); color: var(--muted); }
.ib-fm-conn-sec.is-warn .ib-fm-conn-h { color: #F5A524; }
.ib-fm-conn .ib-fm-conn-drift, .ib-fm-conn .ib-fm-conn-via { display: block; font-size: 13px; color: var(--text);
  padding: 6px 10px; border-radius: 8px; background: rgba(245,165,36,.08); border-left: 3px solid #F5A524; }
.ib-fm-conn .ib-fm-conn-drift.is-broken { background: rgba(255,107,91,.08); border-left-color: #FF6B5B; }
.ib-fm-conn .ib-fm-conn-via { background: rgba(255,255,255,.03); border-left-color: var(--dim); color: var(--muted); }

/* Each reading's checked outlook (D-193) */
.ib-er-out { display:flex; align-items:flex-start; gap:6px; font-size:var(--fs-caption); color:var(--text); line-height:1.45; }
.ib-er-out svg { flex-shrink:0; margin-top:2px; color:var(--cyan); }
.ib-er-out b { font-weight:var(--fw-semibold); color:var(--muted); }
.ib-er-out.is-quiet { color:var(--dim); }
.ib-er-out.is-quiet svg { color:var(--dim); }
/* D-188: every reading, each against its own usual. */
.ib-er-sum { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px;
  color:var(--muted); font-size:var(--fs-small); }
.ib-er-sum b { color:var(--text); font-weight:var(--fw-semibold); }
.ib-er-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(250px, 1fr)); gap:10px; }
.ib-er-card { --er:#5AC8FA; position:relative; background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md);
  padding:11px 12px 10px; display:flex; flex-direction:column; gap:5px; overflow:hidden; }
.ib-er-card::before { content:""; position:absolute; inset:0 0 auto 0; height:3px; background:var(--er); opacity:.75; }
.ib-er-card.is-unusual { border-color:rgba(245,165,36,.45); background:linear-gradient(180deg, rgba(245,165,36,.07), transparent 45%), var(--panel); }
.ib-er-card.is-changing { border-color:rgba(0,200,220,.35); }
.ib-er-card.is-no_recent, .ib-er-card.is-learning { opacity:.85; }
.ib-er-top { display:flex; align-items:center; gap:7px; }
.ib-er-top i { width:9px; height:9px; border-radius:50%; background:var(--er); flex-shrink:0; }
.ib-er-top b { color:var(--text); font-size:var(--fs-body); }
.ib-er-state { margin-left:auto; font-size:var(--fs-micro); font-weight:var(--fw-semibold); text-transform:uppercase;
  letter-spacing:var(--ls-caps); padding:2px 7px; border-radius:var(--r-pill); white-space:nowrap; }
.ib-er-state.is-ok { color:var(--green); background:rgba(46,204,113,.12); }
.ib-er-state.is-warn { color:#F5A524; background:rgba(245,165,36,.14); }
.ib-er-state.is-info { color:var(--cyan); background:rgba(0,200,220,.12); }
.ib-er-state.is-grey { color:var(--dim); background:rgba(255,255,255,.05); }
.ib-er-value { font-size:var(--fs-stat); font-weight:var(--fw-bold); color:var(--text); line-height:1.1;
  display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 8px; }
.ib-er-value small { font-size:var(--fs-small); font-weight:var(--fw-medium); color:var(--muted); margin-left:2px; }
.ib-er-pos { font-size:var(--fs-caption); font-weight:var(--fw-medium); color:var(--muted); }
.ib-er-pos.up, .ib-er-pos.down { color:#F5A524; }
.ib-er-usual { font-size:var(--fs-caption); color:var(--dim); }
.ib-er-spark { width:100%; height:58px; display:block; margin:2px 0; }
.ib-er-facts { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:2px;
  font-size:var(--fs-caption); color:var(--muted); }
.ib-er-facts li::before { content:"·"; margin-right:6px; color:var(--dim); }
.ib-er-links { display:flex; gap:6px; align-items:flex-start; font-size:var(--fs-caption); color:#B794F6; }
.ib-er-links svg { flex-shrink:0; margin-top:2px; }
.ib-er-feeds { display:flex; flex-wrap:wrap; gap:4px; align-items:center; margin-top:2px; font-size:var(--fs-caption); color:var(--dim); }
.ib-er-feeds > span:first-child { margin-right:2px; }
.ib-er-chip { padding:1px 7px; border-radius:var(--r-pill); background:rgba(255,255,255,.05); border:1px solid var(--border);
  color:var(--muted); font-size:var(--fs-micro); }
.ib-er-chip.is-finding { color:#F5A524; border-color:rgba(245,165,36,.35); }
.ib-er-note { margin:10px 0 0; color:var(--dim); font-size:var(--fs-caption); }

/* ── Analytics layout (D-200) ────────────────────────────────────────────────
   An object page: what the device is and how it stands (the header and four
   figures), then the tabs, directly over the content they switch. The
   toolbar keeps the device and window in reach; the tab bar sticks under it
   (on a phone, where both stuck took a fifth of the screen, the tabs alone). */
.ib-anbar-sticky { padding-bottom:12px; }
.ib-an-tabbar { position:sticky; top:calc(60px + var(--ib-anbar-h, 58px)); z-index:14; background:var(--bg);
  border-bottom:1px solid var(--border); margin:22px 0 2px; }
.ib-an-tabs { position:relative; margin:0 0 -1px; }
/* The line under the active tab slides to the one chosen (D-238); until it
   is placed, the tab's own border stands in. */
.ib-an-ink { position:absolute; left:0; bottom:0; width:0; height:2px; border-radius:2px 2px 0 0; background:var(--cyan);
  pointer-events:none; opacity:0; transition:transform 280ms var(--ease-out), width 280ms var(--ease-out); }
.ib-an-tabs.has-ink .ib-an-ink { opacity:1; }
.ib-an-tabs.has-ink button.is-active { border-bottom-color:transparent; }
.ib-an-ink.is-instant { transition:none; }
.ib-an-tabs button { transition:color var(--dur) var(--ease); }
/* Every area at least a screen tall under the bars, so a short one never
   pulls the page back up to its header (D-238). */
.ib-an-panel { min-height:calc(100vh - 60px - var(--ib-anbar-h, 58px) - 72px); }
.ib-an-tabs.is-more-r { -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 44px),transparent);
  mask-image:linear-gradient(90deg,#000 calc(100% - 44px),transparent); }
.ib-an-tabs.is-more-l { -webkit-mask-image:linear-gradient(90deg,transparent,#000 44px);
  mask-image:linear-gradient(90deg,transparent,#000 44px); }
.ib-an-tabs.is-more-l.is-more-r {
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 44px,#000 calc(100% - 44px),transparent);
  mask-image:linear-gradient(90deg,transparent,#000 44px,#000 calc(100% - 44px),transparent); }
@media (max-width:640px) {
  .ib-anbar-sticky { position:static; border-bottom:0; padding-bottom:2px; }
  .ib-an-tabbar { top:60px; margin-top:16px; }
  .ib-an-panel { min-height:calc(100vh - 60px - 64px); }
}

/* The header leads with what to check next, beside the health. */
.ib-cond.has-next { align-items:stretch; }
.ib-cond.has-next > .ib-cond-ring { align-self:center; }
.ib-cond.has-next > .ib-cond-body { align-self:center; }
.ib-cond-next { flex:0 1 380px; min-width:250px; display:flex; flex-direction:column; gap:6px;
  border-left:1px solid var(--border); padding:2px 0 2px 18px; margin-left:auto; }
.ib-cond-next-k { display:flex; align-items:center; gap:6px; font-size:var(--fs-micro); font-weight:var(--fw-semibold);
  text-transform:uppercase; letter-spacing:var(--ls-caps); color:var(--muted); }
.ib-cond-next-k svg { color:var(--cyan); flex-shrink:0; }
.ib-cond-next-v { font-size:var(--fs-body); font-weight:var(--fw-medium); color:var(--text); line-height:var(--lh-snug); }
.ib-cond-next-foot { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:auto; padding-top:4px; }
.ib-cond-next-tag { display:inline-flex; align-items:baseline; gap:5px; padding:2px 9px; border-radius:var(--r-pill);
  border:1px solid var(--border); font-size:var(--fs-caption); font-weight:var(--fw-semibold); color:var(--text); }
.ib-cond-next-tag i { font-style:normal; font-weight:var(--fw-regular); color:var(--muted); }
.ib-cond-next-tag.is-red { color:var(--red); border-color:rgba(255,107,91,.4); }
.ib-cond-next-tag.is-amber { color:var(--amber); border-color:rgba(243,156,18,.4); }
.ib-cond-next-tag.is-green { color:var(--green); border-color:rgba(46,204,113,.35); }
.ib-cond-next-tag.is-cyan { color:var(--cyan); border-color:rgba(0,200,220,.35); }
.ib-cond-next-tag.is-grey { color:var(--muted); }
.ib-cond-next-why { margin-left:auto; padding:2px 0; background:none; border:0; color:var(--cyan); font:inherit;
  font-size:var(--fs-small); font-weight:var(--fw-semibold); cursor:pointer; }
.ib-cond-next-why:hover { text-decoration:underline; }
.ib-cond-next-why:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; border-radius:var(--r-sm); }
@media (max-width:980px) {
  .ib-cond.has-next { flex-wrap:wrap; }
  .ib-cond-next { flex:1 1 100%; min-width:0; margin-left:0; border-left:0; border-top:1px solid var(--border); padding:12px 0 0; }
}

/* The header's facts wrap beside the next step: a separator that would
   start a line sits in the gap before it and is clipped there. */
.ib-cond-meta { overflow:hidden; padding-left:4px; margin-left:-4px; }
.ib-cond-meta > span::before { content:"·"; display:inline-block; width:14px; margin-left:-14px; text-align:center; color:var(--dim); }
.ib-cond-meta > span + span::before { margin-right:0; }

/* The four figures, as the Overview's cards: four across, two on a tablet
   or phone. A figure that is no verdict is quiet. */
.ib-an-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
/* Three figures where this board cannot judge the fourth (D-273): three
   across, and on a tablet or phone the third takes the whole row. */
.ib-an-kpis.is-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
@media (max-width:1100px) {
  .ib-an-kpis, .ib-an-kpis.is-3 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ib-an-kpis.is-3 > :last-child { grid-column:1 / -1; }
}
.ib-an-kpi { display:flex; flex-direction:column; min-width:0; }
.ib-an-kpi .ib-glance-label > span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ib-an-kpi .ib-glance-v { font-size:20px; line-height:1.2; letter-spacing:-.2px; margin:8px 0 4px; overflow-wrap:anywhere; }
.ib-an-kpi.ib-glance-red .ib-glance-v { color:var(--red); }
.ib-an-kpi.ib-glance-amber .ib-glance-v { color:var(--amber); }
.ib-an-kpi.ib-glance-green .ib-glance-v { color:var(--green); }
.ib-an-kpi.is-quiet .ib-glance-v { color:var(--muted); font-weight:var(--fw-semibold); }
.ib-an-kpi .ib-glance-link { margin-top:auto; padding-top:10px; opacity:.75; transition:opacity var(--dur-fast) var(--ease); }
.ib-an-kpi:hover .ib-glance-link, .ib-an-kpi:focus-visible .ib-glance-link { opacity:1; }
@media (max-width:600px) {
  .ib-an-kpis { gap:10px; }
  .ib-an-kpi { padding:12px 13px; }
  .ib-an-kpi .ib-glance-v { font-size:17px; }
  /* No hover on a phone: the card's chevron says it opens something. */
  .ib-an-kpi .ib-glance-link { display:none; }
  .ib-an-kpi .ib-glance-label::after { content:"›"; margin-left:auto; color:var(--cyan); font-size:15px; line-height:1; }
}

/* ── A compact page head (D-241) ──
   The head stays above every tab, so it should be read at a glance and give
   the tabs the screen: the condition card tighter, its words a size down,
   its age one chip (D-273), and the four figures as
   tiles of one line each (their full words on hover). */
.ib-cond { padding:12px 16px; margin:10px 0 12px; gap:16px; }
.ib-cond-ring { width:66px; height:66px; }
.ib-cond-ring-c b { font-size:19px; }
.ib-cond-ring-c span { margin-top:2px; font-size:10px; letter-spacing:.05em; }
.ib-cond-id { font-size:var(--fs-micro); letter-spacing:.02em; }
/* Expert's device id beside the rating, not on a line of its own (D-273). */
.ib-cond-head .ib-cond-id { margin-left:10px; vertical-align:3px; font-weight:var(--fw-semibold); }
.ib-cond-head { font-size:18px; line-height:1.2; margin:1px 0 2px; letter-spacing:-.1px; }
/* The rating's ⓘ, holding the header's small print in Simple (D-262). */
.ib-cond-head .ib-info { margin-left:8px; vertical-align:3px; }
.ib-cond-sub { font-size:var(--fs-caption); margin-bottom:4px; opacity:.8; }
.ib-cond-parts { gap:4px 5px; margin:3px 0 6px; }
.ib-cond-parts-k { font-size:var(--fs-caption); }
.ib-cond-part { padding:0 8px; line-height:1.6; }
.ib-cond-meta { font-size:var(--fs-caption); color:var(--dim); gap:2px 12px; }
.ib-cond-next { flex-basis:330px; gap:5px; padding-left:16px; }
.ib-cond-next-v { font-size:var(--fs-small); font-weight:var(--fw-regular); line-height:1.45; }
.ib-cond-next-tag { font-size:var(--fs-micro); padding:1px 8px; }
.ib-cond-next-why { font-size:var(--fs-caption); }
/* The four figures as compact tiles. */
.ib-an-kpis { gap:10px; }
.ib-an-kpi { padding:10px 14px; }
.ib-an-kpi .ib-glance-label { font-size:var(--fs-micro); letter-spacing:.06em; gap:6px; }
.ib-an-kpi .ib-glance-label svg { opacity:.8; }
.ib-an-kpi .ib-glance-label::after { content:"›"; margin-left:auto; padding-left:6px; color:var(--dim); font-size:14px; line-height:1;
  transition:color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.ib-an-kpi:hover .ib-glance-label::after, .ib-an-kpi:focus-visible .ib-glance-label::after { color:var(--cyan); transform:translateX(2px); }
.ib-an-kpi .ib-glance-v { font-size:15px; font-weight:var(--fw-semibold); line-height:1.3; letter-spacing:0; margin:6px 0 2px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; overflow-wrap:normal; }
.ib-an-kpi .ib-glance-sub { font-size:var(--fs-caption); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* A meaning chip in a figure is read whole: it wraps rather than being cut (D-262). */
.ib-an-kpi .ib-glance-sub:has(> .ib-flagnote) { white-space:normal; overflow:visible; }
.ib-an-kpi .ib-glance-link { display:none; }
.ib-an-kpi:hover { border-color:rgba(0,200,220,.35); }
@media (max-width:600px) {
  .ib-cond { padding:12px 13px; gap:12px; }
  .ib-cond-head { font-size:17px; }
  .ib-an-kpi .ib-glance-v { font-size:14px; }
  .ib-an-kpi .ib-glance-label::after { color:var(--cyan); }
}
@media (prefers-reduced-motion:reduce) { .ib-an-kpi .ib-glance-label::after { transition:none; } }

/* A long tab's contents, each a jump to its section. */
.ib-an-toc { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin:16px 0 0; }
.ib-an-toc-k { margin-right:4px; font-size:var(--fs-micro); font-weight:var(--fw-semibold); text-transform:uppercase;
  letter-spacing:var(--ls-caps); color:var(--dim); }
.ib-an-toc-i { padding:4px 11px; border:1px solid var(--border); border-radius:var(--r-pill); background:rgba(255,255,255,.03);
  color:var(--muted); font:inherit; font-size:var(--fs-small); cursor:pointer;
  transition:color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.ib-an-toc-i:hover, .ib-an-toc-i:focus-visible { color:var(--text); border-color:rgba(0,200,220,.5); outline:none; }
@media (max-width:640px) {
  .ib-an-toc { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; margin-right:-14px; padding-right:14px; }
  .ib-an-toc::-webkit-scrollbar { display:none; }
  .ib-an-toc-k, .ib-an-toc-i { flex:0 0 auto; }
}

/* The first load: the page's shape, shimmering, instead of a lone spinner. */
.ib-an-skel { display:flex; flex-direction:column; gap:14px; margin-top:14px; }
.ib-an-skel-note { padding:0; justify-content:flex-start; color:var(--dim); font-size:var(--fs-small); }
.ib-skel { border:1px solid var(--border); border-radius:var(--r-md);
  background:linear-gradient(90deg, var(--panel) 30%, var(--panel2) 50%, var(--panel) 70%);
  background-size:220% 100%; animation:ibSkel 1.4s ease-in-out infinite; }
@keyframes ibSkel { from { background-position:100% 0; } to { background-position:-120% 0; } }
.ib-skel-cond { height:118px; }
.ib-an-skel .ib-skel-kpi { height:122px; }
.ib-skel-tabs { height:38px; margin-top:8px; border-radius:var(--r-sm); }
.ib-skel-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:10px; }
.ib-skel-card { height:300px; }
@media (prefers-reduced-motion:reduce) { .ib-skel { animation:none; } }
/* What to aim for, while the engine works it out. */
.ib-safe-wait .ib-safe-meta { display:flex; align-items:center; padding:0; justify-content:flex-start; }

/* Grids that left a card alone: four charts two by two rather than three and
   one; a lone tile at its own width rather than the row's. */
@media (min-width:900px) {
  .ib-clim-grid:has(> :nth-child(4):last-child) { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
.ib-clim-tiles:has(> :only-child) { grid-template-columns:minmax(0,380px); }
/* The mould status box as tall as what it says, not as the ladder. */
.ib-mould-now { align-self:start; }
/* Reading cards line up: the value's position on a line of its own, so
   every spark starts at one height, and what reads it at the card's foot. */
.ib-er-pos { flex-basis:100%; margin-top:1px; }
.ib-er-feeds { margin-top:auto; padding-top:6px; }
/* A device that has stopped reporting: "as usual" without the green. */
.ib-er.is-old .ib-er-state { color:var(--dim); background:rgba(255,255,255,.05); }

/* ── Analytics on a phone, and polish (D-201) ────────────────────────────────
   The tab bar is always in reach: where it lies below the fold (a phone,
   where the header and figures fill the first screen; a short window) it is
   held at the screen's foot until the page reaches it, then travels up and
   sticks under the toolbar. */
.ib-an-tabbar { bottom:0; }
.ib-an-tabbar.is-docked { border-bottom-color:transparent; padding-bottom:env(safe-area-inset-bottom, 0px);
  box-shadow:0 -1px 0 var(--border), 0 -14px 26px rgba(8,16,26,.6); }
.ib-an-tabmark { height:0; }

/* Reading cards: all of a card on a wide screen; on a phone its figure and
   chart, and the rest on a tap. */
.ib-er-more { display:flex; flex-direction:column; gap:5px; flex:1 1 auto; min-width:0; }
.ib-er-toggle { display:none; }
@media (max-width:600px) {
  .ib-er-toggle { display:flex; align-items:center; gap:5px; align-self:flex-start; margin:0; padding:3px 9px 3px 6px;
    border:1px solid var(--border); border-radius:var(--r-pill); background:rgba(255,255,255,.04);
    color:var(--muted); font:inherit; font-size:var(--fs-caption); font-weight:var(--fw-medium); cursor:pointer; }
  .ib-er-toggle svg { transition:transform var(--dur-fast) var(--ease); }
  .ib-er-card.is-open .ib-er-toggle svg { transform:rotate(180deg); }
  .ib-er-card:not(.is-open) .ib-er-more { display:none; }
  .ib-er-card.is-open .ib-er-more { margin-top:4px; }
}

/* Reading cards folded at every width (D-211): a card's figure, its day and
   a line of gist; the rest on a tap or "Open all". A row no longer stretches
   to its tallest open card. */
.ib-er-grid { grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); align-items:start; }
.ib-er-spark { height:46px; }
/* The line over the hours the board was off (D-302): a dashed break where a
   gap is left out, and when the newest readings start. */
.ib-er-break line { stroke:var(--dim); stroke-width:1; stroke-dasharray:2 3; vector-effect:non-scaling-stroke; }
.ib-er-when { font-size:var(--fs-micro); color:var(--dim); line-height:var(--lh-snug); margin-top:-2px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ib-er-gist { font-size:var(--fs-caption); color:var(--muted); line-height:var(--lh-snug);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ib-er-card.is-unusual .ib-er-gist { color:#F5A524; }
/* All closed: a row's cards one height, their Details at the foot. One
   open: each card its own height, so the open one does not stretch the rest. */
.ib-er-grid:not(:has(.ib-er-card.is-open)) { align-items:stretch; }
.ib-er-grid:not(:has(.ib-er-card.is-open)) .ib-er-toggle { margin-top:auto; }
.ib-er-toggle { display:flex; align-items:center; gap:6px; align-self:stretch; margin:2px 0 0; padding:4px 9px 4px 6px;
  border:1px solid var(--border); border-radius:var(--r-pill); background:rgba(255,255,255,.04);
  color:var(--muted); font:inherit; font-size:var(--fs-caption); font-weight:var(--fw-medium); cursor:pointer; }
.ib-er-toggle:hover { border-color:rgba(0,200,220,.45); color:var(--text); }
.ib-er-toggle small { display:inline-flex; align-items:center; gap:3px; color:var(--dim); font-weight:var(--fw-regular, 400); }
.ib-er-toggle small:first-of-type { margin-left:auto; }
.ib-er-toggle svg { transition:transform var(--dur-fast) var(--ease); }
.ib-er-card.is-open .ib-er-toggle > svg { transform:rotate(180deg); }
.ib-er-card:not(.is-open) .ib-er-more { display:none; }
.ib-er-card.is-open .ib-er-more { margin-top:4px; }
.ib-er-acts { display:inline-flex; flex-wrap:wrap; gap:6px; }
.ib-er-acts [aria-pressed="true"] > svg { transform:rotate(180deg); }

/* The what-if's own controls, named. */
.ib-wi-h { margin:18px 0 8px; font-size:var(--fs-body); font-weight:var(--fw-semibold); color:var(--text); }
/* What to aim for: its cards share the row, up to a readable width, instead
   of leaving a third of it empty. */
.ib-safe-grid { grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); }
.ib-safe-card { max-width:640px; }

@media (max-width:760px) {
  /* A table that scrolls sideways keeps a device's id and a column's name
     whole: "DEMO-/Brick-/002" over three lines read as three things. */
  .ib-an-panel .ib-table th, .ib-an-panel .ib-table td:first-child { white-space:nowrap; }
}
.ib-matcard-head .ib-pill { flex:none; white-space:nowrap; }
@media (max-width:600px) {
  /* An odd last tile takes the row, not half of it. */
  .ib-clim-tiles > :last-child:nth-child(odd):not(:only-child) { grid-column:1 / -1; }
  /* Four material facts two by two, not three and one. */
  .ib-matstats { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px 18px; }
  /* The replay's three lengths on one row, their hint beneath. */
  .ib-rp-or { display:none; }
  .ib-rp-hint { flex-basis:100%; }
}

/* ── Devices (D-202) ─────────────────────────────────────────────────────────
   On a phone the list is a card a device, not a table that scrolled its
   health, alerts and status off the screen: the id and the rating on the
   first line, the room and the health under them, then when it last reported
   and its alerts. Building and material are on the device's own page. */
@media (max-width:600px) {
  .ib-table.ib-devlist { display:block; overflow:visible; background:none; border:0; border-radius:0; }
  .ib-devlist thead { display:none; }
  .ib-devlist tbody { display:flex; flex-direction:column; gap:8px; }
  .ib-devlist tr { display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:5px 12px; align-items:center;
    grid-template-areas:"id status" "name health" "live alerts";
    padding:12px 14px; background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); }
  .ib-devlist td { display:block; padding:0; border:0; min-width:0; }
  .ib-devlist .c-id { grid-area:id; font-weight:var(--fw-semibold); overflow-wrap:anywhere; }
  .ib-devlist .c-status { grid-area:status; justify-self:end; white-space:nowrap; }
  .ib-devlist .c-name { grid-area:name; color:var(--muted); font-size:var(--fs-small); }
  .ib-devlist .c-health { grid-area:health; justify-self:end; font-size:var(--fs-small); }
  .ib-devlist .c-live { grid-area:live; }
  .ib-devlist .c-alerts { grid-area:alerts; justify-self:end; font-size:var(--fs-small); }
  .ib-devlist .c-health::before, .ib-devlist .c-alerts::before { content:attr(data-l) " "; color:var(--dim); }
  .ib-devlist .c-bld, .ib-devlist .c-mat { display:none; }
}
/* The age beside a live-state pill keeps to one line. */
.ib-devlist .c-live { white-space:nowrap; }
.ib-devlist .c-live .ib-dimtext { margin-left:8px; }
/* Where figures and reading tiles go two across, an odd last one takes the row. */
@media (max-width:460px) {
  .ib-kpis > :last-child:nth-child(odd):not(:only-child),
  .ib-sensors > :last-child:nth-child(odd):not(:only-child) { grid-column:1 / -1; }
}

/* ── Reports (D-203) ─────────────────────────────────────────────────────────
   Under each picker: when its subject last reported, and a warning before a
   download that would hold no readings. */
.ib-report-when { display:flex; align-items:center; flex-wrap:wrap; gap:6px 10px; margin:-4px 0 12px;
  font-size:var(--fs-small); color:var(--muted); }
.ib-report-when > svg { flex-shrink:0; color:var(--dim); }
.ib-report-when.is-warn { padding:9px 12px; border:1px solid rgba(243,156,18,.4); border-radius:var(--r-sm);
  background:rgba(243,156,18,.08); color:var(--text); }
.ib-report-when.is-warn > svg { color:var(--amber); align-self:flex-start; margin-top:2px; }
.ib-report-when.is-warn > span { flex:1 1 280px; line-height:var(--lh-snug); }

/* Readings report (D-242): a building or one wall, dates, readings, PDF or CSV. */
.ib-rr-lead { color:var(--muted); font-size:var(--fs-small); line-height:1.5; margin:-4px 0 12px; max-width:76ch; }
.ib-rr-card { display:grid; gap:16px; }
.ib-rr-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px 14px; }
.ib-rr-grid label, .ib-rr-step { display:grid; gap:4px; font-size:var(--fs-caption); color:var(--muted); }
.ib-rr-grid .ib-select, .ib-rr-grid .ib-input, .ib-rr-step .ib-select { width:100%; min-width:0; max-width:none; margin-left:0; }
.ib-rr-quick { align-items:center; margin-top:-4px; }
.ib-rr-quick .ib-chips-note { margin-left:0; }
.ib-rr-head { display:flex; align-items:baseline; gap:12px; font-size:var(--fs-caption); color:var(--muted); margin-bottom:8px; }
.ib-rr-link { background:none; border:0; padding:0; color:var(--cyan); font:inherit; cursor:pointer; }
.ib-rr-link:hover { text-decoration:underline; }
.ib-rr-n { color:var(--dim); font-variant-numeric:tabular-nums; margin-left:7px; font-size:.9em; }
.ib-chip-tog.on .ib-rr-n { color:inherit; opacity:.75; }
.ib-rr-card .ib-report-when { margin:0; flex-wrap:nowrap; }
.ib-rr-card .ib-report-when:not(.is-warn) > span { flex:1 1 0; min-width:0; }
.ib-rr-card .ib-report-when.is-warn { flex-wrap:wrap; }
.ib-rr-actions { display:flex; flex-wrap:wrap; align-items:flex-end; gap:10px 12px; }
.ib-rr-gap { flex:1 1 auto; }
.ib-rr-step { min-width:220px; }
@media (max-width:560px) {
  .ib-rr-actions { align-items:stretch; flex-direction:column; }
  .ib-rr-gap { display:none; }
  .ib-rr-step { min-width:0; }
}

/* ── Building history taken in (D-204) ───────────────────────────────────────
   The import dialog: a new data logger's fields, and what each device's
   readings are like and what they are enough for. */
.ib-imp-logger { display:grid; grid-template-columns:minmax(0, 2fr) minmax(0, 80px) minmax(0, 1.4fr); gap:8px; }
.ib-imp-logger label { display:flex; flex-direction:column; gap:4px; color:var(--muted); font-size:var(--fs-caption); }
@media (max-width:520px) { .ib-imp-logger { grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); }
  .ib-imp-logger label:first-child { grid-column:1 / -1; } }
.ib-imp-prof { margin-top:6px; padding-top:7px; border-top:1px dashed var(--border); display:flex; flex-direction:column; gap:5px; }
.ib-imp-prof-line { color:var(--muted); }
.ib-imp-prof-ch { display:flex; flex-wrap:wrap; gap:4px 14px; color:var(--muted); font-size:var(--fs-caption); }
.ib-imp-prof-ch b { color:var(--text); font-weight:var(--fw-semibold); }
.ib-imp-prof-k { margin-top:2px; font-size:var(--fs-micro); font-weight:var(--fw-semibold); text-transform:uppercase;
  letter-spacing:var(--ls-caps); color:var(--dim); }
.ib-imp-supports { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:3px; font-size:var(--fs-caption); }
.ib-imp-supports li { display:flex; align-items:flex-start; gap:6px; color:var(--text); }
.ib-imp-supports li svg { flex-shrink:0; margin-top:2px; color:var(--green); }
.ib-imp-supports li.is-no { color:var(--dim); }
.ib-imp-supports li.is-no svg { color:var(--dim); }
.ib-imp-lead span { display:block; margin-top:4px; color:var(--dim); }
.ib-imp-facts, .ib-imp-result, .ib-imp-choose { display:flex; flex-direction:column; gap:8px; }
.ib-imp-logger .ib-input, .ib-imp-logger .ib-select { height:36px; box-sizing:border-box; width:100%; }
/* ── A building's history (D-205) ── */
.ib-ch-ribbon.is-range { fill:var(--cyan); opacity:.2; }
.ib-ch-ribbon.is-range-t { fill:#E0A030; opacity:.2; }
.ib-clim-key i.is-range { height:10px; background:var(--cyan); opacity:.3; }
.ib-hist-cov { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); padding:10px 8px; display:grid; gap:2px; overflow-x:auto; }
.ib-hist-cov-row, .ib-hist-cov-years { display:grid; grid-template-columns:minmax(150px, 240px) minmax(260px, 1fr) 64px; gap:12px; align-items:center; min-width:540px; }
.ib-hist-cov-row { background:none; border:1px solid transparent; border-radius:var(--r-sm); padding:6px 8px; color:var(--text); font:inherit; text-align:left; cursor:pointer; }
.ib-hist-cov-row:hover { border-color:var(--border); background:var(--panel2); }
.ib-hist-cov-row.is-current { border-color:rgba(0,200,220,.45); background:rgba(0,200,220,.06); }
.ib-hist-cov-row:focus-visible { outline:2px solid var(--cyan); outline-offset:1px; }
.ib-hist-cov-years { padding:0 9px; }
.ib-hist-cov-name { display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; min-width:0; font-size:var(--fs-small); }
.ib-hist-cov-name b { font-weight:var(--fw-semibold); overflow-wrap:anywhere; }
.ib-hist-cov-name small { color:var(--dim); font-size:var(--fs-caption); }
.ib-hist-cov-name .ib-pill { font-size:10px; padding:2px 7px; }
.ib-hist-cov-strip { display:grid; gap:2px; }
.ib-hist-cov-strip i { height:16px; border-radius:3px; background:var(--panel2); }
.ib-hist-cov-strip i.is-on { background:rgba(0,200,220,var(--a)); }
.ib-hist-cov-years .ib-hist-cov-strip b { font-size:var(--fs-micro); color:var(--dim); font-weight:var(--fw-medium); border-left:1px solid var(--border); padding-left:4px; white-space:nowrap; overflow:hidden; }
.ib-hist-cov-sum { font-size:var(--fs-caption); color:var(--muted); text-align:right; font-variant-numeric:tabular-nums; }
.ib-hist-cov-key { display:flex; align-items:center; gap:6px; font-size:var(--fs-caption); color:var(--dim); padding:6px 9px 2px; flex-wrap:wrap; }
.ib-hist-cov-key i { width:14px; height:10px; border-radius:2px; background:var(--panel2); margin-left:8px; }
.ib-hist-cov-key i:first-child { margin-left:0; }
.ib-hist-cov-key i.is-on { background:rgba(0,200,220,var(--a)); }
.ib-hist-controls { display:flex; flex-wrap:wrap; gap:12px 22px; align-items:flex-end; margin:16px 0 18px; padding:12px 14px; background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); }
.ib-hist-room { display:grid; gap:5px; font-size:var(--fs-caption); color:var(--muted); min-width:230px; }
.ib-hist-periods { display:grid; gap:6px; font-size:var(--fs-caption); color:var(--muted); }
.ib-hist-custom { display:flex; flex-wrap:wrap; gap:8px 12px; align-items:flex-end; width:100%; }
.ib-hist-custom label { display:grid; gap:4px; font-size:var(--fs-caption); color:var(--muted); }
.ib-hist-custom[hidden] { display:none; }
.ib-hist-answer { background:var(--panel); border:1px solid var(--border); border-left:4px solid var(--green); border-radius:var(--r-md); padding:14px 16px; }
.ib-hist-answer.is-warn { border-left-color:var(--amber); }
.ib-hist-answer.is-bad { border-left-color:var(--red); }
.ib-hist-eyebrow { font-size:var(--fs-micro); text-transform:uppercase; letter-spacing:var(--ls-caps); color:var(--dim); font-weight:var(--fw-semibold); }
.ib-hist-headline { font-size:var(--fs-title); font-weight:var(--fw-semibold); margin:4px 0 12px; line-height:var(--lh-tight); }
.ib-hist-points { list-style:none; margin:0; padding:0; display:grid; gap:8px; font-size:var(--fs-body); line-height:var(--lh-snug); }
.ib-hist-points li { display:grid; grid-template-columns:16px 1fr; gap:8px; align-items:start; }
.ib-hist-points li .ib-icon { margin-top:3px; }
.ib-hist-points li.is-bad .ib-icon { color:var(--red); }
.ib-hist-points li.is-warn .ib-icon { color:var(--amber); }
.ib-hist-points li.is-ok .ib-icon { color:var(--green); }
.ib-hist-points li.is-info .ib-icon { color:var(--dim); }
.ib-hist-points small { display:block; color:var(--dim); font-size:var(--fs-caption); margin-top:2px; }
.ib-hist-wide { grid-template-columns:1fr; margin-bottom:14px; }
.ib-hist-calwrap { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); padding:12px 14px; }
.ib-hist-measures { margin-bottom:12px; }
.ib-hist-cal { display:grid; gap:12px; overflow-x:auto; padding-bottom:4px; }
.ib-hist-cal-year { display:grid; grid-template-columns:40px 1fr; gap:8px; align-items:start; min-width:560px; }
.ib-hist-cal-y { font-size:var(--fs-small); color:var(--muted); font-weight:var(--fw-semibold); padding-top:17px; font-variant-numeric:tabular-nums; }
.ib-hist-cal-m, .ib-hist-cal-g { display:grid; grid-template-columns:repeat(54, minmax(0, 1fr)); column-gap:2px; }
.ib-hist-cal-m { height:14px; margin-bottom:3px; }
.ib-hist-cal-m b { font-size:var(--fs-micro); color:var(--dim); font-weight:var(--fw-medium); white-space:nowrap; }
.ib-hist-cal-g { grid-template-rows:repeat(7, auto); grid-auto-flow:column; row-gap:2px; }
.ib-hist-cal-g i { aspect-ratio:1; border-radius:2px; background:var(--panel2); }
.ib-hist-cal-g i.is-pad, .ib-hist-cal-g i.is-out { background:transparent; }
.ib-hist-cal-g i.is-none { background:transparent; box-shadow:inset 0 0 0 1px var(--border); }
.ib-hist-cal-g i.is-rh { background:rgba(0,200,220,var(--a)); }
.ib-hist-cal-g i.is-warn { background:rgba(243,156,18,var(--a)); }
.ib-hist-cal-g i.is-bad { background:rgba(255,107,91,var(--a)); }
.ib-hist-cal-g i.is-calm { background:rgba(0,200,220,calc(var(--a) * .45)); }
.ib-hist-cal-g i[data-day] { cursor:pointer; }
.ib-hist-cal-g i.is-picked { outline:2px solid var(--text); outline-offset:1px; }
.ib-hist-cal-key { display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:var(--fs-caption); color:var(--dim); margin-top:10px; }
.ib-hist-cal-key i { width:12px; height:12px; border-radius:2px; }
.ib-hist-cal-key i.is-grad { width:90px; }
.ib-hist-cal-key i.is-grad.is-rh { background:linear-gradient(90deg, rgba(0,200,220,.06), rgba(0,200,220,1)); }
.ib-hist-cal-key i.is-grad.is-warn { background:linear-gradient(90deg, rgba(243,156,18,.3), rgba(243,156,18,1)); }
.ib-hist-cal-key i.is-bad { background:rgba(255,107,91,.8); margin-left:10px; }
.ib-hist-cal-key i.is-calm { background:rgba(0,200,220,.28); margin-left:10px; }
.ib-hist-cal-key i.is-none { box-shadow:inset 0 0 0 1px var(--border); margin-left:10px; }
.ib-hist-day { margin-top:12px; border-top:1px solid var(--border); padding-top:10px; }
.ib-hist-day-h { font-weight:var(--fw-semibold); font-size:var(--fs-lead); margin-bottom:6px; }
.ib-hist-day-dl { display:grid; grid-template-columns:max-content 1fr; gap:4px 14px; margin:0; font-size:var(--fs-small); }
.ib-hist-day-dl dt { color:var(--muted); }
.ib-hist-day-dl dd { margin:0; }
.ib-hist-day-none { color:var(--dim); font-size:var(--fs-small); margin:0; }
.ib-hist-scroll { overflow-x:auto; border:1px solid var(--border); border-radius:var(--r-md); }
.ib-hist-scroll .ib-table { border:none; min-width:760px; }
.ib-hist-months td, .ib-hist-months th { padding:8px 12px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.ib-hist-months td small { color:var(--dim); font-size:var(--fs-caption); margin-left:4px; }
.ib-hist-rooms td:first-child small { display:block; margin-left:0; }
.ib-hist-heat.is-warn { background:rgba(243,156,18,var(--a)); }
.ib-hist-heat.is-bad { background:rgba(255,107,91,var(--a)); }
.ib-hist-rooms tr[data-brick] { cursor:pointer; }
.ib-hist-rooms tr[data-brick]:hover td { background:var(--panel2); }
.ib-hist-rooms tr[data-brick]:focus-visible { outline:2px solid var(--cyan); outline-offset:-2px; }
.ib-hist-rooms tr.is-current td:first-child { box-shadow:inset 3px 0 0 var(--cyan); }
.ib-hist-note { color:var(--dim); font-size:var(--fs-small); }
.ib-hist-historic { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); padding:14px 16px; }
.ib-hist-historic.is-wait { border-style:dashed; }
.ib-hist-historic.is-wait p { margin:0 0 10px; font-size:var(--fs-small); color:var(--muted); line-height:var(--lh-body); }
.ib-hist-historic-h { display:flex; align-items:center; gap:8px; font-weight:var(--fw-semibold); font-size:var(--fs-lead); margin-bottom:10px; }
.ib-hist-historic-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(190px, 1fr)); gap:10px; margin-bottom:10px; }
.ib-hist-historic-grid > div { display:grid; gap:2px; background:var(--panel2); border-radius:var(--r-sm); padding:10px 12px; }
.ib-hist-historic-grid span { font-size:var(--fs-caption); color:var(--muted); }
.ib-hist-historic-grid b { font-size:var(--fs-stat-sm); font-variant-numeric:tabular-nums; }
.ib-hist-historic-grid small { font-size:var(--fs-caption); color:var(--dim); line-height:var(--lh-snug); }
.ib-hist-historic > p { font-size:var(--fs-small); color:var(--muted); line-height:var(--lh-body); margin:0; }
@media (max-width: 640px) {
  .ib-hist-controls { padding:10px 12px; }
  .ib-hist-room { min-width:0; width:100%; }
  .ib-hist-answer { padding:12px 13px; }
  .ib-hist-headline { font-size:var(--fs-lead); }
  .ib-hist-calwrap { padding:10px; }
}
@media (min-width: 900px) { .ib-hist .ib-clim-tiles { grid-template-columns:repeat(4, minmax(0, 1fr)); } }
.ib-hist-answer.is-info { border-left-color:var(--dim); }
/* ── A room's reference climate (D-206) ── */
.ib-ch-ribbon.is-reference { fill:var(--blue); opacity:.18; }
/* The band a salt crossing has to clear (D-224). */
.ib-ch-ribbon.is-salt { fill:var(--amber); opacity:.1; }
.ib-clim-key i.is-band.is-salt { background:var(--amber); opacity:.3; }
.ib-clim-key i.is-band.is-reference { background:var(--blue); }
.ib-hist-refs { display:grid; gap:12px; margin-top:12px; }
.ib-hist-ref { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); padding:14px 16px; }
.ib-hist-ref.is-set { border-color:rgba(52,152,219,.5); background:linear-gradient(0deg, rgba(52,152,219,.05), rgba(52,152,219,.05)), var(--panel); }
.ib-hist-ref.is-set .ib-hist-historic-h .ib-icon { color:var(--blue); }
.ib-hist-ref p { font-size:var(--fs-small); color:var(--muted); line-height:var(--lh-body); margin:0 0 8px; }
.ib-hist-ref .ib-hist-ref-who { color:var(--dim); font-size:var(--fs-caption); }
.ib-hist-ref-row { display:flex; flex-wrap:wrap; gap:10px 14px; align-items:flex-end; }
.ib-hist-ref-row label { display:grid; gap:4px; font-size:var(--fs-caption); color:var(--muted); min-width:min(100%, 320px); }
.ib-hist-ref p.ib-hist-ref-warn { color:var(--amber); display:flex; gap:6px; align-items:flex-start; }
.ib-hist-ref p.ib-hist-ref-warn .ib-icon { flex:none; margin-top:2px; }
/* Forecasts tried on its years, its season ahead (D-207) */
.ib-ch-ribbon.is-ahead { fill:var(--cyan); opacity:.16; }
.ib-ch-ribbon.is-ahead-t { fill:#E0A030; opacity:.18; }
.ib-clim-key i.is-band.is-ahead { background:var(--cyan); }
.ib-clim-key i.is-band.is-ahead-t { background:#E0A030; }
.ib-hist-ahead { display:grid; grid-template-columns:minmax(0, 1fr); gap:12px; }
.ib-hist-ahead .ib-chartgrid { margin:0; }
.ib-hist-ahead-h { display:flex; align-items:center; gap:8px; font-weight:var(--fw-semibold); margin-bottom:6px; }
.ib-hist-ahead .ib-hist-answer p { margin:0; font-size:var(--fs-small); color:var(--muted); line-height:var(--lh-body); }
.ib-hist-answer.is-ok { border-left-color:var(--green); }
.ib-hist-weeks-h { display:flex; align-items:center; gap:8px; font-weight:var(--fw-semibold); }
.ib-hist-weeks-h .ib-icon { color:var(--amber); }
.ib-hist-weeks { display:grid; grid-template-columns:repeat(auto-fill, minmax(96px, 1fr)); gap:6px; }
.ib-hist-week { display:grid; gap:2px; padding:8px 10px; border:1px solid var(--border); border-radius:var(--r-sm); background:var(--panel); }
.ib-hist-week b { font-size:var(--fs-small); font-variant-numeric:tabular-nums; }
.ib-hist-week span, .ib-hist-week small { font-size:var(--fs-caption); color:var(--muted); }
.ib-hist-week.is-warn { background:rgba(243,156,18,var(--a)); border-color:rgba(243,156,18,.45); }
.ib-hist-week.is-bad { background:rgba(255,107,91,var(--a)); border-color:rgba(255,107,91,.5); }
.ib-hist-week.is-warn span, .ib-hist-week.is-bad span { color:var(--text); }
.ib-hist-week.is-none { border-style:dashed; opacity:.7; }
.ib-hist-trial > .ib-chips { margin-bottom:10px; }
.ib-hist-trial .ib-hist-tiles { margin-bottom:12px; }
.ib-hist-trial-t td small { display:block; margin-left:0; white-space:normal; max-width:260px; }
.ib-hist-trial-t td.is-best { background:rgba(46,204,113,.12); font-weight:var(--fw-semibold); }
.ib-hist-trial-t small.is-ok { color:var(--green); }
.ib-hist-trial-t small.is-warn { color:var(--amber); }
.ib-hist-trial-t small.is-bad { color:var(--red); }
.ib-hist-fc { min-width:0; }
/* What to aim for, every reading (D-214) */
.ib-safe-param { display:flex; align-items:center; gap:6px; }
.ib-safe-param .ib-icon { color:var(--cyan); }
.ib-safe-today { display:flex; align-items:center; flex-wrap:wrap; gap:6px; font-size:var(--fs-small); color:var(--muted); margin:2px 0 6px; }
.ib-safe-today b { color:var(--text); }
.ib-safe-clears { display:flex; gap:6px; align-items:flex-start; font-size:var(--fs-caption); color:var(--green); line-height:var(--lh-snug); }
.ib-safe-clears .ib-icon { flex:none; margin-top:1px; }
.ib-safe-limit .ib-safe-arrow { font-weight:var(--fw-semibold); }
.ib-safe-limit .ib-mv-open { align-self:flex-start; }
/* What a change would have done (D-213) */
.ib-hc { display:grid; grid-template-columns:minmax(0, 1fr); gap:12px; }
.ib-hc-presets { gap:6px; }
.ib-hc-form { display:flex; flex-wrap:wrap; align-items:flex-end; gap:10px 12px; padding:12px 14px; background:var(--panel);
  border:1px solid var(--border); border-radius:var(--r-md); }
.ib-hc-form label { display:grid; gap:4px; font-size:var(--fs-caption); color:var(--muted); }
.ib-hc-in { display:inline-flex; align-items:center; gap:4px; }
.ib-hc-in input { width:6em; }
.ib-hc-in em { font-style:normal; color:var(--dim); }
.ib-hc-out { display:grid; gap:12px; min-width:0; }
.ib-hc-out .ib-hist-answer p { margin:0; font-size:var(--fs-small); line-height:var(--lh-body); color:var(--text); }
.ib-hc-tiles { display:grid; grid-template-columns:repeat(auto-fill, minmax(170px, 1fr)); gap:8px; }
.ib-hc-tile { display:grid; gap:4px; padding:10px 12px; background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); }
.ib-hc-tile span { font-size:var(--fs-caption); color:var(--dim); line-height:var(--lh-snug); }
.ib-hc-ba { display:flex; align-items:center; gap:6px; font-variant-numeric:tabular-nums; }
.ib-hc-ba small { color:var(--muted); font-size:var(--fs-small); }
.ib-hc-ba .ib-icon { color:var(--dim); }
.ib-hc-ba b { font-size:var(--fs-stat-sm); color:var(--text); }
.ib-hc-tile em { font-style:normal; font-size:var(--fs-caption); font-weight:var(--fw-semibold); color:var(--muted); }
.ib-hc-tile.is-better { border-color:rgba(46,204,113,.45); }
.ib-hc-tile.is-better em { color:var(--green); }
.ib-hc-tile.is-worse { border-color:rgba(245,165,36,.5); }
.ib-hc-tile.is-worse em { color:#F5A524; }
.ib-hc-eff { margin:0; padding-left:18px; font-size:var(--fs-small); color:var(--muted); display:grid; gap:3px; }
.ib-hc-mbox { padding:12px 14px; }
.ib-hc-months { display:grid; gap:5px; }
.ib-hc-mrow { display:grid; grid-template-columns:76px minmax(0, 1fr) 110px; gap:8px; align-items:center; font-size:var(--fs-caption); color:var(--muted); }
.ib-hc-mrow small { text-align:right; font-variant-numeric:tabular-nums; }
.ib-hc-mbars { position:relative; height:12px; background:var(--panel2); border-radius:var(--r-xs); }
.ib-hc-mbars i { position:absolute; left:0; border-radius:2px; }
.ib-hc-mbars i.is-b { top:0; height:12px; background:rgba(127,140,153,.45); }
.ib-hc-mbars i.is-a { top:3px; height:6px; background:var(--cyan); }
.ib-hc-key-b { background:rgba(127,140,153,.6) !important; opacity:1 !important; }
.ib-hc-key-a { background:var(--cyan) !important; opacity:1 !important; }
/* Several at once: a situation judged whole (D-212) */
.ib-sc { display:grid; grid-template-columns:minmax(0, 1fr); gap:12px; }
.ib-sc-lead { font-size:var(--fs-small); color:var(--muted); line-height:var(--lh-body); }
.ib-sc-presets { display:flex; flex-wrap:wrap; gap:6px; }
.ib-sc-body { display:grid; grid-template-columns:minmax(260px, 340px) minmax(0, 1fr); gap:14px; align-items:start; }
@media (max-width:900px) { .ib-sc-body { grid-template-columns:minmax(0, 1fr); } .ib-sc-result { order:-1; } }
.ib-sc-controls { display:grid; gap:10px; }
.ib-sc-group { margin:0; padding:10px 12px 12px; border:1px solid var(--border); border-radius:var(--r-md); background:var(--panel);
  display:grid; gap:10px; min-width:0; }
.ib-sc-group legend { display:inline-flex; align-items:center; gap:6px; padding:0 4px; font-size:var(--fs-caption);
  font-weight:var(--fw-semibold); color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.ib-sc-group legend .ib-icon { color:var(--cyan); }
.ib-sc-row { display:grid; gap:4px; }
.ib-sc-row-h { display:flex; justify-content:space-between; align-items:baseline; gap:8px; font-size:var(--fs-small); color:var(--text); }
.ib-sc-row-h output { font-variant-numeric:tabular-nums; font-weight:var(--fw-semibold); color:var(--cyan); }
.ib-sc-row input[type=range] { width:100%; accent-color:var(--cyan); }
.ib-sc-row input[type=range]:disabled { opacity:.45; }
.ib-sc-row-f { display:flex; justify-content:space-between; gap:8px; font-size:var(--fs-caption); color:var(--dim); }
.ib-sc-check { display:flex; gap:6px; align-items:flex-start; font-size:var(--fs-caption); color:var(--muted); cursor:pointer; line-height:var(--lh-snug); }
.ib-sc-check input { accent-color:var(--cyan); margin-top:2px; }
.ib-sc-result { display:grid; gap:10px; min-width:0; transition:opacity .15s; }
.ib-sc-result.is-refreshing { opacity:.55; }
.ib-sc-head { display:grid; grid-template-columns:auto auto 1fr; align-items:center; gap:6px 14px; padding:12px 14px;
  background:var(--panel); border:1px solid var(--border); border-left:4px solid var(--green); border-radius:var(--r-md); }
.ib-sc-head.tone-amber { border-left-color:var(--amber); }
.ib-sc-head.tone-red { border-left-color:var(--red); }
.ib-sc-head p { grid-column:1 / -1; margin:0; font-size:var(--fs-small); color:var(--muted); }
/* Today is the stored score (D-233): said under the head, and the lane of what
   the what-if carries as the analysis found it drawn apart. */
.ib-sc-head p.ib-sc-anchor { font-size:var(--fs-caption); color:var(--dim); }
.ib-sc-dim.is-carried { border-style:dashed; background:transparent; }
.ib-sc-dim.is-carried .ib-sc-dim-ic { color:var(--dim); }
.ib-sc-st { display:grid; gap:2px; justify-items:start; }
.ib-sc-st small { font-size:var(--fs-caption); color:var(--dim); }
.ib-sc-st b { font-size:var(--fs-small); color:var(--muted); font-variant-numeric:tabular-nums; }
.ib-sc-st.is-sit b { font-size:var(--fs-lead); color:var(--text); }
.ib-sc-arrow { color:var(--dim); }
.ib-sc-dims { display:grid; gap:6px; }
.ib-sc-dim { display:grid; grid-template-columns:30px minmax(0, 1fr); gap:10px; padding:9px 12px; background:var(--panel);
  border:1px solid var(--border); border-radius:var(--r-md); }
.ib-sc-dim.is-worse { border-color:rgba(245,165,36,.45); }
.ib-sc-dim.is-better { border-color:rgba(46,204,113,.45); }
.ib-sc-dim-ic { display:inline-flex; width:30px; height:30px; align-items:center; justify-content:center; border-radius:50%;
  background:var(--panel2); color:var(--cyan); }
.ib-sc-dim.is-worse .ib-sc-dim-ic { color:#F5A524; }
.ib-sc-dim-body { display:grid; gap:5px; min-width:0; }
.ib-sc-dim-h { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 8px; }
.ib-sc-dim-h small { color:var(--dim); font-size:var(--fs-caption); }
.ib-sc-dim-pts { margin-left:auto; font-size:var(--fs-caption); color:var(--muted); font-variant-numeric:tabular-nums; }
.ib-sc-dim-pts em { font-style:normal; font-weight:var(--fw-semibold); color:#F5A524; }
.ib-sc-dim.is-better .ib-sc-dim-pts em { color:var(--green); }
.ib-sc-bar { position:relative; height:8px; border-radius:var(--r-pill); background:var(--panel2); overflow:hidden; }
.ib-sc-bar i { position:absolute; left:0; top:0; bottom:0; border-radius:var(--r-pill); transition:width .35s var(--ease); }
.ib-sc-bar i.is-today { background:rgba(255,255,255,.18); }
.ib-sc-bar i.is-sit { background:linear-gradient(90deg, #F5A524, #ff6b5b); height:4px; top:2px; }
.ib-sc-dim.is-better .ib-sc-bar i.is-sit { background:var(--green); }
.ib-sc-chips { display:flex; flex-wrap:wrap; gap:4px; }
.ib-sc-chip { padding:1px 8px; border-radius:var(--r-pill); font-size:var(--fs-caption); color:#F5A524; border:1px solid rgba(245,165,36,.35); }
.ib-sc-chip.is-note { color:var(--muted); border-style:dashed; border-color:var(--border); }
.ib-sc-figs { display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:6px; }
.ib-sc-fig { display:grid; gap:1px; padding:8px 10px; background:var(--panel2); border-radius:var(--r-sm); }
.ib-sc-fig span { font-size:var(--fs-caption); color:var(--dim); }
.ib-sc-fig b { font-size:var(--fs-body); font-variant-numeric:tabular-nums; color:var(--text); }
.ib-sc-fig small { font-size:var(--fs-caption); color:var(--dim); }
.ib-sc-fig.is-warn b { color:#F5A524; }
.ib-sc-fig.is-bad b { color:var(--red); }
/* If it comes and stays: when the engine raises each finding (D-216) */
.ib-sc-onset { min-width:0; transition:opacity .15s; }
.ib-sc-onset.is-refreshing { opacity:.55; }
.ib-sc-on { display:grid; gap:10px; padding:14px; background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); }
.ib-sc-on-h { display:flex; gap:10px; align-items:flex-start; }
.ib-sc-on-ic { display:inline-flex; flex:none; width:30px; height:30px; align-items:center; justify-content:center; border-radius:50%;
  background:rgba(0,200,220,.12); color:var(--cyan); }
.ib-sc-on-h b { display:block; font-size:var(--fs-body); color:var(--text); }
.ib-sc-on-h small { display:block; margin-top:2px; font-size:var(--fs-caption); color:var(--muted); line-height:var(--lh-snug); }
.ib-sc-on-key { display:flex; flex-wrap:wrap; gap:4px 14px; font-size:var(--fs-caption); color:var(--dim); }
.ib-sc-on-key i { display:inline-block; width:16px; height:7px; border-radius:3px; margin-right:5px; vertical-align:middle; }
.ib-sc-on-key i.is-open { height:0; border-radius:0; border-top:2px dashed var(--muted); }
.ib-sc-on-chart { display:grid; gap:6px; }
.ib-sc-on-row { display:grid; grid-template-columns:minmax(150px, 28%) minmax(0, 1fr); gap:10px; align-items:center; }
.ib-sc-on-lab { display:flex; align-items:center; gap:6px; min-width:0; font-size:var(--fs-small); color:var(--text); }
.ib-sc-on-lab .ib-icon { flex:none; color:var(--dim); }
.ib-sc-on-lab b { font-weight:var(--fw-semibold); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ib-sc-on-lab em { flex:none; font-style:normal; font-size:var(--fs-caption); color:var(--dim); border:1px dashed var(--border);
  border-radius:var(--r-pill); padding:0 6px; }
.ib-sc-on-lane { position:relative; height:16px; background:var(--panel2); border-radius:var(--r-xs); overflow:hidden; }
.ib-sc-on-row.is-rating .ib-sc-on-lane { height:24px; }
.ib-sc-on-seg { position:absolute; top:3px; bottom:3px; border-radius:3px; }
.ib-sc-on-seg.is-red, .ib-sc-on-key i.is-red { background:#c0392b; }
.ib-sc-on-seg.is-orange, .ib-sc-on-key i.is-orange { background:#ff6b5b; }
.ib-sc-on-seg.is-amber, .ib-sc-on-key i.is-amber { background:#f39c12; }
.ib-sc-on-seg.is-blue, .ib-sc-on-key i.is-blue { background:#3498db; }
.ib-sc-on-seg.is-grey { background:var(--dim); }
.ib-sc-on-seg.is-quiet { opacity:.4; }
.ib-sc-on-gone { position:absolute; top:2px; bottom:2px; width:3px; background:var(--muted); border-radius:2px; }
.ib-sc-on-open { position:absolute; top:7px; height:0; border-top:2px dashed var(--muted); opacity:.75; }
.ib-sc-on-rate { position:absolute; top:0; bottom:0; display:flex; align-items:center; padding:0 7px; overflow:hidden;
  font-size:var(--fs-caption); font-style:normal; font-weight:var(--fw-semibold); white-space:nowrap; border-right:2px solid var(--panel); }
.ib-sc-on-rate.tone-green { background:rgba(46,204,113,.2); color:var(--green); }
.ib-sc-on-rate.tone-amber { background:rgba(245,165,36,.2); color:#F5A524; }
.ib-sc-on-rate.tone-red { background:rgba(255,107,91,.22); color:var(--red); }
.ib-sc-on-rate.tone-grey { background:var(--panel2); color:var(--muted); }
.ib-sc-on-axis { position:relative; height:16px; font-size:var(--fs-caption); color:var(--dim); font-variant-numeric:tabular-nums; }
.ib-sc-on-axis span { position:absolute; top:0; transform:translateX(-50%); white-space:nowrap; }
.ib-sc-on-axis span:first-child { transform:none; }
.ib-sc-on-axis span:last-child { transform:translateX(-100%); }
.ib-sc-on-words { margin:0; padding:0; list-style:none; display:grid; gap:5px; }
.ib-sc-on-words li { display:grid; grid-template-columns:64px minmax(0, 1fr); gap:8px; padding-left:9px; border-left:3px solid var(--border);
  font-size:var(--fs-small); line-height:var(--lh-snug); color:var(--text); }
.ib-sc-on-words li.tone-red { border-left-color:#c0392b; }
.ib-sc-on-words li.tone-orange { border-left-color:#ff6b5b; }
.ib-sc-on-words li.tone-amber { border-left-color:#f39c12; }
.ib-sc-on-words li.tone-blue { border-left-color:#3498db; }
.ib-sc-on-words li.tone-green { border-left-color:var(--green); color:var(--muted); }
.ib-sc-on-when { padding-top:1px; font-size:var(--fs-caption); color:var(--dim); font-variant-numeric:tabular-nums; }
.ib-sc-on-later { margin:0; padding:8px 10px 8px 26px; border:1px dashed var(--border); border-radius:var(--r-sm);
  font-size:var(--fs-caption); color:var(--muted); line-height:var(--lh-snug); }
.ib-sc-on-none { margin:0; font-size:var(--fs-small); color:var(--muted); }
@media (max-width:640px) {
  .ib-sc-on-row { grid-template-columns:minmax(0, 1fr); gap:3px; }
  .ib-sc-on-row.is-axis > span:first-child { display:none; }
  .ib-sc-on-words li { grid-template-columns:52px minmax(0, 1fr); }
}
/* Where a building is (D-230) */
.ib-bloc { display:flex; align-items:center; gap:10px; margin:-4px 0 14px; padding:10px 12px; background:var(--panel);
  border:1px solid var(--border); border-left:3px solid var(--cyan); border-radius:var(--r-md); }
.ib-bloc.is-unset { border-left-color:#F5A524; }
.ib-bloc-ic { display:inline-flex; flex:none; width:30px; height:30px; align-items:center; justify-content:center; border-radius:50%;
  background:rgba(0,200,220,.12); color:var(--cyan); }
.ib-bloc.is-unset .ib-bloc-ic { background:rgba(245,165,36,.12); color:#F5A524; }
.ib-bloc-txt { display:grid; gap:1px; min-width:0; flex:1 1 auto; }
.ib-bloc-txt b { font-size:var(--fs-body); color:var(--text); }
.ib-bloc-txt small { font-size:var(--fs-caption); color:var(--muted); }
.ib-locdlg { max-width:520px; }
.ib-locdlg-now { margin:-4px 0 10px; font-size:var(--fs-small); color:var(--muted); }
.ib-locdlg-find { display:flex; gap:6px; }
.ib-locdlg-find input { flex:1 1 auto; min-width:0; }
.ib-locdlg-results { display:grid; gap:4px; max-height:220px; overflow:auto; margin:-4px 0 4px; }
.ib-locdlg-place { display:grid; gap:1px; text-align:left; padding:7px 10px; background:var(--panel2); border:1px solid var(--border);
  border-radius:var(--r-sm); color:var(--text); cursor:pointer; }
.ib-locdlg-place:hover, .ib-locdlg-place.on { border-color:var(--cyan); }
.ib-locdlg-place small { font-size:var(--fs-caption); color:var(--dim); }
.ib-locdlg-wait { margin:0; font-size:var(--fs-small); color:var(--muted); }
.ib-locdlg-here { justify-self:start; }
.ib-locdlg-coords { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.ib-locdlg-picked { margin:0; font-size:var(--fs-caption); color:var(--cyan); }
.ib-locdlg-devs { margin:0; padding:8px 10px; border:1px solid var(--border); border-radius:var(--r-sm); display:grid; gap:6px; }
.ib-locdlg-devs legend { padding:0 4px; font-size:var(--fs-caption); color:var(--dim); }
.ib-locdlg-devs small { display:block; font-size:var(--fs-caption); color:var(--dim); }
/* Several readings at once (D-228) */
.ib-fm-together { margin-top:10px; }
.ib-fm-drv-lead { margin:0 0 6px; font-size:var(--fs-small); color:var(--text); }
.ib-fm-drvs li.ib-fm-drv { display:grid; grid-template-columns:minmax(120px, 180px) minmax(80px, 1fr) 44px minmax(0, 1.4fr); align-items:center; gap:8px; }
.ib-fm-drv-bar { position:relative; height:8px; border-radius:var(--r-pill); background:var(--panel2); overflow:hidden; }
.ib-fm-drv-bar i { position:absolute; left:0; top:0; bottom:0; border-radius:var(--r-pill); background:linear-gradient(90deg, #FFB347, #FF8C42); }
.ib-fm-drv-pct { font-variant-numeric:tabular-nums; color:#FFB347; font-size:var(--fs-small); }
.ib-fm-together li.ib-fm-grp { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; }
.ib-fm-grp span:first-child { color:var(--text); font-size:var(--fs-small); }
.ib-rel-leg i.spoke { display:inline-block; width:16px; height:4px; border-radius:2px; background:rgba(255,170,60,0.85); margin-right:5px; vertical-align:middle; }
.ib-rel-leg i.group { display:inline-block; width:14px; height:10px; border:1px dashed rgba(178,132,255,0.7); background:rgba(178,132,255,0.12); margin-right:5px; vertical-align:middle; }
@media (max-width:640px) {
  .ib-fm-drvs li.ib-fm-drv { grid-template-columns:minmax(0, 1fr) 44px; }
  .ib-fm-drv-bar, .ib-fm-drvs li.ib-fm-drv .ib-fm-rel-what { grid-column:1 / -1; }
}
/* What its reporting interval lets the engine see (D-223) */
.ib-rr { margin-top:14px; }
.ib-rr .ib-h2 { display:flex; align-items:center; gap:8px; }
.ib-rr .ib-h2 .ib-icon { color:var(--cyan); }
.ib-rr-lead { margin:0 0 10px; font-size:var(--fs-small); color:var(--muted); line-height:var(--lh-body); }
.ib-rr-lead b { color:var(--text); font-weight:var(--fw-semibold); }
.ib-rr-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(300px, 1fr)); gap:10px; }
.ib-rr-col { display:grid; gap:4px; align-content:start; padding:10px 12px; background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); }
.ib-rr-col h4 { margin:0 0 4px; font-size:var(--fs-caption); font-weight:var(--fw-semibold); color:var(--dim); text-transform:uppercase; letter-spacing:var(--ls-caps); }
.ib-rr-row { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:5px 0; border-top:1px solid var(--border); }
.ib-rr-row:first-of-type { border-top:0; }
.ib-rr-row > span:first-child { display:grid; gap:1px; font-size:var(--fs-small); color:var(--text); min-width:0; }
.ib-rr-row small { font-size:var(--fs-caption); color:var(--dim); }
.ib-rr-late { font-size:var(--fs-caption); color:var(--green); white-space:nowrap; }
.ib-rr-late.is-late { color:#F5A524; }
.ib-adm-fleet td .ib-pill { white-space:nowrap; }
/* Does the engine catch it? (D-222) */
.ib-pe { display:grid; gap:10px; }
.ib-pe-out { display:grid; gap:10px; }
.ib-pe-lead { margin:0; font-size:var(--fs-small); color:var(--text); }
.ib-pe-list { display:grid; gap:6px; }
.ib-pe-ev { display:grid; grid-template-columns:32px minmax(0, 1fr) auto; align-items:center; gap:10px; padding:10px 12px;
  background:var(--panel); border:1px solid var(--border); border-left:3px solid var(--border); border-radius:var(--r-md); }
.ib-pe-ev.tone-green { border-left-color:var(--green); }
.ib-pe-ev.tone-amber { border-left-color:#F5A524; }
.ib-pe-ev.tone-red { border-left-color:var(--red); }
.ib-pe-ev.is-off { opacity:.75; grid-template-columns:32px minmax(0, 1fr); }
.ib-pe-ic { display:inline-flex; width:32px; height:32px; align-items:center; justify-content:center; border-radius:50%;
  background:var(--panel2); color:var(--cyan); }
.ib-pe-body { display:grid; gap:2px; min-width:0; }
.ib-pe-body b { font-size:var(--fs-small); color:var(--text); }
.ib-pe-body small { font-size:var(--fs-caption); color:var(--dim); line-height:var(--lh-snug); }
.ib-pe-body .ib-pe-why { color:var(--muted); }
.ib-pe-score { display:grid; gap:4px; justify-items:end; text-align:right; }
.ib-pe-score small { font-size:var(--fs-caption); color:var(--muted); }
.ib-pe-dots { display:inline-flex; gap:4px; }
.ib-pe-dot { display:inline-block; width:10px; height:10px; border-radius:50%; background:var(--panel2); border:1px solid var(--border); }
.ib-pe-dot.is-caught { background:var(--green); border-color:var(--green); }
.ib-pe-dot.is-missed { background:transparent; border:2px solid var(--red); }
.ib-pe-dot.is-already { background:var(--dim); border-color:var(--dim); }
.ib-pe-key { display:flex; flex-wrap:wrap; gap:4px 14px; font-size:var(--fs-caption); color:var(--dim); }
.ib-pe-key i { margin-right:5px; vertical-align:middle; }
@media (max-width:640px) {
  .ib-pe-ev { grid-template-columns:32px minmax(0, 1fr); }
  .ib-pe-score { grid-column:1 / -1; justify-items:start; text-align:left; }
}
/* What was done, and what it did (D-221) */
.ib-ivs > .ib-h2-note { display:block; margin:-4px 0 10px; }
.ib-ivs .ib-extbody { display:grid; gap:10px; }
.ib-iv-list { display:grid; gap:10px; }
.ib-iv { display:grid; gap:10px; padding:12px 14px; background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); }
.ib-iv-head { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 10px; }
.ib-iv-head b { font-size:var(--fs-body); color:var(--text); }
.ib-iv-head small { font-size:var(--fs-caption); color:var(--dim); }
.ib-iv-acts { margin-left:auto; display:inline-flex; gap:4px; }
.ib-iv-note { margin:0; font-size:var(--fs-small); color:var(--muted); overflow-wrap:anywhere; }
.ib-iv-wait { margin:0; display:flex; align-items:center; gap:6px; font-size:var(--fs-small); color:var(--muted); }
.ib-iv-verdict { display:grid; gap:6px; padding:10px 12px; background:var(--panel2); border-radius:var(--r-sm); }
.ib-iv-verdict p { margin:0; font-size:var(--fs-small); color:var(--text); line-height:var(--lh-snug); }
.ib-iv-rts { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; }
.ib-iv-rt { display:grid; gap:2px; justify-items:start; min-width:120px; }
.ib-iv-rt small { font-size:var(--fs-caption); color:var(--dim); }
.ib-iv-rt b { font-size:var(--fs-small); color:var(--text); font-variant-numeric:tabular-nums; }
.ib-iv-rt em { font-style:normal; font-size:var(--fs-caption); color:var(--muted); max-width:220px; }
.ib-iv-arrow { color:var(--dim); }
.ib-iv-tiles { display:grid; grid-template-columns:repeat(auto-fill, minmax(170px, 1fr)); gap:6px; }
.ib-iv-tile { display:grid; gap:1px; padding:8px 10px; border:1px solid var(--border); border-radius:var(--r-sm); }
.ib-iv-tile span { font-size:var(--fs-caption); color:var(--dim); }
.ib-iv-tile b { display:flex; align-items:center; gap:3px; font-size:var(--fs-body); color:var(--text); font-variant-numeric:tabular-nums; }
.ib-iv-tile b small { font-size:var(--fs-caption); color:var(--dim); font-weight:normal; }
.ib-iv-tile > small { font-size:var(--fs-caption); color:var(--dim); }
.ib-iv-tile.is-moved { border-color:rgba(0,200,220,.45); }
.ib-iv-tile.is-moved > small { color:var(--cyan); font-weight:var(--fw-semibold); }
.ib-iv-out { margin:0; display:flex; align-items:center; gap:6px; font-size:var(--fs-small); color:var(--muted); }
.ib-iv-out.is-moved { color:#F5A524; }
.ib-iv-foot { font-size:var(--fs-caption); color:var(--dim); line-height:var(--lh-snug); }
/* A wall's surface, measured (D-220) */
.ib-sfc > .ib-h2-note { display:block; margin:-4px 0 10px; }
.ib-sfc .ib-extbody { display:grid; gap:10px; }
.ib-sfc-verdict { display:flex; gap:10px; align-items:flex-start; padding:12px 14px; background:var(--panel);
  border:1px solid var(--border); border-left:3px solid var(--dim); border-radius:var(--r-md); }
.ib-sfc-verdict.is-measured { border-left-color:var(--green); }
.ib-sfc-verdict b { display:block; font-size:var(--fs-body); color:var(--text); }
.ib-sfc-verdict small { display:block; margin-top:2px; font-size:var(--fs-caption); color:var(--muted); line-height:var(--lh-snug); }
.ib-sfc-ic { display:inline-flex; flex:none; width:30px; height:30px; align-items:center; justify-content:center; border-radius:50%;
  background:var(--panel2); color:var(--dim); }
.ib-sfc-verdict.is-measured .ib-sfc-ic { background:rgba(46,204,113,.15); color:var(--green); }
.ib-sfc-scale { display:grid; gap:4px; padding:22px 14px 8px; background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); }
.ib-sfc-scale > small { margin-top:14px; font-size:var(--fs-caption); color:var(--dim); }
.ib-sfc-axis { position:relative; height:30px; margin:0 6px; border-bottom:1px solid var(--border); }
.ib-sfc-tick { position:absolute; bottom:-4px; width:1px; height:6px; background:var(--border); font-style:normal; }
.ib-sfc-tick span { position:absolute; top:8px; transform:translateX(-50%); font-size:var(--fs-caption); color:var(--dim); }
.ib-sfc-dot { position:absolute; bottom:6px; width:10px; height:10px; margin-left:-5px; border-radius:50%;
  background:var(--cyan); opacity:.8; border:2px solid var(--panel); }
.ib-sfc-guess, .ib-sfc-own { position:absolute; top:-14px; bottom:0; width:0; border-left:2px dashed var(--muted); }
.ib-sfc-own { border-left:3px solid var(--green); }
.ib-sfc-own.is-waiting { border-left-style:dashed; border-left-color:var(--cyan); }
.ib-sfc-guess span, .ib-sfc-own span { position:absolute; top:-6px; left:4px; font-size:var(--fs-caption); font-weight:var(--fw-semibold);
  color:var(--muted); white-space:nowrap; }
.ib-sfc-own span { color:var(--green); }
.ib-sfc-list { display:grid; gap:6px; }
.ib-sfc-item { display:grid; grid-template-columns:72px minmax(0, 1fr) auto; align-items:center; gap:10px; padding:8px 12px;
  background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); }
.ib-sfc-diff { font-size:var(--fs-lead); font-weight:var(--fw-semibold); color:var(--cyan); font-variant-numeric:tabular-nums; }
.ib-sfc-body { display:grid; gap:1px; min-width:0; }
.ib-sfc-body b { font-size:var(--fs-small); color:var(--text); }
.ib-sfc-body small { font-size:var(--fs-caption); color:var(--dim); overflow-wrap:anywhere; }
.ib-sfc-body .ib-sfc-note { color:var(--muted); }
/* What if, across the building (D-218) */
.ib-bw { display:grid; gap:12px; }
.ib-bw-own { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:8px 16px; padding:10px 12px;
  border:1px solid var(--border); border-radius:var(--r-md); background:var(--panel); }
.ib-bw-own[hidden] { display:none; }
.ib-bw-own label:not(.ib-sc-check) { display:grid; grid-template-columns:auto minmax(0, 1fr) auto; align-items:center; gap:8px;
  font-size:var(--fs-small); color:var(--text); }
.ib-bw-own input[type=range] { width:100%; accent-color:var(--cyan); }
.ib-bw-own input[type=range]:disabled { opacity:.45; }
.ib-bw-own output { min-width:52px; text-align:right; font-variant-numeric:tabular-nums; font-weight:var(--fw-semibold); color:var(--cyan); }
.ib-bw-result { display:grid; gap:10px; min-width:0; transition:opacity .15s; }
.ib-bw-result.is-refreshing { opacity:.55; }
.ib-bw-shifts { display:grid; gap:6px; }
.ib-bw-shift { display:grid; grid-template-columns:120px minmax(0, 1fr) 70px; align-items:center; gap:10px; font-size:var(--fs-caption); color:var(--dim); }
.ib-bw-bar { display:flex; gap:2px; height:24px; border-radius:var(--r-xs); overflow:hidden; background:var(--panel2); }
.ib-bw-seg { display:flex; align-items:center; min-width:0; padding:0 8px; overflow:hidden; white-space:nowrap;
  font-style:normal; font-size:var(--fs-caption); font-weight:var(--fw-semibold); }
.ib-bw-seg.tone-green { background:rgba(46,204,113,.22); color:var(--green); }
.ib-bw-seg.tone-amber { background:rgba(245,165,36,.22); color:#F5A524; }
.ib-bw-seg.tone-red { background:rgba(255,107,91,.24); color:var(--red); }
.ib-bw-seg.tone-grey { background:var(--panel2); color:var(--muted); }
.ib-bw-list { display:grid; gap:6px; }
.ib-bw-row { display:grid; grid-template-columns:minmax(160px, 1.3fr) 190px minmax(150px, 1fr) minmax(160px, 1.4fr); align-items:center;
  gap:8px 14px; padding:10px 12px; background:var(--panel); border:1px solid var(--border); border-left:3px solid var(--border);
  border-radius:var(--r-md); color:inherit; text-decoration:none; }
a.ib-bw-row:hover { border-color:rgba(0,200,220,.45); }
.ib-bw-row.is-worse { border-left-color:#F5A524; }
.ib-bw-row.is-better { border-left-color:var(--green); }
.ib-bw-row.is-off { grid-template-columns:minmax(160px, 1.3fr) minmax(0, 3fr); opacity:.75; }
.ib-bw-where { display:grid; gap:1px; min-width:0; }
.ib-bw-where b { font-size:var(--fs-small); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ib-bw-where small { font-size:var(--fs-caption); color:var(--dim); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ib-bw-st { display:inline-flex; align-items:center; gap:4px; color:var(--dim); }
.ib-bw-risk { display:grid; gap:3px; min-width:0; }
.ib-bw-meter { position:relative; height:8px; border-radius:var(--r-pill); background:var(--panel2); overflow:hidden; }
.ib-bw-meter i { position:absolute; left:0; top:0; bottom:0; border-radius:var(--r-pill); }
.ib-bw-meter i.is-today { background:rgba(255,255,255,.18); }
.ib-bw-meter i.is-sit { top:2px; height:4px; background:linear-gradient(90deg, #F5A524, #ff6b5b); }
.ib-bw-row.is-better .ib-bw-meter i.is-sit { background:var(--green); }
.ib-bw-risk small { font-size:var(--fs-caption); color:var(--muted); font-variant-numeric:tabular-nums; }
.ib-bw-risk em { font-style:normal; font-weight:var(--fw-semibold); color:#F5A524; }
.ib-bw-row.is-better .ib-bw-risk em { color:var(--green); }
.ib-bw-dim { display:flex; flex-wrap:wrap; align-items:center; gap:4px 6px; min-width:0; font-size:var(--fs-small); }
.ib-bw-dim .ib-icon { color:var(--cyan); }
.ib-bw-dim small { font-size:var(--fs-caption); color:var(--dim); }
.ib-sc-chip.is-gone { color:var(--green); border-color:rgba(46,204,113,.35); }
.ib-bw-why { font-size:var(--fs-caption); color:var(--muted); }
@media (max-width:760px) {
  .ib-bw-row { grid-template-columns:minmax(0, 1fr) auto; }
  .ib-bw-risk, .ib-bw-dim, .ib-bw-why { grid-column:1 / -1; }
  .ib-bw-shift { grid-template-columns:76px minmax(0, 1fr); }
  .ib-bw-shift small:last-child { display:none; }
}
/* A day of it (D-217) */
.ib-sc-on-h > div:nth-child(2) { flex:1 1 auto; min-width:0; }
.ib-sc-on-views { display:flex; flex:none; gap:4px; flex-wrap:wrap; }
.ib-sc-day { display:grid; gap:10px; min-width:0; }
.ib-sc-day-lead { margin:0; font-size:var(--fs-small); color:var(--text); line-height:var(--lh-body); }
.ib-sc-day-key { display:flex; flex-direction:column; align-items:flex-start; gap:4px; font-size:var(--fs-caption); color:var(--dim); }
.ib-sc-on-row.is-chart { align-items:stretch; }
.ib-sc-on-row.is-chart .ib-sc-day-key { justify-content:center; }
.ib-sc-day-key i { display:inline-block; width:16px; height:3px; border-radius:2px; margin-right:5px; vertical-align:middle; }
.ib-sc-day-key i.is-room { background:var(--cyan); }
.ib-sc-day-key i.is-surf { background:#f39c12; }
.ib-sc-day-chart { position:relative; height:190px; background:var(--panel2); border-radius:var(--r-sm); overflow:hidden; }
.ib-sc-day-chart svg { position:absolute; inset:0; width:100%; height:100%; }
.ib-sc-day-settle { fill:rgba(255,255,255,.04); }
.ib-sc-day-ref { stroke-width:1; stroke-dasharray:5 4; }
.ib-sc-day-ref.is-room { stroke:rgba(0,200,220,.55); }
.ib-sc-day-ref.is-surf { stroke:rgba(243,156,18,.6); }
.ib-sc-day-ref.is-wet { stroke:rgba(255,107,91,.75); }
.ib-sc-day-room { fill:none; stroke:var(--cyan); stroke-width:2; }
.ib-sc-day-surf { fill:none; stroke:#f39c12; stroke-width:2; }
.ib-sc-day-reflbl { position:absolute; right:6px; transform:translateY(-110%); font-size:var(--fs-caption); color:var(--muted);
  background:rgba(0,0,0,.25); padding:0 5px; border-radius:var(--r-xs); white-space:nowrap; }
.ib-sc-day-reflbl.is-wet { color:var(--red); }
.ib-sc-day-reflbl.is-below { transform:translateY(10%); }
.ib-sc-day-reflbl { max-width:calc(100% - 12px); overflow:hidden; text-overflow:ellipsis; }
.ib-sc-day-settlelbl { position:absolute; left:0; bottom:4px; text-align:center; font-size:var(--fs-caption); color:var(--dim); }
.ib-sc-day-wet { position:absolute; top:4px; transform:translateX(-50%); font-size:var(--fs-caption); color:var(--cyan); white-space:nowrap; }
.ib-sc-day-cards { display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); gap:8px; }
.ib-sc-day-card { display:grid; gap:3px; padding:10px 12px; background:var(--panel2); border-radius:var(--r-sm); border-left:3px solid var(--border); }
.ib-sc-day-card.is-red { border-left-color:#c0392b; }
.ib-sc-day-card.is-orange { border-left-color:#ff6b5b; }
.ib-sc-day-card.is-amber { border-left-color:#f39c12; }
.ib-sc-day-card.is-blue { border-left-color:#3498db; }
.ib-sc-day-card-h { display:flex; align-items:center; gap:6px; font-size:var(--fs-small); color:var(--text); }
.ib-sc-day-card-h .ib-icon { color:var(--dim); flex:none; }
.ib-sc-day-hrs { font-size:var(--fs-lead); font-weight:var(--fw-semibold); color:var(--text); font-variant-numeric:tabular-nums; }
.ib-sc-day-hrs small { font-size:var(--fs-caption); font-weight:normal; color:var(--dim); }
.ib-sc-day-card small { font-size:var(--fs-caption); color:var(--muted); line-height:var(--lh-snug); }
.ib-sc-day-card .ib-sc-day-alert { color:var(--dim); }
@media (max-width:640px) {
  .ib-sc-on-h { flex-wrap:wrap; }
  .ib-sc-on-views { width:100%; }
  .ib-sc-day-chart { height:160px; }
  .ib-sc-on-row.is-chart .ib-sc-day-key { flex-direction:row; flex-wrap:wrap; gap:4px 14px; }
  .ib-sc-on-axis.is-clock span:nth-child(even) { display:none; }
}
/* Inspections against the engine (D-210) */
.ib-ck { display:grid; grid-template-columns:minmax(0, 1fr); gap:12px; }
.ib-ck .ib-hist-tiles { margin:0; }
.ib-ck-lead { margin:0; }
.ib-ck-tl { background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); padding:18px 14px 10px; display:grid; gap:6px; }
.ib-ck-track { position:relative; height:26px; border-radius:var(--r-xs); background:var(--panel2); }
.ib-ck-watched { position:absolute; top:10px; height:6px; background:rgba(0,200,220,.18); border-radius:3px; }
.ib-ck-run { position:absolute; top:6px; height:14px; background:rgba(243,156,18,.75); border-radius:2px; }
.ib-ck-mark { position:absolute; top:-9px; transform:translateX(-50%); display:inline-flex; align-items:center; justify-content:center;
  width:20px; height:20px; border-radius:50%; border:2px solid var(--panel); color:#fff; cursor:default; z-index:1; }
.ib-ck-mark.tone-green { background:var(--green); }
.ib-ck-mark.tone-amber { background:var(--amber); }
.ib-ck-mark.tone-red { background:var(--red); }
.ib-ck-mark.tone-grey { background:var(--dim); }
.ib-ck-mark.is-found { border-radius:4px; }
.ib-ck-axis { position:relative; height:16px; }
.ib-ck-axis span { position:absolute; font-size:var(--fs-caption); color:var(--dim); white-space:nowrap; }
.ib-ck-key-run { background:rgba(243,156,18,.75) !important; opacity:1 !important; }
.ib-ck-key-watched { background:rgba(0,200,220,.35) !important; opacity:1 !important; }
.ib-ck-table td small { display:block; margin-left:0; white-space:normal; }
.ib-ck-table td.ib-ck-said { white-space:normal; min-width:280px; color:var(--muted); font-size:var(--fs-small); }
.ib-wallcond-bar { display:flex; flex-wrap:wrap; gap:8px; }
/* Try a change yourself: every lever (D-209) */
.ib-wi-levers { flex:1 1 100%; display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:8px; }
.ib-wi-nj-host { flex:1 1 320px; min-width:0; }
.ib-wi-nj-host:empty { display:none; }
.ib-wi-lever { display:grid; gap:3px; text-align:left; padding:10px 12px; border-radius:var(--r-md); cursor:pointer;
  background:var(--panel); border:1px solid var(--border); color:var(--text); font-family:inherit;
  transition:border-color .15s, background .15s, transform .15s; }
.ib-wi-lever:hover:not(.is-off) { border-color:rgba(0,200,220,.45); transform:translateY(-1px); }
.ib-wi-lever:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
.ib-wi-lever.is-on { border-color:var(--cyan); background:linear-gradient(0deg, rgba(0,200,220,.10), rgba(0,200,220,.10)), var(--panel);
  box-shadow:0 0 0 1px rgba(0,200,220,.35) inset; }
.ib-wi-lever.is-off { cursor:not-allowed; border-style:dashed; opacity:.62; }
.ib-wi-lever-top { display:flex; align-items:center; justify-content:space-between; gap:6px; }
.ib-wi-lever-ic { display:inline-flex; width:26px; height:26px; align-items:center; justify-content:center; border-radius:50%;
  background:var(--panel2); color:var(--cyan); }
.ib-wi-lever.is-on .ib-wi-lever-ic { background:rgba(0,200,220,.18); }
.ib-wi-lever-tag { font-size:var(--fs-caption); color:var(--dim); text-transform:none; letter-spacing:.02em; }
.ib-wi-lever-name { font-size:var(--fs-body); }
.ib-wi-lever-now { font-size:var(--fs-small); color:var(--muted); font-variant-numeric:tabular-nums; min-height:1.2em; }
.ib-wi-lever-tells { font-size:var(--fs-caption); color:var(--dim); line-height:var(--lh-snug); }
/* Several at once (D-212): a row of its own, above the single readings. */
.ib-wi-lever.is-wide { grid-column:1 / -1; grid-template-columns:auto auto minmax(0, 1fr); align-items:center; gap:4px 12px;
  padding:12px 14px; background:linear-gradient(90deg, rgba(0,200,220,.08), transparent 60%), var(--panel); }
.ib-wi-lever.is-wide .ib-wi-lever-top { grid-row:1 / span 2; }
.ib-wi-lever.is-wide .ib-wi-lever-tag { display:none; }
.ib-wi-lever.is-wide .ib-wi-lever-ic { width:34px; height:34px; }
.ib-wi-lever.is-wide .ib-wi-lever-name { font-size:var(--fs-lead); grid-column:2; }
.ib-wi-lever.is-wide .ib-wi-lever-now { display:none; }
.ib-wi-lever.is-wide .ib-wi-lever-tells { grid-column:2 / -1; font-size:var(--fs-small); color:var(--muted); }
.ib-wi-nj { margin:0 0 10px; font-size:var(--fs-small); color:var(--muted); }
.ib-wi-nj summary { cursor:pointer; display:inline-flex; align-items:center; gap:6px; color:var(--muted); }
.ib-wi-nj ul { margin:8px 0 6px; padding-left:18px; display:grid; gap:6px; }
.ib-wi-nj li b { margin-right:6px; color:var(--text); }
.ib-wi-nj li span:last-child { display:block; color:var(--muted); line-height:var(--lh-body); }
.ib-wi-shift { display:inline-flex; align-items:center; gap:6px; font-size:var(--fs-small); color:var(--muted); cursor:pointer; }
.ib-wi-range .ib-wi-shift input { width:auto; padding:0; accent-color:var(--cyan); }
.ib-wi-shift[hidden] { display:none; }
.ib-wi-lanebar.is-note { opacity:.55; stroke:var(--muted); stroke-dasharray:3 2; }
.ib-wi-key-lane.is-note { opacity:.55; }
.ib-wi-mline.lv-mark { stroke:var(--blue); stroke-dasharray:4 3; }
.ib-wi-mlabel.lv-mark { fill:var(--blue); }
@media (max-width:600px) { .ib-wi-levers { grid-template-columns:repeat(2, minmax(0, 1fr)); } }
/* The engine on its years (D-208) */
.ib-rp-card, .ib-rp { display:grid; grid-template-columns:minmax(0, 1fr); gap:12px; }
.ib-rp .ib-hist-answer p { margin:0 0 6px; font-size:var(--fs-small); color:var(--muted); line-height:var(--lh-body); }
.ib-rp .ib-hist-answer p:last-child { margin-bottom:0; }
.ib-rp .ib-hist-tiles { margin:0; }
.ib-rp .ib-chartgrid { margin:0; }
.ib-rp-bar { height:8px; border-radius:var(--r-pill); background:var(--panel2); overflow:hidden; margin:4px 0 8px; }
.ib-rp-bar i { display:block; height:100%; background:var(--cyan); transition:width .4s; }
.ib-rp-tl { display:grid; gap:6px; background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); padding:12px 14px; }
.ib-rp-row { display:grid; grid-template-columns:minmax(90px, 200px) minmax(0, 1fr) 70px; gap:10px; align-items:center; }
.ib-rp-name { font-size:var(--fs-small); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ib-rp-n { font-size:var(--fs-caption); color:var(--muted); text-align:right; }
.ib-rp-track { position:relative; height:14px; border-radius:var(--r-xs); background:var(--panel2); }
.ib-rp-track i { position:absolute; top:0; bottom:0; border-radius:2px; opacity:.9; }
.ib-rp-track i.is-kept { opacity:.28; }
.ib-clim-key i.is-line.is-kept { background:var(--muted); opacity:.4; }
.ib-rp-track.is-axis { background:none; height:16px; }
.ib-rp-track.is-axis span { position:absolute; top:0; font-size:var(--fs-caption); color:var(--dim); white-space:nowrap; }
.ib-rp-axis { margin-top:2px; }
.ib-rp-sev { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; vertical-align:middle; }
.ib-rp-seen { display:flex; flex-wrap:wrap; gap:6px; align-items:center; font-size:var(--fs-small); color:var(--muted); }
.ib-rp-seen > span:first-child { margin-right:4px; }
.ib-rp-foot { display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between; }
@media (max-width:600px) {
  .ib-rp-row { grid-template-columns:minmax(0, 1fr); gap:3px; }
  .ib-rp-n { text-align:left; }
}

/* ── Buildings (D-248) ──
   Laid out as AI Insights (D-244): one header row (the title and what it is,
   beside the page's tools), the list's counts as one band of figures, and on
   a building the status in a column beside the page on a wide screen and
   above it on a narrow one. Sections are parted by a rule, not each boxed. */
.ib-bpage .ib-back { margin-bottom:6px; }
.ib-bh-top { display:flex; align-items:center; flex-wrap:wrap; gap:10px 18px; margin:2px 0 16px; }
.ib-bh-titles { flex:1 1 300px; min-width:0; }
.ib-bh-top .ib-page-title { margin:0; overflow-wrap:anywhere; }
.ib-bh-meta { margin-top:4px; color:var(--muted); font-size:var(--fs-caption); line-height:var(--lh-snug); }
.ib-bh-meta:empty { display:none; }
.ib-bh-tools { flex:0 1 auto; display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-left:auto; }
.ib-bh-tools:empty { display:none; }
.ib-bh-more { position:relative; }
.ib-bh-more > summary { display:inline-flex; align-items:center; gap:4px; }
.ib-menu-sep { height:1px; margin:4px 6px; background:var(--border); }
.ib-menu-item.is-danger { color:var(--red); }
.ib-menu-item.is-danger:hover, .ib-menu-item.is-danger:focus-visible { background:rgba(255,107,91,.1); }
.ib-bh-search { display:flex; align-items:center; gap:6px; flex:none; width:240px; max-width:100%; min-width:0; height:32px; padding:0 10px;
  background:var(--bg2); border:1px solid var(--border); border-radius:var(--r-sm); color:var(--dim); }
.ib-bh-search:focus-within { border-color:var(--cyan); }
.ib-bh-search input { flex:1 1 auto; min-width:0; padding:0; background:none; border:0; outline:none;
  color:var(--text); font:inherit; font-size:var(--fs-body); }
.ib-bh-search[hidden], .ib-seg[hidden] { display:none; }
.ib-seg { display:inline-flex; padding:2px; background:var(--bg2); border:1px solid var(--border); border-radius:var(--r-sm); }
.ib-seg-b { padding:5px 12px; border:0; border-radius:7px; background:none; color:var(--muted); font:inherit;
  font-size:var(--fs-small); font-weight:var(--fw-semibold); cursor:pointer; }
.ib-seg-b:hover { color:var(--text); }
.ib-seg-b[aria-pressed="true"] { background:var(--panel2); color:var(--text); box-shadow:0 1px 2px rgba(0,0,0,.3); }
.ib-seg-b:focus-visible { outline:2px solid var(--cyan); outline-offset:1px; }
.ib-t-red { color:var(--red); }
.ib-t-amber { color:var(--amber); }
.ib-t-green { color:var(--green); }
.ib-t-grey { color:var(--dim); }

/* The list's counts: one band, a count that narrows the list a button. */
.ib-bsum { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); margin-bottom:14px; overflow:hidden;
  background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); }
.ib-bsum-f { display:grid; grid-template-columns:auto minmax(0, 1fr); grid-template-areas:"v l" "v s"; column-gap:12px;
  align-items:center; padding:12px 16px; border:0; border-left:1px solid var(--border); background:none;
  color:var(--text); font:inherit; text-align:left; text-decoration:none; }
.ib-bsum-f:first-child { border-left:0; }
.ib-bsum-f b { grid-area:v; font-size:var(--fs-stat); font-weight:var(--fw-bold); line-height:1; font-variant-numeric:tabular-nums; }
.ib-bsum-f span { grid-area:l; align-self:end; font-size:var(--fs-small); font-weight:var(--fw-semibold); }
.ib-bsum-f small { grid-area:s; align-self:start; font-size:var(--fs-caption); line-height:var(--lh-snug); color:var(--dim); }
.ib-bsum-f.is-action { cursor:pointer; transition:background var(--dur-fast) var(--ease); }
.ib-bsum-f.is-action:hover { background:rgba(255,255,255,.035); }
.ib-bsum-f.is-action small { color:var(--cyan); }
.ib-bsum-f.is-on { background:rgba(0,200,220,.08); box-shadow:inset 0 -2px 0 var(--cyan); }
.ib-bsum-f:focus-visible { outline:2px solid var(--cyan); outline-offset:-2px; }
.ib-blist-bar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 14px;
  margin:0 0 10px; color:var(--muted); font-size:var(--fs-small); }
.ib-blist-count b { color:var(--text); font-weight:var(--fw-semibold); }
.ib-blist-count .ib-lib-link { margin-left:8px; }
.ib-blist-sort { display:inline-flex; align-items:center; gap:8px; color:var(--dim); font-size:var(--fs-caption); }
.ib-blist-sort .ib-select { width:auto; background:var(--panel); }
.ib-blist-sort[hidden] { display:none; }

/* A building's card: its rating on the left edge, its devices as dots. */
.ib-bcards { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:12px; }
.ib-bcard { --tone:var(--border); display:flex; flex-direction:column; gap:4px; min-width:0; padding:14px 16px 12px 18px;
  background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); box-shadow:inset 3px 0 0 var(--tone);
  color:var(--text); text-decoration:none; transition:border-color var(--dur) var(--ease); }
.ib-bcard:hover { border-color:rgba(0,200,220,.4); }
.ib-bcard:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
.ib-bcard.is-red { --tone:var(--red); }
.ib-bcard.is-amber { --tone:var(--amber); }
.ib-bcard.is-green { --tone:var(--green); }
.ib-bcard.is-empty { background:transparent; border-style:dashed; }
.ib-bcard-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.ib-bcard-name { min-width:0; font-size:var(--fs-lead); font-weight:var(--fw-semibold); line-height:var(--lh-tight); overflow-wrap:anywhere; }
.ib-bcard-head .ib-pill { flex:none; white-space:nowrap; }
.ib-bcard-place { color:var(--muted); font-size:var(--fs-caption); }
.ib-bcard-body { display:flex; align-items:center; gap:16px; margin-top:10px; }
.ib-bcard-health { display:flex; flex-direction:column; align-items:flex-start; min-width:46px; }
.ib-bcard-health b { font-size:var(--fs-stat); font-weight:var(--fw-bold); line-height:1; font-variant-numeric:tabular-nums; }
.ib-bcard-health span { margin-top:4px; font-size:var(--fs-micro); color:var(--dim); text-transform:uppercase; letter-spacing:var(--ls-caps); }
.ib-bcard-devs { display:flex; flex-direction:column; gap:6px; min-width:0; }
.ib-bcard-dots { display:flex; flex-wrap:wrap; align-items:center; gap:4px; }
.ib-bcard-dots i { width:9px; height:9px; border-radius:50%; color:var(--dim); background:currentColor; }
.ib-bcard-dots i.is-green { color:var(--green); }
.ib-bcard-dots i.is-amber { color:var(--amber); }
.ib-bcard-dots i.is-red { color:var(--red); }
.ib-bcard-dots i.is-off { background:transparent; box-shadow:inset 0 0 0 1.5px currentColor; }
.ib-bcard-dots em { font-style:normal; font-size:var(--fs-micro); color:var(--dim); }
.ib-bcard-facts { font-size:var(--fs-small); color:var(--muted); }
.ib-bcard-foot { margin-top:8px; padding-top:8px; border-top:1px solid var(--border); font-size:var(--fs-caption); color:var(--dim); }
.ib-bcard-foot.is-quiet { color:var(--amber); }
.ib-bldlist td small, .ib-bdevlist td small { display:block; margin-top:1px; font-size:var(--fs-micro); }
/* The devices list beside the status column: tighter cells, one line where
   the value is short. */
.ib-bdevlist th, .ib-bdevlist td { padding:9px 10px; }
.ib-bdevlist th:first-child, .ib-bdevlist td:first-child { padding-left:14px; }
.ib-bdevlist .c-id { min-width:150px; }
.ib-bdevlist .c-floor, .ib-bdevlist .c-health, .ib-bdevlist .c-risk, .ib-bdevlist .c-live,
.ib-bdevlist .c-alerts, .ib-bdevlist .c-status, .ib-bdevlist th { white-space:nowrap; }
.ib-bdevlist .c-main { min-width:120px; }
/* The floor drawing in the narrower page column: the middle of a floor takes
   the room its devices need before the sides do, so names are not cut. */
.ib-bdetail .ib-fl-slab { grid-template-columns:minmax(0, 1fr) fit-content(58%) minmax(0, 1fr); }

/* A building: the page, and where things stand beside it. */
.ib-bd { display:flex; flex-direction:column; gap:18px; }
.ib-bd > .ib-bside { order:-1; }
.ib-bd-main { min-width:0; }
.ib-bd.is-wide { display:grid; grid-template-columns:minmax(0, 1fr) clamp(280px, 28%, 340px);
  grid-template-areas:"main side"; gap:24px; align-items:start; }
.ib-bd.is-wide > .ib-bd-main { grid-area:main; }
.ib-bd.is-wide > .ib-bside { grid-area:side; order:0; }
.ib-bside { --tone:var(--dim); min-width:0; padding:16px; background:var(--panel); border:1px solid var(--border);
  border-radius:var(--r-lg); box-shadow:inset 0 3px 0 var(--tone); }
.ib-bside:has(.ib-bv-good) { --tone:var(--green); }
.ib-bside:has(.ib-bv-warn) { --tone:var(--amber); }
.ib-bside:has(.ib-bv-crit) { --tone:var(--red); }
.ib-bside:has(.ib-bv-info) { --tone:var(--cyan); }
.ib-bv-k, .ib-bside-h { font-size:var(--fs-micro); font-weight:var(--fw-semibold); letter-spacing:var(--ls-caps);
  text-transform:uppercase; color:var(--dim); }
.ib-bv-k { margin-bottom:8px; }
.ib-bv-head { display:flex; flex-direction:column; align-items:flex-start; gap:8px; }
.ib-bv-title { font-size:var(--fs-lead); font-weight:var(--fw-semibold); line-height:var(--lh-snug); }
.ib-bv-sub { margin:6px 0 0; color:var(--muted); font-size:var(--fs-small); line-height:var(--lh-body); }
.ib-bv-figs { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:6px; margin-top:14px; }
.ib-bv-fig { display:flex; flex-direction:column; min-width:0; padding:9px 10px; border-radius:var(--r-sm); background:rgba(255,255,255,.035); }
.ib-bv-fig b { font-size:var(--fs-stat-sm); font-weight:var(--fw-bold); line-height:1.1; font-variant-numeric:tabular-nums; }
.ib-bv-fig span { margin-top:4px; font-size:var(--fs-caption); font-weight:var(--fw-semibold); }
.ib-bv-fig small { margin-top:2px; font-size:var(--fs-micro); color:var(--dim); line-height:1.35; overflow-wrap:anywhere; }
.ib-bv .ib-fleet-note { margin-top:10px; font-size:var(--fs-caption); }
.ib-bside-sect { margin-top:16px; padding-top:14px; border-top:1px solid var(--border); }
.ib-bside-h { display:flex; justify-content:space-between; align-items:baseline; gap:8px; margin-bottom:8px; }
.ib-bside-h span + span { text-transform:none; letter-spacing:0; font-weight:var(--fw-medium); }
.ib-bside-note { margin:0; font-size:var(--fs-caption); color:var(--dim); line-height:var(--lh-snug); }
.ib-brows { list-style:none; margin:0 -8px; padding:0; display:flex; flex-direction:column; gap:1px; }
.ib-brow { width:100%; display:flex; align-items:center; gap:10px; padding:7px 8px; border:0; border-radius:var(--r-sm);
  background:none; color:var(--text); font:inherit; text-align:left; cursor:pointer; transition:background var(--dur-fast) var(--ease); }
.ib-brow:hover { background:rgba(255,255,255,.045); }
.ib-brow:focus-visible { outline:2px solid var(--cyan); outline-offset:-2px; }
.ib-brow-dot { flex:none; width:8px; height:8px; border-radius:50%; }
.ib-brow-dot.is-live { background:var(--green); box-shadow:0 0 0 3px rgba(46,204,113,.14); }
.ib-brow-dot.is-off { border:1.5px solid var(--dim); }
.ib-brow-name { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:1px; }
.ib-brow-name b, .ib-brow-name small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ib-brow-name b { font-size:var(--fs-small); font-weight:var(--fw-semibold); }
.ib-brow-name small { font-size:var(--fs-micro); color:var(--dim); }
.ib-brow-al { flex:none; display:inline-flex; align-items:center; gap:2px; color:var(--red); font-size:var(--fs-caption); }
.ib-brow-h { flex:none; min-width:28px; text-align:right; font-size:var(--fs-lead); font-weight:var(--fw-bold); font-variant-numeric:tabular-nums; }
.ib-brow-h.is-green { color:var(--green); }
.ib-brow-h.is-amber { color:var(--amber); }
.ib-brow-h.is-red { color:var(--red); }
.ib-brow-h.is-grey { color:var(--muted); }
.ib-brow-h.is-stale { opacity:.8; }
.ib-bside-all { margin-top:6px; }
.ib-bd:not(.is-wide) .ib-brows li:nth-child(n+4) { display:none; }
.ib-bside .ib-bloc { margin:0; padding:0; flex-wrap:wrap; align-items:flex-start; background:none; border:0; }
.ib-bside .ib-bloc [data-loc] { margin-left:40px; }
.ib-bside .ib-chart { padding:0; background:none; border:0; }
.ib-bsec + .ib-bsec { margin-top:28px; padding-top:22px; border-top:1px solid var(--border); }
.ib-bsec > .ib-h2-row { margin:0 0 12px; }
.ib-bsec-own .ib-library > .ib-h2:first-child, .ib-bsec-own .ib-matlines-sec > .ib-h2:first-child { margin-top:0; }
.ib-bquiet { display:flex; align-items:center; gap:6px; margin:10px 0 0; color:var(--muted); font-size:var(--fs-small); }
.ib-bquiet svg { flex:none; color:var(--green); }
.ib-bsec .ib-hotspots { margin-bottom:12px; }
/* The documents' assistant note and search set display, which would
   otherwise beat [hidden]: both showed with nothing kept. */
.ib-lib-ai-note[hidden], .ib-lib-search[hidden] { display:none; }
.ib-lib-empty { display:flex; align-items:center; flex-wrap:wrap; gap:10px 12px; padding:12px 14px;
  border:1px dashed var(--border); border-radius:var(--r-md); color:var(--dim); }
.ib-lib-empty > div { flex:1 1 260px; display:flex; flex-direction:column; gap:2px; min-width:0; }
.ib-lib-empty b { color:var(--text); font-size:var(--fs-small); font-weight:var(--fw-semibold); }
.ib-lib-empty small { font-size:var(--fs-caption); line-height:var(--lh-snug); }

@media (max-width:600px) {
  .ib-bh-top { gap:10px; margin-bottom:12px; }
  .ib-bh-tools { width:100%; margin-left:0; }
  .ib-bh-search { flex:1 1 100%; width:auto; height:44px; }
  .ib-bdetail .ib-bh-tools { display:grid; grid-template-columns:1fr 1fr; }
  .ib-bdetail .ib-bh-tools > .ib-btn, .ib-bh-more > summary { justify-content:center; }
  .ib-bh-more > summary { width:100%; }
  .ib-bh-more .ib-menu-list { right:0; max-width:calc(100vw - 28px); }
  .ib-bsum { grid-template-columns:1fr 1fr; }
  .ib-bsum-f { padding:10px 12px; }
  .ib-bsum-f:nth-child(3) { border-left:0; }
  .ib-bsum-f:nth-child(n+3) { border-top:1px solid var(--border); }
  .ib-bsum-f b { font-size:var(--fs-stat-sm); }
  .ib-bpage .ib-fl-building { gap:14px; }
  .ib-bcards { grid-template-columns:minmax(0, 1fr); }
  .ib-bd > .ib-bside { padding:14px; }
  /* Touch targets of 44 px on a phone. */
  .ib-bpage .ib-btn-sm, .ib-bpage .ib-seg-b, .ib-bpage .ib-chip, .ib-bpage .ib-lib-chip, .ib-bpage .ib-lib-link,
  .ib-bpage .ib-fl-dev, .ib-bpage .ib-fl-planbtn, .ib-bpage .ib-blist-sort .ib-select, .ib-bpage .ib-about > summary,
  .ib-bpage .ib-bsum-f, .ib-brow { min-height:44px; }
  .ib-bh-more .ib-menu-item { min-height:44px; }
  .ib-bpage .ib-info, .ib-bpage .ib-fp-dev { position:relative; }
  .ib-bpage .ib-info::after { content:""; position:absolute; inset:-13px; }
  /* A device on a floor plan stays the size the plan draws it; its touch
     area reaches 44 px around it. */
  .ib-bpage .ib-fp-dev::after { content:""; position:absolute; inset:-10px -3px; }
  /* The building table and its devices as a card a row, as on Devices (D-202). */
  .ib-table.ib-bdevlist, .ib-table.ib-bldlist { display:block; overflow:visible; background:none; border:0; border-radius:0; }
  .ib-bdevlist thead, .ib-bldlist thead { display:none; }
  .ib-bdevlist tbody, .ib-bldlist tbody { display:flex; flex-direction:column; gap:8px; }
  .ib-bdevlist tr, .ib-bldlist tr { display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:5px 12px; align-items:center;
    padding:12px 14px; background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); }
  .ib-bdevlist tr { grid-template-areas:"id status" "main health" "live alerts"; }
  .ib-bldlist tr { grid-template-areas:"id status" "name health" "devs alerts"; }
  .ib-bdevlist td, .ib-bldlist td { display:block; padding:0; border:0; min-width:0; }
  .ib-bdevlist .c-id, .ib-bldlist .c-id { grid-area:id; overflow-wrap:anywhere; }
  .ib-bdevlist .c-status, .ib-bldlist .c-status { grid-area:status; justify-self:end; white-space:nowrap; }
  .ib-bdevlist .c-main { grid-area:main; font-size:var(--fs-small); }
  .ib-bldlist .c-name { grid-area:name; color:var(--muted); font-size:var(--fs-small); }
  .ib-bldlist .c-devs { grid-area:devs; font-size:var(--fs-small); }
  .ib-bdevlist .c-health, .ib-bldlist .c-health { grid-area:health; justify-self:end; font-size:var(--fs-small); }
  .ib-bdevlist .c-live { grid-area:live; font-size:var(--fs-small); }
  .ib-bdevlist .c-alerts, .ib-bldlist .c-alerts { grid-area:alerts; justify-self:end; font-size:var(--fs-small); }
  .ib-bdevlist .c-health::before, .ib-bdevlist .c-alerts::before, .ib-bdevlist .c-live::before,
  .ib-bldlist .c-health::before, .ib-bldlist .c-alerts::before { content:attr(data-l) " "; color:var(--dim); }
  .ib-bdevlist .c-floor, .ib-bdevlist .c-or, .ib-bdevlist .c-mat, .ib-bdevlist .c-risk, .ib-bldlist .c-mat { display:none; }
}

/* ── The building in 3D (D-249) ──
   Plain SVG: the walls in front floor by floor, hatched where no device
   measures, a strip of colour around each device, the roof, and the devices
   on their walls (faint on a wall turned away). */
.ib-bsec > .ib-h2-row .ib-bview { margin-left:auto; }
.ib-b3 { display:flex; flex-direction:column; gap:10px; }
.ib-b3-bar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 12px; }
.ib-b3-turn { display:inline-flex; align-items:center; gap:6px; }
.ib-b3-seen { min-width:150px; text-align:center; color:var(--muted); font-size:var(--fs-caption); }
.ib-b3-tools { display:flex; flex-wrap:wrap; gap:8px; }
.ib-b3-tools .ib-btn.is-on { border-color:var(--cyan); color:var(--cyan); background:rgba(0,200,220,.08); }
.ib-b3-placebar { display:flex; align-items:center; flex-wrap:wrap; gap:8px 14px; padding:8px 12px;
  border:1px dashed rgba(0,200,220,.45); border-radius:var(--r-sm); background:rgba(0,200,220,.06);
  color:var(--muted); font-size:var(--fs-small); }
.ib-b3-placebar label { display:inline-flex; align-items:center; gap:8px; color:var(--text); }
.ib-b3-placebar .ib-select { width:auto; max-width:100%; background:var(--panel); }
.ib-b3-svg { display:block; width:100%; height:auto; max-height:560px; background:var(--panel);
  border:1px solid var(--border); border-radius:var(--r-md); touch-action:manipulation; }
.ib-b3-ground { fill:rgba(255,255,255,.03); stroke:rgba(255,255,255,.12); stroke-width:1; stroke-dasharray:4 4; pointer-events:none; }
.ib-b3-groundline { fill:none; stroke:rgba(255,255,255,.35); stroke-width:1.4; pointer-events:none; }
.ib-b3-wall { stroke:#5b7896; stroke-width:1; stroke-linejoin:round; }
.ib-b3-wall.is-lit { fill:#31465d; }
.ib-b3-wall.is-shade { fill:#243649; }
.ib-b3-wall.is-below { fill-opacity:.45; stroke-dasharray:4 3; stroke-opacity:.7; }
.ib-b3-svg.is-placing .ib-b3-wall { opacity:.55; }
.ib-b3-svg.is-placing .ib-b3-wall.is-target { opacity:1; stroke:var(--cyan); stroke-width:2.5; cursor:crosshair; }
.ib-b3-svg.is-placing .ib-b3-dev:not(.is-placing) { opacity:.3; }
.ib-b3-svg.is-placing .ib-b3-dev { pointer-events:none; }
.ib-b3-hatch { fill:url(#ib-b3-hatch); pointer-events:none; }
.ib-b3-hatch.is-below { opacity:.6; }
#ib-b3-hatch line { stroke:rgba(200,215,230,.2); stroke-width:1.3; }
.ib-b3-patch { stroke:none; pointer-events:none; }
.ib-b3-patch.is-green { fill:rgba(46,204,113,.28); }
.ib-b3-patch.is-amber { fill:rgba(243,156,18,.32); }
.ib-b3-patch.is-red { fill:rgba(255,107,91,.38); }
.ib-b3-patch.is-grey { fill:rgba(150,160,170,.18); }
.ib-b3-patch.is-stale { opacity:.5; }
.ib-b3-roof { fill:#3d5570; stroke:#6f8cab; stroke-width:1; stroke-linejoin:round; pointer-events:none; }
.ib-b3-floor { fill:#c9d6e3; stroke:#243649; stroke-linejoin:round; paint-order:stroke; pointer-events:none; }
.ib-b3-north { pointer-events:none; }
.ib-b3-north line { stroke:var(--cyan); }
.ib-b3-north circle { fill:var(--cyan); }
.ib-b3-north text { fill:var(--cyan); font-weight:var(--fw-bold); }
.ib-b3-dev { cursor:pointer; outline:none; }
.ib-b3-hit { fill:transparent; }
.ib-b3-dot { fill:var(--dim); stroke:#0d1a28; transition:stroke var(--dur-fast) var(--ease); }
.ib-b3-dev.is-green .ib-b3-dot { fill:var(--green); }
.ib-b3-dev.is-amber .ib-b3-dot { fill:var(--amber); }
.ib-b3-dev.is-red .ib-b3-dot { fill:var(--red); }
.ib-b3-num { fill:#0d1a28; font-weight:var(--fw-bold); pointer-events:none; font-variant-numeric:tabular-nums; }
.ib-b3-dev.is-stale .ib-b3-dot { fill-opacity:.55; stroke-dasharray:3 2; stroke:var(--muted); }
.ib-b3-dev:hover .ib-b3-dot, .ib-b3-dev:focus-visible .ib-b3-dot, .ib-b3-dev.is-on .ib-b3-dot,
.ib-b3-dev.is-placing .ib-b3-dot { stroke:var(--cyan); stroke-dasharray:none; }
.ib-b3-ring { fill:none; stroke:var(--red); pointer-events:none; }
@media (prefers-reduced-motion:no-preference) {
  .ib-b3-dev:not(.is-stale) .ib-b3-ring { animation:ib-b3-pulse 1.8s var(--ease-out) infinite; }
}
@keyframes ib-b3-pulse { 0% { opacity:.9; } 70% { opacity:.15; } 100% { opacity:.9; } }
.ib-b3-legend i.ib-b3-key-hatch { border-radius:2px;
  background:repeating-linear-gradient(45deg, rgba(200,215,230,.45) 0 1px, transparent 1px 4px); }
.ib-b3-note { margin:0; }
.ib-b3-off { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.ib-b3-off > span { margin-right:4px; font-size:var(--fs-micro); font-weight:var(--fw-semibold); letter-spacing:var(--ls-caps);
  text-transform:uppercase; color:var(--dim); }
.ib-b3-off small { color:var(--dim); font-weight:var(--fw-regular); }
.ib-b3-behind { display:inline-flex; align-items:center; gap:6px; }
.ib-b3-behind i { width:8px; height:8px; border-radius:50%; background:var(--dim); }
.ib-b3-behind.is-green i { background:var(--green); }
.ib-b3-behind.is-amber i { background:var(--amber); }
.ib-b3-behind.is-red i { background:var(--red); }
@media (max-width:600px) {
  .ib-bsec > .ib-h2-row .ib-bview { margin-left:0; flex-basis:100%; }
  .ib-bview .ib-seg-b { flex:1 1 0; }
  .ib-b3-seen { min-width:0; flex:1 1 auto; }
  .ib-b3-turn { width:100%; }
  .ib-b3-tools { width:100%; }
  .ib-b3-tools .ib-btn { flex:1 1 0; justify-content:center; }
}

/* ── The building in 3D over time, in a what-if, under the sky (D-250) ── */
.ib-b3-show { display:flex; align-items:center; flex-wrap:wrap; gap:8px 14px; }
.ib-b3-show > label { display:inline-flex; align-items:center; gap:8px; color:var(--dim); font-size:var(--fs-caption); }
.ib-b3-show .ib-select { width:auto; max-width:100%; background:var(--panel); }
.ib-b3-time { display:flex; align-items:center; gap:10px; flex:1 1 320px; min-width:0; }
.ib-b3-time input[type=range] { flex:1 1 auto; min-width:120px; accent-color:var(--cyan); }
.ib-b3-clock { min-width:128px; color:var(--text); font-size:var(--fs-small); font-variant-numeric:tabular-nums; }
.ib-b3-when { margin:8px 2px 0; color:var(--muted); font-size:var(--fs-small); line-height:var(--lh-snug); }
.ib-b3-when.is-whatif { color:var(--text); }
.ib-b3-credit { color:var(--dim); white-space:nowrap; }
.ib-b3-credit:hover { color:var(--cyan); }
.ib-b3-sun line { stroke:#fac775; stroke-linecap:round; }
.ib-b3-sun circle { fill:#fac775; stroke:#ef9f27; }
.ib-b3-sunlit { fill:#fac775; stroke:none; pointer-events:none; }
.ib-b3-wind { stroke:#85b7eb; fill:none; stroke-linecap:round; opacity:.9; pointer-events:none; }
.ib-b3-wind.is-behind { opacity:.55; stroke-dasharray:6 5; }
.ib-b3-sun.is-clouded { opacity:.35; }
#ib-b3-arrow path { fill:#85b7eb; }
.ib-b3-rain { stroke:#85b7eb; stroke-linecap:round; opacity:.75; pointer-events:none; }
.ib-b3-change { font-weight:var(--fw-bold); pointer-events:none; }
.ib-b3-dev.is-worse .ib-b3-change { fill:var(--red); }
.ib-b3-dev.is-better .ib-b3-change { fill:var(--green); }
.ib-b3-legend i.ib-b3-key-sun { background:rgba(250,199,117,.55); border-radius:2px; }
.ib-b3-legend b.ib-b3-key-worse, .ib-b3-legend b.ib-b3-key-better { margin-right:6px; font-size:11px; }
.ib-b3-legend b.ib-b3-key-worse { color:var(--red); }
.ib-b3-legend b.ib-b3-key-better { color:var(--green); }
@media (max-width:600px) {
  .ib-b3-show > label { width:100%; }
  .ib-b3-show .ib-select { flex:1 1 auto; min-height:44px; }
  .ib-b3-time { flex-basis:100%; flex-wrap:wrap; }
  .ib-b3-time input[type=range] { flex-basis:100%; order:3; min-height:44px; }
  .ib-b3-clock { min-width:0; flex:1 1 auto; }
}
@media (prefers-reduced-motion:no-preference) {
  .ib-b3-scene .ib-b3-dot, .ib-b3-scene .ib-b3-patch { transition:fill .25s var(--ease); }
}

/* ── Devices pinned on photos of the building (D-252) ── */
.ib-ph { display:flex; flex-direction:column; gap:10px; }
.ib-ph-pick { display:flex; flex-wrap:wrap; gap:6px; }
.ib-ph-bar { display:flex; align-items:center; flex-wrap:wrap; gap:8px 14px; color:var(--muted); font-size:var(--fs-small); }
.ib-ph-bar .ib-btn.is-on { border-color:var(--cyan); color:var(--cyan); background:rgba(0,200,220,.08); }
.ib-ph-bar label { display:inline-flex; align-items:center; gap:8px; color:var(--text); }
.ib-ph-bar .ib-select { width:auto; max-width:100%; background:var(--panel); }
.ib-ph-stage { position:relative; align-self:flex-start; max-width:100%; line-height:0;
  border:1px solid var(--border); border-radius:var(--r-md); overflow:hidden; background:var(--panel); }
.ib-ph-stage img { display:block; max-width:100%; max-height:560px; width:auto; height:auto; min-height:120px; }
.ib-ph-stage.is-pinning { cursor:crosshair; outline:2px dashed rgba(0,200,220,.55); outline-offset:-2px; }
.ib-ph-pin { position:absolute; transform:translate(-50%, -50%); display:inline-flex; align-items:center; gap:6px;
  padding:0; border:0; background:none; color:var(--text); font:inherit; line-height:1.2; cursor:pointer; }
.ib-ph-stage.is-pinning .ib-ph-pin { pointer-events:none; opacity:.55; }
.ib-ph-stage.is-pinning .ib-ph-pin.is-pinning { opacity:1; }
.ib-ph-dot { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:var(--dim);
  border:2px solid #0d1a28; color:#0d1a28; font-size:11px; font-weight:var(--fw-bold); font-variant-numeric:tabular-nums;
  box-shadow:0 2px 8px rgba(0,0,0,.45); }
.ib-ph-pin.is-green .ib-ph-dot { background:var(--green); }
.ib-ph-pin.is-amber .ib-ph-dot { background:var(--amber); }
.ib-ph-pin.is-red .ib-ph-dot { background:var(--red); }
.ib-ph-pin.is-stale .ib-ph-dot { opacity:.6; border-style:dashed; border-color:var(--muted); }
.ib-ph-pin:hover .ib-ph-dot, .ib-ph-pin:focus-visible .ib-ph-dot, .ib-ph-pin.is-on .ib-ph-dot { border-color:var(--cyan); }
.ib-ph-pin:focus-visible { outline:none; }
.ib-ph-name { position:absolute; left:34px; top:50%; transform:translateY(-50%); white-space:nowrap; padding:2px 7px;
  border-radius:var(--r-pill); background:rgba(13,26,40,.82); font-size:var(--fs-caption); }
.ib-ph-ring { position:absolute; left:-5px; top:50%; width:38px; height:38px; margin-top:-19px; border-radius:50%;
  border:2px solid var(--red); pointer-events:none; }
@media (prefers-reduced-motion:no-preference) { .ib-ph-ring { animation:ib-b3-pulse 1.8s var(--ease-out) infinite; } }
.ib-ph-cap { margin:0; color:var(--muted); font-size:var(--fs-small); line-height:var(--lh-snug); }
.ib-ph-cap b { color:var(--text); }
@media (max-width:600px) {
  .ib-ph-name { display:none; }
  .ib-ph-pin:focus-visible .ib-ph-name, .ib-ph-pin.is-on .ib-ph-name { display:block; }
  .ib-ph-dot { width:30px; height:30px; }
  .ib-ph-pin::after { content:""; position:absolute; left:-8px; top:-8px; width:46px; height:46px; }
  .ib-ph-bar label { width:100%; }
  .ib-ph-bar .ib-select { flex:1 1 auto; min-height:44px; }
}

/* ── Present mode: one building full screen (D-254) ──
   The page's own type sizes, grown with the screen, so the same verdict,
   rows and drawing read across a meeting room or a lobby. */
body.ib-presenting { overflow:hidden; }
.ib-present { position:fixed; inset:0; z-index:90; display:flex; flex-direction:column; gap:clamp(10px, 1.4vw, 22px);
  padding:clamp(12px, 2vw, 32px); background:var(--bg); color:var(--text); overflow:hidden;
  --fs-micro:clamp(11px, .78vw, 15px); --fs-caption:clamp(12px, .86vw, 17px); --fs-small:clamp(12px, .9vw, 18px);
  --fs-body:clamp(13px, .95vw, 19px); --fs-lead:clamp(15px, 1.25vw, 25px); --fs-stat-sm:clamp(20px, 1.8vw, 36px); }
.ib-present-head { display:flex; align-items:center; flex-wrap:wrap; gap:8px 20px; }
.ib-present-name { flex:1 1 260px; min-width:0; display:flex; flex-direction:column; gap:2px; }
.ib-present-name b { font-size:clamp(20px, 2.1vw, 40px); font-weight:var(--fw-bold); line-height:1.15; overflow-wrap:anywhere; }
.ib-present-name small { color:var(--muted); font-size:var(--fs-body); }
.ib-present-clock { color:var(--muted); font-size:var(--fs-lead); font-variant-numeric:tabular-nums; }
.ib-present-tools { display:flex; gap:8px; transition:opacity var(--dur) var(--ease); }
.ib-present-tools .ib-btn { min-height:44px; }
.ib-present-body { flex:1 1 auto; min-height:0; display:grid; grid-template-columns:minmax(0, 1fr) clamp(300px, 27vw, 520px);
  grid-template-rows:minmax(0, 1fr); gap:clamp(12px, 1.6vw, 28px); }
.ib-present-draw { min-width:0; min-height:0; display:flex; flex-direction:column; }
.ib-present-draw .ib-b3 { flex:1 1 auto; min-height:0; }
.ib-present-draw .ib-b3-scene { flex:1 1 auto; min-height:0; display:flex; flex-direction:column; }
.ib-present-draw .ib-b3-svg { flex:1 1 0; min-height:220px; height:auto; max-height:none; }
.ib-b3-seen-top { margin:0; min-width:0; text-align:left; font-size:var(--fs-small); }
.ib-present-side { min-width:0; min-height:0; overflow-y:auto; }
.ib-present-side .ib-bside { min-height:100%; box-sizing:border-box; }
.ib-present-side .ib-brow-h { min-width:40px; }
.ib-present-foot { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 18px; color:var(--dim); font-size:var(--fs-caption); }
.ib-present-foot .is-error { color:var(--amber); }
.ib-present-brand { margin-left:auto; font-weight:var(--fw-semibold); letter-spacing:var(--ls-caps); color:var(--muted); }
.ib-present.is-idle, .ib-present.is-idle * { cursor:none; }
.ib-present.is-idle .ib-present-tools:not(:focus-within) { opacity:0; }
@media (max-width:900px), (max-height:520px) {
  .ib-present { overflow-y:auto; }
  .ib-present-body { display:flex; flex-direction:column; flex:none; }
  .ib-present-draw .ib-b3-svg { flex:none; height:auto; min-height:0; }
  .ib-present-side { overflow:visible; }
  .ib-present-brand { margin-left:0; }
}

/* ── The building's own 3D model, devices pinned on it (D-256) ──
   The photo pins' look (D-252), over a model turned by hand. */
.ib-md { display:flex; flex-direction:column; gap:10px; }
.ib-md-stage { position:relative; height:clamp(320px, 52vh, 560px); border:1px solid var(--border); border-radius:var(--r-md);
  overflow:hidden; background:radial-gradient(ellipse at 50% 30%, #1f3247 0%, var(--panel) 70%); touch-action:none; }
.ib-md-canvas, .ib-md-canvas canvas { position:absolute; inset:0; width:100%; height:100%; display:block; }
.ib-md-canvas canvas { cursor:grab; }
.ib-md-canvas canvas:active { cursor:grabbing; }
.ib-md-stage.is-pinning .ib-md-canvas canvas { cursor:crosshair; }
.ib-md-stage.is-pinning { outline:2px dashed rgba(0,200,220,.55); outline-offset:-2px; }
.ib-md-pins { position:absolute; inset:0; pointer-events:none; }
.ib-md-pins .ib-ph-pin { pointer-events:auto; }
.ib-md-pins [hidden] { display:none; }
/* A pin the model hides stays where it is, marked as inside or behind (D-285). */
.ib-md-pins .ib-ph-pin.is-behind .ib-ph-dot { opacity:.8; border:2px dashed #fff; box-shadow:0 0 0 3px rgba(13,26,40,.55); }
.ib-md-pins .ib-ph-pin.is-behind .ib-ph-name { display:none; }
.ib-md-pins .ib-ph-pin.is-found .ib-ph-dot { border-color:var(--cyan); border-style:solid; opacity:1; }
@media (prefers-reduced-motion:no-preference) {
  .ib-md-pins .ib-ph-pin.is-found .ib-ph-dot { animation:ib-md-found 0.8s ease-out 3; }
}
@keyframes ib-md-found { 0% { box-shadow:0 0 0 0 rgba(0,200,220,.75); } 100% { box-shadow:0 0 0 18px rgba(0,200,220,0); } }
.ib-md-tools { display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; margin:6px 0 8px; }
.ib-md-tools .ib-btn.is-on { border-color:var(--cyan); color:var(--cyan); }
@media (max-width:600px) { .ib-md-tools .ib-btn { min-height:40px; } }
.ib-md-stage.is-pinning .ib-md-pins .ib-ph-pin { pointer-events:none; opacity:.55; }
.ib-md-stage.is-pinning .ib-md-pins .ib-ph-pin.is-pinning { opacity:1; }
.ib-md-status { position:absolute; left:50%; top:50%; transform:translate(-50%, -50%); margin:0; max-width:80%;
  color:var(--muted); font-size:var(--fs-small); text-align:center; }
.ib-md-status:empty, .ib-md-status[hidden] { display:none; }
/* ── On the model (D-289): floors on a rail, the view's controls in a bar,
   a compass, cards and a hint over it, full screen ── */
.ib-md-stage:focus-visible { outline:2px solid var(--cyan); outline-offset:-2px; }
.ib-md-rail { position:absolute; left:10px; top:10px; bottom:10px; display:flex; flex-direction:column; pointer-events:none; z-index:3; }
.ib-md-rail-in { display:flex; flex-direction:column; gap:3px; max-height:100%; overflow-y:auto; scrollbar-width:none; pointer-events:auto;
  padding:3px; border-radius:10px; background:rgba(13,26,40,.62); border:1px solid rgba(255,255,255,.08); }
.ib-md-rail-in button, .ib-md-ctl button { display:grid; place-items:center; width:40px; min-height:36px; padding:3px 0; border:1px solid transparent;
  border-radius:8px; background:transparent; color:#c9d6e2; font:inherit; cursor:pointer; flex:none; }
.ib-md-rail-in button b { font-size:var(--fs-small); font-variant-numeric:tabular-nums; line-height:1; }
.ib-md-rail-in button span { display:flex; gap:2px; margin-top:3px; }
.ib-md-rail-in button span i { width:5px; height:5px; border-radius:50%; background:var(--dim); }
.ib-md-rail-in button span i.is-green { background:var(--green); } .ib-md-rail-in button span i.is-amber { background:var(--amber); }
.ib-md-rail-in button span i.is-red { background:var(--red); }
.ib-md-rail-in button:hover, .ib-md-ctl button:hover { background:rgba(255,255,255,.08); color:#fff; }
.ib-md-rail-in button.is-on, .ib-md-ctl button.is-on { background:rgba(0,200,220,.2); border-color:var(--cyan); color:#fff; }
.ib-md-rail-in button:focus-visible, .ib-md-ctl button:focus-visible, .ib-md-compass:focus-visible { outline:2px solid var(--cyan); outline-offset:1px; }
.ib-md-ctl { position:absolute; right:10px; top:10px; display:flex; flex-direction:column; gap:3px; padding:3px; z-index:3;
  border-radius:10px; background:rgba(13,26,40,.62); border:1px solid rgba(255,255,255,.08); }
.ib-md-ctl button { height:40px; }
@media (max-height:700px) { .ib-md-ctl button { height:34px; min-height:34px; } }
/* Live conditions on the model (D-298): the line over it, the sky behind it */
.ib-md-live { position:absolute; top:10px; left:66px; right:66px; z-index:3; display:flex; flex-direction:column; align-items:center;
  gap:6px; pointer-events:none; }
.ib-md-live[hidden] { display:none; }
.ib-md-live [data-lvwx] { display:contents; }
.ib-md-lv-bar, .ib-md-lv-wx { pointer-events:auto; display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:4px 6px;
  max-width:100%; padding:4px 6px; border-radius:10px; background:rgba(13,26,40,.74); border:1px solid rgba(255,255,255,.08);
  box-shadow:0 4px 14px rgba(0,0,0,.22); }
.ib-md-lv-modes { background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.08); }
.ib-md-lv-modes .ib-seg-b { padding:4px 10px; font-size:var(--fs-caption); }
.ib-md-lv-play { display:grid; place-items:center; width:30px; height:28px; padding:0; border:1px solid rgba(255,214,107,.5); border-radius:8px;
  background:rgba(255,214,107,.12); color:#ffd66b; cursor:pointer; }
.ib-md-lv-play:hover { background:rgba(255,214,107,.22); }
.ib-md-lv-play:focus-visible, .ib-md-lv-range:focus-visible { outline:2px solid var(--cyan); outline-offset:1px; }
.ib-md-lv-range { width:clamp(110px, 24vw, 300px); margin:0 2px; accent-color:#ffd66b; cursor:pointer; }
.ib-md-lv-c { display:inline-flex; align-items:center; gap:5px; padding:2px 6px; color:#c9d6e2; font-size:var(--fs-caption); white-space:nowrap; }
.ib-md-lv-c b { color:var(--text); font-weight:var(--fw-semibold); font-variant-numeric:tabular-nums; }
.ib-md-lv-c.is-time { color:#ffd66b; }
.ib-md-lv-c.is-time.is-night { color:#b9c7ff; }
.ib-md-lv-k { padding-left:4px; color:var(--dim); font-size:var(--fs-micro); text-transform:uppercase; letter-spacing:.5px; }
.ib-md-lv-credit { padding-right:4px; color:var(--dim); font-size:var(--fs-micro); text-decoration:underline; text-underline-offset:2px; }
.ib-md-lv-credit:hover { color:var(--text); }
.ib-md-lv-why { pointer-events:auto; margin:0; padding:4px 10px; border-radius:8px; background:rgba(13,26,40,.74); color:var(--muted);
  font-size:var(--fs-caption); }
/* The wind and the rain marked (D-306): mint wind, blue rain, as drawn on the model */
.ib-md-stage { --wx-wind:#7cf2cc; --wx-rain:#4f9dff; --wx-snow:#f4f8ff; }
.ib-md-wxtags { position:absolute; left:66px; bottom:12px; max-width:calc(100% - 140px); display:flex; flex-direction:column;
  align-items:flex-start; gap:6px; pointer-events:none; }
.ib-md-wxtags:empty { display:none; }
.ib-md-wxtag { display:inline-flex; flex-wrap:wrap; align-items:center; gap:1px 5px; max-width:340px;
  padding:3px 9px 3px 7px; border-radius:9px; border:1px solid; background:rgba(13,26,40,.84); color:#d6e2ec; font-size:var(--fs-caption);
  white-space:nowrap; box-shadow:0 3px 12px rgba(0,0,0,.28); }
.ib-md-wxtag[hidden] { display:none; }
.ib-md-wxtag b { font-weight:var(--fw-semibold); }
.ib-md-wxtag span { font-variant-numeric:tabular-nums; }
.ib-md-wxtag small { flex-basis:100%; padding-left:20px; color:#9fb3c4; font-size:var(--fs-micro); }
.ib-md-wxtag.is-wind { border-color:rgba(124,242,204,.65); }
.ib-md-wxtag.is-rain { border-color:rgba(79,157,255,.75); }
.ib-md-wxtag.is-snow { border-color:rgba(244,248,255,.7); }
.ib-md-wxtag.is-snow b, .ib-md-wxtag.is-snow svg, .ib-md-lv-c.is-snow svg { color:var(--wx-snow); }
.ib-md-wxtag.is-wind b, .ib-md-wxtag.is-wind svg, .ib-md-lv-c.is-wind svg { color:var(--wx-wind); }
.ib-md-wxtag.is-rain b, .ib-md-wxtag.is-rain svg, .ib-md-lv-c.is-rain svg { color:var(--wx-rain); }
.ib-md-wx-to { flex:none; transition:transform .12s linear; }
.ib-md.is-compact .ib-md-wxtags { left:10px; bottom:10px; }
.ib-md.is-compact .ib-md-wxtag small { display:none; }
.ib-md-lv-track { display:inline-flex; flex-direction:column; gap:1px; }
.ib-md-lv-wxline { display:block; width:calc(100% - 20px); height:14px; margin:0 10px; cursor:pointer; }
.ib-md-lv-wxline line { stroke:rgba(255,255,255,.16); stroke-width:1; vector-effect:non-scaling-stroke; }
.ib-md-lv-wxline .w { fill:var(--wx-wind); opacity:.85; }
.ib-md-lv-wxline .r { fill:var(--wx-rain); }
.ib-md-lv-wxline .s { fill:var(--wx-snow); }
.ib-md-stage[data-sky="day"] { background:linear-gradient(180deg, #3d6d98 0%, #86aecb 60%, #c4d4df 100%); }
.ib-md-stage[data-sky="dusk"] { background:linear-gradient(180deg, #26375a 0%, #7e5a6c 58%, #d49a6c 100%); }
.ib-md-stage[data-sky="night"] { background:radial-gradient(ellipse at 50% 18%, #1b2b46 0%, #09111e 78%); }
.ib-md-stage[data-sky="day"].is-overcast { background:linear-gradient(180deg, #5a6875 0%, #909daa 60%, #b6bfc7 100%); }
.ib-md-stage[data-sky="dusk"].is-overcast { background:linear-gradient(180deg, #333b49 0%, #66626d 60%, #8a8080 100%); }
/* What the walls show (D-300): a reading on its scale, the outside air marked on it */
.ib-md-pins .ib-ph-pin.is-scale .ib-ph-dot { background:var(--sc); color:var(--sc-ink); font-size:10.5px; letter-spacing:-.2px; }
.ib-md-pins .ib-md-anchor.is-scale { background:var(--sc); }
.ib-md-leaders polyline.is-scale { stroke:var(--sc); }
.ib-md-lv-bar.is-show .ib-seg-b { padding:4px 9px; }
.ib-md-lv-scale { display:inline-flex; align-items:center; gap:6px; padding:0 4px; color:var(--muted); font-size:var(--fs-micro);
  font-variant-numeric:tabular-nums; white-space:nowrap; }
.ib-md-lv-grad { position:relative; display:block; width:clamp(90px, 12vw, 150px); height:8px; border-radius:4px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.12); }
.ib-md-lv-grad i, .ib-md-lv-out i { position:absolute; top:-4px; width:2px; height:16px; margin-left:-1px; border-radius:1px; background:#fff;
  box-shadow:0 0 0 1px rgba(13,26,40,.75); }
.ib-md-lv-out { display:inline-flex; align-items:center; gap:6px; margin-left:4px; color:var(--text); }
.ib-md-lv-out i { position:static; display:inline-block; margin:0; height:12px; }
/* The model on the Overview (D-300): the model alone, its controls on it */
.ib-md.is-compact .ib-md-tools, .ib-md.is-compact .ib-md-away, .ib-md.is-compact .ib-md-cap, .ib-md.is-compact .ib-md-off,
.ib-md.is-compact .ib-md-ifchost, .ib-md.is-compact .ib-md-bcfhost, .ib-md.is-compact .ib-md-info { display:none !important; }
/* How the risk forms, on the model (D-301): the card's tabs, its account, the risks' legend */
.ib-md-dv-tabs { align-self:flex-start; background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.08); }
.ib-md-dv-tabs .ib-seg-b { padding:4px 10px; font-size:var(--fs-caption); }
.ib-md-dv-body { display:flex; flex-direction:column; gap:10px; min-width:0; }
.ib-md-fm { min-width:0; }
.ib-md-fm-at { display:inline-flex; align-items:center; gap:4px; margin-right:7px; padding:1px 6px; border-radius:5px;
  background:rgba(255,214,107,.12); color:#ffd66b; font-weight:var(--fw-semibold); font-variant-numeric:tabular-nums; }
/* With the live line over the model, the card stays under it. */
.ib-md-stage:has(.ib-md-live:not([hidden])) .ib-md-sel { max-height:calc(100% - 124px); }
.ib-md-fm-head { margin:0 0 6px !important; color:var(--text) !important; font-size:var(--fs-caption) !important; line-height:1.4; }
.ib-md-fm-head.is-warn { color:#ffc56b !important; } .ib-md-fm-head.is-crit { color:#ff8a7a !important; } .ib-md-fm-head.is-good { color:#7fe0a8 !important; }
.ib-md-fm-what { display:flex; align-items:center; gap:6px; margin:0 0 6px !important; padding:4px 8px; border-radius:6px;
  background:rgba(255,214,107,.1); color:#ffd66b !important; font-size:var(--fs-caption) !important; }
.ib-md-fm-map svg { display:block; width:100%; height:auto; }
.ib-md-fm-note { margin:0 !important; color:var(--dim) !important; font-size:var(--fs-caption) !important; }
.ib-md-lv-bar.is-show .ib-seg-b:disabled { opacity:.45; cursor:not-allowed; }
.ib-md-lv-causes { display:inline-flex; flex-wrap:wrap; align-items:center; gap:3px 10px; padding:0 4px; color:var(--muted); font-size:var(--fs-micro); }
.ib-md-lv-causes span { display:inline-flex; align-items:center; gap:5px; white-space:nowrap; }
.ib-md-lv-causes i { width:9px; height:9px; border-radius:2px; }
/* Ask the building (D-303, D-304): a panel beside the model, the story and the questions */
.ib-md-ai { display:flex; flex-direction:column; min-height:0; max-height:72vh; border-radius:var(--r-md); overflow:hidden;
  background:linear-gradient(180deg, #1b2f44, #112030); border:1px solid rgba(0,200,220,.4); }
.ib-md-ai[hidden] { display:none; }
.ib-md-main.has-ai .ib-md-info { display:none; }
@container (min-width:740px) {
  .ib-md-main.has-ai { grid-template-columns:minmax(0, 1fr) minmax(300px, 34%); }
  .ib-md-main.has-ai .ib-md-ai { height:clamp(320px, 52vh, 560px); max-height:none; }
}
.ib-md-main:fullscreen .ib-md-ai, .ib-md-main.is-full .ib-md-ai { height:calc(100vh - 20px); max-height:none; }
.ib-md-ai-top { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:9px 10px 6px 13px; }
.ib-md-ai-top b { display:inline-flex; align-items:center; gap:7px; color:var(--text); font-size:var(--fs-body); font-weight:var(--fw-semibold); }
.ib-md-ai-top b .ib-icon { color:#ffd66b; }
.ib-md-ai-scroll { flex:1 1 auto; min-height:0; overflow-y:auto; padding:2px 13px 10px; display:flex; flex-direction:column; gap:12px; scrollbar-width:thin; }
.ib-md-ai-sh { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:6px; color:var(--dim);
  font-size:var(--fs-micro); text-transform:uppercase; letter-spacing:.5px; }
.ib-md-ai-sh .ib-seg-b { padding:3px 9px; font-size:var(--fs-micro); text-transform:none; letter-spacing:0; }
.ib-md-ai-lines { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:4px; }
.ib-md-ai-line { display:flex; align-items:flex-start; gap:8px; width:100%; padding:7px 9px; border:1px solid rgba(255,255,255,.06);
  border-radius:8px; background:rgba(255,255,255,.03); color:var(--text); font:inherit; font-size:var(--fs-caption); line-height:1.45;
  text-align:left; cursor:pointer; }
.ib-md-ai-line .ib-icon { flex:none; margin-top:3px; color:#ffd66b; }
.ib-md-ai-line:hover { border-color:rgba(255,214,107,.5); background:rgba(255,214,107,.07); }
.ib-md-ai-line:focus-visible { outline:2px solid var(--cyan); outline-offset:1px; }
.ib-md-ai-note { margin:2px 0 0; color:var(--dim); font-size:var(--fs-caption); }
.ib-md-ai-note.is-wait { color:var(--muted); }
.ib-md-ai-facts { margin-top:6px; color:var(--muted); font-size:var(--fs-micro); }
.ib-md-ai-facts summary { cursor:pointer; color:var(--dim); }
.ib-md-ai-facts ul { margin:6px 0 0; padding-left:16px; display:flex; flex-direction:column; gap:3px; }
.ib-md-ai-thread { display:flex; flex-direction:column; gap:8px; border-top:1px solid rgba(255,255,255,.07); padding-top:10px; }
.ib-md-ai-q { align-self:flex-end; max-width:88%; padding:6px 10px; border-radius:10px 10px 2px 10px; background:rgba(0,200,220,.16);
  color:var(--text); font-size:var(--fs-caption); }
.ib-md-ai-a { color:var(--text); font-size:var(--fs-caption); line-height:1.5; }
.ib-md-ai-a p { margin:0 0 6px; } .ib-md-ai-a ul, .ib-md-ai-a ol { margin:0 0 6px; padding-left:18px; }
.ib-md-ai-a table { font-size:var(--fs-micro); }
.ib-md-ai-again { align-self:flex-start; display:inline-flex; align-items:center; gap:5px; }
.ib-md-ai-sugs { display:flex; flex-wrap:wrap; gap:5px; }
.ib-md-ai-sugs .ib-chip { font-size:var(--fs-micro); }
.ib-md-ai-form { display:flex; align-items:flex-end; gap:6px; padding:8px 10px; border-top:1px solid rgba(255,255,255,.08); }
.ib-md-ai-form textarea { flex:1 1 auto; min-width:0; resize:none; font:inherit; font-size:var(--fs-caption); }
.ib-md-ai-foot { margin:0; padding:0 12px 8px; color:var(--dim); font-size:var(--fs-micro); }
.ib-ovm { margin:4px 0 22px; }
.ib-ovm[hidden] { display:none; }
.ib-ovm-head { flex-wrap:wrap; }
.ib-ovm-pick { display:inline-flex; align-items:center; gap:6px; color:var(--muted); }
.ib-ovm-pick .ib-select { min-width:0; max-width:min(320px, 60vw); }
.ib-md-compass { position:absolute; right:12px; bottom:12px; width:44px; height:44px; padding:0; border:0; border-radius:50%;
  background:rgba(13,26,40,.62); cursor:pointer; z-index:3; }
.ib-md-compass svg { width:100%; height:100%; display:block; }
.ib-md-compass .ring { fill:none; stroke:rgba(255,255,255,.18); stroke-width:1.5; }
.ib-md-compass .n { fill:var(--cyan); } .ib-md-compass .s { fill:#5d6b7a; }
.ib-md-compass text { fill:#e4eff5; font-size:6.5px; font-weight:700; font-family:inherit; }
.ib-md-pop { position:absolute; right:62px; top:10px; width:270px; max-height:calc(100% - 20px); overflow:auto; z-index:5;
  padding:10px 12px; border-radius:10px; background:rgba(22,40,58,.97); border:1px solid var(--border); box-shadow:0 8px 24px rgba(0,0,0,.35);
  display:flex; flex-direction:column; gap:8px; }
.ib-md-pop[hidden] { display:none; }
.ib-md-pop .ib-md-row { min-height:38px; }
.ib-md-pop .ib-md-row .ib-lib-link { flex:none; }
.ib-md-row.is-wrap { flex-wrap:wrap; }
.ib-md-row.is-wrap .ib-md-row-main { flex:1 1 140px; }
.ib-md-row.is-wrap .ib-md-row-main b, .ib-md-row.is-wrap .ib-md-row-main small { white-space:normal; }
.ib-md-keys { width:100%; border-collapse:collapse; font-size:var(--fs-caption); }
.ib-md-keys th { text-align:left; color:var(--text); font-weight:var(--fw-semibold); padding:3px 10px 3px 0; width:42%; vertical-align:top; }
.ib-md-pop[data-kind="help"] { width:320px; }
.ib-md-keys td { color:var(--muted); padding:3px 0; }
.ib-md-legend { display:flex; flex-wrap:wrap; gap:4px 12px; color:var(--muted); font-size:var(--fs-caption); }
.ib-md-legend i { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:5px; vertical-align:-1px; background:var(--dim); }
.ib-md-legend i.is-green { background:var(--green); } .ib-md-legend i.is-amber { background:var(--amber); } .ib-md-legend i.is-red { background:var(--red); }
.ib-md-legend i.is-behind { background:transparent; border:2px dashed #fff; }
.ib-md-note { margin:0; color:var(--muted); font-size:var(--fs-caption); }
.ib-md-tip { position:absolute; z-index:4; pointer-events:none; max-width:240px; padding:4px 9px; border-radius:6px; white-space:nowrap;
  overflow:hidden; text-overflow:ellipsis; background:rgba(13,26,40,.92); color:#e4eff5; font-size:var(--fs-caption); border:1px solid rgba(0,200,220,.35); }
.ib-md-tip[hidden], .ib-md-ghost[hidden], .ib-md-card[hidden], .ib-md-sel[hidden] { display:none; }
.ib-md-ghost { position:absolute; z-index:4; pointer-events:none; display:flex; align-items:center; gap:8px; transform:translate(-11px, -11px); }
.ib-md-ghost i { width:22px; height:22px; border-radius:50%; border:2px dashed var(--cyan); background:rgba(0,200,220,.25); flex:none; }
.ib-md-ghost.is-left { flex-direction:row-reverse; transform:translate(calc(-100% + 11px), -11px); }
.ib-md-ghost span { padding:3px 8px; border-radius:6px; background:rgba(13,26,40,.92); color:#e4eff5; font-size:var(--fs-caption); white-space:nowrap; }
.ib-md-card { position:absolute; z-index:4; width:230px; pointer-events:none; padding:10px 12px; border-radius:10px;
  background:rgba(22,40,58,.97); border:1px solid var(--border); box-shadow:0 8px 24px rgba(0,0,0,.35); display:flex; flex-direction:column; gap:4px; }
.ib-md-card p { margin:0; color:var(--muted); font-size:var(--fs-caption); }
.ib-md-card-top { display:flex; align-items:center; gap:8px; }
.ib-md-card-top b { font-weight:var(--fw-semibold); color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ib-md-card-alert { display:flex; align-items:center; gap:5px; color:var(--amber) !important; }
.ib-md-card-go { color:var(--dim); font-size:var(--fs-micro); }
.ib-md-sel { position:absolute; left:62px; bottom:10px; z-index:4; width:min(330px, calc(100% - 130px)); padding:10px 12px; border-radius:10px;
  background:rgba(22,40,58,.97); border:1px solid rgba(0,200,220,.55); box-shadow:0 8px 24px rgba(0,0,0,.35); display:flex; flex-direction:column; gap:5px; }
.ib-md-sel p { margin:0; color:var(--muted); font-size:var(--fs-small); }
.ib-md-sel-top { display:flex; align-items:flex-start; gap:8px; }
.ib-md-sel-top b { flex:1 1 auto; min-width:0; color:var(--text); overflow-wrap:anywhere; }
.ib-md-sel-mats { color:var(--text) !important; }
.ib-md-sel-devs { display:flex; flex-wrap:wrap; gap:4px; }
.ib-md-sel-devs .ib-chip { display:inline-flex; align-items:center; gap:5px; }
.ib-md-sel-acts { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.ib-md-sel-acts small { color:var(--dim); font-size:var(--fs-micro); overflow:hidden; text-overflow:ellipsis; }
.ib-md-sel-acts.is-buttons { justify-content:flex-start; flex-wrap:wrap; margin-top:3px; }
.ib-md-sel-acts.is-buttons .ib-btn { min-height:34px; }
.ib-md-sel .ib-md-card-alert { display:flex; align-items:center; gap:5px; color:var(--amber) !important; }
.ib-md-sel-top .ib-md-tone { margin-top:-2px; }
/* A device's card (D-297): its health as a ring, every reading it sends as a
   tile in the reading's colour over its last day, what took its health. */
.ib-md-sel.is-dev { width:min(392px, calc(100% - 130px)); max-height:calc(100% - 20px); overflow:auto; gap:10px; padding:12px 13px;
  background:linear-gradient(180deg, #1b2f44, #112030); scrollbar-width:thin; }
.ib-md-dv-top { display:flex; align-items:flex-start; gap:11px; }
.ib-md-ring { flex:none; position:relative; width:46px; height:46px; display:grid; place-items:center; }
.ib-md-ring svg { position:absolute; inset:0; width:100%; height:100%; }
.ib-md-ring-bg { fill:rgba(255,255,255,.04); stroke:rgba(255,255,255,.1); stroke-width:4; }
.ib-md-ring-fg { fill:none; stroke:var(--dim); stroke-width:4; stroke-linecap:round; }
.ib-md-ring.is-green .ib-md-ring-fg { stroke:var(--green); } .ib-md-ring.is-amber .ib-md-ring-fg { stroke:var(--amber); }
.ib-md-ring.is-red .ib-md-ring-fg { stroke:var(--red); }
.ib-md-ring b { position:relative; color:var(--text); font-size:15px; font-weight:var(--fw-bold); font-variant-numeric:tabular-nums; }
.ib-md-dv-id { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px; }
.ib-md-dv-id > b { color:var(--text); font-size:var(--fs-body); font-weight:var(--fw-semibold); line-height:1.25; overflow-wrap:anywhere; }
.ib-md-dv-id > small { color:var(--muted); font-size:var(--fs-caption); line-height:1.35; }
.ib-md-dv-state { display:flex; flex-wrap:wrap; align-items:center; gap:4px 9px; margin-top:3px; color:var(--dim); font-size:var(--fs-micro); }
.ib-md-dv-rating { padding:1px 7px; border-radius:var(--r-pill); background:rgba(139,152,166,.16); color:var(--dim);
  font-weight:var(--fw-bold); text-transform:uppercase; letter-spacing:.4px; }
.ib-md-dv-rating.is-green { background:rgba(46,204,113,.14); color:var(--green); }
.ib-md-dv-rating.is-amber { background:rgba(243,156,18,.15); color:var(--amber); }
.ib-md-dv-rating.is-red { background:rgba(255,107,91,.15); color:var(--red); }
.ib-md-dv-when, .ib-md-card-when { display:inline-flex; align-items:center; gap:5px; }
.ib-md-dv-when.is-live, .ib-md-card-when.is-live { color:var(--green); }
.ib-md-dv-when.is-old, .ib-md-card-when { color:var(--amber); }
.ib-md-dv-when i, .ib-md-card-when i { width:7px; height:7px; border-radius:50%; background:var(--green); }
@media (prefers-reduced-motion:no-preference) {
  .ib-md-dv-when i, .ib-md-card-when i { animation:ib-md-live 2s ease-out infinite; }
  .ib-md-rd-spark.is-wait { animation:ib-md-wait 1.4s linear infinite; }
}
@keyframes ib-md-live { 0% { box-shadow:0 0 0 0 rgba(46,204,113,.55); } 70%, 100% { box-shadow:0 0 0 6px rgba(46,204,113,0); } }
@keyframes ib-md-wait { from { background-position:100% 0; } to { background-position:-100% 0; } }
.ib-md-rds { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:6px; }
.ib-md-rd { position:relative; min-width:0; display:flex; flex-direction:column; gap:1px; padding:7px 8px 0 10px; border-radius:8px;
  overflow:hidden; background:rgba(255,255,255,.035); border:1px solid rgba(255,255,255,.07); }
.ib-md-rd::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--rc); }
.ib-md-rd-k { color:var(--muted); font-size:var(--fs-micro); line-height:1.25; overflow:hidden;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.ib-md-rd b { margin-top:auto; padding-top:2px; color:var(--text); font-size:16px; font-weight:var(--fw-semibold); line-height:1.3;
  font-variant-numeric:tabular-nums; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ib-md-rd b small { margin-left:3px; color:var(--muted); font-size:var(--fs-micro); font-weight:600; }
.ib-md-rd-sub { color:var(--muted); font-size:10.5px; line-height:1.2; font-variant-numeric:tabular-nums; white-space:nowrap; }
.ib-md-rd-spark { display:block; width:calc(100% + 18px); height:18px; margin:3px -8px 0 -10px; }
.ib-md-rd-spark.is-wait { background:linear-gradient(90deg, transparent 30%, rgba(255,255,255,.07) 50%, transparent 70%); background-size:200% 100%; }
.ib-md-rds.is-old .ib-md-rd b { color:var(--muted); }
.ib-md-rds-none { grid-column:1 / -1; margin:0; color:var(--dim) !important; font-size:var(--fs-caption); }
.ib-md-rds.is-mini { grid-template-columns:repeat(2, minmax(0, 1fr)); gap:4px; margin:2px 0 1px; }
.ib-md-rds.is-mini .ib-md-rd { padding:5px 7px 5px 9px; }
.ib-md-rds.is-mini .ib-md-rd b { font-size:var(--fs-small); }
.ib-md-card-when { font-size:var(--fs-micro); }
.ib-md-dv-alerts { margin-left:auto; display:inline-flex; align-items:center; gap:5px; color:var(--amber); font-size:var(--fs-caption); white-space:nowrap; }
.ib-md-why { display:flex; flex-direction:column; gap:6px; }
.ib-md-why-bar { display:flex; height:6px; border-radius:3px; overflow:hidden; background:rgba(255,255,255,.08); }
.ib-md-why-bar i { display:block; height:100%; }
.ib-md-why-bar i + i { box-shadow:-1px 0 0 rgba(13,26,40,.8); }
.ib-md-why-keys { display:flex; flex-wrap:wrap; gap:3px 12px; color:var(--muted); font-size:var(--fs-caption); }
.ib-md-why-keys span { display:inline-flex; align-items:center; gap:5px; white-space:nowrap; }
.ib-md-why-keys i { width:8px; height:8px; border-radius:2px; flex:none; }
.ib-md-why-keys b { color:var(--text); font-variant-numeric:tabular-nums; }
.ib-md-x { flex:none; display:grid; place-items:center; width:28px; height:28px; border:0; border-radius:6px; background:transparent; color:var(--muted); cursor:pointer; }
.ib-md-x:hover { background:rgba(255,255,255,.08); color:#fff; }
.ib-md-hint { position:absolute; left:50%; bottom:12px; transform:translateX(-50%); z-index:3; margin:0; max-width:calc(100% - 140px);
  padding:6px 14px; border-radius:999px; background:rgba(13,26,40,.82); color:#c9d6e2; font-size:var(--fs-caption); text-align:center;
  pointer-events:none; transition:opacity .4s ease; }
.ib-md-hint.is-gone { opacity:0; }
.ib-md-sel:not([hidden]) ~ .ib-md-hint, .ib-md-card:not([hidden]) ~ .ib-md-hint { display:none; }
.ib-md-bubbles { position:absolute; inset:0; pointer-events:none; }
.ib-md-bubble { position:absolute; transform:translate(-50%, -50%); width:34px; height:34px; border-radius:50%; border:2px solid #fff;
  background:var(--dim); color:#0d1a28; font:inherit; font-weight:var(--fw-bold); cursor:pointer; pointer-events:auto;
  box-shadow:0 0 0 4px rgba(13,26,40,.45), 0 0 0 7px rgba(255,255,255,.18); }
.ib-md-bubble.is-green { background:var(--green); } .ib-md-bubble.is-amber { background:var(--amber); }
.ib-md-bubble.is-red { background:var(--red); color:#fff; }
.ib-md-bubble:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
.ib-md-pins .ib-ph-pin.is-grouped { visibility:hidden; }
/* Callouts (D-290): a dot at the device's place, a line out to the side,
   its label in the margin; dashed when the device is inside or behind a wall. */
.ib-md-leaders { position:absolute; inset:0; width:100%; height:100%; overflow:visible; pointer-events:none; }
.ib-md-leaders polyline { fill:none; stroke:var(--dim); stroke-width:1.6; stroke-linejoin:round; stroke-linecap:round;
  filter:drop-shadow(0 0 1.5px rgba(13,26,40,.9)); }
.ib-md-leaders polyline.is-green { stroke:var(--green); } .ib-md-leaders polyline.is-amber { stroke:var(--amber); }
.ib-md-leaders polyline.is-red { stroke:var(--red); }
.ib-md-leaders polyline.is-behind { stroke-dasharray:5 4; }
.ib-md-anchor { position:absolute; width:12px; height:12px; transform:translate(-50%, -50%); border-radius:50%; background:var(--dim);
  border:2px solid #fff; box-shadow:0 0 0 3px rgba(13,26,40,.55); pointer-events:auto; cursor:pointer; }
.ib-md-anchor[hidden] { display:none; }
.ib-md-anchor.is-green { background:var(--green); } .ib-md-anchor.is-amber { background:var(--amber); }
.ib-md-anchor.is-red { background:var(--red); }
.ib-md-anchor.is-behind { border-style:dashed; }
.ib-md-stage.is-pinning .ib-md-anchor { pointer-events:none; opacity:.55; }
@media (prefers-reduced-motion:no-preference) { .ib-md-anchor.is-found { animation:ib-md-found 0.8s ease-out 3; } }
.ib-md-pins .ib-ph-pin.is-tag { transform:translate(0, -50%); gap:6px; }
.ib-md-pins .ib-ph-pin.is-tag.is-left { transform:translate(-100%, -50%); flex-direction:row-reverse; }
.ib-md-pins .ib-ph-pin.is-tag .ib-ph-name { position:static; transform:none; display:inline-block; max-width:120px;
  overflow:hidden; text-overflow:ellipsis; }
.ib-md-pins .ib-ph-pin.is-tag.is-left .ib-ph-ring { left:auto; right:-5px; }
.ib-md-pins .ib-ph-pin.is-tag.is-behind .ib-ph-dot { opacity:1; border:2px solid #0d1a28; box-shadow:0 2px 8px rgba(0,0,0,.45); }
.ib-md-pins .ib-ph-pin.is-tag.is-short .ib-ph-name { display:none; }
@media (max-width:600px) { .ib-md-pins .ib-ph-pin.is-tag .ib-ph-name { display:none; } }
.ib-md-main:fullscreen, .ib-md-main.is-full { background:var(--bg); padding:10px; height:100vh; align-items:stretch; }
.ib-md-main.is-full { position:fixed; inset:0; z-index:1000; }
.ib-md-main:fullscreen .ib-md-stage, .ib-md-main.is-full .ib-md-stage { height:calc(100vh - 20px); }
.ib-md-main:fullscreen .ib-md-info, .ib-md-main.is-full .ib-md-info { height:calc(100vh - 20px); max-height:none; }
@media (max-width:600px) {
  .ib-md-rail-in button { width:36px; }
  .ib-md-pop { right:56px; width:calc(100% - 120px); }
  .ib-md-sel { left:54px; width:calc(100% - 110px); }
  .ib-md-sel.is-dev { width:calc(100% - 110px); }
  .ib-md-live { left:56px; right:58px; }
  .ib-md-lv-track { width:100%; order:9; }
  .ib-md-lv-range { width:100%; }
  .ib-md-rds:not(.is-mini) { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .ib-md-sel.is-dev { gap:8px; padding:10px 11px; }
  .ib-md-sel.is-dev .ib-md-rd { padding-bottom:6px; }
  .ib-md-sel.is-dev .ib-md-rd-spark { display:none; }
  .ib-md-hint { max-width:calc(100% - 120px); }
}
@media (max-width:600px) {
  .ib-md-stage { height:min(70vh, 420px); }
}

/* ── Every building on one map (D-257) ──
   Natural Earth's outlines drawn by the page; markers as the photo pins. */
.ib-pm { display:flex; flex-direction:column; gap:10px; }
.ib-pm-stage { position:relative; height:clamp(360px, 62vh, 640px); border:1px solid var(--border); border-radius:var(--r-lg);
  overflow:hidden; background:#0b1724; touch-action:none; cursor:grab; outline:none; }
.ib-pm-stage:focus-visible { box-shadow:0 0 0 2px var(--cyan); }
.ib-pm-stage:active { cursor:grabbing; }
.ib-pm-svg { position:absolute; inset:0; width:100%; height:100%; display:block; }
.ib-pm-sea { fill:#0b1724; }
.ib-pm-land path { fill:#1c2d40; stroke:#3b5571; stroke-width:0.8; stroke-linejoin:round; vector-effect:non-scaling-stroke; }
.ib-pm-marks { position:absolute; inset:0; pointer-events:none; }
.ib-pm-names text { fill:#6f88a3; font-size:12px; letter-spacing:.06em; text-transform:uppercase; pointer-events:none; }
.ib-pm-marks .ib-pm-mark { pointer-events:auto; }
.ib-pm-mark.is-crowded .ib-ph-name { display:none; }
.ib-pm-mark.is-crowded:hover .ib-ph-name, .ib-pm-mark.is-crowded:focus-visible .ib-ph-name, .ib-pm-mark.is-crowded.is-on .ib-ph-name { display:block; z-index:2; }
.ib-pm-mark:hover, .ib-pm-mark:focus-visible, .ib-pm-mark.is-on { z-index:3; }
.ib-pm-mark.is-group { position:absolute; transform:translate(-50%, -50%); padding:0; border:0; background:none; cursor:pointer; }
.ib-pm-mark.is-group .ib-ph-dot { width:36px; height:36px; font-size:13px; box-shadow:0 0 0 4px rgba(13,26,40,.55), 0 2px 8px rgba(0,0,0,.45); }
.ib-pm-mark.is-group.is-green .ib-ph-dot { background:var(--green); }
.ib-pm-mark.is-group.is-amber .ib-ph-dot { background:var(--amber); }
.ib-pm-mark.is-group.is-red .ib-ph-dot { background:var(--red); }
.ib-pm-mark.is-group .ib-ph-ring { left:-5px; width:46px; height:46px; margin-top:-23px; }
.ib-pm-mark.is-group:focus-visible .ib-ph-dot, .ib-pm-mark.is-group:hover .ib-ph-dot { border-color:var(--cyan); }
.ib-pm-zoom { position:absolute; z-index:4; right:10px; top:10px; display:flex; flex-direction:column; gap:6px; }
.ib-pm-zoom .ib-btn { min-width:44px; min-height:44px; justify-content:center; background:rgba(13,26,40,.82); font-size:18px; }
.ib-pm-card { position:absolute; z-index:5; left:12px; bottom:12px; width:min(320px, calc(100% - 24px)); display:flex; flex-direction:column;
  gap:6px; padding:12px 14px; background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md);
  box-shadow:0 10px 28px rgba(0,0,0,.45); cursor:default; }
.ib-pm-card[hidden] { display:none; }
.ib-pm-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.ib-pm-card-head b { font-size:var(--fs-lead); line-height:var(--lh-snug); }
.ib-pm-card-head .ib-btn { min-width:36px; min-height:36px; margin:-6px -8px 0 0; }
.ib-pm-card small { color:var(--muted); font-size:var(--fs-caption); }
.ib-pm-card p { margin:0; color:var(--muted); font-size:var(--fs-small); }
.ib-pm-card-row { display:flex; align-items:baseline; gap:8px; }
.ib-pm-card-row > b { font-size:var(--fs-stat-sm); font-weight:var(--fw-bold); font-variant-numeric:tabular-nums; }
.ib-pm-card-row > span:last-child { color:var(--dim); font-size:var(--fs-caption); }
.ib-pm-card .ib-btn-primary { align-self:flex-start; min-height:40px; }
.ib-pm-card-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:2px; max-height:220px; overflow:auto; }
.ib-pm-card-list a { display:flex; align-items:center; gap:8px; padding:8px 6px; min-height:40px; box-sizing:border-box;
  border-radius:var(--r-sm); color:var(--text); text-decoration:none; }
.ib-pm-card-list a:hover { background:rgba(255,255,255,.05); }
.ib-pm-card-list i { flex:none; width:10px; height:10px; border-radius:50%; background:var(--dim); }
.ib-pm-card-list i.is-green { background:var(--green); }
.ib-pm-card-list i.is-amber { background:var(--amber); }
.ib-pm-card-list i.is-red { background:var(--red); }
.ib-pm-card-list span { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ib-pm-card-list b { font-variant-numeric:tabular-nums; }
.ib-pm-status { position:absolute; left:50%; top:50%; transform:translate(-50%, -50%); margin:0; max-width:80%;
  color:var(--muted); font-size:var(--fs-small); text-align:center; pointer-events:none; }
.ib-pm-status:empty { display:none; }
.ib-pm-credit { position:absolute; right:10px; bottom:6px; color:var(--dim); font-size:10px; pointer-events:none; }
@media (max-width:600px) {
  .ib-pm-stage { height:min(68vh, 520px); }
  .ib-pm-card { left:8px; right:8px; bottom:8px; width:auto; }
}

/* ── A device on a floor the building does not have (D-258) ── */
.ib-b3-outside { display:flex; flex-direction:column; gap:8px; padding:10px 12px; border:1px solid rgba(243,156,18,.45);
  border-radius:var(--r-sm); background:rgba(243,156,18,.07); color:var(--text); font-size:var(--fs-small); }
.ib-b3-outside p { margin:0; }
.ib-b3-outside-acts { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; }
.ib-b3-outside-acts .ib-btn { min-height:36px; }
@media (max-width:600px) { .ib-b3-outside-acts .ib-btn { min-height:44px; flex:1 1 100%; justify-content:center; } }

/* ── A large file sent in pieces (D-259) ── */
.ib-lib-upload { display:flex; flex-direction:column; gap:6px; padding:10px 12px; margin-bottom:10px;
  border:1px solid var(--border); border-radius:var(--r-md); background:var(--panel); }
.ib-lib-upload-top { display:flex; align-items:baseline; gap:10px; min-width:0; }
.ib-lib-upload-top b { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ib-lib-upload-top span { font-variant-numeric:tabular-nums; color:var(--muted); }
.ib-lib-upload-track { height:6px; border-radius:999px; background:rgba(255,255,255,.08); overflow:hidden; }
.ib-lib-upload-track i { display:block; height:100%; width:0; background:var(--cyan); transition:width var(--dur-fast) var(--ease); }
.ib-lib-upload small { color:var(--dim); font-size:var(--fs-caption); }
.ib-lib-upload.is-error { border-color:rgba(255,107,91,.5); }
.ib-lib-upload.is-error small { color:var(--red); }

/* ── IFC files made into 3D models (D-280) ── */
.ib-md-conv { display:flex; flex-direction:column; gap:6px; }
.ib-md-conv-row { display:flex; align-items:center; flex-wrap:wrap; gap:6px 10px; margin:0; padding:8px 12px;
  border:1px solid var(--border); border-radius:var(--r-sm); background:var(--panel); font-size:var(--fs-small); }
.ib-md-conv-row small { flex-basis:100%; color:var(--amber); }
.ib-md-conv-row.is-failed { border-color:rgba(255,107,91,.45); }
.ib-md-conv-row.is-failed svg { color:var(--red); flex:none; }
.ib-md-conv-row.is-failed span { flex:1 1 240px; min-width:0; }
.ib-md-spin { width:12px; height:12px; border-radius:50%; border:2px solid var(--cyan); border-right-color:transparent; flex:none; }
@media (prefers-reduced-motion:no-preference) { .ib-md-spin { animation:ib-md-spin .9s linear infinite; } }
@keyframes ib-md-spin { to { transform:rotate(360deg); } }
/* A very large model opens on request (D-284). */
.ib-md-status .ib-btn { display:flex; margin:10px auto 0; min-height:40px; }

/* ── What the IFC says, beside the model (D-286) ──
   The stage and the details side by side on a wide screen, the details
   under the model on a narrow one; each row finds its place on the model. */
.ib-md { container-type:inline-size; }
.ib-md-main { display:grid; grid-template-columns:minmax(0, 1fr); gap:12px; align-items:start; }
@container (min-width:740px) {
  .ib-md-main.has-info { grid-template-columns:minmax(0, 1fr) minmax(304px, 36%); }
  .ib-md-main.has-info .ib-md-info { height:clamp(320px, 52vh, 560px); max-height:none; }
}
.ib-md-info { display:flex; flex-direction:column; min-height:0; max-height:72vh; border:1px solid var(--border);
  border-radius:var(--r-md); background:var(--panel); overflow:hidden; }
.ib-md-info[hidden] { display:none; }
.ib-md-tabs { display:flex; gap:0; padding:4px 6px 0; border-bottom:1px solid var(--border); overflow-x:auto; flex:none;
  scrollbar-width:none; }
.ib-md-tabs button { flex:1 0 auto; min-height:38px; padding:8px 5px; border:0; border-bottom:2px solid transparent;
  background:none; color:var(--muted); font:inherit; font-size:var(--fs-small); font-weight:var(--fw-semibold); cursor:pointer; }
.ib-md-tabs button:hover { color:var(--text); }
.ib-md-tabs button.is-on { color:var(--text); border-bottom-color:var(--cyan); }
.ib-md-tabs button:focus-visible { outline:2px solid var(--cyan); outline-offset:-2px; }
.ib-md-info-body { flex:1 1 auto; min-height:0; overflow:auto; padding:14px; display:flex; flex-direction:column; gap:12px; }
.ib-md-bhead { display:flex; flex-direction:column; gap:3px; }
.ib-md-bname { margin:0; font-size:var(--fs-title); font-weight:var(--fw-bold); color:var(--text); line-height:1.25; }
.ib-md-bsub { margin:0; color:var(--muted); font-size:var(--fs-small); }
.ib-md-baddr { display:flex; align-items:flex-start; gap:6px; margin:2px 0 0; color:var(--muted); font-size:var(--fs-small); line-height:1.4; }
.ib-md-baddr svg { flex:none; margin-top:1px; color:var(--cyan); }
.ib-md-bchips { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.ib-md-bdesc { margin:6px 0 0; color:var(--text); font-size:var(--fs-small); line-height:1.5; }
.ib-md-facts { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
.ib-md-fact { display:flex; flex-direction:column; padding:10px 12px; border:1px solid var(--border); border-radius:var(--r-sm);
  background:var(--panel2); min-width:0; }
.ib-md-fact b { font-size:22px; font-weight:var(--fw-bold); color:var(--text); line-height:1.1; font-variant-numeric:tabular-nums; }
.ib-md-fact span { margin-top:2px; color:var(--muted); font-size:var(--fs-caption); }
.ib-md-fact small { margin-top:2px; color:var(--dim); font-size:var(--fs-caption); }
.ib-md-h { margin:4px 0 -4px; color:var(--muted); font-size:var(--fs-micro); font-weight:var(--fw-semibold);
  letter-spacing:var(--ls-caps); text-transform:uppercase; }
.ib-md-rows { display:flex; flex-direction:column; gap:2px; }
.ib-md-row { display:flex; align-items:center; gap:10px; width:100%; min-height:44px; padding:7px 10px; border:1px solid transparent;
  border-radius:var(--r-sm); background:none; color:var(--text); font:inherit; font-size:var(--fs-body); text-align:left; cursor:pointer; }
.ib-md-row:hover:not([disabled]), .ib-md-row:focus-visible { background:var(--panel2); border-color:var(--border); outline:none; }
.ib-md-row.is-on { border-color:var(--cyan); background:rgba(0,200,220,.09); }
.ib-md-row[disabled], .ib-md-row.is-plain { cursor:default; }
.ib-md-row[disabled] { opacity:.6; }
.ib-md-row.is-off { opacity:.7; }
.ib-md-row-main { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px; }
.ib-md-row-main b { font-weight:var(--fw-semibold); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ib-md-row-main small { color:var(--muted); font-size:var(--fs-caption); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ib-md-row-end { flex:none; color:var(--muted); font-size:var(--fs-small); font-variant-numeric:tabular-nums; display:inline-flex; }
.ib-md-row:hover .ib-md-row-end, .ib-md-row.is-on .ib-md-row-end { color:var(--cyan); }
.ib-md-bar { display:block; height:4px; margin-top:4px; border-radius:2px; background:var(--border); overflow:hidden; }
.ib-md-bar i { display:block; height:100%; border-radius:2px; background:var(--cyan); opacity:.75; }
.ib-md-fl { flex:none; display:grid; place-items:center; width:34px; height:30px; border-radius:7px; border:1px solid var(--border);
  background:var(--panel2); font-weight:var(--fw-bold); font-variant-numeric:tabular-nums; }
.ib-md-tone { flex:none; display:inline-grid; place-items:center; min-width:26px; height:26px; padding:0 5px; border-radius:13px;
  background:var(--dim); color:#0d1a28; font-size:var(--fs-micro); font-weight:var(--fw-bold); }
.ib-md-tone:empty { min-width:10px; width:10px; height:10px; padding:0; }
i.ib-md-tone { min-width:8px; width:8px; height:8px; padding:0; margin-right:4px; vertical-align:middle; }
.ib-md-tone.is-green { background:var(--green); } .ib-md-tone.is-amber { background:var(--amber); }
.ib-md-tone.is-red { background:var(--red); color:#fff; }
.ib-md-devs { display:flex; flex-wrap:wrap; align-items:center; gap:2px 10px; color:var(--text); font-size:var(--fs-caption); }
.ib-md-sw { flex:none; width:14px; height:14px; border-radius:4px; border:1px solid rgba(0,0,0,.25); }
.ib-md-ups { display:flex; flex-direction:column; gap:12px; }
.ib-md-up { display:flex; flex-direction:column; gap:5px; }
.ib-md-up-top { display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.ib-md-up-top b { font-weight:var(--fw-semibold); }
.ib-md-up-top span, .ib-md-up small { color:var(--muted); font-size:var(--fs-caption); }
.ib-md-stack { display:flex; height:18px; border-radius:4px; overflow:hidden; border:1px solid var(--border); }
.ib-md-stack i { display:block; min-width:3px; height:100%; border-right:1px solid rgba(0,0,0,.25); }
.ib-md-stack i:last-child { border-right:0; }
.ib-md-note { margin:0; color:var(--text); font-size:var(--fs-small); }
.ib-md-again { display:flex; flex-direction:column; gap:8px; padding:10px 12px; border:1px dashed rgba(0,200,220,.45);
  border-radius:var(--r-sm); font-size:var(--fs-small); color:var(--text); }
.ib-md-again .ib-btn { align-self:flex-start; }
.ib-md-src { display:flex; align-items:center; gap:8px; margin:auto 0 0; color:var(--dim); font-size:var(--fs-caption); }
.ib-md-q { width:100%; min-height:40px; padding:8px 12px; background:var(--bg2); border:1px solid var(--border);
  border-radius:var(--r-sm); color:var(--text); font:inherit; font-size:var(--fs-body); }
.ib-md-q:focus { outline:none; border-color:var(--cyan); }
.ib-md-info-body > .ib-btn { align-self:flex-start; }
@media (max-width:600px) {
  .ib-md-info { max-height:none; }
  .ib-md-info-body { padding:12px; }
}
