/* 图库路由 — 纸本档案室风格：暖纸底、墨色字、朱砂点缀、极细分隔线 */

:root {
  --paper: #f5f2ea;
  --surface: #fbf9f4;
  --surface-2: #eee9dd;
  --ink: #1e1d1a;
  --ink-soft: #4b473f;
  --muted: #7a7468;
  --line: #dcd5c6;
  --line-strong: #c5bdae;
  --accent: #c4492b;
  --accent-deep: #a93a20;
  --accent-wash: #f8e9e3;
  --teal: #2e6a61;
  --dark: #20201d;
  --dark-line: #3a3934;
  --dark-text: #dedacf;
  --radius: 5px;
  --shadow: 0 18px 50px rgba(30, 29, 26, 0.09);
  --ease: cubic-bezier(0.2, 0.75, 0.25, 1);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

.texture {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(to right, rgba(30, 29, 26, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 29, 26, 0.035) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

main,
.footer {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- 顶栏 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
  padding: 0 clamp(20px, 4vw, 56px);
  background: rgba(245, 242, 234, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 26px;
  height: 26px;
  color: var(--ink);
}

.brand-name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.brand-name small {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-weight: 400;
}

.nav {
  display: flex;
  gap: 34px;
  font-size: 13px;
  color: var(--ink-soft);
}

.nav a {
  position: relative;
  padding: 6px 0;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav a:hover::after {
  transform: scaleX(1);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(46, 106, 97, 0.14);
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
  50% { box-shadow: 0 0 0 6px rgba(46, 106, 97, 0); }
}

/* ---------- 通用 ---------- */

main,
.footer {
  max-width: 1320px;
  margin: 0 auto;
  padding-left: clamp(20px, 4vw, 56px);
  padding-right: clamp(20px, 4vw, 56px);
}

.kicker {
  display: block;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-head h2,
.api h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.section-head p {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 3px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.22s var(--ease), background 0.22s var(--ease), border-color 0.22s var(--ease), color 0.22s var(--ease);
}

.btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.22s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(196, 73, 43, 0.2);
}

.btn-primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

.btn-line {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-line:hover {
  border-color: var(--ink);
  background: rgba(30, 29, 26, 0.035);
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(36px, 5vw, 80px);
  padding: clamp(56px, 7vw, 96px) 0 clamp(64px, 7vw, 100px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.eyebrow-line {
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(44px, 5.4vw, 80px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.lede {
  max-width: 34em;
  margin: 26px 0 34px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 2;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stats {
  display: flex;
  gap: clamp(24px, 4vw, 52px);
  margin: 46px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.stats dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.stats dd {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

/* ---------- 图片舞台 ---------- */

.stage {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  background: var(--dark);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scale(1.012);
  transition: opacity 0.5s var(--ease), transform 0.7s var(--ease);
}

.stage img.is-visible {
  opacity: 1;
  transform: scale(1);
}

.stage-shimmer {
  display: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, #20201d 20%, #34332f 45%, #20201d 70%);
  background-size: 220% 100%;
  animation: sweep 1.5s linear infinite;
}

.stage.is-loading .stage-shimmer {
  display: block;
}

@keyframes sweep {
  to { background-position: -220% 0; }
}

.stage-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--dark-text);
  font-family: var(--serif);
  font-size: 17px;
  background: var(--dark);
}

.stage-error small {
  font-family: var(--mono);
  font-size: 11px;
  color: #8d897f;
}

.stage-error[hidden] {
  display: none;
}

.stage-frame i {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: rgba(245, 242, 234, 0.35);
  border-style: solid;
  pointer-events: none;
}

.stage-frame i:nth-child(1) { top: 14px; left: 14px; border-width: 1px 0 0 1px; }
.stage-frame i:nth-child(2) { top: 14px; right: 14px; border-width: 1px 1px 0 0; }
.stage-frame i:nth-child(3) { bottom: 14px; left: 14px; border-width: 0 0 1px 1px; }
.stage-frame i:nth-child(4) { bottom: 14px; right: 14px; border-width: 0 1px 1px 0; }

.stage-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 34px 20px 16px;
  background: linear-gradient(to top, rgba(20, 20, 18, 0.9), transparent);
  color: var(--dark-text);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
}

/* ---------- 控制台 ---------- */

.console {
  padding: clamp(24px, 3vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.console-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 36px;
}

.field-wide {
  grid-column: 1 / -1;
}

.field-label {
  display: block;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented button {
  min-height: 40px;
  padding: 0 18px;
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font-size: 13px;
  transition: all 0.2s var(--ease);
}

.segmented button:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.segmented button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.domain {
  margin: 10px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--teal);
  word-break: break-all;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips button {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  min-height: 40px;
  padding: 0 14px;
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font-size: 13px;
  transition: all 0.2s var(--ease);
}

.chips button small {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}

.chips button:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.chips button[aria-pressed="true"] {
  background: var(--accent-wash);
  border-color: var(--accent);
  color: var(--accent-deep);
}

.chips button[aria-pressed="true"] small {
  color: var(--accent);
}

.album-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.album-row[hidden] {
  display: none;
}

.album-row label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.album-row select {
  min-width: 180px;
  max-width: 100%;
  padding: 8px 10px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--ink);
  font-size: 12px;
}

.album-hint {
  font-size: 11px;
}

/* ---------- 图库卡片 ---------- */

.catalog {
  padding: clamp(64px, 8vw, 110px) 0 0;
}

.repo-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.repo-card {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.repo-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.repo-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.repo-name {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
}

.repo-tagline {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.repo-total {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.repo-total small {
  display: block;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-align: right;
}

.domains {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 20px 0 10px;
}

.domains span {
  padding: 4px 7px;
  background: var(--surface-2);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-soft);
}

.type-list {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.type-row {
  display: block;
  width: 100%;
  padding: 13px 0 11px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--ink);
}

.type-row:hover .type-name {
  color: var(--accent);
}

.type-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.type-name {
  font-size: 13px;
  transition: color 0.2s var(--ease);
}

.type-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.type-bar {
  display: block;
  height: 2px;
  margin-top: 9px;
  background: var(--line);
}

.type-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 0.5s var(--ease);
}

.repo-foot {
  margin: 16px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}

/* ---------- API 面板 ---------- */

.api {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding: clamp(72px, 9vw, 120px) 0 0;
}

.api-left p {
  max-width: 34em;
  margin: 20px 0 28px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.9;
}

.api-left code,
.api-tip code {
  padding: 2px 5px;
  background: var(--surface-2);
  border-radius: 2px;
  color: var(--accent-deep);
}

.url-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
}

.url-method {
  flex: none;
  padding: 3px 7px;
  background: var(--accent-wash);
  color: var(--accent-deep);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.url-box code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.copy-btn {
  flex: none;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted);
  font-size: 11px;
  transition: all 0.2s var(--ease);
}

.copy-btn:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.api-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.api-tip {
  margin: 22px 0 0 !important;
  font-size: 12px !important;
  color: var(--muted) !important;
}

.api-right {
  min-width: 0;
  overflow: hidden;
  background: var(--dark);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.response-head {
  display: flex;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--dark-line);
  color: #969289;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.resp-status {
  color: #93b8a5;
}

.api-right pre {
  margin: 0;
  padding: 22px 20px 26px;
  max-height: 360px;
  overflow: auto;
  color: var(--dark-text);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ---------- 说明与页脚 ---------- */

.notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: clamp(64px, 8vw, 110px);
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.note {
  display: flex;
  gap: 18px;
}

.note-num {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
  color: var(--accent);
}

.note strong {
  font-size: 13px;
}

.note p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}

.note code {
  color: var(--ink-soft);
}

.footer {
  margin-top: clamp(64px, 8vw, 110px);
  padding-bottom: 36px;
  font-size: 11px;
  color: var(--muted);
}

.footer-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.footer-left,
.footer-right {
  display: flex;
  align-items: center;
  gap: 9px;
}

.footer-right {
  justify-content: flex-end;
  gap: 18px;
}

.footer-left svg,
.footer-badge svg {
  flex: none;
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.footer-copyright {
  text-align: center;
  white-space: nowrap;
}

.footer-copyright a {
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-strong);
}

.footer-copyright a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.stat-num {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--accent-deep);
}

/* ---------- CDN 测速 ---------- */

.retest-btn {
  margin-left: 10px;
  padding: 3px 8px;
  background: transparent;
  color: var(--accent-deep);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  transition: all 0.2s var(--ease);
}

.retest-btn:hover {
  background: var(--accent-wash);
  border-color: var(--accent);
}

.speed {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.speed-loading,
.speed-note {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}

.speed-row {
  display: grid;
  grid-template-columns: 28px 1fr 64px;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-soft);
}

.speed-row b {
  text-align: right;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.speed-track {
  height: 3px;
  background: var(--line);
}

.speed-track i {
  display: block;
  height: 100%;
  background: var(--line-strong);
  transition: width 0.5s var(--ease);
}

.speed-row.is-best .speed-track i {
  background: var(--teal);
}

.speed-row.is-best > span {
  color: var(--teal);
  font-weight: 600;
}

/* ---------- 路径手册 ---------- */

.manual {
  padding-top: clamp(64px, 8vw, 110px);
}

.template {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 18px;
  padding: 18px 22px;
  background: var(--dark);
  border-radius: 3px;
}

.template code {
  font-size: 14px;
  color: #fff;
}

.template span {
  font-size: 11px;
  color: #969289;
}

.manual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 26px;
}

.manual-card {
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.manual-card h3,
.examples-head h3 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.mini-table th {
  width: 106px;
  padding: 9px 10px 9px 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-deep);
}

.mini-table td {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  line-height: 1.75;
}

.mini-table tr:last-child th,
.mini-table tr:last-child td {
  border-bottom: 0;
}

.mini-table code {
  padding: 1px 4px;
  background: var(--surface-2);
  border-radius: 2px;
  font-size: 11px;
  color: var(--ink);
}

.examples-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 42px 0 14px;
}

.examples-head h3 {
  margin: 0;
}

.examples-head p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.example-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 12px;
}

.example-table th {
  padding: 12px 16px;
  text-align: left;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.example-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  vertical-align: middle;
}

.example-table tr:last-child td {
  border-bottom: 0;
}

.example-table tbody tr:hover {
  background: rgba(196, 73, 43, 0.035);
}

.example-table a {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent-deep);
  border-bottom: 1px solid var(--line-strong);
}

.example-table a:hover {
  border-color: var(--accent);
}

.example-count {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

/* ---------- 响应式 ---------- */

@media (max-width: 1080px) {
  .hero { gap: 36px; }
  .repo-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .topbar { height: 64px; }
  .nav, .status { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 52px; }
  .stage { max-width: 100%; }
  .console-grid { grid-template-columns: 1fr; }
  .api { grid-template-columns: 1fr; }
  .repo-cards { grid-template-columns: 1fr; }
  .notes { grid-template-columns: 1fr; gap: 22px; }
  .manual-grid { grid-template-columns: 1fr; }
  .examples-head { display: block; }
  .examples-head p { margin-top: 8px; }
  .footer-card { grid-template-columns: 1fr; gap: 14px; text-align: center; }
  .footer-left, .footer-right { justify-content: center; }
}

@media (max-width: 520px) {
  .hero h1 { font-size: 44px; }
  .lede { font-size: 14px; }
  .stats { gap: 22px; }
  .stats dd { font-size: 24px; }
  .btn { min-height: 46px; padding: 0 16px; font-size: 13px; }
  .section-head { display: block; }
  .section-head p { margin-top: 10px; }
  .repo-card { padding: 20px; }
  .footer-card { padding: 18px; }
  .footer-copyright { white-space: normal; line-height: 1.7; }
}

@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;
  }
}
