/* ============================================================
   NEW STYLE - light canvas for Home, LDB, Switchgear and P.F.
   Everything is scoped under body.ns (new style on) / body.ns-lt (a light page is showing),
   so the classic dark look is exactly as before when the switch is on CLASSIC.
   ============================================================ */

/* ---- the NEW | CLASSIC switch (shown in both looks) ---- */
.ns-style { display: inline-flex; border: 1.5px solid #46586b; border-radius: 999px; overflow: hidden; flex: none; margin-left: auto; margin-right: 16px; }
.ns-style button { font: 700 11px/1 'Inter', system-ui, sans-serif; letter-spacing: .08em; padding: 8px 14px; background: transparent; color: #aab8c5; border: 0; cursor: pointer; }
.ns-style button.on { background: #e07a3f; color: #fff; }
body.ns .ns-style { border-color: #b9c8d3; }
body.ns .ns-style button { color: #4a6272; }
body.ns .ns-style button.on { background: #0b6fa8; color: #fff; }

/* ---- classic vs new home ---- */
#nsHome { display: none; }
body.ns #nsHome { display: block; }
body.ns #pulse, body.ns #homeLegacy { display: none !important; }

/* ---- light chrome (header + navigator) while a new-style page is on screen ---- */
body.ns-lt {
  --bg: #e6ecf0; --panel: #fff; --panel-alt: #f3f6f8; --border: #d4dce2; --text: #14222c; --text-muted: #3f5361; --text-dim: #566b79;
  --c1: #fff; --c2: #f3f6f8; --ln: #d4dce2; --ln2: #c6d1d9; --kk: #566b79;
  background: #e6ecf0; color: #14222c;
}
body.ns header { background: #fff; border-bottom: 1px solid #d4dce2; padding: 10px 24px; }
body.ns .hd-top { margin-bottom: 0; }
body.ns header h1, body.ns .hd-name { color: #0b3a4a; }
body.ns .hd-sub { color: #566b79; }
body.ns .hd-logo img { height: 52px; }
body.ns #liveClock { background: #f3f6f8; border: 1px solid #d4dce2; color: #14222c; box-shadow: none; }
body.ns #liveClock * { color: #14222c; }
body.ns #clockDate { color: #566b79 !important; }
body.ns .ws-search { background: #f3f6f8 !important; border: 1.5px solid #c6d1d9 !important; box-shadow: none !important; }
body.ns .ws-search svg { stroke: #566b79 !important; }
body.ns .ws-search input { color: #14222c !important; }
body.ns .ws-search input::placeholder { color: #6b7f8d !important; }
body.ns #wsResults { background: #fff; border-color: #d4dce2; color: #14222c; }
body.ns-lt #flowTabRow { background: #fff !important; border-bottom: 1px solid #d4dce2 !important; box-shadow: none !important; padding: 10px 24px !important; }
body.ns-lt .rail-ws, body.ns-lt .rail1 #homeTab { background: #f3f6f8 !important; border: 1.5px solid #d4dce2 !important; box-shadow: none !important; color: #14222c !important; }
body.ns-lt .rail-ws b, body.ns-lt .rail1 #homeTab span { color: #14222c !important; }
body.ns-lt .rail-st { color: #566b79 !important; }
body.ns-lt .rail-ws:hover { background: #fff !important; border-color: var(--wc) !important; transform: none !important; }
body.ns-lt .rail-ws.on { background: color-mix(in srgb, var(--wc) 12%, #fff) !important; border-color: var(--wc) !important; }
body.ns-lt .rail1 #homeTab svg { stroke: #c6793f !important; }
body.ns-lt .rail1 #homeTab.active { background: color-mix(in srgb, #c6793f 14%, #fff) !important; border-color: #c6793f !important; }
body.ns-lt .rail-ws::before, body.ns-lt .rail-mark { display: none !important; }
body.ns-lt #flowTabRow .mode-tab { background: #fff !important; border: 1.5px solid #d4dce2 !important; border-left: 4px solid var(--fc) !important; color: #14222c !important; box-shadow: none !important; }
body.ns-lt #flowTabRow .mode-tab.active { background: color-mix(in srgb, var(--fc) 14%, #fff) !important; border-color: var(--fc) !important; }
body.ns-lt #flowTabRow .mode-tab svg { stroke: var(--fc); }
body.ns-lt .ws-label { color: #566b79; }
body.ns-lt .page-crumb { color: #3f5361; }
body.ns-lt .view-switch a { color: #566b79; }

/* ---- shared new-style building blocks ---- */
body.ns-lt #homeView, body.ns-lt #ldbView, body.ns-lt #swgView, body.ns-lt #pfView { padding: 12px 14px 28px; }
.ns-tb { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.tt { position: relative; background: #fff; border: 1.5px solid #d3dce3; border-radius: 12px; padding: 9px 6px 14px; display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; font: inherit; color: #14222c; transition: .15s; text-transform: none; letter-spacing: 0; }
.tt svg { width: 30px; height: 30px; fill: none; stroke: var(--c); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tt b { font: 700 12.5px 'Segoe UI', system-ui, sans-serif; text-align: center; line-height: 1.15; color: color-mix(in srgb, var(--c) 55%, #0c1c27); }
.tt em { font: 700 13px 'Segoe UI', system-ui, sans-serif; font-style: normal; color: #14222c; }
.tt:after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 4px; border-radius: 2px; background: #6cc04a; }
.tt.warn:after { background: #f2c200; } .tt.bad:after { background: #e2253f; }
.tt:hover, .tt.sel { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, #fff); }
.ns-card { background: #fff; border-radius: 14px; padding: 14px 16px 12px; min-width: 0; text-transform: none; letter-spacing: 0; }
.sw { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.sc { display: flex; align-items: center; gap: 14px; border: 2px solid #d9e1e7; background: #f6f9fb; border-radius: 14px; padding: 10px 18px; cursor: pointer; font: inherit; color: #14222c; text-align: left; transition: .15s; }
.sc:hover { border-color: var(--g); }
.sc.on { border-color: var(--g); background: var(--g); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--g) 40%, transparent); }
.sc .ch { width: 46px; height: 46px; border-radius: 50%; background: color-mix(in srgb, var(--g) 16%, #fff); color: var(--g); display: flex; align-items: center; justify-content: center; font: 800 20px 'Segoe UI', system-ui; flex: none; }
.sc.on .ch { background: rgba(255, 255, 255, .24); color: #fff; }
.sc b { display: block; font: 800 34px 'Segoe UI', system-ui; line-height: 1; font-variant-numeric: tabular-nums; }
.sc i { font-style: normal; font: 700 14px 'Segoe UI', system-ui; opacity: .92; }
.ns-map svg { width: 100%; height: auto; display: block; }
.fl { fill: none; stroke-linecap: round; stroke-dasharray: 1 13; animation: nsfl 1.4s linear infinite; }
@keyframes nsfl { to { stroke-dashoffset: -14; } }
.fb { fill: none; stroke-linecap: round; opacity: .38; }
.pb { cursor: pointer; }
.pb .bx { fill: #fff; stroke: #c9d4dc; stroke-width: 1.6; transition: .15s; }
.pb:hover .bx, .pb.sel .bx { stroke: var(--c); fill: color-mix(in srgb, var(--c) 6%, #fff); }
.pb .pn { font: 700 20px 'Segoe UI', system-ui; }
.pb .pv { font: 800 42px 'Segoe UI', system-ui; font-variant-numeric: tabular-nums; }
.pb .pu { font: 700 16px 'Segoe UI', system-ui; }
.ns-map .gn { font: 800 21px 'Segoe UI', system-ui; fill: #0d4f8b; }
.ns-map .gv { font: 800 38px 'Segoe UI', system-ui; font-variant-numeric: tabular-nums; }
.ns-map .gu { font: 700 14px 'Segoe UI', system-ui; fill: #1f7fd0; }
.ns-map .gs { font: 700 12px 'Segoe UI', system-ui; fill: #1f6fb4; }
@media (max-width: 1100px) { .ns-tb { grid-template-columns: repeat(5, 1fr); } .sw { grid-template-columns: repeat(2, 1fr); } }

/* second row of the navigator (the pages of the open workspace) */
body.ns-lt .rail2 { background: #f3f6f8 !important; background-image: none !important; border: 1px solid #d4dce2 !important; border-radius: 12px !important; box-shadow: none !important; }
body.ns-lt .rail2 .ws-tabs { padding: 6px 8px; }

/* ---- page headers, buttons, transformer chips (LDB) ---- */
.ns-hd { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 4px 2px 12px; }
.ns-hd h2 { font: 800 22px 'Segoe UI', system-ui, sans-serif; color: #0b3a4a; letter-spacing: .02em; text-transform: none; }
.ns-hd p { font: 600 14px 'Segoe UI', system-ui, sans-serif; color: #3f5361; margin-top: 2px; text-transform: none; letter-spacing: 0; }
.ns-btn { font: 700 13px 'Segoe UI', system-ui, sans-serif; color: #0b4a86; background: #fff; border: 1.5px solid #9fc4e6; border-radius: 10px; padding: 9px 16px; cursor: pointer; text-transform: none; letter-spacing: 0; }
.ns-btn:hover { background: #eaf4fd; border-color: #1f7fd0; }
.ns-trs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ns-tr { display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid #d3dce3; border-radius: 12px; padding: 8px 14px 8px 10px; cursor: pointer; font: inherit; color: #14222c; text-align: left; text-transform: none; letter-spacing: 0; }
.ns-tr svg { width: 26px; height: 26px; fill: none; stroke: #1f7fd0; stroke-width: 1.7; }
.ns-tr b { display: block; font: 700 14px 'Segoe UI', system-ui, sans-serif; color: #0d4f8b; }
.ns-tr em { font: 700 12.5px 'Segoe UI', system-ui, sans-serif; font-style: normal; color: #34566a; }
.ns-tr i { width: 10px; height: 10px; border-radius: 50%; background: #6cc04a; flex: none; }
.ns-tr i.warn { background: #f2c200; } .ns-tr i.bad { background: #e2253f; }
.ns-tr:hover { border-color: #1f7fd0; background: #f3f9fe; }
.ns-tr.sel { border-color: #1f7fd0; background: #dff0fd; box-shadow: 0 6px 16px rgba(31, 127, 208, .22); }
.ns-det { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 10px; padding: 12px 16px; border-radius: 12px; background: #eaf4fd; color: #0d3d66; font: 600 14px 'Segoe UI', system-ui, sans-serif; text-transform: none; letter-spacing: 0; }
.ns-det b { font: 800 17px 'Segoe UI', system-ui, sans-serif; color: #0b4a86; }
.ns-det .ns-btn { margin-left: auto; }
.ns-note { margin: 10px 4px 0; font: 600 13px 'Segoe UI', system-ui, sans-serif; color: #3f5361; text-transform: none; letter-spacing: 0; }

/* ---- switchgear page ---- */
.ns-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ns-chip { display: inline-flex; align-items: baseline; gap: 8px; background: #fff; border: 1.5px solid #d3dce3; border-radius: 10px; padding: 7px 13px; text-transform: none; letter-spacing: 0; }
.ns-chip em { font: 700 11.5px 'Segoe UI', system-ui, sans-serif; font-style: normal; color: #3f5361; letter-spacing: .06em; }
.ns-chip b { font: 800 16px 'Segoe UI', system-ui, sans-serif; color: #0b3a4a; }
.ns-chip.ok b { color: #1f9a52; } .ns-chip.warn b { color: #b87a00; } .ns-chip.bad b, .ns-chip.red b { color: #cf2f46; } .ns-chip.off b { color: #566b79; }
.ns-badge { font: 800 12px 'Segoe UI', system-ui, sans-serif; letter-spacing: .08em; padding: 8px 14px; border-radius: 999px; background: #e1eaf0; color: #34566a; }
.ns-badge.live { background: #dcf3e4; color: #17803f; }
.ns-lus { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 8px; }
.ns-lu { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; }
.ns-lu > b { font: 800 16px 'Segoe UI', system-ui, sans-serif; color: #0b3a4a; flex-basis: 100%; letter-spacing: .02em; }
.ns-lu > span:not(.ns-chip) { flex-basis: 100%; font: 600 13px 'Segoe UI', system-ui, sans-serif; color: #3f5361; margin-bottom: 4px; }
.ns-lu .ns-chip { padding: 4px 10px; border-radius: 8px; } .ns-lu .ns-chip b { font-size: 14px; } .ns-lu .ns-chip em { font-size: 10.5px; }
.ns-leg { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 8px; font: 600 13px 'Segoe UI', system-ui, sans-serif; color: #34566a; text-transform: none; letter-spacing: 0; }
.ns-leg i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 7px; vertical-align: -1px; }
.blink { animation: nsblink 1.1s ease-in-out infinite; } @keyframes nsblink { 50% { opacity: .35; } }
.pb.trip .bx { stroke: #f2a100; stroke-width: 3; }
.ns-sw-detail { margin-top: 12px; }
.ns-sw-detail .swp { margin-top: 0; border-radius: 14px; }
.ns-station { margin-top: 12px; } .ns-station h3 { font: 800 16px 'Segoe UI', system-ui, sans-serif; color: #0b3a4a; } .ns-station p { font: 600 13px 'Segoe UI', system-ui, sans-serif; color: #3f5361; margin: 2px 0 10px; }
.ns-tw { overflow: auto; max-height: 380px; } .ns-tw table { width: 100%; border-collapse: collapse; font: 600 13.5px 'Segoe UI', system-ui, sans-serif; color: #14222c; text-transform: none; letter-spacing: 0; }
.ns-tw th { text-align: left; font-size: 11.5px; letter-spacing: .08em; color: #3f5361; padding: 6px 10px; border-bottom: 2px solid #d4dce2; position: sticky; top: 0; background: #fff; }
.ns-tw td { padding: 7px 10px; border-bottom: 1px solid #e6ecf0; } .ns-tw td.bad { color: #cf2f46; font-weight: 800; } .ns-tw td.warn { color: #b87a00; font-weight: 800; }
.ns-empty { padding: 18px; text-align: center; color: #3f5361; font: 600 14px 'Segoe UI', system-ui; border: 1.5px dashed #c6d1d9; border-radius: 12px; }
/* live relay cards (Node-RED) re-lit for the light page */
body.ns-lt .swg-live { background: #fff; border-color: #d4dce2; color: #14222c; }
body.ns-lt .swg-lc { background: #f6f9fb; border-color: #d4dce2; }
body.ns-lt .swg-lc-tag { background: #e6edf2; color: #34566a; } body.ns-lt .swg-lc-tag.ok, body.ns-lt .swg-lc .ok { color: #17803f; } body.ns-lt .swg-lc .bad { color: #cf2f46; } body.ns-lt .swg-lc .warn { color: #b87a00; }
body.ns-lt .swg-lc-st span { border-color: #8fc9a7; color: #17803f; } body.ns-lt .swg-lc-st span.st { border-color: #d99a00; color: #8a5a00; } body.ns-lt .swg-lc-st span.op { background: #fde7ea; border-color: #e2253f; color: #b3122a; }
body.ns-lt .swg-lc-bar { background: #e6edf2; } body.ns-lt .swg-lc-bar span, body.ns-lt .swg-lc-meta b { color: #14222c; }
body.ns-lt .swg-live-st.ok { background: #dcf3e4; color: #17803f; } body.ns-lt .swg-live-st.off, body.ns-lt .swg-live-st.demo, body.ns-lt .swg-live-st.bad { background: #fde9d0; color: #8a5a00; }
body.ns-lt .swg-cb { color: inherit; }

/* ---- P.F. & kVA page ---- */
#nsPf { display: none; } body.ns #nsPf { display: block; }
body.ns #pfView > :not(#nsPf) { display: none !important; }
#nsPf .ns-card { margin-bottom: 12px; }
.nspf-sw3 { grid-template-columns: repeat(3, 1fr); }
.nspf-sw3 .sc .ch { font-size: 14px; }
.nspf-tricard { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: center; }
.nspf-tri { width: 100%; height: auto; display: block; }
.nspf-tri .tt1 { font: 800 17px 'Segoe UI', system-ui; } .nspf-tri .tt2 { font: 700 14px 'Segoe UI', system-ui; }
.nspf-exp h3 { font: 800 20px 'Segoe UI', system-ui; color: #0b3a4a; margin-bottom: 8px; text-transform: none; letter-spacing: 0; }
.nspf-exp p { font: 600 15px/1.5 'Segoe UI', system-ui; color: #1d3646; margin-bottom: 8px; text-transform: none; letter-spacing: 0; }
.nspf-exp p b { color: #0b3a4a; }
.nspf-lad { display: grid; gap: 8px; margin-top: 12px; }
.nspf-lad div { display: grid; grid-template-columns: 56px 1fr 96px; gap: 10px; align-items: center; font: 800 16px 'Segoe UI', system-ui; }
.nspf-lad i { height: 12px; background: #e6edf2; border-radius: 6px; overflow: hidden; display: block; } .nspf-lad u { display: block; height: 100%; border-radius: 6px; }
.nspf-lad b { font-size: 14px; color: #1d3646; text-align: right; }
.nspf-figs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 12px; }
.nspf-fig { background: #fff; border-radius: 14px; border-top: 5px solid var(--c); padding: 12px 16px; text-transform: none; letter-spacing: 0; }
.nspf-fig em { display: block; font: 800 12px 'Segoe UI', system-ui; font-style: normal; color: #34566a; letter-spacing: .08em; }
.nspf-fig b { font: 800 32px 'Segoe UI', system-ui; color: var(--c); font-variant-numeric: tabular-nums; } .nspf-fig b i { font: 700 14px 'Segoe UI', system-ui; font-style: normal; }
.nspf-df { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; text-transform: none; letter-spacing: 0; }
.nspf-df em { display: block; font: 800 12px 'Segoe UI', system-ui; font-style: normal; color: #34566a; letter-spacing: .08em; }
.nspf-df b { font: 800 32px 'Segoe UI', system-ui; color: #7a5cc4; margin-right: 12px; } .nspf-df span { font: 600 14px 'Segoe UI', system-ui; color: #34566a; }
.nspf-df .in { display: flex; align-items: center; gap: 10px; } .nspf-df label { font: 700 13px 'Segoe UI', system-ui; color: #34566a; }
.nspf-df input { width: 90px; font: 700 15px 'Segoe UI', system-ui; padding: 8px 10px; border: 1.5px solid #c6d1d9; border-radius: 8px; color: #14222c; background: #fff; }
.nspf-h { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; margin-bottom: 10px; justify-content: space-between; text-transform: none; letter-spacing: 0; }
.nspf-h h3 { font: 800 17px 'Segoe UI', system-ui; color: #0b3a4a; letter-spacing: .03em; }
.nspf-h p { font: 600 13.5px 'Segoe UI', system-ui; color: #3f5361; margin-top: 2px; max-width: 900px; }
.nspf-h > span { font: 700 13px 'Segoe UI', system-ui; color: #34566a; } .nspf-h > span i { display: inline-block; width: 22px; height: 10px; border-radius: 5px; margin-right: 6px; vertical-align: -1px; }
.unc { background: #e2a8b0; } .now { background: #f2c200; } .best { background: #3aa856; }
.nspf-pl { display: grid; grid-template-columns: 44px minmax(170px, 260px) 1fr 270px; gap: 14px; align-items: center; width: 100%; background: none; border: 0; border-top: 1px solid #e6ecf0; padding: 9px 4px; cursor: pointer; font: inherit; text-align: left; text-transform: none; letter-spacing: 0; }
.nspf-pl:hover { background: color-mix(in srgb, var(--c) 6%, #fff); }
.nspf-pl .nm b { display: block; font: 800 16px 'Segoe UI', system-ui; } .nspf-pl .nm em { font: 600 12.5px 'Segoe UI', system-ui; font-style: normal; color: #3f5361; }
.nspf-pl .bars { position: relative; height: 22px; background: #eef2f5; border-radius: 11px; overflow: hidden; }
.nspf-pl .bars i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 11px; } .nspf-pl .bars .unc { z-index: 1; } .nspf-pl .bars .now { z-index: 2; } .nspf-pl .bars .best { z-index: 3; }
.nspf-pl .nums { font: 700 14.5px 'Segoe UI', system-ui; color: #34566a; text-align: right; font-variant-numeric: tabular-nums; } .nspf-pl .nums b { color: #14222c; } .nspf-pl .nums i { font-style: normal; font-size: 12px; }
.nspf-lg { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: color-mix(in srgb, var(--c) 14%, #fff); border: 3px solid color-mix(in srgb, var(--c) 40%, #fff); flex: none; }
.nspf-lg svg { width: 58%; height: 58%; fill: none; stroke: var(--c); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nspf-r { display: grid; grid-template-columns: 38px minmax(220px, 1.7fr) 90px 150px minmax(190px, 1.2fr) 100px; gap: 12px; align-items: center; width: 100%; background: none; border: 0; border-top: 1px solid #e6ecf0; padding: 8px 4px; cursor: pointer; font: inherit; text-align: left; color: #14222c; text-transform: none; letter-spacing: 0; }
button.nspf-r:hover { background: color-mix(in srgb, var(--c) 6%, #fff); }
.nspf-hd { cursor: default; border-top: 0; border-bottom: 2px solid #d4dce2; font: 800 11.5px 'Segoe UI', system-ui; letter-spacing: .08em; color: #34566a; padding-bottom: 6px; }
.nspf-r .nm b { display: inline-block; font: 800 15.5px 'Segoe UI', system-ui; margin-right: 8px; color: #0d3d66; } .nspf-r .nm small { display: block; font: 600 12.5px 'Segoe UI', system-ui; color: #3f5361; margin-top: 2px; }
.nspf-b { display: inline-block; font: 800 11px 'Segoe UI', system-ui; letter-spacing: .05em; padding: 3px 8px; border-radius: 6px; margin-right: 6px; background: #e6edf2; color: #34566a; vertical-align: 1px; }
.nspf-b.ok { background: #dcf3e4; color: #17803f; } .nspf-b.warn { background: #fdf0cc; color: #8a5a00; } .nspf-b.bad { background: #fde1e5; color: #b3122a; } .nspf-b.load { background: #dff0fd; color: #0b4a86; } .nspf-b.react { background: #dff0fd; color: #0b4a86; } .nspf-b.inst { background: #fdf0cc; color: #8a5a00; }
.nspf-r .kw { font: 800 17px 'Segoe UI', system-ui; text-align: right; font-variant-numeric: tabular-nums; color: #d9692a; } .nspf-r .kw i, .nspf-r .kv i { font: 700 12px 'Segoe UI', system-ui; font-style: normal; margin-left: 3px; }
.nspf-r .pf { display: flex; align-items: center; gap: 6px; } .nspf-r .pf em, .nspf-r .kv em { font-style: normal; color: #566b79; }
.nspf-pill { display: inline-block; min-width: 54px; text-align: center; font: 800 15px 'Segoe UI', system-ui; padding: 4px 10px; border-radius: 999px; }
.nspf-pill.good { background: #dcf3e4; color: #17803f; } .nspf-pill.ok { background: #fdf0cc; color: #8a5a00; } .nspf-pill.low { background: #fde1e5; color: #b3122a; } .nspf-pill.ghost { background: #fff; border: 1.5px dashed #6cc08a; }
.nspf-r .kv { font: 700 15px 'Segoe UI', system-ui; font-variant-numeric: tabular-nums; color: #1d3646; } .nspf-r .kv b { color: #0b3a4a; }
.nspf-r .sv { font: 800 16px 'Segoe UI', system-ui; text-align: right; color: #566b79; font-variant-numeric: tabular-nums; } .nspf-r .sv.yes { color: #17803f; } .nspf-r .sv small { display: block; font: 600 11px 'Segoe UI', system-ui; color: #3f5361; }
.nspf-grp { display: flex; align-items: baseline; gap: 14px; background: color-mix(in srgb, var(--c) 9%, #fff); border-left: 5px solid var(--c); border-radius: 8px; padding: 8px 14px; margin: 10px 0 2px; font: 700 14px 'Segoe UI', system-ui; color: #34566a; text-transform: none; letter-spacing: 0; }
.nspf-grp b { font-size: 17px; } .nspf-grp em { font-style: normal; } .nspf-grp span { margin-left: auto; font-variant-numeric: tabular-nums; } .nspf-grp i { font-style: normal; color: #17803f; min-width: 70px; text-align: right; }
.nspf-flt { display: flex; gap: 6px; } .nspf-flt button { font: 800 12px 'Segoe UI', system-ui; letter-spacing: .06em; padding: 8px 14px; border-radius: 999px; border: 1.5px solid #c6d1d9; background: #fff; color: #34566a; cursor: pointer; } .nspf-flt button.on { background: #0b6fa8; border-color: #0b6fa8; color: #fff; }
.nspf-tot { display: flex; gap: 22px; } .nspf-tot span { font: 800 12px 'Segoe UI', system-ui; color: #34566a; letter-spacing: .08em; } .nspf-tot b { display: block; font: 800 28px 'Segoe UI', system-ui; color: #17803f; } .nspf-tot b i { font: 700 13px 'Segoe UI', system-ui; font-style: normal; margin-left: 4px; }
.nspf-ck { grid-template-columns: 38px minmax(220px, 1.4fr) 90px minmax(260px, 2fr) 110px; } .nspf-ck.flag { background: #fffaf0; }
.mixb .bar { display: flex; height: 18px; border-radius: 9px; overflow: hidden; background: #eef2f5; } .mixb .bar i { display: block; height: 100%; }
.vfd { background: #2a73b3; } .dol { background: #e0894a; } .ss { background: #9a7fc4; } .unknown { background: #c3ced7; }
.nspf-key { font: 700 13px 'Segoe UI', system-ui !important; color: #34566a; } .nspf-key i { display: inline-block !important; width: 14px; height: 14px; border-radius: 4px !important; margin: 0 5px 0 12px !important; vertical-align: -2px; }
.nspf-notes h3 { font: 800 16px 'Segoe UI', system-ui; color: #0b3a4a; margin-bottom: 8px; } .nspf-notes ul { padding-left: 20px; } .nspf-notes li { font: 600 14px/1.5 'Segoe UI', system-ui; color: #1d3646; margin-bottom: 4px; text-transform: none; letter-spacing: 0; }
@media (max-width: 1200px) { .nspf-tricard { grid-template-columns: 1fr; } .nspf-figs { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   NEW SHELL: left icon rail (like mockup F) replaces the top navigator.
   Pages that are not converted yet sit on a dark panel inside the light shell.
   ============================================================ */
body.ns { background: #e6ecf0; padding-left: 78px; }
body.ns #flowTabRow, body.ns #plantTabs { display: none !important; }
.ns-rail { display: none; }
body.ns .ns-rail { display: flex; flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0; width: 78px; background: #0b3a4a; z-index: 60; overflow-y: auto; overflow-x: hidden; padding: 8px 0 12px; scrollbar-width: none; }
.ns-rail::-webkit-scrollbar { display: none; }
.ns-rail button { position: relative; flex: none; width: 78px; height: 60px; background: none; border: 0; border-left: 4px solid transparent; color: #93b8c4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; font-family: 'Segoe UI', system-ui, sans-serif; }
.ns-rail button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ns-rail button span { font: 700 10.5px/1 'Segoe UI', system-ui, sans-serif; letter-spacing: .03em; text-transform: none; }
.ns-rail button:hover { color: #fff; background: #114a5e; }
.ns-rail button.on { color: #fff; background: #0f5a72; border-left-color: #35d0c0; }
.ns-rail hr { flex: none; width: 40px; margin: 6px auto; border: 0; border-top: 1px solid #25596b; }
.ns-fly { display: none; position: fixed; left: 80px; z-index: 70; background: #fff; border: 1.5px solid #d4dce2; border-radius: 14px; box-shadow: 0 14px 34px rgba(11, 58, 74, .28); padding: 8px; width: 270px; max-height: 80vh; overflow: auto; }
.ns-fly.open { display: block; }
.ns-fly button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; background: none; border: 0; border-radius: 10px; cursor: pointer; text-align: left; font: 700 14px 'Segoe UI', system-ui, sans-serif; color: #14222c; text-transform: none; letter-spacing: 0; }
.ns-fly button:hover { background: color-mix(in srgb, var(--c) 10%, #fff); }
.ns-fly svg { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--c); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ns-fly b { color: color-mix(in srgb, var(--c) 55%, #0c1c27); }
.ns-fly em { margin-left: auto; font: 700 13px 'Segoe UI', system-ui; font-style: normal; color: #34566a; }
body.ns header { position: sticky; top: 0; z-index: 40; }
/* classic generator/transformer source box: rich blue */
.ns-map .gn { fill: #fff !important; } .ns-map .gv { fill: #fff; } .ns-map .gu { fill: #d6ecff !important; } .ns-map .gs { fill: #d6ecff !important; }
/* RMU | transformer rows (LDB) */
.ns-rmus { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.ns-rmu { display: flex; align-items: stretch; background: #fff; border: 1.5px dashed #8aa3b1; border-radius: 14px; padding: 6px; gap: 6px; }
.ns-rmu > .rl { display: flex; align-items: center; gap: 8px; background: #e7eff3; border: 2px solid #0b3a4a; border-radius: 10px; padding: 6px 12px; font: 800 12.5px 'Segoe UI', system-ui; color: #0b3a4a; letter-spacing: .04em; max-width: 190px; text-transform: none; }
.ns-rmu > .rl svg { width: 24px; height: 24px; flex: none; fill: none; stroke: #0b3a4a; stroke-width: 1.8; stroke-linecap: round; }
.ns-rmu .ns-tr { border-radius: 10px; }
.ns-rmu .ns-tr svg { stroke: #1769b8; }

/* ============================================================
   GENERIC LIGHT SKIN for the pages that do not have their own new design yet
   (Plants, Energy flow, Savings, Single line, Generators, Utilities, HVAC, Lighting, Top ranks).
   They get the F look: white cards on the pale canvas, dark readable text, no dim grey.
   ============================================================ */
body.ns-lt :is(#feederView, #flowView, #savingsView, #utilView, #hvacView, #lightView, #sldView, #genView, #ranksView) { padding: 12px 16px 28px; color: #14222c; }
body.ns-lt .flow-title, body.ns-lt h2.flow-title { font: 800 22px 'Segoe UI', system-ui, sans-serif; color: #0b3a4a; letter-spacing: .02em; text-transform: none; }
body.ns-lt .flow-hint, body.ns-lt p.flow-hint { color: #3f5361 !important; font: 600 14px 'Segoe UI', system-ui, sans-serif; text-transform: none; letter-spacing: 0; }
body.ns-lt .page-crumb { background: none; }
body.ns-lt .page-crumb .here { color: color-mix(in srgb, var(--fc, #0b6fa8) 55%, #0c1c27) !important; }
body.ns-lt .page-crumb .crumb-home { color: #0b4a86; background: #fff; border: 1.5px solid #c6d1d9; border-radius: 10px; }
/* tables */
body.ns-lt table th { background: #eef2f5 !important; color: #34566a !important; border-color: #d4dce2 !important; }
body.ns-lt table th i { color: #566b79 !important; }
body.ns-lt table td { color: #14222c; border-color: #e6ecf0 !important; }
body.ns-lt table td.m, body.ns-lt table td.r.m { background: transparent !important; color: #14222c !important; }
body.ns-lt table tr:hover td { background: #f3f9fe !important; }
/* buttons / toggles / chips */
body.ns-lt :is(button.tg, button.tg.op, .sy2-sw, .rk-seg button, .seg2 button, .rk-tab) { color: #34566a !important; background: #fff !important; border: 1.5px solid #c6d1d9 !important; border-radius: 10px; }
body.ns-lt :is(button.tg.on, .sy2-sw.on, .rk-seg button.on, .seg2 button.on, .rk-tab.on) { color: #fff !important; background: #0b6fa8 !important; border-color: #0b6fa8 !important; }
body.ns-lt .pp-src { color: #8a5a00 !important; background: #fdf0cc !important; border: 0 !important; }
body.ns-lt .rk-ins { color: #8a5a00 !important; }
body.ns-lt .chip.md, body.ns-lt span.chip.md { background: #fdf0cc !important; color: #8a5a00 !important; border-color: #e6c46a !important; }
body.ns-lt .chip.hi { background: #fde1e5 !important; color: #b3122a !important; }
body.ns-lt .chip.ok { background: #dcf3e4 !important; color: #17803f !important; }
body.ns-lt .md { color: #8a5a00; } body.ns-lt .hi { color: #b3122a; }
/* cards that were dark gradients */
body.ns-lt .sv-card, body.ns-lt .sv-card.load, body.ns-lt .sv-card.pfc { background: #fff !important; border: 1.5px solid #d3dce3 !important; border-radius: 14px; box-shadow: 0 2px 8px rgba(11, 58, 74, .08); }
body.ns-lt :is(.sv-big, .sv-card b) { color: #0b3a4a !important; } body.ns-lt :is(.sv-tag, .sv-sub, .sv-foot) { color: #3f5361 !important; }
body.ns-lt .tp-scroll { background: #eef3f6 !important; border-radius: 14px; }
body.ns-lt .gf-seg b, body.ns-lt .gf-seg em { color: #fff !important; }
body.ns-lt :is(.ldb-fd, .swg-panel, .pp-kp) { color: #14222c; }
body.ns-lt :is(li, small) { color: inherit; }
body.ns-lt #feederView li, body.ns-lt #feederView button:not(.tt):not(.sc) { color: #1d3646; }
body.ns-lt :is(#feederView, #utilView, #hvacView, #lightView, #ranksView, #savingsView, #genView) :is(section, .card, .pp-card, .pk, .kp > div, .ic-card, .rk-card) { background: #fff; border-color: #d3dce3; color: #14222c; }
body.ns-lt :is(tr.total, tr.tot, tfoot tr, .total-row) td { background: #e7eff3 !important; color: #0b3a4a !important; font-weight: 800; }
body.ns-lt :is(#utilView, #hvacView, #lightView, #ranksView, #feederView, #savingsView) button { color: #34566a; }
body.ns-lt :is(.ok, em.ok, b.ok) { color: #17803f; }
/* plant page head (new style) */
#nsPlantHead { display: none; } body.ns #nsPlantHead { display: block; }
.nsph-top { display: flex; align-items: center; gap: 16px; margin: 2px 2px 12px; }
.nsph-top .lg { width: 64px; height: 64px; border-radius: 50%; background: color-mix(in srgb, var(--c) 14%, #fff); border: 5px solid color-mix(in srgb, var(--c) 40%, #fff); display: flex; align-items: center; justify-content: center; flex: none; }
.nsph-top .lg svg { width: 34px; height: 34px; fill: none; stroke: var(--c); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nsph-top h2 { font: 800 26px 'Segoe UI', system-ui; color: color-mix(in srgb, var(--c) 55%, #0c1c27); letter-spacing: .01em; text-transform: none; }
.nsph-top p { font: 600 14px 'Segoe UI', system-ui; color: #3f5361; text-transform: none; letter-spacing: 0; }
.nsph-cards .sc { cursor: default; } .nsph-cards .sc:hover { border-color: #d9e1e7; }

/* ===== SHELL = mockup F exactly ===== */
body.ns { padding-left: 64px; }
body.ns .ns-rail { width: 64px; padding: 8px 0; gap: 4px; background: #0b3a4a; }
body.ns .ns-rail button { width: 64px; height: 56px; gap: 3px; border-left: 3px solid transparent; color: #8fb4c0; }
body.ns .ns-rail button svg { width: 22px; height: 22px; }
body.ns .ns-rail button span { font-size: 9px; letter-spacing: .04em; font-weight: 600; }
body.ns .ns-rail button.on { background: #0f4d61; border-left-color: #00a08a; color: #fff; }
body.ns .ns-fly { left: 66px; }
body.ns header { padding: 8px 18px; background: #fff; border-bottom: 1px solid #d4dce2; }
body.ns .hd-tools, body.ns #liveClock, body.ns .hd-stats { display: none !important; }
body.ns .hd-top { justify-content: space-between; gap: 16px; }
body.ns header h1 { display: flex; align-items: center; gap: 12px; font-family: 'Segoe UI', system-ui, sans-serif; }
body.ns .hd-logo { background: none; border: 0; box-shadow: none; padding: 0; }
body.ns .hd-logo img { height: 46px; }
body.ns .hd-name { font: 800 17px 'Segoe UI', system-ui, sans-serif; letter-spacing: .08em; color: #0b3a4a; }
body.ns .hd-sub { font: 600 11px 'Segoe UI', system-ui, sans-serif; color: #5d6e7b; letter-spacing: 0; text-transform: none; display: block; }
.ns-hdr { display: none; }
body.ns .ns-hdr { display: flex; gap: 18px; align-items: center; font: 12px 'Segoe UI', system-ui, sans-serif; margin-left: auto; color: #14222c; }
.ns-hdr .mode { display: flex; align-items: center; gap: 6px; font-weight: 700; } .ns-hdr .mode i { width: 9px; height: 9px; border-radius: 50%; background: #f2c200; display: block; }
.ns-hdr .usr b { font-weight: 700; } .ns-hdr .cnt { font-weight: 800; padding: 4px 9px; border-radius: 5px; background: #fff4c2; color: #8a6d00; }
body.ns .ns-style { margin: 0 0 0 18px; }
#nsStub { display: none; padding: 14px; }
.nsst { padding: 28px 30px; text-transform: none; letter-spacing: 0; }
.nsst .bd { display: inline-block; font: 800 11px 'Segoe UI', system-ui; letter-spacing: .1em; background: #dff0fd; color: #0b4a86; padding: 5px 11px; border-radius: 999px; }
.nsst h2 { font: 800 28px 'Segoe UI', system-ui; color: #0b3a4a; margin: 12px 0 4px; } .nsst p { font: 600 15px 'Segoe UI', system-ui; color: #34566a; }
.nsst .lk { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ===== round 5: compact header (F proportions, less tall), clear flow line ===== */
body.ns header { padding: 4px 16px; }
body.ns .hd-logo img { height: 38px; }
body.ns .hd-name { font-size: 16px; } body.ns .hd-sub { font-size: 10.5px; line-height: 1.2; }
body.ns .ns-style button { padding: 6px 12px; }
.fl { stroke-linecap: butt; stroke-dasharray: 9 13; animation: nsfl 1s linear infinite; }
@keyframes nsfl { to { stroke-dashoffset: -22; } }
body.ns-lt #homeView { padding-top: 8px; padding-bottom: 8px; }
.ns-tb { margin-bottom: 8px; gap: 6px; } .tt { padding: 6px 4px 11px; gap: 3px; } .tt svg { width: 26px; height: 26px; } .tt b { font-size: 12px; }
.sw { margin-bottom: 6px; gap: 10px; } .sc { padding: 6px 16px; } .sc .ch { width: 38px; height: 38px; font-size: 17px; } .sc b { font-size: 28px; }
.ns-card { padding: 10px 14px 8px; }
body.ns .view-switch { margin: 4px 0 0; }

/* ===== round 5: Equipment (faceplates), Plants, Single line ===== */
.ns-seg { display: inline-flex; border: 1.5px solid #9fc4e6; border-radius: 999px; overflow: hidden; background: #fff; }
.ns-seg button { font: 800 12px 'Segoe UI', system-ui; letter-spacing: .08em; padding: 9px 18px; border: 0; background: none; color: #0b4a86; cursor: pointer; }
.ns-seg button.on { background: #0b6fa8; color: #fff; }
.ns-hdr2 { display: flex; align-items: center; gap: 12px; }
.ns-tb11 { grid-template-columns: repeat(11, minmax(0, 1fr)); }

/* transformer faceplates */
.tf-grp { margin-bottom: 14px; }
.tf-grp h3 { display: flex; align-items: center; gap: 10px; font: 800 18px 'Segoe UI', system-ui; color: color-mix(in srgb, var(--c) 55%, #0c1c27); margin: 6px 2px 8px; text-transform: none; letter-spacing: 0; }
.tf-grp h3 em { font: 700 13px 'Segoe UI', system-ui; font-style: normal; color: #3f5361; margin-left: 6px; }
.lg { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--c) 14%, #fff); border: 2.5px solid color-mix(in srgb, var(--c) 40%, #fff); flex: none; }
.lg svg { width: 60%; height: 60%; fill: none; stroke: var(--c); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 12px; }
.tfc { --rc: #2fa05f; display: flex; flex-direction: column; gap: 9px; text-align: left; background: #fff; border: 1.5px solid #d3dce3; border-top: 6px solid var(--c); border-radius: 16px; padding: 10px 14px 12px; cursor: pointer; font: inherit; color: #14222c; box-shadow: 0 3px 10px rgba(11, 58, 74, .08); text-transform: none; letter-spacing: 0; transition: .15s; }
.tfc.s-warn { --rc: #e0a500; } .tfc.s-bad { --rc: #e2253f; }
.tfc:hover { border-color: var(--c); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(11, 58, 74, .16); }
.tfc .top { display: flex; align-items: center; gap: 8px; } .tfc .pn { font: 700 12.5px 'Segoe UI', system-ui; color: color-mix(in srgb, var(--c) 55%, #0c1c27); flex: 1; }
.tfc .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--rc); }
.tfc .nm { font: 800 19px 'Segoe UI', system-ui; color: #0d3d66; }
.tfc .mid { display: flex; align-items: center; gap: 12px; } .tfc .ring { width: 86px; height: 86px; flex: none; } .tfc .rp { font: 800 21px 'Segoe UI', system-ui; fill: #14222c; }
.tfc .val b { display: block; font: 800 31px/1.05 'Segoe UI', system-ui; color: #d9692a; font-variant-numeric: tabular-nums; } .tfc .val b i { font: 700 14px 'Segoe UI', system-ui; font-style: normal; margin-left: 4px; }
.tfc .val em { font: 700 13px 'Segoe UI', system-ui; font-style: normal; color: #34566a; }
.tfc .rows { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .tfc .rows span { background: #f3f6f8; border-radius: 8px; padding: 5px 8px; }
.tfc .rows em { display: block; font: 800 10px 'Segoe UI', system-ui; font-style: normal; color: #566b79; letter-spacing: .08em; } .tfc .rows b { font: 800 14px 'Segoe UI', system-ui; color: #14222c; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tfc .soon { display: flex; gap: 6px; } .tfc .soon span { flex: 1; border: 1.5px dashed #c6d1d9; border-radius: 8px; padding: 4px 8px; font: 600 11.5px 'Segoe UI', system-ui; color: #566b79; } .tfc .soon b { color: #8aa0ae; }

/* switchgear faceplates */
.swf-lu { margin-bottom: 12px; }
.swf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 12px; margin-top: 10px; }
.swf-one-row { grid-template-columns: minmax(215px, 260px); margin-top: 0; }
.swf { display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden; background: linear-gradient(180deg, #f8fbfd, #e8eef2); border: 2px solid #cfd9e0; border-radius: 16px 16px 10px 10px; cursor: pointer; font: inherit; color: #14222c; box-shadow: 0 3px 10px rgba(11, 58, 74, .1); text-transform: none; letter-spacing: 0; transition: .15s; }
.swf:hover { border-color: var(--c); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(11, 58, 74, .18); }
.swf .hd { display: flex; align-items: center; gap: 9px; padding: 9px 12px; color: #fff; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 66%, #000)); }
.swf .hd .lg { width: 32px; height: 32px; background: #fff; border-color: rgba(255, 255, 255, .55); }
.swf .pn { font: 800 15px/1.15 'Segoe UI', system-ui; display: flex; flex-direction: column; } .swf .pn em { font: 700 9.5px 'Segoe UI', system-ui; font-style: normal; letter-spacing: .1em; opacity: .9; }
.swf.inc .hd { background: linear-gradient(135deg, #2f8be0, #0f55a6); } .swf.cpl .hd { background: linear-gradient(135deg, #1d4c5f, #0b3a4a); }
.swf .scr { margin: 10px 10px 8px; background: #16222b; border-radius: 10px; padding: 9px 12px; color: #fff; display: flex; flex-direction: column; gap: 3px; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .5); }
.swf .st { display: flex; align-items: center; gap: 8px; font: 800 12.5px 'Segoe UI', system-ui; letter-spacing: .1em; } .swf .st i { width: 12px; height: 12px; border-radius: 50%; background: #8195a3; }
.swf.cb-closed .st i { background: #4fd66b; box-shadow: 0 0 9px #4fd66b; } .swf.cb-open .st i { background: #9aa9b5; box-shadow: none; } .swf.cb-tripped .st i { background: #ffb020; box-shadow: 0 0 9px #ffb020; }
.swf .rd b { font: 800 29px/1.1 'Segoe UI', system-ui; font-variant-numeric: tabular-nums; } .swf .rd b u { font: 700 13px 'Segoe UI', system-ui; text-decoration: none; margin-left: 5px; color: #9fd3f7; }
.swf .rd em { display: block; font: 600 13px 'Segoe UI', system-ui; font-style: normal; color: #c8d6e0; }
.swf .lamps { display: flex; gap: 14px; padding: 0 12px 6px; } .swf .lp { display: flex; align-items: center; gap: 5px; font: 800 10.5px 'Segoe UI', system-ui; letter-spacing: .06em; color: #34566a; } .swf .lp i { width: 10px; height: 10px; border-radius: 50%; background: #c3ced7; }
.swf .cbl-closed i { background: #3aa856; } .swf .cbl-open i { background: #9aa9b5; } .swf .cbl-tripped i { background: #f2a100; }
.swf .rl-ok i { background: #3aa856; } .swf .rl-warn i { background: #f2a100; } .swf .rl-bad i { background: #e2253f; }
.swf .ft { padding: 0 12px 10px; font: 600 12px 'Segoe UI', system-ui; color: #3f5361; }
.swf.trip { border-color: #f2a100; animation: nsblink 1.1s ease-in-out infinite; }
.swf-one { display: flex; gap: 14px; align-items: stretch; margin-bottom: 12px; } .swf-one .swf { width: 260px; flex: none; cursor: default; }
.swf-nav { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; flex: 1; background: #fff; border-radius: 14px; padding: 12px; }
.swf-nav button { font: 700 13.5px 'Segoe UI', system-ui; padding: 8px 14px; border-radius: 999px; background: #fff; border: 2px solid color-mix(in srgb, var(--c) 45%, #fff); color: color-mix(in srgb, var(--c) 55%, #0c1c27); cursor: pointer; }
.swf-nav button.on { background: var(--c); border-color: var(--c); color: #fff; }
.ns-sw-detail .swp { --sw-red: #0b6fa8; border-radius: 16px; border: 1.5px solid #d3dce3; font-family: 'Segoe UI', system-ui, sans-serif; margin-top: 0; }
.ns-sw-detail .swp-tag.cl { background: #e2253f; border-color: #e2253f; }
.ns-sw-detail .swp-nav { border-bottom-color: #0b6fa8; }
.ns-sw-detail .swp-tab { border-radius: 999px; }

/* plants: transformer block = faceplate + its LDB loads */
.pl-tr { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; margin-bottom: 14px; background: #fff; border-radius: 16px; padding: 12px; border-left: 6px solid var(--c); }
.tfp { display: flex; flex-direction: column; gap: 6px; color: #fff; border-radius: 14px; padding: 12px 14px; background: linear-gradient(160deg, #2f8be0, #0f55a6); position: relative; overflow: hidden; text-transform: none; letter-spacing: 0; }
.tfp::after { content: ''; position: absolute; inset: 0 0 55% 0; background: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0)); pointer-events: none; }
.tfp .rm { align-self: flex-start; font: 800 10.5px 'Segoe UI', system-ui; letter-spacing: .06em; background: rgba(255, 255, 255, .2); border-radius: 999px; padding: 3px 10px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tfp .sym { width: 56px; height: 56px; } .tfp b { font: 800 18px/1.15 'Segoe UI', system-ui; }
.tfp strong { font: 800 32px/1.05 'Segoe UI', system-ui; font-variant-numeric: tabular-nums; } .tfp strong i { font: 700 14px 'Segoe UI', system-ui; font-style: normal; margin-left: 5px; color: #d6ecff; }
.tfp .bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .28); overflow: hidden; } .tfp .bar s { display: block; height: 100%; background: #fff; border-radius: 4px; }
.tfp.s-warn .bar s { background: #ffd166; } .tfp.s-bad .bar s { background: #ff8a98; }
.tfp em { font: 700 13px 'Segoe UI', system-ui; font-style: normal; color: #d6ecff; } .tfp .ch { font: 700 12px 'Segoe UI', system-ui; color: #fff; opacity: .95; }
.pl-loads { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 8px; align-content: start; }
.ld { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; column-gap: 8px; align-items: center; background: color-mix(in srgb, var(--c) 6%, #fff); border: 1.5px solid color-mix(in srgb, var(--c) 28%, #fff); border-radius: 12px; padding: 8px 12px 9px; text-transform: none; letter-spacing: 0; }
.ld .rk { width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--c) 18%, #fff); color: color-mix(in srgb, var(--c) 60%, #0c1c27); font: 800 11px/22px 'Segoe UI', system-ui; text-align: center; }
.ld b { font: 700 14px 'Segoe UI', system-ui; color: color-mix(in srgb, var(--c) 55%, #0c1c27); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld strong { font: 800 21px 'Segoe UI', system-ui; color: #d9692a; font-variant-numeric: tabular-nums; } .ld strong i { font: 700 12px 'Segoe UI', system-ui; font-style: normal; margin-left: 3px; }
.ld u { grid-column: 1 / -1; display: block; height: 5px; border-radius: 3px; background: #e6edf2; margin-top: 6px; text-decoration: none; } .ld u s { display: block; height: 100%; border-radius: 3px; background: var(--c); }

/* single line: electrical path */
.sl-wrap { display: flex; flex-direction: column; }
.sl-bus { background: #fff; border-radius: 16px; padding: 12px; }
.sl-busbar { display: flex; align-items: baseline; gap: 16px; background: linear-gradient(180deg, #0b3a4a, #145a70); color: #fff; border-radius: 12px; padding: 10px 18px; text-transform: none; letter-spacing: 0; }
.sl-busbar b { font: 800 17px 'Segoe UI', system-ui; letter-spacing: .06em; } .sl-busbar em { font: 600 13px 'Segoe UI', system-ui; font-style: normal; color: #c9e3ec; }
.sl-band { display: flex; align-items: flex-start; margin-top: 10px; padding: 10px; border-radius: 14px; background: color-mix(in srgb, var(--c) 7%, #fff); border-left: 6px solid var(--c); text-transform: none; letter-spacing: 0; }
.sl-feed { flex: none; width: 250px; align-self: center; display: flex; align-items: center; gap: 10px; color: #fff; border-radius: 14px; padding: 10px 12px; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 66%, #000)); }
.sl-feed .lg { width: 38px; height: 38px; background: #fff; border-color: rgba(255, 255, 255, .5); }
.sl-feed .tx { flex: 1; min-width: 0; } .sl-feed b { display: block; font: 800 15px/1.15 'Segoe UI', system-ui; } .sl-feed em { font: 700 10px 'Segoe UI', system-ui; font-style: normal; letter-spacing: .1em; opacity: .9; }
.sl-feed strong { font: 800 23px 'Segoe UI', system-ui; font-variant-numeric: tabular-nums; } .sl-feed strong i { font: 700 12px 'Segoe UI', system-ui; font-style: normal; margin-left: 3px; }
.sl-band .kids { display: flex; flex-direction: column; gap: 8px; margin-left: 24px; position: relative; align-self: center; }
.sl-band .kids::before { content: ''; position: absolute; left: -24px; top: 50%; width: 24px; border-top: 3px solid var(--c); }
.sl-band .kid { position: relative; padding-left: 24px; display: flex; align-items: center; }
.sl-band .kid::before { content: ''; position: absolute; left: 0; top: 50%; width: 24px; border-top: 3px solid var(--c); }
.sl-band .kid::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; border-left: 3px solid var(--c); }
.sl-band .kid:first-child::after { top: 50%; } .sl-band .kid:last-child::after { bottom: 50%; } .sl-band .kid:only-child::after { display: none; }
.sl-band .tn { display: flex; align-items: center; }
.sl-n { position: relative; display: flex; align-items: center; gap: 9px; min-width: 215px; border-radius: 12px; padding: 7px 11px 12px; background: #fff; }
.sl-n .tx { flex: 1; min-width: 0; } .sl-n b { display: block; font: 800 13px/1.15 'Segoe UI', system-ui; color: #14222c; } .sl-n em { font: 600 11px 'Segoe UI', system-ui; font-style: normal; color: #3f5361; }
.sl-n strong { font: 800 16px 'Segoe UI', system-ui; color: #d9692a; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sl-n .sy { width: 26px; height: 26px; flex: none; }
.sl-n.rmu { background: #e7eff3; border: 2px solid #0b3a4a; color: #0b3a4a; }
.sl-n.tr { border: 2px solid var(--c); color: var(--c); } .sl-n.tr b { color: color-mix(in srgb, var(--c) 40%, #0c1c27); }
.sl-n.tr u { position: absolute; left: 11px; right: 11px; bottom: 4px; height: 4px; border-radius: 2px; background: #e3ebf1; text-decoration: none; } .sl-n.tr u s { display: block; height: 100%; border-radius: 2px; background: #3aa856; }
.sl-n.tr.s-warn u s { background: #e0a500; } .sl-n.tr.s-bad u s { background: #e2253f; }
.sl-n.grp { border: 2px dashed #9db1be; background: #f6f9fb; } .sl-n.tie { border: 2px solid #7a5cc4; background: #f3effb; padding-bottom: 7px; } .sl-n.tie b { color: #5b3fa8; }
.sl-cpl { display: flex; align-items: center; gap: 12px; margin: 6px 24px; } .sl-cpl i { flex: 1; border-top: 6px solid #111; border-radius: 3px; } .sl-cpl b { font: 800 12px 'Segoe UI', system-ui; letter-spacing: .14em; color: #34566a; }
.tfc .rows { grid-template-columns: 1.5fr .9fr 1fr; } .tfc .rows b { font-size: 13px; }

/* ===== round 6: Home = mockup F proportions (header, tiles, switch cards, map) ===== */
body.ns header { padding: 6px 18px; }
body.ns .hd-logo img { height: 46px; }
body.ns .hd-name { font-size: 17px; letter-spacing: .08em; } body.ns .hd-sub { font-size: 11px; }
body.ns .ns-style button { padding: 8px 14px; }
body.ns-lt #homeView { padding: 12px 14px 20px; }
.ns-tb { gap: 8px; margin-bottom: 12px; } .tt { padding: 9px 6px 14px; gap: 5px; } .tt svg { width: 30px; height: 30px; } .tt b { font-size: 12.5px; }
.sw { gap: 12px; margin-bottom: 12px; } .sc { padding: 10px 18px; } .sc .ch { width: 46px; height: 46px; font-size: 20px; } .sc b { font-size: 34px; }
.ns-card { padding: 14px 16px 12px; }
.ns-map .gn { font-size: 20px; } .ns-map .gv { font-size: 38px; } .ns-map .gu { font-size: 14px; }
body.ns .hd-logo, body.ns .hd-logo img { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; border-radius: 0 !important; }

/* ===== round 7: header with exactly mockup F dimensions (logo 46px, two text lines, ~62px tall) ===== */
body.ns header { padding: 8px 18px !important; }
body.ns header h1 { display: grid !important; grid-template-columns: auto 1fr; column-gap: 12px !important; row-gap: 0 !important; align-items: center; font-size: 17px !important; max-width: none !important; flex: none !important; margin: 0; line-height: 1.25; }
body.ns .hd-logo { grid-row: 1 / span 2; width: auto !important; height: auto !important; display: block; }
body.ns .hd-logo img { height: 46px !important; width: auto !important; display: block; filter: none !important; }
body.ns .hd-name { grid-column: 2; align-self: end; font: 700 17px/1.25 'Segoe UI', system-ui, sans-serif !important; letter-spacing: .08em; color: #0b3a4a !important; text-shadow: none !important; }
body.ns .hd-sub { grid-column: 2; align-self: start; padding: 0 !important; margin: 0; font: 500 11px/1.25 'Segoe UI', system-ui, sans-serif !important; letter-spacing: 0 !important; color: #5d6e7b !important; flex-basis: auto; }
body.ns .hd-sub::before { display: none !important; }
body.ns .hd-top { margin: 0 !important; min-height: 0; }

/* ===== round 8: single line boxes fit, header never overflows, overview cards ===== */
.ns-hd { flex-wrap: wrap; } .ns-hd > div:first-child { min-width: 0; flex: 1 1 420px; } .ns-hd p { max-width: 900px; }
.sl-band { overflow-x: auto; }
.sl-n { width: 218px; min-width: 218px; box-sizing: border-box; align-items: center; }
.sl-n .tx { min-width: 0; } .sl-n b { font-size: 12.5px; white-space: normal; overflow-wrap: anywhere; } .sl-n strong { flex: none; font-size: 15px; }
.sl-n.tie { width: 218px; } .sl-n.tie b { white-space: normal; }
.sl-band .kids { margin-left: 22px; gap: 8px; } .sl-band .kid { padding-left: 22px; } .sl-band .kids::before, .sl-band .kid::before { width: 22px; } .sl-band .kids::before { left: -22px; }
.sl-feed { width: 240px; }
.stc-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.stc { display: flex; align-items: center; gap: 10px; border: 2px solid #d9e1e7; background: #f6f9fb; border-radius: 14px; padding: 8px 12px; text-transform: none; letter-spacing: 0; }
.stc .ch { width: 38px; height: 38px; border-radius: 50%; background: color-mix(in srgb, var(--g) 16%, #fff); color: var(--g); display: flex; align-items: center; justify-content: center; font: 800 15px 'Segoe UI', system-ui; flex: none; }
.stc b { display: block; font: 800 22px/1.1 'Segoe UI', system-ui; color: #14222c; font-variant-numeric: tabular-nums; white-space: nowrap; } .stc em { font: 700 10.5px 'Segoe UI', system-ui; font-style: normal; color: #34566a; letter-spacing: .06em; }
.swf-lh { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; } .swf-lh h3 { font: 800 18px 'Segoe UI', system-ui; color: #0b3a4a; letter-spacing: .03em; text-transform: none; } .swf-lh span { font: 600 13px 'Segoe UI', system-ui; color: #3f5361; }
.sc .ch { font-size: 17px; } .sc i { max-width: 260px; }
@media (max-width: 1300px) { .stc-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ===== round 9: cubicle page (measurements, events, faults, protection) in the new style ===== */
.ns-sw-detail .swp { --sw-bg: transparent; --sw-card: #fff; --sw-ink: #14222c; --sw-ink2: #1d3646; --sw-mut: #34566a; --sw-mut2: #566b79; --sw-line: #d9e1e7; --sw-line2: #e6ecf0;
  background: transparent; border: 0; border-radius: 0; font: 600 14.5px/1.5 'Segoe UI', system-ui, sans-serif; text-transform: none; letter-spacing: 0; overflow: visible; }
.ns-sw-detail .swp * { font-family: 'Segoe UI', system-ui, sans-serif !important; }
.ns-sw-detail .swp-top { background: #fff; border-radius: 16px 16px 0 0; padding: 14px 20px; border: 1.5px solid #d3dce3; border-bottom: 0; }
.ns-sw-detail .swp-top b { font-size: 21px; font-weight: 800; color: #0b3a4a; letter-spacing: .01em; }
.ns-sw-detail .swp-top small { font-size: 13.5px; font-weight: 600; color: #3f5361; letter-spacing: 0; margin-top: 3px; }
.ns-sw-detail .swp-tag { font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: #eef2f5; border: 1.5px solid #d3dce3; color: #34566a; }
.ns-sw-detail .swp-tag.op { background: #dcf3e4; border-color: #8fd1a8; color: #17803f; } .ns-sw-detail .swp-tag.warn, .ns-sw-detail .swp-tag.demo { background: #fdf0cc; border-color: #e6c46a; color: #8a5a00; }
.ns-sw-detail .swp-nav { background: #fff; border: 1.5px solid #d3dce3; border-top: 1px solid #e6ecf0; border-bottom: 4px solid #0b6fa8; border-radius: 0 0 16px 16px; padding: 10px 16px; gap: 8px; margin-bottom: 12px; }
.ns-sw-detail .swp-tab { font-size: 14px; font-weight: 700; padding: 8px 16px; border-radius: 999px; background: #fff; border: 2px solid #c6d1d9; color: #34566a; }
.ns-sw-detail .swp-tab .ct { font-size: 12px; background: #e6edf2; border-radius: 999px; padding: 1px 8px; }
.ns-sw-detail .swp-tab.on { background: #0b6fa8; border-color: #0b6fa8; color: #fff; } .ns-sw-detail .swp-tab.on .ct { background: #fff; color: #0b6fa8; }
.ns-sw-detail .swp-rf { background: #fff; border: 1.5px solid #d3dce3; border-radius: 16px; margin-bottom: 12px; }
.ns-sw-detail .swp-vw { margin: 0 0 12px; background: #fff; border: 1.5px solid #d3dce3; border-radius: 16px; padding: 16px 18px; gap: 12px; }
.ns-sw-detail .swp-vh { border-bottom: 2px solid #e6ecf0; padding-bottom: 9px; }
.ns-sw-detail .swp-vh b { font-size: 18px; font-weight: 800; color: #0b3a4a; letter-spacing: .01em; }
.ns-sw-detail .swp-vh code { font-size: 13px; font-weight: 700; color: #34566a; }
.ns-sw-detail .swp-lbl, .ns-sw-detail .swp-grp { font-size: 13px; font-weight: 800; letter-spacing: .06em; color: #0b4a86; margin-top: 8px; text-transform: uppercase; }
.ns-sw-detail .swp-kv { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ns-sw-detail .swp-kv > div { background: #f6f9fb; border: 2px solid #d9e1e7; border-top: 5px solid var(--c, #c3ced7); border-radius: 14px; padding: 10px 14px 12px; }
.ns-sw-detail .swp-kv span { font-size: 13px; font-weight: 800; letter-spacing: .04em; color: #34566a; }
.ns-sw-detail .swp-kv b { font-size: 25px; font-weight: 800; color: #14222c; margin-top: 2px; font-variant-numeric: tabular-nums; }
.ns-sw-detail .swp-kv .bar { height: 7px; border-radius: 4px; margin-top: 8px; } .ns-sw-detail .swp-kv .bar i { border-radius: 4px; }
.ns-sw-detail .swp-mg { grid-template-columns: 260px minmax(0, 1fr); gap: 16px; }
.ns-sw-detail .swp-sld { background: #f6f9fb; border: 2px solid #d9e1e7; border-radius: 16px; padding: 12px; }
.ns-sw-detail .swp-sld text { font-weight: 700; }
.ns-sw-detail .swp-nm, .ns-sw-detail .swp-empty { font-size: 14px; font-weight: 600; color: #34566a; background: #f6f9fb; border: 2px dashed #c6d1d9; border-radius: 14px; padding: 14px 16px; letter-spacing: 0; }
.ns-sw-detail .swp-muted { font-size: 13.5px; font-weight: 600; color: #3f5361; letter-spacing: 0; }
.ns-sw-detail .swp-chip { font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 2px solid #d3dce3; } .ns-sw-detail .swp-chip.on { border-color: var(--zc); }
.ns-sw-detail .swp table { font-size: 14px; } .ns-sw-detail .swp th { font-size: 12px; font-weight: 800; letter-spacing: .06em; color: #34566a; background: #eef2f5; padding: 9px 10px; border-bottom: 2px solid #d3dce3; }
.ns-sw-detail .swp td { padding: 9px 10px; font-weight: 600; color: #1d3646; font-variant-numeric: tabular-nums; } .ns-sw-detail .swp td.sec { background: #eaf4fd; color: #0b4a86; font-weight: 800; letter-spacing: .08em; }
.ns-sw-detail .swp-fr { border: 2px solid #d9e1e7; border-radius: 14px; } .ns-sw-detail .swp-frh { background: #f6f9fb; padding: 11px 14px; } .ns-sw-detail .swp-frh .t { font-size: 13.5px; font-weight: 700; color: #34566a; }
.ns-sw-detail .swp-fn { border: 2px solid #d9e1e7; border-left: 6px solid var(--c); border-radius: 14px; padding: 12px 16px; } .ns-sw-detail .swp-fn b { font-size: 15px; font-weight: 800; } .ns-sw-detail .swp-fn small { font-size: 12.5px; font-weight: 600; color: #3f5361; } .ns-sw-detail .swp-fn .an { font-size: 14px; font-weight: 800; }
.ns-sw-detail .swp-txt { font-size: 14.5px; font-weight: 600; letter-spacing: 0; color: #1d3646; }
.ns-sw-detail .swp-rows > div { grid-template-columns: 200px minmax(0, 1fr); padding: 10px 2px; font-size: 14px; } .ns-sw-detail .swp-rows dd { font-size: 14px; font-weight: 600; }
.ns-sw-detail .swp-note { border-left-width: 5px; border-radius: 0 12px 12px 0; padding: 11px 14px; background: #f6f9fb; } .ns-sw-detail .swp-note b { font-size: 14px; } .ns-sw-detail .swp-note span { font-size: 14px; color: #1d3646; }
.ns-sw-detail .swp-trc { border: 2px solid #d9e1e7; border-radius: 14px; background: #f6f9fb; } .ns-sw-detail .swp-rt { font-size: 13px; font-weight: 700; border: 2px solid #d9e1e7; border-radius: 8px; }
.ns-sw-detail .swp-led { font-size: 13px; } .ns-sw-detail .swp-led b { font-size: 13px; }

/* ===== round 10: the big cubicle faceplate ===== */
.swf-one { margin-bottom: 12px; } .swf-one .swf-nav { width: 100%; }
.ns-sw-detail .fp { background: #fff; border: 2px solid #d3dce3; border-top: 0; border-radius: 20px; overflow: hidden; box-shadow: 0 6px 20px rgba(11, 58, 74, .1); }
.fp-hd { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 22px; color: #fff; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 62%, #000)); }
.fp-hd .lg { width: 54px; height: 54px; background: #fff; border-color: rgba(255, 255, 255, .55); } .fp-hd .lg svg { width: 60%; height: 60%; stroke: var(--c); }
.fp-hd .hdt { flex: 1; min-width: 260px; } .fp-hd h2 { font: 800 24px/1.15 'Segoe UI', system-ui !important; letter-spacing: .01em; color: #fff; text-transform: none; } .fp-hd p { font: 600 13.5px 'Segoe UI', system-ui !important; opacity: .92; margin-top: 3px; }
.fp-hd .ch { display: flex; gap: 8px; flex-wrap: wrap; }
.fp-chip { font: 800 12px 'Segoe UI', system-ui !important; letter-spacing: .06em; padding: 6px 13px; border-radius: 999px; background: rgba(255, 255, 255, .22); color: #fff; border: 1.5px solid rgba(255, 255, 255, .5); }
.fp-chip.ok { background: #dcf3e4; color: #17803f; border-color: #dcf3e4; } .fp-chip.red { background: #e2253f; border-color: #e2253f; } .fp-chip.warn { background: #fdf0cc; color: #8a5a00; border-color: #fdf0cc; }
.fp-body { display: grid; grid-template-columns: 300px minmax(0, 1fr) 360px; gap: 16px; padding: 16px 18px; }
.fp-low { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; padding: 0 18px 16px; }
.fp-sec { background: #f6f9fb; border: 2px solid #e1e8ed; border-radius: 16px; padding: 12px 14px 14px; margin-bottom: 12px; min-width: 0; }
.fp-low .fp-sec, .fp-c1 .fp-sec:last-child, .fp-c2 .fp-sec:last-child, .fp-c3 .fp-sec:last-child { margin-bottom: 0; }
.fp-sec h4 { font: 800 13px 'Segoe UI', system-ui !important; letter-spacing: .07em; color: #0b4a86; text-transform: uppercase; margin-bottom: 9px; }
.fp-trend { margin: 0 18px 18px; background: #fff; } .fp-trend .swp-vh { display: none; }
.ft-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 10px; } .ft-row.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ft { background: #fff; border: 2px solid #d9e1e7; border-top: 5px solid var(--c); border-radius: 14px; padding: 8px 12px 10px; min-width: 0; }
.ft em { display: block; font: 800 11.5px 'Segoe UI', system-ui !important; font-style: normal; letter-spacing: .05em; color: #34566a; text-transform: uppercase; }
.ft b { display: block; font: 800 23px/1.15 'Segoe UI', system-ui !important; color: #14222c; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ft u { display: block; height: 6px; border-radius: 3px; background: #e6edf2; margin-top: 6px; text-decoration: none; } .ft u s { display: block; height: 100%; border-radius: 3px; background: var(--c); }
.fp-load { display: grid; grid-template-columns: auto minmax(0, 1fr) 54px; gap: 12px; align-items: center; margin-top: 10px; font: 700 13px 'Segoe UI', system-ui !important; color: #34566a; } .fp-load i { height: 9px; border-radius: 5px; background: #e6edf2; display: block; } .fp-load s { display: block; height: 100%; border-radius: 5px; background: #0b6fa8; } .fp-load b { text-align: right; color: #14222c; }
.fp-relay { overflow: hidden; border-radius: 12px; } .fp-relay > * { max-width: 100%; }
.fp-sld { display: flex; justify-content: center; background: #fff; border-radius: 12px; padding: 8px; } .fp-sld svg { max-width: 100%; height: auto; } .fp-sld text { font-family: 'Segoe UI', system-ui !important; font-weight: 700; }
.fp-grp { font: 800 11.5px 'Segoe UI', system-ui !important; letter-spacing: .08em; color: #566b79; margin: 8px 0 4px; text-transform: uppercase; }
.fp-fn { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 8px; align-items: center; background: #fff; border: 2px solid #e1e8ed; border-left: 6px solid var(--c); border-radius: 12px; padding: 7px 10px; margin-bottom: 6px; }
.fp-fn b { font: 800 13.5px 'Segoe UI', system-ui !important; color: var(--c); } .fp-fn span { font: 700 13.5px 'Segoe UI', system-ui !important; color: #14222c; } .fp-fn i { font: 700 12.5px 'Segoe UI', system-ui !important; font-style: normal; color: #34566a; white-space: nowrap; }
.fp-note { border-left: 5px solid var(--k); background: #fff; border-radius: 0 12px 12px 0; padding: 9px 12px; margin-bottom: 7px; } .fp-note b { display: block; font: 800 13.5px 'Segoe UI', system-ui !important; color: #14222c; } .fp-note span { font: 600 13px/1.5 'Segoe UI', system-ui !important; color: #1d3646; }
.fp-empty { font: 600 14px 'Segoe UI', system-ui !important; color: #34566a; background: #fff; border: 2px dashed #c6d1d9; border-radius: 12px; padding: 12px 14px; }
.fp-mut { font: 600 12.5px/1.5 'Segoe UI', system-ui !important; color: #3f5361; margin-top: 8px; }
.fp-fault { background: #fff; border: 2px solid #e1e8ed; border-radius: 12px; padding: 9px 12px; margin-bottom: 8px; } .fp-fault .h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; } .fp-fault .h b { font: 800 14px 'Segoe UI', system-ui !important; color: #b3122a; } .fp-fault .h span { font: 700 13px 'Segoe UI', system-ui !important; color: #34566a; } .fp-fault .h i { font: 700 13px 'Segoe UI', system-ui !important; font-style: normal; color: #14222c; }
.fp-fault .v { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; } .fp-fault .v span { font: 600 12.5px 'Segoe UI', system-ui !important; } .fp-fault .v em { font-style: normal; color: #566b79; margin-right: 6px; } .fp-fault .v b { color: #14222c; }
@media (max-width: 1500px) { .fp-body { grid-template-columns: 280px minmax(0, 1fr); } .fp-c3 { grid-column: 1 / -1; } .fp-low { grid-template-columns: 1fr; } }

/* ===== round 11: faceplate with tabs: header + key numbers, then one designed view per tab ===== */
.fp-hd { display: block; padding: 14px 22px 16px; }
.fp-hd .top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.fp-hd .kps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.fp-hd .kp { background: rgba(255, 255, 255, .16); border: 1.5px solid rgba(255, 255, 255, .35); border-radius: 14px; padding: 8px 16px; }
.fp-hd .kp em { display: block; font: 800 11.5px 'Segoe UI', system-ui !important; font-style: normal; letter-spacing: .08em; text-transform: uppercase; opacity: .92; }
.fp-hd .kp b { font: 800 30px/1.1 'Segoe UI', system-ui !important; font-variant-numeric: tabular-nums; } .fp-hd .kp b i { font: 700 14px 'Segoe UI', system-ui !important; font-style: normal; margin-left: 6px; opacity: .9; }
.ns-sw-detail .fp .swp-nav { border-radius: 0; border-left: 0; border-right: 0; margin-bottom: 0; }
.fp-main { padding: 0; } .fp-main > .fp-pane { margin: 16px 18px 18px; }
.fp-main .fp-body { padding-top: 16px; }
.fp-gauge { width: 100%; max-width: 190px; display: block; margin: 0 auto; } .fp-gauge .g1 { font: 800 30px 'Segoe UI', system-ui; fill: #14222c; } .fp-gauge .g2 { font: 700 12px 'Segoe UI', system-ui; fill: #34566a; }
.fp-ph { display: flex; justify-content: space-around; align-items: flex-end; height: 128px; padding-top: 6px; } .fp-ph div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; } .fp-ph i { width: 34px; border-radius: 8px 8px 3px 3px; display: block; }
.fp-ph b { font: 800 14px 'Segoe UI', system-ui !important; color: #14222c; } .fp-ph em { font: 800 11px 'Segoe UI', system-ui !important; font-style: normal; color: #34566a; }
.fp-lamp { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 4px; border-bottom: 1px solid #e1e8ed; } .fp-lamp:last-child { border: 0; }
.fp-lamp i { width: 13px; height: 13px; border-radius: 50%; display: block; box-shadow: 0 0 0 3px rgba(0, 0, 0, .06); } .fp-lamp span { font: 700 13.5px 'Segoe UI', system-ui !important; color: #34566a; } .fp-lamp b { font: 800 13.5px 'Segoe UI', system-ui !important; color: #14222c; }
.fp-tl { display: flex; flex-direction: column; gap: 8px; }
.fp-ev { display: grid; grid-template-columns: 190px 14px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: #fff; border: 2px solid #e1e8ed; border-left: 6px solid var(--k); border-radius: 14px; padding: 10px 14px; }
.fp-ev .tm { font: 700 13px 'Segoe UI', system-ui !important; color: #34566a; font-variant-numeric: tabular-nums; } .fp-ev i { width: 12px; height: 12px; border-radius: 50%; background: var(--k); display: block; }
.fp-ev b { display: block; font: 800 14px 'Segoe UI', system-ui !important; color: #14222c; } .fp-ev span:not(.tm) { font: 600 13.5px 'Segoe UI', system-ui !important; color: #1d3646; } .fp-ev em { font: 800 11px 'Segoe UI', system-ui !important; font-style: normal; letter-spacing: .08em; color: var(--k); background: color-mix(in srgb, var(--k) 12%, #fff); border-radius: 999px; padding: 4px 10px; }
.fp-pf { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto 24px; gap: 14px; align-items: center; background: #fff; border: 2px solid #e1e8ed; border-left: 8px solid var(--c); border-radius: 16px; padding: 12px 16px; margin-bottom: 8px; cursor: pointer; transition: .15s; }
.fp-pf:hover { border-color: var(--c); transform: translateX(3px); box-shadow: 0 6px 16px rgba(11, 58, 74, .12); }
.fp-pf .an { font: 800 20px 'Segoe UI', system-ui !important; color: var(--c); } .fp-pf .nm { font: 800 16px 'Segoe UI', system-ui !important; color: #14222c; } .fp-pf .ch2 { display: flex; gap: 8px; } .fp-pf .ch2 i { font: 800 13px 'Segoe UI', system-ui !important; font-style: normal; color: #0b3a4a; background: #eaf4fd; border-radius: 999px; padding: 5px 12px; white-space: nowrap; } .fp-pf u { text-decoration: none; font: 800 22px 'Segoe UI', system-ui; color: #8aa0ae; }
.fp-pane .fp-note { padding: 12px 16px; margin-bottom: 9px; } .fp-pane .fp-note b { font-size: 15px; } .fp-pane .fp-note span { font-size: 14px; }
.fp-pane .swp-fr, .fp-pane .swp-fn { background: #fff; }
@media (max-width: 1100px) { .fp-hd .kps { grid-template-columns: repeat(2, 1fr); } .fp-ev { grid-template-columns: 1fr; } }

/* ===== CLASSIC look: the added NEW | CLASSIC switch must not squeeze or widen the header ===== */
body:not(.ns) { overflow-x: hidden; }
body:not(.ns) .hd-top { flex-wrap: wrap; row-gap: 10px; }
body:not(.ns) header h1 { flex: 1 1 340px !important; max-width: none !important; min-width: 0; }
body:not(.ns) .ws-tools.hd-tools { flex: 1 1 260px !important; max-width: 560px; margin: 0 12px; min-width: 0; }
body:not(.ns) .ns-style { margin: 0 12px 0 0; flex: none; }
body:not(.ns) #liveClock { flex: none; }
@media (max-width: 1250px) { body:not(.ns) .ws-tools.hd-tools { flex-basis: 100% !important; max-width: none; margin: 0; order: 5; } }

/* ===== round 12: plants drill-down ===== */
.rmf { display: flex; flex-direction: column; gap: 6px; border-radius: 14px; padding: 12px 14px; background: linear-gradient(160deg, #f1f6f9, #dbe7ee); border: 2.5px solid #0b3a4a; color: #0b3a4a; text-transform: none; letter-spacing: 0; }
.rmf .rm { align-self: flex-start; font: 800 11px 'Segoe UI', system-ui; letter-spacing: .1em; background: #0b3a4a; color: #fff; border-radius: 999px; padding: 3px 11px; }
.rmf .sym { width: 56px; height: 56px; } .rmf b { font: 800 18px/1.15 'Segoe UI', system-ui; color: #0b3a4a; }
.rmf strong { font: 800 32px/1.05 'Segoe UI', system-ui; font-variant-numeric: tabular-nums; } .rmf strong i { font: 700 14px 'Segoe UI', system-ui; font-style: normal; margin-left: 5px; color: #34566a; } .rmf em { font: 700 13px 'Segoe UI', system-ui; font-style: normal; color: #34566a; }
.ld.dr { cursor: pointer; background: #fff; border-color: var(--c); box-shadow: 0 2px 8px rgba(11, 58, 74, .1); transition: .15s; } .ld.dr:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(11, 58, 74, .18); background: color-mix(in srgb, var(--c) 8%, #fff); }
.ld small { grid-column: 1 / -1; margin-top: 4px; font: 800 11.5px 'Segoe UI', system-ui; color: color-mix(in srgb, var(--c) 60%, #0c1c27); letter-spacing: .04em; }
.pl-bc { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; } .pl-bc .sep { color: #566b79; font: 800 16px 'Segoe UI', system-ui; }
.pl-bc button:not(.ns-btn) { font: 700 14px 'Segoe UI', system-ui; background: #fff; border: 2px solid #c6d1d9; color: #34566a; border-radius: 999px; padding: 6px 14px; cursor: pointer; } .pl-bc button.on { background: #0b6fa8; border-color: #0b6fa8; color: #fff; }

/* ===== round 13: company-logo colours (blue #1c3f8f / #3a68c8, gold #c9973a / #f3d58a) ===== */
body.ns .ns-rail { background: linear-gradient(180deg, #1c3f8f 0%, #15337a 100%); box-shadow: 2px 0 14px rgba(21, 51, 122, .35); }
body.ns .ns-rail button { color: #cfdcff; border-left-color: transparent; transition: background .15s, color .15s; }
body.ns .ns-rail button:hover { background: linear-gradient(135deg, #f3d58a, #c9973a); color: #15337a; }
body.ns .ns-rail button.on { background: linear-gradient(135deg, #e9bf5c, #c9973a); color: #15337a; border-left-color: #8d6215; }
body.ns .ns-rail button.on svg, body.ns .ns-rail button:hover svg { stroke-width: 2; }
body.ns .ns-rail hr { border-top-color: rgba(243, 213, 138, .35); }
.ns-hdr .clk { font: 800 14px 'Segoe UI', system-ui, sans-serif; letter-spacing: .02em; background: linear-gradient(90deg, #1c3f8f 0%, #3a68c8 55%, #c9973a 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; font-variant-numeric: tabular-nums; }
.ns-hdr .mode i { background: #c9973a; }
body.ns .ns-style button.on { background: linear-gradient(135deg, #3a68c8, #1c3f8f); }



/* ===== sleep screen (New style only) ===== */
#nsSleep { display: none; position: fixed; inset: 0; z-index: 9999; overflow: hidden; background: #0d2a5e; color: #fff; font-family: 'Segoe UI', system-ui, sans-serif; cursor: pointer; }
#nsSleep.on { display: block; animation: nsWake .6s ease both; } @keyframes nsWake { from { opacity: 0; } to { opacity: 1; } }
#nsSleep .bg { position: absolute; inset: -4%; background: url(assets/powerhouse.jpg) 50% 26% / cover no-repeat; animation: nsKb 40s ease-in-out infinite alternate; }
@keyframes nsKb { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.08) translate(-1.2%, -1%); } }
#nsSleep .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 22, 56, .55) 0%, rgba(8, 22, 56, .08) 30%, rgba(8, 22, 56, 0) 48%, rgba(8, 22, 56, .78) 100%); }
#nsSleep .top { position: absolute; left: 3vw; right: 3vw; top: 3vh; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
#nsSleep .brand { display: flex; align-items: center; gap: 22px; }
#nsSleep .slg { background: rgba(255, 255, 255, .97); border-radius: 22px; padding: 14px 26px; box-shadow: 0 12px 36px rgba(0, 0, 0, .35); } #nsSleep .slg img { height: clamp(64px, 9vh, 104px); display: block; }
#nsSleep .nm h1 { margin: 0; font: 800 clamp(22px, 2.6vw, 40px) 'Segoe UI'; letter-spacing: .1em; text-shadow: 0 2px 16px rgba(0, 0, 0, .55); }
#nsSleep .nm p { margin: 8px 0 0; display: inline-flex; align-items: center; gap: 8px; font: 700 clamp(14px, 1.4vw, 21px) 'Segoe UI'; letter-spacing: .06em; background: rgba(10, 28, 70, .5); border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(10px); padding: 7px 16px; border-radius: 999px; }
#nsSleep .nm p svg { width: 1.25em; height: 1.25em; fill: none; stroke: #f3d58a; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#nsSleep .wt { text-align: right; background: rgba(10, 28, 70, .5); border: 1px solid rgba(255, 255, 255, .3); backdrop-filter: blur(14px); border-radius: 22px; padding: 12px 26px 12px; box-shadow: 0 12px 34px rgba(0, 0, 0, .3); }
#nsSleep .wt .slt b { font: 800 clamp(44px, 6vw, 92px)/1 'Segoe UI'; font-variant-numeric: tabular-nums; letter-spacing: .02em; text-shadow: 0 2px 14px rgba(0, 0, 0, .4); } #nsSleep .wt .slt em { font: 700 clamp(20px, 2.4vw, 36px) 'Segoe UI'; font-style: normal; color: #f3d58a; margin-left: 8px; font-variant-numeric: tabular-nums; }
#nsSleep .wt .dt { font: 600 clamp(14px, 1.4vw, 21px) 'Segoe UI'; letter-spacing: .04em; color: #dbe8ff; margin-top: 2px; }
#nsSleep .md { margin-top: 8px; display: inline-block; font: 700 12px 'Segoe UI'; letter-spacing: .14em; color: #f3d58a; } #nsSleep .md i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #f3d58a; margin-right: 8px; }
#nsSleep .vals { position: absolute; left: 50%; bottom: 6vh; transform: translateX(-50%); width: min(1500px, 94vw); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 1.2vw, 20px); }
#nsSleep .v { container-type: inline-size; min-width: 0; border-radius: 26px; background: rgba(10, 28, 70, .5); border: 1.5px solid rgba(255, 255, 255, .28); backdrop-filter: blur(16px) saturate(1.2); box-shadow: 0 16px 40px rgba(0, 0, 0, .28); }
#nsSleep .vi { display: flex; align-items: center; gap: 6cqw; padding: 7cqw 6cqw; }
#nsSleep .v .ch { width: 21cqw; height: 21cqw; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 800 9cqw 'Segoe UI'; flex: none; background: var(--c); color: #fff; box-shadow: 0 0 0 2cqw color-mix(in srgb, var(--c) 30%, transparent); } #nsSleep .v .ch.pf { font-size: 7cqw; }
#nsSleep .v .vi > div { min-width: 0; }
#nsSleep .v b { display: block; font: 800 clamp(30px, 17cqw, 96px)/1 'Segoe UI'; font-variant-numeric: tabular-nums; text-shadow: 0 2px 14px rgba(0, 0, 0, .35); white-space: nowrap; }
#nsSleep .v i { display: block; margin-top: 1.5cqw; font: 700 clamp(10px, 5cqw, 22px) 'Segoe UI'; font-style: normal; letter-spacing: .06em; color: #dbe8ff; white-space: nowrap; }
#nsSleep .hint { position: absolute; left: 0; right: 0; bottom: 2vh; text-align: center; font: 600 13px 'Segoe UI'; letter-spacing: .14em; color: rgba(255, 255, 255, .75); }
@media (max-width: 1000px) { #nsSleep .vals { grid-template-columns: repeat(2, minmax(0, 1fr)); bottom: 8vh; } }
.ns-moon { background: none; border: 1.5px solid #c6d1d9; border-radius: 50%; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: #1c3f8f; } .ns-moon:hover { background: linear-gradient(135deg, #f3d58a, #c9973a); border-color: #c9973a; } .ns-moon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ===== admin / operator chip + locked deeper levels ===== */
.ns-hdr button.usr { display: inline-flex; align-items: center; gap: 6px; font: inherit; color: inherit; background: #f3f6f8; border: 1px solid #d4dce2; border-radius: 999px; padding: 4px 11px; cursor: pointer; }
.ns-hdr button.usr svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ns-hdr button.usr.adm { background: #14222c; color: #f3d58a; border-color: #14222c; }
.ld.lk { opacity: .78; cursor: not-allowed; }
.ld.lk .lkx { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; letter-spacing: .08em; color: #8a6d00; }
.ld.lk .lkx svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ===== group bar (Energy pages) ===== */
.ns-sub { display: none; gap: 8px; flex-wrap: wrap; padding: 10px 14px 0; }
.ns-sub button { font: 800 11px 'Inter', 'Segoe UI', sans-serif; letter-spacing: .08em; border: 1.5px solid #d4dce2; background: #fff; color: #3f5361; border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.ns-sub button.on { background: #0b6fa8; border-color: #0b6fa8; color: #fff; }
.ns-sub button:hover:not(.on) { border-color: #0b6fa8; color: #0b6fa8; }

/* ===== TRENDS ===== */
.tr-page, .ef-page { display: block; }
.tr-pick { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 6px 0 12px; }
.tr-gr { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .tr-gr > span { font: 800 10px 'Inter', sans-serif; letter-spacing: .12em; color: #6b7f8c; margin-right: 2px; }
.tr-chip { display: inline-flex; align-items: center; gap: 7px; font: 700 12px 'Inter', 'Segoe UI', sans-serif; padding: 7px 12px; border-radius: 999px; border: 1.5px solid #d4dce2; background: #fff; color: #14222c; cursor: pointer; }
.tr-chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.tr-chip.on { background: color-mix(in srgb, var(--c) 14%, #fff); border-color: var(--c); }
.tr-demo { background: #fff4c2; border: 1px solid #ecd36a; color: #6b5300; border-radius: 12px; padding: 9px 14px; font-size: 12.5px; margin-bottom: 12px; line-height: 1.4; } .tr-demo b { letter-spacing: .08em; margin-right: 6px; } .tr-demo code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; }
.tr-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.trc { text-align: left; background: #fff; border: 1.5px solid #d4dce2; border-left: 5px solid var(--c); border-radius: 14px; padding: 10px 12px 9px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font-family: 'Inter', 'Segoe UI', sans-serif; }
.trc .n { font: 800 10px 'Inter', sans-serif; letter-spacing: .1em; color: #566b79; }
.trc b { font: 800 27px/1.1 'Segoe UI', sans-serif; color: var(--c); font-variant-numeric: tabular-nums; } .trc b i { font: 700 12px 'Segoe UI'; font-style: normal; color: #566b79; margin-left: 5px; }
.trc .r { font: 600 10px 'Inter', sans-serif; color: #6b7f8c; letter-spacing: .02em; }
.trc.on { background: color-mix(in srgb, var(--c) 10%, #fff); border-color: var(--c); box-shadow: 0 6px 18px color-mix(in srgb, var(--c) 22%, transparent); }
.tr-main { background: #fff; border: 1.5px solid #d4dce2; border-radius: 18px; padding: 14px 16px 12px; margin-bottom: 14px; }
.tr-main .h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; } .tr-main .h b { font: 800 15px 'Inter', sans-serif; letter-spacing: .08em; } .tr-main .h em { font-style: normal; font-size: 12px; color: #566b79; margin-left: 10px; } .tr-main .h code { font: 700 12px 'IBM Plex Mono', monospace; color: #3f5361; background: #eef3f6; padding: 3px 8px; border-radius: 6px; }
.tr-plot { position: relative; }
.nsc { display: block; width: 100%; height: auto; touch-action: pan-y; }
.nsc .gl { stroke: #e3ebf1; stroke-width: 1; } .nsc .ya, .nsc .xa { font: 600 11px 'Segoe UI', sans-serif; fill: #6b7f8c; } .nsc .mt { font: 800 10px 'Segoe UI', sans-serif; fill: #3f5361; letter-spacing: .04em; }
.nsc path.ln { vector-effect: non-scaling-stroke; }
.nsc .xh line { stroke: #14222c; stroke-width: 1.2; stroke-dasharray: 3 3; }
.tr-tip { position: absolute; z-index: 5; pointer-events: none; width: 240px; background: rgba(20, 34, 44, .94); color: #fff; border-radius: 12px; padding: 9px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.28); font: 600 12px 'Segoe UI', sans-serif; }
.tr-tip .tph { font: 800 12px 'Segoe UI'; color: #f3d58a; margin-bottom: 5px; letter-spacing: .03em; }
.tr-tip .r { display: flex; align-items: center; gap: 7px; padding: 2px 0; opacity: .85; } .tr-tip .r.on { opacity: 1; font-weight: 800; } .tr-tip .r i { width: 8px; height: 8px; border-radius: 50%; flex: none; } .tr-tip .r span { flex: 1; font-size: 10px; letter-spacing: .06em; } .tr-tip .r b { font-variant-numeric: tabular-nums; }
.tr-calc { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 8px; font: 600 12px 'Segoe UI', sans-serif; color: #3f5361; } .tr-calc b { color: #14222c; } .tr-calc .t { margin-left: auto; color: #6b7f8c; font-weight: 700; }
.tr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.trm { background: #fff; border: 1.5px solid #d4dce2; border-top: 4px solid var(--c); border-radius: 14px; padding: 8px 12px 6px; cursor: pointer; }
.trm .h { display: flex; justify-content: space-between; align-items: baseline; } .trm .h span { font: 800 10px 'Inter', sans-serif; letter-spacing: .1em; color: #566b79; } .trm .h b { font: 800 18px 'Segoe UI'; color: var(--c); font-variant-numeric: tabular-nums; } .trm .h i { font: 700 11px 'Segoe UI'; font-style: normal; color: #566b79; margin-left: 4px; }
.trm:hover { box-shadow: 0 6px 18px rgba(11, 58, 74, .12); }

/* ===== ENERGY FLOW ===== */
.ef-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.ef-kpi > div { background: #fff; border: 1.5px solid #d4dce2; border-radius: 14px; padding: 9px 13px; } .ef-kpi i { display: block; font: 800 10px 'Inter', sans-serif; font-style: normal; letter-spacing: .1em; color: #566b79; } .ef-kpi b { font: 800 24px 'Segoe UI'; color: #14222c; font-variant-numeric: tabular-nums; } .ef-kpi u { text-decoration: none; font: 700 12px 'Segoe UI'; color: #566b79; margin-left: 5px; }
.ef-svg { background: #fff; border: 1.5px solid #d4dce2; border-radius: 18px; padding: 12px; }
.nsln .lt { font: 800 15px 'Inter', 'Segoe UI', sans-serif; letter-spacing: .12em; } .nsln .lv { font: 800 20px 'Segoe UI', sans-serif; fill: #14222c; } .nsln .lu { font: 700 11px 'Inter', sans-serif; fill: #566b79; letter-spacing: .08em; }
.nsln .nn { font: 700 12.5px 'Segoe UI', sans-serif; fill: #14222c; } .nsln .nv { font: 800 12px 'Segoe UI', sans-serif; }
.nsln .nsfl { fill: none; stroke: #fff; stroke-opacity: .9; stroke-dasharray: 2 16; stroke-linecap: round; animation: nsFlow 1.6s linear infinite; }
@keyframes nsFlow { to { stroke-dashoffset: -36; } }
@media (max-width: 760px) { .ns-sub { padding: 8px 12px 0; } }
.nsln .hd { font: 800 10px 'Inter', sans-serif; letter-spacing: .1em; fill: #14222c; }
.ef-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(540px, 1fr)); gap: 12px; align-items: start; }
.ef-lane { background: #fff; border: 1.5px solid #d4dce2; border-radius: 18px; padding: 10px; }
@media (max-width: 640px) { .ef-grid { grid-template-columns: 1fr; } }

/* ===== TRENDS · one window ===== */
.tr-win { background: #fff; border: 1.5px solid #d4dce2; border-radius: 18px; padding: 12px 14px 12px; }
.tr-mts { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; } .tr-mts::-webkit-scrollbar { display: none; }
.tr-mt { flex: 1 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 14px 7px; border-radius: 12px; border: 1.5px solid #d4dce2; border-bottom: 4px solid var(--c); background: #fff; cursor: pointer; color: #14222c; min-width: 92px; }
.tr-mt b { font: 800 20px/1.1 'Segoe UI', sans-serif; color: var(--c); } .tr-mt span { font: 800 9px 'Inter', sans-serif; letter-spacing: .08em; color: #566b79; white-space: nowrap; }
.tr-mt.on { background: var(--c); border-color: var(--c); box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 35%, transparent); } .tr-mt.on b, .tr-mt.on span { color: #fff; }
.tr-time { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-end; margin: 6px 0 10px; }
.tr-time label { display: flex; flex-direction: column; gap: 3px; font: 800 10px 'Inter', sans-serif; letter-spacing: .1em; color: #566b79; }
.tr-time input { font: 700 14px 'Segoe UI', sans-serif; padding: 7px 9px; border: 1.5px solid #c6d1d9; border-radius: 10px; color: #14222c; background: #fff; min-width: 190px; }
.tr-pre { display: flex; gap: 6px; flex-wrap: wrap; } .tr-pre button { font: 800 11px 'Inter', sans-serif; letter-spacing: .06em; padding: 9px 13px; border-radius: 999px; border: 1.5px solid #c6d1d9; background: #fff; color: #34566a; cursor: pointer; } .tr-pre button.on { background: #0b6fa8; border-color: #0b6fa8; color: #fff; } .tr-pre #trReset { border-style: dashed; }
.tr-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; } .tr-head b { font: 800 16px 'Inter', sans-serif; letter-spacing: .08em; } .tr-head em { font-style: normal; font-size: 12.5px; color: #566b79; margin-left: 10px; } .tr-head code { font: 700 12px 'IBM Plex Mono', monospace; color: #3f5361; background: #eef3f6; padding: 3px 8px; border-radius: 6px; }
.tr-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0 6px; }
.tr-stats > div { border-left: 5px solid var(--c); background: color-mix(in srgb, var(--c) 7%, #fff); border-radius: 10px; padding: 7px 11px; } .tr-stats i { display: block; font: 800 9.5px 'Inter', sans-serif; font-style: normal; letter-spacing: .1em; color: #566b79; } .tr-stats b { font: 800 24px/1.15 'Segoe UI', sans-serif; color: var(--c); font-variant-numeric: tabular-nums; } .tr-stats u { text-decoration: none; font: 700 12px 'Segoe UI'; color: #566b79; margin-left: 5px; } .tr-stats em { display: block; font: 600 11px 'Segoe UI'; font-style: normal; color: #6b7f8c; }
.tr-plot { position: relative; }
.tr-band { position: relative; height: 150px; }
.tr-hint { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font: 600 12.5px 'Segoe UI', sans-serif; color: #8a9aa6; letter-spacing: .03em; }
.tr-box { position: absolute; z-index: 5; width: 430px; max-width: 100%; background: rgba(20, 34, 44, .96); color: #fff; border-radius: 12px; padding: 8px 12px 9px; box-shadow: 0 10px 28px rgba(0, 0, 0, .22); pointer-events: none; }
.tr-box .th { font: 800 12.5px 'Segoe UI'; color: #f3d58a; letter-spacing: .04em; margin-bottom: 5px; }
.tr-box .tg { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; } .tr-box .r { display: flex; align-items: center; gap: 7px; font: 600 11px 'Segoe UI'; opacity: .85; } .tr-box .r.on { opacity: 1; font-weight: 800; } .tr-box .r i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; } .tr-box .r span { flex: 1; font-size: 9.5px; letter-spacing: .06em; } .tr-box .r b { font-variant-numeric: tabular-nums; } .tr-box .r u { text-decoration: none; font-weight: 600; opacity: .8; }
.tr-lead { position: absolute; width: 2px; background: repeating-linear-gradient(180deg, #14222c 0 4px, transparent 4px 7px); z-index: 4; pointer-events: none; }
.tr-svg { position: relative; } .tr-sel { position: absolute; top: 0; bottom: 34px; background: rgba(11, 111, 168, .14); border-left: 1.5px solid #0b6fa8; border-right: 1.5px solid #0b6fa8; pointer-events: none; }
.tr-svg .nsc { cursor: crosshair; }
@media (max-width: 760px) { .tr-stats { grid-template-columns: repeat(2, 1fr); } .tr-time input { min-width: 0; width: 100%; } .tr-time label { flex: 1 1 100%; } .tr-band { height: 138px; } .tr-box .tg { grid-template-columns: 1fr 1fr; gap: 1px 10px; } .tr-box .r span { font-size: 8.5px; } .tr-win { padding: 10px 8px; } .tr-mt { min-width: 76px; padding: 7px 10px; } }
.swf .pq { display: none; }

/* ===== TRENDS v3: trend first, dock top right ===== */
.tr-top { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 10px; }
.tr-srch { position: relative; flex: 0 0 300px; max-width: 100%; }
.tr-srch > svg { position: absolute; left: 11px; top: 50%; width: 17px; height: 17px; margin-top: -8.5px; fill: none; stroke: #566b79; stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.tr-srch input { width: 100%; box-sizing: border-box; font: 600 13.5px 'Segoe UI', sans-serif; padding: 9px 12px 9px 36px; border: 1.5px solid #c6d1d9; border-radius: 999px; background: #fff; color: #14222c; outline: none; }
.tr-srch input:focus { border-color: #0b6fa8; box-shadow: 0 0 0 3px rgba(11, 111, 168, .15); }
.tr-res { position: absolute; z-index: 40; left: 0; right: 0; min-width: 360px; top: calc(100% + 6px); background: #fff; border: 1.5px solid #c6d1d9; border-radius: 14px; box-shadow: 0 14px 34px rgba(11, 58, 74, .25); padding: 6px; max-height: 360px; overflow: auto; }
.tr-res button { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; border-radius: 10px; padding: 7px 9px; text-align: left; cursor: pointer; font-family: 'Segoe UI', sans-serif; }
.tr-res button:hover { background: color-mix(in srgb, var(--c) 10%, #fff); }
.tr-res button i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.tr-res span { flex: 1; min-width: 0; }
.tr-res b { display: block; font: 800 13.5px 'Segoe UI'; color: #14222c; }
.tr-res em { display: block; font: 600 11px 'Segoe UI'; font-style: normal; color: #6b7f8c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-res u { text-decoration: none; font: 800 12px 'Segoe UI'; color: #d9692a; flex: none; }
.tr-res .no { padding: 10px; font: 600 13px 'Segoe UI'; color: #6b7f8c; }
.tr-its { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.tr-it { display: inline-flex; align-items: center; gap: 6px; font: 700 12px 'Segoe UI', sans-serif; padding: 6px 11px; border-radius: 999px; border: 1.5px solid #d4dce2; background: #fff; color: #14222c; cursor: pointer; }
.tr-it i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.tr-it.on { background: color-mix(in srgb, var(--c) 15%, #fff); border-color: var(--c); font-weight: 800; }
.tr-card { position: relative; background: #fff; border: 1.5px solid #d4dce2; border-radius: 18px; padding: 12px 14px 12px; }
.tr-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 18px; flex-wrap: wrap; }
.tr-ttl b { font: 800 17px 'Inter', 'Segoe UI', sans-serif; letter-spacing: .08em; }
.tr-ttl em { font-style: normal; font-size: 13px; color: #566b79; margin-left: 10px; }
.tr-dm { display: inline-block; margin-left: 10px; font: 800 9.5px 'Inter', sans-serif; letter-spacing: .1em; padding: 3px 8px; border-radius: 999px; background: #fff4c2; color: #6b5300; border: 1px solid #ecd36a; cursor: help; }
.tr-dock { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; background: #f3f6f8; border: 1.5px solid #d4dce2; border-radius: 14px; padding: 5px 6px; }
.tr-qs { display: flex; gap: 4px; }
.tr-q { font: 800 12.5px 'Segoe UI', sans-serif; min-width: 38px; padding: 7px 9px; border-radius: 10px; border: 1.5px solid transparent; background: #fff; color: var(--c); cursor: pointer; }
.tr-q:hover { border-color: var(--c); }
.tr-q.on { background: var(--c); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--c) 35%, transparent); }
.tr-tb { display: inline-flex; align-items: center; gap: 7px; font: 800 12px 'Segoe UI', sans-serif; letter-spacing: .03em; padding: 8px 12px; border-radius: 10px; border: 1.5px solid #0b6fa8; background: #0b6fa8; color: #fff; cursor: pointer; }
.tr-tb svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.tr-tb i { font-style: normal; font-size: 11px; opacity: .85; }
.tr-pop { position: absolute; z-index: 45; right: 12px; top: 62px; width: min(720px, calc(100% - 24px)); background: #fff; border: 1.5px solid #b9c8d3; border-radius: 18px; box-shadow: 0 22px 54px rgba(11, 58, 74, .34); padding: 14px 16px 14px; }
.tr-pop h5 { margin: 0 0 8px; font: 800 12px 'Inter', sans-serif; letter-spacing: .1em; color: #0b3a4a; }
.tr-pop h5 em { font-style: normal; font-weight: 600; letter-spacing: 0; color: #6b7f8c; margin-left: 8px; font-size: 12px; }
.pp-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pp-r span { font: 700 14px 'Segoe UI'; color: #34566a; }
.pp-r input, .pp-r select { font: 700 15px 'Segoe UI', sans-serif; padding: 8px 10px; border: 1.5px solid #c6d1d9; border-radius: 10px; color: #14222c; background: #fff; }
.pp-r input { width: 90px; }
.pp-r select { text-transform: capitalize; }
.pp-r button, .pp-f button { font: 800 11.5px 'Inter', sans-serif; letter-spacing: .06em; padding: 10px 14px; border-radius: 10px; border: 1.5px solid #0b6fa8; background: #0b6fa8; color: #fff; cursor: pointer; }
.pp-f #ppCancel { background: #fff; color: #34566a; border-color: #c6d1d9; }
.pp-q { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pp-q button { font: 700 12px 'Segoe UI'; padding: 6px 11px; border-radius: 999px; border: 1.5px solid #d4dce2; background: #f3f6f8; color: #34566a; cursor: pointer; }
.pp-q button:hover { border-color: #0b6fa8; color: #0b6fa8; }
.pp-b { margin-top: 12px; padding-top: 12px; border-top: 1.5px dashed #d4dce2; }
.pp-cals { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pp-cals label { display: block; font: 800 10.5px 'Inter', sans-serif; letter-spacing: .12em; color: #0b6fa8; margin-bottom: 4px; }
.pp-cals > div > div { background: linear-gradient(180deg, #f8fbfd, #eef3f7); border: 1.5px solid #d4dce2; border-radius: 14px; padding: 8px 8px 10px; }
.cal-h { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.cal-h b { flex: 1; text-align: center; font: 800 14px 'Segoe UI'; color: #0b3a4a; }
.cal-h button { width: 28px; height: 28px; border-radius: 8px; border: 1.5px solid #d4dce2; background: #fff; color: #34566a; font: 800 14px/1 'Segoe UI'; cursor: pointer; }
.cal-h button:hover { border-color: #0b6fa8; color: #0b6fa8; }
.cal-w, .cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.cal-w span { font: 800 10px 'Inter'; color: #6b7f8c; padding: 3px 0; }
.cal-g button, .cal-g i { aspect-ratio: 1; }
.cal-g button { border: 0; border-radius: 9px; background: #fff; font: 700 13px 'Segoe UI'; color: #14222c; cursor: pointer; }
.cal-g button:hover { background: #dff0fd; }
.cal-g button.today { box-shadow: inset 0 0 0 1.8px #c9973a; }
.cal-g button.sel { background: #0b6fa8; color: #fff; box-shadow: 0 4px 10px rgba(11, 111, 168, .35); }
.cal-t { display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin-top: 8px; }
.cal-t label { display: flex; flex-direction: column; gap: 2px; font: 800 9.5px 'Inter'; letter-spacing: .1em; color: #6b7f8c; }
.cal-t input { width: 62px; text-align: center; font: 800 17px 'Segoe UI'; padding: 6px 4px; border: 1.5px solid #c6d1d9; border-radius: 9px; color: #14222c; }
.cal-t b { font: 800 20px 'Segoe UI'; color: #0b3a4a; padding-bottom: 6px; }
.pp-f { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pp-f span { flex: 1; font: 700 13px 'Segoe UI'; color: #34566a; min-width: 200px; }
.tr-card .tr-stats { margin: 12px 0 4px; }
@media (max-width: 760px) {
  .tr-srch { flex: 1 1 100%; }
  .tr-res { min-width: 0; }
  .tr-its { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tr-its::-webkit-scrollbar { display: none; }
  .tr-it { flex: none; }
  .tr-dock { width: 100%; justify-content: space-between; }
  .tr-qs { overflow-x: auto; scrollbar-width: none; flex: 1; }
  .tr-qs::-webkit-scrollbar { display: none; }
  .tr-q { flex: none; }
  .tr-pop { left: 8px; right: 8px; width: auto; top: 118px; max-height: 70vh; overflow: auto; }
  .pp-cals { grid-template-columns: 1fr; }
  .tr-ttl em { display: block; margin: 2px 0 0; }
}

/* ===== sign-in faceplate ===== */
#nsSign { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 16px; }
#nsSign .sg-bg { position: absolute; inset: 0; background: rgba(8, 22, 38, .55); backdrop-filter: blur(4px); }
#nsSign .sg-card { position: relative; width: min(400px, 100%); background: #fff; border-radius: 24px; padding: 26px 24px 22px; text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, .4); border-top: 6px solid #c9973a; font-family: 'Segoe UI', system-ui, sans-serif; animation: sgIn .22s ease-out; }
@keyframes sgIn { from { transform: translateY(14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
#nsSign .sg-shake { animation: sgShake .35s; }
@keyframes sgShake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
#nsSign .sg-x { position: absolute; right: 12px; top: 8px; width: 34px; height: 34px; border: 0; background: none; font-size: 26px; line-height: 1; color: #6b7f8c; cursor: pointer; }
#nsSign .sg-ic { width: 60px; height: 60px; margin: 0 auto 10px; border-radius: 50%; background: linear-gradient(135deg, #1b5fa8, #37a3ec); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(27, 95, 168, .35); }
#nsSign .sg-ic svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#nsSign h3 { margin: 0 0 4px; font: 800 21px 'Segoe UI'; color: #0b3a4a; text-transform: none; letter-spacing: 0; }
#nsSign p { margin: 0 0 14px; font: 600 13.5px/1.45 'Segoe UI'; color: #3f5361; text-transform: none; letter-spacing: 0; }
#nsSign .sg-seg { display: flex; border: 1.5px solid #9fc4e6; border-radius: 999px; overflow: hidden; margin-bottom: 14px; }
#nsSign .sg-seg button { flex: 1; padding: 10px 6px; border: 0; background: #fff; font: 800 12px 'Inter', sans-serif; letter-spacing: .08em; color: #3f5361; cursor: pointer; }
#nsSign .sg-seg button.on { background: #0b6fa8; color: #fff; }
#nsSign .sg-pane { text-align: left; }
#nsSign label { display: block; font: 800 10.5px 'Inter', sans-serif; letter-spacing: .12em; color: #566b79; margin-bottom: 5px; }
#nsSign input { width: 100%; box-sizing: border-box; font: 700 17px 'Segoe UI'; padding: 11px 14px; border: 1.5px solid #c6d1d9; border-radius: 12px; outline: none; color: #14222c; }
#nsSign input:focus { border-color: #0b6fa8; box-shadow: 0 0 0 3px rgba(11, 111, 168, .15); }
#nsSign .sg-err { min-height: 20px; margin: 4px 2px 6px; font: 700 12.5px 'Segoe UI'; color: #cf2f46; }
#nsSign .sg-go { width: 100%; padding: 13px; border: 0; border-radius: 12px; background: #0b6fa8; color: #fff; font: 800 12.5px 'Inter', sans-serif; letter-spacing: .08em; cursor: pointer; box-shadow: 0 6px 16px rgba(11, 111, 168, .3); }
#nsSign .sg-note { padding: 14px 4px; font: 600 13.5px 'Segoe UI'; color: #3f5361; text-align: center; }
#nsSign .sg-row { margin-top: 4px; }



/* ===== header v3 (20 Nov): notification bar in the middle, date and time + profile avatar on the right ===== */
body.ns .hd-top { position: relative; align-items: center; }
body.ns .ns-note { flex: 1 1 auto; min-width: 0; display: flex; justify-content: center; position: relative; }
.nn-bar { display: flex; align-items: center; gap: 10px; width: min(580px, 100%); box-sizing: border-box; padding: 6px 8px 6px 8px; border-radius: 999px; border: 1px solid #d4dce2; background: #f3f6f8; color: #14222c; font: inherit; cursor: pointer; text-align: left; transition: background .15s, border-color .15s; }
.nn-bar:hover { background: #eaf0f4; border-color: #c2cdd5; }
.nn-ic { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; background: #dcf5e6; color: #1b7a43; }
.nn-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nn-bar.warn .nn-ic { background: #fff4c2; color: #8a6d00; } .nn-bar.bad .nn-ic { background: #fde9ec; color: #b3261e; animation: nnPulse 1.6s ease-in-out infinite; } .nn-bar.info .nn-ic { background: #dff0fd; color: #0b4a86; }
.nn-bar.bad { border-color: #f2b8c0; background: #fff6f7; } .nn-bar.warn { border-color: #efdb8f; background: #fffbea; }
@keyframes nnPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(179, 38, 30, .35); } 50% { box-shadow: 0 0 0 6px rgba(179, 38, 30, 0); } }
.nn-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.22; }
.nn-tx b { font: 800 13px 'Segoe UI', system-ui, sans-serif; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nn-tx span { font: 600 11.5px 'Segoe UI', system-ui, sans-serif; color: #5d6e7b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nn-tx.in { animation: nnIn .35s ease; } @keyframes nnIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.nn-n { flex: none; min-width: 26px; height: 26px; padding: 0 8px; box-sizing: border-box; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font: 800 12px 'Segoe UI', system-ui, sans-serif; background: #14222c; color: #fff; font-variant-numeric: tabular-nums; }
.nn-bar.ok .nn-n { background: #dfe7ec; color: #5d6e7b; }
.nn-pop { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); width: min(540px, 94vw); max-height: 62vh; overflow: auto; box-sizing: border-box; background: #fff; border: 1px solid #d4dce2; border-radius: 16px; box-shadow: 0 16px 38px rgba(11, 58, 74, .2); z-index: 3000; padding: 8px; text-transform: none; letter-spacing: 0; }
.nn-pop[hidden], .ava-menu[hidden] { display: none !important; }
.nn-hd { display: flex; align-items: baseline; justify-content: space-between; padding: 6px 10px 8px; border-bottom: 1px solid #e3ebf1; margin-bottom: 4px; }
.nn-hd b { font: 800 14px 'Segoe UI', system-ui, sans-serif; color: #0b3a4a; } .nn-hd span { font: 600 12px 'Segoe UI', system-ui, sans-serif; color: #5d6e7b; }
.nn-it { display: flex; align-items: center; gap: 11px; width: 100%; box-sizing: border-box; padding: 9px 10px; border: 0; background: none; border-radius: 11px; cursor: pointer; text-align: left; font: inherit; color: #14222c; }
.nn-it:hover { background: #f3f6f8; }
.nn-it i { width: 10px; height: 10px; border-radius: 50%; flex: none; background: #2a73b3; } .nn-it.warn i { background: #e0a800; } .nn-it.bad i { background: #e0453a; }
.nn-it span { flex: 1; min-width: 0; } .nn-it b { display: block; font: 700 13px 'Segoe UI', system-ui, sans-serif; } .nn-it em { display: block; font: 600 12px 'Segoe UI', system-ui, sans-serif; font-style: normal; color: #5d6e7b; }
.nn-it time { font: 700 11.5px 'Segoe UI', system-ui, sans-serif; color: #5d6e7b; flex: none; }
.nn-empty { padding: 16px 12px; font: 600 13px 'Segoe UI', system-ui, sans-serif; color: #5d6e7b; }
.nn-all { display: block; width: 100%; margin-top: 4px; padding: 10px; border: 0; border-top: 1px solid #e3ebf1; background: none; font: 800 12.5px 'Segoe UI', system-ui, sans-serif; letter-spacing: .03em; color: #1c3f8f; cursor: pointer; border-radius: 0 0 10px 10px; } .nn-all:hover { background: #f3f6f8; }

body.ns .ns-hdr { gap: 14px; }
.ava-wrap { position: relative; }
.ava { width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 2px solid #c6d1d9; background: #fff; color: #1c3f8f; font: 800 13px 'Segoe UI', system-ui, sans-serif; letter-spacing: .03em; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: border-color .15s, box-shadow .15s; }
.ava:hover, .ava[aria-expanded="true"] { border-color: #c9973a; box-shadow: 0 0 0 3px rgba(201, 151, 58, .18); }
.ava.adm, .am-av.adm { background: #14222c; color: #f3d58a; border-color: #c9973a; }
.ava-menu { position: absolute; right: 0; top: calc(100% + 10px); width: 310px; box-sizing: border-box; background: #fff; border: 1px solid #d4dce2; border-radius: 16px; box-shadow: 0 16px 38px rgba(11, 58, 74, .2); z-index: 3000; padding: 8px; text-transform: none; letter-spacing: 0; color: #14222c; }
.am-top { display: flex; align-items: center; gap: 12px; padding: 8px 8px 12px; border-bottom: 1px solid #e3ebf1; }
.am-av { width: 46px; height: 46px; border-radius: 50%; background: #e9f0fb; color: #1c3f8f; font: 800 15px 'Segoe UI', system-ui, sans-serif; display: flex; align-items: center; justify-content: center; flex: none; }
.am-top b { display: block; font: 800 15px 'Segoe UI', system-ui, sans-serif; color: #0b3a4a; } .am-top > div > span { display: block; font: 600 12px 'Segoe UI', system-ui, sans-serif; color: #5d6e7b; }
.am-src { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 8px; border-bottom: 1px solid #e3ebf1; margin-bottom: 4px; }
.am-src small { font: 600 11.5px 'Segoe UI', system-ui, sans-serif; color: #5d6e7b; text-align: right; }
.mrow, body.ns .ava-menu button.usr.mrow { display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; padding: 10px 8px; border: 0; background: none; border-radius: 11px; cursor: pointer; text-align: left; font: inherit; color: #14222c; }
.mrow:hover, body.ns .ava-menu button.usr.mrow:hover { background: #f3f6f8; }
.mrow > svg, body.ns .ava-menu button.usr.mrow > svg { width: 22px; height: 22px; flex: none; fill: none; stroke: #1c3f8f; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
body.ns .ava-menu button.usr.adm { color: #14222c; } body.ns .ava-menu button.usr.adm > svg { stroke: #c9973a; }
.mrow b { display: block; font: 700 13px 'Segoe UI', system-ui, sans-serif; } .mrow em { display: block; font: 600 11.5px 'Segoe UI', system-ui, sans-serif; font-style: normal; color: #5d6e7b; }
.mrow .cnt { flex: none; min-width: 22px; text-align: center; }


/* ===== logo (20 Nov): the blue Etihad tile in the header and on the sign-in faceplate ===== */
body.ns .hd-logo img { height: 46px !important; width: 46px !important; border-radius: 11px; }
#nsSign .sg-ic.sg-lg { position: relative; width: 84px; height: 84px; border-radius: 0; background: none; box-shadow: none; margin: 0 auto 12px; display: block; }
#nsSign .sg-ic.sg-lg img { width: 84px; height: 84px; display: block; filter: drop-shadow(0 8px 14px rgba(28, 63, 143, .28)); }
#nsSign .sg-lk { position: absolute; right: -4px; bottom: -4px; width: 30px; height: 30px; border-radius: 50%; background: #c9973a; border: 3px solid #fff; box-sizing: border-box; display: flex; align-items: center; justify-content: center; }
#nsSign .sg-ic.sg-lg .sg-lk svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 2.6; }


/* ===== faceplate v4 (21 Nov): single line (old) + LED list | compact measurement lists | right cards keep their room ===== */
@media (min-width: 761px) { .fp-body.fp4 { grid-template-columns: minmax(250px, 290px) minmax(0, 1fr) minmax(260px, 320px); align-items: start; max-width: 1560px; margin: 0 auto; } .fp4 .fp-c3 { grid-column: auto; } }
.fp4 .fp-c2 { background: #fff; border: 2px solid #e1e8ed; border-radius: 16px; padding: 10px 12px 12px; min-width: 0; }
.fp4 .mhd { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; } .fp4 .mhd h4 { margin: 0; }
.fp4 .lv { font: 800 11px 'Segoe UI', system-ui !important; letter-spacing: .06em; padding: 2px 10px; border-radius: 999px; background: #eef2f5; color: #6b7f8c; } .fp4 .lv.on { background: #dcf5e6; color: #1b7a43; }
.fp4 .mcols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; } .fp4 .mcols > div { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fp4 .ms { border: 1.5px solid #e1e8ed; border-radius: 12px; overflow: hidden; background: #fff; }
.fp4 .ms h5 { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 5px 10px; background: #f1f6f9; border-bottom: 1px solid #e1e8ed; font: 800 11px 'Segoe UI', system-ui !important; letter-spacing: .1em; color: #0b3a4a; text-transform: uppercase; }
.fp4 .ms h5 em { font: 700 9.5px 'Segoe UI', system-ui !important; font-style: normal; letter-spacing: .02em; padding: 1px 7px; border-radius: 999px; background: #dcf5e6; color: #1b7a43; }
.fp4 .mr { position: relative; display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 5px 10px 6px; border-bottom: 1px solid #eef2f5; } .fp4 .mr:last-child { border-bottom: 0; }
.fp4 .mr b { white-space: nowrap; font: 800 12px 'Segoe UI', system-ui !important; color: #14222c; padding-left: 7px; position: relative; } .fp4 .mr b:before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 3px; border-radius: 2px; background: var(--c); }
.fp4 .mr i { font: 600 10.5px 'Segoe UI', system-ui !important; font-style: normal; color: #5d6e7b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp4 .mr span { font: 800 15px/1 'Segoe UI', system-ui !important; color: #14222c; font-variant-numeric: tabular-nums; white-space: nowrap; } .fp4 .mr span u { text-decoration: none; font: 700 10.5px 'Segoe UI', system-ui !important; color: #5d6e7b; margin-left: 3px; }
.fp4 .mr s { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--c); border-radius: 0 2px 2px 0; opacity: .85; }
.fp4 .mr.off span, .fp4 .mr.off i { color: #aab6bf; } .fp4 .mr.off b { color: #8a98a3; }
.fp4 .mnote { margin: 8px 2px 0; font: 600 11.5px/1.4 'Segoe UI', system-ui !important; color: #34566a; }
.fp4 .p3s { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.fp4 .p3 { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; background: #fff; border: 1.5px solid #e1e8ed; border-radius: 10px; } .fp4 .p3 i { width: 14px; height: 14px; border-radius: 50%; background: #c3ced7; } .fp4 .p3 b { font: 800 10.5px 'Segoe UI', system-ui !important; letter-spacing: .08em; color: #5d6e7b; }
.fp4 .p3.on.g i { background: #3fb86a; box-shadow: 0 0 8px #3fb86a; } .fp4 .p3.on.a i { background: #f2a100; box-shadow: 0 0 8px #f2a100; } .fp4 .p3.on.r i { background: #e2253f; box-shadow: 0 0 8px #e2253f; } .fp4 .p3.on b { color: #14222c; }
.fp4 .pl { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 2px; border-bottom: 1px solid #e1e8ed; } .fp4 .pl:last-child { border: 0; }
.fp4 .pl i { width: 12px; height: 12px; border-radius: 50%; background: #c3ced7; } .fp4 .pl b { display: block; font: 800 11.5px/1.15 'Segoe UI', system-ui !important; color: #14222c; } .fp4 .pl em { display: block; font: 600 10px 'Segoe UI', system-ui !important; font-style: normal; color: #5d6e7b; }
.fp4 .pl u { text-decoration: none; font: 800 10px 'Segoe UI', system-ui !important; letter-spacing: .05em; color: #8a98a3; } .fp4 .pl.on i { background: #e2253f; box-shadow: 0 0 8px #e2253f; } .fp4 .pl.on u { color: #b3122a; } .fp4 .pl.nd b { color: #6b7f8c; }
@media (max-width: 760px) { .fp4 .mcols { grid-template-columns: 1fr; } }


/* ===== faceplate v4b (21 Nov): everything fits one screen, no scrolling ===== */
@media (min-width: 761px) {
  .fp:has(.fp4) .fp-hd { padding: 8px 18px; } .fp:has(.fp4) .fp-hd .kps { display: none; } .fp:has(.fp4) .fp-hd .lg { width: 38px; height: 38px; } .fp:has(.fp4) .fp-hd h2 { font-size: 19px; } .fp:has(.fp4) .fp-hd p { font-size: 12px; margin-top: 1px; }
  .fp:has(.fp4) .swp-nav { padding-top: 4px; padding-bottom: 4px; }
  .fp-main .fp-body.fp4 { padding: 8px 12px 10px; gap: 10px; }
  .fp4 .fp-sec { padding: 6px 10px 8px; margin-bottom: 8px; border-width: 1.5px; } .fp4 .fp-sec h4 { margin-bottom: 4px; font-size: 11.5px; }
  .fp4 .fp-sld { padding: 2px; } .fp4 .fp-sld svg { max-height: 175px; width: auto; }
  .fp4 .p3s { gap: 5px; margin-bottom: 4px; } .fp4 .p3 { flex-direction: row; justify-content: center; padding: 3px 4px; gap: 6px; } .fp4 .p3 i { width: 10px; height: 10px; }
  .fp4 .pl { padding: 2px 2px; } .fp4 .pl em { display: none; } .fp4 .pl b { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fp4 .fp-c2 { padding: 6px 8px 8px; } .fp4 .mhd { margin-bottom: 5px; } .fp4 .mcols, .fp4 .mcols > div { gap: 6px; }
  .fp4 .ms h5 { padding: 3px 8px; } .fp4 .mr { padding: 2px 8px 3px; } .fp4 .mr span { font-size: 13px; } .fp4 .mr b { font-size: 11.5px; } .fp4 .mr i { font-size: 10px; }
  .fp4 .fp-gauge { max-width: 108px; } .fp4 .fp-ph { height: 86px; } .fp4 .fp-ph i { width: 26px; }
  .fp4 .fp-lamp { padding: 3px 4px; }
}

/* v4c: one-row cubicle nav, bigger single line; JS then zooms the plate so it fits the screen height */
@media (min-width: 761px) {
  .swf-one { margin-bottom: 6px; } .swf-one .swf-nav { flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding: 6px 8px; } .swf-one .swf-nav button { white-space: nowrap; padding: 5px 10px; font-size: 12px; flex: none; }
  .fp4 .fp-sld svg { width: 100%; max-height: 215px; }
}


/* ===== faceplate v5 (21 Nov): power tiles + bar meters | old single line | protection LEDs + status ===== */
@media (min-width: 761px) {
  .fp:has(.fp5) .fp-hd { padding: 8px 18px; } .fp:has(.fp5) .fp-hd .kps { display: none; } .fp:has(.fp5) .fp-hd .lg { width: 38px; height: 38px; } .fp:has(.fp5) .fp-hd h2 { font-size: 19px; } .fp:has(.fp5) .fp-hd p { font-size: 12px; margin-top: 1px; }
  .fp:has(.fp5) .swp-nav { padding-top: 4px; padding-bottom: 4px; }
  .fp-main .fp-body.fp5 { grid-template-columns: minmax(230px, 270px) minmax(0, 1fr) minmax(250px, 290px); gap: 10px; padding: 8px 12px 10px; align-items: start; max-width: 1560px; margin: 0 auto; }
  .fp5 .fp-c3 { grid-column: auto; }
}
.fp5 .fp-c2 { display: flex; flex-direction: column; gap: 8px; background: none; border: 0; padding: 0; min-width: 0; }
.cd5 { background: #fff; border: 1.5px solid #e1e8ed; border-radius: 12px; padding: 7px 10px 9px; min-width: 0; }
.cd5 h4 { margin: 0 0 6px; font: 800 10.5px 'Segoe UI', system-ui !important; letter-spacing: .1em; color: #0b4a86; text-transform: uppercase; display: flex; justify-content: space-between; align-items: center; }
.cd5 h4 em { font: 700 9px 'Segoe UI', system-ui !important; font-style: normal; letter-spacing: .02em; background: #dcf5e6; color: #1b7a43; border-radius: 999px; padding: 1px 8px; }
.cd5 h4.st { margin: 10px 0 3px; padding-top: 8px; border-top: 1.5px solid #e1e8ed; }
.fp5 .pts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.fp5 .pt { position: relative; background: #f6f9fb; border: 1px solid #e1e8ed; border-radius: 10px; padding: 5px 8px 6px 12px; min-width: 0; } .fp5 .pt:before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; border-radius: 10px 0 0 10px; background: var(--c); }
.fp5 .pt em { display: block; font: 800 9.5px 'Segoe UI', system-ui !important; font-style: normal; letter-spacing: .06em; color: #5d6e7b; text-transform: uppercase; white-space: nowrap; }
.fp5 .pt b { display: block; font: 800 22px/1.15 'Segoe UI', system-ui !important; font-variant-numeric: tabular-nums; color: #14222c; white-space: nowrap; } .fp5 .pt b i { font: 700 10.5px 'Segoe UI', system-ui !important; font-style: normal; color: #5d6e7b; margin-left: 3px; }
.fp5 .pt.off b { color: #b4bfc7; }
.fp5 .br { display: grid; grid-template-columns: 40px minmax(0, 1fr) 82px; align-items: center; gap: 8px; margin: 5px 0; }
.fp5 .br b { font: 800 12px 'Segoe UI', system-ui !important; } .fp5 .br b:before { content: ""; display: inline-block; width: 3px; height: 11px; border-radius: 2px; background: var(--c); margin-right: 6px; vertical-align: -1px; }
.fp5 .br .tr { height: 12px; border-radius: 6px; background: #e6edf1; position: relative; } .fp5 .br .tr i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 65%, #fff), var(--c)); } .fp5 .br .tr s { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #14222c; opacity: .55; }
.fp5 .br .v { font: 800 15px 'Segoe UI', system-ui !important; text-align: right; font-variant-numeric: tabular-nums; } .fp5 .br .v u { text-decoration: none; font: 700 9.5px 'Segoe UI', system-ui !important; color: #5d6e7b; margin-left: 2px; } .fp5 .br.off .v { color: #b4bfc7; }
.fp5 .sq { display: flex; gap: 6px 14px; flex-wrap: wrap; margin-top: 6px; padding-top: 6px; border-top: 1px dashed #e1e8ed; } .fp5 .sq span { font: 600 10.5px 'Segoe UI', system-ui !important; color: #5d6e7b; } .fp5 .sq b { color: #14222c; font-variant-numeric: tabular-nums; }
.fp5 .two { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 10px; align-items: center; } .fp5 .fqw { text-align: center; } .fp5 .fqd { width: 100px; } .fp5 .fqw small { display: block; font: 600 9px 'Segoe UI', system-ui !important; color: #5d6e7b; } .fp5 .fq.off b { font: 800 22px 'Segoe UI', system-ui !important; color: #b4bfc7; }
.fp5 .fp-sld { padding: 2px; background: #fff; } .fp5 .fp-sld svg { width: 100%; height: auto; max-height: none; }
.fp5 .p3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: 6px; } .fp5 .p3 div { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 4px; border: 1.5px solid #e1e8ed; border-radius: 9px; font: 800 10px 'Segoe UI', system-ui !important; letter-spacing: .07em; color: #5d6e7b; } .fp5 .p3 i { width: 11px; height: 11px; border-radius: 50%; background: #c3ced7; }
.fp5 .p3 .g i { background: #3fb86a; box-shadow: 0 0 7px #3fb86a; } .fp5 .p3 .a i { background: #f2a100; box-shadow: 0 0 7px #f2a100; } .fp5 .p3 .r i { background: #e2253f; box-shadow: 0 0 7px #e2253f; } .fp5 .p3 .r { border-color: #f2b8c0; background: #fff6f7; color: #b3122a; }
.fp5 .pl { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 4px 1px; border-bottom: 1px solid #eef2f5; } .fp5 .pl i { width: 11px; height: 11px; border-radius: 50%; background: #c3ced7; } .fp5 .pl b { font: 800 11px 'Segoe UI', system-ui !important; color: #14222c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .fp5 .pl u { text-decoration: none; font: 800 9px 'Segoe UI', system-ui !important; letter-spacing: .05em; color: #8a98a3; }
.fp5 .pl.on i { background: #e2253f; box-shadow: 0 0 8px #e2253f; } .fp5 .pl.on b, .fp5 .pl.on u { color: #b3122a; } .fp5 .pl.nd b { color: #6b7f8c; }
.fp5 .fp-lamp { padding: 4px 1px; font-size: 11px; } .fp5 .fp-lamp span, .fp5 .fp-lamp b { font-size: 11px; }
@media (max-width: 760px) { .fp5 .pts { grid-template-columns: repeat(2, 1fr); } .fp5 .two { grid-template-columns: 1fr; } }
/* v5b: status in two columns, tighter LED rows so the right card is no taller than the single line */
@media (min-width: 761px) {
  .fp5 .fp-c3 .cd5 { display: block; } .fp5 .pl { padding: 3px 1px; } .fp5 .p3 { margin-bottom: 3px; }
  .fp5 .fp-c3 .fp-lamp { display: inline-grid; width: calc(50% - 4px); vertical-align: top; grid-template-columns: 12px minmax(0, 1fr); gap: 6px; padding: 4px 1px; border: 0; }
  .fp5 .fp-c3 .fp-lamp b { grid-column: 2; font-size: 10px; color: #14222c; margin-top: -2px; } .fp5 .fp-c3 .fp-lamp span { font-size: 10px; color: #5d6e7b; }
  .fp5 .fp-c3 .fp-lamp i { grid-row: 1 / span 2; }
  .fp5 .cd5 h4.st { margin-top: 6px; padding-top: 6px; }
}
/* v5c: bigger centre (it had spare room); the whole plate is scaled evenly by fitFp(), not just the body */
@media (min-width: 761px) {
  .fp5 .pts { gap: 8px; } .fp5 .pt { padding: 8px 10px 9px 14px; } .fp5 .pt em { font-size: 11px; } .fp5 .pt b { font-size: 29px; } .fp5 .pt b i { font-size: 12px; }
  .fp5 .fp-c2 .cd5 { padding: 9px 13px 11px; } .fp5 .fp-c2 .cd5 h4 { font-size: 12px; margin-bottom: 8px; } .fp5 .fp-c2 .cd5 h4 em { font-size: 10px; }
  .fp5 .br { grid-template-columns: 52px minmax(0, 1fr) 112px; margin: 8px 0; } .fp5 .br b { font-size: 15px; } .fp5 .br .tr { height: 17px; border-radius: 9px; } .fp5 .br .tr i { border-radius: 9px; } .fp5 .br .v { font-size: 21px; } .fp5 .br .v u { font-size: 11px; }
  .fp5 .sq span { font-size: 12.5px; } .fp5 .two { grid-template-columns: minmax(0, 1fr) 150px; } .fp5 .fqd { width: 146px; } .fp5 .fqw small { font-size: 10.5px; }
}


/* ===== faceplate v6 (21 Nov): the approved mockup. Header carries P Q S P.F. angle f; old single line + lamps | currents, voltages, energy | protection LEDs ===== */
@media (min-width: 761px) {
  .fp:has(.fp6) .fp-hd .kps.kps6 { display: grid !important; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
  .fp:has(.fp6) .fp-hd .kp { padding: 5px 14px 6px; } .fp:has(.fp6) .fp-hd .kp b { font-size: 28px; } .fp:has(.fp6) .fp-hd .kp em { font-size: 11px; }
  .fp:has(.fp6) .fp-hd { padding: 10px 22px 12px; } .fp:has(.fp6) .fp-hd .lg { width: 46px; height: 46px; } .fp:has(.fp6) .fp-hd h2 { font-size: 22px; } .fp:has(.fp6) .fp-hd p { font-size: 13px; }
  .fp-main .fp-body.fp6 { grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) minmax(250px, 290px); }
}
.fp6 .fp-sld { padding: 2px; } .fp6 .fp-sld svg { width: 100%; height: auto; }
.fp6 .lms { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; margin-top: 8px; padding-top: 8px; border-top: 1.5px solid #e1e8ed; }
.fp6 .lm { display: grid; grid-template-columns: 12px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 7px; align-items: center; }
.fp6 .lm i { grid-row: 1 / span 2; width: 11px; height: 11px; border-radius: 50%; } .fp6 .lm span { font: 700 10.5px 'Segoe UI', system-ui !important; color: #5d6e7b; white-space: nowrap; } .fp6 .lm b { font: 800 12px 'Segoe UI', system-ui !important; color: #14222c; white-space: nowrap; }
.fp6 .ens { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .fp6 .en1 { background: #f6f9fb; border: 1px solid #e6edf1; border-radius: 10px; padding: 5px 10px; } .fp6 .en1 em { display: block; font: 700 10.5px 'Segoe UI', system-ui !important; font-style: normal; color: #5d6e7b; } .fp6 .en1 b { font: 800 17px 'Segoe UI', system-ui !important; font-variant-numeric: tabular-nums; } .fp6 .en1 b u { text-decoration: none; font: 700 10px 'Segoe UI', system-ui !important; color: #5d6e7b; margin-left: 3px; } .fp6 .en1.off b { color: #b4bfc7; }
.fp6 .enn { font: 600 13px 'Segoe UI', system-ui !important; color: #8a98a3; padding: 2px 0 4px; }
@media (max-width: 760px) { .fp6 .ens { grid-template-columns: repeat(2, 1fr); } }
/* v6b: less page chrome above the plate (so it needs less shrinking): All-cubicles button and the cubicle buttons share one tight band */
@media (min-width: 761px) {
  #swgView:has(.fp6) .ns-hd { margin: 0 0 4px; padding: 0; min-height: 0; } #swgView:has(.fp6) .ns-hd > div:last-child { display: none; }
  #swgView:has(.fp6) .swf-one { margin: 0 0 6px; } #swgView:has(.fp6) .swf-one .swf-nav { padding: 4px 6px; } #swgView:has(.fp6) .swf-one .swf-nav button { padding: 3px 9px; font-size: 11.5px; }
  #swgView:has(.fp6) .ns-btn { padding: 4px 12px; }
}
.fp6 .fp-sld { display: flex; justify-content: center; } .fp6 .fp-sld svg { width: auto; max-width: 100%; max-height: 300px; }

/* ===== v6c: use the width - four columns (single line | currents + voltages | energy | protection), bigger type, no real shrinking ===== */
@media (min-width: 761px) {
  .fp-main .fp-body.fp6 { grid-template-columns: minmax(230px, 270px) minmax(0, 1fr) minmax(200px, 240px) minmax(250px, 290px); gap: 12px; }
  .fp6 .fp-c4 { min-width: 0; } .fp6 .fp-c3 { grid-column: auto; }
  .fp6 .ens { grid-template-columns: 1fr; gap: 7px; } .fp6 .en1 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 9px 12px; } .fp6 .en1 em { font-size: 12px; } .fp6 .en1 b { font-size: 21px; } .fp6 .en1 b u { font-size: 11px; }
  .fp6 .enn { font-size: 14px; padding: 10px 2px; }
  .fp6 .cd5 { padding: 10px 13px 12px; } .fp6 .cd5 h4 { font-size: 12.5px; margin-bottom: 9px; } .fp6 .cd5 h4 em { font-size: 10.5px; }
  .fp6 .br { grid-template-columns: 54px minmax(0, 1fr) 118px; margin: 11px 0; } .fp6 .br b { font-size: 16px; } .fp6 .br .tr { height: 20px; border-radius: 10px; } .fp6 .br .tr i { border-radius: 10px; } .fp6 .br .v { font-size: 26px; } .fp6 .br .v u { font-size: 12px; }
  .fp6 .sq span { font-size: 13.5px; } .fp6 .two { grid-template-columns: minmax(0, 1fr) 170px; } .fp6 .fqd { width: 164px; } .fp6 .fqw small { font-size: 11.5px; }
  .fp6 .p3 div { font-size: 11.5px; padding: 7px 4px; } .fp6 .pl { padding: 6px 1px; } .fp6 .pl b { font-size: 13px; } .fp6 .pl u { font-size: 10px; } .fp6 .pl i { width: 13px; height: 13px; }
  .fp6 .fp-sld svg { max-height: 330px; } .fp6 .lm span { font-size: 12px; } .fp6 .lm b { font-size: 13.5px; } .fp6 .lms { gap: 9px 8px; }
}

/* ===== v6d: exactly the approved mockup - three columns 19% | 56% | 21%, energy inside the centre, mockup type proportions ===== */
@media (min-width: 761px) {
  .fp-main .fp-body.fp6 { grid-template-columns: 19fr 56fr 21fr; gap: 12px; align-items: start; }
  .fp6 .fp-c1, .fp6 .fp-c2, .fp6 .fp-c3 { min-width: 0; }
  .fp6 .fp-c2 { display: flex; flex-direction: column; gap: 10px; }
  .fp6 .cd5 { padding: 9px 12px 11px; } .fp6 .cd5 h4 { font-size: 12px; margin-bottom: 8px; } .fp6 .cd5 h4 em { font-size: 10px; }
  .fp6 .br { grid-template-columns: 46px minmax(0, 1fr) 96px; margin: 8px 0; } .fp6 .br b { font-size: 14.5px; } .fp6 .br .tr { height: 15px; border-radius: 8px; } .fp6 .br .tr i { border-radius: 8px; } .fp6 .br .v { font-size: 20px; } .fp6 .br .v u { font-size: 11px; }
  .fp6 .sq span { font-size: 12.5px; } .fp6 .two { grid-template-columns: minmax(0, 1fr) 150px; } .fp6 .fqd { width: 146px; } .fp6 .fqw small { font-size: 11px; }
  .fp6 .ens { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .fp6 .en1 { display: block; padding: 6px 11px; } .fp6 .en1 em { font-size: 11.5px; } .fp6 .en1 b { font-size: 17px; } .fp6 .en1 b u { font-size: 10.5px; }
  .fp6 .enn { font-size: 13.5px; padding: 2px 0 4px; }
  .fp6 .p3 div { font-size: 10.5px; padding: 6px 4px; } .fp6 .pl { padding: 5px 1px; } .fp6 .pl b { font-size: 12.5px; } .fp6 .pl u { font-size: 9.5px; } .fp6 .pl i { width: 12px; height: 12px; }
  .fp6 .fp-sld svg { max-height: 300px; } .fp6 .lm span { font-size: 11.5px; } .fp6 .lm b { font-size: 13px; } .fp6 .lms { gap: 8px 8px; }
}


/* ===== faceplate on the phone: collapsible cards, six key numbers in 3 x 2 ===== */
.fp6 .cd-st .lms { margin-top: 0; padding-top: 0; border-top: 0; }
.fp5 .cd5 h4 em.bad { background: #fde9ec; color: #b3122a; }
@media (min-width: 761px) { .fp6 .fp-c1 { display: flex; flex-direction: column; gap: 10px; } }

/* ===== display profile (display-profile.js): overlays that cover the screen must not be scaled with the page ===== */
#nsSleep { zoom: calc(1 / var(--s, 1)); }                                    /* the sleep screen is already fluid: keep it at real size */
#nsGate, #nsProf { zoom: calc(1 / var(--s, 1)); } #nsGate .ag-card, #nsProf .ag-card { zoom: var(--s, 1); }
.dp-touch .ns-rail button { min-height: 64px; } .dp-touch .nn-bar, .dp-touch .ava { min-height: 44px; }

/* trends: zoom / move / maximize tools */
.tr-zm { display: inline-flex; align-items: center; gap: 4px; }
.tr-zb, .tr-live { display: inline-flex; align-items: center; gap: 5px; font: 800 11px 'Segoe UI', sans-serif; letter-spacing: .04em; padding: 7px 9px; border-radius: 10px; border: 1.5px solid #d4dce2; background: #fff; color: #14222c; cursor: pointer; }
.tr-zb:hover, .tr-live:hover { border-color: #0b6fa8; color: #0b6fa8; }
.tr-zb svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tr-live { background: #17803f; border-color: #17803f; color: #fff; } .tr-live:hover { color: #fff; filter: brightness(1.1); }
.tr-win { font: 800 12px 'Segoe UI', sans-serif; color: #0b4a86; min-width: 58px; text-align: center; }
.tr-page.tr-max { position: fixed; inset: 0; z-index: 9000; background: #f3f6f9; padding: 14px 18px; overflow: auto; box-sizing: border-box; }
@media (max-width: 760px) { .tr-zm { flex-wrap: wrap; justify-content: center; width: 100%; } }


/* ===== Alarms / notifications page ===== */
.ap { max-width: 760px; margin: 0 auto 14px; }
.ap-st { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.ap-pill { font: 800 12px 'Segoe UI', system-ui, sans-serif; padding: 6px 12px; border-radius: 999px; letter-spacing: .02em; }
.ap-pill.ok { background: #dcf5e6; color: #1b7a43; } .ap-pill.no { background: #fff4c2; color: #8a6d00; }
.ap-note { background: #eaf3fb; border: 1.5px solid #bcd8ee; color: #0b3a4a; border-radius: 12px; padding: 10px 12px; font: 600 13.5px/1.45 'Segoe UI', system-ui, sans-serif; margin-bottom: 12px; } .ap-note.warn { background: #fde9ec; border-color: #f2b8c0; color: #8a1f2e; }
.ap-btn { display: block; width: 100%; padding: 14px; border: 0; border-radius: 14px; background: #0b6fa8; color: #fff; font: 800 14px 'Segoe UI', system-ui, sans-serif; letter-spacing: .04em; cursor: pointer; margin: 0 0 10px; box-shadow: 0 6px 16px rgba(11, 111, 168, .28); }
.ap-btn.alt { background: #1c3f8f; } .ap-btn.trip { background: linear-gradient(135deg, #e0453a, #b3261e); box-shadow: 0 6px 16px rgba(179, 38, 30, .35); }
.ap-row { margin: 4px 0 12px; } .ap-row label { display: block; font: 800 11px 'Segoe UI', system-ui, sans-serif; letter-spacing: .1em; color: #566b79; margin-bottom: 5px; text-transform: uppercase; }
.ap-row select { width: 100%; padding: 12px; border: 1.5px solid #c6d1d9; border-radius: 12px; font: 700 15px 'Segoe UI', system-ui, sans-serif; background: #fff; color: #14222c; }
.ap-msg { min-height: 20px; font: 700 13.5px/1.4 'Segoe UI', system-ui, sans-serif; } .ap-msg.ok { color: #1b7a43; } .ap-msg.no { color: #b3261e; }
.ap-h { margin: 0 0 8px; font: 800 15px 'Segoe UI', system-ui, sans-serif; color: #0b3a4a; text-transform: none; letter-spacing: 0; }
.ap-li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid #e3ebf1; } .ap-li:first-of-type { border-top: 0; }
.ap-li > i { width: 10px; height: 10px; border-radius: 50%; background: #e0453a; margin-top: 5px; flex: none; }
.ap-li div { flex: 1; min-width: 0; } .ap-li b { display: block; font: 800 14px 'Segoe UI', system-ui, sans-serif; color: #14222c; } .ap-li b em { font-style: normal; font-size: 10px; background: #fff4c2; color: #8a6d00; padding: 2px 6px; border-radius: 6px; margin-left: 6px; }
.ap-li span { display: block; font: 600 12.5px/1.35 'Segoe UI', system-ui, sans-serif; color: #566b79; } .ap-li time { font: 700 12px 'Segoe UI', system-ui, sans-serif; color: #566b79; flex: none; }
.ap-empty { margin: 0; color: #566b79; font: 600 13.5px 'Segoe UI', system-ui, sans-serif; }

.ap-in { width: 100%; box-sizing: border-box; padding: 13px 12px; border: 1.5px solid #c6d1d9; border-radius: 12px; font: 800 17px "Segoe UI", system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; background: #fff; color: #14222c; }
.ap-btn.out { background: #fff; color: #8a1f2e; border: 1.5px solid #f2b8c0; box-shadow: none; }
.ap-btn[disabled] { opacity: .6; cursor: default; }

/* ===== header v4 (25 Nov 2026): notification bar, clock and date, avatar. Desktop only for the bar and the clock; the phone header is unchanged ===== */
.ava { border: 0; color: #fff; background: linear-gradient(145deg, #3a68c8, #1c3f8f 58%, #142f6c); box-shadow: 0 0 0 2px #fff, 0 0 0 4px #c6d1d9, 0 4px 10px rgba(28, 63, 143, .28); position: relative; }
.ava::after { content: ''; position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: #1fbf6b; border: 2px solid #fff; box-sizing: border-box; }
.ava:hover, .ava[aria-expanded="true"] { border: 0; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #c9973a, 0 6px 14px rgba(201, 151, 58, .35); }
.ava.adm { background: linear-gradient(145deg, #34495a, #14222c 62%); color: #f3d58a; border: 0; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #c9973a, 0 4px 10px rgba(20, 34, 44, .35); }
.am-av { background: linear-gradient(145deg, #3a68c8, #1c3f8f 62%); color: #fff; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #dbe3e9; } .am-av.adm { background: linear-gradient(145deg, #34495a, #14222c 62%); color: #f3d58a; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #c9973a; }
@media (min-width: 761px) {
  body.ns .ns-hdr { gap: 18px; }
  .ava { width: 46px; height: 46px; font-size: 15px; }
  .ns-hdr .clk { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; line-height: 1; padding: 2px 18px 2px 4px; border-right: 1.5px solid #dbe3e9; background: none; -webkit-text-fill-color: currentColor; color: #14222c; }
  .ns-hdr .clk .ct { font: 800 24px/1 'Segoe UI', system-ui, sans-serif; letter-spacing: .01em; font-variant-numeric: tabular-nums; background: linear-gradient(90deg, #1c3f8f 0%, #3a68c8 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
  .ns-hdr .clk .ct small { font-size: 15px; font-weight: 700; opacity: .75; }
  .ns-hdr .clk .cd { font: 800 10.5px/1 'Segoe UI', system-ui, sans-serif; letter-spacing: .15em; color: #c9973a; white-space: nowrap; -webkit-text-fill-color: #8a6a1f; }
  .nn-bar { width: min(760px, 100%); padding: 8px 12px 8px 14px; background: linear-gradient(180deg, #fff, #f1f5f8); box-shadow: 0 1px 2px rgba(11, 58, 74, .06), 0 8px 20px rgba(11, 58, 74, .08); position: relative; overflow: hidden; gap: 12px; }
  .nn-bar::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: #1fbf6b; }
  .nn-bar.warn::before { background: #e0a800; } .nn-bar.bad::before { background: #d93a2f; } .nn-bar.info::before { background: #2b7fd1; }
  .nn-ic { width: 38px; height: 38px; margin-left: 4px; } .nn-ic svg { width: 19px; height: 19px; }
  .nn-tx b { font-size: 14.5px; } .nn-tx span { font-size: 12.5px; }
  .nn-n { min-width: 42px; height: 28px; font-size: 12.5px; letter-spacing: .04em; }
}

/* soft matte black for the big numbers of the P / Q / S / P.F. cards (was #14222c, too dark) */
.sc, .sc b { color: #2e3a44; }

/* P.F. numbers keep the dedicated P.F. violet */
.sc[data-pf] b { color: #7a5cc4; }   /* each plant's own P.F. card keeps the violet; the main Home card is matte black like P, Q and S */

/* a SELECTED card is filled with its colour, so its number is white (P, Q, S and P.F. alike); an unselected card keeps the matte black number */
.sc.on, .sc.on b, .sc.on i { color: #fff; }

/* avatar: always a true circle. On touch screens a minimum height of 44px was applied while the phone width was 36px, which made it oval */
.ava { aspect-ratio: 1 / 1; flex: none; }
@media (max-width: 760px) { body.ns .ava, .dp-touch .ava { width: 44px !important; height: 44px !important; min-width: 44px !important; min-height: 44px !important; } }

/* live layer: grey dot / grey underline = no data from the relay; status strip on Home */
.tt.off:after { background: #aab6bf; }
.ph-pl.off .dot { background: #aab6bf; }
.ns-live { display: flex; align-items: center; gap: 9px; margin: 0 0 10px; padding: 7px 14px; border-radius: 12px; border: 1.5px solid #d4dce2; background: #f6f9fb; color: #34566a; font: 700 12.5px 'Segoe UI', system-ui, sans-serif; text-transform: none; letter-spacing: 0; }
.ns-live i { width: 9px; height: 9px; border-radius: 50%; background: #aab6bf; flex: none; }
.ns-live.ok { border-color: #bfe3cc; background: #f1faf4; color: #1b6a3f; } .ns-live.ok i { background: #1fbf6b; }
.ns-live.bad { border-color: #f2b8c0; background: #fff4f5; color: #8a1f2e; } .ns-live.bad i { background: #d93a2f; }
.ns-live.demo { border-color: #efdb8f; background: #fffbea; color: #7a5d00; } .ns-live.demo i { background: #e0a800; }

.pest { font: 800 9px 'Segoe UI', system-ui, sans-serif; fill: #b87a00; letter-spacing: .1em; }
.ph-pl strong .est, .ph-gen .est { display: inline-block; margin-left: 5px; padding: 1px 5px; border-radius: 6px; background: #fff4c2; color: #8a6d00; font: 800 9px 'Segoe UI', system-ui, sans-serif; letter-spacing: .08em; vertical-align: middle; text-decoration: none; }

.ns-studytag { position: fixed; top: 86px; right: 22px; z-index: 40; padding: 6px 13px; border-radius: 999px; background: #fff4c2; border: 1.5px solid #efdb8f; color: #7a5d00; font: 700 12px 'Segoe UI', system-ui, sans-serif; text-transform: none; letter-spacing: 0; box-shadow: 0 4px 12px rgba(120, 93, 0, .12); pointer-events: auto; }
.ns-studytag[hidden] { display: none; }
.ns-studytag b { font-weight: 800; letter-spacing: .06em; margin-right: 4px; }
@media (max-width: 760px) { .ns-studytag { top: auto; bottom: 78px; right: 10px; font-size: 11px; padding: 5px 10px; } }

.ns-studyline { margin: 12px 0 2px; padding: 8px 14px; border-radius: 12px; background: #fff9e0; border: 1.5px solid #efdb8f; color: #6b5200; font: 600 12.5px/1.4 'Segoe UI', system-ui, sans-serif; text-transform: none; letter-spacing: 0; }
.ns-studyline b { font-weight: 800; letter-spacing: .06em; margin-right: 6px; }

/* 27 Nov 2026 - plant page: live relay panel (the load study is not shown in live mode) */
.nsph-live { background: #fff; border: 1.5px solid #d4dce2; border-radius: 16px; padding: 14px 16px 12px; margin-top: 12px; }
.nsph-live h3 { margin: 0 0 10px; font: 800 12px 'Inter', 'Segoe UI', sans-serif; letter-spacing: .12em; color: #34566a; text-transform: uppercase; }
.nsph-live .nlg { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.nsph-live .nlc { background: #f4f8fb; border: 1px solid #dde6ec; border-radius: 12px; padding: 8px 10px; min-width: 0; }
.nsph-live .nlc em { display: block; font: 700 9.5px 'Segoe UI', system-ui, sans-serif; font-style: normal; letter-spacing: .1em; color: #6b7f8c; }
.nsph-live .nlc b { display: block; margin-top: 2px; font: 800 18px/1.15 'Segoe UI', system-ui, sans-serif; color: #14222c; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nsph-live .nlc b i { font: 700 10.5px 'Segoe UI', system-ui, sans-serif; font-style: normal; color: #566b79; margin-left: 4px; }
.nsph-live .nlc b.ok { color: #17803f; } .nsph-live .nlc b.op { color: #6b7f8c; } .nsph-live .nlc b.tr { color: #b87a00; } .nsph-live .nlc b.nd { color: #8a97a1; }
.nsph-live .nln { margin: 10px 2px 0; font: 600 11px 'Segoe UI', system-ui, sans-serif; color: #6b7f8c; }

/* 27 Nov 2026 - smooth live updates: numbers keep a fixed digit width while they glide, bars and dots change colour and width smoothly (nsmorph.js patches in place) */
b, strong, em, .ft b, .sc b { font-variant-numeric: tabular-nums; }
u > s, .bar > s, .bar > i, .swg-lc-bar > i, .fp-bar > i, .ph-pl u s, .nlc .bar i { transition: width .6s ease, background-color .4s ease; }
.tt:after, .dot, .ph-pl .dot, .swf .st i, .swf .lp i, .nsph-live .nlc b { transition: background-color .4s ease, box-shadow .4s ease, color .4s ease; }
.swf, .ph-pl, .tt { transition: border-color .4s ease, background-color .4s ease, box-shadow .15s ease, transform .15s ease; }



/* 28 Nov 2026 - the tag on a live Load flow page */
.ns-studytag.on-live { background: #dcf3e4; border-color: #9fd6b3; color: #17803f; }

/* 28 Nov: text inside the bus and plant boxes of Load flow: normal text colour, a little softer */
.fs-in, .fs-pname.fs-in, .fs-val.fs-in, .fs-sub.fs-in, .fs-name.fs-in { fill: var(--text) !important; opacity: .82; }

/* ENERGY BALANCE table (28 Nov) */
.eb-wrap { overflow-x: auto; }
.eb-tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.eb-tbl th { text-align: right; font: 800 11px var(--sans, system-ui); letter-spacing: .12em; color: var(--text-muted, #6b7f8c); padding: 8px 12px; border-bottom: 2px solid rgba(120,140,155,.35); }
.eb-tbl th:first-child { text-align: left; }
.eb-tbl td { text-align: right; padding: 9px 12px; border-bottom: 1px solid rgba(120,140,155,.2); font-size: 14px; }
.eb-tbl td:first-child { text-align: left; font-weight: 600; }
.eb-tbl .eb-cov { font-size: 11px; color: var(--text-muted, #6b7f8c); font-weight: 600; white-space: nowrap; }
.eb-tbl .eb-sec td { text-align: left; font: 800 11px var(--sans, system-ui); letter-spacing: .14em; color: var(--text-muted, #6b7f8c); background: rgba(120,140,155,.1); padding: 6px 12px; }
.eb-tbl .eb-tot td { font-weight: 800; background: rgba(42,115,179,.08); }
.eb-tbl .eb-bal td { font-weight: 800; font-size: 15px; background: rgba(217,105,42,.1); border-bottom: 0; }
.eb-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; }
@media (max-width: 640px) { .eb-tbl td, .eb-tbl th { padding: 8px 6px; font-size: 12.5px; } .eb-tbl .eb-cov { display: none; } }

/* TRENDS zoom tools (28 Nov) */
.tr-zb.on { background: #0b6fa8; border-color: #0b6fa8; color: #fff; }
.tr-svg.zt-in svg.nsc { cursor: zoom-in; } .tr-svg.zt-out svg.nsc { cursor: zoom-out; }
.tr-svg.zt-in .tr-sel, .tr-svg.zt-out .tr-sel { background: rgba(11, 111, 168, .12); border: 1.5px dashed #0b6fa8; }

/* TRENDS: the aim (28 Nov) - a crosshair follows the mouse while a zoom tool is on; no dotted lines */
.tr-svg.zt-in svg.nsc, .tr-svg.zt-out svg.nsc { cursor: crosshair; }
.tr-svg.zt-in .nsc .xh line, .tr-svg.zt-out .nsc .xh line { display: none; }
.tr-aimv, .tr-aimh { position: absolute; background: #0b6fa8; opacity: .8; pointer-events: none; z-index: 6; }
.tr-aimv { top: 0; width: 1px; margin-left: -.5px; } .tr-aimh { left: 0; height: 1px; margin-top: -.5px; }
.tr-aimr { position: absolute; z-index: 7; pointer-events: none; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 2px solid #0b6fa8; background: rgba(255, 255, 255, .85); color: #0b6fa8; font: 900 14px/16px 'Segoe UI', sans-serif; text-align: center; }
.tr-lead { display: none !important; }
/* 28 Nov: the dashed vertical line that followed the mouse is gone: only the aim and the faceplate stay (the dot on the curve stays) */
.tr-svg .nsc .xh line { display: none !important; }

/* ENERGY BALANCE - the management page (28 Nov) */
.eb2 .eb2-act { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.eb2-btn { font: 800 11px 'Segoe UI', system-ui; letter-spacing: .08em; padding: 9px 14px; border-radius: 999px; border: 1.5px solid #9fc4e6; background: #fff; color: #0b4a86; cursor: pointer; }
.eb2-btn:hover { background: #eef6fd; }
.eb2-big { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 6px 0 14px; }
.eb2-q { background: #fff; border: 1.5px solid color-mix(in srgb, var(--c) 30%, #dbe3ea); border-top: 5px solid var(--c); border-radius: 16px; padding: 14px 16px 14px; box-shadow: 0 6px 18px rgba(20, 50, 80, .06); }
.eb2-q header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; } .eb2-q header i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.eb2-q header b { font: 800 12px 'Segoe UI'; letter-spacing: .12em; color: #34566a; flex: 1; } .eb2-q header em { font: 800 12px 'Segoe UI'; font-style: normal; color: var(--c); }
.eb2-row { display: grid; grid-template-columns: 1fr auto; align-items: baseline; row-gap: 0; padding: 5px 0; border-bottom: 1px dashed #e0e8ee; }
.eb2-row span { font: 800 10px 'Segoe UI'; letter-spacing: .1em; color: #6b7f8c; grid-column: 1 / 3; }
.eb2-row strong { font: 800 26px/1.15 'Segoe UI'; color: #14222c; font-variant-numeric: tabular-nums; } .eb2-row strong u, .eb2-bal strong u { font: 700 12px 'Segoe UI'; text-decoration: none; color: #6b7f8c; margin-left: 5px; }
.eb2-row em, .eb2-bal em { font: 600 12px 'Segoe UI'; font-style: normal; color: #6b7f8c; text-align: right; }
.eb2-bar { height: 9px; border-radius: 6px; background: repeating-linear-gradient(45deg, #e4ebf1 0 6px, #eef3f7 6px 12px); margin: 11px 0 6px; overflow: hidden; } .eb2-bar s { display: block; height: 100%; background: var(--c); border-radius: 6px; }
.eb2-bal { display: grid; grid-template-columns: 1fr auto; align-items: baseline; } .eb2-bal span { font: 800 10px 'Segoe UI'; letter-spacing: .1em; color: #6b7f8c; grid-column: 1 / 3; }
.eb2-bal strong { font: 800 30px/1.2 'Segoe UI'; color: var(--c); font-variant-numeric: tabular-nums; } .eb2-bal strong.neg { color: #b3261e; }
.eb2-mid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; margin-bottom: 14px; }
.eb2-pf, .eb2-note, .eb2-rk, .eb2-days { background: #fff; border: 1.5px solid #dbe3ea; border-radius: 16px; padding: 14px 16px; }
.eb2-pf header, .eb2-note header, .eb2-rk header, .eb2-days header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.eb2-pf header b, .eb2-note header b, .eb2-rk header b, .eb2-days header b { font: 800 12px 'Segoe UI'; letter-spacing: .12em; color: #34566a; } .eb2-pf header em, .eb2-rk header em, .eb2-days header em { font: 700 12px 'Segoe UI'; font-style: normal; color: #6b7f8c; }
.eb2-days header em i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 4px 0 10px; vertical-align: -1px; }
.eb2-pfr { display: grid; grid-template-columns: 110px 1fr 60px; gap: 10px; align-items: center; margin: 8px 0; } .eb2-pfr span { font: 800 10px 'Segoe UI'; letter-spacing: .1em; color: #6b7f8c; } .eb2-pfr strong { font: 800 18px 'Segoe UI'; color: #7a5cc4; text-align: right; }
.eb2-pft { position: relative; height: 12px; border-radius: 8px; background: #e8eef3; overflow: visible; } .eb2-pft s { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #9d86d8, #7a5cc4); } .eb2-pft i { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #14222c; opacity: .6; }
.eb2-pf p, .eb2-note p { font: 500 12.5px/1.45 'Segoe UI'; color: #4b6070; margin: 8px 0 0; }
.eb2-days svg { width: 100%; height: 230px; display: block; } .eb2-days .gl { stroke: #e6edf2; stroke-width: 1; } .eb2-days .ya, .eb2-days .xa { font: 600 11px 'Segoe UI'; fill: #6b7f8c; }
.eb2-two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin: 14px 0; align-items: start; }
.eb2-r { display: grid; grid-template-columns: minmax(120px, 1.1fr) 2fr auto 52px; gap: 4px 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid #eef2f5; }
.eb2-r .n { font: 700 13px 'Segoe UI'; color: #14222c; display: flex; align-items: center; gap: 8px; min-width: 0; } .eb2-r .n i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.eb2-r .bar { height: 10px; border-radius: 6px; background: #eef3f7; overflow: hidden; } .eb2-r .bar s { display: block; height: 100%; border-radius: 6px; opacity: .9; }
.eb2-r strong { font: 800 14px 'Segoe UI'; font-variant-numeric: tabular-nums; text-align: right; } .eb2-r em { font: 700 12px 'Segoe UI'; font-style: normal; color: #6b7f8c; text-align: right; }
.eb2-r small { grid-column: 1 / 5; font: 600 11px 'Segoe UI'; color: #7d8f9b; }
.eb2-none { font: 600 12px 'Segoe UI'; color: #8a5a00; margin: 8px 0 0; }
.eb2-warn { background: #fdf0cc; border: 1.5px solid #e6c36a; color: #6b4a00; border-radius: 12px; padding: 10px 14px; font: 600 13px/1.45 'Segoe UI'; margin-bottom: 12px; }
.eb2-foot { margin: 6px 2px 0; }
@media (max-width: 900px) { .eb2-big, .eb2-mid, .eb2-two { grid-template-columns: 1fr; } .eb2-r { grid-template-columns: 1fr auto 52px; } .eb2-r .bar { grid-column: 1 / 4; grid-row: 2; } .eb2-r small { grid-column: 1 / 4; } .eb2-pfr { grid-template-columns: 90px 1fr 52px; } .eb2 .eb2-act { justify-content: flex-start; } }
@media print { .ns-rail, #nsSub, .ns-top, .nsph-top, .eb2-act, .eb2-foot { display: none !important; } body { background: #fff !important; } .eb2-big, .eb2-two, .eb2-mid { break-inside: avoid; } }

/* ENERGY BALANCE - the time platform (29 Nov) */
.eb2-time { background: #fff; border: 1.5px solid #dbe3ea; border-radius: 16px; padding: 12px 14px; margin: 4px 0 14px; }
.eb2-qk { display: flex; flex-wrap: wrap; gap: 8px; }
.eb2-qk button { font: 800 11.5px 'Segoe UI', system-ui; letter-spacing: .07em; padding: 8px 14px; border-radius: 999px; border: 1.5px solid #9fc4e6; background: #fff; color: #0b4a86; cursor: pointer; }
.eb2-qk button.on { background: #0b6fa8; border-color: #0b6fa8; color: #fff; } .eb2-qk button:hover:not(.on) { background: #eef6fd; }
.eb2-pr { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin: 10px 2px 6px; } .eb2-pr b { font: 800 15px 'Segoe UI'; color: #14306b; } .eb2-pr span { font: 600 13px 'Segoe UI'; color: #4b6070; }
.eb2-cu { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: end; border-top: 1px dashed #dbe3ea; padding-top: 10px; }
.eb2-cu label { display: flex; flex-direction: column; font: 800 10px 'Segoe UI'; letter-spacing: .1em; color: #6b7f8c; gap: 3px; } .eb2-cu input { font: 600 14px 'Segoe UI'; padding: 7px 9px; border: 1.5px solid #c9d6e0; border-radius: 9px; color: #14222c; background: #fff; }
.eb2-cu em { font: 600 12px 'Segoe UI'; font-style: normal; color: #6b7f8c; }
@media (max-width: 900px) { .eb2-qk button { padding: 8px 11px; font-size: 11px; } .eb2-cu label { flex: 1 1 140px; } .eb2-cu input { width: 100%; } }

/* ENERGY BALANCE: two bars against the maximum (60 MW x hours) */
.eb2-mx { margin: 10px 0 8px; } .eb2-mx .eb2-bar { margin: 4px 0; height: 10px; } .eb2-mx .eb2-bar s.g { opacity: .45; }
.eb2-mx p { font: 600 11.5px/1.35 'Segoe UI'; color: #5b6f7d; margin: 6px 0 0; } .eb2-mx p b { color: var(--c); font-weight: 800; }

/* THE SIGN-IN SCREEN = THE SLEEP SCREEN (29 Nov) */
#nsGate .bg { position: absolute; inset: -4%; background: url(assets/powerhouse.jpg) 50% 26% / cover no-repeat; animation: nsKb 40s ease-in-out infinite alternate; }
#nsGate .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 22, 56, .55) 0%, rgba(8, 22, 56, .08) 30%, rgba(8, 22, 56, 0) 48%, rgba(8, 22, 56, .78) 100%); }
#nsGate .top { position: absolute; left: 3vw; right: 3vw; top: 3vh; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
#nsGate .brand { display: flex; align-items: center; gap: 22px; }
#nsGate .slg { background: rgba(255, 255, 255, .97); border-radius: 22px; padding: 14px 26px; box-shadow: 0 12px 36px rgba(0, 0, 0, .35); } #nsGate .slg img { height: clamp(64px, 9vh, 104px); display: block; }
#nsGate .nm h1 { margin: 0; font: 800 clamp(22px, 2.6vw, 40px) 'Segoe UI'; letter-spacing: .1em; text-shadow: 0 2px 16px rgba(0, 0, 0, .55); }
#nsGate .nm p { margin: 8px 0 0; display: inline-flex; align-items: center; gap: 8px; font: 700 clamp(14px, 1.4vw, 21px) 'Segoe UI'; letter-spacing: .06em; background: rgba(10, 28, 70, .5); border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(10px); padding: 7px 16px; border-radius: 999px; }
#nsGate .nm p svg { width: 1.25em; height: 1.25em; fill: none; stroke: #f3d58a; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#nsGate .wt { text-align: right; background: rgba(10, 28, 70, .5); border: 1px solid rgba(255, 255, 255, .3); backdrop-filter: blur(14px); border-radius: 22px; padding: 12px 26px 12px; box-shadow: 0 12px 34px rgba(0, 0, 0, .3); }
#nsGate .wt .slt b { font: 800 clamp(44px, 6vw, 92px)/1 'Segoe UI'; font-variant-numeric: tabular-nums; letter-spacing: .02em; text-shadow: 0 2px 14px rgba(0, 0, 0, .4); } #nsGate .wt .slt em { font: 700 clamp(20px, 2.4vw, 36px) 'Segoe UI'; font-style: normal; color: #f3d58a; margin-left: 8px; font-variant-numeric: tabular-nums; }
#nsGate .wt .dt { font: 600 clamp(14px, 1.4vw, 21px) 'Segoe UI'; letter-spacing: .04em; color: #dbe8ff; margin-top: 2px; }
#nsGate .md { margin-top: 8px; display: inline-block; font: 700 12px 'Segoe UI'; letter-spacing: .14em; color: #f3d58a; } #nsGate .md i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #f3d58a; margin-right: 8px; }
#nsGate .vals { position: absolute; left: 50%; bottom: 6vh; transform: translateX(-50%); width: min(1500px, 94vw); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 1.2vw, 20px); }
#nsGate .v { container-type: inline-size; min-width: 0; border-radius: 26px; background: rgba(10, 28, 70, .5); border: 1.5px solid rgba(255, 255, 255, .28); backdrop-filter: blur(16px) saturate(1.2); box-shadow: 0 16px 40px rgba(0, 0, 0, .28); }
#nsGate .vi { display: flex; align-items: center; gap: 6cqw; padding: 7cqw 6cqw; }
#nsGate .v .ch { width: 21cqw; height: 21cqw; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 800 9cqw 'Segoe UI'; flex: none; background: var(--c); color: #fff; box-shadow: 0 0 0 2cqw color-mix(in srgb, var(--c) 30%, transparent); } #nsGate .v .ch.pf { font-size: 7cqw; }
#nsGate .v .vi > div { min-width: 0; }
#nsGate .v b { display: block; font: 800 clamp(30px, 17cqw, 96px)/1 'Segoe UI'; font-variant-numeric: tabular-nums; text-shadow: 0 2px 14px rgba(0, 0, 0, .35); white-space: nowrap; }
#nsGate .v i { display: block; margin-top: 1.5cqw; font: 700 clamp(10px, 5cqw, 22px) 'Segoe UI'; font-style: normal; letter-spacing: .06em; color: #dbe8ff; white-space: nowrap; }
#nsGate .vals { bottom: 4vh; }
#nsGate .ag-slot .ag-card { margin: 0 auto; }
/* the sign-in faceplate. Two looks, chosen by  const GATE_STYLE = 'light' | 'dark'  in config.js (the gate gets the class lt or dk) */
#nsGate .ag-card { -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2); width: min(420px, 100%); border-radius: 26px; }
#nsGate .ag-logo img, #nsGate .ag-logo b { display: none; } #nsGate .ag-logo { margin-bottom: 8px; }
#nsGate .ag-logo::before { content: "SIGN IN"; font: 800 24px 'Segoe UI'; letter-spacing: .22em; } #nsGate .ag-logo::after { content: ""; width: 54px; height: 4px; border-radius: 3px; background: linear-gradient(90deg, #d9692a, #00907b, #2a73b3, #7a5cc4); }
/* LIGHT (the white faceplate) */
#nsGate.lt .ag-card { background: rgba(255, 255, 255, .95); border: 1.5px solid rgba(255, 255, 255, .75); box-shadow: 0 24px 60px rgba(0, 0, 0, .42); color: #14222c; }
#nsGate.lt .ag-logo::before { color: #0b3a4a; } #nsGate.lt .ag-logo span { color: #5d6e7b; }
/* DARK (glass, like the value cards) */
#nsGate.dk .ag-card { background: rgba(10, 28, 70, .58); border: 1.5px solid rgba(255, 255, 255, .3); box-shadow: 0 18px 46px rgba(0, 0, 0, .4); color: #fff; }
#nsGate.dk .ag-logo::before { color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, .4); } #nsGate.dk .ag-logo span { color: #dbe8ff; }
#nsGate.dk .ag-card label { color: #dbe8ff; }
#nsGate.dk .ag-card input[type=text], #nsGate.dk .ag-card input[type=password] { background: rgba(255, 255, 255, .12); border: 1.5px solid rgba(255, 255, 255, .34); color: #fff; }
#nsGate.dk .ag-card input::placeholder { color: rgba(255, 255, 255, .55); }
#nsGate.dk .ag-card input:focus { border-color: #f3d58a; background: rgba(255, 255, 255, .18); box-shadow: 0 0 0 3px rgba(243, 213, 138, .22); }
#nsGate.dk .ag-card input:-webkit-autofill { -webkit-text-fill-color: #fff; box-shadow: 0 0 0 40px rgba(24, 48, 104, .95) inset; }
#nsGate.dk .ag-row { color: #dbe8ff; } #nsGate.dk .ag-row input { accent-color: #f3d58a; }
#nsGate.dk .ag-err { color: #ffb4ab; } #nsGate.dk .ag-ok { color: #8be0a8; }
#nsGate.dk .ag-go { background: linear-gradient(135deg, #f3d58a, #c9973a); color: #15337a; box-shadow: 0 8px 20px rgba(201, 151, 58, .4); } #nsGate.dk .ag-go:hover { background: linear-gradient(135deg, #f8e3ad, #d6a64a); }
#nsGate.dk .ag-go.alt { background: rgba(255, 255, 255, .12); color: #fff; border: 1.5px solid rgba(255, 255, 255, .35); box-shadow: none; }
#nsGate.dk .ag-link { color: #f3d58a; } #nsGate.dk .ag-foot { color: #b8c9e6; }
#nsGate.dk .ag-eye { color: #dbe8ff; } #nsGate.dk .ag-eye:hover { background: rgba(255, 255, 255, .14); color: #fff; }
@media (max-width: 1000px) { #nsGate .vals { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; bottom: 2.5vh; } #nsGate .v { border-radius: 16px; } }
/* THE EMBLEM and a narrower faceplate (29 Nov) */
.ag-emb { display: none; }
#nsGate .ag-emb { order: -1; display: block; width: 64px; height: 64px; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .35)); } #nsGate .ag-emb svg { width: 100%; height: 100%; display: block; overflow: visible; }
#nsGate .ag-ring { transform-origin: 36px 36px; animation: agSpin 5s linear infinite; }
#nsGate .ag-sine { animation: agFlow 1.2s linear infinite; }
#nsGate .ag-bolt { transform-origin: 36px 36px; animation: agBolt 2.4s ease-in-out infinite; }
@keyframes agSpin { to { transform: rotate(360deg); } } @keyframes agFlow { to { stroke-dashoffset: -21; } }
@keyframes agBolt { 0%, 100% { opacity: .55; transform: scale(.94); } 12% { opacity: 1; transform: scale(1.08); } 24% { opacity: .7; transform: scale(1); } 36% { opacity: 1; transform: scale(1.06); } 60% { opacity: .6; transform: scale(.96); } }
@media (prefers-reduced-motion: reduce) { #nsGate .ag-ring, #nsGate .ag-sine, #nsGate .ag-bolt { animation: none; } }
#nsGate .ag-card { width: min(360px, 100%); }
#nsGate .ag-logo { gap: 6px; }
/* PHONE (and any narrow window): the whole sign-in screen FITS the screen, no scrolling: header, faceplate and the four values share the height of the screen (dvh follows the phone's browser bars).
   The faceplate gets what is left; its spacing shrinks with the height; on a short screen the small texts go. While the keyboard is open (class kb) the values hide and the screen may scroll, so the fields are never cut. */
@media (max-width: 700px) {
  html body #nsGate { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; overflow: hidden; padding: 0; height: 100vh; height: 100dvh; }
  html body #nsGate.kb { overflow-y: auto; -webkit-overflow-scrolling: touch; }
  #nsGate .bg, #nsGate .shade { position: fixed; }
  #nsGate .top { order: 1; flex: none; position: relative; left: auto; right: auto; top: auto; padding: 10px 14px 2px; display: flex; flex-wrap: nowrap; align-items: flex-start; justify-content: space-between; gap: 10px; }
  #nsGate .brand { gap: 10px; min-width: 0; flex: 1 1 auto; } #nsGate .slg { padding: 5px 9px; border-radius: 12px; flex: none; } #nsGate .slg img { height: 30px; }
  #nsGate .nm { min-width: 0; } #nsGate .nm h1 { font-size: 13px; letter-spacing: .05em; line-height: 1.15; } #nsGate .nm p { margin-top: 3px; padding: 2px 8px; font-size: 10px; letter-spacing: .02em; max-width: 100%; } #nsGate .nm p span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #nsGate .wt { flex: none; padding: 5px 12px; border-radius: 14px; } #nsGate .wt .slt b { font-size: 24px; } #nsGate .wt .slt em { font-size: 13px; } #nsGate .wt .dt { display: none; } #nsGate .md { margin-top: 1px; font-size: 9px; letter-spacing: .08em; }
  #nsGate .ag-slot { order: 2; flex: 1 1 0; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; padding: 6px 12px; }
  #nsGate .ag-card { width: 100%; max-height: 100%; overflow: hidden; padding: clamp(10px, 2.2dvh, 18px) 16px clamp(8px, 1.6dvh, 14px); display: flex; flex-direction: column; justify-content: center; }
  #nsGate .ag-logo { margin-bottom: clamp(2px, .8dvh, 8px); } #nsGate .ag-logo::before { font-size: clamp(18px, 3dvh, 24px); }
  #nsGate .ag-card label { margin: clamp(5px, 1.3dvh, 12px) 0 4px; }
  #nsGate .ag-card input[type=text], #nsGate .ag-card input[type=password] { padding: clamp(7px, 1.5dvh, 11px) 12px; font-size: 15px; }
  #nsGate .ag-row { margin-top: clamp(6px, 1.3dvh, 12px); } #nsGate .ag-err { min-height: clamp(10px, 2dvh, 18px); margin-top: clamp(2px, .8dvh, 10px); }
  #nsGate .ag-go { margin-top: clamp(6px, 1.2dvh, 12px); padding: clamp(9px, 1.7dvh, 12px); } #nsGate .ag-link { margin-top: clamp(6px, 1.3dvh, 14px); } #nsGate .ag-foot { margin-top: clamp(4px, 1dvh, 14px); }
  #nsGate .vals { order: 3; flex: none; position: relative; left: auto; bottom: auto; transform: none; width: auto; margin: 4px 12px 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  #nsGate.kb .vals { display: none; }
  #nsGate .v { border-radius: 16px; } #nsGate .vi { padding: 3.2cqw 5cqw; gap: 4cqw; } #nsGate .v .ch { width: 19cqw; height: 19cqw; font-size: 8cqw; } #nsGate .v b { font-size: clamp(20px, 14cqw, 34px); } #nsGate .v i { font-size: clamp(9px, 5cqw, 11px); letter-spacing: 0; white-space: normal; margin-top: 0; }
}
/* a short phone screen: the small texts go, four value cards in one row */
@media (max-width: 700px) and (max-height: 700px) { #nsGate .ag-foot, #nsGate .ag-logo > span:not(.ag-emb) { display: none; } #nsGate .wt .slt b { font-size: 21px; } }
@media (max-width: 700px) and (max-height: 600px) { #nsGate .vals { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; } #nsGate .vi { flex-direction: column; align-items: flex-start; gap: 1cqw; padding: 3cqw 4cqw; } #nsGate .v .ch { display: none; } #nsGate .v b { font-size: clamp(16px, 22cqw, 26px); } #nsGate .v i { font-size: 8px; } #nsGate .nm p { display: none; } }

@media (max-width: 700px) {
  #nsGate .ag-slot { align-items: stretch; }
  #nsGate .ag-card { width: 100%; max-height: none; height: 100%; justify-content: space-evenly; }
  #nsGate .ag-emb { width: clamp(40px, 8.5dvh, 64px); height: clamp(40px, 8.5dvh, 64px); }
  #nsGate .ag-logo { margin-bottom: 0; } #nsGate .ag-logo::before { font-size: clamp(16px, 2.8dvh, 22px); }
}
@media (max-width: 700px) and (max-height: 600px) { #nsGate .ag-emb { display: none; } }
