@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");
:root {
  color-scheme: dark;
  --bg: #0b0918;
  --muted: #b8b3ca;
  --coral: #ff6b4a;
  --purple: #4318ff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: #faf9ff;
  font:
    15px/1.65 "Plus Jakarta Sans",
    system-ui,
    sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
header,
main,
footer {
  max-width: 1180px;
  margin: auto;
}
header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 26px 24px;
}
header .brand {
  margin-right: auto;
  font-size: 23px;
  font-weight: 800;
}
.brand span {
  color: var(--coral);
}
button {
  border: 1px solid #403750;
  background: transparent;
  color: inherit;
  border-radius: 12px;
  padding: 11px 17px;
}
main {
  padding: 45px 24px;
}
.intro {
  max-width: 770px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--coral);
}
h1 {
  font-size: clamp(40px, 6vw, 70px);
  line-height: 1.08;
  letter-spacing: -2.5px;
  margin: 22px 0;
}
p {
  color: var(--muted);
}
.intro > p:last-child {
  max-width: 560px;
  font-size: 18px;
}
.tabs {
  display: flex;
  gap: 10px;
  margin: 36px 0 22px;
  flex-wrap: wrap;
}
.tabs button[aria-selected="true"] {
  background: #fff;
  color: var(--bg);
  border-color: white;
}
.workspace {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  border: 1px solid #342c45;
  border-radius: 24px;
  overflow: hidden;
  background: #13101f;
}
.controls {
  padding: 30px;
  border-right: 1px solid #342c45;
}
.output {
  padding: 30px;
  background: linear-gradient(145deg, #1b1530, #13101f);
}
h2 {
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.7px;
  margin: 10px 0 14px;
}
label {
  display: block;
  font-size: 13px;
  margin: 18px 0 7px;
}
input,
select {
  width: 100%;
  min-width: 0;
  background: #0b0918;
  border: 1px solid #49405c;
  border-radius: 10px;
  padding: 12px;
  color: white;
}
input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid #a796ff;
  outline-offset: 3px;
}
.primary {
  display: inline-block;
  background: var(--coral);
  color: #0b0918;
  border: 0;
  font-weight: 700;
  padding: 13px 19px;
  border-radius: 12px;
}
.controls .primary {
  margin-top: 22px;
  width: 100%;
}
.mini {
  font-size: 12px;
}
.result-card {
  padding: 18px;
  background: #ffffff06;
  border: 1px solid #403650;
  border-radius: 14px;
  margin: 12px 0;
  animation: arrive 0.3s ease-out;
}
.result-card h3 {
  font-size: 17px;
  margin: 0 0 6px;
}
.result-card p {
  margin: 5px 0;
  font-size: 13px;
}
.tag {
  display: inline-block;
  color: #c3b5ff;
  font-size: 11px;
  border: 1px solid #68568b;
  border-radius: 20px;
  padding: 3px 9px;
  margin-bottom: 8px;
}
.result-card button {
  margin-top: 12px;
  font-size: 12px;
}
.disclaimer {
  color: #aca4bd;
  font-size: 12px;
  max-width: 840px;
  margin-top: 18px;
}
.next {
  margin: 65px 0 20px;
  padding-top: 35px;
  border-top: 1px solid #342c45;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}
.next p {
  max-width: 590px;
}
.next .primary {
  flex-shrink: 0;
}
footer {
  display: flex;
  justify-content: space-between;
  padding: 25px 24px;
  border-top: 1px solid #342c45;
  color: #b8b3ca;
  font-size: 13px;
}
@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 720px) {
  main {
    padding-top: 25px;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .controls {
    border-right: 0;
    border-bottom: 1px solid #342c45;
  }
  .controls,
  .output {
    padding: 22px;
  }
  .next {
    flex-direction: column;
    align-items: flex-start;
  }
  .tabs button {
    flex: 1;
    font-size: 12px;
    padding: 11px 9px;
  }
  header {
    gap: 14px;
  }
  header > a:not(.brand) {
    font-size: 12px;
  }
  header .brand {
    font-size: 20px;
  }
  h1 {
    letter-spacing: -1.6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
  }
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.result-card {
  opacity: 1;
}

.intro {
  max-width: 900px;
}
.intro h1 {
  font-size: clamp(38px, 5.4vw, 64px);
}
.intro > p:last-child {
  font-size: 16px;
  max-width: 600px;
}
.controls h2 {
  font-size: 29px;
}
.output-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.source-state {
  font-size: 10px;
  color: #aaa0ba;
}
.property-plan {
  display: block;
  width: 100%;
  height: auto;
  max-height: 185px;
  margin: 15px 0 24px;
}
.engineering-note {
  border: 1px solid #342c45;
  border-radius: 14px;
  margin-top: 18px;
  padding: 18px 23px;
}
.engineering-note summary {
  cursor: pointer;
  font-size: 13px;
  color: #cbc1dc;
}
.engineering-note h3 {
  font-size: 16px;
  margin-top: 22px;
}
.engineering-note p {
  font-size: 13px;
  max-width: 85ch;
}
.workspace {
  box-shadow: 0 20px 80px #00000020;
}
.result-card {
  animation: none;
}
.intro .eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
}
.intro .eyebrow:before {
  content: "";
  width: 22px;
  height: 1px;
  background: #ff6b4a;
}
.tabs {
  margin-top: 30px;
}
.output {
  min-width: 0;
}
@media (max-width: 720px) {
  .source-state {
    font-size: 10px;
  }
  .controls h2 {
    font-size: 25px;
  }
}
.impact-estimator {
  margin-top: 18px;
  padding: 19px 23px;
  border: 1px solid #342c45;
  border-radius: 14px;
}
.impact-estimator summary {
  font-size: 14px;
  cursor: pointer;
  color: #e3d9f0;
}
.impact-estimator > p {
  font-size: 13px;
  line-height: 1.7;
}
.impact-estimator form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: end;
}
.impact-estimator label {
  font-size: 12px;
  margin-top: 12px;
}
.impact-estimator form .primary {
  grid-column: 1/-1;
  width: fit-content;
  font-size: 13px;
}
.impact-estimator #impact-result {
  color: #e3d9f0;
  font-size: 16px;
}
.next {
  flex-wrap: wrap;
}
.brief-download {
  font-size: 12px;
  color: #c9bed9;
  min-height: 44px;
}
.next > div {
  flex: 1 1 500px;
}
@media (max-width: 700px) {
  .impact-estimator form {
    grid-template-columns: 1fr;
  }
  .impact-estimator {
    padding: 18px;
  }
  .next > div {
    flex-basis: auto;
  }
}
.impact-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 15px 0;
}
.impact-presets button {
  font-size: 12px;
  min-height: 44px;
  padding: 10px 12px;
}
.impact-presets button:hover {
  border-color: #a78dde;
}
@media (max-width: 500px) {
  header {
    flex-wrap: wrap;
    gap: 10px 16px;
  }
  header > a:not(.brand) {
    order: 3;
    flex-basis: 100%;
    font-size: 12px;
  }
  header .brand {
    min-width: 0;
  }
  header .brand svg {
    flex-shrink: 0;
  }
  .impact-estimator .primary {
    max-width: 100%;
    white-space: normal;
  }
  .next > div {
    min-width: 0;
  }
}

.lab-case-heading {
  padding: 20px 0 12px;
  max-width: 800px;
}
.lab-case-heading h2 {
  font-size: 26px;
}
.lab-case-heading p {
  font-size: 14px;
}
.warehouse-frame {
  display: block;
  width: 100%;
  height: 1300px;
  border: 1px solid #342c45;
  border-radius: 18px;
  background: #0b0918;
}
.output code {
  font-size: 11px;
  color: #c4b6ed;
  overflow-wrap: anywhere;
}
.output ol {
  padding-left: 18px;
  font-size: 12px;
  color: #b8b3ca;
}
.output #prepare-action {
  margin-top: 14px;
  background: #ff6b4a;
  color: #0b0918;
  font-weight: 700;
}
.output #case-status {
  font-size: 13px;
  min-height: 1.6em;
}
.intro h1 {
  font-size: clamp(34px, 4.5vw, 54px);
}
/* Last-unit scenario: compact presentation, scroll-safe event log. */
.unit-metrics,
.unit-orders {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.unit-metrics > div,
.unit-orders > div {
  background: #171225;
  border: 1px solid #ffffff14;
  border-radius: 12px;
  padding: 18px;
}
.unit-metrics span {
  display: block;
  color: #b6acc8;
  font-size: 12px;
}
.unit-metrics strong {
  display: block;
  font-size: 30px;
  margin-top: 8px;
}
.unit-orders {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 16px 0;
}
.unit-orders strong {
  font-size: 13px;
}
.unit-orders p {
  margin-bottom: 0;
  font-size: 12px;
}
.unit-failure {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  padding: 10px 0;
}
.unit-failure input {
  width: auto;
  accent-color: #ff6b4a;
}
.unit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}
.unit-actions button {
  width: auto;
  font: inherit;
  font-size: 12px;
  padding: 12px 16px;
  cursor: pointer;
}
.unit-actions button:disabled {
  opacity: 0.45;
  cursor: default;
}
.unit-result {
  background: #100d1c;
  border-radius: 12px;
  padding: 18px;
}
.unit-result h3 {
  font-size: 14px;
  margin-top: 0;
}
.unit-result ol {
  padding-left: 20px;
  margin-bottom: 0;
}
.unit-result li {
  font-size: 12px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.last-unit details {
  margin-top: 16px;
}
.tabs {
  overflow-x: auto;
}
.tabs button {
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 520px) {
  .unit-metrics {
    gap: 6px;
  }
  .unit-metrics > div {
    padding: 12px 8px;
  }
  .unit-metrics span {
    font-size: 10px;
  }
  .unit-metrics strong {
    font-size: 25px;
  }
  .unit-orders {
    grid-template-columns: 1fr;
  }
  .unit-actions button {
    flex: 1;
  }
  .unit-result {
    padding: 14px;
  }
}
/* Focus the first screen on the situation, then expose controls progressively. */
main {
  padding-top: 24px;
}
.intro {
  max-width: 760px;
}
h1 {
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -1.8px;
  margin: 14px 0;
}
.intro > p:last-child {
  font-size: 15px;
}
.tabs {
  margin: 24px 0 20px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 5px;
}
.tabs button {
  font-size: 12px;
  padding: 10px 14px;
}
.case-story {
  padding: 20px 22px;
  border-radius: 16px;
  background: linear-gradient(110deg, #211535, #151020);
  margin-bottom: 20px;
}
.case-story .eyebrow {
  font-size: 10px;
  margin: 0 0 10px;
}
.case-story h2 {
  font-size: clamp(19px, 2.3vw, 25px);
  line-height: 1.4;
  margin: 0 0 10px;
  max-width: 850px;
}
.case-story p {
  font-size: 13px;
  margin: 6px 0;
}
.case-story .story-decision {
  color: #eee5fb;
}
.case-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.case-presets button {
  font-size: 12px;
  border-radius: 24px;
  padding: 9px 13px;
}
.lab-case-heading h2 {
  font-size: 23px;
}
.lab-case-heading p {
  font-size: 13px;
  max-width: 850px;
}
.controls,
.output {
  padding: 22px;
}
.controls label:first-child {
  margin-top: 0;
}
.next {
  margin-top: 35px;
}
.warehouse-frame {
  border-radius: 16px;
}
@media (max-width: 720px) {
  .case-story {
    padding: 18px;
  }
  .case-presets {
    gap: 6px;
  }
  .case-presets button {
    font-size: 11px;
  }
  .lab-case-heading h2 {
    font-size: 21px;
  }
  .tabs {
    margin-top: 20px;
  }
}
.case-guided {
  max-width: 940px;
  border: 1px solid #ffffff18;
  border-radius: 20px;
  padding: 28px;
  background: linear-gradient(135deg, #211632, #100d1c);
}
.case-guided h2 {
  font-size: clamp(23px, 3vw, 34px);
  max-width: 760px;
  margin: 12px 0;
}
.guide-input {
  font-size: 15px;
  max-width: 700px;
}
.guide-purpose {
  border-left: 2px solid #ff6b4a;
  padding-left: 14px;
  margin: 22px 0;
}
.guide-purpose span,
.guide-state {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ff9a81;
}
.guide-purpose p {
  font-size: 13px;
  margin: 5px 0;
}
.guide-progress {
  display: flex;
  list-style: none;
  gap: 12px;
  padding: 0;
  margin: 25px 0;
  counter-reset: stage;
}
.guide-progress li {
  flex: 1;
  font-size: 12px;
  color: #9486a6;
  padding: 10px 0;
  border-bottom: 2px solid #ffffff12;
  counter-increment: stage;
}
.guide-progress li:before {
  content: counter(stage) " / ";
  font-size: 10px;
}
.guide-progress li.current,
.guide-progress li.complete {
  color: #f4edfc;
  border-color: #ff6b4a;
}
.guide-result {
  min-height: 105px;
  background: #0b091888;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 20px;
}
.guide-result p {
  font-size: 14px;
  margin: 7px 0;
}
.guide-result strong {
  display: block;
  font-size: 12px;
  color: #d4f1db;
  margin-top: 15px;
}
.guide-next {
  font-size: 13px;
}
.guide-note {
  font-size: 11px;
  margin-bottom: 0;
}
.case-advanced {
  max-width: 1100px;
  margin-top: 20px;
}
.case-advanced > summary {
  font-size: 13px;
  color: #bbb1cd;
  padding: 12px 0;
  cursor: pointer;
}
.case-playground {
  padding-top: 15px;
}
@media (max-width: 520px) {
  .case-guided {
    padding: 20px;
  }
  .guide-next {
    width: 100%;
  }
  .guide-progress {
    gap: 8px;
  }
  .guide-progress li {
    font-size: 11px;
  }
  .guide-result {
    min-height: 125px;
  }
  .guide-result p {
    font-size: 13px;
  }
}
@media (max-width: 520px) {
  header {
    padding: 20px 20px;
    gap: 12px;
    flex-wrap: nowrap;
  }
  header .brand {
    font-size: 20px;
  }
  header > a:not(.brand) {
    display: none;
  }
  .tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
    gap: 8px;
  }
  .tabs button {
    white-space: normal;
    text-align: center;
    min-width: 0;
    font-size: 11px;
  }
  .guide-note {
    font-size: 10px;
  }
  .case-guided .eyebrow {
    font-size: 9px;
    letter-spacing: 1px;
  }
}
.architecture-panel {
  margin: 20px 0;
  padding: 18px;
  border: 1px solid #ffffff1a;
  border-radius: 14px;
  background: #141020;
}
.architecture-panel > summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.architecture-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 22px 0;
  counter-reset: component;
}
.architecture-flow li {
  position: relative;
  border: 1px solid #675188;
  border-radius: 12px;
  padding: 16px;
  background: #1c152d;
  counter-increment: component;
}
.architecture-flow li:before {
  content: "0" counter(component);
  display: block;
  color: #ff9a81;
  font-size: 10px;
  margin-bottom: 9px;
}
.architecture-flow li:not(:last-child):after {
  content: "";
  position: absolute;
  right: -17px;
  top: 50%;
  width: 16px;
  border-top: 1px solid #8a719f;
}
.architecture-flow h3 {
  font-size: 13px;
  line-height: 1.4;
  margin: 0 0 9px;
}
.architecture-flow p {
  font-size: 11px;
  line-height: 1.6;
  margin: 0;
}
.architecture-rules {
  padding-left: 18px;
  color: #c1b7d1;
  font-size: 12px;
  line-height: 1.8;
}
.architecture-rules li {
  margin: 7px 0;
}
.architecture-ai {
  border-left: 2px solid #6b48ff;
  padding-left: 16px;
  margin-top: 20px;
}
.architecture-ai h3 {
  font-size: 13px;
  margin: 0 0 6px;
}
.architecture-ai p {
  font-size: 12px;
  margin: 0;
}
@media (max-width: 760px) {
  .architecture-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .architecture-flow li:after {
    display: none;
  }
}
@media (max-width: 460px) {
  .architecture-flow {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .architecture-flow li:not(:last-child):after {
    display: block;
    width: 0;
    height: 14px;
    right: auto;
    left: 50%;
    top: auto;
    bottom: -15px;
    border-top: 0;
    border-left: 1px solid #8a719f;
  }
}
.problem-picker {
  margin: 25px 0;
}
.problem-picker > summary {
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 12px 0;
  color: #ddd3ec;
}
.problem-catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 15px 0;
}
.problem-card {
  padding: 22px;
  border: 1px solid #ffffff1b;
  background: #151020;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.problem-card h2 {
  font-size: 19px;
  line-height: 1.4;
  margin: 8px 0 18px;
  letter-spacing: -0.5px;
}
.problem-card .eyebrow {
  font-size: 9px;
}
.solution-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ff9a81;
}
.problem-card p {
  font-size: 13px;
  margin: 7px 0 20px;
  flex: 1;
}
.problem-card button {
  font-size: 12px;
  padding: 10px 13px;
  color: #f1eafb;
  background: #261a38;
}
.problem-card.selected {
  border-color: #ff6b4a;
}
.tabs {
  display: none;
}
#scenario {
  scroll-margin-top: 20px;
}
@media (max-width: 640px) {
  .problem-catalog {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .problem-card {
    padding: 18px;
  }
  .problem-card h2 {
    font-size: 18px;
  }
  .problem-card p {
    margin-bottom: 15px;
  }
  .problem-card button {
    width: 100%;
  }
}
/* One screen at a time: problem picker, guided step, then optional detail. */
.lab-navigation {
  display: none;
  margin: 0 0 18px;
}
.lab-selected .lab-navigation {
  display: block;
}
.lab-selected .intro {
  display: none;
}
.lab-selected main {
  padding-top: 12px;
}
.guide-navigation {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.guide-navigation button {
  min-width: 120px;
  font-size: 13px;
}
.guide-back:disabled {
  opacity: 0.3;
  cursor: default;
}
.guide-purpose {
  margin: 15px 0;
}
.guide-progress {
  margin: 18px 0;
}
.case-guided {
  padding: 24px;
  max-width: 850px;
}
.case-guided h2 {
  font-size: clamp(23px, 3vw, 32px);
}
.guide-result {
  min-height: 90px;
}
.guide-note {
  font-size: 10px;
}
.problem-card .solution-label,
.problem-card > p {
  display: none;
}
.problem-card h2 {
  font-size: 17px;
  margin-bottom: 15px;
  flex: 1;
}
.problem-card {
  padding: 18px;
}
.problem-catalog {
  gap: 12px;
}
.problem-card button {
  padding: 9px 12px;
}
.impact-estimator,
.next {
  display: none;
}
.lab-complete .impact-estimator {
  display: block;
}
.lab-complete .next {
  display: flex;
}
.disclaimer {
  font-size: 10px;
  margin-top: 14px;
}
.lab-selected .disclaimer {
  max-width: 850px;
}
.lab-selected footer {
  margin-top: 24px;
}
.lab-selected .guide-input {
  font-size: 14px;
}
.lab-selected .guide-purpose p {
  font-size: 12px;
}
.case-advanced[hidden] {
  display: none;
}
#lab-back-menu {
  font-size: 12px;
  padding: 9px 13px;
  border-radius: 24px;
}
@media (max-width: 520px) {
  .case-guided {
    padding: 18px;
  }
  .guide-navigation .guide-next {
    width: auto;
    flex: 1;
  }
  .guide-navigation .guide-back {
    min-width: 80px;
  }
  .lab-complete .next {
    display: block;
  }
  .problem-card h2 {
    font-size: 16px;
  }
  .problem-card {
    padding: 16px;
  }
}
