:root {
  color-scheme: light;
  --forest: #12382e;
  --forest-dark: #0b2b23;
  --ink: #20241f;
  --muted: #62665f;
  --paper: #f7f5ef;
  --paper-strong: #fffdf8;
  --line: #cfcbbf;
  --line-dark: #9e9a8f;
  --wood: #875a37;
  --proof: #8a5d10;
  --handoff: #225f78;
  --handoff-dark: #174a5f;
  --focus: #e1ac47;
  --white: #ffffff;
  --space-1: 0.375rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4.5rem;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #e9e6dc;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 0;
  font: inherit;
}

button:not(:disabled) {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: var(--space-2);
  left: var(--space-2);
  padding: var(--space-2) var(--space-3);
  color: var(--white);
  background: var(--forest-dark);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  min-height: 76px;
  padding: 0 clamp(1rem, 3vw, 2.25rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--forest);
  font: 700 0.72rem/1 var(--mono);
  letter-spacing: 0.08em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: var(--forest);
  font-size: 0.95rem;
}

.brand small {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.demo-stamp,
.technical-label,
.eyebrow,
.rail-label,
.stage-count,
.stage-status,
.proof-state {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.demo-stamp {
  color: var(--wood);
}

.text-button {
  padding: 0 0.25rem;
  color: var(--forest);
  background: transparent;
  border-bottom: 1px solid currentColor;
  font-size: 0.82rem;
  font-weight: 700;
}

.booth-exit {
  display: none;
}

.journey-shell {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: 76px minmax(0, 1.45fr) minmax(340px, 0.78fr);
  grid-template-rows: minmax(620px, 1fr) 92px;
  background: var(--paper);
}

.stage-rail {
  grid-row: 1;
  padding: var(--space-4) 0.7rem;
  border-right: 1px solid var(--line);
}

.rail-label {
  margin: 0 0 var(--space-3);
  color: var(--wood);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.stage-rail ol,
.stage-strip ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.stage-rail ol {
  display: grid;
  gap: 0.45rem;
}

.stage-rail button {
  width: 48px;
  min-height: 48px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  font: 700 0.72rem/1 var(--mono);
}

.stage-rail button:hover {
  border-color: var(--line-dark);
}

.stage-rail button[aria-current="step"] {
  color: var(--white);
  background: var(--forest);
}

.material-story {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(360px, 1fr) auto;
}

.photo-placeholder {
  position: relative;
  min-height: 360px;
  margin: 0;
  padding: clamp(1.5rem, 4vw, 3.25rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--white);
  background:
    linear-gradient(120deg, rgba(11, 43, 35, 0.94), rgba(45, 66, 52, 0.76)),
    repeating-linear-gradient(7deg, transparent 0 42px, rgba(255,255,255,0.05) 42px 43px),
    #3b493e;
}

.photo-placeholder::after {
  content: "Real operation photo slot";
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font: 700 0.64rem/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.photo-meta {
  position: relative;
  z-index: 1;
  max-width: 31rem;
  margin-top: auto;
}

.photo-meta .technical-label {
  color: #e5c583;
}

.photo-meta strong,
.photo-meta span:last-child {
  display: block;
}

.photo-meta strong {
  margin: 0.6rem 0 0.45rem;
  font-size: clamp(1.45rem, 2.7vw, 2.75rem);
  line-height: 1.02;
  text-wrap: balance;
}

.photo-meta span:last-child {
  max-width: 46ch;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}

.photo-placeholder figcaption {
  position: absolute;
  left: 1.5rem;
  top: 1.5rem;
  color: rgba(255, 255, 255, 0.62);
  font: 0.68rem/1.4 var(--mono);
}

.story-copy {
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.5rem, 4vw, 3.25rem);
  border-top: 1px solid var(--line);
}

.eyebrow {
  margin: 0;
  color: var(--wood);
}

.story-copy h1,
.section-intro h2,
.fit-panel h2,
.boundary-section h2 {
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.story-copy h1 {
  max-width: 17ch;
  margin: 0.65rem 0 0.85rem;
  color: var(--forest);
  font-size: clamp(2.25rem, 4vw, 4.5rem);
  line-height: 0.98;
}

.lede {
  max-width: 60ch;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.stage-detail {
  min-width: 0;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: var(--paper-strong);
}

.mode-switch {
  align-self: flex-start;
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  border: 1px solid var(--line-dark);
}

.mode-switch button {
  padding: 0.65rem 0.8rem;
  color: var(--muted);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 700;
}

.mode-switch button + button {
  border-left: 1px solid var(--line-dark);
}

.mode-switch button[aria-pressed="true"] {
  color: var(--white);
  background: var(--handoff);
}

.stage-heading {
  margin-top: clamp(1.75rem, 4vw, 3.75rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.stage-count {
  color: var(--handoff);
}

.stage-status {
  color: var(--muted);
}

.stage-detail > h2 {
  margin: 0.7rem 0 0.8rem;
  color: var(--forest);
  font-size: clamp(2.2rem, 3.3vw, 3.7rem);
  line-height: 0.98;
}

.stage-summary {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.mode-content {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 3px solid var(--handoff);
}

.mode-content > p {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
}

.follow-up {
  margin-top: var(--space-3) !important;
  color: var(--muted) !important;
  font-size: 0.84rem;
}

.role-ledger {
  display: grid;
  gap: var(--space-3);
}

.role-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--line);
}

.role-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.role-row strong {
  color: var(--handoff-dark);
  font-size: 0.75rem;
}

.role-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.proof-drawer {
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}

.proof-drawer .technical-label {
  color: var(--proof);
}

.proof-drawer h3 {
  margin: 0.55rem 0 0.4rem;
  font-size: 1rem;
}

.proof-drawer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.proof-state {
  display: inline-block;
  margin-top: var(--space-2);
  padding: 0.35rem 0.45rem;
  color: #533500;
  background: #f4e2b9;
  border: 1px solid #d2ad5e;
}

.stage-controls {
  margin-top: var(--space-4);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: var(--space-2);
}

.primary-button,
.secondary-button,
.icon-button {
  min-height: 48px;
  padding: 0.7rem 1rem;
  font-size: 0.82rem;
  font-weight: 800;
}

.primary-button {
  color: var(--white);
  background: var(--forest);
}

.primary-button:hover:not(:disabled) {
  background: var(--forest-dark);
}

.secondary-button,
.icon-button {
  color: var(--forest);
  background: transparent;
  border: 1px solid var(--line-dark);
}

button:disabled {
  color: #6f706b;
  background: #e5e1d7;
  border: 1px solid var(--line-dark);
  cursor: not-allowed;
  opacity: 1;
}

.stage-strip {
  grid-column: 1 / -1;
  grid-row: 2;
  border-top: 1px solid var(--line);
}

.stage-strip ol {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.stage-strip li {
  min-width: 0;
  border-right: 1px solid var(--line);
}

.stage-strip li:last-child {
  border-right: 0;
}

.stage-strip button {
  width: 100%;
  height: 100%;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.stage-strip button[aria-current="step"] {
  color: var(--white);
  background: var(--handoff);
}

.stage-strip strong {
  display: block;
  font-size: 0.76rem;
}

.stage-strip span {
  margin-top: 0.22rem;
  font: 0.62rem/1 var(--mono);
  opacity: 0.76;
}

.system-section,
.qualification-section,
.boundary-section {
  padding: clamp(4rem, 8vw, 7rem) clamp(1.25rem, 6vw, 6rem);
}

.system-section {
  background: var(--forest);
  color: var(--white);
}

.section-intro {
  max-width: 74rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  column-gap: clamp(2rem, 6vw, 6rem);
}

.section-intro .eyebrow {
  grid-column: 1 / -1;
  color: #e5c583;
}

.section-intro h2 {
  margin: 0.8rem 0 0;
  font-size: clamp(2.2rem, 5vw, 5.3rem);
  line-height: 0.98;
}

.section-intro > p:last-child {
  align-self: end;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
}

.responsibility-ledger {
  max-width: 74rem;
  margin: clamp(3rem, 7vw, 6rem) auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.responsibility-ledger article {
  padding: clamp(1.5rem, 4vw, 3.5rem);
}

.responsibility-ledger article + article {
  border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.responsibility-ledger .technical-label {
  color: #e5c583;
}

.responsibility-ledger h3 {
  margin: 0.75rem 0 1.5rem;
  font-size: clamp(1.5rem, 3vw, 2.6rem);
}

.responsibility-ledger ul,
.fit-checklist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.responsibility-ledger li {
  padding: 0.85rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.4;
}

.distributor-column {
  background: var(--handoff-dark);
}

.qualification-section {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: clamp(2rem, 6vw, 6rem);
  background: var(--paper);
}

.fit-panel h2,
.boundary-section h2 {
  margin: 0.75rem 0 1rem;
  color: var(--forest);
  font-size: clamp(2.2rem, 5vw, 5rem);
  line-height: 0.98;
}

.fit-lede {
  color: var(--muted);
}

.fit-checklist {
  margin-top: var(--space-5);
  border-top: 1px solid var(--line-dark);
}

.fit-checklist li {
  min-height: 64px;
  padding: 1rem 0;
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  line-height: 1.4;
}

.fit-checklist span {
  color: var(--handoff);
  font: 700 0.72rem/1 var(--mono);
}

.connection-panel {
  align-self: start;
  padding: clamp(1.5rem, 4vw, 3rem);
  color: var(--white);
  background: var(--forest);
}

.connection-panel .technical-label {
  color: #e5c583;
}

.connection-panel h3 {
  margin: 1rem 0;
  font-size: clamp(1.6rem, 3vw, 2.7rem);
  line-height: 1.05;
  text-wrap: balance;
}

.connection-panel > p {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
}

.connection-actions {
  margin-top: var(--space-5);
  display: grid;
  gap: var(--space-2);
}

.connection-panel .connection-note {
  margin: var(--space-4) 0 0;
  color: rgba(255, 255, 255, 0.62);
  font: 0.68rem/1.5 var(--mono);
}

.boundary-section {
  background: #e6e1d6;
}

.boundary-section > .eyebrow,
.boundary-section > h2,
.boundary-grid {
  max-width: 74rem;
  margin-left: auto;
  margin-right: auto;
}

.boundary-grid {
  margin-top: clamp(2rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-dark);
  border-left: 1px solid var(--line-dark);
}

.boundary-grid article {
  min-height: 220px;
  padding: var(--space-4);
  border-right: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.boundary-grid strong {
  color: var(--forest);
  font-size: 1.1rem;
}

.boundary-grid p {
  color: var(--muted);
  line-height: 1.5;
}

.site-footer {
  padding: var(--space-4) clamp(1.25rem, 6vw, 6rem);
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  color: rgba(255, 255, 255, 0.72);
  background: var(--forest-dark);
  font: 0.68rem/1.45 var(--mono);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.booth-mode {
  overflow: hidden;
}

.booth-mode .site-header {
  height: 64px;
  min-height: 64px;
}

.booth-mode .booth-enter,
.booth-mode main > section:not(.journey-shell),
.booth-mode .site-footer {
  display: none;
}

.booth-mode .booth-exit {
  display: inline;
}

.booth-mode .journey-shell {
  height: calc(100vh - 64px);
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) 84px;
}

.booth-mode .photo-placeholder {
  min-height: 0;
}

.booth-mode .story-copy {
  padding-top: 1.4rem;
  padding-bottom: 1.4rem;
}

.booth-mode .story-copy h1 {
  font-size: clamp(2rem, 3.4vw, 3.8rem);
}

@media (max-width: 1040px) {
  .journey-shell {
    grid-template-columns: 68px minmax(0, 1.15fr) minmax(320px, 0.85fr);
  }

  .photo-placeholder::after,
  .photo-placeholder figcaption {
    display: none;
  }

  .boundary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  .site-header {
    min-height: 68px;
  }

  .brand-mark,
  .demo-stamp {
    display: none;
  }

  .journey-shell {
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .stage-rail {
    display: none;
  }

  .material-story {
    display: contents;
  }

  .photo-placeholder {
    min-height: 260px;
    order: 1;
  }

  .story-copy {
    order: 2;
  }

  .stage-detail {
    order: 3;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .stage-strip {
    order: 4;
    grid-column: auto;
    grid-row: auto;
    overflow-x: visible;
    border-bottom: 1px solid var(--line);
  }

  .stage-strip ol {
    width: 100%;
    height: 76px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .stage-strip button {
    padding: 0.5rem 0.15rem;
    align-items: center;
    text-align: center;
  }

  .stage-strip strong {
    font-size: clamp(0.5rem, 1.45vw, 0.68rem);
  }

  .stage-strip span {
    font-size: 0.54rem;
  }

  .stage-heading {
    margin-top: var(--space-5);
  }

  .proof-drawer {
    margin-top: var(--space-5);
  }

  .section-intro,
  .qualification-section {
    grid-template-columns: 1fr;
  }

  .section-intro > p:last-child {
    margin-top: var(--space-4);
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 0 1rem;
  }

  .brand strong {
    font-size: 0.78rem;
  }

  .brand small {
    font-size: 0.65rem;
  }

  .text-button {
    font-size: 0.74rem;
  }

  .photo-placeholder {
    min-height: 225px;
    padding: 1.25rem;
  }

  .story-copy,
  .stage-detail {
    padding: 1.25rem;
  }

  .story-copy h1 {
    font-size: 2.55rem;
  }

  .lede {
    font-size: 0.92rem;
  }

  .mode-switch {
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .mode-switch button {
    padding-left: 0.4rem;
    padding-right: 0.4rem;
    font-size: 0.72rem;
  }

  .stage-controls {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .stage-controls .primary-button {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .role-row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .responsibility-ledger {
    grid-template-columns: 1fr;
  }

  .responsibility-ledger article + article {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-left: 0;
  }

  .qualification-section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .boundary-grid {
    grid-template-columns: 1fr;
  }

  .boundary-grid article {
    min-height: 0;
  }

  .site-footer {
    flex-direction: column;
  }

  .booth-mode {
    overflow: auto;
  }

  .booth-mode .journey-shell {
    height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
