:root {
  --bg: #0b1014;
  --panel: #111a20;
  --panel2: #162229;
  --line: #26343b;
  --text: #edf2f0;
  --muted: #94a49f;
  --green: #75e0a0;
  --amber: #f0b95b;
  --red: #f26c6c;
  --blue: #72b7dd;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(circle at 78% 6%, #20343a, transparent 29rem),
    var(--bg);
  color: var(--text);
}
a {
  color: inherit;
}
header {
  min-height: 76px;
  padding: 12px max(18px, calc((100% - 1260px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: #0b1014ed;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
}
.brand > span:last-child {
  display: grid;
}
.brand small {
  color: var(--muted);
}
.symbol {
  width: 44px;
  height: 44px;
  border: 1px solid #40525a;
  border-radius: 13px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 10px;
  background: #121c21;
}
.symbol i {
  width: 6px;
  background: var(--green);
  border-radius: 2px;
}
.symbol i:nth-child(1) {
  height: 13px;
}
.symbol i:nth-child(2) {
  height: 22px;
}
.symbol i:nth-child(3) {
  height: 17px;
}
nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 750;
  color: #b9c6c3;
}
nav a {
  text-decoration: none;
}
.boundary {
  padding: 9px max(18px, calc((100% - 1260px) / 2));
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.boundary b {
  color: var(--amber);
}
main {
  max-width: 1260px;
  margin: auto;
  padding: 42px 18px 80px;
}
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 38px;
  align-items: end;
  padding: 20px 0 42px;
}
.kicker {
  font: 750 10px/1.5 monospace;
  letter-spacing: 0.14em;
  color: var(--green);
  margin: 0 0 10px;
}
.hero h1 {
  font-size: clamp(46px, 7vw, 86px);
  line-height: 0.92;
  letter-spacing: -0.07em;
  margin: 0;
}
.hero h1 em {
  font-style: normal;
  color: var(--green);
}
.hero > div > p:last-child {
  max-width: 730px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 17px;
}
.controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  min-width: 330px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: #10191f;
}
.controls label {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}
.controls button,
.controls select,
.quiet,
.danger {
  border: 1px solid #394951;
  border-radius: 10px;
  padding: 11px;
  background: #19242a;
  color: var(--text);
  font-weight: 800;
}
.controls .primary {
  background: var(--green);
  color: #092017;
  border-color: transparent;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--line);
  gap: 1px;
  margin-bottom: 18px;
}
.metrics article {
  background: #10181e;
  padding: 20px;
  display: grid;
}
.metrics small,
.metrics span {
  color: var(--muted);
}
.metrics strong {
  font-size: 30px;
  margin: 6px 0;
}
.metrics span {
  font-size: 11px;
}
.line-panel,
.panel {
  border: 1px solid var(--line);
  border-radius: 21px;
  background: linear-gradient(145deg, #111c22, #0e161b);
  padding: 24px;
  box-shadow: 0 25px 80px #0005;
}
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}
.section-head h2 {
  margin: 0 0 22px;
  font-size: 25px;
}
.line-state {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}
.line-state span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #6f7b78;
}
.line-state.running span {
  background: var(--green);
  box-shadow: 0 0 18px var(--green);
}
.factory-line {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 9px;
  position: relative;
}
.machine {
  position: relative;
  min-height: 164px;
  padding: 16px;
  border: 1px solid #34434a;
  border-radius: 15px;
  background: #121c21;
  overflow: hidden;
}
.machine:after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: var(--green);
}
.machine.warn:after {
  background: var(--amber);
}
.machine.down:after {
  background: var(--red);
}
.machine small {
  color: var(--muted);
  font: 700 9px/1.4 monospace;
  letter-spacing: 0.1em;
}
.machine h3 {
  font-size: 14px;
  margin: 9px 0 15px;
}
.machine-data {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  font-size: 10px;
  color: var(--muted);
}
.machine-data b {
  display: block;
  color: var(--text);
  font-size: 13px;
}
.machine .gear {
  position: absolute;
  width: 52px;
  height: 52px;
  border: 7px dotted #38484e;
  border-radius: 50%;
  right: -10px;
  top: 52px;
}
.running .machine.active .gear {
  animation: spin 2.4s linear infinite;
}
.belt {
  height: 18px;
  margin-top: 16px;
  border: 1px solid #33434a;
  border-radius: 99px;
  background: repeating-linear-gradient(
    90deg,
    #222e34 0 18px,
    #131e23 18px 26px
  );
  position: relative;
  overflow: hidden;
}
.belt i {
  position: absolute;
  width: 16px;
  height: 12px;
  top: 2px;
  background: var(--amber);
  border-radius: 3px;
  left: 0;
  transition: left 0.55s ease;
}
.facility-layout { display:grid; grid-template-columns:1fr 24px 1.2fr 24px 1fr 24px 1fr; gap:8px; align-items:stretch; margin-top:18px; }
.facility-layout article { min-height:86px; padding:13px; border:1px solid #314149; border-radius:12px; background:linear-gradient(145deg,#152229,#0d161b); }
.facility-layout article small { display:block; color:var(--green); font:700 9px monospace; letter-spacing:.12em; }.facility-layout article b { display:block; margin:9px 0 6px; font-size:13px; }.facility-layout article span { color:var(--muted); font-size:10px; }.facility-layout>i { align-self:center; color:var(--amber); text-align:center; font-style:normal; }
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.lower {
  display: grid;
  grid-template-columns: 1.55fr 0.65fr;
  gap: 18px;
  margin-top: 18px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th,
td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
th {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.1em;
}
.badge {
  display: inline-flex;
  border-radius: 99px;
  padding: 4px 7px;
  background: #75e0a017;
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
}
.badge.warn {
  color: var(--amber);
  background: #f0b95b15;
}
.badge.down {
  color: var(--red);
  background: #f26c6c15;
}
.alert-panel label {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
}
.alert-panel select {
  padding: 11px;
  border-radius: 10px;
  border: 1px solid #394951;
  background: #0b1216;
}
.danger {
  width: 100%;
  background: #f26c6c17;
  color: #ff9999;
  border-color: #713d3d;
}
.advice {
  min-height: 135px;
  padding: 15px;
  border-left: 3px solid var(--green);
  background: #75e0a00b;
  margin-bottom: 18px;
}
.advice.warn {
  border-color: var(--amber);
}
.advice b {
  display: block;
  margin-bottom: 8px;
}
.advice p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  font-size: 13px;
}
.timeline {
  margin-top: 18px;
}
.timeline .section-head span {
  color: var(--muted);
  font-size: 11px;
}
canvas {
  width: 100%;
  height: 260px;
  display: block;
}
.evidence {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 20px;
  padding-top: 64px;
}
.evidence h2 {
  font-size: 33px;
  margin: 0;
}
.evidence article {
  border-top: 1px solid #46565b;
  padding-top: 16px;
}
.evidence article p {
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}
footer {
  padding: 28px max(18px, calc((100% - 1260px) / 2));
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
}
footer b {
  color: var(--text);
}
@media (max-width: 980px) {
  .factory-line {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero,
  .lower,
  .evidence {
    grid-template-columns: 1fr;
  }
  .controls {
    min-width: 0;
  }
  .evidence {
    grid-template-columns: 1fr 1fr;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .facility-layout { grid-template-columns:1fr 1fr; }.facility-layout>i{display:none}
}
@media (max-width: 600px) {
  header {
    position: relative;
    align-items: flex-start;
    flex-direction: column;
  }
  .boundary {
    flex-direction: column;
  }
  .factory-line,
  .metrics,
  .evidence {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 44px;
  }
  .controls {
    grid-template-columns: 1fr;
  }
  .controls label {
    grid-column: auto;
  }
  .panel,
  .line-panel {
    padding: 16px;
  }
  footer {
    flex-direction: column;
  }
  .machine {
    min-height: 130px;
  }
}
