:root {
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: #6e7378;
  color: #fff;
  font-family: "Roboto Condensed", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.35;
}

body { min-height: 100vh; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.wrap {
  width: min(72rem, calc(100% - 2rem));
  margin: 0 auto;
}

header, footer { border-color: #1a2026; }
header { border-bottom: 1px solid #1a2026; }
footer { border-top: 1px solid #1a2026; }

.bar, .foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0;
}

.foot { font-size: 0.875rem; font-weight: 500; }

.brand-plate {
  letter-spacing: 0.06em;
  background: linear-gradient(#f4f4f4, #d5d8db);
  border: 1px solid #2a3036;
  border-radius: 2px;
  padding: 2px 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #14181c;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

nav a { text-decoration: none; padding: 0 0.35rem; }

.section-title {
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0;
}

h1.section-title { font-size: clamp(1.5rem, 3vw, 1.875rem); }

.lead { max-width: 42rem; font-weight: 500; }
.tight { font-size: 0.875rem; }

.hero-row, .copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.pad { padding: 1.5rem 0; }
.pad-lg { padding: 2rem 0; }

.cards, .steps, .report {
  display: grid;
  gap: 0.5rem;
}

.steps { gap: 1rem; }
.report { gap: 1.5rem; }

@media (min-width: 640px) {
  .cards { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .cards { grid-template-columns: 1fr 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr 1fr; }
}

@media (min-width: 1024px) {
  .report { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: start; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.15rem;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #1a2126;
  color: #f7f8f8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 1px #0000008c;
  text-decoration: none;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.05;
  cursor: pointer;
  background-color: #3a444c;
  background-image: linear-gradient(#8b969e 0%, #66727a 12%, #4a565e 42%, #3a444c 78%, #2c343b 100%);
  box-shadow: inset 0 1px #ffffff6b, inset 0 -1px #00000059, 0 2px #15191c, 0 3px 5px #00000061;
}

.btn:hover:not(:disabled) {
  background-image: linear-gradient(#8aa1aa 0%, #647680 14%, #4c6169 40%, #3e5058 72%, #314248 100%);
}

.btn:disabled { opacity: 0.45; cursor: default; }

.shop-panel {
  background: #e9eaec;
  border: 1px solid #2a2e32;
  border-radius: 2px;
  color: #14181c;
  padding: 1.25rem;
  box-shadow: inset 0 1px #ffffffb3, inset 0 0 0 1px #ffffff40, 0 1px 2px #00000059;
}

.stack { display: grid; gap: 1rem; }
.stack + .stack, .split { margin-top: 1.25rem; }
.split { padding-top: 1.5rem; border-top: 1px solid #2a2e32; }

label { display: grid; gap: 0.4rem; font-size: 0.875rem; }

input, select, textarea {
  width: 100%;
  min-height: 2.5rem;
  border-radius: 3px;
  border: 1px solid #9aa1a8;
  background: #fff;
  color: #14181c;
  padding: 0.45rem 0.6rem;
  font: inherit;
  font-weight: 500;
  box-shadow: inset 0 1px 2px #00000029;
}

textarea { min-height: 8rem; resize: vertical; }

.pair { display: grid; gap: 1rem; }
@media (min-width: 640px) { .pair { grid-template-columns: 1fr 1fr; } }

.steps-row {
  display: grid;
  gap: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}
@media (min-width: 640px) { .steps-row { grid-template-columns: 1fr 1fr 1fr; } }
.steps-row .on { font-weight: 700; }

.dim { color: #3c444c; font-size: 0.875rem; margin: 0; }
.ok { color: #0c7a28; font-size: 0.875rem; margin: 0; font-weight: 600; }
.alert { color: #8d1a1a; font-size: 0.875rem; margin: 0; }
.alert:empty { display: none; }

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

.beta-card {
  max-width: 36rem;
  color: #fff;
  background: #6e7378;
  border: 1px solid #1a2026;
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 16px 40px #00000073;
}

.group-label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.kicker { display: flex; align-items: center; gap: 0.5rem; }

.preview-hmi { color: #14181c; min-width: 0; }
.preview-hmi .group-label { color: #1c2126; }

.preview-tabs, .preview-gc-tabs {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  padding: 0 2px;
}

.preview-tab, .preview-gc-tab {
  color: #1a1e22;
  white-space: nowrap;
  background: linear-gradient(#b7bcc1, #8f959b);
  border: 1px solid #5e656c;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  padding: 4px 14px 5px;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: inset 0 1px #ffffff73;
}

.preview-tab.on, .preview-gc-tab.on {
  background: linear-gradient(#fff, #f0f1f2);
  border-color: #8d9398;
}

.preview-gc-tab {
  background: linear-gradient(#d7dbdf, #b7bcc1);
  border-color: #8d9398;
  font-size: 0.82rem;
  padding: 3px 12px 4px;
}

.preview-stage { display: grid; gap: 6px; min-width: 0; }
@media (min-width: 800px) {
  .preview-stage { grid-template-columns: minmax(220px, 0.86fr) minmax(240px, 1.25fr); }
}

.preview-code, .preview-path {
  background: #e9eaec;
  border: 1px solid #2a2e32;
  display: flex;
  flex-direction: column;
  min-height: 168px;
  max-height: 210px;
  min-width: 0;
  box-shadow: inset 0 1px #ffffffb3, inset 0 0 0 1px #ffffff40, 0 1px 2px #00000059;
}

.preview-path {
  background: #071018;
  position: relative;
  overflow: hidden;
}

.preview-path svg { width: 100%; height: 100%; min-height: 168px; }

@media (max-width: 799px) {
  .preview-code, .preview-path, .preview-path svg {
    min-height: 104px;
    max-height: 112px;
  }
}

.preview-gc-bar {
  background: linear-gradient(#f3f4f5, #e2e4e6);
  border-bottom: 1px solid #c5c8cc;
  padding: 3px 4px;
}

.preview-gc-bar span {
  display: inline-block;
  background: #fff;
  border: 1px solid #9aa1a8;
  padding: 2px 6px;
  font-size: 0.82rem;
  font-weight: 700;
}

.preview-lines {
  background: #fff;
  color: #14181c;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.28;
  overflow: auto;
  flex: 1;
}

.preview-line { padding: 0 8px; white-space: pre; }
.preview-line.cur { color: #10210f; background: #3dce4a; }

.preview-readout {
  position: absolute;
  top: 8px;
  right: 8px;
  color: #f2f2f2;
  text-align: right;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.35;
  text-shadow: 0 1px 2px #000;
}

.preview-groups {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

@media (min-width: 900px) {
  .preview-groups { grid-template-columns: 1.15fr 0.9fr 0.85fr; }
}

.preview-group {
  background: #00000024;
  border: 1px solid #1a2026;
  border-radius: 8px;
  padding: 6px 8px 8px;
  box-shadow: inset 0 1px #ffffff29;
  min-width: 0;
}

.feature p, .step p { margin: 0.35rem 0 0; font-size: 0.875rem; font-weight: 500; }
.step h3 { margin: 0.25rem 0 0; font-size: 1.125rem; }

.pos-row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
}

.axis-key, .mini-key, .cycle-key {
  color: #f7f8f8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 1px #0000008c;
  background-image: linear-gradient(#8b969e 0%, #66727a 12%, #4a565e 42%, #3a444c 78%, #2c343b 100%);
  border: 1px solid #1a2126;
  border-radius: 6px;
  box-shadow: inset 0 1px #ffffff6b, inset 0 -1px #00000059, 0 2px #15191c;
  font-weight: 600;
}

.axis-key {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.dro-lcd {
  color: #111;
  text-align: right;
  font-variant-numeric: tabular-nums;
  background: #fff;
  border: 1px solid #1a1e22;
  height: 2rem;
  padding: 0 8px;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.9rem;
  box-shadow: inset 0 1px 3px #00000047;
}

.dtg {
  color: #2a3138;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  font-weight: 500;
  min-width: 3.2rem;
  text-align: right;
}

.cycle-row { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }

.cycle-key {
  min-height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
}

.cycle-key.wide {
  grid-column: 1 / -1;
  min-height: 2.7rem;
  letter-spacing: 0.16em;
}

.led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #111;
  background: radial-gradient(circle at 35% 35%, #6a6e72, #1a1c1e 70%);
  box-shadow: inset 0 1px 2px #000000d9;
  display: inline-block;
}

.led.on {
  background: radial-gradient(circle at 35% 35%, #f4fff4, #3dff57 45%, #0c8a28);
  box-shadow: 0 0 6px #3dff57;
}

.status-line {
  margin: 6px 0 0;
  color: #6a3e00;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sim-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.chip-sim {
  letter-spacing: 0.08em;
  color: #1b1404;
  background: #f0b000;
  border: 1px solid #222;
  border-radius: 3px;
  padding: 3px 6px;
  font-size: 0.72rem;
  font-weight: 800;
}

.mini-key { min-height: 2rem; padding: 4px 8px; font-size: 0.75rem; }

.caption { margin: 0.5rem 0 0; font-size: 0.875rem; font-weight: 500; color: #fff; }
