/* ProfileSmith 主页 · 证书档案馆 / 铁匠工坊 */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "PingFang SC", monospace;
  --radius: 14px;
  --ease: cubic-bezier(.22, .8, .24, 1);

  /* 浅色：干净的档案柜 */
  --bg: #eef1f0;
  --bg-2: #e3e8ea;
  --surface: #fbfcfb;
  --paper: #fffefa;
  --ink: #12224a;
  --ink-2: #34436a;
  --muted: #5f6b83;
  --line: rgba(19, 40, 93, .13);
  --line-strong: rgba(19, 40, 93, .24);
  --blue: #2b58ab;
  --blue-2: #4c8bda;
  --blue-deep: #13285d;
  --on-blue: #fff;
  --accent: #a96814;
  --ok: #17824a;
  --warn: #a76100;
  --bad: #c2352b;
  --ok-bg: rgba(23, 130, 74, .11);
  --warn-bg: rgba(212, 135, 0, .14);
  --bad-bg: rgba(194, 53, 43, .11);
  --shadow: 0 1px 2px rgba(19, 40, 93, .08), 0 14px 34px -14px rgba(19, 40, 93, .28);
  --card-shadow: 0 2px 4px rgba(19, 40, 93, .08), 0 22px 44px -18px rgba(19, 40, 93, .45);
  --topbar: rgba(238, 241, 240, .82);
  --code-bg: rgba(43, 88, 171, .09);
}

[data-theme="dark"] {
  /* 深色：夜间工坊，锻造火光点缀 */
  --bg: #0a0e18;
  --bg-2: #0f1524;
  --surface: #121a2b;
  --paper: #151e32;
  --ink: #e9eef8;
  --ink-2: #bdc8dd;
  --muted: #8b97b0;
  --line: rgba(143, 172, 230, .14);
  --line-strong: rgba(143, 172, 230, .26);
  --blue: #6f9ef2;
  --blue-2: #9cc0ff;
  --blue-deep: #0d1a3d;
  --on-blue: #071026;
  --accent: #ff8a3d;
  --ok: #43d189;
  --warn: #ffb547;
  --bad: #ff6b5f;
  --ok-bg: rgba(67, 209, 137, .13);
  --warn-bg: rgba(255, 181, 71, .14);
  --bad-bg: rgba(255, 107, 95, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -16px rgba(0, 0, 0, .7);
  --card-shadow: 0 2px 4px rgba(0, 0, 0, .35), 0 28px 50px -20px rgba(0, 0, 0, .85);
  --topbar: rgba(10, 14, 24, .78);
  --code-bg: rgba(111, 158, 242, .13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html[lang="zh-TW"] {
  --font-serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Songti TC", "STSong", "Noto Serif CJK TC", serif;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--blue);
  text-decoration: none;
}

code {
  font-family: var(--font-mono);
  font-size: .88em;
  padding: .08em .38em;
  border-radius: 6px;
  background: var(--code-bg);
  color: var(--ink);
  word-break: break-word;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wrap {
  width: min(1160px, 100% - 40px);
  margin-inline: auto;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--blue);
  color: var(--on-blue);
}

.skip:focus {
  top: 12px;
}

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

/* ---------- 页头 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--topbar);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -.01em;
  font-size: 17px;
  white-space: nowrap;
}

.brand img {
  width: 32px;
  height: 32px;
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}

.nav a {
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 14.5px;
  transition: background-color .2s, color .2s;
}

.nav a:hover {
  background: var(--code-bg);
  color: var(--ink);
}

.controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.lang select {
  appearance: none;
  -webkit-appearance: none;
  height: 32px;
  padding: 0 26px 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237d89a3' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 9px center / 9px 6px;
  color: var(--ink);
  font: 500 13.5px var(--font-sans);
  cursor: pointer;
}

.theme-switch {
  display: flex;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
}

.theme-switch button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color .2s, color .2s;
}

.theme-switch button svg {
  width: 16px;
  height: 16px;
}

.theme-switch button[aria-checked="true"] {
  background: var(--blue);
  color: var(--on-blue);
}

.gh {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: var(--ink-2);
  transition: background-color .2s;
}

.gh:hover {
  background: var(--code-bg);
}

.gh svg {
  width: 21px;
  height: 21px;
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 84px;
  border-bottom: 1px solid var(--line);
  /* 浅色：档案柜抽屉的横向分格线 */
  background:
    linear-gradient(180deg, transparent 0 70%, var(--bg) 100%),
    repeating-linear-gradient(180deg, transparent 0 119px, var(--line) 119px 120px),
    radial-gradient(1200px 520px at 78% 30%, rgba(76, 139, 218, .16), transparent 70%);
}

[data-theme="dark"] .hero {
  background:
    linear-gradient(180deg, transparent 0 70%, var(--bg) 100%),
    repeating-linear-gradient(180deg, transparent 0 119px, rgba(143, 172, 230, .06) 119px 120px),
    radial-gradient(900px 480px at 78% 26%, rgba(64, 108, 210, .22), transparent 70%);
}

.sparks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .8s;
}

[data-theme="dark"] .sparks {
  opacity: 1;
}

.forge-glow {
  position: absolute;
  right: 4%;
  bottom: -220px;
  width: 760px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 122, 40, .34), rgba(255, 92, 20, .12) 55%, transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity .8s;
}

[data-theme="dark"] .forge-glow {
  opacity: 1;
  animation: breathe 5.5s ease-in-out infinite;
}

@keyframes breathe {
  50% {
    transform: scale(1.06);
    opacity: .72;
  }
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: 40px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 22px;
  padding: 5px 12px 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font: 500 12.5px/1.4 var(--font-mono);
  letter-spacing: .02em;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(40px, 5.6vw, 70px);
  line-height: 1.08;
  letter-spacing: -.02em;
}

h1 span {
  display: block;
}

html[lang="en"] h1 {
  font-size: clamp(36px, 4.6vw, 58px);
}

.h1-bottom {
  color: var(--blue);
}

[data-theme="dark"] .h1-bottom {
  background: linear-gradient(100deg, var(--blue-2) 10%, var(--blue) 55%, #ffb27a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 34em;
  margin: 24px 0 0;
  color: var(--ink-2);
  font-size: 17.5px;
}

.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 9px 20px 9px 16px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.25;
  transition: transform .25s var(--ease), box-shadow .25s, background-color .25s;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.btn b {
  display: block;
  font-weight: 650;
}

.btn small {
  display: block;
  font: 12px var(--font-mono);
  opacity: .78;
}

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

.btn-primary {
  background: linear-gradient(180deg, #3a6cc4, #2b58ab);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 10px 22px -10px rgba(43, 88, 171, .8);
}

[data-theme="dark"] .btn-primary {
  background: linear-gradient(180deg, #8bb2ff, #6f9ef2);
  color: #071026;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 12px 28px -12px rgba(111, 158, 242, .8);
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.btn-ghost:hover {
  box-shadow: var(--shadow);
}

.meta {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}

.meta .ver {
  font-family: var(--font-mono);
}

/* ---------- 证书卡片叠 ---------- */

.deck-area {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.deck-stage {
  width: 100%;
  height: 420px;
  display: grid;
  place-items: center;
  perspective: 1400px;
  perspective-origin: 50% 40%;
}

.deck {
  position: relative;
  width: min(372px, 84vw);
  aspect-ratio: 1.56;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 10deg)) rotateY(var(--ry, -16deg));
  transition: transform .6s var(--ease);
}

.deck.is-tracking {
  transition: transform .12s linear;
}

.pcard {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform .75s var(--ease), opacity .6s, filter .6s;
  cursor: pointer;
  container-type: inline-size;
}

.pcard-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform .85s var(--ease);
}

.pcard.is-flipped .pcard-inner {
  transform: rotateY(180deg);
}

.face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  box-shadow: var(--card-shadow);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  font-size: 3.6cqw;
}

.face-back {
  transform: rotateY(180deg);
}

/* 后排卡片用遮罩压暗，避免半透明叠影 */
.face::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--bg);
  opacity: var(--dim, 0);
  pointer-events: none;
  transition: opacity .6s;
}

/* 卡片顶部的蓝色色带，类似证件抬头 */
.face-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 17%;
  padding: 0 5.2cqw;
  background: linear-gradient(100deg, #13285d, #2b58ab 62%, #4c8bda);
  color: #fff;
  font: 600 3.1cqw/1 var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

[data-theme="dark"] .face-band {
  background: linear-gradient(100deg, #0b1636, #23468e 62%, #3d74c7);
}

.face-band .plat {
  padding: .5em .8em;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  letter-spacing: .04em;
  text-transform: none;
}

.face-body {
  position: relative;
  padding: 4cqw 5.2cqw 0;
}

.seal {
  position: absolute;
  right: 5cqw;
  top: 4cqw;
  display: grid;
  place-items: center;
  width: 13cqw;
  height: 13cqw;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #5f95e0, #2b58ab 60%, #13285d);
  color: #fff;
  font: 700 6.4cqw/1 var(--font-sans);
  box-shadow: 0 0 0 1.1cqw rgba(43, 88, 171, .12), inset 0 -2px 4px rgba(0, 0, 0, .25);
}

.pc-name {
  margin: 0;
  max-width: 76%;
  font: 700 5.2cqw/1.2 var(--font-serif);
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-bundle {
  margin: .5em 0 0;
  color: var(--blue);
  font: 500 3.3cqw/1.2 var(--font-mono);
}

.pc-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.6cqw 4cqw;
  margin: 4.4cqw 0 0;
}

.pc-fields div {
  min-width: 0;
}

.pc-fields dt {
  color: var(--muted);
  font: 500 2.7cqw/1.2 var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.pc-fields dd {
  margin: .35em 0 0;
  font-size: 3.6cqw;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-fields .mono {
  font-family: var(--font-mono);
  font-weight: 500;
}

.face-foot {
  position: absolute;
  left: 5.2cqw;
  right: 5.2cqw;
  bottom: 4cqw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.uuid {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--muted);
  font: 2.8cqw/1 var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 背面：Entitlements 清单 */
.face-back .face-band {
  background: linear-gradient(100deg, #1d2a44, #34466b);
}

[data-theme="dark"] .face-back .face-band {
  background: linear-gradient(100deg, #2a1709, #6b3514 60%, #b65a1e);
}

.ents {
  margin: 0;
  padding: 3.6cqw 5.2cqw 0;
  list-style: none;
  font: 3.05cqw/1.55 var(--font-mono);
}

.ents li {
  display: flex;
  gap: .6em;
  white-space: nowrap;
  overflow: hidden;
}

.ents .k {
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 1 auto;
}

.ents .v {
  flex: none;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ents .v.t {
  color: var(--ok);
}

.ents .v.f {
  color: var(--bad);
}

.ents .v.s {
  color: var(--blue);
}

.cert {
  color: var(--muted);
  font: 2.7cqw/1.3 var(--font-mono);
}

/* 状态徽章：红黄绿，带呼吸光环 */
.badge {
  --tone: var(--ok);
  --tone-bg: var(--ok-bg);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: .42em .85em .42em .7em;
  border-radius: 999px;
  background: var(--tone-bg);
  color: var(--tone);
  font-weight: 650;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}

.face .badge {
  font-size: 3.2cqw;
}

.badge[data-tone="warn"] {
  --tone: var(--warn);
  --tone-bg: var(--warn-bg);
}

.badge[data-tone="bad"] {
  --tone: var(--bad);
  --tone-bg: var(--bad-bg);
}

.badge i {
  position: relative;
  width: .6em;
  height: .6em;
  border-radius: 50%;
  background: var(--tone);
}

.badge i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--tone);
  animation: pulse 2.8s ease-out infinite;
}

.badge[data-tone="warn"] i::after {
  animation-duration: 1.8s;
}

.badge[data-tone="bad"] i::after {
  animation-duration: 1.15s;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: .7;
  }
  100% {
    transform: scale(3.2);
    opacity: 0;
  }
}

.deck-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
  margin-top: 6px;
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: 500 13.5px var(--font-sans);
  cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s;
}

.chip-btn svg {
  width: 15px;
  height: 15px;
}

.chip-btn:hover {
  transform: translateY(-1px);
  border-color: var(--blue);
}

.deck-note {
  color: var(--muted);
  font: 12px var(--font-mono);
}

/* ---------- 通用区块 ---------- */

.section {
  padding: 96px 0;
}

.sec-head {
  max-width: 720px;
  margin-bottom: 44px;
}

.code {
  margin: 0 0 12px;
  color: var(--accent);
  font: 600 12.5px var(--font-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.18;
  letter-spacing: -.015em;
}

.sub {
  margin: 16px 0 0;
  color: var(--ink-2);
  font-size: 16.5px;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--delay, 0s);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* 到期看板 */
.stamps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.stamp {
  --tone: var(--ok);
  position: relative;
  padding: 26px 24px 24px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--tone);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease);
}

.stamp[data-tone="warn"] {
  --tone: var(--warn);
}

.stamp[data-tone="bad"] {
  --tone: var(--bad);
}

.stamp:hover {
  transform: translateY(-4px) rotate(-.4deg);
}

.stamp h3 {
  margin: 18px 0 8px;
  font: 700 21px/1.3 var(--font-serif);
}

.stamp p {
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
}

/* 功能索引：抽屉里的索引卡 */
.drawer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.icard {
  position: relative;
  padding: 30px 24px 24px;
  border: 1px solid var(--line);
  border-radius: 4px 14px 14px 14px;
  background: var(--paper);
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s;
}

/* 索引卡顶部的凸起标签 */
.icard::before {
  content: attr(data-tab);
  position: absolute;
  left: -1px;
  top: -22px;
  height: 22px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: var(--paper);
  color: var(--accent);
  font: 600 11.5px/22px var(--font-mono);
  letter-spacing: .1em;
}

.drawer {
  row-gap: 40px;
  padding-top: 22px;
}

.icard:hover {
  transform: translateY(-5px);
}

.icard .ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--code-bg);
  color: var(--blue);
}

.icard .ico svg {
  width: 21px;
  height: 21px;
}

.icard h3 {
  margin: 16px 0 6px;
  font: 700 18.5px/1.3 var(--font-serif);
}

.icard p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.8px;
}

/* 截图 */
.window-sec {
  background: linear-gradient(180deg, transparent, var(--bg-2) 30%, var(--bg-2) 70%, transparent);
}

.shot-tabs {
  display: inline-flex;
  gap: 2px;
  margin-bottom: 18px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
}

.shot-tabs button {
  height: 30px;
  padding: 0 16px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-2);
  font: 500 14px var(--font-sans);
  cursor: pointer;
}

.shot-tabs button[aria-selected="true"] {
  background: var(--blue);
  color: var(--on-blue);
}

.shot {
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  background: #1b1d22;
}

.shot img {
  display: block;
  width: 100%;
  transition: opacity .35s;
}

/* 归档预览 */
.archive-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  align-items: center;
}

.filetypes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.ft {
  padding: 12px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: 600 15px var(--font-mono);
  animation: bob 5s ease-in-out infinite;
  animation-delay: calc(var(--d) * -.8s);
}

.ft-key {
  border-style: solid;
  border-color: var(--blue);
  color: var(--blue);
}

@keyframes bob {
  50% {
    transform: translateY(-6px);
  }
}

/* 快捷键 */
.keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.keys li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 15px;
}

.kbd {
  flex: none;
  min-width: 58px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 3px;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: 600 13.5px var(--font-mono);
  text-align: center;
}

/* 安装 */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  position: relative;
  padding: 20px 22px 20px 70px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 15.5px;
}

.steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 20px;
  top: 18px;
  color: var(--accent);
  font: 700 22px var(--font-mono);
}

.downloads-end {
  align-items: center;
  margin-top: 36px;
}

.text-link {
  padding: 8px 6px;
  font-weight: 600;
}

/* 页脚 */
.footer {
  padding: 34px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.footer-links a {
  color: var(--ink-2);
}

.footer-links a:hover {
  color: var(--blue);
}

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

@media (max-width: 980px) {
  .hero-grid,
  .archive-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding-top: 48px;
  }

  .deck-stage {
    height: 360px;
  }

  .drawer,
  .keys {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  .nav {
    display: none;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: calc(100% - 32px);
  }

  .topbar-inner {
    gap: 10px;
  }

  .brand {
    font-size: 16px;
    gap: 8px;
  }

  .brand img {
    width: 28px;
    height: 28px;
  }

  .controls {
    gap: 6px;
  }

  .lang select {
    padding: 0 22px 0 8px;
    background-position: right 7px center;
  }

  .theme-switch button {
    width: 25px;
  }

  .section {
    padding: 72px 0;
  }

  .lead {
    font-size: 16.5px;
  }

  .btn {
    flex: 1 1 100%;
  }

  .stamps,
  .drawer,
  .keys,
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .deck-stage {
    height: 300px;
  }

  .deck {
    width: min(330px, 80vw);
    margin-right: 44px;
  }

  /* 手机上索引卡改成图标在左的紧凑排版 */
  .icard {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 14px;
    padding: 22px 18px 18px;
  }

  .icard h3 {
    margin: 8px 0 4px;
  }

  .icard p {
    grid-column: 1 / -1;
    margin-top: 6px;
  }
}

@media (max-width: 370px) {
  .brand span {
    display: none;
  }
}

/* 减少动态效果：关闭动画与过渡位移 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
