:root {
  --paper: #e8e4dc;
  --ink: #3a3632;
  --fog: #6d675e;
  --dust: #9a9286;
  --clay: #b86b4a;
  --clay-ink: #6e3a26;
  --moss: #4f6d5a;
  --ok: #3d6b52;
  --warn: #8a6424;
  --halt: #9a4540;
  --hi: #f4f0e8;
  --lo: #c5bdb0;
  --line: #d4cec4;
  --round: 14px;
  --round-lg: 18px;
  --up: 12px 16px 24px var(--lo), -5px -7px 14px var(--hi);
  --dn: inset 8px 10px 16px var(--lo), inset -4px -5px 10px var(--hi);
  --up-s: 7px 9px 14px var(--lo), -3px -4px 8px var(--hi);
  --dn-s: inset 5px 6px 10px var(--lo), inset -2px -3px 6px var(--hi);
  --ring: 0 0 0 3px rgba(184, 107, 74, 0.28);
  --wide: 1080px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

html.motion-ok {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--clay-ink);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.jump {
  position: absolute;
  left: 14px;
  top: -52px;
  z-index: 90;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--up-s);
  color: var(--ink);
}

.jump:focus {
  top: 12px;
}

.shell {
  width: min(var(--wide), calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 0.85rem 0 0.35rem;
}

.topbar-inner {
  width: min(var(--wide), calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--dn);
}

.topbar.is-stuck .topbar-inner {
  box-shadow: var(--dn-s);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.mark:hover {
  text-decoration: none;
}

.mark img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  box-shadow: var(--dn-s);
  object-fit: cover;
}

.mark strong {
  display: block;
  font-size: 0.98rem;
}

.mark small {
  display: block;
  color: var(--fog);
  font-size: 0.75rem;
}

.burger {
  display: none;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  box-shadow: var(--up-s);
  font: inherit;
  cursor: pointer;
}

.burger:focus-visible {
  box-shadow: var(--up-s), var(--ring);
}

.sheet ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sheet a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--up-s);
}

.sheet a:hover {
  text-decoration: none;
  box-shadow: var(--dn-s);
}

.sheet a[aria-current="page"] {
  box-shadow: var(--dn-s);
  color: var(--clay-ink);
}

.sheet a.go {
  background: var(--paper);
  color: var(--clay-ink);
  font-weight: 650;
  box-shadow: 10px 12px 18px var(--lo), -3px -4px 8px var(--hi);
}

.stage {
  padding: 1.4rem 0 0.4rem;
}

.stage-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 1.4rem;
  align-items: center;
}

.portrait {
  margin: 0;
  padding: 0.7rem;
  border-radius: var(--round-lg);
  background: var(--paper);
  box-shadow: var(--dn);
}

.portrait img {
  width: 100%;
  border-radius: 12px;
}

.portrait figcaption {
  margin-top: 0.5rem;
  color: var(--fog);
  font-size: 0.84rem;
}

.flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.flag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.7rem 0.28rem 0.32rem;
  border-radius: 999px;
  box-shadow: var(--dn-s);
  color: var(--fog);
  font-size: 0.86rem;
}

.flag.live {
  color: var(--moss);
}

.toggle {
  width: 34px;
  height: 20px;
  border-radius: 999px;
  box-shadow: var(--dn-s);
  position: relative;
  background: var(--paper);
}

.toggle i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: var(--up-s);
}

.flag.live .toggle i {
  left: 17px;
  background: var(--moss);
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--dust);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1,
h2,
h3 {
  margin: 0 0 0.55rem;
  line-height: 1.25;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.7rem);
}

h2 {
  font-size: 1.45rem;
}

h3 {
  font-size: 1.05rem;
}

.blurb {
  margin: 0 0 0.9rem;
  color: var(--fog);
}

.callout {
  margin: 0 0 0.9rem;
  padding: 0.85rem 0.95rem;
  border-radius: var(--round);
  box-shadow: var(--dn-s);
}

.callout h3 {
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.callout p {
  margin: 0;
  color: var(--fog);
}

.callout.warn {
  color: var(--warn);
}

.callout.warn h3,
.callout.warn p {
  color: var(--warn);
}

.callout.stop {
  color: var(--halt);
}

.callout.stop h3,
.callout.stop p {
  color: var(--halt);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0 0;
}

.nbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--up-s);
  font-weight: 650;
}

.nbtn:hover {
  text-decoration: none;
  box-shadow: var(--dn-s);
}

.nbtn.prime {
  color: var(--clay-ink);
  box-shadow: 11px 14px 20px var(--lo), -3px -5px 10px var(--hi);
}

.dials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-top: 1.2rem;
}

.dial {
  text-align: center;
  padding: 1rem 0.6rem 0.9rem;
  border-radius: 50%;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  box-shadow: var(--up);
  background: var(--paper);
}

.dial b {
  display: block;
  font-size: 1.35rem;
  color: var(--clay-ink);
}

.dial span {
  display: block;
  margin-top: 0.25rem;
  color: var(--fog);
  font-size: 0.8rem;
}

.dial em {
  display: block;
  margin-top: 0.2rem;
  color: var(--dust);
  font-size: 0.72rem;
  font-style: normal;
}

.band {
  padding: 1.5rem 0 0.2rem;
}

.band-head {
  margin-bottom: 0.95rem;
}

.lead-in {
  margin: 0;
  color: var(--fog);
  max-width: 46rem;
}

.trail {
  margin: 0 0 0.7rem;
  color: var(--dust);
  font-size: 0.9rem;
}

.trail a {
  color: var(--fog);
}

.gates {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.gate {
  display: block;
  padding: 1rem 0.95rem;
  border-radius: var(--round);
  background: var(--paper);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--dn-s);
}

.gate:hover {
  text-decoration: none;
  box-shadow: var(--up-s);
}

.tag {
  color: var(--dust);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.gate h3,
.tile h3,
.os-row h3 {
  margin: 0.3rem 0 0.4rem;
}

.gate p,
.tile p,
.os-row p {
  margin: 0;
  color: var(--fog);
}

.mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.tile {
  padding: 1.05rem 1rem 1.1rem;
  border-radius: var(--round);
  background: var(--paper);
  box-shadow: var(--up-s);
}

.glyph {
  width: 52px;
  height: 52px;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: var(--dn-s);
  color: var(--clay-ink);
}

.glyph span,
.glyph span::before,
.glyph span::after {
  display: block;
  background: currentColor;
}

.g-core {
  position: relative;
}

.g-core span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 6px currentColor;
}

.g-yaml {
  position: relative;
}

.g-yaml span {
  width: 4px;
  height: 18px;
  border-radius: 2px;
}

.g-yaml span::before,
.g-yaml span::after {
  content: "";
  position: absolute;
  left: 20px;
  height: 3px;
  border-radius: 2px;
}

.g-yaml span::before {
  width: 16px;
  top: 16px;
}

.g-yaml span::after {
  width: 12px;
  top: 24px;
}

.g-theme span {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  transform: rotate(18deg);
  box-shadow: 6px 5px 0 -2px currentColor;
}

.g-guard span {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  position: relative;
}

.g-guard span::before {
  content: "";
  position: absolute;
  left: 5px;
  top: -6px;
  width: 4px;
  height: 10px;
  border-radius: 2px;
}

.g-win span {
  width: 16px;
  height: 16px;
  background: transparent;
  box-shadow: 0 0 0 2px currentColor inset;
  position: relative;
}

.g-win span::before,
.g-win span::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.g-win span::before {
  left: 7px;
  top: 0;
  width: 2px;
  height: 16px;
}

.g-win span::after {
  left: 0;
  top: 7px;
  width: 16px;
  height: 2px;
}

.g-mac,
.g-and {
  position: relative;
}

.g-mac span {
  width: 18px;
  height: 12px;
  border-radius: 4px 4px 6px 6px;
}

.g-mac span::before {
  content: "";
  position: absolute;
  width: 6px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  margin: -4px 0 0 6px;
}

.g-linux span {
  width: 0;
  height: 0;
  background: transparent;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 14px solid currentColor;
}

.g-and span {
  width: 16px;
  height: 12px;
  border-radius: 5px;
  position: relative;
}

.g-and span::before,
.g-and span::after {
  content: "";
  position: absolute;
  top: -5px;
  width: 2px;
  height: 6px;
  border-radius: 2px;
}

.g-and span::before {
  left: 3px;
  transform: rotate(-28deg);
}

.g-and span::after {
  right: 3px;
  transform: rotate(28deg);
}

.pair {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.2rem;
  align-items: center;
}

.pair.reverse {
  grid-template-columns: 0.95fr 1.05fr;
}

.checks {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.checks li {
  position: relative;
  padding: 0.4rem 0 0.4rem 2rem;
  color: var(--fog);
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  box-shadow: var(--dn-s);
}

.rails {
  display: grid;
  gap: 0.7rem;
}

.os-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: var(--round);
  box-shadow: var(--dn);
}

.os-row .nbtn {
  min-height: 36px;
  padding: 0.3rem 0.85rem;
  font-size: 0.88rem;
}

.ask details {
  margin: 0 0 0.65rem;
  border-radius: var(--round);
  background: var(--paper);
  box-shadow: var(--up-s);
}

.ask details[open] {
  box-shadow: var(--dn-s);
}

.ask summary {
  cursor: pointer;
  list-style: none;
  padding: 0.9rem 1rem;
  font-weight: 650;
}

.ask summary::-webkit-details-marker {
  display: none;
}

.ask summary::after {
  content: "+";
  float: right;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  box-shadow: var(--dn-s);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--clay-ink);
}

.ask details[open] summary::after {
  content: "–";
}

.ask details p {
  margin: 0;
  padding: 0 1rem 1rem;
  color: var(--fog);
}

.sheet-table {
  overflow-x: auto;
  border-radius: var(--round);
  box-shadow: var(--dn);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 540px;
}

th,
td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--fog);
  font-size: 0.86rem;
}

code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9em;
}

.ladder {
  display: grid;
  gap: 0.7rem;
}

.rung {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0.8rem;
  align-items: start;
  padding: 0.85rem;
  border-radius: var(--round);
  box-shadow: var(--up-s);
}

.rung b {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: var(--dn-s);
  color: var(--clay-ink);
}

.rung h3,
.rung p {
  margin: 0;
}

.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.base {
  margin-top: 2rem;
  padding: 0 0 1.3rem;
}

.base-inner {
  width: min(var(--wide), calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.3rem 1.1rem 1rem;
  border-radius: 22px;
  box-shadow: var(--dn);
}

.base-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 0.8fr 1.05fr;
  gap: 1.1rem;
}

.base h3 {
  font-size: 0.95rem;
}

.base p,
.base li {
  color: var(--fog);
  font-size: 0.92rem;
}

.base ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.base li {
  margin: 0.28rem 0;
}

.copyline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.45rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  color: var(--dust);
  font-size: 0.84rem;
}

.rise {
  opacity: 1;
  transform: none;
}

html.motion-ok .rise {
  opacity: 0;
  transform: translateY(18px);
}

html.motion-ok .rise.is-shown {
  opacity: 1;
  transform: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

html.motion-ok .nbtn,
html.motion-ok .gate,
html.motion-ok .sheet a,
html.motion-ok .ask details,
html.motion-ok .flag.live .toggle i {
  transition: box-shadow 0.2s ease, transform 0.2s ease, left 0.2s ease, color 0.2s ease;
}

body.sheet-lock {
  overflow: hidden;
}

@media (max-width: 980px) {
  .stage-grid,
  .pair,
  .pair.reverse,
  .gates,
  .dials,
  .base-grid {
    grid-template-columns: 1fr 1fr;
  }

  .os-row {
    grid-template-columns: 52px 1fr;
  }

  .os-row .nbtn {
    grid-column: 2;
    justify-self: start;
  }

  .dial {
    border-radius: var(--round-lg);
    aspect-ratio: auto;
    padding: 0.9rem 0.7rem;
  }
}

@media (max-width: 800px) {
  .burger {
    display: inline-flex;
  }

  .sheet {
    display: none;
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: 5rem;
    padding: 0.75rem;
    border-radius: var(--round-lg);
    background: var(--paper);
    box-shadow: var(--up);
  }

  .sheet.sheet-open {
    display: block;
  }

  .sheet ul {
    flex-direction: column;
    align-items: stretch;
  }

  .sheet a {
    justify-content: center;
  }

  .stage-grid,
  .pair,
  .pair.reverse,
  .gates,
  .mosaic,
  .duo,
  .dials,
  .base-grid {
    grid-template-columns: 1fr;
  }

  .topbar-inner {
    border-radius: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html,
  html.motion-ok {
    scroll-behavior: auto;
  }

  html.motion-ok .rise,
  html.motion-ok .rise.is-shown,
  html.motion-ok .nbtn,
  html.motion-ok .gate,
  html.motion-ok .sheet a,
  html.motion-ok .ask details,
  html.motion-ok .flag.live .toggle i {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
