:root {
  --oled: #b8ffc9;
  --oled-dim: #52d66f;
  --manual-content: min(1480px, calc(100vw - 40px));
}

.manual-page {
  background: #0b0f0e;
}

.manual-header .brand {
  min-width: 148px;
}

.manual-hero {
  min-height: min(820px, 92svh);
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  align-items: center;
  gap: clamp(32px, 7vw, 110px);
  padding: calc(var(--header-height) + 44px) max(20px, calc((100vw - 1480px) / 2)) 60px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(7, 11, 10, 0.08), rgba(7, 11, 10, 0.76)),
    linear-gradient(180deg, #121816, #090d0c);
}

.manual-hero-product {
  width: min(680px, 100%);
  justify-self: center;
  filter: drop-shadow(0 36px 80px rgba(0, 0, 0, 0.54));
}

.manual-hero-copy {
  max-width: 720px;
}

.manual-hero h1 {
  max-width: 780px;
  margin-bottom: 28px;
  font-size: clamp(48px, 6vw, 92px);
  line-height: 0.98;
}

.manual-hero-copy > p:not(.eyebrow) {
  max-width: 660px;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.65;
}

.simulator-section {
  padding: clamp(72px, 8vw, 120px) max(20px, calc((100vw - 1480px) / 2));
  background: #eef0ec;
  color: #111714;
}

.simulator-heading {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 0.65fr);
  gap: 40px;
  align-items: end;
  margin-bottom: 44px;
}

.simulator-heading .eyebrow {
  color: #087c5b;
}

.simulator-heading h2 {
  max-width: 820px;
  margin-bottom: 0;
}

.simulator-heading > p {
  max-width: 560px;
  margin: 0 0 8px auto;
  color: #55615b;
  font-size: 17px;
  line-height: 1.6;
}

.simulator-workspace {
  display: grid;
  grid-template-columns: minmax(520px, 1.2fr) minmax(330px, 0.8fr);
  min-height: 760px;
  border-top: 1px solid rgba(17, 23, 20, 0.16);
  border-bottom: 1px solid rgba(17, 23, 20, 0.16);
}

.simulator-table {
  position: relative;
  min-height: 760px;
  display: grid;
  place-items: center;
  padding: clamp(28px, 4vw, 70px);
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.08), transparent 24%),
    repeating-linear-gradient(4deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 5px),
    #171c1a;
  perspective: 1400px;
}

.simulator-table::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 5%;
  height: 13%;
  background: rgba(0, 0, 0, 0.42);
  filter: blur(30px);
  border-radius: 50%;
  transform: rotate(-4deg);
}

.training-badge {
  position: absolute;
  top: 22px;
  left: 26px;
  z-index: 3;
  color: #8b9891;
  font: 700 11px/1 "JetBrains Mono", Consolas, monospace;
}

.controller {
  width: min(560px, 92%);
  position: relative;
  z-index: 2;
  padding: 34px 42px 38px;
  border: 1px solid #303734;
  border-radius: 36px 36px 48px 48px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 22%),
    linear-gradient(160deg, #282d2b 0%, #151918 58%, #0d100f 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -10px 22px rgba(0, 0, 0, 0.42),
    0 42px 80px rgba(0, 0, 0, 0.52);
  transform: rotateX(4deg) rotateZ(-1.4deg);
  transform-origin: 50% 80%;
}

.controller::before {
  content: "";
  position: absolute;
  inset: 18px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 26px 26px 40px 40px;
}

.controller-top {
  position: relative;
  padding: 22px 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #0d100f;
  box-shadow: inset 0 4px 14px rgba(0, 0, 0, 0.8);
}

.controller-screen-frame {
  padding: 10px;
  background: #030605;
  border: 1px solid #343b37;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.9);
}

.oled-screen {
  width: 100%;
  aspect-ratio: 4 / 1;
  min-height: 112px;
  position: relative;
  container-type: inline-size;
  overflow: hidden;
  padding: 0;
  color: var(--oled);
  background:
    linear-gradient(rgba(7, 37, 17, 0.15), rgba(0, 13, 5, 0.2)),
    repeating-linear-gradient(0deg, rgba(184, 255, 201, 0.035) 0 1px, transparent 1px 3px),
    #001207;
  box-shadow:
    inset 0 0 24px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(65, 255, 102, 0.08);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 3.125cqw;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 0 5px rgba(139, 255, 159, 0.44);
}

.oled-item {
  position: absolute;
  display: inline-block;
  transform: scaleX(1.62);
  transform-origin: left top;
  overflow: hidden;
  white-space: pre;
  font-size: 3.125cqw;
  line-height: 1;
  letter-spacing: 0;
}

.oled-item.is-12px {
  font-size: 4.6875cqw;
}

.oled-item.is-16px {
  font-size: 6.25cqw;
}

.oled-rect {
  position: absolute;
  background: var(--oled);
  box-shadow: 0 0 4px rgba(139, 255, 159, 0.3);
}

.oled-item.is-selected {
  color: #001207;
  text-shadow: none;
}

.oled-item.is-notice {
  color: #fff0a5;
}

.controller-keybed {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: 78%;
  margin: 30px auto 10px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: #090c0b;
  box-shadow: inset 0 6px 18px rgba(0, 0, 0, 0.78);
}

.controller-keybed button {
  aspect-ratio: 1.16 / 1;
  min-width: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #303633;
  border-radius: 5px;
  background: linear-gradient(155deg, #282d2b, #101312 72%);
  color: #f4f2ec;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 5px 0 #050706,
    0 8px 14px rgba(0, 0, 0, 0.42);
  cursor: pointer;
  font: 600 clamp(19px, 2.1vw, 29px)/1 Inter, sans-serif;
  transition: transform 80ms ease, box-shadow 80ms ease, border-color 120ms ease;
}

.controller-keybed button:hover {
  border-color: #5d6862;
}

.controller-keybed button:active,
.controller-keybed button.is-pressed {
  transform: translateY(4px);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.7),
    0 1px 0 #050706;
}

.controller-keybed button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.controller-keybed .function-key {
  color: #9dffd5;
}

.controller-brand {
  margin-top: 22px;
  color: #7f8984;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
}

.controller-brand span {
  margin-left: 8px;
  color: #428a66;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 10px;
}

.guide-panel {
  min-width: 0;
  padding: clamp(34px, 5vw, 72px);
  background: #f8f9f6;
  border-left: 1px solid rgba(17, 23, 20, 0.16);
}

.guide-context {
  min-height: 18px;
  margin-bottom: 18px;
  color: #087c5b;
  font: 700 12px/1.4 "JetBrains Mono", Consolas, monospace;
  text-transform: uppercase;
}

.guide-panel h3 {
  margin-bottom: 18px;
  font-size: clamp(28px, 3vw, 46px);
  line-height: 1.05;
}

.guide-description {
  color: #46524c;
  font-size: 18px;
  line-height: 1.65;
}

.guide-facts {
  margin: 30px 0 0;
  border-top: 1px solid rgba(17, 23, 20, 0.16);
}

.guide-facts div {
  display: grid;
  grid-template-columns: minmax(100px, 0.36fr) 1fr;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(17, 23, 20, 0.16);
}

.guide-facts dt {
  color: #67726c;
  font-size: 13px;
  font-weight: 700;
}

.guide-facts dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.key-help {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.key-help span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(17, 23, 20, 0.18);
  color: #4e5a54;
  font-size: 12px;
  font-weight: 700;
}

.key-help kbd,
.key-legend kbd {
  font-family: "JetBrains Mono", Consolas, monospace;
}

.reset-simulator {
  min-height: 44px;
  margin-top: 28px;
  padding: 0 16px;
  border: 1px solid #111714;
  border-radius: 5px;
  background: transparent;
  color: #111714;
  cursor: pointer;
  font: 700 13px/1 Inter, sans-serif;
}

.reset-simulator:hover {
  background: #111714;
  color: #fff;
}

.quick-guide {
  display: grid;
  grid-template-columns: minmax(160px, 0.32fr) minmax(320px, 1fr);
  gap: clamp(30px, 7vw, 100px);
  padding: clamp(72px, 9vw, 128px) max(20px, calc((100vw - 1480px) / 2));
}

.quick-guide h2 {
  max-width: 900px;
}

.key-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 42px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.key-legend > div {
  min-height: 130px;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 18px;
  align-items: center;
  padding: 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.key-legend kbd {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(127, 240, 202, 0.45);
  border-radius: 5px;
  color: var(--accent-strong);
  background: #111714;
  box-shadow: 0 4px 0 #050706;
  font-size: 20px;
}

.key-legend span {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.reference-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(460px, 1fr);
  gap: clamp(38px, 8vw, 120px);
  padding: clamp(72px, 9vw, 128px) max(20px, calc((100vw - 1480px) / 2));
  background: #f4f0e8;
  color: #111714;
}

.service-reference {
  background: #121816;
  color: var(--text);
}

.reference-heading {
  position: sticky;
  top: calc(var(--header-height) + 30px);
  align-self: start;
}

.reference-heading h2 {
  font-size: clamp(40px, 5vw, 70px);
}

.reference-heading > p:not(.eyebrow) {
  max-width: 460px;
  color: #536059;
  font-size: 17px;
  line-height: 1.65;
}

.service-reference .reference-heading > p:not(.eyebrow) {
  color: var(--muted);
}

.reference-section .eyebrow {
  color: #087c5b;
}

.service-reference .eyebrow {
  color: var(--accent-strong);
}

.reference-list {
  border-top: 1px solid rgba(17, 23, 20, 0.18);
}

.service-reference .reference-list {
  border-top-color: var(--line);
}

.reference-item {
  border-bottom: 1px solid rgba(17, 23, 20, 0.18);
}

.service-reference .reference-item {
  border-bottom-color: var(--line);
}

.reference-item summary {
  min-height: 72px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 24px;
  gap: 18px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.reference-item summary::-webkit-details-marker {
  display: none;
}

.reference-number {
  color: #087c5b;
  font: 700 12px/1 "JetBrains Mono", Consolas, monospace;
}

.service-reference .reference-number {
  color: var(--accent-strong);
}

.reference-label {
  min-width: 0;
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 700;
}

.reference-toggle {
  font-size: 26px;
  font-weight: 400;
  transition: transform 180ms ease;
}

.reference-item[open] .reference-toggle {
  transform: rotate(45deg);
}

.reference-body {
  padding: 0 42px 26px 66px;
}

.reference-body p {
  max-width: 760px;
  margin-bottom: 16px;
  color: #536059;
  font-size: 16px;
  line-height: 1.65;
}

.service-reference .reference-body p {
  color: var(--muted);
}

.reference-body button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid currentColor;
  border-radius: 4px;
  background: transparent;
  color: #087c5b;
  cursor: pointer;
  font: 700 12px/1 Inter, sans-serif;
}

.service-reference .reference-body button {
  color: var(--accent-strong);
}

.manual-safety {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 0.72fr);
  gap: clamp(34px, 8vw, 120px);
  align-items: end;
  padding: clamp(72px, 9vw, 128px) max(20px, calc((100vw - 1480px) / 2));
  background: #ebb04b;
  color: #17130c;
}

.manual-safety .eyebrow {
  color: #50380e;
}

.manual-safety h2 {
  margin-bottom: 0;
}

.manual-safety > p {
  margin: 0;
  font-size: 18px;
  line-height: 1.7;
}

@media (max-width: 1100px) {
  .manual-header {
    grid-template-columns: auto 1fr;
  }

  .manual-header .main-nav {
    display: none;
  }

  .manual-header .header-actions {
    grid-column: auto;
  }

  .manual-hero {
    grid-template-columns: 0.8fr 1fr;
  }

  .simulator-workspace {
    grid-template-columns: 1fr;
  }

  .guide-panel {
    border-top: 1px solid rgba(17, 23, 20, 0.16);
    border-left: 0;
  }

  .key-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .manual-header {
    min-height: 64px;
    padding: 12px 16px;
  }

  .manual-header .header-link {
    display: none;
  }

  .manual-header .header-actions {
    gap: 8px;
  }

  .manual-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 104px 20px 58px;
  }

  .manual-hero-product {
    order: 2;
    width: min(480px, 100%);
  }

  .manual-hero-copy {
    order: 1;
  }

  .manual-hero h1 {
    font-size: clamp(42px, 13vw, 62px);
  }

  .simulator-heading,
  .quick-guide,
  .reference-section,
  .manual-safety {
    grid-template-columns: 1fr;
  }

  .simulator-table {
    min-height: 610px;
    padding: 56px 12px 34px;
  }

  .controller {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 24px 24px 30px;
    border-radius: 26px 26px 34px 34px;
    transform: none;
  }

  .controller-top {
    padding: 13px 10px;
  }

  .oled-screen {
    min-height: 82px;
    padding: 0;
  }

  .controller-keybed {
    width: 86%;
    gap: 7px;
    margin-top: 24px;
    padding: 12px;
  }

  .controller-keybed button {
    font-size: clamp(18px, 6vw, 25px);
  }

  .guide-panel {
    padding: 34px 24px 42px;
  }

  .quick-guide,
  .reference-section,
  .manual-safety {
    padding-left: 20px;
    padding-right: 20px;
  }

  .key-legend {
    grid-template-columns: 1fr;
  }

  .key-legend > div {
    min-height: 96px;
  }

  .reference-heading {
    position: static;
  }

  .reference-body {
    padding-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .controller,
  .controller-keybed button,
  .reference-toggle {
    transition: none;
  }
}
