  :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); }
  .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; }

/* 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; }
