:root {
  color-scheme: light;
  --ink: #172a22;
  --muted: #52665b;
  --forest: #142e25;
  --green: #176147;
  --mint: #cdf4ac;
  --paper: #f5f7f2;
  --wash: #ecf4e9;
  --rule: #dce6db;
  --white: #fff;
  --font: "Inter", system-ui, "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 15px/1.68 var(--font); }
a { color: var(--green); text-underline-offset: 3px; }
a, summary { outline-offset: 4px; }
:focus-visible { outline: 2px solid #358352; }
img { display: block; max-width: 100%; }
code { font-family: var(--mono); }
p { margin: 0 0 12px; }
h1, h2, h3 { margin: 0; line-height: 1.23; }
section[id], main[id] { scroll-margin-top: 84px; }
.skip-link { position: fixed; z-index: 5; top: 8px; left: 8px; padding: 8px 14px; background: var(--white); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header { position: sticky; z-index: 4; top: 0; background: var(--white); border-bottom: 1px solid var(--rule); }
.header-inner, .hero-inner, .guide-layout { width: min(1140px, calc(100% - 64px)); margin-inline: auto; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 24px; font-weight: 800; letter-spacing: -.055em; text-decoration: none; }
.mark { display: grid; place-items: center; width: 36px; height: 36px; background: var(--forest); color: var(--mint); border-radius: 9px; font: 700 14px var(--mono); letter-spacing: -.1em; }
.brand-dot { color: var(--green); }
.header-actions { display: flex; align-items: center; gap: 9px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 7px 13px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.button-quiet { color: var(--green); border-color: var(--rule); background: var(--white); }
.button-quiet:hover { background: var(--wash); }
.button-primary { color: var(--white); background: var(--green); }
.button-primary:hover { background: #104f39; }
.button-mint { color: var(--forest); background: var(--mint); padding-inline: 16px; min-height: 42px; }
.button-mint:hover { background: #e3fbcf; }

.hero {
  color: #f4faf2;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 35px, #d0f5d00d 36px),
    repeating-linear-gradient(90deg, transparent, transparent 35px, #d0f5d00d 36px),
    radial-gradient(ellipse at 82% 16%, #2c5b47, transparent 66%),
    var(--forest);
}
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .68fr); align-items: center; gap: clamp(30px, 6vw, 96px); padding-block: clamp(38px, 6.1vw, 76px); }
.eyebrow { margin: 0 0 14px; color: var(--mint); font: 650 12px/1.4 var(--mono); letter-spacing: .15em; }
.hero h1 { font-size: clamp(38px, 6vw, 70px); font-weight: 800; letter-spacing: -.055em; }
.hero-lead { margin: 16px 0 25px; max-width: 26em; color: #c6ddce; font-size: clamp(15px, 2.1vw, 19px); }
.hero-terminal { overflow: hidden; border: 1px solid #5c8b73; border-radius: 14px; color: #e5f2e7; background: #102920; box-shadow: 0 20px 44px #0a2319a1; }
.terminal-bar { display: flex; align-items: center; gap: 13px; padding: 11px 16px; border-bottom: 1px solid #315244; color: #bad1c2; font: 12px var(--mono); }
.terminal-dots { display: inline-flex; gap: 5px; }
.terminal-dots i { width: 6px; height: 6px; border-radius: 50%; background: #719e85; }
.terminal-content { display: grid; gap: 8px; padding: 21px 22px 24px; font-size: 14px; }
.prompt { display: inline-block; width: 13px; color: var(--mint); font: 700 15px var(--mono); }
.terminal-response { color: var(--mint); padding-inline-start: 20px; }

.guide-layout { display: grid; grid-template-columns: 195px minmax(0, 1fr); align-items: start; gap: 24px; padding-block: 32px 48px; }
.guide-sidebar { position: sticky; top: 91px; padding: 13px 12px 12px 2px; }
.guide-sidebar h2 { margin: 0 0 12px 9px; color: var(--muted); font-size: 12px; font-weight: 750; letter-spacing: .06em; }
.guide-sidebar ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.guide-sidebar ol li { counter-increment: toc; }
.guide-sidebar a { display: flex; align-items: center; gap: 9px; padding: 6px 9px; border-radius: 7px; color: var(--ink); text-decoration: none; font-size: 14px; }
.guide-sidebar a:hover, .guide-sidebar a:focus-visible { color: var(--green); background: var(--wash); }
.guide-sidebar ol a::before { content: counter(toc, decimal-leading-zero); color: var(--green); font: 600 11px var(--mono); }
.guide-sidebar .sidebar-faq { margin-top: 9px; border-top: 1px solid var(--rule); border-radius: 0 0 7px 7px; }

.guide-article { min-width: 0; display: grid; gap: 18px; }
.guide-section { padding: clamp(20px, 3.4vw, 34px); border: 1px solid var(--rule); border-radius: 16px; background: var(--white); }
.section-title { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }
.section-title h2 { font-size: clamp(21px, 3vw, 28px); letter-spacing: -.025em; }
.step { display: grid; flex: 0 0 32px; place-items: center; height: 32px; border-radius: 9px; color: var(--green); background: var(--wash); font: 750 15px var(--mono); }
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; gap: clamp(18px, 3.5vw, 28px); }
.split-register { grid-template-columns: minmax(0, 1fr) minmax(0, .79fr); }
.guide-section p { color: var(--muted); }
.guide-section p:last-child { margin-bottom: 0; }
.choices, .instructions { margin: 0; padding-left: 1.25em; }
.choices li, .instructions li { margin: 0 0 10px; padding-left: 2px; }
.choices li::marker, .instructions li::marker { color: var(--green); font-weight: 750; }
.choices strong { display: block; }
.choices span { display: block; color: var(--muted); }
.key-types { display: grid; gap: 9px; margin: 18px 0 0; padding: 12px 14px; border-radius: 9px; background: var(--wash); }
.key-types dt { font-size: 14px; font-weight: 750; }
.key-types dt code { margin-inline-start: 5px; color: var(--green); }
.key-types dd { margin: 0; color: var(--muted); font-size: 13px; }
.guide-section :not(pre) > code { padding: 1px 5px; border-radius: 4px; color: #14553e; background: #eff5ec; font-size: .9em; overflow-wrap: anywhere; }
.note { margin: 15px 0 0; padding: 12px 15px; border-left: 3px solid #559a6a; border-radius: 0 8px 8px 0; background: #f3f8ef; }
.note > strong { display: block; margin-bottom: 3px; font-size: 14px; }
.note > p, .small-note { font-size: 13px; }

.screen { margin: 0; min-width: 0; }
.screen-wide { margin-top: 18px; }
.screen-view { display: block; position: relative; overflow: hidden; border: 1px solid var(--rule); border-radius: 10px; background: #e9eee6; }
.screen-view:hover { border-color: #71a489; }
.screen-view img { width: 100%; height: auto; }
.screen figcaption { margin-top: 6px; color: var(--muted); font-size: 12px; }
.screenshot-register { aspect-ratio: 486/654; }
.screenshot-register img { position: absolute; left: -18%; top: -5%; width: 260.3%; max-width: none; }
.screenshot-overview { aspect-ratio: 1250/610; }
.screenshot-overview img { position: absolute; top: 0; left: 0; width: 101.2%; max-width: none; }
.screenshot-redeem { aspect-ratio: 586/328; }
.screenshot-redeem img { position: absolute; left: -56.7%; top: -61%; width: 215.9%; max-width: none; }

.client-grid { display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); gap: 14px; }
.client-card { min-width: 0; padding: 17px; border: 1px solid var(--rule); border-radius: 10px; }
.client-card h3 { margin-bottom: 8px; font-size: 17px; }
.client-card p { font-size: 14px; }
.client-card pre { margin: 12px 0; padding: 10px 13px; border-radius: 7px; color: var(--mint); background: var(--forest); font-size: 14px; }
.field-list { margin: 12px 0 0; border-top: 1px solid var(--rule); }
.field-list div { display: grid; grid-template-columns: 85px minmax(0, 1fr); gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 13px; }
.field-list dt { font-weight: 750; }
.field-list dd { margin: 0; color: var(--muted); }
.faq-section details { padding: 11px 0; border-top: 1px solid var(--rule); }
.faq-section summary { cursor: pointer; font-weight: 700; }
.faq-section details p { margin: 6px 0 0; padding-inline-start: 16px; }
.guide-footer { display: flex; flex-wrap: wrap; gap: 14px 20px; padding: 2px 0 8px; font-size: 13px; }

@media (max-width: 860px) {
  .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-block: 18px 30px; }
  .guide-sidebar { position: static; padding: 12px; border: 1px solid var(--rule); border-radius: 12px; background: var(--white); }
  .guide-sidebar nav { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 8px; }
  .guide-sidebar h2 { margin: 0 0 0 9px; }
  .guide-sidebar ol { display: flex; flex-wrap: wrap; }
  .guide-sidebar a { gap: 5px; padding-block: 4px; }
  .guide-sidebar .sidebar-faq { border: 0; border-radius: 7px; margin: 0; }
}
@media (max-width: 670px) {
  .header-inner, .hero-inner, .guide-layout { width: calc(100% - 28px); }
  .header-inner { gap: 7px; min-height: 56px; }
  .brand { gap: 6px; font-size: 20px; }
  .mark { width: 29px; height: 29px; border-radius: 7px; }
  .header-actions { gap: 5px; }
  .header-actions .button { padding-inline: 7px; font-size: 12px; }
  .header-actions .button span { display: none; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 33px; }
  .hero h1 { font-size: clamp(34px, 10vw, 54px); }
  .hero-lead { margin: 12px 0 17px; }
  .terminal-content { grid-template-columns: 1fr; padding: 13px 15px 15px; gap: 4px; }
  .guide-section { padding: 17px; }
  .split, .client-grid { grid-template-columns: minmax(0, 1fr); }
  .split-register .screen { max-width: 340px; }
  .screen-wide .screenshot-overview { aspect-ratio: 990/610; }
  .screen-wide .screenshot-overview img { left: -23%; width: 127.8%; }
}
@media print {
  body, .hero { background: #fff; color: #172a22; }
  .site-header, .guide-sidebar, .button, .hero-terminal, .guide-footer { display: none; }
  .hero-inner, .guide-layout { display: block; width: 100%; padding: 0; }
  .hero h1 { font-size: 32px; }
  .eyebrow, .hero-lead { color: var(--muted); }
  .guide-section { padding: 15px; break-inside: avoid; }
}
