:root {
  color-scheme: light;
  --paper: #f4f1eb;
  --paper-2: #fffaf2;
  --ink: #18202b;
  --muted: #5d6775;
  --line: #d8d2c7;
  --panel: #ffffff;
  --dark: #161c25;
  --dark-2: #232b36;
  --green: #2e7d57;
  --green-soft: #dce9df;
  --blue: #1f6fbf;
  --orange: #e06f25;
  --yellow: #f4c95d;
  --shadow: 0 18px 46px rgba(37, 42, 52, 0.13);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

code,
pre {
  font-family: var(--mono);
}

code {
  padding: 0.1rem 0.32rem;
  border: 1px solid rgba(24, 32, 43, 0.12);
  border-radius: 4px;
  background: rgba(24, 32, 43, 0.06);
  font-size: 0.92em;
}

pre {
  margin: 0;
  overflow-x: auto;
  white-space: pre;
}

pre code {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 0.88rem;
}

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(24, 32, 43, 0.08);
  background: rgba(244, 241, 235, 0.91);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 8px);
  gap: 3px;
  width: 26px;
  height: 26px;
  place-content: center;
  border-radius: 6px;
  background: var(--dark);
}

.brand-mark span {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--yellow);
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.site-nav a,
.header-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.site-nav a {
  padding: 0 12px;
}

.site-nav a:hover,
.header-link:hover {
  color: var(--ink);
  background: rgba(24, 32, 43, 0.06);
}

.header-link {
  padding: 0 14px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.45);
}

.hero-band {
  min-height: calc(88svh - 68px);
  padding: 42px 0 64px;
  background:
    linear-gradient(180deg, rgba(244, 241, 235, 0.98), rgba(255, 250, 242, 0.96)),
    repeating-linear-gradient(90deg, rgba(24, 32, 43, 0.045) 0 1px, transparent 1px 72px);
}

.hero-inner,
.section-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  align-items: center;
  gap: 44px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--orange);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  color: var(--ink);
  font-size: 5.2rem;
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 18px;
  font-size: 2.2rem;
  line-height: 1.16;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.hero-text {
  max-width: 620px;
  margin-bottom: 26px;
  color: #384252;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  max-width: 100%;
  border-radius: 8px;
  padding: 0 20px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.primary-action {
  background: var(--dark);
  color: #ffffff;
}

.secondary-action {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
}

.fact-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 620px;
  margin: 0;
}

.fact-row div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
}

.fact-row dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.fact-row dd {
  margin: 4px 0 0;
  font-weight: 900;
  overflow-wrap: break-word;
}

.hero-visual {
  margin: 0;
}

.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.section-band {
  padding: 78px 0;
  background: var(--paper-2);
}

.section-light {
  background: #ffffff;
}

.section-green {
  background: var(--green-soft);
}

.section-dark {
  background: var(--dark);
  color: #f7f9fc;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 30px;
}

.section-heading p,
.split-layout > div > p,
.feature-card p,
.step-list p,
.panic-note {
  color: var(--muted);
}

.section-dark .section-heading p,
.section-dark .panic-note {
  color: #b8c2d0;
}

.compact {
  margin-bottom: 24px;
}

.section-dark .section-heading a {
  color: var(--yellow);
  font-weight: 900;
}

.use-paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.use-path {
  padding: 18px;
  border: 1px solid #384251;
  border-radius: 8px;
  background: var(--dark-2);
}

.use-path h3 {
  color: #ffffff;
}

.use-path p {
  color: #b8c2d0;
}

.use-path pre {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid #384251;
  border-radius: 8px;
  background: #0b1018;
  color: #f4c95d;
}

.path-kicker {
  margin-bottom: 8px;
  color: var(--yellow);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.path-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #4a5566;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 900;
}

.path-link:hover {
  border-color: var(--yellow);
}

.local-runner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 14px;
  margin-top: 16px;
  align-items: stretch;
}

.runner-main {
  padding: 18px;
  border: 1px solid #384251;
  border-radius: 8px;
  background: var(--dark-2);
}

.runner-main h3 {
  color: #ffffff;
}

.runner-main p {
  color: #b8c2d0;
}

.runner-label {
  display: block;
  margin-bottom: 6px;
  color: #b8c2d0;
  font-size: 0.82rem;
  font-weight: 900;
}

.runner-input {
  width: 100%;
  min-height: 42px;
  margin-bottom: 12px;
  padding: 0 12px;
  border: 1px solid #4a5566;
  border-radius: 8px;
  background: #111720;
  color: #ffffff;
  font: 0.88rem var(--mono);
}

.runner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.runner-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #4a5566;
  border-radius: 8px;
  background: #111720;
  color: #ffffff;
  cursor: pointer;
  font-weight: 900;
}

.runner-button:hover {
  border-color: var(--yellow);
}

.runner-danger {
  border-color: rgba(224, 111, 37, 0.7);
  color: #ffd6bf;
}

.runner-output {
  min-height: 290px;
  padding: 16px;
  border: 1px solid #384251;
  border-radius: 8px;
  background: #0b1018;
  color: #d9e0ea;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(360px, 1.14fr);
  gap: 44px;
  align-items: start;
}

.command-stack {
  display: grid;
  gap: 12px;
}

.command-card,
.feature-card,
.trouble-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.command-card {
  overflow: hidden;
}

.command-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.command-head h3 {
  margin: 0;
}

.copy-button {
  flex: 0 0 auto;
  min-width: 68px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f1e7;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.command-card pre {
  padding: 16px;
  background: #1b222d;
  color: #f8fafc;
}

.mode-workbench {
  display: grid;
  gap: 16px;
}

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

.mode-tab {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.mode-tab span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.mode-tab.active {
  border-color: var(--dark);
  background: var(--dark);
  color: #ffffff;
}

.mode-tab.active span {
  color: #d9e0ea;
}

.mode-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 0.38fr);
  gap: 18px;
  align-items: stretch;
}

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

.pad-key {
  position: relative;
  display: flex;
  min-height: 104px;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 14px 12px;
  border: 1px solid #313946;
  border-radius: 8px;
  background: #1b222d;
  color: #ffffff;
  text-align: center;
}

.pad-key .phys {
  position: absolute;
  top: 8px;
  left: 10px;
  color: #97a4b5;
  font-size: 0.78rem;
  font-weight: 900;
}

.pad-key strong {
  font-size: 1.1rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.pad-key .value {
  color: #f4c95d;
  font-family: var(--mono);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.mode-notes {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.mode-notes p {
  color: var(--muted);
}

.mode-notes dl {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
}

.mode-notes dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 38px;
  border-bottom: 1px solid var(--line);
}

.mode-notes dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.mode-notes dd {
  margin: 0;
  font-family: var(--mono);
  font-weight: 900;
  text-align: right;
}

.feature-grid,
.trouble-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature-card {
  padding: 20px;
}

.feature-card h3 {
  color: #163826;
}

.feature-card p {
  margin-bottom: 0;
}

.step-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: edit-step;
}

.step-list li {
  position: relative;
  min-height: 118px;
  padding: 18px 18px 18px 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  counter-increment: edit-step;
}

.step-list li::before {
  content: counter(edit-step);
  position: absolute;
  top: 18px;
  left: 18px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--green);
  color: #ffffff;
  font-weight: 900;
}

.step-list span {
  display: block;
  margin-bottom: 6px;
  font-weight: 900;
}

.step-list p {
  margin-bottom: 0;
}

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

.trouble-item {
  border-color: #384251;
  background: var(--dark-2);
  overflow: hidden;
}

.trouble-item h3 {
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid #384251;
}

.trouble-item pre {
  padding: 16px;
  color: #f4c95d;
}

.panic-note {
  margin: 18px 0 0;
}

.section-dark code {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.site-footer {
  padding: 26px 0;
  background: #ffffff;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  color: var(--ink);
  font-weight: 900;
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .site-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .hero-inner,
  .split-layout,
  .mode-panel {
    grid-template-columns: 1fr;
  }

  .use-paths,
  .local-runner {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    gap: 30px;
  }

  h1 {
    font-size: 4rem;
  }

  h2 {
    font-size: 1.8rem;
  }

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

@media (max-width: 640px) {
  .site-header {
    padding: 0 16px;
  }

  .brand {
    font-size: 0.96rem;
  }

  .header-link {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.84rem;
  }

  .hero-band {
    min-height: auto;
    padding: 32px 0 52px;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 1.55rem;
  }

  .hero-text {
    font-size: 1rem;
  }

  .fact-row,
  .trouble-grid {
    grid-template-columns: 1fr;
  }

  .fact-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fact-row div {
    padding: 10px 8px;
  }

  .fact-row dt {
    font-size: 0.68rem;
  }

  .fact-row dd {
    font-size: 0.82rem;
  }

  .section-band {
    padding: 56px 0;
  }

  .pad-grid {
    gap: 8px;
  }

  .pad-key {
    min-height: 86px;
    padding: 18px 8px 10px;
  }

  .pad-key strong {
    font-size: 0.95rem;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
