/* PowerMix team updates — light: frosted monochrome. dark: charcoal with a lime accent. */

:root {
  color-scheme: light;
  --page: #E4E4E9;
  --glow-1: rgba(255, 255, 255, 0.95);
  --glow-2: rgba(190, 190, 202, 0.6);
  --shell: rgba(255, 255, 255, 0.46);
  --shell-line: rgba(255, 255, 255, 0.95);
  --card: #FFFFFF;
  --card-line: rgba(17, 17, 20, 0.04);
  --tile: #F2F2F5;
  --ink: #111114;
  --muted: #6B6B75;
  --faint: #A6A6B0;
  --line: #E8E8ED;
  --hero: #141417;
  --hero-ink: #FFFFFF;
  --hero-muted: #9D9DA7;
  --hero-line: #2A2A30;
  --hero-tile: #E9E9EE;
  --hero-tile-ink: #111114;
  --hero-tile-muted: #6B6B75;
  --deep: #141417;
  --deep-ink: #FFFFFF;
  --deep-muted: #9D9DA7;
  --track: #FFFFFF;
  --track-ink: #6B6B75;
  --active-bg: #141417;
  --active-ink: #FFFFFF;
  --accent: #C4F24A;
  --accent-ink: #111114;
  --chart-line: #141417;
  --chart-area: rgba(20, 20, 23, 0.07);
  --grid: #ECECF1;
  --warn: #E08A00;
  --icon-btn: #FFFFFF;
  --shadow: 0 1px 2px rgba(20, 20, 30, 0.04), 0 14px 34px rgba(20, 20, 30, 0.07);
  --bar: rgba(255, 255, 255, 0.74);
  --bar-line: rgba(17, 17, 20, 0.06);
  --ghost: rgba(17, 17, 20, 0.05);
  --coral: #D95245;
  --coral-bg: #FFF0ED;
  --blue: #1E6FB8;
  --blue-bg: #EBF4FF;
  --brand: #184DA1;
  --map-sea: #C9DFE8;
  --map-land: #F6F3ED;
  --display: "Outfit", "Segoe UI", system-ui, sans-serif;
  --body: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #07080A; --glow-1: rgba(196, 242, 74, 0.05); --glow-2: rgba(70, 80, 100, 0.22);
    --shell: #101216; --shell-line: #1C1F26;
    --card: #181B21; --card-line: #22262E; --tile: #21252C;
    --ink: #F1F2F4; --muted: #8E939D; --faint: #5F646E; --line: #262A32;
    --hero: #F2F3F5; --hero-ink: #0C0D10; --hero-muted: #6A6F79; --hero-line: #DADCE1;
    --hero-tile: #181B21; --hero-tile-ink: #F1F2F4; --hero-tile-muted: #8E939D;
    --deep: #1F232A; --deep-ink: #F1F2F4; --deep-muted: #8E939D;
    --track: #F2F3F5; --track-ink: #5A5F69;
    --active-bg: #C4F24A; --active-ink: #0C0D10;
    --chart-line: #C4F24A; --chart-area: rgba(196, 242, 74, 0.12); --grid: #22262D;
    --warn: #F5A524; --icon-btn: #181B21;
    --shadow: none;
    --bar: rgba(16, 18, 22, 0.86); --bar-line: #262A32; --ghost: rgba(255, 255, 255, 0.07);
    --coral-bg: #3A1F1C; --blue-bg: #14263A;
    --map-sea: #16242E; --map-land: #36434F;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #07080A; --glow-1: rgba(196, 242, 74, 0.05); --glow-2: rgba(70, 80, 100, 0.22);
  --shell: #101216; --shell-line: #1C1F26;
  --card: #181B21; --card-line: #22262E; --tile: #21252C;
  --ink: #F1F2F4; --muted: #8E939D; --faint: #5F646E; --line: #262A32;
  --hero: #F2F3F5; --hero-ink: #0C0D10; --hero-muted: #6A6F79; --hero-line: #DADCE1;
  --hero-tile: #181B21; --hero-tile-ink: #F1F2F4; --hero-tile-muted: #8E939D;
  --deep: #1F232A; --deep-ink: #F1F2F4; --deep-muted: #8E939D;
  --track: #F2F3F5; --track-ink: #5A5F69;
  --active-bg: #C4F24A; --active-ink: #0C0D10;
  --chart-line: #C4F24A; --chart-area: rgba(196, 242, 74, 0.12); --grid: #22262D;
  --warn: #F5A524; --icon-btn: #181B21;
  --shadow: none;
  --bar: rgba(16, 18, 22, 0.86); --bar-line: #262A32; --ghost: rgba(255, 255, 255, 0.07);
  --coral-bg: #3A1F1C; --blue-bg: #14263A;
  --map-sea: #16242E; --map-land: #36434F;
}

* { box-sizing: border-box; }

html { scroll-padding-top: 88px; }

body {
  margin: 0;
  background-color: var(--page);
  background-image:
    radial-gradient(55% 45% at 12% 8%, var(--glow-1), transparent 62%),
    radial-gradient(45% 40% at 88% 22%, var(--glow-2), transparent 62%),
    radial-gradient(60% 50% at 70% 96%, var(--glow-1), transparent 66%),
    radial-gradient(40% 35% at 8% 70%, var(--glow-2), transparent 64%);
  color: var(--ink);
  font-family: var(--body);
  font-size: 14.5px;
  line-height: 1.55;
  padding-inline: 16px;
  padding-block: 20px 28px;
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding-left: 18px; }
a { color: inherit; }
img { max-width: 100%; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--chart-line); outline-offset: 2px; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; }
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--card); color: var(--ink);
  padding: 10px 16px; border-radius: 999px; z-index: 50;
}
.skip:focus { left: 16px; top: 16px; }

.shell {
  max-width: 1180px; margin: 0 auto;
  background: var(--shell);
  border: 1px solid var(--shell-line);
  border-radius: 36px;
  padding: 20px;
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  display: grid; gap: 18px;
}

/* Top bar */
.topbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  position: sticky; top: 0; z-index: 20;
  margin: -4px -6px 0; padding: 9px 12px; border-radius: 26px;
  background: var(--bar); border: 1px solid transparent;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.topbar.stuck { border-color: var(--bar-line); box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand .mark { display: block; width: 30px; height: 30px; flex: none; }
.brand .mark img { display: block; width: 30px; height: 30px; border-radius: 9px; }
.brand .word { font-family: var(--display); font-size: 21px; font-weight: 500; letter-spacing: -0.01em; }
.brand .sub { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.segnav {
  display: flex; flex-wrap: wrap; gap: 2px; padding: 5px;
  background: var(--track); border-radius: 999px; box-shadow: var(--shadow);
}
.segnav a {
  text-decoration: none; color: var(--track-ink); font-size: 12.5px; font-weight: 600;
  padding: 7px 13px; border-radius: 999px; white-space: nowrap;
}
.segnav a.on { background: var(--active-bg); color: var(--active-ink); }
.tools { display: flex; align-items: center; gap: 8px; }
.datechip {
  font-size: 12.5px; font-weight: 600; padding: 8px 14px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--card-line);
}
.iconbtn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--icon-btn); border: 1px solid var(--card-line); box-shadow: var(--shadow);
}
.iconbtn svg { width: 18px; height: 18px; }
.iconbtn .sun { display: none; }
.iconbtn[data-mode="dark"] .sun { display: block; }
.iconbtn[data-mode="dark"] .moon { display: none; }
.iconbtn[data-mode="paused"] .sun { display: block; }
.iconbtn[data-mode="paused"] .moon { display: none; }

/* Title */
.titlebar { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 20px; padding: 6px 6px 2px; }
.titlebar h1 { font-size: clamp(38px, 6vw, 62px); font-weight: 300; letter-spacing: -0.02em; }
.titlebar .lede { color: var(--muted); max-width: 62ch; margin-top: 6px; }
.plants { display: flex; flex-wrap: wrap; gap: 8px; }
.plant { display: inline-flex; gap: 6px; align-items: center; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #FFFFFF; }
.plant b { font-family: var(--display); font-weight: 600; letter-spacing: 0.04em; }
.plant.rmc { background: var(--coral); }
.plant.hpm { background: var(--blue); }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--card-line); border-radius: 28px;
  padding: 22px; box-shadow: var(--shadow); display: grid; gap: 14px; align-content: start;
}
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; } .span-3 { grid-column: span 3; }
@media (max-width: 1020px) {
  .span-5, .span-4 { grid-column: span 6; }
  .span-3, .span-8, .span-6 { grid-column: span 12; }
  .stats.span-4 { grid-column: span 12; }
}
@media (max-width: 720px) {
  .bento > * { grid-column: span 12 !important; }
  .shell { border-radius: 26px; padding: 14px; }
  .card { border-radius: 22px; padding: 18px; }
}
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.card-head h2 { font-size: 20px; }
.card-head h3 { font-size: 17px; }
.eyebrow { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.caption { font-size: 13px; color: var(--muted); }
.fnote { font-size: 12.5px; color: var(--faint); }

/* Hero */
.hero { background: var(--hero); color: var(--hero-ink); border-color: transparent; }
.hero .eyebrow, .hero .caption { color: var(--hero-muted); }
.big-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.big { display: flex; align-items: baseline; gap: 10px; }
.big .num { font-size: 58px; font-weight: 300; line-height: 1; letter-spacing: -0.02em; }
.big .lbl { font-size: 12.5px; line-height: 1.3; color: var(--hero-muted); max-width: 12ch; }
.bar { height: 6px; border-radius: 99px; background: var(--hero-line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 66.7%; background: var(--accent); border-radius: 99px; }
.subtiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.subtile {
  background: var(--hero-tile); color: var(--hero-tile-ink); border-radius: 18px;
  padding: 12px 10px; display: grid; justify-items: center; gap: 2px; text-align: center;
}
.subtile svg { width: 18px; height: 18px; margin-bottom: 2px; }
.subtile .num { font-size: 30px; font-weight: 500; line-height: 1.05; }
.subtile span:last-child { font-size: 11.5px; color: var(--hero-tile-muted); }

/* Environment */
.env-big { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.env-big .num { font-size: 44px; font-weight: 300; line-height: 1; letter-spacing: -0.02em; }
.tag { font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--tile); color: var(--muted); }
.envtiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; }
.envtile { background: var(--tile); border-radius: 18px; padding: 12px; min-height: 96px; display: grid; align-content: space-between; gap: 10px; }
.envtile b { font-family: var(--display); font-weight: 500; font-size: 15px; }
.envtile span { font-size: 11.5px; color: var(--muted); }
.envtile.now { background: var(--accent); min-height: 128px; }
.envtile.now b, .envtile.now span { color: var(--accent-ink); }

/* Ring */
.ringwrap { display: grid; justify-items: center; gap: 12px; }
.ring { width: 132px; height: 132px; }
.ring .track { fill: none; stroke: var(--tile); stroke-width: 11; }
.ring .prog { fill: none; stroke: var(--accent); stroke-width: 11; stroke-linecap: round; }
.ring .centre { fill: var(--ink); font-family: var(--display); font-size: 26px; font-weight: 400; }
.ring .centre-sub { fill: var(--muted); font-family: var(--body); font-size: 9.5px; font-weight: 600; letter-spacing: 0.08em; }
.legend-list { list-style: none; padding: 0; display: grid; gap: 6px; width: 100%; }
.legend-list li { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.legend-list li span:first-child { color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.legend-list li span:first-child::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--chart-line); }
.legend-list b { font-family: var(--display); font-weight: 500; }

/* Chart */
.chart-wrap { overflow-x: auto; }
.chart { width: 100%; min-width: 560px; height: auto; display: block; }
.c-grid { stroke: var(--grid); stroke-width: 1; fill: none; }
.c-area { fill: var(--chart-area); stroke: none; }
.c-line { stroke: var(--chart-line); stroke-width: 2.5; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.c-dot { fill: var(--card); stroke: var(--chart-line); stroke-width: 2; }
.c-dot.solid { fill: var(--chart-line); }
.c-mark { stroke: var(--faint); stroke-width: 1.2; stroke-dasharray: 4 4; fill: none; }
.c-label { fill: var(--muted); font-family: var(--body); font-size: 11px; }
.c-note { fill: var(--muted); font-family: var(--body); font-size: 11px; font-weight: 600; }
.c-tip { fill: var(--active-bg); }
.c-tip-text { fill: var(--active-ink); font-family: var(--display); font-size: 12px; font-weight: 600; }

/* Stats */
.stats { gap: 0; }
.stat { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.stat:first-of-type { padding-top: 4px; }
.stat:last-child { border-bottom: 0; padding-bottom: 0; }
.stat .num { font-size: 40px; font-weight: 300; line-height: 1; letter-spacing: -0.02em; min-width: 2.2ch; }
.stat p { font-size: 13px; color: var(--muted); }
.stat p b { color: var(--ink); font-weight: 600; }

/* Status pills */
.st {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: var(--tile); color: var(--ink);
}
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; box-sizing: border-box; }
.st-live { background: var(--accent); color: var(--accent-ink); }
.st-live::before { background: var(--accent-ink); }
.st-input::before { background: var(--warn); }
.st-next::before { border: 2px solid var(--ink); }
.st-idle { color: var(--muted); }
.st-idle::before { border: 1.5px dashed var(--muted); }

/* Segmented filter */
.seg { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 4px; border-radius: 999px; background: var(--tile); }
.seg button {
  border: 0; background: transparent; cursor: pointer; padding: 6px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
}
.seg button[aria-pressed="true"] { background: var(--active-bg); color: var(--active-ink); }

/* Module rows */
.mgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
@media (max-width: 820px) { .mgrid { grid-template-columns: 1fr; } }
.mrow { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 11px 8px; border-bottom: 1px solid var(--line); border-radius: 16px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--tile); font-family: var(--display); font-weight: 600; font-size: 13px;
}
.avatar svg { width: 20px; height: 20px; }
.mrow .mname { font-weight: 650; }
.mrow .mgroup { font-size: 11px; color: var(--faint); letter-spacing: 0.05em; text-transform: uppercase; margin-left: 6px; }
.mrow p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.mrow .st { margin-top: 8px; }

/* Since-19.07 tiles */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1020px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tiles { grid-template-columns: 1fr; } }
.tile { background: var(--tile); border-radius: 22px; padding: 16px; display: grid; gap: 9px; align-content: start; }
.tile h3 { font-size: 16.5px; }
.tile ul { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.tile ul b { color: var(--ink); font-weight: 600; }
.tile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tile-ic { width: 34px; height: 34px; border-radius: 12px; background: var(--card); display: grid; place-items: center; flex: none; }
.tile-ic svg { width: 18px; height: 18px; }

/* Field */
.devices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 720px) { .devices { grid-template-columns: 1fr; } }
.device { background: var(--tile); border-radius: 22px; padding: 16px; display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; }
.device .ic { width: 44px; height: 44px; border-radius: 14px; background: var(--card); display: grid; place-items: center; }
.device .ic svg { width: 22px; height: 22px; }
.device h3 { font-size: 16.5px; }
.device p { font-size: 13px; color: var(--muted); margin-top: 2px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: step; }
@media (max-width: 1020px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 16px; display: grid; gap: 9px; align-content: start; }
.step-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.step-top::before {
  counter-increment: step; content: counter(step);
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--active-bg); color: var(--active-ink); font-family: var(--display); font-weight: 600; font-size: 14px;
}
.step-top .where { font-size: 11px; font-weight: 600; color: var(--muted); padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; }
.step h3 { font-size: 17px; }
.roles { display: flex; flex-wrap: wrap; gap: 5px; }
.role { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--tile); }
.step ul { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }

.offline { gap: 16px; }
.offline h2 { font-size: 24px; font-weight: 400; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .split { grid-template-columns: 1fr; } }
.split > div { background: var(--hero-tile); color: var(--hero-tile-ink); border-radius: 20px; padding: 14px 16px; display: grid; gap: 8px; align-content: start; }
.split ul { display: grid; gap: 3px; font-size: 13.5px; }
.split .caption { color: var(--hero-tile-muted); }
.tips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 22px; list-style: none; padding: 0; }
@media (max-width: 640px) { .tips { grid-template-columns: 1fr; } }
.tips li { font-size: 13.5px; color: var(--hero-muted); padding-left: 16px; position: relative; }
.tips li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.tips li b { color: var(--hero-ink); font-weight: 600; }

/* Decisions */
.dlist { display: grid; }
.drow { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.drow:last-child { border-bottom: 0; }
.ref { font-family: var(--display); font-weight: 600; font-size: 13px; padding: 5px 10px; border-radius: 999px; background: var(--tile); justify-self: start; }
.drow p { font-size: 13.5px; }
.drow ul { margin-top: 5px; font-size: 13px; color: var(--muted); display: grid; gap: 2px; }
.owner { font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
@media (max-width: 560px) {
  .drow { grid-template-columns: 1fr; gap: 6px; }
  .owner { justify-self: start; }
}

/* Next steps */
.nextgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1020px) { .nextgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .nextgrid { grid-template-columns: 1fr; } }
.ncard { background: var(--deep); color: var(--deep-ink); border-radius: 22px; padding: 16px 18px; display: grid; gap: 8px; align-content: start; }
.ncard h3 { font-size: 18px; }
.ncard p { font-size: 13px; color: var(--deep-muted); }
.ncard .state { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--deep-muted); }
.ncard .state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--deep-muted); }
.ncard .state.go::before { background: var(--accent); border-color: var(--accent); }
.nic { width: 34px; height: 34px; border-radius: 12px; background: rgba(255, 255, 255, 0.11); display: grid; place-items: center; }
.nic svg { width: 18px; height: 18px; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 4px 8px 2px; font-size: 12px; color: var(--muted); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

@media (max-width: 780px) {
  /* Keep the index to one scrollable row so the sticky bar stays shallow on a phone. */
  .topbar { gap: 8px 10px; padding: 8px 10px; min-width: 0; }
  .segnav { flex-wrap: nowrap; overflow-x: auto; min-width: 0; flex: 1 1 100%; scrollbar-width: none; -ms-overflow-style: none; }
  .segnav::-webkit-scrollbar { width: 0; height: 0; }
  html { scroll-padding-top: 132px; }
}
