:root {
  color-scheme: light;
  --paper: #f3f5f1;
  --surface: #ffffff;
  --ink: #1e3027;
  --muted: #536358;
  --green: #28513c;
  --line: #b9c7bb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 16px; line-height: 1.65; }
a { color: var(--green); text-underline-offset: 4px; }
button, textarea { font: inherit; }
strong { font-weight: 650; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
a, summary, textarea { -webkit-tap-highlight-color: transparent; }
a:focus-visible, summary:focus-visible, textarea:focus-visible { outline: 3px solid var(--green); outline-offset: 5px; }
::selection { background: var(--green); color: var(--surface); }
code, .version, .file-name, .checksum, textarea { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; }
code { font-size: .9em; overflow-wrap: anywhere; }
.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
section[id] { scroll-margin-top: 24px; }
.skip-link { position: absolute; top: 8px; left: 16px; padding: 12px 20px; background: var(--surface); transform: translateY(-180%); z-index: 2; }
.skip-link:focus { transform: translateY(0); }

.site-header { min-height: 108px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-weight: 650; font-size: 20px; line-height: 1.4; }
.brand small { display: block; font-size: 12px; letter-spacing: .12em; font-weight: 500; margin-top: 4px; color: var(--muted); }
.brand-mark { display: grid; grid-template-columns: repeat(2, 12px); gap: 4px; transform: rotate(-8deg); }
.brand-mark i { display: block; height: 12px; background: var(--green); }
.brand-mark i:last-child { background: var(--line); }
nav { display: flex; gap: 24px; }
nav a { display: inline-flex; align-items: center; min-height: 48px; font-size: 16px; text-decoration: none; }
nav a:hover { text-decoration: underline; }

.hero { padding: 64px 0; display: grid; grid-template-columns: 1fr 320px; gap: 64px; align-items: center; }
.eyebrow { font-size: 12px; font-weight: 650; color: var(--muted); letter-spacing: .08em; line-height: 1.5; }
.small-square { display: inline-block; width: 8px; height: 8px; background: var(--green); margin-right: 8px; }
h1 { font-size: clamp(32px, 4.7vw, 56px); line-height: 1.2; letter-spacing: -.04em; font-weight: 750; margin: 20px 0; }
.hero-description { color: var(--muted); font-size: 16px; }
.hero-actions { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin-top: 28px; }
.button { min-height: 48px; padding: 12px 20px; display: inline-flex; align-items: center; justify-content: center; gap: 20px; color: var(--surface); background: var(--green); border: 1px solid var(--green); border-radius: 4px; text-decoration: none; font-weight: 650; font-size: 16px; line-height: 1.5; }
.button:hover { background: var(--ink); border-color: var(--ink); }
.button:active { transform: translateY(1px); }
.environment { color: var(--muted); font-size: 14px; }
.environment span { margin-inline: 8px; color: var(--muted); }
.inventory { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 8px 8px 0 var(--line); }
.inventory-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.inventory-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 24px 0; }
.slot { aspect-ratio: 1; display: grid; place-items: center; font-size: 24px; font-weight: 650; background: var(--paper); border: 1px solid var(--line); border-bottom-width: 4px; color: var(--green); }
.slot-api { background: var(--green); color: var(--surface); border-color: var(--green); }
.inventory-bottom { display: flex; gap: 16px; align-items: center; padding-top: 16px; border-top: 1px solid var(--line); }
.inventory-bottom strong { font-size: 32px; letter-spacing: -.04em; line-height: 1.3; white-space: nowrap; }
.inventory-bottom span { font-size: 12px; color: var(--muted); line-height: 1.6; }

h2 { font-size: 24px; line-height: 1.35; letter-spacing: -.03em; font-weight: 700; }
h3 { font-size: 20px; line-height: 1.4; font-weight: 650; }
.install-panel { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 32px 0; display: grid; grid-template-columns: 220px 1fr; gap: 40px; }
.section-intro h2 { font-size: 24px; margin-top: 12px; }
.install-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 24px; }
.install-steps li { display: flex; align-items: flex-start; gap: 16px; }
.step-number { color: var(--green); font-size: 14px; border: 1px solid var(--line); min-width: 32px; height: 32px; display: grid; place-items: center; }
.install-steps h3 { font-size: 16px; margin-bottom: 4px; }
.install-steps p { color: var(--muted); font-size: 16px; max-width: 65ch; }
.download-section { padding-top: 64px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading h2 { margin-top: 8px; }
.section-heading > p { color: var(--muted); font-size: 14px; }
.count { display: inline-block; font-size: 12px; font-weight: 500; vertical-align: middle; border: 1px solid var(--line); padding: 4px 8px; margin-left: 12px; letter-spacing: 0; }
.mod-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mod-card { padding: 28px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; min-width: 0; display: flex; flex-direction: column; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; color: var(--muted); font-size: 12px; }
.card-number { font-variant-numeric: tabular-nums; }
.category { border-left: 3px solid var(--green); padding-left: 8px; }
.mod-card h3 { font-size: 24px; }
.mod-name { color: var(--muted); font-size: 14px; margin-top: 4px; overflow-wrap: anywhere; }
.mod-description { font-size: 16px; margin: 16px 0 20px; color: var(--muted); flex-grow: 1; }
.mod-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: var(--muted); }
.version { font-size: 12px; color: var(--ink); overflow-wrap: anywhere; }
.card-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-top: 16px; }
.text-link { display: inline-flex; align-items: center; min-height: 48px; font-size: 14px; }
.file-details { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 4px; }
summary { cursor: pointer; min-height: 48px; padding-block: 12px; color: var(--muted); font-size: 14px; }
summary:hover { color: var(--ink); }
.file-name { font-size: 12px; overflow-wrap: anywhere; margin: 4px 0 12px; }
.hash-label { color: var(--muted); font-size: 12px; }
.checksum { display: block; overflow-wrap: anywhere; font-size: 12px; line-height: 1.7; margin-top: 4px; }
.download-note { font-size: 14px; color: var(--muted); margin-top: 20px; max-width: 75ch; }
.checklist { margin-top: 24px; border: 1px solid var(--line); border-radius: 4px; }
.checklist > summary { padding-inline: 20px; font-size: 16px; color: var(--ink); }
.checklist-body { border-top: 1px solid var(--line); padding: 20px; }
.checklist-body > p { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
textarea { width: 100%; display: block; font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--surface); border: 1px solid var(--line); padding: 16px; border-radius: 4px; resize: vertical; }
.optional-section { padding-top: 64px; }
.optional-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.optional-card { padding: 28px; border-top: 3px solid var(--green); background: var(--surface); min-width: 0; }
.option-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.optional-card h3 { margin-bottom: 16px; font-size: 24px; }
.optional-card p { color: var(--muted); font-size: 16px; margin-top: 12px; }
kbd { display: inline-grid; place-items: center; min-width: 32px; padding: 2px 8px; border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 4px; font: inherit; font-size: 20px; }
.optional-actions { margin-top: 24px; display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.button-secondary { background: var(--surface); color: var(--green); }
.button-secondary:hover { color: var(--surface); }
.optional-card .unavailable { padding: 12px 16px; background: var(--paper); font-size: 14px; margin-top: 24px; border-left: 2px solid var(--line); }
.hotkey-version { color: var(--muted); font-size: 14px; margin-top: 8px; }
.help-note { margin: 48px 0; padding-left: 20px; border-left: 3px solid var(--line); max-width: 75ch; }
.help-note h2 { font-size: 16px; margin-bottom: 8px; letter-spacing: 0; }
.help-note p { font-size: 14px; color: var(--muted); }
.site-footer { padding: 24px 0 40px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 12px; color: var(--muted); }
.site-footer span span { margin: 0 8px; }

@media (max-width: 900px) {
  .hero { gap: 32px; grid-template-columns: 1fr 280px; }
  .inventory { padding: 20px; }
  .install-panel { grid-template-columns: 180px 1fr; gap: 24px; }
  .mod-card, .optional-card { padding: 24px; }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 40px); }
  .site-header { min-height: 96px; gap: 8px; }
  .brand { font-size: 16px; gap: 8px; }
  .brand small { font-size: 12px; letter-spacing: .06em; }
  .brand-mark { grid-template-columns: repeat(2, 9px); gap: 2px; }
  .brand-mark i { height: 9px; }
  nav { gap: 12px; }
  nav a { font-size: 12px; }
  .hero { grid-template-columns: 1fr; padding: 40px 0; gap: 32px; }
  h1 { font-size: 40px; margin: 16px 0; }
  .hero-description { font-size: 16px; }
  .hero-actions { gap: 16px; margin-top: 24px; }
  .inventory { box-shadow: 4px 4px 0 var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; padding: 16px; }
  .inventory-top { grid-column: 1 / -1; font-size: 12px; }
  .inventory-slots { margin: 0; gap: 4px; align-self: center; }
  .slot { font-size: 14px; border-bottom-width: 2px; }
  .inventory-bottom { border: 0; padding: 0; flex-direction: column; gap: 4px; align-items: flex-start; justify-content: center; }
  .inventory-bottom strong { font-size: 24px; }
  .inventory-bottom span { font-size: 12px; }
  .install-panel { grid-template-columns: 1fr; gap: 24px; padding: 28px 0; }
  .section-intro h2 { margin-top: 8px; }
  .install-steps { gap: 20px; }
  .install-steps li { gap: 12px; }
  .install-steps p { font-size: 14px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 20px; }
  h2 { font-size: 24px; }
  .download-section, .optional-section { padding-top: 40px; }
  .mod-grid, .optional-grid { grid-template-columns: 1fr; gap: 12px; }
  .mod-card, .optional-card { padding: 24px; }
  .mod-card h3 { font-size: 24px; }
  .card-actions .button { flex-grow: 1; }
  .checklist-body { padding: 16px; }
  .help-note { margin-block: 32px; }
  .site-footer { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
}

@media (max-width: 360px) {
  .wrap { width: calc(100% - 32px); }
  .site-header { flex-wrap: wrap; padding: 16px 0 8px; }
  nav { width: 100%; justify-content: space-between; }
  h1 { font-size: 32px; }
  .mod-card, .optional-card { padding: 20px; }
  .inventory { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .button:active { transform: none; }
}
