:root {
  color-scheme: light;
  --paper: #f7f4ec;
  --ink: #1f2925;
  --muted: #545d54;
  --accent: #9d3c22;
  --line: #d4d7ca;
  --dark: #222f2a;
  --dark-text: #f5f2e9;
  --serif: "Songti SC", "Noto Serif CJK SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.65 var(--sans);
}

h1, h2, h3, p, figure { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
a:focus-visible { outline: 3px solid #d56b41; outline-offset: 4px; }

.shell {
  width: min(73.75rem, calc(100% - 5rem));
  margin-inline: auto;
}

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

.header-content,
.site-footer {
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.035em;
  text-decoration: none;
}

nav { display: flex; align-items: center; gap: clamp(1rem, 2.8vw, 2.25rem); }
nav a, .site-footer > a:last-child { text-decoration: none; }
nav a:hover, .site-footer > a:last-child:hover { text-decoration: underline; text-underline-offset: .3em; }
.nav-download { color: var(--accent); font-weight: 700; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4.5rem);
  padding-block: clamp(3rem, 7.2vw, 6.5rem);
}

.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .13em; font-size: .875rem; }

h1, h2 { font-family: var(--serif); font-weight: 700; }
h1 {
  font-size: clamp(2.85rem, 5.15vw, 4.8rem);
  line-height: 1.16;
  letter-spacing: -.055em;
  margin-top: .8rem;
}
h2 { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.25; letter-spacing: -.035em; }
h3 { font-size: 1.18rem; line-height: 1.35; }

.intro {
  font-size: clamp(1.05rem, 1.45vw, 1.2rem);
  max-width: 25em;
  margin: 1.25rem 0 1.6rem;
  color: var(--muted);
}

.button {
  display: inline-block;
  border-radius: 4px;
  padding: .7rem 1.35rem;
  color: white;
  background: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.button:hover { background: #7d2b17; }
.platforms { margin-top: .65rem; color: var(--muted); font-size: .875rem; }

.example {
  background: var(--dark);
  color: var(--dark-text);
  border-radius: 12px;
  padding: clamp(.75rem, 2.6vw, 1.75rem);
  box-shadow: 0 16px 34px #252e2720;
}

.example-heading, .example figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .85rem;
  font-size: .875rem;
}
.example-heading { justify-content: space-between; margin-bottom: 1rem; font-weight: 700; }
.example-label { color: #cad4c7; font-weight: 400; }
.sheets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.sheet { min-width: 0; background: #fffdf7; color: var(--ink); border-radius: 4px; overflow: hidden; }
.file-name {
  padding: .6rem clamp(.65rem, 1.55vw, 1.1rem);
  border-bottom: 1px solid #e3dfd2;
  background: #eeeadf;
  font-size: .875rem;
  font-weight: 700;
}
.sheet-body {
  font-family: var(--serif);
  padding: clamp(.75rem, 2vw, 1.6rem) clamp(.65rem, 1.55vw, 1.1rem);
}
.clause { font-weight: 700; }
.clause:not(:first-child) { margin-top: 1.2rem; }
.clause + p { margin-top: .3rem; }
mark { padding: 0 .12em; color: inherit; white-space: nowrap; }
.original mark { background: #ffd7c7; box-shadow: 0 2px #b6583c; }
.revised mark { background: #dbe7c7; box-shadow: 0 2px #69834a; }
.example figcaption { margin-top: 1rem; color: #cad4c7; }
.example figcaption span { color: #ffc2a5; font-weight: 700; }

.feature-section { background: #e9ece3; border-block: 1px solid var(--line); }
.feature-section .shell, .downloads { padding-block: clamp(3rem, 7vw, 5.5rem); }
.feature-heading {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: end;
  gap: .55rem 2.5rem;
  margin-bottom: 1.75rem;
}
.feature-heading .eyebrow { grid-column: 1 / -1; }
.feature-heading p:last-child { max-width: 33rem; color: var(--muted); }

.product-shot { margin-top: 1rem; }
.product-shot a {
  display: block;
  overflow: hidden;
  border: 1px solid #bcbeb2;
  border-radius: 6px;
  background: #eeeadf;
}
.product-shot img { width: 100%; height: auto; }
.product-shot figcaption { color: var(--muted); font-size: .875rem; margin-top: .5rem; }
.feature-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.feature-list > div { border-top: 1px solid #a1ad9e; padding-top: .95rem; }
.feature-list p { margin-top: .4rem; color: var(--muted); }

.download-intro { margin-top: .6rem; color: var(--muted); }
.download-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.download-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; background: #fffdf7; padding: clamp(1rem, 3vw, 2rem); }
.download-card h3 { font-size: 1.55rem; overflow-wrap: anywhere; }
.download-card p { margin-top: .5rem; color: var(--muted); overflow-wrap: anywhere; }
.download-card .format { color: var(--ink); font-weight: 700; }
.download-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1rem; margin-top: auto; padding-top: 1.15rem; }
.site-footer { border-top: 1px solid var(--line); }
.site-footer .brand { font-size: 1rem; }

@media (max-width: 54rem) {
  .shell { width: min(42rem, calc(100% - 3rem)); }
  .hero, .feature-heading { grid-template-columns: 1fr; }
  .hero { gap: 2rem; }
  .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 31rem) {
  .shell { width: calc(100% - 2rem); }
  .header-content { min-height: 4rem; }
  .brand { font-size: 1.06rem; gap: .35rem; }
  .header-content .brand img { width: 28px; height: 28px; }
  .download-options { grid-template-columns: 1fr; }
}
