:root {
  --ink: #16211f;
  --muted: #52615e;
  --forest: #123a34;
  --forest-light: #1e594f;
  --jade: #2f7969;
  --jade-pale: #e3f0ec;
  --gold: #e9b949;
  --cream: #f8f5ed;
  --paper: #fffefa;
  --line: #d8e1de;
  --shadow: 0 24px 70px rgba(18, 58, 52, 0.16);
  --radius: 18px;
  --wrap: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
.wrap { width: min(calc(100% - 40px), var(--wrap)); margin-inline: auto; }
.narrow-wrap { max-width: 860px; }
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 10px 16px; color: white; background: var(--forest);
  border-radius: 8px; transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 254, 250, 0.94);
  border-bottom: 1px solid rgba(18, 58, 52, 0.1);
  backdrop-filter: blur(14px);
}
.header-inner { min-height: 76px; display: flex; align-items: center; gap: 28px; }
.brand {
  display: inline-flex; align-items: center; gap: 11px; color: var(--forest);
  font-size: 1.08rem; font-weight: 760; letter-spacing: -0.02em;
  text-decoration: none; white-space: nowrap;
}
.brand-mark {
  display: inline-grid; width: 43px; height: 43px; place-items: center;
  color: white; background: var(--forest); border-radius: 12px;
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 0.8rem; font-weight: 700; letter-spacing: -0.08em;
  box-shadow: 0 7px 18px rgba(18, 58, 52, 0.18);
}
.primary-nav { display: flex; align-items: center; gap: 23px; margin-left: auto; }
.primary-nav a { color: #33433f; font-size: 0.9rem; font-weight: 650; text-decoration: none; }
.primary-nav a:hover, .primary-nav a:focus-visible, .text-link:hover, .text-link:focus-visible { color: var(--jade); }

.button {
  display: inline-flex; min-height: 50px; align-items: center; justify-content: center;
  padding: 12px 22px; color: white; background: var(--forest);
  border: 2px solid var(--forest); border-radius: 12px; font-weight: 750;
  text-decoration: none; box-shadow: 0 10px 25px rgba(18, 58, 52, 0.16);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.button:hover, .button:focus-visible {
  background: var(--forest-light); border-color: var(--forest-light);
  box-shadow: 0 13px 30px rgba(18, 58, 52, 0.22); transform: translateY(-1px);
}
.button-small { min-height: 42px; padding: 8px 16px; font-size: 0.9rem; }
.button-light { color: var(--forest); background: white; border-color: white; }
.button-light:hover, .button-light:focus-visible { color: var(--forest); background: var(--cream); border-color: var(--cream); }
.text-link {
  display: inline-flex; align-items: center; gap: 8px; color: var(--forest);
  font-weight: 760; text-underline-offset: 4px;
}

.hero {
  overflow: hidden; padding: 104px 0 96px;
  background: radial-gradient(circle at 86% 15%, rgba(47, 121, 105, 0.18), transparent 27%),
    linear-gradient(135deg, #fffefa 0%, #f8f5ed 55%, #eaf3ef 100%);
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.95fr);
  align-items: center; gap: clamp(44px, 7vw, 90px);
}
.eyebrow {
  margin: 0 0 13px; color: var(--jade); font-size: 0.78rem;
  font-weight: 820; letter-spacing: 0.13em; text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.14; }
h1 {
  max-width: 760px; margin-bottom: 24px; color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 6vw, 5.5rem); font-weight: 650;
  letter-spacing: -0.055em;
}
h2 {
  margin-bottom: 18px; color: var(--forest); font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.15rem, 4vw, 3.35rem); font-weight: 650; letter-spacing: -0.035em;
}
h3 { margin-bottom: 10px; color: var(--forest); font-size: 1.18rem; }
.hero-lede {
  max-width: 660px; margin-bottom: 30px; color: #3c4a47;
  font-size: clamp(1.1rem, 2vw, 1.28rem);
}
.hero-actions { display: flex; align-items: center; gap: 24px; }
.availability { max-width: 650px; margin: 24px 0 0; color: var(--muted); font-size: 0.94rem; }

.reader-demo {
  position: relative; background: white; border: 1px solid rgba(18, 58, 52, 0.16);
  border-radius: 22px; box-shadow: var(--shadow); transform: rotate(1.2deg);
}
.reader-demo::before {
  position: absolute; inset: -20px auto auto -24px; z-index: -1;
  width: 130px; height: 130px; background: var(--gold);
  border-radius: 50%; content: ""; opacity: 0.5;
}
.demo-toolbar {
  display: flex; align-items: center; gap: 7px; padding: 14px 17px;
  color: #59706a; background: #edf4f1; border-bottom: 1px solid var(--line);
  border-radius: 22px 22px 0 0; font-size: 0.82rem; font-weight: 700;
}
.demo-dot { width: 9px; height: 9px; background: #adc5bf; border-radius: 50%; }
.demo-label { margin-left: 6px; }
.demo-body { padding: clamp(28px, 5vw, 50px); }
.chinese-text {
  margin-bottom: 34px; color: var(--forest);
  font-family: "Noto Serif TC", "Microsoft JhengHei", serif;
  font-size: clamp(2rem, 4vw, 3.15rem); letter-spacing: 0.06em; line-height: 1.45;
}
.chinese-text::first-letter { padding: 2px 5px 4px; color: white; background: var(--jade); border-radius: 6px; }
.lookup-card { padding: 20px; background: var(--cream); border-left: 4px solid var(--gold); border-radius: 10px; }
.lookup-card > div { display: flex; align-items: baseline; gap: 13px; }
.lookup-character {
  color: var(--forest); font-family: "Microsoft JhengHei", sans-serif;
  font-size: 2rem; font-weight: 700;
}
.lookup-pinyin { color: var(--jade); font-weight: 800; }
.lookup-card p { margin-bottom: 12px; color: #374a46; }
.known-status { color: var(--muted); font-size: 0.8rem; font-weight: 700; }

.trust-strip { color: white; background: var(--forest); }
.trust-items {
  min-height: 72px; display: flex; align-items: center; justify-content: center;
  gap: 44px; font-size: 0.9rem; font-weight: 700; text-align: center;
}
.trust-items span + span::before {
  margin-right: 44px; color: var(--gold); content: "◆";
  font-size: 0.55rem; vertical-align: middle;
}

.section { padding: 100px 0; }
.section-heading { max-width: 740px; margin-bottom: 48px; }
.section-heading > p:last-child, .split-section > div > p, .story-copy { color: var(--muted); font-size: 1.05rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step-card {
  padding: 30px; background: white; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 10px 30px rgba(18, 58, 52, 0.06);
}
.step-card p { margin-bottom: 0; color: var(--muted); }
.step-number {
  display: grid; width: 38px; height: 38px; margin-bottom: 23px; place-items: center;
  color: var(--forest); background: var(--jade-pale); border-radius: 50%; font-weight: 850;
}
.section-tinted { background: var(--cream); }
.split-section, .story-grid {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  align-items: center; gap: clamp(50px, 8vw, 110px);
}
.edition-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.edition-card {
  min-height: 260px; display: flex; flex-direction: column; align-items: flex-start;
  padding: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
}
.edition-card p { color: var(--muted); }
.edition-card a { margin-top: auto; }
.edition-primary {
  color: white; background: var(--forest); border-color: var(--forest);
  box-shadow: 0 17px 38px rgba(18, 58, 52, 0.2);
}
.edition-primary h3, .edition-primary p { color: white; }
.edition-primary .button { color: var(--forest); background: white; border-color: white; box-shadow: none; }
.edition-tag {
  margin-bottom: 27px; padding: 5px 9px; color: var(--jade); background: var(--jade-pale);
  border-radius: 999px; font-size: 0.7rem; font-weight: 850;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.edition-primary .edition-tag { color: var(--forest); background: var(--gold); }
.story-grid { align-items: start; }
.story-copy p { margin-bottom: 18px; }

.section-history { padding-top: 10px; }
details { background: #f5f7f5; border: 1px solid var(--line); border-radius: var(--radius); }
summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 23px 26px; color: var(--forest); cursor: pointer; list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary span:first-child { display: flex; flex-direction: column; }
summary small { margin-top: 3px; color: var(--muted); font-weight: 500; }
.summary-icon { font-size: 1.5rem; line-height: 1; transition: transform 160ms ease; }
details[open] .summary-icon { transform: rotate(45deg); }
.historical-copy { padding: 8px 26px 28px; color: var(--muted); border-top: 1px solid var(--line); }
.historical-copy h3 { margin-top: 30px; }
.historical-copy p:last-child { margin-bottom: 0; }

.cta-section { padding: 70px 0; color: white; background: var(--forest); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 35px; }
.cta-section .eyebrow { color: #92c9bd; }
.cta-section h2 { margin-bottom: 0; color: white; }

.site-footer { padding: 72px 0 26px; color: #d8e4e1; background: #0b2924; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 50px; padding-bottom: 52px; }
.footer-brand { color: white; }
.footer-brand .brand-mark { color: var(--forest); background: var(--gold); }
.footer-grid > div p { max-width: 260px; margin-top: 17px; color: #aac0bb; }
.footer-grid nav { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.footer-grid h2 {
  margin: 0 0 7px; color: white; font-family: inherit; font-size: 0.78rem;
  font-weight: 850; letter-spacing: 0.1em; text-transform: uppercase;
}
.footer-grid nav a { color: #c5d5d1; font-size: 0.88rem; text-decoration: none; }
.footer-grid nav a:hover, .footer-grid nav a:focus-visible { color: white; text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom {
  display: flex; justify-content: space-between; padding-top: 23px;
  color: #8fa8a2; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.8rem;
}
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

@media (max-width: 1040px) {
  .primary-nav { display: none; }
  .header-inner .button { margin-left: auto; }
  .hero-grid { grid-template-columns: 1fr 0.82fr; gap: 44px; }
  .edition-cards { grid-template-columns: 1fr; }
  .edition-card { min-height: 230px; }
}

@media (max-width: 780px) {
  .wrap { width: min(calc(100% - 30px), var(--wrap)); }
  .site-header { position: static; }
  .header-inner { min-height: 68px; }
  .brand { font-size: 0.98rem; }
  .brand-mark { width: 38px; height: 38px; }
  .button-small { min-height: 40px; padding: 7px 12px; font-size: 0.82rem; }
  .hero { padding: 67px 0 70px; }
  .hero-grid, .split-section, .story-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 60px; }
  h1 { font-size: clamp(2.75rem, 13vw, 4.25rem); }
  .reader-demo { max-width: 560px; transform: none; }
  .trust-items { flex-direction: column; gap: 6px; padding: 20px 0; }
  .trust-items span + span::before { display: none; }
  .section { padding: 75px 0; }
  .steps, .edition-cards { grid-template-columns: 1fr; }
  .cta-inner { align-items: flex-start; flex-direction: column; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
  .header-inner { gap: 12px; }
  .brand { gap: 8px; font-size: 0.86rem; }
  .brand-mark { flex: 0 0 36px; width: 36px; height: 36px; }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .chinese-text { font-size: 1.8rem; }
  .split-section, .story-grid { gap: 38px; }
  .edition-card, .step-card { padding: 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
  .footer-bottom { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html, *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
