  :root{
    color-scheme: light;
    --background: oklch(100% 0 0);
    --foreground: oklch(20.46% 0 0);
    --card: oklch(100% 0 0);
    --muted: oklch(97% 0 0);
    --muted-foreground: oklch(52% 0 0);
    --border: oklch(90.37% 0 0);
    --input: oklch(90.37% 0 0);
    --hairline-strong: oklch(82.97% 0 0);
    --canvas-soft: oklch(98.51% 0 0);
    --grid: oklch(93% 0 0);
    --primary: oklch(58.4% .177 39.1);
    --primary-ink: oklch(51.9% .1603 37.9);
    --ring: oklch(58.4% .177 39.1);
    --sidebar: oklch(98.81% 0 0);
    --sidebar-border: oklch(90.37% 0 0);
    --sidebar-accent: oklch(94.61% 0 0);
    --sidebar-active: oklch(96% .03 40);
    --ok: #047857; --warn: #9a4a07; --bad: #b91c1c; --info: #1d4ed8; --neutral: #475569;
    --s1: #2563eb; --s2: #0891b2; --s3: #7c3aed; --s4: #db2777; --s5: #ea580c; --s6: #65a30d;
    --switch-off: oklch(90.37% 0 0);
    --gm-ee: #006FC0; --gm-in: #FFC000; --gm-hw: #00AFEF; --gm-mt: #6F2F9F; --gm-re: #00AF50; --gm-wlc: #001F5F;
    --radius-sm: .375rem; --radius-md: .5rem; --radius-lg: .75rem;
    --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --sidebar-width: 16rem; --topbar-h: 48px;
  }
  @media (prefers-color-scheme: dark){
    :root:not([data-theme="light"]){
      color-scheme: dark;
      --background: oklch(22.64% 0 0); --foreground: oklch(98.5% 0 0); --card: oklch(24.35% 0 0);
      --muted: oklch(27.5% 0 0); --muted-foreground: oklch(72% 0 0); --border: oklch(100% 0 0 / .1);
      --input: oklch(100% 0 0 / .15); --hairline-strong: oklch(100% 0 0 / .22); --canvas-soft: oklch(24.35% 0 0);
      --grid: oklch(100% 0 0 / .08); --primary-ink: oklch(74.25% .1643 42.9);
      --sidebar: oklch(24.35% 0 0); --sidebar-border: oklch(100% 0 0 / .1); --sidebar-accent: oklch(29% 0 0); --sidebar-active: oklch(29% .04 40);
      --ok: #6ee7b7; --warn: #fcd34d; --bad: #fca5a5; --info: #93c5fd; --neutral: #cbd5e1;
      --s1: #60a5fa; --s2: #22d3ee; --s3: #a78bfa; --s4: #f472b6; --s5: #fb923c; --s6: #a3e635;
      --switch-off: oklch(100% 0 0 / .18); --gm-wlc: #7f9cd1;
    }
  }
  :root[data-theme="dark"]{
    color-scheme: dark;
    --background: oklch(22.64% 0 0); --foreground: oklch(98.5% 0 0); --card: oklch(24.35% 0 0);
    --muted: oklch(27.5% 0 0); --muted-foreground: oklch(72% 0 0); --border: oklch(100% 0 0 / .1);
    --input: oklch(100% 0 0 / .15); --hairline-strong: oklch(100% 0 0 / .22); --canvas-soft: oklch(24.35% 0 0);
    --grid: oklch(100% 0 0 / .08); --primary-ink: oklch(74.25% .1643 42.9);
    --sidebar: oklch(24.35% 0 0); --sidebar-border: oklch(100% 0 0 / .1); --sidebar-accent: oklch(29% 0 0); --sidebar-active: oklch(29% .04 40);
    --ok: #6ee7b7; --warn: #fcd34d; --bad: #fca5a5; --info: #93c5fd; --neutral: #cbd5e1;
    --s1: #60a5fa; --s2: #22d3ee; --s3: #a78bfa; --s4: #f472b6; --s5: #fb923c; --s6: #a3e635;
    --switch-off: oklch(100% 0 0 / .18); --gm-wlc: #7f9cd1;
  }

  *,*::before,*::after{ box-sizing: border-box; }
  html,body{ height: 100%; }
  body{ margin: 0; background: var(--background); color: var(--foreground); font: 400 14px/1.45 var(--font-sans); -webkit-font-smoothing: antialiased; }
  button,input,select{ font: inherit; color: inherit; }
  svg.i{ width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
  :focus-visible{ outline: 2px solid var(--ring); outline-offset: 2px; }
  .num{ font-variant-numeric: tabular-nums; }

  /* Top bar */
  .topbar{ position: sticky; top: 0; z-index: 20; height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding-inline: 16px; background: var(--background); border-bottom: 1px solid var(--border); }
  .brand{ display: flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
  .brand .mark{ color: var(--primary); }
  .crumbs{ display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; }
  .crumbs .sep{ color: var(--muted-foreground); }
  @media (max-width: 1100px){ #crumbGroup, #crumbGroup + .sep, .refreshed{ display: none; } }
  .crumbs .site{ display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
  .crumbs .site svg{ color: var(--muted-foreground); }
  .crumbs .site-name b{ font-weight: 600; }
  @media (max-width: 900px){ .crumbs .site-name{ display: none; } }
  .bsel{ font: inherit; font-weight: 500; color: inherit; background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 2px 4px; cursor: pointer; }
  .bsel:hover{ border-color: var(--border); } .bsel:focus-visible{ outline: 2px solid var(--primary); outline-offset: 1px; }
  .bsel option{ color: var(--foreground); background: var(--card); }
  .page-head .select#gper{ margin-left: auto; } .page-head .scope ~ .select#gper{ margin-left: 8px; }
  .setlink{ color: inherit; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
  .setlink:hover{ color: var(--primary); }
  .setlink:focus-visible{ outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 3px; }
  .more-info{ font-size: 13px; color: var(--muted-foreground); }
  .more-info summary{ cursor: pointer; width: fit-content; padding: 4px 0; color: var(--foreground); font-weight: 500; }
  .more-info summary:focus-visible{ outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
  .more-info dl{ display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 6px 16px; margin: 8px 0 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); }
  .more-info dt{ color: var(--foreground); font-weight: 500; } .more-info dd{ margin: 0; }
  @media (max-width: 560px){ .more-info dl{ grid-template-columns: 1fr; } }
  .anchor{ display: contents; }
  .anchor > .h-sec{ grid-column: span 12; }
  .eqbar{ display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .kv{ display: grid; grid-template-columns: minmax(150px, max-content) 1fr; gap: 8px 20px; margin: 0; font-size: 13.5px; }
  .kv dt{ color: var(--muted-foreground); } .kv dd{ margin: 0; font-variant-numeric: tabular-nums; }
  @media (max-width: 560px){ .kv{ grid-template-columns: 1fr; } }
  .kpi-link{ cursor: pointer; transition: border-color .15s; }
  .kpi-link:hover, .kpi-link:focus-visible{ border-color: var(--primary); outline: none; }
  .kpi-link:hover .lbl{ color: var(--primary); }
  .pgr{ display: inline-flex; gap: 6px; } .pgr .btn{ min-width: 36px; justify-content: center; }
  .pgfoot{ display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
  tr.grp td{ background: var(--muted); font-weight: 600; }
  tr.grp .gsp{ display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 400; margin-left: 12px; }
  tr.kid td:first-child{ padding-left: 34px; position: relative; }
  tr.kid td:first-child::before{ content: ""; position: absolute; left: 18px; top: 0; bottom: 0; border-left: 2px solid var(--border); }
  tr.kid td:first-child::after{ content: ""; position: absolute; left: 18px; top: 50%; width: 10px; border-top: 2px solid var(--border); }
  .empty-b{ display: grid; gap: 8px; justify-items: start; padding: 28px 24px; }
  .topbar .spacer{ flex: 1; }
  .refreshed{ color: var(--muted-foreground); font-size: 12.5px; white-space: nowrap; }
  .icon-btn{ width: 32px; height: 32px; display: inline-grid; place-items: center; border: 0; background: transparent; border-radius: var(--radius-md); cursor: pointer; color: var(--foreground); }
  .icon-btn:hover{ background: var(--muted); }
  .btn{ height: 32px; display: inline-flex; align-items: center; gap: 6px; padding-inline: 12px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--background); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
  .btn:hover{ background: var(--muted); }
  .btn:disabled{ opacity: .5; cursor: not-allowed; }
  .avatar{ width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; background: #f3e8ff; color: #7e22ce; font-size: 11px; font-weight: 600; }
  .menu-btn{ display: none; }

  /* Shell */
  .shell{ display: flex; min-height: calc(100% - var(--topbar-h)); }
  .sidebar{ width: var(--sidebar-width); flex: none; background: var(--sidebar); border-right: 1px solid var(--sidebar-border); position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); display: flex; flex-direction: column; }
  .nav{ flex: 1; overflow-y: auto; }
  .nav-group{ padding: 14px 8px 10px; border-top: 1px solid var(--sidebar-border); }
  .nav-group:first-child{ border-top: 0; }
  .nav-label{ padding: 0 8px 8px; font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-foreground); }
  .nav a{ position: relative; display: flex; align-items: center; gap: 10px; height: 32px; padding-inline: 10px; border-radius: var(--radius-md); color: var(--foreground); text-decoration: none; font-size: 13.5px; }
  .nav a svg{ color: var(--muted-foreground); }
  .nav a:hover{ background: var(--sidebar-accent); }
  .nav a[aria-current="page"]{ background: var(--sidebar-active); font-weight: 500; }
  .nav a[aria-current="page"] svg{ color: var(--foreground); }
  .nav a[aria-current="page"]::before{ content: ""; position: absolute; left: -8px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
  .gm-legend{ padding: 10px 16px 12px; border-top: 1px solid var(--sidebar-border); font-size: 12px; color: var(--muted-foreground); display: grid; gap: 4px; }
  .gm-legend b{ font-weight: 500; color: var(--foreground); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 2px; }
  .gm-legend span{ display: flex; align-items: center; gap: 8px; }
  .sidebar-foot{ display: flex; align-items: center; gap: 8px; height: 44px; padding-inline: 12px 8px; border-top: 1px solid var(--sidebar-border); font-size: 12.5px; }
  .sidebar-foot .mark{ color: var(--primary); }
  .sidebar-foot .ver{ color: var(--muted-foreground); }
  .sidebar-foot .spacer{ flex: 1; }

  /* GM category dots */
  .gm{ display: inline-flex; gap: 3px; vertical-align: middle; margin-left: 6px; }
  .gm i, .gm-legend i{ width: 8px; height: 8px; border-radius: 999px; display: inline-block; background: var(--c); }
  .ee{ --c: var(--gm-ee); } .in{ --c: var(--gm-in); } .hw{ --c: var(--gm-hw); } .mt{ --c: var(--gm-mt); } .re{ --c: var(--gm-re); } .wlc{ --c: var(--gm-wlc); }

  /* Main */
  main{ flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .page-head{ min-height: 48px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 24px; border-bottom: 1px solid var(--border); font-weight: 500; }
  .page-head svg{ color: var(--muted-foreground); }
  .page-head .sub{ color: var(--muted-foreground); font-weight: 400; }
  .page-head .spacer{ flex: 1; }
  .content{ padding: 24px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: start; }
  .c12{ grid-column: span 12; } .c2x{ grid-column: span 2; } .c8{ grid-column: span 8; } .c7{ grid-column: span 7; } .c6{ grid-column: span 6; } .c5{ grid-column: span 5; } .c4{ grid-column: span 4; } .c3{ grid-column: span 3; }

  .card{ background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); min-width: 0; }
  .card-head{ padding: 18px 20px 4px; display: flex; align-items: flex-start; gap: 12px; }
  .card-head .grow{ flex: 1; min-width: 0; }
  .card-title{ margin: 0; font-size: 15px; font-weight: 500; }
  .card-desc{ margin: 4px 0 0; color: var(--muted-foreground); font-size: 13px; }
  .card-body{ padding: 12px 20px 18px; }

  .kpi{ padding: 18px 20px 18px; display: flex; flex-direction: column; gap: 10px; height: 100%; }
  .kpi .top{ display: flex; align-items: flex-start; gap: 8px; }
  .kpi .lbl{ flex: 1; font-size: 15px; font-weight: 500; line-height: 1.35; }
  .kpi .val{ font-size: 28px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: auto; }
  .kpi .val{ display: block; height: auto; padding: 0; background: none; color: inherit; white-space: normal; border-radius: 0; }
  .c2x .kpi .val{ font-size: 23px; }
  .kpi .val small{ font-size: 13px; font-weight: 400; color: var(--muted-foreground); margin-left: 4px; }
  .kpi .foot{ font-size: 13px; display: grid; gap: 4px; color: var(--muted-foreground); }
  .kpi .foot .badge{ justify-self: start; }
  .kpi .lbl{ min-height: 2.7em; }
  section.card:has(> .kpi){ align-self: stretch; }
  .kpi .val{ margin-top: 0; }
  .kpi .kn{ font-size: 12.5px; color: var(--muted-foreground); line-height: 1.45; }
  .dl{ width: 30px; height: 30px; margin: -5px -6px 0 0; display: inline-grid; place-items: center; border: 0; background: transparent; border-radius: var(--radius-md); cursor: pointer; color: var(--muted-foreground); flex: none; }
  .dl:hover{ background: var(--muted); color: var(--foreground); }
  .section{ grid-column: span 12; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 4px 0 16px; }
  .section > .card-head{ padding: 16px 20px 12px; align-items: center; }
  .section > .card-head .card-title{ font-size: 16px; }
  .section .inner{ display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; padding: 0 16px; }
  .section .inner .card{ background: var(--canvas-soft); }
  .select{ height: 32px; padding: 0 30px 0 10px; border: 1px solid var(--input); border-radius: var(--radius-md); background: var(--background); appearance: none; cursor: pointer; font-size: 13px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5M7 9l5-5 5 5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }
  .notice{ grid-column: span 12; border: 1px solid color-mix(in oklch, var(--info) 45%, transparent); background: color-mix(in oklch, var(--info) 9%, transparent); border-radius: var(--radius-lg); padding: 12px 16px; font-size: 13px; }
  .notice b{ font-weight: 600; }
  .fn{ border-left: 2px solid var(--info); background: color-mix(in oklch, var(--info) 7%, transparent); padding: 7px 10px; font-size: 12.5px; border-radius: 0 6px 6px 0; color: var(--muted-foreground); }
  .h-sec{ grid-column: span 12; margin: 10px 0 -2px; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
  .h-sec:first-child{ margin-top: 0; }
  .accent{ border-left: 3px solid var(--c); }
  .tile{ border-radius: var(--radius-lg); padding: 14px 16px; border: 1px solid color-mix(in oklch, var(--c) 40%, transparent); background: color-mix(in oklch, var(--c) 8%, transparent); }
  .tile .v{ font-size: 24px; font-weight: 600; color: var(--c); font-variant-numeric: tabular-nums; }
  .tile .k{ font-size: 12.5px; color: var(--c); }
  .flist{ display: grid; gap: 8px; }
  .flist .it{ border: 1px solid color-mix(in oklch, var(--bad) 35%, transparent); background: color-mix(in oklch, var(--bad) 6%, transparent); border-radius: var(--radius-md); padding: 9px 12px; display: flex; justify-content: space-between; gap: 10px; }
  .flist .it b{ font-weight: 500; font-size: 13px; } .flist .it span{ font-size: 12px; color: var(--bad); } .flist .it time{ font-size: 12px; color: var(--muted-foreground); white-space: nowrap; }
  .tabs{ display: inline-flex; gap: 4px; padding: 0 20px 4px; flex-wrap: wrap; }
  .tabs button{ height: 30px; padding-inline: 12px; border-radius: var(--radius-md); border: 0; background: transparent; cursor: pointer; color: var(--muted-foreground); font-size: 13px; }
  .tabs button[aria-pressed="true"]{ background: var(--muted); color: var(--foreground); font-weight: 500; }
  .proj{ display: grid; gap: 10px; }
  .proj .stat{ background: color-mix(in oklch, var(--c, var(--info)) 8%, transparent); border-color: color-mix(in oklch, var(--c, var(--info)) 35%, transparent); }
  .proj .stat .v{ color: var(--c, var(--foreground)); }
  .outdoor{ display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 14px; padding: 6px 24px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--muted-foreground); }
  .outdoor b{ color: var(--foreground); font-weight: 500; font-variant-numeric: tabular-nums; }

  .seg{ display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 2px; gap: 2px; background: var(--background); }
  .seg button{ border: 0; background: transparent; height: 26px; padding-inline: 10px; border-radius: 6px; font-size: 12.5px; cursor: pointer; color: var(--muted-foreground); }
  .seg button[aria-pressed="true"]{ background: var(--muted); color: var(--foreground); font-weight: 500; }

  .toolbar{ display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 20px; }
  .toolbar .spacer{ flex: 1; }
  .search{ position: relative; flex: 1 1 220px; max-width: 320px; }
  .search svg{ position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted-foreground); }
  .search input{ width: 100%; height: 32px; padding: 0 10px 0 32px; border: 1px solid var(--input); border-radius: var(--radius-md); background: var(--background); }
  .chip{ height: 28px; padding-inline: 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--background); font-size: 13px; cursor: pointer; color: var(--muted-foreground); }
  .chip[aria-pressed="true"]{ background: var(--muted); border-color: var(--hairline-strong); color: var(--foreground); font-weight: 500; }
  .meta{ color: var(--muted-foreground); font-size: 12.5px; white-space: nowrap; }

  .table-wrap{ overflow-x: auto; border-top: 1px solid var(--border); }
  table{ width: 100%; border-collapse: collapse; }
  th{ text-align: left; font-weight: 500; font-size: 12px; color: var(--muted-foreground); padding: 9px 14px; background: var(--canvas-soft); border-bottom: 1px solid var(--border); white-space: nowrap; }
  td{ padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
  th:first-child, td:first-child{ padding-left: 20px; } th:last-child, td:last-child{ padding-right: 20px; }
  tbody tr:last-child td{ border-bottom: 0; }
  td.r, th.r{ text-align: right; font-variant-numeric: tabular-nums; }
  .equip{ font-family: var(--font-mono); font-weight: 500; font-size: 12.5px; white-space: nowrap; }
  .param-name{ font-weight: 500; margin-bottom: 6px; font-size: 13px; }
  .vals{ display: grid; gap: 4px; justify-items: start; }
  .val{ display: inline-flex; align-items: baseline; gap: 6px; height: 22px; padding-inline: 7px; border-radius: var(--radius-sm); font-size: 12px; white-space: nowrap; background: color-mix(in oklch, var(--c) 10%, transparent); color: var(--c); }
  .val b{ font-weight: 600; font-variant-numeric: tabular-nums; color: var(--foreground); }
  .val.bms{ --c: var(--neutral); } .val.manual{ --c: var(--info); } .val.auto{ --c: var(--primary-ink); }

  .switch::before{ content: ""; position: absolute; inset: -8px -6px; }
  .switch{ position: relative; width: 36px; height: 20px; border-radius: 999px; border: 0; cursor: pointer; background: var(--switch-off); transition: background .15s; flex: none; }
  .switch::after{ content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .25); transition: transform .15s; }
  .switch[aria-checked="true"]{ background: var(--primary); }
  .switch[aria-checked="true"]::after{ transform: translateX(16px); }
  .status{ display: flex; align-items: center; gap: 10px; white-space: nowrap; }
  .badge{ display: inline-flex; align-items: center; gap: 6px; height: 22px; padding-inline: 8px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; background: color-mix(in oklch, var(--c) 12%, transparent); color: var(--c); }
  .badge::before{ content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
  .b-ok{ --c: var(--ok); } .b-warn{ --c: var(--warn); } .b-bad{ --c: var(--bad); } .b-info{ --c: var(--info); } .b-neutral{ --c: var(--neutral); } .b-pri{ --c: var(--primary-ink); }

  .legend{ display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; color: var(--muted-foreground); font-size: 12.5px; }
  .legend span{ display: inline-flex; align-items: center; gap: 6px; }
  .legend i{ width: 10px; height: 10px; border-radius: 999px; background: var(--c); }
  .legend i.ln{ width: 18px; height: 0; border-radius: 0; background: none; border-top: 2.5px solid var(--c); }
  .legend i.ln.dash{ border-top-style: dashed; }
  .legend-pad{ padding: 4px 20px 16px; }
  .legend-pad.tbl{ padding-top: 12px; border-top: 1px solid var(--border); }
  .flag{ display: inline-flex; align-items: center; gap: 3px; }

  .chart{ width: 100%; display: block; overflow: visible; }
  .chart text{ fill: var(--muted-foreground); font-size: calc(12px * var(--k, 1)); font-family: var(--font-sans); }
  .chart .gridl{ stroke: var(--grid); }
  .chart .axis{ stroke: var(--border); }
  .hcol{ fill: transparent; } .hcol:hover{ fill: var(--foreground); fill-opacity: .06; }
  .tip i.sw{ display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
  .rl-list{ display: grid; gap: 0; } .rl-g{ padding: 14px 0 6px; border-bottom: 1px solid var(--border); } .rl-g:first-child{ padding-top: 0; }
  .rl{ display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); align-items: center; }
  .rl-n{ font-size: 13px; font-weight: 500; cursor: help; justify-self: start; } .rl-m{ display: flex; gap: 8px; align-items: center; font-size: 12px; } .rl-u{ color: var(--muted-foreground); width: 56px; text-align: right; }
  .rl-sev{ width: 64px; color: var(--muted-foreground); } .rl-sev::before{ content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--c); margin-right: 6px; } .rl.off .rl-n{ opacity: .5; }
  .rl-t{ display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .rl-s{ font-size: 13px; margin-top: 3px; } .rl-a{ font-size: 12px; color: var(--muted-foreground); margin-top: 3px; } .rl.off .rl-t, .rl.off .rl-s{ opacity: .55; }
  .tabn{ display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
  .todo-list{ display: grid; gap: 6px; } .todo-g{ display: flex; align-items: center; gap: 6px; margin: 10px 0 2px; } .todo-g:first-child{ margin-top: 0; }
  .todo{ display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; border: 1px solid var(--border); border-left: 4px solid var(--c); border-radius: 8px; padding: 4px 8px 4px 0; background: var(--card); }
  .todo-h{ display: grid; grid-template-columns: 120px minmax(0, 1.2fr) minmax(0, 1fr) 110px 110px; align-items: center; gap: 12px; text-align: left; border: 0; background: none; color: inherit; font: inherit; font-size: 13px; padding: 8px 12px; cursor: pointer; }
  .todo-h:hover .todo-f{ color: var(--primary-ink); } .todo-f{ font-weight: 600; } .todo-v{ color: var(--muted-foreground); } .todo-a{ white-space: nowrap; }
  .todo-d{ grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; padding: 4px 12px 12px 16px; border-top: 1px solid var(--border); }
  .todo-do{ margin: 8px 0 6px; font-size: 14px; } .todo-d p.note{ margin: 4px 0; } .todo-done summary{ cursor: pointer; margin: 12px 0 6px; } .todo-done .todo{ opacity: .75; margin-bottom: 6px; }
  .zr-h{ grid-template-columns: minmax(0, 1.3fr) 70px minmax(0, 2fr) 16px; } .zr-s{ font-size: 12.5px; } .zr-chev{ color: var(--muted-foreground); transition: transform .15s; } .zr.open .zr-chev{ transform: rotate(180deg); } .zr{ padding-right: 0; grid-template-columns: 1fr; }
  .zr-dots{ display: inline-flex; gap: 3px; vertical-align: middle; } .zr-dots i{ width: 7px; height: 7px; border-radius: 50%; display: block; }
  .zr-d{ grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); padding-top: 12px; } .zr-tiles{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; align-content: start; }
  .zr-t{ display: grid; gap: 2px; text-align: left; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: inherit; font: inherit; padding: 8px 10px; cursor: pointer; } .zr-t:hover{ border-color: var(--muted-foreground); }
  .zr-t.on{ border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); } .zr-t b{ font-size: 17px; } .zr-t small{ font-size: 11px; font-weight: 400; color: var(--muted-foreground); } .zr-t .note{ font-size: 11.5px; }
  .zr-sub{ grid-column: 1 / -1; font-size: 12px; font-weight: 600; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: .04em; margin-bottom: -4px; }
  .zr-tr{ cursor: pointer; } .zr-tr.bad td{ background: color-mix(in srgb, var(--bad) 10%, transparent); } .zr-tr.bad td:first-child{ box-shadow: inset 3px 0 0 var(--bad); } .zr-tr:hover td{ background: color-mix(in srgb, var(--foreground) 5%, transparent); } .zr-tr .zr-chev{ display: inline-block; width: 10px; } .zr.open .zr-tr .zr-chev{ transform: none; } .zr.open .zr-tr.on .zr-chev{ transform: rotate(90deg); }
  .zr-rd > td{ padding: 10px 12px 14px !important; background: color-mix(in srgb, var(--primary) 5%, transparent); } .zr-rdi{ display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 16px; } .zr-rdi .zr-sub{ margin-bottom: 8px; text-transform: none; letter-spacing: 0; color: var(--foreground); }
  @media (max-width: 900px){ .zr-rdi{ grid-template-columns: 1fr; } }
  .res-f{ grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 10px 12px 12px 16px; border-top: 1px solid var(--border); font-size: 13px; }
  .res-f > b{ flex-basis: 100%; } .res-f label{ display: grid; gap: 3px; flex: 1 1 220px; } .res-f .txt-in{ min-width: 0; width: 100%; } .res-b{ display: flex; gap: 6px; }
  .res-n{ grid-column: 1 / -1; padding: 0 12px 8px 16px; font-size: 12.5px; color: var(--muted-foreground); } .res-n b{ color: var(--ok); font-weight: 600; }
  .zr-rooms{ grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 10px; } .zr-rh{ margin-bottom: 6px; font-size: 13px; }
  .zr-rt{ font-size: 12.5px; } .zr-rt td, .zr-rt th{ padding: 5px 10px; } .zr-rt tr.on td{ background: color-mix(in srgb, var(--primary) 14%, transparent); }
  .zr-rt tr.flash td{ animation: zrflash 1.8s ease-out; } @keyframes zrflash{ 0%, 40%{ background: color-mix(in srgb, var(--primary) 40%, transparent); } }
  .oa-tiers{ display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; } .oa-tiers div{ border-left: 3px solid var(--c); padding: 2px 10px; display: grid; } .oa-tiers b{ font-size: 22px; }
  .oa-grid{ display: grid; grid-template-columns: 86px minmax(0, 1fr) 48px; gap: 6px 10px; align-items: center; font-size: 12.5px; } .oa-id{ text-align: left; } .oa-v{ text-align: right; }
  .oa-ax{ position: relative; height: 16px; } .oa-ax span{ position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--muted-foreground); bottom: 0; }
  .oa-row{ position: relative; height: 18px; } .oa-bands i{ position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--c) 16%, transparent); } .oa-bands i + i{ border-left: 1px dashed color-mix(in srgb, var(--foreground) 30%, transparent); }
  .oa-bar{ position: absolute; left: 0; top: 4px; height: 10px; border-radius: 0 3px 3px 0; background: var(--c); }
  @media (max-width: 900px){ .zr-h{ grid-template-columns: 1fr auto; } .zr-h > .zr-chev{ display: none; } .zr-d{ grid-template-columns: 1fr; } .oa-tiers{ grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 900px){ .todo-h{ grid-template-columns: 1fr 1fr; } .todo-d{ grid-template-columns: 1fr; } }
  .hx{ display: grid; gap: 10px; } .hx-row{ display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 12px; align-items: start; padding-bottom: 10px; border-bottom: 1px solid var(--border); } .hx-row:last-child{ border-bottom: 0; }
  .hx-k{ display: grid; gap: 2px; font-size: 13px; } .hx-tiles{ display: flex; flex-wrap: wrap; gap: 6px; }
  .hx-u{ display: grid; gap: 1px; min-width: 84px; text-align: left; padding: 6px 10px 6px 12px; border: 1px solid var(--border); border-left: 4px solid var(--c); border-radius: 8px; background: var(--card); color: inherit; font: inherit; font-size: 12px; cursor: pointer; }
  .hx-u b{ font-family: var(--mono, ui-monospace, monospace); font-size: 12px; } .hx-u span{ color: var(--muted-foreground); font-size: 11px; } .hx-u:hover{ border-color: var(--c); } .hx-u.on{ outline: 2px solid var(--primary); outline-offset: 1px; } .hx-u.sb{ opacity: .7; }
  @media (max-width: 700px){ .hx-row{ grid-template-columns: 1fr; } }
  tr.rowlink{ cursor: pointer; } tr.rowlink:hover td{ background: color-mix(in srgb, var(--primary) 6%, transparent); } #t-rules tr.off td{ opacity: .55; } #t-rules tr.grp td{ background: var(--muted); padding-top: 8px; padding-bottom: 8px; } #t-rules tr.off td:first-child{ opacity: 1; }
  .fp-grid{ display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; padding: 4px 20px 18px; align-items: start; }
  @media (max-width: 980px){ .fp-grid{ grid-template-columns: 1fr; } }
  .fp-plan{ border: 1px solid var(--border); border-radius: 8px; background: #fbfbfa; overflow: hidden; color-scheme: light; --foreground: #1f2d3a; --background: #ffffff; --muted-foreground: #6b7785; }
  .fp-svg{ display: block; width: 100%; height: auto; cursor: grab; touch-action: none; } .fp-svg.drag{ cursor: grabbing; }
  .fp-tools{ display: flex; gap: 4px; align-items: center; flex-wrap: wrap; padding: 8px 10px; border-bottom: 1px solid #e6e8ea; background: #fff; }
  .fp-tools .chip{ background: transparent; color: #6b747c; border-color: transparent; border-radius: 6px; font-size: 12px; } .fp-tools .chip:hover{ background: #f2f3f4; }
  .fp-tools .chip[aria-pressed="true"]{ background: #1c2329; border-color: #1c2329; color: #fff; }
  .fp-zb{ width: 28px; height: 26px; border: 1px solid #e1e4e7; background: #fff; color: #1c2329; border-radius: 6px; cursor: pointer; font-size: 15px; line-height: 1; }
  .fp-l{ display: none; font-size: calc(var(--fu, 10) * 1px); fill: #5b6670; text-anchor: middle; pointer-events: none; font-weight: 500; letter-spacing: .02em; paint-order: stroke; stroke: rgb(251 251 250 / .9); stroke-width: calc(var(--fu, 10) * .22px); stroke-linejoin: round; }
  .fp-l .fp-v{ font-weight: 600; fill: #1c2329; font-variant-numeric: tabular-nums; } .fp-l.fit, .fp-l.on{ display: inline; } .fp-svg.nolbl .fp-l:not(.on){ display: none; }
  .fp-bnd path{ fill: none; stroke: #2f7fd1; stroke-width: 1.6; stroke-dasharray: 5 3; vector-effect: non-scaling-stroke; pointer-events: none; }
  .fp-sel{ fill: none; stroke: var(--primary); stroke-width: 3; vector-effect: non-scaling-stroke; pointer-events: none; }
  .fp-d{ cursor: pointer; } .fp-d .dot{ stroke: #fff; stroke-width: .7; } .fp-d.off .dot{ stroke: #d64545; stroke-width: 2; } .fp-d.on .dot{ stroke: var(--primary); stroke-width: 2; }
  .fp-d .ico{ display: none; } .fp-svg.zin .fp-d .ico{ display: inline; } .fp-svg.zin .fp-d .dot{ display: none; } .fp-svg.zin .fp-d.off .ico{ outline: 1px solid #d64545; }
  .fp-q{ height: 26px; border: 1px solid #d4dbe2; border-radius: 6px; padding: 0 8px; font: inherit; font-size: 12px; background: #fff; color: #1f2d3a; width: 180px; }
  i.dk{ display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 0; } i.dk.sq{ border-radius: 2px; width: 10px; height: 10px; border: 1px solid rgb(0 0 0 / .12); }
  .fp-ln{ display: none; } .fp-svg.zin .fp-ln{ display: inline; } .fp-svg.zin .fp-lv{ display: none; }
  .fp-pill{ cursor: pointer; scale: max(calc(var(--fpz, 1) * 1.3), .5); } .fp-pill rect{ stroke: #8d99a5; stroke-width: 1.5; } .fp-pill:hover rect{ stroke: #1f2d3a; } .fp-pill.on rect{ stroke: var(--primary); stroke-width: 3; }
  .fp-pill text{ font-size: 14px; fill: #1f2d3a; text-anchor: middle; dominant-baseline: middle; font-weight: 500; }
  .fp-eq{ pointer-events: none; }
  .fp-grid.full{ position: fixed; inset: 0; z-index: 300; margin: 0; padding: 12px 16px 16px; background: var(--background); grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: auto minmax(0, 1fr); overflow: auto; height: 100vh; height: 100dvh; box-sizing: border-box; align-items: stretch; }
  .fp-grid.full .fp-fullhead{ align-self: start; } .fp-grid.full .fp-side{ align-self: start; max-height: 100%; }
  .fp-fullhead{ grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
  .fp-grid.full .fp-main{ display: flex; flex-direction: column; min-height: 0; } .fp-grid.full .fp-plan{ flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .fp-grid.full .fp-svg{ flex: 1 1 0; min-height: 0; height: 0; width: 100%; } .fp-grid.full .fp-side{ overflow: auto; }
  body.fp-lock{ overflow: hidden; }
  @media (max-width: 980px){ .fp-grid.full{ grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr) auto; } .fp-grid.full .fp-side{ max-height: 30vh; } } .fp-dev .ico{ display: none; } .fp-svg.zin .fp-dev .ico{ display: inline; } .fp-svg.zin .fp-dev .dot{ display: none; }
  .fp-room{ stroke: transparent; stroke-width: 2; cursor: pointer; } .fp-room:hover{ stroke: var(--foreground); stroke-opacity: .5; } .fp-room.on{ stroke: var(--primary); stroke-width: 3; }
  .fp-walls polygon{ fill: none; stroke: #2a3138; stroke-width: 3.2; stroke-linejoin: miter; pointer-events: none; } .fp-eq .leaf{ stroke: #56616d; stroke-width: 1.6; } .fp-eq .swing{ fill: none; stroke: #8d99a5; stroke-width: .8; stroke-dasharray: 3 2; } .fp-eq .fixed{ fill: #f9faf8; stroke: #8d99a5; stroke-width: 1; } .fp-walls .outer{ stroke-width: 5.5; }
  .fp-eq{ filter: grayscale(1) contrast(.92) brightness(1.06); opacity: .62; }
  .fp-svg[data-fpk="B"] .fp-room{ stroke: #c9cfd5; stroke-width: .8; }
  .fp-lbl{ fill: var(--foreground); text-anchor: middle; dominant-baseline: middle; pointer-events: none; font-weight: 500; paint-order: stroke; stroke: var(--background); stroke-width: 3px; } .fp-v{ font-weight: 700; }
  .fp-side .fp-h{ font-weight: 600; margin-bottom: 4px; } .fp-side .kv{ margin: 10px 0; }
  .fp-cnt{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; } .fp-cnt b{ display: block; font-size: 22px; }
  .fp-row{ display: flex; justify-content: space-between; gap: 8px; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--border); padding: 7px 0; color: inherit; font: inherit; font-size: 13px; cursor: pointer; } .fp-row:hover span{ color: var(--primary); }
  .tip{ position: fixed; z-index: 50; pointer-events: none; background: var(--foreground); color: var(--background); font-size: 12px; padding: 6px 8px; border-radius: 6px; white-space: nowrap; display: none; }

  .ladder{ display: grid; gap: 8px; }
  .rung{ display: grid; grid-template-columns: 110px 1fr 70px; align-items: center; gap: 10px; font-size: 13px; }
  .rung .bar{ height: 10px; border-radius: 999px; background: var(--muted); position: relative; overflow: hidden; }
  .rung .bar i{ position: absolute; inset: 0 auto 0 0; background: var(--c); border-radius: 999px; }
  .rung.met .name{ font-weight: 500; }
  .pill{ font-size: 11.5px; padding: 1px 6px; border-radius: 999px; background: var(--muted); color: var(--muted-foreground); }

  .meter{ height: 8px; background: var(--muted); border-radius: 999px; overflow: hidden; }
  .meter i{ display: block; height: 100%; background: var(--c, var(--primary)); border-radius: 999px; }
  .split{ display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
  .stat{ border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px; }
  .stat .k{ font-size: 12px; color: var(--muted-foreground); }
  .stat .v{ font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
  .empty{ padding: 32px 20px; text-align: center; color: var(--muted-foreground); }
  .note{ font-size: 12.5px; color: var(--muted-foreground); }
  input.num-in{ width: 76px; height: 28px; padding: 0 8px; border: 1px solid var(--input); border-radius: 6px; background: var(--background); text-align: right; }

  /* Flow & orientation */
  .sr-only{ position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .skip:not(:focus){ clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; padding: 0; }
  .skip{ position: absolute; left: 12px; top: 8px; z-index: 100; background: var(--foreground); color: var(--background); padding: 8px 12px; border-radius: var(--radius-md); text-decoration: none; font-weight: 500; }
  .skip:focus{ top: 8px; }
  .page-head h1{ font-size: 15px; font-weight: 600; margin: 0; display: inline-flex; align-items: center; gap: 8px; }
  .page-head h1:focus{ outline: none; }
  .page-head .scope{ margin-left: auto; font-size: 12.5px; font-weight: 400; color: var(--muted-foreground); white-space: nowrap; }
  .page-head .sub{ flex-basis: 100%; margin: -2px 0 0 24px; font-size: 13px; }
  .more{ display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; color: var(--primary-ink); text-decoration: none; min-height: 24px; }
  .more:hover{ text-decoration: underline; }
  .bullet{ display: grid; gap: 6px; }
  .bullet .track{ position: relative; height: 26px; display: flex; border-radius: 6px; overflow: hidden; }
  .bullet .track span{ height: 100%; display: flex; align-items: center; justify-content: center; font-size: 11.5px; color: var(--foreground); border-right: 1px solid var(--card); white-space: nowrap; overflow: hidden; }
  .bullet .mark{ position: absolute; top: -3px; bottom: -3px; width: 3px; background: var(--foreground); border-radius: 2px; }
  .bullet .bar{ position: absolute; left: 0; top: 9px; height: 8px; background: var(--foreground); border-radius: 2px; }
  .zrow{ display: grid; grid-template-columns: minmax(0,140px) 1fr 44px; gap: 10px; align-items: center; font-size: 13px; color: inherit; text-decoration: none; padding: 4px 6px; margin: 0 -6px; border-radius: 6px; min-height: 28px; }
  .zrow:hover{ background: var(--muted); }
  .zrow:focus-visible{ outline: 2px solid var(--ring, var(--primary)); outline-offset: 1px; }
  .bkey{ display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted-foreground); }
  .bkey span{ display: inline-flex; align-items: center; gap: 6px; }
  .bkey i{ display: inline-block; width: 12px; height: 12px; border-radius: 3px; flex: none; }
  .bkey i.m{ width: 3px; height: 14px; border-radius: 2px; background: var(--foreground); }
  .bkey i.t{ width: 2px; height: 14px; border-radius: 0; background: var(--bad); }
  .bkey b{ color: var(--foreground); font-weight: 500; }
  .bullet .tgt{ position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--bad); }
  .bullet .scale{ display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted-foreground); }
  .attn{ display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
  .attn li{ border: 1px solid var(--border); border-radius: var(--radius-md); }
  .attn li a{ display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: start; font-size: 13px; padding: 8px 10px; color: inherit; text-decoration: none; border-radius: inherit; }
  .attn li a:hover{ background: var(--muted); }
  .attn li a:focus-visible{ outline: 2px solid var(--primary); outline-offset: 1px; }
  .attn li b{ font-weight: 500; }
  .attn li .note{ grid-column: 2; }
  tr.hl td{ background: color-mix(in srgb, var(--warn) 16%, var(--card)); }
  tr.hl td:first-child{ box-shadow: inset 3px 0 0 var(--warn); }
  .pager{ grid-column: span 12; display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
  .pager a{ display: inline-flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--foreground); padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); min-width: 180px; }
  .pager a:hover{ background: var(--muted); }
  .pager a small{ font-size: 12px; color: var(--muted-foreground); }
  .pager a.next{ text-align: right; margin-left: auto; }
  .toast{ position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; background: var(--foreground); color: var(--background); padding: 10px 14px; border-radius: var(--radius-md); font-size: 13.5px; display: none; align-items: center; gap: 14px; box-shadow: 0 8px 24px rgb(0 0 0 / .2); max-width: calc(100vw - 32px); }
  .toast.show{ display: flex; }
  .toast button{ background: transparent; border: 1px solid currentColor; color: inherit; border-radius: 6px; height: 28px; padding: 0 10px; cursor: pointer; font-weight: 500; }
  .scrim{ display: none; }
  dialog.help{ border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); color: var(--foreground); padding: 0; width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 64px); }
  dialog.rsn{ width: min(460px, calc(100vw - 32px)); } .rsn-c{ display: flex; flex-wrap: wrap; gap: 6px; }
  .rsn-c label{ border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; } .rsn-c input{ position: absolute; opacity: 0; pointer-events: none; }
  .rsn-c label:has(input:checked){ background: var(--foreground); color: var(--background); border-color: var(--foreground); } .rsn-c label:has(input:focus-visible){ outline: 2px solid var(--primary); outline-offset: 2px; }
  dialog.help::backdrop{ background: rgb(0 0 0 / .45); }
  dialog.help .hd{ display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--card); }
  dialog.help .hd h2{ margin: 0; font-size: 16px; font-weight: 600; }
  dialog.help .bd{ padding: 4px 20px 20px; font-size: 13.5px; }
  dialog.help h3{ font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-foreground); margin: 18px 0 8px; font-weight: 500; }
  dialog.help dl{ display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; margin: 0; }
  dialog.help dt{ font-weight: 500; } dialog.help dd{ margin: 0; color: var(--muted-foreground); }
  .val-flag{ font-size: 11px; font-weight: 600; margin-left: 4px; }
  th.sortable button{ all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 24px; }
  th.sortable button::after{ content: "↕"; font-size: 10px; opacity: .5; }
  th[aria-sort="ascending"] button::after{ content: "↑"; opacity: 1; }
  th[aria-sort="descending"] button::after{ content: "↓"; opacity: 1; }
  th.sortable button:focus-visible{ outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 3px; }
  .frow{ display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 13px; }
  .frow > span:first-child{ display: grid; gap: 2px; }
  .frow small{ font-size: 12px; }
  .txt-in{ height: 32px; padding: 0 10px; border: 1px solid var(--input); border-radius: var(--radius-md); background: var(--background); min-width: 220px; }
  .btn.pri{ background: var(--primary); border-color: var(--primary); color: #fff; }
  .btn.pri:hover{ background: var(--primary-ink); }
  .lnk{ border: 0; background: none; color: var(--primary-ink); font-weight: 500; cursor: pointer; padding: 4px 6px; min-height: 24px; font-size: 13px; }
  .lnk:hover{ text-decoration: underline; } .lnk.danger{ color: var(--bad); }
  .newuser{ display: grid; gap: 10px; margin: 0 20px 16px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--canvas-soft); }
  dl.prof{ display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; margin: 0; font-size: 13.5px; } dl.prof dt{ color: var(--muted-foreground); } dl.prof dd{ margin: 0; font-weight: 500; }
  .umenu{ position: absolute; right: 12px; top: calc(var(--topbar-h) - 4px); z-index: 40; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: 0 8px 24px rgb(0 0 0 / .14); min-width: 240px; padding: 6px; display: none; }
  .umenu.open{ display: block; }
  .umenu .who{ padding: 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; font-size: 13px; }
  .umenu .who small{ display: block; color: var(--muted-foreground); }
  .umenu a, .umenu button{ display: flex; width: 100%; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; border: 0; background: none; color: var(--foreground); text-decoration: none; font-size: 13.5px; cursor: pointer; text-align: left; }
  .umenu a:hover, .umenu button:hover{ background: var(--muted); }
  .avatar{ border: 0; cursor: pointer; }
  .mode-banner{ grid-column: span 12; border: 1px solid color-mix(in oklch, var(--warn) 50%, transparent); background: color-mix(in oklch, var(--warn) 10%, transparent); border-radius: var(--radius-lg); padding: 10px 16px; font-size: 13.5px; }
  .heat td.h{ text-align: center; font-variant-numeric: tabular-nums; font-size: 12.5px; }
  body[data-page="settings"] .dl, body[data-page="account"] .dl{ display: none; }
  /* Presentation mode */
  body.present .sidebar, body.present .menu-btn, body.present .dl, body.present #presentBtn .lbl-on{ display: none !important; }
  body.present .content{ max-width: 1560px; margin: 0 auto; padding-bottom: 96px; }
  body.present .pager{ position: fixed; left: 0; right: 0; bottom: 0; margin: 0; padding: 10px 24px; background: var(--background); border-top: 1px solid var(--border); z-index: 25; }
  body:not(.present) #presentBtn .lbl-off{ display: none; }
  @media (prefers-reduced-motion: reduce){ .switch, .switch::after, .sidebar{ transition: none !important; } }
  @media (max-width: 1180px){ .c2x{ grid-column: span 4; } .c3{ grid-column: span 6; } .c4, .c5, .c7, .c8{ grid-column: span 12; } }
  @media (max-width: 900px){
    .menu-btn{ display: inline-grid; }
    .sidebar{ position: fixed; left: 0; top: var(--topbar-h); z-index: 30; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 8px 24px rgb(0 0 0 / .12); }
    body.nav-open .sidebar{ transform: none; }
    body.nav-open .scrim{ display: block; position: fixed; inset: var(--topbar-h) 0 0 0; background: rgb(0 0 0 / .4); z-index: 29; }
    .refreshed{ display: none; }
    .content{ padding: 16px; } .page-head{ padding-inline: 16px; }
    .c6{ grid-column: span 12; }
  }
  @media (max-width: 560px){ .brand, .crumbs .sep, #crumbGroup, #crumbPage{ display: none; } .btn .lbl{ display: none; } #presentBtn, .avatar{ display: none; } .topbar{ gap: 6px; padding-inline: 10px; } .c3{ grid-column: span 12; } .c2x{ grid-column: span 6; } .page-head .scope{ margin-left: 0; flex-basis: 100%; } .page-head .sub{ margin-left: 0; } .pager a{ min-width: 0; flex: 1; } dialog.help dl{ grid-template-columns: 1fr; } }
  .table-wrap{ position: relative; }
  .seg{ max-width: 100%; overflow-x: auto; scrollbar-width: none; } .seg::-webkit-scrollbar{ display: none; } .seg > *{ flex: none; }
  .chart.thin text.xl[data-odd], .chart.thin text.pl, .chart.thin text.yt{ display: none; }
  @media (max-width: 560px){
    .meta{ white-space: normal; }
    .content{ padding: 12px; gap: 12px; } .page-head{ padding-inline: 12px; }
    section.card:has(> .kpi){ grid-column: span 6; }
    .kpi{ padding: 12px 14px; gap: 6px; } .kpi .top{ gap: 4px; } .kpi .lbl{ font-size: 13px; min-height: 0; } .kpi .val{ font-size: 21px; } .kpi .val small{ font-size: 11px; margin-left: 2px; }
    .kpi .foot{ font-size: 11.5px; line-height: 1.4; } .kpi .dl{ display: none; } .kpi, .kpi .foot{ min-width: 0; } .kpi .foot .badge{ white-space: normal; height: auto; padding-block: 2px; }
    .card-body{ padding: 10px 14px 14px; } .toolbar{ flex-wrap: wrap; }
    .txt-in{ min-width: 0; max-width: 100%; }
    .tabs{ flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .tabs > *{ flex: none; }
    .todo{ grid-template-columns: 1fr; padding-right: 0; } .todo-h{ grid-template-columns: 1fr auto; row-gap: 4px; padding: 10px 12px; } .todo-h .todo-f{ grid-column: 1 / -1; order: -1; } .todo-a{ justify-self: start; margin: 0 12px 10px; }
    .zr-tiles{ grid-template-columns: repeat(2, minmax(0, 1fr)); } .zr-t b{ font-size: 15px; }
    .rl{ grid-template-columns: 44px minmax(0, 1fr); row-gap: 2px; } .rl-m{ grid-column: 2; flex-wrap: wrap; } .rl-u{ width: auto; text-align: left; }
  }
  .zr-d > *, .zr-rdi > *, .todo-d > *{ min-width: 0; }
  .zr-rt{ min-width: 620px; } .zr-rt td:first-child{ min-width: 190px; }
  @media (orientation: landscape) and (max-height: 500px){
    .topbar{ position: static; } .sidebar{ top: 0; max-height: 100dvh; }
    section.card:has(> .kpi){ grid-column: span 3; } .kpi .lbl{ min-height: 0; } .kpi .val{ font-size: 22px; }
    .fp-grid.full{ grid-template-columns: minmax(0, 1fr) 220px; grid-template-rows: auto minmax(0, 1fr); padding: 6px 10px; gap: 8px; }
    .fp-grid.full .fp-side{ max-height: 100%; font-size: 12.5px; } .fp-grid.full .fp-fullhead{ gap: 8px; }
    .fp-grid.full .fp-fullhead > b, .fp-grid.full .fp-fullhead .legend, .fp-grid.full .fp-hint{ display: none; }
    .fp-grid.full .fp-tools{ flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 4px 6px; } .fp-grid.full .fp-tools > *{ flex: none; }
  }
  @media print{ .sidebar, .topbar .icon-btn, .btn, .dl, .pager, .skip, .toast{ display: none !important; } .table-wrap{ overflow: visible; } }

/* ---- Evolv Optimise brand (added after the original stylesheet; logo slots only) ---- */
/* Topbar (house rule H3, greenmark design/README.md): the company's mark + word-mark in place of the placeholder mark +
   "Optimisation", sized by height as greenmark does: az-mark 13px tall, az-logo 14px tall (86px), 10px apart. The slot keeps
   the placeholder's measured width (110.015625px), so the breadcrumb keeps its x. One file each, for both themes.
   Sidebar foot: the Evolv Optimise PNG wordmark (evolv-optimise.png dark ink on light, evolv-optimise-reverse.png white ink on
   dark; 575x58, from packages/brand) fits the placeholder mark 16 + gap 8 + "Optimisation" 72.6875 = 96.6875px wide
   (9.75px tall), so "/ v2.0.0" keeps its x and y. */
.brand{ gap: 10px; width: 110.015625px; flex: none; }
.brand-logo{ display: block; width: auto; flex: none; }
.brand .az-mark{ height: 13px; }
.brand .az-word{ height: 14px; }
.sidebar-foot .brand-logo{ width: 96.6875px; height: auto; }
.brand-logo-dark{ display: none; }
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .brand-logo-light{ display: none; }
  :root:not([data-theme="light"]) .brand-logo-dark{ display: block; }
}
:root[data-theme="dark"] .brand-logo-light{ display: none; }
:root[data-theme="dark"] .brand-logo-dark{ display: block; }

/* ---- EVOLV home button (top bar, first after the menu button): back to the EVOLV home page, where Sustain and Optimise are
   chosen. Drawn only when VITE_EVOLV_HOME_URL is set (shell.tsx). It shows "EVOLV", the first 346 px of the 575 x 58 product
   lockup, through a window: the files are the brand's, uncut. 14px tall: the lockup at 139px, the window 84px. ---- */
.suite-home{ flex: none; display: inline-flex; align-items: center; height: 32px; padding-inline: 6px; margin-inline: -6px 0; border-radius: var(--radius-md); }
.suite-home:hover{ background: var(--muted); }
.suite-home .suite-mark{ display: block; width: 84px; height: 14px; overflow: hidden; }
.suite-home .brand-logo{ height: 14px; width: 139px; max-width: none; }
.suite-sep{ flex: none; width: 1px; height: 16px; background: var(--border); }
@media (max-width: 560px){ .suite-home .suite-mark{ width: 72px; height: 12px; } .suite-home .brand-logo{ height: 12px; width: 119px; } }
@media print{ .suite-home, .suite-sep{ display: none !important; } }

/* -- Page changes (the same in every EVOLV app) -----------------------------------------------------------------------------
   A page change is a view transition: the page's content fades over and rises in a little, while the top bar, the navigation
   and Volf's pop-up stay put (the rest of the page switches at once, so the clicked item is selected straight away). Volf's own
   moves (its links, the pop-up opening into its page) are styled by its widget. */
main#mainContent { view-transition-name: evolv-page; }
::view-transition-old(root),
::view-transition-new(root),
::view-transition-group(evolv-page) { animation: none; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(evolv-page) { animation: evolv-page-out 120ms cubic-bezier(0.2, 0, 0, 1) both; }
  ::view-transition-new(evolv-page) { animation: evolv-page-in 240ms cubic-bezier(0.16, 1, 0.3, 1) 40ms both; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(evolv-page) { animation: evolv-page-out 100ms linear both; }
  ::view-transition-new(evolv-page) { animation: evolv-page-fade 100ms linear both; }
}
@keyframes evolv-page-out { to { opacity: 0; } }
@keyframes evolv-page-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes evolv-page-fade { from { opacity: 0; } }

/* Interaction feedback (the same in every EVOLV app): colours ease on hover and focus, and a pressed control dips a little */
:where(a[href], button, [role="button"], summary, select, input, textarea, label[for]) {
  transition-property: color, background-color, border-color, box-shadow, opacity, transform;
  transition-duration: 150ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}
:where(button, [role="button"]):where(:not(:disabled)):active { transform: scale(0.97); transition-duration: 80ms; }
@media (prefers-reduced-motion: reduce) {
  :where(a[href], button, [role="button"], summary, select, input, textarea, label[for]) { transition-property: color, background-color, border-color, box-shadow, opacity; }
  :where(button, [role="button"]):active { transform: none; }
}

/* Volf's button floats over the bottom-right corner: the end of a scrolling page leaves room for it, so the last row, button or
   figure can always be scrolled clear of it (only where Volf is on, and not on its own page) */
:root:has(volf-chat[mode="popup"]) main#mainContent:not(:has(volf-chat))::after { content: ""; display: block; flex: none; height: 72px; }

/* House rules (greenmark design/README.md, "House rules"), applied to the Optimise zip's own selectors.
   Same text as apps/optimise/house-rules.css. Line numbers are design/optimise/template/styles.css. */

/* H1 no edge bars: the current nav item is the --sidebar-active tint and weight alone. Zip rule: styles.css:123 */
.nav a[aria-current="page"]::before{ content: none; }

/* H1 no edge bars: a footnote box keeps its tint and padding; no bar on its left edge, and its corners are all rounded 6px
   (the zip's 0 6px 6px 0 only squared the corners that sat against the bar). Zip rule: styles.css:177 */
.fn{ border-left: 0; border-radius: 6px; }

/* H1 no edge bars: the .accent stripe goes (a bare stripe, padding unchanged). Zip rule: styles.css:180 */
.accent{ border-left: 0; }

/* H1 no edge bars: a to-do (fault) row has the 1px border on all four sides, no severity colour on its edge; its severity
   group heading and badge are unchanged. Zip rule: styles.css:255 */
.todo{ border-left: 1px solid var(--border); }

/* H1 no edge bars: a room row outside a limit keeps its red row tint and badges; no inset bar on its first cell.
   Zip rule: styles.css:266 */
.zr-tr.bad td:first-child{ box-shadow: none; }

/* H1 no edge bars: the outdoor-air tier counts lose their left stripe (a bare stripe, padding unchanged); the bar chart below
   keeps its tier colours. Zip rule: styles.css:275 */
.oa-tiers div{ border-left: 0; }

/* H1 no edge bars: an equipment tile has the 1px border on all four sides; hover still colours all four sides alike
   (zip rule .hx-u:hover, unchanged) and the tooltip names the finding. Zip rule: styles.css:284 */
.hx-u{ border-left: 1px solid var(--border); }

/* H1 no edge bars: a highlighted table row has no inset bar on its first cell. Zip rule: styles.css:377 */
tr.hl td:first-child{ box-shadow: none; }

/* H1 no edge bars: the chiller plant unit rows lose the tree lines (the 2px strip down the first cell and the 10px stub);
   "Chillers → CH-n" now comes from grouping and indent, below. tr.kid is used by no other card. Zip rule: styles.css:97-99 */
tr.kid td:first-child::before, tr.kid td:first-child::after{ content: none; }

/* Value chips (BMS / Setpoint – Manual / Setpoint – Auto (AI)): the text is centred in the 22px chip. The zip's chip is a 22px
   inline-flex with align-items: baseline and no vertical padding, so its 17.4px line box (12px × 1.45) sat at the top and the
   ink was 3-3.75px high (Indra, 2026-10-26: "text is not vertically center"). A 22px line box keeps the baseline alignment of
   label and value and fills the chip. Chips appear only in the plant and AHU AI control cards (#/modes). Zip rule: styles.css:219 */
.vals .val{ line-height: 22px; }

/* Badges (status, control mode, "Group setpoint"; every .badge in the app): the text and the 6px status dot are centred on the
   text's cap band. The zip's pill centres a 17.4px line box (12px × 1.45), whose cap band sits about 1px above the pill's centre,
   and centres the dot on the pill, so the dot sat about 0.75px below the cap centre (Indra, 2026-10-26: "text is not vertically
   center"). 1px of top padding moves text and dot down 0.5px; the dot then moves up 0.75px onto the cap centre. Nothing around
   a badge moves: the pill keeps its 22px, translate does not change layout, and vertical-align: -.5px puts an inline badge's
   box back where it was (its baseline is its text's, which the padding lowered by 0.5px). Zip rule: styles.css:229-230 */
.badge{ padding-top: 1px; vertical-align: -.5px; }
.badge::before{ translate: 0 -.75px; }

/* Chiller plant AI control, Setpoints view, grouped sections (src/engine/plant.ts, AGENT_LOG/2026-10-26/spec-plantctl.md,
   layout B). It replaces the zip's tr.grp / tr.kid rows for this card only (zip rules styles.css:95-99; #t-rules keeps tr.grp).
   No lines: hierarchy from containment, order and weight; a unit row's value chips on one line (wrap only when the cell is too
   narrow), so a row is about half the zip's height. Colours are the existing tokens; no new animation.
   One alignment rule for every line: each cell's first line is a 22px line box at the top of the cell, and the controls
   (status badge, value chips, switch + badge) are 22px tall, so they share that line's centre. A unit row's first line is its
   id and parameter name (chips on line 2); a setpoint line is its name, its chips and its switch. */
table.pl{ table-layout: fixed; }
/* Columns: Status and Control mode are fixed px, wide enough for a status badge and switch + "Manual (BMS)" at any table
   width; AI setpoint takes the rest */
.pl .pl-c1{ width: 26%; } .pl .pl-c2{ width: 140px; } .pl .pl-c4{ width: 186px; }
.pl .vals, .pl-sec-h .vals{ display: flex; flex-wrap: wrap; gap: 4px 6px; }
.pl .param-name{ margin-bottom: 4px; line-height: 22px; }
.pl-gt{ font-weight: 600; }
.pl-pn{ font-weight: 500; font-size: 13px; line-height: 22px; }
.pl tbody td:first-child{ line-height: 22px; } .pl tbody td:first-child .note{ line-height: 1.45; }
.pl tbody td:nth-child(2) .badge{ display: flex; width: max-content; }
/* A unit id is Geist Mono 12.5px on the 14px Geist baseline, so its cap band sat about 1px below the rest of the first line;
   raised 1px. Ids and ranges in notes never break inside (plant.ts keepIds) */
.pl .equip{ vertical-align: 1px; }
.pl-nobr{ white-space: nowrap; }
/* The empty-filter table keeps the zip's 900px minimum (sideways scroll below it) */
.pl-b0{ min-width: 900px; }

/* One bordered section per type, 12px apart; the column header once above the first section. The header holds the type and
   summary, then one line per group setpoint laid into the units' own tracks (name under Equipment + Status, values under AI
   setpoint, switch under Control mode), so every line of a section shares the same four columns */
.pl-b{ min-width: 900px; padding: 0 20px 16px; }
.pl-bh{ margin: 0 1px; width: calc(100% - 2px); } .pl-bh th{ background: none; border-bottom: 0; }
.pl-sec{ border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.pl-sec + .pl-sec{ margin-top: 12px; }
.pl-sec-h{ display: grid; grid-template-columns: 26% 140px minmax(0, 1fr) 186px; align-items: center; row-gap: 8px; padding: 11px 0 12px; background: var(--muted); }
.pl-sec-t{ grid-column: 1 / -1; padding-inline: 20px; }
.pl-gsps, .pl-gsl{ display: contents; }
.pl-gsl .pl-pn{ grid-column: 1 / 3; padding-left: 20px; } .pl-gsl .vals{ grid-column: 3; padding-inline: 14px; } .pl-gsl .status{ grid-column: 4; padding: 0 20px 0 14px; }
/* ≤700px: an inset-grouped list with one row grammar for setpoint lines and unit rows. The section summary goes on its own
   line under the type name. Line 1 = name (setpoint) or id + status badge (unit); the next line = parameter name + control
   mode, switch at the trailing edge (badge before it), so every switch in a section ends at the same right edge; last line =
   the chips, BMS + Manual on one line and Auto (AI) under them in every row (a 2-column grid with even 6px gaps) */
@media (max-width: 700px){
  .pl-sec-t .note{ display: block; margin-top: 2px; }
  .pl-b{ min-width: 0; padding: 12px 16px 16px; } .pl-bh{ display: none; }
  .pl-sec-h{ display: block; padding: 12px 16px; } .pl-sec-t{ padding: 0; }
  .pl-b .status{ flex-direction: row-reverse; gap: 8px; }
  .pl-b .vals{ display: grid; grid-template-columns: max-content max-content; justify-content: start; gap: 6px; }
  .pl-b .vals .auto{ grid-column: 1 / -1; justify-self: start; }
  .pl-gsps{ display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; margin-top: 10px; }
  .pl-gsl{ display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; row-gap: 6px; align-items: center; }
  .pl-gsl .pl-pn{ grid-column: 1; padding: 0; } .pl-gsl .status{ grid-column: 2; grid-row: 1; padding: 0; } .pl-gsl .vals{ grid-column: 1 / -1; grid-row: 2; padding: 0; }
  .pl-sec table, .pl-sec tbody{ display: block; } .pl-sec colgroup{ display: none; }
  .pl-sec tr.pl-u{ display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .pl-sec tr.pl-u:last-child{ border-bottom: 0; }
  .pl-sec tr.pl-u td{ display: block; padding: 0; border: 0; } .pl-sec tr.pl-u td:first-child{ padding-left: 0; align-self: start; }
  .pl-sec tr.pl-u td:nth-child(2){ grid-column: 2; grid-row: 1; justify-self: end; align-self: start; }
  .pl-sec tr.pl-u td:nth-child(3){ display: contents; }
  .pl-sec tr.pl-u .param-name{ grid-column: 1; grid-row: 2; margin: 2px 0 0; }
  .pl-sec tr.pl-u td:nth-child(4){ grid-column: 2; grid-row: 2; justify-self: end; margin-top: 2px; }
  .pl-sec tr.pl-u .vals{ grid-column: 1 / -1; grid-row: 3; }
}

/* Settings (#/settings): a section menu on the left and the selected section on the right, the layout of Sustain's Settings
   (apps/sustain/src/styles.css:630-635, 653-654; AGENT_LOG/2026-10-27/spec-settings.md). It replaces the .tabs row on this page
   only; the generic .tabs rule stays for the other pages. The panel column is minmax(0, 1fr) (Sustain: 1fr) so the 860px
   tables scroll inside their card instead of widening the page. The card under the panel title has no head of its own (the
   title and description are the panel's), so a table at its top loses the table-wrap's top border and rounds its top corners
   to the card's (the table-wrap already clips its content to them; the card itself clips nothing). */
/* Sustain's structure, Optimise's values (r4): Sustain derives its menu from its own sidebar, so this one is derived from
   Optimise's. Column gap 24px = Optimise's .content / .page-head inset (the space it puts between the sidebar and content);
   the 208px column stays because the panel tables are fitted to it (a sidebar-wide 240px column would push the users table
   past its card again). */
.settings{ display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 24px; align-items: start; }
/* Menu rows = the sidebar item, rule for rule (styles.css:118-122 .nav a): stacked with no gap, 32px, 10px inset and icon gap,
   --radius-md, 13.5px with the body's line height, foreground text with a muted icon; hover --sidebar-accent; selected
   --sidebar-active, 500, foreground icon; no edge bar (house rule H1). Same tokens as the sidebar, so the selected menu row
   and the sidebar's current item read as one system. */
.set-nav{ display: grid; }
.set-nav button{ display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border: 0; background: none; border-radius: var(--radius-md); cursor: pointer; font-size: 13.5px; color: var(--foreground); text-align: left; white-space: nowrap; }
.set-nav button svg{ color: var(--muted-foreground); }
.set-nav button:hover{ background: var(--sidebar-accent); }
.set-nav button[aria-selected="true"]{ background: var(--sidebar-active); font-weight: 500; }
.set-nav button[aria-selected="true"] svg{ color: var(--foreground); }
.set-nav button:focus-visible{ outline-offset: -2px; }
/* Panel title and sentence are Optimise's section heading (.h-sec) and description (.card-desc) classes; these two rules only
   space them: the heading's own margin, and the content grid's 16px gap below the sentence and the status line */
.set-desc{ margin-bottom: 16px; }
.set-panel > #setStatus{ margin: 0 0 16px; }
.set-panel > .card > .table-wrap:first-child{ border-top: 0; border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0; }
/* Tables in the panel (894px wide at 1440, 240px narrower than the old full-width card): cells 12px apart, 20px from the card
   edges (Users: 14px + the last action link's own 6px), so every row reads as one line again.
   Users: email, role, status, last sign-in and the actions never wrap; the name takes the slack and breaks only when it cannot
   fit. At 14px those five columns alone are 734px of text, which leaves names at most 84px with gaps under 8px and the table
   still wider than the card, so this table's cells are 13px, the size its action links already are.
   Activity Log: time, who and target never wrap; action may take 2 lines; detail takes the rest. At 14px a page whose target
   is "Infection risk management mode" squeezed action to 3 lines and detail to 4; at 13px (same as Users) the worst of the 201
   entries is action 2, detail 3. Permissions keeps 14px: it fits as it was.
   Where a table cannot fit (below ~1280px, 390) it scrolls inside its .table-wrap, as before. */
.set-panel :is(#t-users, #t-log) :is(th, td){ padding-inline: 6px; }
.set-panel :is(#t-users, #t-log) :is(th, td):first-child{ padding-left: 20px; }
.set-panel #t-users :is(th, td):last-child{ padding-right: 14px; }
.set-panel #t-log :is(th, td):last-child{ padding-right: 20px; }
.set-panel :is(#t-users, #t-log) td{ font-size: 13px; }
.set-panel #t-users td:nth-child(n+2), .set-panel #t-log td:is(:nth-child(1), :nth-child(2), :nth-child(4)){ white-space: nowrap; }
/* ≤768px: one column; the menu is one row that scrolls sideways (labels never wrap) */
@media (max-width: 768px){
  .settings{ grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .set-nav{ grid-auto-flow: column; justify-content: start; overflow-x: auto; }
}

/* Page-sequence pager at the bottom of short pages (Indra 2026-10-27: on a page with little content the pager rose and left
   empty space under it). The pager now follows .content instead of being its last grid item (a grid cannot give only its
   last implicit row the free space), #main is a column that fills main, and .content grows into the free space with its
   rows kept at the top, so the pager ends one .content inset above the viewport bottom. On a page taller than the viewport
   there is no free space and everything sits where it did: the pager's margins repeat what the grid gave it (gap + its own
   8px above, the content inset at the sides and below). Selectors stay weaker than body.present .pager (fixed bar), and the
   width keeps body.present .content's max-width + auto margins behaving as in block flow. */
#main{ flex: 1 0 auto; display: flex; flex-direction: column; }
#main > .content{ flex: 1 0 auto; width: 100%; align-content: start; }
.content + .pager{ margin: 0 24px 24px; }
@media (max-width: 900px){ .content + .pager{ margin: 8px 16px 16px; } }
@media (max-width: 560px){ .content + .pager{ margin: 8px 12px 12px; } }
