:root {
  --bg: #0c1016;
  --panel: #141a22;
  --sheet: #1a222c;
  --ink: #e8eef6;
  --mute: #93a0b0;
  --line: #2a3542;
  --green: #3ecf8e;
  --amber: #e3b341;
  --cyan: #6cb6ff;
  --mono: ui-monospace, "Cascadia Code", Consolas, "Sarasa Term SC", "Microsoft YaHei", monospace;
  --sans: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --wrap: 1180px;
  --rail: 292px;
  --radius: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 480px at 8% -10%, rgba(62, 207, 142, 0.08), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(108, 182, 255, 0.06), transparent 50%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--cyan);
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--green);
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -52px;
  z-index: 90;
  background: var(--amber);
  color: #15120a;
  padding: 0.5rem 0.85rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: min(calc(100% - 32px), var(--wrap));
  margin: 0 auto;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(12, 16, 22, 0.92);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--mute);
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  flex-wrap: wrap;
}

.topbar b {
  color: var(--green);
  font-weight: 600;
}

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 16, 22, 0.96);
}

.site-head.is-stuck {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--mono);
  font-weight: 700;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.brand small {
  display: block;
  color: var(--mute);
  font-size: 0.7rem;
  font-weight: 500;
}

.nav-toggle {
  display: none;
  background: var(--sheet);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-family: var(--mono);
  cursor: pointer;
}

.menu ul {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu a {
  display: inline-flex;
  padding: 0.45rem 0.7rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.94rem;
  border-radius: 8px;
}

.menu a:hover,
.menu a[aria-current="page"] {
  background: var(--sheet);
  color: var(--green);
}

.menu .cta {
  background: var(--green);
  color: #082015;
  font-weight: 700;
}

.menu .cta:hover,
.menu .cta[aria-current="page"] {
  background: #63e0a6;
  color: #082015;
}

.hero {
  padding: 2.6rem 0 1.4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 1.6rem;
  align-items: start;
}

.kicker {
  display: inline-block;
  margin-bottom: 0.55rem;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--sheet);
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.76rem;
}

.chip.is-on {
  border-color: rgba(62, 207, 142, 0.45);
  background: rgba(62, 207, 142, 0.12);
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 0.7rem;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: 1.45rem;
}

h3 {
  font-size: 1.05rem;
}

.lead {
  color: var(--mute);
  font-size: 1.05rem;
  max-width: 62ch;
}

.acts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1.2rem 0 1.4rem;
}

.btn,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
}

.btn {
  background: var(--green);
  color: #082015;
}

.btn:hover {
  background: #63e0a6;
  color: #082015;
}

.btn-ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.metric {
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.metric strong {
  display: block;
  color: var(--green);
  font-family: var(--mono);
  font-size: 1.25rem;
}

.metric span {
  color: var(--mute);
  font-size: 0.86rem;
}

.shot {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
}

.shot-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--line);
  color: var(--mute);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.dots {
  display: flex;
  gap: 0.32rem;
}

.dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3d4a58;
}

.dots i:first-child {
  background: #ff5f57;
}

.dots i:nth-child(2) {
  background: #febc2e;
}

.dots i:nth-child(3) {
  background: #28c840;
}

.shot img {
  width: 100%;
}

.shot figcaption {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.8rem;
  color: var(--mute);
  font-family: var(--mono);
  font-size: 0.75rem;
  border-top: 1px solid var(--line);
}

.shelf {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rail);
  gap: 1.4rem;
  align-items: start;
  padding-bottom: 2.4rem;
}

.post > section {
  margin-bottom: 1.4rem;
  padding: 1.25rem 1.3rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.head p {
  margin: 0;
  max-width: 42ch;
  color: var(--mute);
  font-size: 0.94rem;
}

.grid-4,
.grid-3,
.grid-2 {
  display: grid;
  gap: 0.8rem;
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.entry,
.card,
.plat,
.note {
  display: block;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--sheet);
  color: inherit;
  text-decoration: none;
}

.entry:hover,
.card:hover,
.plat:hover {
  border-color: rgba(108, 182, 255, 0.45);
}

.meta,
.idx,
.label {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.entry h3,
.card h3,
.plat h3,
.note h3 {
  margin-bottom: 0.4rem;
}

.entry p,
.card p,
.plat p,
.note p {
  margin: 0;
  color: var(--mute);
  font-size: 0.94rem;
}

.icon {
  width: 42px;
  height: 42px;
  margin-bottom: 0.55rem;
}

.icon svg {
  width: 42px;
  height: 42px;
}

.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: center;
}

.duo.reverse {
  direction: rtl;
}

.duo.reverse > * {
  direction: ltr;
}

.checks {
  margin: 0;
  padding: 0;
  list-style: none;
}

.checks li,
.checks > li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.2rem;
  color: var(--mute);
}

.checks li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--green);
  font-family: var(--mono);
}

.checks h3 {
  margin: 0 0 0.2rem;
  color: var(--ink);
}

.cite {
  margin: 1rem 0 0;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid var(--amber);
  background: rgba(227, 179, 65, 0.08);
  color: var(--mute);
  font-size: 0.92rem;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--sheet);
  margin-bottom: 0.55rem;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 0.85rem 1rem;
  font-weight: 700;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  float: right;
  color: var(--green);
  font-family: var(--mono);
}

.faq details[open] summary::after {
  content: "-";
}

.faq details p {
  margin: 0;
  padding: 0 1rem 0.95rem;
  color: var(--mute);
}

.crumbs {
  margin: 0 0 0.6rem;
  color: var(--mute);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.page-hero {
  padding: 1.8rem 0 0.4rem;
}

.page-hero .lead {
  margin-bottom: 0;
}

.cues {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.cue {
  display: block;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--sheet);
  color: inherit;
  text-decoration: none;
}

.cue .n {
  display: block;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.cue .t {
  display: block;
  margin: 0.25rem 0;
  font-weight: 700;
}

.cue .h {
  color: var(--mute);
  font-size: 0.86rem;
}

.cue.is-live,
.cue[aria-current="step"] {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(62, 207, 142, 0.35);
}

.rail {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 0.8rem;
}

.dl-card,
.toc-card {
  padding: 1rem 1.05rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.dl-card h2,
.toc-card h2 {
  font-size: 1rem;
}

.dl-card p,
.toc-card p {
  margin: 0 0 0.8rem;
  color: var(--mute);
  font-size: 0.9rem;
}

.dl-card .btn {
  width: 100%;
}

.toc-card ol {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--mute);
}

.toc-card a {
  color: var(--ink);
  text-decoration: none;
}

.toc-card a:hover {
  color: var(--cyan);
}

footer {
  border-top: 1px solid var(--line);
  background: #0a0e13;
  padding: 2rem 0 1.3rem;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 1.2rem;
}

.foot-grid h3 {
  font-size: 0.92rem;
  font-family: var(--mono);
  color: var(--amber);
}

.foot-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-grid li {
  margin: 0.35rem 0;
}

.foot-grid p {
  color: var(--mute);
  font-size: 0.92rem;
}

.legal {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--mute);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(10px);
}

.js-ready [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

@media (max-width: 1080px) {
  .hero-grid,
  .duo,
  .grid-4,
  .cues {
    grid-template-columns: 1fr 1fr;
  }

  .shelf,
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }

  .rail {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }

  .menu {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    top: calc(100% + 8px);
    padding: 0.6rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
  }

  .menu.is-open {
    display: block;
  }

  .menu ul {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-grid,
  .duo,
  .duo.reverse,
  .grid-4,
  .grid-3,
  .grid-2,
  .cues,
  .metrics,
  .shelf,
  .foot-grid,
  .head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .head {
    align-items: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js-ready [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
