:root {
  --mist: #d6e0e3;
  --mist-deep: #c5d1d5;
  --glint: #eef4f6;
  --ditch: #b3c1c5;
  --char: #243236;
  --ash: #5a6a6e;
  --hint: #7a8b8f;
  --tide: #2d656c;
  --tide-ink: #16383d;
  --ok: #2b6a52;
  --warn: #7d5f1a;
  --halt: #8d4542;
  --line: rgba(45, 101, 108, 0.16);
  --sq: 8px;
  --sq-lg: 12px;
  --rail-h: 46px;
  --wide: 1040px;
  --well: inset 6px 6px 12px var(--ditch), inset -5px -5px 10px var(--glint);
  --well-sm: inset 3px 3px 7px var(--ditch), inset -3px -3px 6px var(--glint);
  --ridge: 5px 5px 10px var(--ditch), -4px -4px 8px var(--glint);
  --ridge-sm: 3px 3px 6px var(--ditch), -2px -2px 5px var(--glint);
  --focus: 0 0 0 3px rgba(45, 101, 108, 0.32);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

html:not(.reduce-motion) {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--char);
  background:
    radial-gradient(820px 360px at 8% -6%, rgba(238, 244, 246, 0.62), transparent 56%),
    radial-gradient(720px 320px at 100% 0%, rgba(179, 193, 197, 0.38), transparent 50%),
    var(--mist);
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--tide);
  text-decoration: none;
}

a:hover {
  color: var(--tide-ink);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 20;
  padding: 6px 10px;
  background: var(--mist);
  box-shadow: var(--ridge-sm);
  border-radius: var(--sq);
  color: var(--tide-ink);
}

.skip:focus {
  top: 8px;
}

.wrap {
  width: min(100% - 32px, var(--wide));
  margin-inline: auto;
}

.rail {
  height: var(--rail-h);
  background: var(--mist-deep);
  box-shadow: var(--well-sm);
  position: sticky;
  top: 0;
  z-index: 12;
}

.rail-bar {
  height: var(--rail-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--char);
  min-width: 0;
}

.brand img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: var(--well-sm);
  flex-shrink: 0;
}

.brand span {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-switch {
  display: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--mist);
  box-shadow: var(--ridge-sm);
  color: var(--char);
  cursor: pointer;
}

.nav-switch[aria-expanded="true"] {
  box-shadow: var(--well-sm);
}

.rail-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rail-nav a {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ash);
}

.rail-nav a:hover,
.rail-nav a[aria-current="page"] {
  color: var(--tide-ink);
  box-shadow: var(--well-sm);
  background: var(--mist);
}

.deck {
  padding: 28px 0 48px;
}

.trough {
  background: var(--mist);
  box-shadow: var(--well);
  border-radius: var(--sq-lg);
  padding: 22px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 20px;
  align-items: center;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--tide-ink);
  background: var(--mist);
  box-shadow: var(--well-sm);
}

h1,
h2,
h3 {
  margin: 0 0 10px;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(1.7rem, 3vw, 2.25rem);
}

h2 {
  font-size: 1.35rem;
}

h3 {
  font-size: 1.05rem;
}

.lead,
.note,
p {
  margin: 0 0 12px;
}

.lead {
  color: var(--ash);
  font-size: 1.02rem;
}

.note,
.mute {
  color: var(--ash);
  font-size: 0.94rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 18px;
}

.ridge-btn,
.dent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 650;
  border: 0;
  cursor: pointer;
}

.ridge-btn {
  background: var(--tide);
  color: #f4fbfb;
  box-shadow: var(--ridge-sm);
}

.ridge-btn:hover {
  color: #fff;
  background: var(--tide-ink);
}

.dent-btn {
  background: var(--mist);
  color: var(--tide-ink);
  box-shadow: var(--well-sm);
}

.dent-btn:hover {
  color: var(--char);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  padding: 10px 12px;
  border-radius: var(--sq);
  box-shadow: var(--well-sm);
  background: var(--mist);
}

.metric strong {
  display: block;
  font-size: 1.05rem;
  color: var(--tide-ink);
}

.metric span {
  font-size: 12px;
  color: var(--ash);
}

.hero-frame {
  padding: 10px;
  border-radius: var(--sq-lg);
  box-shadow: var(--well);
  background: var(--mist);
}

.hero-frame img {
  width: 100%;
  border-radius: 8px;
}

.section {
  margin-top: 22px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.seo-lane {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.seo-lane a {
  display: block;
  padding: 12px 14px;
  border-radius: var(--sq);
  background: var(--mist);
  box-shadow: var(--well);
  color: var(--char);
}

.seo-lane a strong {
  display: block;
  color: var(--tide-ink);
  font-size: 14px;
}

.seo-lane a span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--ash);
}

.card-grid,
.os-grid,
.pair-grid {
  display: grid;
  gap: 12px;
}

.card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.os-grid,
.pair-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pit {
  padding: 16px;
  border-radius: var(--sq-lg);
  background: var(--mist);
  box-shadow: var(--well);
}

.pit > :last-child {
  margin-bottom: 0;
}

.tile {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  box-shadow: var(--well-sm);
  background: var(--mist);
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}

.glyph {
  width: 14px;
  height: 14px;
  position: relative;
  display: block;
}

.glyph-core {
  border: 2px solid var(--tide);
  box-shadow: inset 0 0 0 2px var(--mist), inset 0 0 0 3px var(--tide);
}

.glyph-yaml {
  border: 2px solid var(--tide);
}

.glyph-yaml::before,
.glyph-yaml::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  height: 2px;
  background: var(--tide);
}

.glyph-yaml::before {
  top: 3px;
}

.glyph-yaml::after {
  bottom: 3px;
}

.glyph-theme {
  border: 2px solid var(--tide);
  background: linear-gradient(135deg, var(--tide) 50%, transparent 50%);
}

.glyph-guard {
  width: 12px;
  height: 14px;
  border: 2px solid var(--tide);
  border-top-width: 3px;
  border-radius: 0 0 3px 3px;
}

.glyph-tun {
  border-left: 2px solid var(--tide);
  border-right: 2px solid var(--tide);
}

.glyph-tun::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 6px;
  height: 2px;
  background: var(--tide);
}

.glyph-rule {
  border-bottom: 2px solid var(--tide);
}

.glyph-rule::before,
.glyph-rule::after {
  content: "";
  position: absolute;
  height: 2px;
  background: var(--tide);
  left: 0;
}

.glyph-rule::before {
  top: 3px;
  width: 14px;
}

.glyph-rule::after {
  top: 8px;
  width: 9px;
}

.glyph-win,
.glyph-mac,
.glyph-linux,
.glyph-and {
  border: 2px solid var(--tide);
}

.glyph-win::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid var(--tide);
}

.glyph-mac {
  border-radius: 3px 3px 0 0;
}

.glyph-linux::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 2px;
  height: 3px;
  background: var(--tide);
}

.glyph-and {
  border-radius: 4px 4px 2px 2px;
}

.detail-list {
  display: grid;
  gap: 10px;
}

.detail-list article {
  padding: 14px 16px;
  border-radius: var(--sq);
  box-shadow: var(--well-sm);
  background: var(--mist);
}

.qa-list {
  display: grid;
  gap: 8px;
}

.qa-item {
  border-radius: var(--sq);
  background: var(--mist);
  box-shadow: var(--well-sm);
}

.qa-item button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--char);
  font: inherit;
  font-weight: 650;
  padding: 12px 14px;
  cursor: pointer;
}

.qa-item button::after {
  content: "+";
  float: right;
  color: var(--tide);
  font-weight: 700;
}

.qa-item.is-open button::after {
  content: "–";
}

.qa-item [hidden] {
  display: none;
}

.qa-item .qa-body {
  padding: 0 14px 12px;
  color: var(--ash);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.floor {
  padding: 22px 0 28px;
  background: var(--mist-deep);
  box-shadow: inset 0 6px 12px var(--ditch), inset 0 -2px 6px var(--glint);
}

.floor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.floor h3 {
  font-size: 13px;
  color: var(--tide-ink);
  margin-bottom: 8px;
}

.floor a,
.floor p {
  display: block;
  font-size: 13px;
  color: var(--ash);
  margin: 0 0 6px;
}

.floor a:hover {
  color: var(--tide-ink);
}

.legal {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--hint);
}

.step-list {
  counter-reset: step;
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.step-list li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: var(--sq);
  box-shadow: var(--well-sm);
  background: var(--mist);
}

.step-list li::before {
  counter-increment: step;
  content: counter(step);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  box-shadow: var(--well-sm);
  color: var(--tide-ink);
  font-weight: 700;
}

.check-list {
  margin: 0;
  padding-left: 18px;
  color: var(--ash);
}

.check-list li {
  margin-bottom: 6px;
}

.arch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.arch-table th,
.arch-table td {
  text-align: left;
  padding: 10px 12px;
  box-shadow: var(--well-sm);
  background: var(--mist);
}

.arch-table th {
  color: var(--tide-ink);
  font-weight: 650;
}

@media (max-width: 920px) {
  .hero,
  .card-grid,
  .seo-lane,
  .floor-grid,
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .nav-switch {
    display: grid;
    place-items: center;
  }

  .rail-nav {
    display: none;
    position: absolute;
    top: calc(var(--rail-h) + 8px);
    right: 16px;
    left: 16px;
    padding: 8px;
    border-radius: var(--sq);
    background: var(--mist);
    box-shadow: var(--well);
    flex-direction: column;
    align-items: stretch;
  }

  .rail-nav.is-open {
    display: flex;
  }

  .rail-nav a {
    height: 36px;
  }

  .hero,
  .card-grid,
  .seo-lane,
  .os-grid,
  .pair-grid,
  .about-grid,
  .floor-grid,
  .metric-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
