:root {
  --bg: #f4f1e8;
  --surface: #eef3ec;
  --surface-2: #e4ebe3;
  --text: #2c332c;
  --text-muted: #5c675c;
  --accent: #8f2d26;
  --accent-ink: #f7f3ea;
  --border: #c5d0c4;
  --ring: #6b8f71;
  --ok: #3d6b4f;
  --warn: #8a5a22;
  --danger: #8f2d26;
  --info: #3d5c6b;
  --cta-face: #8f2d26;
  --cta-ink: #f7f3ea;
  --cta-wash: rgba(42, 16, 12, 0.28);
  --cta-press: rgba(28, 10, 8, 0.22);
  --font-serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  --font-sans: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  --fs-h1: 36px;
  --fs-h2: 24px;
  --fs-h3: 18px;
  --fs-body: 16px;
  --fs-small: 13px;
  --lh-h1: 1.22;
  --lh-h2: 1.28;
  --lh-body: 1.7;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-1: 0 1px 2px rgba(44, 51, 44, 0.06);
  --shadow-2: 0 6px 16px rgba(44, 51, 44, 0.08);
  --shadow-3: 0 10px 28px rgba(44, 51, 44, 0.12);
  --container: 760px;
  --container-wide: 1180px;
  --ease: cubic-bezier(.2, .7, .3, 1);
  --dur: 180ms;
  --cta-loop: 2.8s;
  --cta-ease: cubic-bezier(.2, .7, .3, 1);
}

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

html {
  color-scheme: light;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  font-size: var(--fs-body);
  line-height: 1.7;
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  letter-spacing: 0;
  text-align: left;
  overflow-wrap: break-word;
  word-break: normal;
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #6e201b;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
.term-chip:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip:focus {
  left: var(--space-4);
  top: var(--space-4);
  z-index: 80;
  background: var(--surface);
  padding: var(--space-2) var(--space-4);
}

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: var(--space-3) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text);
  text-decoration: none;
  min-height: 44px;
}

.brand:hover {
  color: var(--text);
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  cursor: pointer;
}

.floor-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  align-items: center;
}

.floor-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
}

.floor-nav a:hover,
.floor-nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.wrap-wide {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.section {
  padding-block: var(--space-7);
}

.section-tight {
  padding-block: var(--space-6);
}

.hero {
  padding-block: var(--space-8);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-7);
  align-items: center;
}

h1 {
  font-family: var(--font-serif);
  font-size: 36px;
  font-size: var(--fs-h1);
  line-height: 1.22;
  line-height: var(--lh-h1);
  font-weight: 600;
  margin: 0 0 var(--space-5);
  word-break: keep-all;
}

h2 {
  font-family: var(--font-sans);
  font-size: 24px;
  font-size: var(--fs-h2);
  line-height: 1.28;
  line-height: var(--lh-h2);
  font-weight: 700;
  margin: 0 0 var(--space-4);
  word-break: keep-all;
}

h3 {
  font-size: 18px;
  font-size: var(--fs-h3);
  line-height: 1.35;
  font-weight: 700;
  margin: 0 0 var(--space-3);
}

p {
  margin: 0 0 var(--space-4);
}

.lede {
  font-size: 17px;
  margin-bottom: var(--space-5);
}

.kicker {
  font-size: var(--fs-small);
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.hero-figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}

.hero-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-figure figcaption {
  font-size: var(--fs-small);
  color: var(--text-muted);
  padding: var(--space-3) var(--space-4);
}

.plaque-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.plaque {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
}

.plaque summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  gap: var(--space-4);
  align-items: baseline;
  min-height: 44px;
}

.plaque summary::-webkit-details-marker {
  display: none;
}

.plaque-no {
  flex: 0 0 auto;
  font-family: var(--font-serif);
  color: var(--accent);
  font-size: 20px;
  white-space: nowrap;
}

.plaque-title {
  font-weight: 700;
}

.plaque p:last-child {
  margin-bottom: 0;
}

.split {
  display: grid;
  grid-template-columns: 1.6fr 0.8fr;
  gap: var(--space-6);
  align-items: start;
}

.side-note {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

th,
td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--surface-2);
  font-weight: 700;
  white-space: nowrap;
}

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

.quotes {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.quote {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

.quote p:last-child {
  margin-bottom: 0;
}

.quote footer {
  margin-top: var(--space-3);
  color: var(--text-muted);
  font-size: var(--fs-small);
}

.index-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3) var(--space-6);
}

.index-list a {
  display: block;
  padding: var(--space-3) 0;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  min-height: 44px;
}

.index-list a:hover {
  color: var(--accent);
}

.index-list small {
  display: block;
  color: var(--text-muted);
  font-size: var(--fs-small);
}

.faq details {
  border-bottom: 1px solid var(--border);
  padding: var(--space-4) 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.term-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.term-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-sm);
  min-height: 44px;
  padding: 0 var(--space-4);
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
}

.term-chip[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.grade-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.grade {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

.grade strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}

.steps li {
  counter-increment: step;
  padding: var(--space-4) 0 var(--space-4) 48px;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: var(--space-4);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  color: var(--accent);
}

.muted {
  color: var(--text-muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-7) 0 var(--space-6);
  margin-top: var(--space-4);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: var(--space-6);
}

.site-footer h2 {
  font-size: 15px;
  margin-bottom: var(--space-3);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: var(--space-2);
}

.site-footer a {
  color: var(--text);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

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

.footer-brand {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
}

.footer-copy {
  margin-top: var(--space-6);
  color: var(--text-muted);
  font-size: var(--fs-small);
}

.site-cta {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(520px, 38vw);
  min-width: 400px;
  min-height: 56px;
  padding: 12px 28px;
  background: var(--cta-face);
  color: var(--cta-ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
}

.site-cta:hover,
.site-cta:focus-visible {
  color: var(--cta-ink);
  background: #6e201b;
}

.site-cta:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}

.site-cta:active {
  box-shadow: inset 0 2px 8px var(--cta-press);
}

.site-cta::before,
.site-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.site-cta::before {
  background: radial-gradient(120% 140% at 28% 50%, var(--cta-wash) 0%, transparent 70%);
  opacity: 0;
  animation: cta-glaze var(--cta-loop) var(--cta-ease) infinite;
}

.site-cta::after {
  box-shadow: inset 0 0 0 rgba(28, 10, 8, 0);
  animation: cta-plaque var(--cta-loop) var(--cta-ease) infinite;
}

.site-cta > span {
  position: relative;
  z-index: 1;
}

@keyframes cta-glaze {
  0%, 55% {
    opacity: 0;
  }
  68% {
    opacity: 0.28;
  }
  86%, 100% {
    opacity: 0;
  }
}

@keyframes cta-plaque {
  0%, 62% {
    box-shadow: inset 0 0 0 rgba(28, 10, 8, 0);
  }
  74% {
    box-shadow: inset 0 3px 10px var(--cta-press);
  }
  88%, 100% {
    box-shadow: inset 0 0 0 rgba(28, 10, 8, 0);
  }
}

@media (max-width: 1279px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .grade-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 899px) {
  .split {
    grid-template-columns: 1fr;
  }

  .index-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 639px) {
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 22px;
  }

  .header-inner {
    padding: var(--space-3) var(--space-4);
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .floor-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: var(--space-3) var(--space-4) var(--space-4);
    flex-direction: column;
    align-items: stretch;
    z-index: 30;
  }

  .site-header {
    position: relative;
  }

  .floor-nav.is-open {
    display: flex;
  }

  .floor-nav a {
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  .wrap,
  .wrap-wide {
    padding: 0 var(--space-4);
  }

  .hero {
    padding-block: var(--space-7);
  }

  .site-cta {
    left: 14px;
    right: 14px;
    width: auto;
    min-width: 0;
    transform: none;
    white-space: normal;
    min-height: 54px;
    font-size: 15px;
  }

  .grade-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-cta::before,
  .site-cta::after {
    animation: none;
  }

  .site-cta::before {
    opacity: 0;
  }

  .site-cta::after {
    box-shadow: inset 0 2px 8px var(--cta-press);
  }

  .floor-nav {
    transition: none;
  }
}
