:root {
  color-scheme: light;
  --ink: #17201e;
  --muted: #60706b;
  --line: #d9e1de;
  --line-strong: #bcc9c4;
  --surface: #f2f6f4;
  --surface-strong: #e7efeb;
  --paper: #ffffff;
  --teal: #0a7667;
  --teal-dark: #07594e;
  --coral: #d76742;
  --coral-soft: #fff3ee;
  --max-width: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

.site-header,
main > section,
footer {
  padding-left: max(24px, calc((100vw - var(--max-width)) / 2));
  padding-right: max(24px, calc((100vw - var(--max-width)) / 2));
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  gap: 24px;
  box-shadow: 0 1px 0 rgba(23, 32, 30, 0.02);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
}

nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
}

nav a {
  position: relative;
  padding: 23px 0 21px;
  text-decoration: none;
  color: var(--muted);
  transition: color 150ms ease;
}

nav a::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--teal);
  content: "";
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 150ms ease, transform 150ms ease;
}

nav a:hover,
.text-link:hover {
  color: var(--teal);
}

nav a:hover::after,
nav a:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}

.lang-switch button {
  min-width: 42px;
  padding: 5px 8px;
  border: 0;
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  transition: background 150ms ease, color 150ms ease;
}

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

.lang-switch button.active {
  background: var(--teal);
  color: #fff;
}

.lang-switch button:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: -2px;
}

.hero {
  position: relative;
  min-height: clamp(520px, calc(100svh - 112px), 660px);
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.75fr);
  align-items: center;
  gap: clamp(44px, 9vw, 130px);
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  padding: 76px 0 70px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: 74px;
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: 46px;
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: 0;
}

.lede {
  max-width: 650px;
  margin-bottom: 0;
  color: #35423e;
  font-size: 20px;
  line-height: 1.55;
}

.zh {
  color: var(--muted);
  font-size: 16px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid var(--ink);
  border-radius: 5px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.button.primary {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.button.primary:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
}

.button.secondary:hover {
  border-color: var(--coral);
  color: var(--coral);
  transform: translateY(-1px);
}

.hero-signal {
  align-self: center;
  padding: 30px 28px 30px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--coral);
  border-radius: 4px;
  box-shadow: 12px 12px 0 var(--surface-strong);
}

.hero-signal span {
  display: block;
  margin-bottom: 12px;
  color: var(--coral);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
}

.hero-signal strong {
  display: block;
  font-size: 26px;
  line-height: 1.14;
}

.hero-signal p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.band {
  padding-top: 104px;
  padding-bottom: 104px;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 50px;
}

.section-note {
  max-width: 710px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.lifecycle {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.lifecycle article {
  position: relative;
  min-height: 265px;
  padding: 30px 32px 32px 0;
}

.lifecycle article + article {
  border-left: 1px solid var(--line);
  padding-left: 32px;
}

.lifecycle p,
.profile-list p,
.skill-list p,
.boundary > p {
  margin-bottom: 0;
  color: var(--muted);
}

.step {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  margin-bottom: 44px;
  background: var(--coral-soft);
  border: 1px solid #efc4b4;
  border-radius: 50%;
  color: var(--coral);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 750;
}

.split {
  background: var(--surface);
}

.gates {
  background: var(--ink);
  color: #f4f7f6;
  border-bottom-color: #40504b;
}

.gates .eyebrow,
.gate-number {
  color: #f08a65;
}

.gates .section-note,
.gate-list p {
  color: #b8c6c1;
}

.gate-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid #40504b;
}

.gate-list article {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 18px;
  min-height: 190px;
  padding: 28px 30px 28px 0;
  border-bottom: 1px solid #40504b;
  transition: background 160ms ease;
}

.gate-list article:nth-child(even) {
  padding-left: 30px;
  border-left: 1px solid #40504b;
}

.gate-list article:hover {
  background: #1c2926;
}

.gate-number {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 750;
}

.gate-list h3 {
  font-size: 20px;
}

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

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

.skill-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
  counter-reset: skill;
}

.skill-list div {
  position: relative;
  grid-column: span 2;
  min-height: 230px;
  padding: 54px 22px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--teal);
  border-radius: 4px;
  counter-increment: skill;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.skill-list div:nth-child(4),
.skill-list div:nth-child(5) {
  grid-column: span 3;
  min-height: 210px;
}

.skill-list div::before {
  position: absolute;
  top: 20px;
  left: 22px;
  color: var(--coral);
  content: "0" counter(skill);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 750;
}

.skill-list div:hover {
  border-color: var(--line-strong);
  box-shadow: 0 10px 24px rgba(23, 32, 30, 0.07);
  transform: translateY(-2px);
}

.profile-list div {
  min-height: 190px;
  padding: 24px 24px 26px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--teal);
  border-radius: 4px;
}

.install-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  gap: 64px;
  align-items: start;
}

.install-grid > p {
  color: var(--muted);
}

pre {
  overflow-x: auto;
  margin: 0;
  padding: 26px 28px;
  background: #17201e;
  border-left: 4px solid var(--coral);
  color: #e9f3ef;
  border-radius: 5px;
  box-shadow: 10px 10px 0 var(--surface-strong);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.text-link {
  display: inline-block;
  margin-top: 26px;
  color: var(--teal-dark);
  font-weight: 700;
}

.boundary > p {
  max-width: 800px;
  font-size: 19px;
}

.boundary {
  position: relative;
}

.boundary::before {
  display: block;
  width: 56px;
  height: 4px;
  margin-bottom: 36px;
  background: var(--coral);
  content: "";
}

footer {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
  border-top: 4px solid var(--ink);
}

footer a {
  color: var(--teal-dark);
  font-weight: 700;
}

@media (max-width: 1000px) {
  h1 {
    font-size: 62px;
  }

  h2 {
    font-size: 40px;
  }

  nav {
    gap: 14px;
  }

  nav a:nth-child(1),
  nav a:nth-child(2),
  nav a:nth-child(3),
  nav a:nth-child(4) {
    display: none;
  }
}

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

  nav {
    gap: 13px;
    font-size: 12px;
  }

  nav a:nth-child(1),
  nav a:nth-child(2),
  nav a:nth-child(3),
  nav a:nth-child(4) {
    display: none;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 0;
  }

  h1 {
    font-size: 50px;
  }

  h2 {
    font-size: 34px;
  }

  .hero-copy {
    padding: 64px 0 50px;
  }

  .hero-signal {
    margin-bottom: 58px;
    padding: 26px 22px 26px 24px;
    box-shadow: 8px 8px 0 var(--surface-strong);
  }

  .band {
    padding-top: 74px;
    padding-bottom: 74px;
  }

  .section-heading {
    margin-bottom: 32px;
  }

  .lifecycle,
  .gate-list,
  .profile-list,
  .skill-list,
  .install-grid {
    grid-template-columns: 1fr;
  }

  .lifecycle article {
    min-height: 0;
    padding: 26px 0;
  }

  .lifecycle article + article {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
  }

  .step {
    margin-bottom: 28px;
  }

  .gate-list article,
  .gate-list article:nth-child(even) {
    min-height: 0;
    padding: 26px 0;
    border-left: 0;
  }

  .profile-list,
  .skill-list {
    gap: 28px;
  }

  .skill-list div,
  .skill-list div:nth-child(4),
  .skill-list div:nth-child(5) {
    grid-column: auto;
    min-height: 0;
  }

  .profile-list div {
    min-height: 0;
  }

  .install-grid {
    gap: 26px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
