:root {
  --bg: #070809;
  --panel: #131518;
  --panel-2: #181b1f;
  --line: #3a3f45;
  --text: #f1f2f4;
  --muted: #aeb4bc;
  --yellow: #f2c200;
  --yellow-2: #d8a900;
  --green: #61d84f;
  --blue: #42a5f5;
  --cyan: #32d3d6;
  --red: #f43f3f;
  --warn: #f5bd22;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Bahnschrift, Aptos, "DIN Alternate", system-ui, sans-serif;
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 1em;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.screen {
  min-height: 100vh;
  padding: 28px;
  background:
    linear-gradient(90deg, rgba(242, 194, 0, 0.05), transparent 28%, transparent 72%, rgba(50, 211, 214, 0.04)),
    var(--bg);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(440px, 0.9fr);
  align-items: center;
  gap: 24px;
  border: 1px solid var(--line);
  background: rgba(19, 21, 24, 0.92);
  padding: 14px 18px;
  border-radius: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px solid var(--yellow);
  color: var(--yellow);
  font-weight: 800;
  border-radius: 8px;
}

.brand strong {
  display: block;
  font-size: 20px;
  letter-spacing: 0;
}

.brand span span,
.session-box span {
  color: var(--muted);
  font-size: 13px;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: #0d0f11;
}

.tabs a {
  padding: 10px 16px;
  border-radius: 6px;
  color: var(--muted);
}

.tabs a.active {
  background: var(--yellow);
  color: #090909;
  font-weight: 800;
}

.session-box {
  display: grid;
  grid-template-columns: 1fr 1.1fr auto;
  align-items: center;
  gap: 18px;
}

.session-box > div {
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.session-box strong {
  display: block;
  font-size: 24px;
}

.online {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--yellow);
}

.online i,
.dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
}

.online.bad i,
.dot.alarm {
  background: var(--red);
}

.dot.warn {
  background: var(--warn);
}

.title-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin: 28px 0 18px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 0;
}

h2 {
  font-size: 19px;
  margin-bottom: 16px;
}

h3 {
  font-size: 24px;
  margin-bottom: 12px;
}

.status-pill {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--muted);
}

.status-pill.running {
  border-color: var(--yellow);
  color: var(--yellow);
}

.status-pill.finished {
  border-color: var(--green);
  color: var(--green);
}

.panel {
  border: 1px solid var(--line);
  background: rgba(19, 21, 24, 0.96);
  border-radius: 8px;
  padding: 22px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.control-grid {
  display: grid;
  grid-template-columns: minmax(620px, 1fr) 360px;
  gap: 18px;
}

.control-row {
  display: grid;
  grid-template-columns: 72px minmax(220px, 0.6fr) minmax(260px, 1fr) 120px;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.control-row:first-of-type {
  border-top: 0;
}

.row-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: var(--yellow);
  border: 2px solid var(--yellow);
  border-radius: 50%;
  font-weight: 800;
}

.row-copy strong {
  display: block;
  font-size: 20px;
  margin-bottom: 4px;
}

.row-copy span {
  color: var(--muted);
}

.slider-wrap input {
  width: 100%;
  accent-color: var(--yellow);
}

.scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

output {
  text-align: right;
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
}

.cycle-row {
  grid-template-columns: 72px 1fr 150px 150px;
}

.number-field span,
.operator-box label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.number-field input,
.operator-box input {
  width: 100%;
  background: #0d0f11;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  padding: 12px;
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.scenario-list {
  display: grid;
  gap: 12px;
}

.scenario-button,
.start-button,
.plain-button {
  border: 1px solid var(--yellow);
  background: #0d0f11;
  color: var(--yellow);
  border-radius: 8px;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 800;
}

.scenario-button.active,
.start-button {
  background: var(--yellow);
  color: #0a0a0a;
}

.start-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
  font-size: 24px;
}

.start-button span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid #0a0a0a;
  border-radius: 50%;
}

button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.plain-button {
  color: var(--muted);
  border-color: var(--line);
  background: transparent;
}

.plain-button.wide {
  width: 100%;
}

.strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.strip div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #101214;
}

.strip strong,
.strip span {
  display: block;
}

.strip strong {
  color: var(--yellow);
  margin-bottom: 6px;
}

.strip span {
  color: var(--muted);
}

.plant-stage {
  min-height: 470px;
  display: grid;
  align-content: center;
  gap: 34px;
  overflow: hidden;
}

.process-line {
  display: grid;
  grid-template-columns: 1fr 80px 1.1fr 80px 1.4fr 80px 1.15fr 80px 1fr;
  align-items: center;
  gap: 0;
}

.process-unit {
  min-height: 260px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  justify-items: center;
  text-align: center;
  position: relative;
}

.process-unit b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--yellow);
  border: 2px solid var(--yellow);
  border-radius: 50%;
}

.process-unit h2 {
  min-height: 48px;
  margin: 12px 0 8px;
}

.process-unit p {
  margin: 10px 0 0;
  color: var(--muted);
}

.machine {
  width: 100%;
  min-height: 150px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border-bottom: 10px solid #5d6267;
}

.machine span {
  display: block;
  background: #343a40;
  border: 1px solid #747a80;
}

.inlet .machine span {
  width: 46px;
  height: 76px;
}

.screen .machine span {
  width: 30px;
  height: 110px;
  transform: skewY(-18deg);
}

.reactor .machine {
  border: 2px solid #7a6a19;
  border-bottom-width: 10px;
  align-items: center;
}

.reactor .machine span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--yellow);
  animation: bubble 1.4s infinite ease-in-out;
}

.reactor .machine span:nth-child(2) {
  animation-delay: 0.25s;
}

.clarifier .machine {
  border: 2px solid #73787d;
  border-radius: 50%;
  width: 170px;
  min-height: 170px;
  margin-top: 18px;
  background: #172532;
}

.clarifier .machine span {
  width: 78px;
  height: 6px;
  background: var(--yellow);
}

.outlet .machine span {
  width: 80px;
  height: 92px;
  background: #173044;
}

.process-unit.alarm .machine {
  border-color: var(--red);
}

.process-unit.alarm b {
  color: var(--red);
  border-color: var(--red);
}

.pipe {
  height: 8px;
  background: #9c6a1b;
  position: relative;
  overflow: hidden;
}

.pipe span {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 18px, var(--yellow) 18px 26px);
  animation: flow 1.2s linear infinite;
}

.sludge-line {
  display: grid;
  grid-template-columns: 1fr repeat(3, 210px);
  gap: 14px;
  align-items: center;
  border: 1px dashed var(--yellow-2);
  padding: 14px;
  border-radius: 8px;
}

.sludge-label {
  color: var(--yellow);
  font-weight: 800;
  font-size: 20px;
}

.sludge-equipment {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  background: #101214;
  text-align: center;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
}

.metric-card span,
.metric-card em {
  color: var(--muted);
  font-style: normal;
}

.metric-card strong {
  color: var(--yellow);
  font-size: 42px;
  margin: 0 8px 0 0;
}

.metric-card.alarm {
  border-color: var(--red);
}

.metric-card.warn {
  border-color: var(--warn);
}

.metric-card canvas {
  width: 100%;
  height: 42px;
  margin-top: 10px;
}

.plant-bottom {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 0.9fr;
  gap: 14px;
  margin-top: 16px;
}

.alarm-panel ul,
.tips-panel ul {
  margin: 0;
  padding-left: 18px;
}

.alarm-panel p,
.advice-panel p {
  margin-bottom: 0;
  color: var(--muted);
}

.legend {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 16px;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.results-grid {
  display: grid;
  grid-template-columns: 360px minmax(520px, 1fr) 330px;
  grid-template-areas:
    "score breakdown summary"
    "score chart tips"
    "score chart ranking";
  gap: 16px;
}

.score-panel {
  grid-area: score;
  text-align: center;
}

.breakdown-panel {
  grid-area: breakdown;
}

.summary-panel {
  grid-area: summary;
}

.chart-panel {
  grid-area: chart;
}

.tips-panel {
  grid-area: tips;
}

.ranking-panel {
  grid-area: ranking;
}

.score-ring {
  width: 230px;
  height: 230px;
  margin: 22px auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, var(--panel) 0 58%, transparent 59%),
    conic-gradient(var(--yellow) calc(var(--score) * 1%), #2a2e34 0);
}

.score-ring strong {
  font-size: 72px;
  line-height: 0.85;
}

.score-ring span {
  margin-top: 70px;
  color: var(--muted);
  position: absolute;
}

.rating {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}

.rating span {
  width: 28px;
  height: 28px;
  clip-path: polygon(50% 0, 63% 34%, 99% 35%, 70% 57%, 81% 92%, 50% 72%, 19% 92%, 30% 57%, 1% 35%, 37% 34%);
  background: #4a4f55;
}

.rating span.on {
  background: var(--yellow);
}

.score-line {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

.score-line:first-of-type {
  border-top: 0;
}

.score-line div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.score-line span {
  color: var(--muted);
}

.bar {
  height: 12px;
  background: #2a2e34;
  border-radius: 6px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  background: var(--yellow);
}

.bar i.green {
  background: var(--green);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.summary-row:first-of-type {
  border-top: 0;
}

.summary-row span {
  color: var(--muted);
}

#historyChart {
  width: 100%;
  height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ranking-panel ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ranking-panel li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 8px;
  border-top: 1px solid var(--line);
}

.ranking-panel li.current {
  color: #0a0a0a;
  background: var(--yellow);
  border-radius: 6px;
}

.loading {
  display: grid;
  place-items: center;
  min-height: 70vh;
  color: var(--muted);
  font-size: 22px;
}

.control-screen {
  min-height: 100vh;
  padding: 34px 36px 28px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.08), transparent 22%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 80px),
    var(--bg);
}

.control-hero {
  display: grid;
  grid-template-columns: 440px 1fr 540px;
  align-items: start;
  gap: 42px;
  min-height: 174px;
  margin-bottom: 20px;
}

.control-logo {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: 18px;
  padding-top: 18px;
  position: relative;
}

.control-logo::after {
  content: "";
  position: absolute;
  right: -22px;
  top: 28px;
  width: 1px;
  height: 72px;
  background: #5b6067;
}

.control-logo img {
  width: 108px;
  height: 90px;
  object-fit: contain;
}

.product-name strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.product-name em {
  color: var(--yellow);
  font-style: normal;
}

.product-name span {
  display: block;
  color: var(--muted);
  margin-top: 8px;
  font-size: 15px;
}

.hero-title {
  text-align: center;
}

.hero-title h1 {
  margin: 0 0 8px;
  font-size: 76px;
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-title div {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  color: #8d9096;
  font-size: 32px;
  font-weight: 900;
}

.hero-title div span,
.hero-title i {
  height: 2px;
  background: var(--yellow);
}

.hero-title p {
  margin: 16px 0 6px;
  color: #e5e7eb;
  font-size: 25px;
}

.hero-title i {
  display: block;
  width: 100px;
  margin: 0 auto;
}

.hero-status {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: center;
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px 28px;
  margin-top: 4px;
  background: rgba(19, 21, 24, 0.88);
  position: relative;
}

.hero-clock,
.hero-online {
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 14px;
  align-items: center;
}

.hero-clock {
  border-right: 1px solid #60656c;
}

.hero-clock b {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--yellow);
  border-radius: 50%;
  color: var(--yellow);
  font-size: 25px;
}

.hero-online b {
  color: var(--yellow);
  font-size: 36px;
}

.hero-clock strong,
.hero-online strong {
  color: var(--yellow);
  font-size: 34px;
  line-height: 1;
}

.hero-clock span,
.hero-online span {
  grid-column: 2;
  color: var(--muted);
  font-size: 13px;
  margin-top: 7px;
}

.hero-online i {
  position: absolute;
  right: 20px;
  top: 20px;
  width: 18px;
  height: 18px;
  background: #20d34a;
  border-radius: 50%;
}

.hero-online.offline b,
.hero-online.offline strong {
  color: #8d9096;
}

.hero-online.offline i {
  background: #8d9096;
}

.control-layout {
  display: grid;
  grid-template-columns: minmax(980px, 1fr) 590px;
  gap: 20px;
  align-items: start;
}

.control-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 55% 25%, rgba(255, 255, 255, 0.06), transparent 40%),
    rgba(19, 21, 24, 0.94);
  padding: 18px 28px;
}

.control-card h2 {
  color: var(--yellow);
  font-size: 22px;
  font-weight: 700;
  border-bottom: 1px solid #666a70;
  padding-bottom: 14px;
  margin-bottom: 0;
}

.control-screen .control-row {
  grid-template-columns: 90px 292px minmax(390px, 1fr) 112px 132px 38px;
  min-height: 92px;
  padding: 11px 0;
  border-top: 1px solid #444950;
}

.control-screen .row-icon {
  width: 60px;
  height: 60px;
  font-size: 32px;
  border-width: 3px;
}

.control-screen .row-copy strong {
  font-size: 21px;
  line-height: 1.1;
  font-weight: 500;
}

.control-screen .row-copy span {
  font-size: 15px;
}

.control-screen .slider-wrap {
  position: relative;
  padding-top: 22px;
}

.control-screen input[type="range"] {
  width: 100%;
  height: 8px;
  accent-color: var(--yellow);
}

.control-screen .scale {
  font-size: 15px;
}

.thumb-value,
.control-tag {
  position: absolute;
  top: 0;
  background: var(--yellow);
  color: #111;
  border-radius: 4px;
  padding: 3px 9px;
  font-size: 14px;
  line-height: 1;
}

.thumb-value {
  left: 28%;
}

.control-tag {
  left: 4%;
  background: transparent;
  color: var(--yellow);
  border: 1px solid var(--yellow);
  padding: 7px 16px;
}

.control-screen output {
  font-size: 30px;
  text-align: right;
}

.row-unit {
  color: #f0f2f5;
  font-size: 17px;
}

.warning-mark {
  color: var(--yellow);
  border: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 32px;
  font-weight: 900;
}

.control-screen .cycle-row {
  grid-template-columns: 90px 292px minmax(520px, 1fr) 112px 132px 38px;
}

.cycle-fields {
  display: grid;
  grid-template-columns: 280px 280px;
  justify-content: end;
  gap: 24px;
}

.cycle-field {
  display: grid;
  grid-template-columns: 1fr 78px 36px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 54px;
  padding: 0 14px;
  background: #111316;
}

.cycle-field span {
  color: var(--yellow);
  text-align: center;
  margin-right: 18px;
}

.cycle-field input {
  width: 78px;
  border: 1px solid #555a61;
  background: #0c0e10;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
  border-radius: 4px;
  padding: 5px;
}

.cycle-field em {
  font-style: normal;
  font-size: 19px;
  margin-left: 8px;
}

.right-stack {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 20px;
}

.control-scenarios {
  padding: 18px 0 10px;
}

.control-screen .scenario-button {
  min-height: 62px;
  font-size: 21px;
  border-radius: 6px;
  color: #f3f4f6;
  text-align: center;
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 10px;
}

.control-screen .scenario-button .material-symbols-outlined {
  font-size: 32px;
  justify-self: center;
}

.control-screen .scenario-button.active {
  color: #0a0a0a;
  background: linear-gradient(#ffd326, #e0ab00);
}

.fixed-flow {
  border-top: 1px solid #666a70;
  margin-top: 10px;
  padding-top: 16px;
  text-align: center;
}

.fixed-flow span {
  display: block;
  color: var(--muted);
}

.fixed-flow strong {
  display: block;
  margin-top: 6px;
  font-size: 23px;
}

.fixed-flow em {
  color: var(--yellow);
  font-style: normal;
}

.instructions-card p {
  color: #d8dce2;
  font-size: 19px;
  line-height: 1.45;
  margin-top: 22px;
}

.instructions-card label {
  display: block;
  color: var(--muted);
  margin: 18px 0 6px;
}

.instructions-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0d0f11;
  color: var(--text);
  padding: 13px;
}

.control-screen .instructions-card label,
.control-screen .instructions-card input {
  display: none;
}

.challenge-button {
  width: calc(100% - 610px);
  min-height: 102px;
  margin: -126px 0 22px;
  border: 1px solid #ffe17a;
  border-radius: 8px;
  background: linear-gradient(#ffd329, #d99d00);
  color: #050505;
  font-size: 64px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 250px;
}

.challenge-button span {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 3px solid #050505;
  border-radius: 50%;
  font-size: 42px;
  line-height: 1;
}

.challenge-button:disabled {
  opacity: 0.8;
}

.control-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(19, 21, 24, 0.94);
  padding: 20px 28px;
  margin-top: 45px;
}

.control-strip div {
  min-height: 72px;
  border-right: 1px solid #666a70;
  padding: 0 34px;
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 16px;
}

.control-strip div:last-child {
  border-right: 0;
}

.control-strip strong {
  display: block;
  color: var(--yellow);
  font-size: 20px;
  margin-bottom: 5px;
}

.control-strip span {
  color: var(--muted);
}

.control-strip p {
  margin: 0;
}

.control-strip .strip-icon {
  color: var(--yellow);
  font-size: 40px;
}

.control-links {
  display: none;
}

.control-links a,
.control-links button {
  border: 1px solid var(--line);
  background: #101214;
  color: var(--muted);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
}

.plant-monitor {
  width: 100vw;
  min-height: 100vh;
  padding: 28px 36px 18px;
  border: 1px solid #282d33;
  background:
    radial-gradient(circle at 50% 14%, rgba(255, 255, 255, 0.07), transparent 26%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 92px),
    #070809;
  overflow: hidden;
}

.plant-header {
  display: grid;
  grid-template-columns: 128px 1fr 565px;
  align-items: start;
  gap: 28px;
  min-height: 132px;
}

.plant-logo img {
  width: 118px;
  height: 100px;
  object-fit: contain;
}

.plant-title h1 {
  margin: 0;
  font-size: 58px;
  line-height: 0.92;
  letter-spacing: 0;
  font-weight: 900;
}

.plant-title div {
  display: grid;
  grid-template-columns: auto 420px;
  align-items: center;
  gap: 18px;
  margin-top: 10px;
}

.plant-title strong {
  color: #8d9096;
  font-size: 27px;
}

.plant-title span {
  height: 2px;
  background: var(--yellow);
}

.plant-status-box {
  margin-top: 0;
}

.plant-process-board {
  position: relative;
  height: 575px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 45% 38%, rgba(255, 255, 255, 0.055), transparent 32%),
    rgba(11, 13, 15, 0.45);
  overflow: hidden;
}

.water-line {
  position: absolute;
  inset: 16px 24px auto;
  height: 330px;
}

.plant-node {
  position: absolute;
  width: 240px;
  height: 250px;
}

.plant-node.u1 {
  left: 0;
  top: 18px;
}

.plant-node.u2 {
  left: 360px;
  top: 16px;
}

.plant-node.u3 {
  left: 670px;
  top: 8px;
  width: 455px;
}

.plant-node.u4 {
  left: 1220px;
  top: 8px;
  width: 290px;
}

.plant-node.u5 {
  right: 0;
  top: 15px;
  width: 260px;
}

.node-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
}

.node-title b {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--yellow);
  border-radius: 50%;
  color: var(--yellow);
  font-size: 22px;
}

.node-title strong {
  font-size: 18px;
  line-height: 1.05;
}

.node-machine {
  position: relative;
  width: 100%;
  height: 155px;
  margin-top: 8px;
  border-bottom: 11px solid #666b70;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
}

.node-machine::before,
.node-machine::after {
  content: "";
  position: absolute;
  background: linear-gradient(135deg, #5c6369, #242a30);
  border: 1px solid #91979e;
}

.u1 .node-machine::before {
  left: 12px;
  bottom: 0;
  width: 80px;
  height: 100px;
  transform: skewY(-17deg);
}

.u1 .node-machine::after {
  left: 80px;
  bottom: 0;
  width: 86px;
  height: 88px;
  transform: skewY(13deg);
}

.u2 .node-machine::before {
  left: 20px;
  bottom: 0;
  width: 70px;
  height: 118px;
  transform: skewY(-18deg);
}

.u2 .node-machine::after {
  left: 84px;
  bottom: 0;
  width: 135px;
  height: 92px;
  transform: skewY(14deg);
}

.u3 .node-machine {
  height: 190px;
  border: 2px solid #8a6a05;
  border-bottom: 11px solid #8a6a05;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05), transparent 35%),
    #2a241d;
}

.u3 .node-machine::before {
  left: 18px;
  right: 18px;
  top: 18px;
  height: 42px;
  border: 1px dashed var(--yellow);
  background: transparent;
}

.u3 .node-machine::after {
  display: none;
}

.u4 .node-machine {
  width: 230px;
  height: 210px;
  margin: 6px auto 0;
  border: 9px solid #7a8086;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 45%, rgba(80, 150, 190, 0.48), #172635 64%, #0d151d 65%);
}

.u4 .node-machine::before,
.u4 .node-machine::after {
  display: none;
}

.u5 .node-machine::before {
  left: 28px;
  bottom: 8px;
  width: 110px;
  height: 90px;
  transform: skewY(-15deg);
  background: linear-gradient(135deg, #42525d, #1b303d);
}

.u5 .node-machine::after {
  left: 138px;
  bottom: 8px;
  width: 92px;
  height: 78px;
  transform: skewY(12deg);
  background: linear-gradient(135deg, #355263, #162a38);
}

.node-icon {
  display: none;
}

.plant-node p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0 22px;
  color: #d8dce2;
  font-size: 15px;
  line-height: 1.15;
}

.status-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green);
}

.status-dot.ok {
  background: var(--green);
}

.status-dot.off {
  background: #8d9096;
}

.status-dot.warn {
  background: var(--warn);
}

.status-dot.alarm,
.plant-node.alarm .status-dot {
  background: var(--red);
}

.plant-node.alarm .node-title b,
.plant-node.alarm .node-machine {
  border-color: var(--red);
}

.water-surface {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 16px;
  height: 34px;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0 2px, transparent 2px 12px),
    linear-gradient(90deg, rgba(50, 110, 140, 0.55), rgba(30, 55, 68, 0.72));
  opacity: 0.85;
}

.u3 .water-surface {
  height: 82px;
  bottom: 0;
  left: 0;
  right: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.1) 0 2px, transparent 2px 14px),
    #3b3428;
}

.u4 .water-surface {
  inset: 30px;
  border-radius: 50%;
  height: auto;
  background:
    repeating-linear-gradient(165deg, rgba(255, 255, 255, 0.16) 0 2px, transparent 2px 18px),
    #183044;
}

.screen-bars {
  display: none;
}

.u2 .screen-bars {
  position: absolute;
  left: 54px;
  top: 28px;
  display: grid;
  gap: 7px;
  transform: rotate(-17deg);
  z-index: 3;
}

.screen-bars i {
  width: 56px;
  height: 6px;
  background: #c5c9cd;
  border-radius: 2px;
}

.air-bubbles {
  display: none;
}

.u3 .air-bubbles {
  display: block;
  position: absolute;
  inset: 42px 40px 22px;
  z-index: 4;
}

.air-bubbles i {
  position: absolute;
  bottom: 12px;
  width: 12px;
  height: 12px;
  border: 2px solid #dfe4e8;
  border-radius: 50%;
}

.air-bubbles i:nth-child(1) { left: 16%; }
.air-bubbles i:nth-child(2) { left: 32%; }
.air-bubbles i:nth-child(3) { left: 48%; }
.air-bubbles i:nth-child(4) { left: 64%; }
.air-bubbles i:nth-child(5) { left: 80%; }

.clarifier-arm {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 190px;
  height: 8px;
  margin-left: -95px;
  margin-top: -4px;
  background: linear-gradient(90deg, transparent 0 16px, var(--yellow) 16px 174px, transparent 174px);
  transform-origin: center;
  z-index: 6;
}

.outfall {
  display: none;
}

.u5 .outfall {
  display: block;
  position: absolute;
  right: -20px;
  bottom: -12px;
  width: 88px;
  height: 70px;
  background:
    repeating-linear-gradient(115deg, rgba(66, 165, 245, 0.7) 0 4px, transparent 4px 10px);
  clip-path: polygon(0 0, 100% 20%, 72% 100%, 12% 86%);
}

.process-pipe,
.sludge-flow {
  position: absolute;
  height: 9px;
  background: linear-gradient(#f0c86a, #8a4c14);
  border-radius: 999px;
  overflow: hidden;
  z-index: 2;
}

.process-pipe i,
.sludge-flow::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: rgba(255, 233, 142, 0.22);
  border-radius: inherit;
}

.process-pipe b,
.sludge-flow i {
  position: absolute;
  top: -4px;
  left: 0;
  width: 42px;
  height: 18px;
  background: linear-gradient(90deg, transparent, #fff6b0, transparent);
  clip-path: polygon(0 30%, 62% 30%, 62% 0, 100% 50%, 62% 100%, 62% 70%, 0 70%);
}

.p12 {
  left: 218px;
  top: 164px;
  width: 140px;
}

.p23 {
  left: 590px;
  top: 164px;
  width: 84px;
}

.p34 {
  left: 1120px;
  top: 164px;
  width: 112px;
}

.p45 {
  left: 1514px;
  top: 164px;
  width: 150px;
  background: linear-gradient(#8ed8ff, #1b80b7);
}

.recirc-note {
  position: absolute;
  left: 35px;
  top: 335px;
  width: 260px;
  height: 158px;
  border: 1px solid var(--yellow);
  border-radius: 8px;
  padding: 20px 18px;
}

.recirc-note .material-symbols-outlined {
  float: left;
  color: var(--yellow);
  font-size: 42px;
  margin: 2px 14px 26px 0;
}

.recirc-note strong {
  color: var(--yellow);
  font-size: 19px;
}

.recirc-note p {
  clear: both;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.35;
}

.blower-pack {
  position: absolute;
  left: 545px;
  top: 268px;
  width: 170px;
  color: #d8dce2;
}

.blower-pack strong {
  display: block;
  margin: -17px 0 8px 28px;
}

.blower {
  display: inline-block;
  width: 58px;
  height: 42px;
  margin-right: 10px;
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(#5c6872, #22282e);
  border: 1px solid #8b949d;
}

.sludge-area {
  position: absolute;
  left: 475px;
  right: 110px;
  bottom: 24px;
  height: 150px;
  border: 1px dashed var(--yellow-2);
  border-radius: 8px;
}

.sludge-area h2 {
  position: absolute;
  top: -22px;
  left: 420px;
  margin: 0;
  padding: 0 18px;
  background: #090a0b;
  color: var(--yellow);
  font-size: 22px;
}

.sludge-tank,
.sludge-pump,
.dryer,
.skip {
  position: absolute;
}

.sludge-tank {
  left: 94px;
  top: 25px;
  width: 190px;
  height: 94px;
  border: 7px solid #747a80;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #4c3c2d, #1f1712 70%);
}

.sludge-tank .status-dot {
  position: absolute;
  right: -22px;
  top: 36px;
}

.sludge-pump {
  left: 360px;
  top: 46px;
  width: 116px;
  height: 54px;
  background: linear-gradient(#555d64, #20252a);
  border: 1px solid #858b92;
}

.sludge-pump strong,
.dryer strong,
.skip strong {
  position: absolute;
  left: 72px;
  top: 0;
  width: 140px;
  color: #d8dce2;
  font-size: 14px;
  line-height: 1.15;
}

.sludge-pump .status-dot,
.dryer .status-dot,
.skip .status-dot {
  position: absolute;
  left: 58px;
  top: 8px;
}

.dryer {
  left: 620px;
  top: 24px;
  width: 150px;
  height: 84px;
  border: 1px solid #858b92;
  background:
    repeating-linear-gradient(90deg, #6b5a42 0 9px, #2a2824 9px 18px);
}

.skip {
  left: 920px;
  top: 28px;
  width: 180px;
  height: 92px;
  clip-path: polygon(8% 12%, 100% 0, 88% 100%, 0 88%);
  background: linear-gradient(135deg, #5b4d3f, #251d18);
  border: 1px solid #8a8275;
}

.skip strong {
  left: 195px;
  top: 42px;
}

.skip .status-dot {
  left: 195px;
  top: 34px;
}

.sludge-flow {
  background: linear-gradient(#b06c2a, #5b2e13);
}

.sf1 {
  left: 285px;
  top: 72px;
  width: 76px;
}

.sf2 {
  left: 476px;
  top: 72px;
  width: 144px;
}

.sf3 {
  left: 770px;
  top: 72px;
  width: 150px;
}

.plant-kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.plant-metric-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  grid-template-rows: 1fr 44px;
  column-gap: 16px;
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 65% 28%, rgba(255, 255, 255, 0.07), transparent 42%),
    rgba(19, 21, 24, 0.96);
  padding: 20px 22px 16px;
}

.plant-metric-card.warn {
  border-color: var(--warn);
}

.plant-metric-card.alarm {
  border-color: var(--red);
}

.metric-icon {
  grid-row: 1 / span 2;
  color: var(--yellow);
  font-size: 58px;
  align-self: center;
}

.metric-value h2 {
  margin: 0 0 2px;
  color: #d8dce2;
  font-size: 27px;
}

.metric-value h2 .status-dot {
  margin-left: 12px;
  vertical-align: middle;
}

.metric-value strong {
  color: var(--yellow);
  font-size: 55px;
  line-height: 1;
}

.metric-value em {
  color: var(--muted);
  font-style: normal;
  font-size: 22px;
  margin-left: 8px;
}

.plant-metric-card canvas {
  grid-column: 1 / -1;
  width: 100%;
  height: 44px;
  margin-top: 6px;
}

.plant-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 62px;
  width: 730px;
  height: 60px;
  margin: 18px auto 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(19, 21, 24, 0.96);
}

.plant-legend span {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 18px;
}

.plant-process-board.bg-board {
  height: 580px;
  background: #08090a;
}

.plant-bg-image {
  background: transparent;
  position: absolute;
  width: 90%;
  right: 30px;
  top: -100px;
  object-fit: contain;  
}

.plant-process-board.bg-board::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), transparent 20%, transparent 74%, rgba(0, 0, 0, 0.18)),
    radial-gradient(circle at 50% 48%, transparent 0 52%, rgba(0, 0, 0, 0.08) 72%);
  pointer-events: none;
}

.plant-hotspot,
.plant-status-label,
.bg-note,
.bg-sludge-label,
.bg-sludge-frame {
  position: absolute;
  z-index: 3;
}

.plant-hotspot {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #f3f4f6;
}

.plant-hotspot b {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--yellow);
  border-radius: 50%;
  color: var(--yellow);
  font-size: 22px;
}

.plant-hotspot strong {
  font-size: 18px;
  line-height: 1.05;
}

.reactor-air-bubbles {
  position: absolute;
  left: 820px;
  top: 90px;
  width: 300px;
  height: 100px;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.reactor-air-bubbles i {
  position: absolute;
  bottom: 8px;
  width: 9px;
  height: 9px;
  border: 2px solid rgba(230, 244, 255, 0.9);
  border-radius: 50%;
  opacity: 0;
  animation: reactorBubble 2.4s linear infinite;
  animation-delay: calc(var(--air-offset, 0s) - var(--bubble-delay, 0s));
}

.reactor-air-bubbles i:nth-child(1) { left: 7%; --bubble-delay: 0s; }
.reactor-air-bubbles i:nth-child(2) { left: 13%; --bubble-delay: 0.5s; width: 6px; height: 6px; }
.reactor-air-bubbles i:nth-child(3) { left: 20%; --bubble-delay: 1.1s; }
.reactor-air-bubbles i:nth-child(4) { left: 28%; --bubble-delay: 0.2s; width: 7px; height: 7px; }
.reactor-air-bubbles i:nth-child(5) { left: 35%; --bubble-delay: 1.5s; }
.reactor-air-bubbles i:nth-child(6) { left: 43%; --bubble-delay: 0.8s; width: 6px; height: 6px; }
.reactor-air-bubbles i:nth-child(7) { left: 51%; --bubble-delay: 1.9s; }
.reactor-air-bubbles i:nth-child(8) { left: 58%; --bubble-delay: 0.35s; width: 7px; height: 7px; }
.reactor-air-bubbles i:nth-child(9) { left: 64%; --bubble-delay: 1.25s; }
.reactor-air-bubbles i:nth-child(10) { left: 70%; --bubble-delay: 0.65s; width: 6px; height: 6px; }
.reactor-air-bubbles i:nth-child(11) { left: 76%; --bubble-delay: 1.7s; }
.reactor-air-bubbles i:nth-child(12) { left: 82%; --bubble-delay: 0.1s; width: 7px; height: 7px; }
.reactor-air-bubbles i:nth-child(13) { left: 88%; --bubble-delay: 1.35s; }
.reactor-air-bubbles i:nth-child(14) { left: 93%; --bubble-delay: 0.9s; width: 6px; height: 6px; }
.reactor-air-bubbles i:nth-child(15) { left: 47%; --bubble-delay: 2.1s; width: 5px; height: 5px; }
.reactor-air-bubbles i:nth-child(16) { left: 31%; --bubble-delay: 2.25s; width: 5px; height: 5px; }

.pipe-flow-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.pipe-flow {
  position: absolute;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 16px solid rgba(255, 246, 202, 0.96);
  filter: drop-shadow(0 0 6px rgba(255, 236, 150, 0.9));
  opacity: 0;
  animation: pipeTransport 2.2s linear infinite;
  animation-delay: calc(var(--flow-offset, 0s) - var(--flow-delay, 0s));
}

.flow-inlet {
  left: 350px;
  top: 147px;
  --flow-x: 110px;
  --flow-delay: 0s;
}

.flow-screen {
  left: 670px;
  top: 147px;
  --flow-x: 70px;
  --flow-delay: 0.32s;
}

.flow-reactor {
  left: 1135px;
  top: 147px;
  --flow-x: 85px;
  --flow-delay: 0.64s;
}

.flow-clarifier {
  left: 1492px;
  top: 147px;
  --flow-x: 100px;
  --flow-delay: 0.96s;
}

.plant-hotspot.h1 { left: 220px; top: 25px; }
.plant-hotspot.h2 { left: 470px; top: 25px; }
.plant-hotspot.h3 { left: 832px; top: 25px; }
.plant-hotspot.h4 { left: 1261px; top: 25px; }
.plant-hotspot.h5 { right: 124px; top: 25px; }

.plant-status-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d8dce2;
  font-size: 15px;
  line-height: 1.1;
  text-shadow: 0 2px 8px #000;
}

.plant-status-label strong {
  font-size: 15px;
}

.plant-status-label .flowmeter-box {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  padding: 6px 8px 5px;
  border: 1px solid rgba(216, 220, 226, 0.85);
  border-radius: 4px;
  background: rgba(7, 8, 9, 0.82);
  color: #f3f5f7;
  font-family: Consolas, "Liberation Mono", monospace;
  letter-spacing: 0.02em;
  text-shadow: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 2px 8px rgba(0, 0, 0, 0.32);
      position: absolute;
    top: -61px;
}

.plant-status-label .flowmeter-box b {
  font-size: 16px;
}

.plant-status-label .flowmeter-box em {
  font-size: 11px;
  font-style: normal;
  color: #cfd4dc;
}

.s-influent { left: 237px;    top: 282px; }
.s-screen { left: 450px; top: 282px; }
.s-blowers { left: 637px;    top: 359px; }
.s-air {     left: 1063px;    top: 75px;}
.s-recirculation { left: 1063px;    top: 282px; }
.s-flowmeter { right: 86px; top: 282px; }
.s-sludge-pump { left: 924px; top: 430px; }
.s-dryer { left: 1244px; top: 430px; }
.s-dry-sludge { right: 160px; top: 430px; }

.bg-note {
  left: 165px;
  top: 375px;
}

.bg-sludge-frame {
  left: 600px;
  right: 145px;
  bottom: 20px;
  height: 165px;
  border: 1px dashed var(--yellow-2);
  border-radius: 8px;
}

.bg-sludge-label {
  left: 890px;
  bottom: 170px;
  color: var(--yellow);
  padding: 0 18px;
  font-size: 22px;
  font-weight: 800;
  background: black;
}

.results-monitor {
  min-height: 100vh;
  height: 1080px;
  overflow: hidden;
  padding: 28px 70px 26px;
  background:
    radial-gradient(circle at -4% 52%, rgba(55, 168, 255, 0.32), transparent 13%),
    radial-gradient(circle at 104% 48%, rgba(55, 168, 255, 0.27), transparent 13%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 80px),
    radial-gradient(circle at 48% 42%, rgba(255, 255, 255, 0.065), transparent 24%),
    #07090c;
}

.results-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 96px;
}

.results-logo {
  display: flex;
  align-items: center;
  gap: 20px;
  width: fit-content;
  color: var(--text);
  text-decoration: none;
}

.results-logo img {
  width: 128px;
  height: auto;
}

.results-logo strong {
  display: block;
  font-size: 36px;
  line-height: 1;
  letter-spacing: 0;
}

.results-logo em {
  display: block;
  margin-top: 6px;
  color: var(--yellow);
  font-size: 30px;
  font-style: normal;
  line-height: 1;
}

.results-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.result-pill,
.result-new-game {
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 18, 22, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.result-pill {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 18px;
  min-width: 176px;
  padding: 14px 22px;
}

.result-pill.scenario {
  min-width: 260px;
}

.result-pill span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
}

.result-pill strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.result-pill b {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--yellow);
  font-size: 46px;
  font-weight: 400;
}

.result-pill:not(.scenario) b {
  grid-column: 1;
  color: var(--yellow);
  font-size: 40px;
}

.result-new-game {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-width: 282px;
  color: var(--text);
  border-color: var(--yellow);
  background: rgba(16, 18, 22, 0.98);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
}

.result-new-game b {
  color: var(--yellow);
  font-size: 42px;
  font-weight: 400;
}

.results-layout-v2 {
  display: grid;
  grid-template-columns: 560px 730px 400px;
  grid-template-rows: 485px 300px 90px;
  gap: 16px;
  height: 910px;
}

.result-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
    rgba(15, 18, 21, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 18px 60px rgba(0, 0, 0, 0.18);
}

.result-card h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0;
}

.result-main-score {
  grid-row: 1 / span 2;
  padding: 20px 24px 14px;
  text-align: center;
}

.result-score-ring-score{
  margin-top: 60px;
}

.result-score-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 222px;
  height: 222px;
  margin: 16px auto 10px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #0a0d10 0 58%, transparent 59%),
    conic-gradient(var(--yellow) calc(var(--score) * 1%), #262b32 0);
  filter: drop-shadow(0 0 26px rgba(247, 194, 24, 0.18));
}

.result-score-ring::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 12px solid rgba(0, 0, 0, 0.42);
}

.result-score-ring strong {
  z-index: 1;
  color: var(--yellow);
  font-size: 88px;
  line-height: 0.8;
  text-shadow: 0 4px 24px rgba(247, 194, 24, 0.28);
}

.result-score-ring span {
  z-index: 1;
  align-self: end;
  margin-bottom: 54px;
  color: var(--text);
  font-size: 29px;
  font-weight: 800;
}

.result-stars {
  gap: 10px;
  margin: 4px 0 12px;
}

.result-stars span {
  width: 34px;
  height: 34px;
}

.result-main-score h3 {
  margin: 0 0 14px;
  color: var(--yellow);
  font-size: 28px;
  line-height: 1;
}

.result-feedback {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
}

.result-feedback b {
  color: var(--yellow);
  font-size: 38px;
  font-weight: 400;
}

.result-feedback p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.28;
}

.result-output-table {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  overflow: hidden;
}

.result-table-head,
.result-indicator-row {
  display: grid;
  grid-template-columns: 42px 1fr 100px 82px 48px;
  align-items: center;
  text-align: left;
}

.result-table-head {
  padding: 0 10px 8px;
  color: var(--muted);
  font-size: 12px;
}

.result-indicator-row {
  min-height: 42px;
  padding: 0 10px;
  border-top: 1px solid var(--line);
  background: rgba(5, 7, 9, 0.18);
}

.result-indicator-row > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  font-size: 21px;
}

.result-indicator-row b {
  color: var(--text);
  font-size: 16px;
}

.result-indicator-row strong {
  color: var(--green);
  font-size: 16px;
  text-align: right;
}

.result-indicator-row em {
  color: var(--text);
  font-size: 15px;
  font-style: normal;
  text-align: right;
}

.result-indicator-row i {
  color: var(--green);
  font-style: normal;
  text-align: right;
}

.result-indicator-row i.bad {
  color: var(--red);
}

.result-breakdown {
  padding: 22px 22px 14px;
}

.result-breakdown h2,
.result-chart-card h2,
.result-summary h2,
.result-tips h2,
.result-ranking h2 {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.result-break-row {
  display: grid;
  grid-template-columns: 74px 1fr;
  align-items: center;
  min-height: 96px;
  border-bottom: 1px solid var(--line);
}

.result-break-row:last-child {
  border-bottom: 0;
}

.result-break-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  color: var(--text);
  border: 3px solid var(--yellow);
  border-radius: 50%;
  font-size: 40px;
}

.result-break-body > div {
  display: grid;
  grid-template-columns: 1fr 130px 130px;
  align-items: end;
  gap: 12px;
  margin-bottom: 10px;
}

.result-break-body strong {
  color: var(--text);
  font-size: 18px;
}

.result-break-body b {
  color: var(--yellow);
  font-size: 30px;
  line-height: 1;
}

.result-break-body b.green {
  color: var(--green);
}

.result-break-body b em {
  color: var(--muted);
  font-size: 16px;
  font-style: normal;
}

.result-break-body span {
  color: var(--yellow);
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}

.result-break-body i {
  display: block;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #252b32;
}

.result-break-body mark {
  display: block;
  height: 100%;
  background: var(--yellow);
  border-radius: inherit;
}

.result-break-body mark.green {
  background: var(--green);
}

.result-chart-card {
  padding: 18px 20px 16px;
}

.result-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.result-card-head span {
  color: var(--muted);
  font-size: 13px;
}

.result-card-head b {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: var(--yellow);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 34px;
  font-weight: 400;
}

.result-chart-card #historyChart {
  width: 100%;
  height: 230px;
  margin-top: 14px;
  border-radius: 8px;
  background: rgba(3, 5, 7, 0.55);
}

.result-side {
  display: grid;
  grid-template-rows: 310px 270px 1fr;
  grid-column: 3;
  grid-row: 1 / span 3;
  gap: 16px;
  min-height: 0;
}

.result-summary,
.result-tips,
.result-ranking {
  padding: 20px;
}

.result-summary-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.result-summary-row:last-child {
  border-bottom: 0;
}

.result-summary-row span {
  color: var(--yellow);
  font-size: 25px;
}

.result-summary-row span.red {
  color: var(--red);
}

.result-summary-row span.blue {
  color: #42a5f5;
}

.result-summary-row b {
  color: var(--text);
  font-size: 15px;
}

.result-summary-row strong {
  color: var(--text);
  font-size: 17px;
  text-align: right;
}

.result-tip {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.result-tip:last-child {
  border-bottom: 0;
}

.result-tip span {
  color: var(--yellow);
  font-size: 31px;
}

.result-tip p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.32;
}

.result-ranking h2 {
  display: flex;
  align-items: center;
  gap: 12px;
}

.result-ranking h2 span {
  color: var(--yellow);
  font-size: 31px;
}

.result-ranking ol {
  list-style: none;
  margin: 12px 0;
  padding: 0;
}

.result-ranking li {
  display: grid;
  grid-template-columns: 30px 1fr 52px;
  align-items: center;
  min-height: 33px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--text);
}

.result-ranking li.current {
  color: var(--yellow);
  background: linear-gradient(90deg, rgba(247, 194, 24, 0.58), rgba(247, 194, 24, 0.18));
}

.result-ranking li span,
.result-ranking li b,
.result-ranking li strong {
  font-size: 16px;
}

.result-ranking li b {
  font-weight: 500;
}

.result-ranking li strong {
  text-align: right;
}

.result-ranking-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 43px;
  color: var(--yellow);
  border: 2px solid var(--yellow);
  border-radius: 6px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 900;
}

.result-ranking-link span {
  font-size: 26px;
}

.result-quote {
  grid-column: 1 / span 2;
  display: grid;
  grid-template-columns: 82px 1fr 42px 42px 42px 42px;
  align-items: center;
  gap: 12px;
  padding: 12px 30px;
}

.result-quote > b {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: var(--yellow);
  border: 2px solid var(--yellow);
  border-radius: 50%;
  font-size: 42px;
  font-weight: 400;
}

.result-quote p {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.35;
}

.result-quote strong {
  color: var(--yellow);
}

.result-quote > span {
  color: var(--text);
  font-size: 35px;
}

@keyframes flow {
  from {
    transform: translateX(-26px);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes bubble {
  0%,
  100% {
    transform: translateY(28px);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-28px);
    opacity: 1;
  }
}

@keyframes reactorBubble {
  0% {
    transform: translateY(20px) scale(0.75);
    opacity: 0;
  }
  18% {
    opacity: 0.85;
  }
  78% {
    opacity: 0.85;
  }
  100% {
    transform: translateY(-95px) scale(1.12);
    opacity: 0;
  }
}

@keyframes pipeTransport {
  0% {
    transform: translateX(0) scale(0.75);
    opacity: 0;
  }
  12% {
    opacity: 0.9;
  }
  50% {
    transform: translateX(calc(var(--flow-x) * 0.52)) scale(1.18);
    opacity: 1;
  }
  88% {
    opacity: 0.9;
  }
  100% {
    transform: translateX(var(--flow-x)) scale(0.75);
    opacity: 0;
  }
}

@media (max-width: 1100px) {
  .screen {
    padding: 16px;
  }

  .topbar,
  .control-grid,
  .results-grid,
  .plant-bottom,
  .metric-row,
  .strip {
    grid-template-columns: 1fr;
  }

  .results-grid {
    grid-template-areas:
      "score"
      "breakdown"
      "summary"
      "chart"
      "tips"
      "ranking";
  }

  .process-line {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .pipe {
    height: 32px;
    width: 8px;
    margin: auto;
  }

  .control-row,
  .cycle-row,
  .sludge-line {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 36px;
  }
}
