* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --ink: #17130f;
  --muted: #665e55;
  --paper: #fbf7f0;
  --panel: #ffffff;
  --accent: #d94f35;
  --accent-2: #287c76;
  --line: #e5d8c8;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.75;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding: 14px max(18px, calc((100vw - 1120px) / 2));
  background: rgba(251, 247, 240, 0.94);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 800;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 14px;
}

section {
  padding: 72px 0;
}

.hero-panel {
  padding: 92px 0 78px;
  background: linear-gradient(135deg, #2b2119 0%, #4b2a24 45%, #174a47 100%);
  color: #fff8ef;
}

.hero-grid,
.about-layout,
.app-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 36px;
  align-items: center;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.12;
}

h2 {
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.25;
}

h3 {
  font-size: 19px;
  line-height: 1.35;
}

.eyebrow,
.meta {
  color: var(--accent-2);
  font-size: 14px;
  font-weight: 700;
}

.hero-panel .eyebrow,
.hero-panel .meta {
  color: #ffcc7a;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-actions a {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 6px;
  background: #fff8ef;
  color: #1b1612;
  font-weight: 700;
}

.hero-stack {
  display: grid;
  gap: 14px;
  transform: rotate(-2deg);
}

.hero-stack span {
  display: block;
  padding: 34px 28px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 28px;
  font-weight: 800;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(220px, 0.48fr) minmax(0, 1fr);
  gap: 26px;
  margin-bottom: 28px;
  align-items: end;
}

.card-grid,
.feature-grid,
.app-cards,
.question-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-grid article:first-child {
  grid-column: span 2;
  background: #2b2119;
  color: #fff8ef;
}

article,
.tag-board a,
.rank-board li {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.rank-board {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.rank-board li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.rank-board span {
  font-size: 28px;
  font-weight: 900;
  color: var(--accent);
}

.tag-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.tag-board span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.about-block {
  background: #fffaf4;
}

.about-copy p {
  min-height: 0;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.app-block:nth-child(even),
.story-block:nth-child(odd) {
  background: #f1ece4;
}

.site-footer {
  padding: 36px 0;
  background: #1f1914;
  color: #f7eadb;
}

.footer-grid {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

@media (max-width: 820px) {
  .site-header,
  .hero-grid,
  .about-layout,
  .app-layout,
  .section-head {
    grid-template-columns: 1fr;
  }

  .site-header {
    position: static;
    display: grid;
  }

  .card-grid,
  .feature-grid,
  .app-cards,
  .question-list,
  .tag-board {
    grid-template-columns: 1fr;
  }

  .feature-grid article:first-child {
    grid-column: auto;
  }

  .rank-board li {
    grid-template-columns: 48px 1fr;
  }

  .rank-board em {
    grid-column: 2;
  }
}
