:root {
  color-scheme: light dark;
  --paper: #f4f5f2;
  --surface: #ffffff;
  --ink: #161917;
  --muted: #5d655f;
  --line: #d5dad6;
  --green: #176d58;
  --green-deep: #0d5141;
  --rust: #9b4938;
  --blue: #245f8f;
  --focus: #006bd6;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--green-deep);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  border-radius: 3px;
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  padding: 8px 12px;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--surface);
}

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

.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
}

.nav,
.wrap,
.footer-inner {
  width: min(calc(100% - 32px), var(--max));
  margin-inline: auto;
}

.nav {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 6px;
  font-size: 0.76rem;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.92rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
}

.nav-links a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}

.hero {
  min-height: min(620px, calc(100vh - 64px));
  padding-block: 72px 58px;
  display: grid;
  align-content: center;
}

.hero-copy {
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--rust);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

.hero h1,
.page-head h1 {
  margin: 0;
  font-size: 4.4rem;
  line-height: 1.04;
  letter-spacing: 0;
}

.hero .lede,
.page-head .lede {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
}

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

.button {
  min-height: 44px;
  padding: 9px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.button.primary {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.band {
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.section {
  padding-block: 64px;
}

.section-head {
  max-width: 760px;
  margin-bottom: 32px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.2;
}

.section-head p {
  margin: 10px 0 0;
  color: var(--muted);
}

.product-list {
  border-top: 1px solid var(--line);
}

.product-row {
  padding-block: 28px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.product-icon {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  box-shadow: 0 10px 28px rgb(22 25 23 / 14%);
}

.product-row h3 {
  margin: 0;
  font-size: 1.28rem;
}

.product-row p {
  max-width: 680px;
  margin: 6px 0 0;
  color: var(--muted);
}

.text-link {
  white-space: nowrap;
  font-weight: 700;
}

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

.principle {
  padding: 24px;
}

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

.principle h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.principle p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.page-head {
  padding-block: 64px 42px;
  border-bottom: 1px solid var(--line);
}

.page-head.with-icon {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: center;
  gap: 52px;
}

.page-icon {
  width: 180px;
  height: 180px;
  border-radius: 38px;
  box-shadow: 0 18px 44px rgb(22 25 23 / 16%);
}

.meta {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.language-nav {
  width: fit-content;
  margin-top: 24px;
  padding: 3px;
  display: flex;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.language-nav a {
  min-height: 38px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.language-nav a:hover {
  background: var(--paper);
  color: var(--ink);
}

.detail-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 760px);
  gap: 64px;
  padding-block: 48px 80px;
}

.toc {
  position: sticky;
  top: 24px;
  align-self: start;
}

.toc p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 800;
  text-transform: uppercase;
}

.toc a {
  padding-block: 5px;
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.article section + section {
  margin-top: 44px;
  padding-top: 44px;
  border-top: 1px solid var(--line);
}

.article h2 {
  margin: 0 0 16px;
  font-size: 1.48rem;
  line-height: 1.25;
}

.article h3 {
  margin: 28px 0 8px;
  font-size: 1.04rem;
}

.article p,
.article ul,
.article ol {
  margin-top: 0;
  margin-bottom: 16px;
}

.article li + li {
  margin-top: 8px;
}

.notice {
  margin: 24px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--green);
  background: var(--surface);
}

.notice p {
  margin: 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.step {
  padding: 24px;
}

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

.step span {
  color: var(--rust);
  font-size: 0.76rem;
  font-weight: 800;
}

.step h2 {
  margin: 8px 0 6px;
  font-size: 1.05rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.product-nav {
  padding-block: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  border-top: 1px solid var(--line);
}

.product-nav a {
  font-weight: 700;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-inner p {
  margin: 0;
}

@media (max-width: 760px) {
  .nav {
    padding-block: 12px;
    align-items: flex-start;
  }

  .nav-links {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .hero {
    min-height: auto;
    padding-block: 56px 48px;
  }

  .hero h1,
  .page-head h1 {
    font-size: 2.5rem;
  }

  .product-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .product-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
  }

  .product-row .text-link {
    grid-column: 2;
  }

  .principles,
  .steps {
    grid-template-columns: 1fr;
  }

  .principle + .principle,
  .step + .step {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .page-head.with-icon {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .page-icon {
    width: 124px;
    height: 124px;
    border-radius: 27px;
    grid-row: 1;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .toc {
    position: static;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
  }

  .footer-inner {
    padding-block: 22px;
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121513;
    --surface: #1a1e1b;
    --ink: #f1f4f1;
    --muted: #abb4ad;
    --line: #343b36;
    --green: #2e8f73;
    --green-deep: #79cdb3;
    --rust: #e09a88;
    --blue: #77add5;
    --focus: #55a7ff;
  }
}

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