:root {
  --po-fdm: #2563eb;
  --po-sla: #7c3aed;
  --po-sls: #087f57;
  --po-amber: #a85d00;
}

.po-hidden {
  display: none !important;
}

.po-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
}

.po-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid #d8dae5;
  border-radius: 999px;
  background: #fff;
  color: var(--lp-navy);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.po-badge::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lp-red);
  content: "";
}

.po-progress {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin: 25px 0 0;
}

.po-progress span {
  height: 7px;
  border-radius: 999px;
  background: #e0e2ea;
}

.po-progress span.done {
  background: var(--lp-navy);
}

.po-progress span.now {
  background: var(--lp-red);
}

.po-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  gap: 16px;
  margin-top: 24px;
}

.po-intro-main {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  padding: 34px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 85% 22%, rgba(230, 0, 40, .2), transparent 28%),
    linear-gradient(145deg, #000054, #11117a);
  color: #fff;
}

.po-intro-main::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 34px 34px;
  content: "";
}

.po-intro-copy {
  position: relative;
  z-index: 1;
  max-width: 650px;
}

.po-intro-copy h2 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.03;
  letter-spacing: -.045em;
}

.po-intro-copy p {
  /* 440px keeps the paragraph clear of the printer art anchored bottom-right */
  max-width: 440px;
  margin: 16px 0 22px;
  color: rgba(255, 255, 255, .74);
  font-size: 14px;
  line-height: 1.65;
}

.po-intro-main .lp-btn {
  min-height: 46px;
  padding-inline: 24px;
  background: var(--lp-red);
  font-size: 13px;
}

.po-intro-main .lp-btn:disabled {
  background: rgba(255, 255, 255, .2);
  color: rgba(255, 255, 255, .7);
}

.po-cell-art {
  position: absolute;
  right: 26px;
  bottom: 18px;
  pointer-events: none;
  display: flex;
  align-items: end;
  gap: 10px;
  opacity: .92;
}

.po-art-printer {
  position: relative;
  width: 62px;
  height: 96px;
  border: 2px solid rgba(255, 255, 255, .7);
  border-radius: 12px 12px 7px 7px;
  background: rgba(255, 255, 255, .08);
}

.po-art-printer:nth-child(2) {
  height: 132px;
}

.po-art-printer:nth-child(3) {
  width: 90px;
  height: 95px;
}

.po-art-printer::before {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 16px;
  height: 4px;
  border-radius: 4px;
  background: var(--lp-red);
  box-shadow: 0 30px 0 rgba(255, 255, 255, .55);
  content: "";
}

.po-art-printer::after {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 12px;
  height: 18px;
  border-radius: 3px 3px 7px 7px;
  background: rgba(255, 255, 255, .78);
  content: "";
}

.po-how {
  display: grid;
  gap: 9px;
  padding: 22px;
}

.po-how-step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--lp-line);
  border-radius: 11px;
}

.po-how-step b:first-child {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #f1f1f7;
  color: var(--lp-red);
}

.po-how-step strong {
  display: block;
  color: var(--lp-navy);
  font-size: 11px;
}

.po-how-step p {
  margin: 4px 0 0;
  color: var(--lp-muted);
  font-size: 9px;
  line-height: 1.45;
}

.po-statusbar {
  position: sticky;
  top: 60px;
  z-index: 45;
  display: grid;
  /* five tiles since the live class-standing tile joined the strip */
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin: 20px 0 16px;
  overflow: hidden;
  border: 1px solid #dfe1e9;
  border-radius: 13px;
  background: #dfe1e9;
  box-shadow: 0 8px 20px rgba(0, 0, 84, .07);
}

.po-statusitem {
  min-height: 72px;
  padding: 13px 15px;
  background: rgba(255, 255, 255, .97);
}

.po-statusitem span {
  display: block;
  color: var(--lp-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.po-statusitem b {
  display: block;
  margin-top: 7px;
  color: var(--lp-navy);
  font-size: 19px;
}

.po-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr);
  gap: 16px;
  align-items: start;
}

.po-maincol,
.po-side {
  display: grid;
  gap: 16px;
}

.po-side {
  position: sticky;
  top: 149px;
}

.po-brief-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.po-event {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff3e5;
  color: #7d4700;
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
}

.po-forecast {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 15px;
}

.po-demand {
  position: relative;
  padding: 13px;
  overflow: hidden;
  border: 1px solid var(--lp-line);
  border-radius: 11px;
  background: var(--lp-soft);
}

.po-demand::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--po-fdm);
  content: "";
}

.po-demand.sla::before {
  background: var(--po-sla);
}

.po-demand.sls::before {
  background: var(--po-sls);
}

.po-demand span {
  display: block;
  color: var(--lp-muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.po-demand b {
  display: block;
  margin-top: 6px;
  color: var(--lp-navy);
  font-size: 22px;
}

.po-demand small {
  display: block;
  margin-top: 5px;
  color: var(--lp-muted);
  font-size: 8px;
}

.po-printers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.po-printer {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--lp-line);
  border-radius: 13px;
  background: #fff;
}

.po-printer-top {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 11px;
  align-items: center;
  min-height: 102px;
  padding: 14px;
  background: linear-gradient(145deg, #f8f9fc, #eef0f6);
}

.po-machine {
  position: relative;
  width: 64px;
  height: 72px;
  border: 3px solid var(--po-fdm);
  border-radius: 9px 9px 5px 5px;
  background: #fff;
}

.po-machine.sla {
  border-color: var(--po-sla);
}

.po-machine.sls {
  border-color: var(--po-sls);
}

.po-machine::before {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 13px;
  height: 5px;
  border-radius: 4px;
  background: currentColor;
  color: var(--po-fdm);
  box-shadow: 0 23px 0 #cdd0dc;
  content: "";
}

.po-machine.sla::before {
  color: var(--po-sla);
}

.po-machine.sls::before {
  color: var(--po-sls);
}

.po-machine::after {
  position: absolute;
  left: 17px;
  right: 17px;
  bottom: 8px;
  height: 12px;
  border-radius: 3px 3px 6px 6px;
  background: #babecd;
  content: "";
}

.po-printer h3 {
  margin: 0;
  color: var(--lp-navy);
  font-size: 15px;
}

.po-printer-tag {
  display: block;
  margin-top: 5px;
  color: var(--lp-muted);
  font-size: 8px;
  line-height: 1.4;
}

.po-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 12px 14px 0;
}

.po-specs span {
  display: block;
  padding: 8px;
  border-radius: 8px;
  background: var(--lp-soft);
  color: var(--lp-muted);
  font-size: 8px;
}

.po-specs b {
  display: block;
  margin-top: 4px;
  color: var(--lp-navy);
  font-size: 11px;
}

.po-buy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 14px 14px;
}

.po-fleet {
  color: var(--lp-muted);
  font-size: 9px;
}

.po-fleet b {
  color: var(--lp-navy);
}

.po-stepper {
  display: inline-grid;
  grid-template-columns: 36px 38px 36px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #d7d9e3;
  border-radius: 999px;
  background: #fff;
}

.po-stepper button {
  display: grid;
  place-items: center;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: #f2f3f7;
  color: var(--lp-navy);
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.po-stepper button:hover {
  background: #e7e8ef;
}

.po-stepper output {
  text-align: center;
  color: var(--lp-navy);
  font-size: 12px;
  font-weight: 850;
}

.po-operations {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, .8fr);
  gap: 16px;
}

.po-material-list {
  display: grid;
  gap: 8px;
}

.po-material {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid var(--lp-line);
  border-radius: 10px;
}

.po-material b {
  display: block;
  color: var(--lp-navy);
  font-size: 10px;
}

.po-material small {
  display: block;
  margin-top: 4px;
  color: var(--lp-muted);
  font-size: 8px;
}

.po-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.po-field {
  display: grid;
  gap: 6px;
}

.po-field.wide {
  grid-column: 1 / -1;
}

.po-field label {
  color: var(--lp-navy);
  font-size: 9px;
  font-weight: 800;
}

.po-field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid #cfd2df;
  border-radius: 9px;
  background: #fff;
  color: var(--lp-ink);
  font: 650 10px Inter, Arial, sans-serif;
}

.po-field select:focus {
  outline: 3px solid rgba(230, 0, 40, .15);
  border-color: var(--lp-red);
}

.po-budget {
  display: grid;
  gap: 10px;
}

.po-budget-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--lp-muted);
  font-size: 10px;
}

.po-budget-row b {
  color: var(--lp-navy);
  font-size: 11px;
}

.po-budget-row.total {
  margin-top: 3px;
  padding-top: 12px;
  border-top: 1px solid var(--lp-line);
  color: var(--lp-navy);
  font-weight: 850;
}

.po-budget-row.total b {
  color: var(--lp-red);
  font-size: 18px;
}

.po-cashafter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border-radius: 10px;
  background: #edf8f3;
  color: #075d42;
  font-size: 10px;
  font-weight: 800;
}

.po-cashafter.bad {
  background: #fff0f2;
  color: #a8001e;
}

.po-commit {
  width: 100%;
  min-height: 46px;
  margin-top: 4px;
  background: var(--lp-red);
  font-size: 13px;
}

.po-side-note {
  margin: 0;
  color: var(--lp-muted);
  font-size: 9px;
  line-height: 1.55;
}

.po-result {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--lp-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 84, .06);
}

.po-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  background: var(--lp-navy);
  color: #fff;
}

.po-result-head h2 {
  margin: 0;
  font-size: 22px;
}

.po-result-head p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, .7);
  font-size: 10px;
}

.po-net {
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  white-space: nowrap;
}

.po-net.negative {
  color: #ff9aab;
}

.po-result-body {
  padding: 20px 22px;
}

.po-result-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.po-result-kpi {
  padding: 11px;
  border-radius: 10px;
  background: var(--lp-soft);
}

.po-result-kpi span {
  display: block;
  color: var(--lp-muted);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.po-result-kpi b {
  display: block;
  margin-top: 6px;
  color: var(--lp-navy);
  font-size: 17px;
}

.po-output-bars {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.po-output {
  display: grid;
  grid-template-columns: 92px 1fr 82px;
  gap: 10px;
  align-items: center;
}

.po-output > b {
  color: var(--lp-navy);
  font-size: 10px;
}

.po-track {
  position: relative;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #eceef3;
}

.po-track .demand {
  position: absolute;
  inset: 0;
  background: #d9dbe4;
}

.po-track .good {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: var(--po-fdm);
}

.po-output.sla .good {
  background: var(--po-sla);
}

.po-output.sls .good {
  background: var(--po-sls);
}

.po-output small {
  color: var(--lp-muted);
  font-size: 8px;
  text-align: right;
}

.po-debrief {
  display: grid;
  gap: 7px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.po-debrief li {
  position: relative;
  padding: 10px 11px 10px 32px;
  border-left: 3px solid var(--lp-red);
  background: #fff7f8;
  color: #5f627a;
  font-size: 9px;
  line-height: 1.5;
}

.po-debrief li::before {
  position: absolute;
  left: 12px;
  top: 10px;
  color: var(--lp-red);
  font-weight: 900;
  content: "i";
}

.po-result-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.po-final {
  display: grid;
  grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr);
  gap: 16px;
  margin-top: 20px;
}

.po-scorecard {
  padding: 26px;
  border-radius: 17px;
  background: var(--lp-navy);
  color: #fff;
}

.po-score {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  font-size: 72px;
  font-weight: 950;
  line-height: .95;
  letter-spacing: -.06em;
}

.po-score small {
  padding-bottom: 7px;
  font-size: 20px;
  color: rgba(255, 255, 255, .55);
  letter-spacing: 0;
}

.po-award {
  margin-top: 20px;
  color: #fff;
  font-size: 20px;
}

.po-scorecard p {
  color: rgba(255, 255, 255, .7);
  font-size: 11px;
  line-height: 1.6;
}

.po-scorecard .lp-btn {
  margin-top: 12px;
  background: var(--lp-red);
}

.po-breakdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.po-scorepart {
  padding: 13px;
  border: 1px solid var(--lp-line);
  border-radius: 11px;
}

.po-scorepart span {
  display: block;
  color: var(--lp-muted);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.po-scorepart b {
  display: block;
  margin-top: 7px;
  color: var(--lp-navy);
  font-size: 19px;
}

.po-history {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
}

.po-history th,
.po-history td {
  padding: 10px;
  border-bottom: 1px solid var(--lp-line);
  color: var(--lp-muted);
  font-size: 9px;
  text-align: left;
}

.po-history th {
  color: var(--lp-navy);
  font-size: 8px;
  text-transform: uppercase;
}

.po-paused {
  position: fixed;
  inset: 0;
  z-index: 8500;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 54, .56);
  backdrop-filter: blur(4px);
}

.po-paused-card {
  max-width: 390px;
  padding: 28px;
  border-radius: 18px;
  background: #fff;
  text-align: center;
}

.po-paused-card h2 {
  margin: 0;
  color: var(--lp-navy);
}

.po-paused-card p {
  color: var(--lp-muted);
  font-size: 11px;
  line-height: 1.55;
}

@media (max-width: 1040px) {
  .po-layout,
  .po-final {
    grid-template-columns: 1fr;
  }

  .po-side {
    position: static;
  }

  .po-statusbar {
    position: static;
  }
}

@media (max-width: 780px) {
  .po-hero,
  .po-intro,
  .po-operations {
    grid-template-columns: 1fr;
  }

  .po-printers {
    grid-template-columns: 1fr;
  }

  .po-printer {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .po-printer-top {
    grid-row: span 2;
  }

  .po-specs {
    min-width: 210px;
  }

  .po-buy {
    min-width: 210px;
  }

  .po-cell-art {
    opacity: .28;
  }
}

@media (max-width: 590px) {
  .po-badge {
    width: max-content;
  }

  .po-intro-main {
    min-height: 410px;
    padding: 25px;
  }

  .po-statusbar,
  .po-result-kpis,
  .po-breakdown {
    grid-template-columns: 1fr 1fr;
  }

  .po-forecast,
  .po-fields {
    grid-template-columns: 1fr;
  }

  .po-field.wide {
    grid-column: auto;
  }

  .po-printer {
    grid-template-columns: 1fr;
  }

  .po-printer-top {
    grid-row: auto;
  }

  .po-specs,
  .po-buy {
    min-width: 0;
  }

  .po-output {
    grid-template-columns: 72px 1fr;
  }

  .po-output small {
    grid-column: 1 / -1;
    text-align: left;
  }

  .po-stepper {
    grid-template-columns: 44px 38px 44px;
  }

  .po-stepper button {
    min-width: 44px;
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .po-machine,
  .po-track .good {
    transition: none;
  }
}
