/* Revision 18a: the brand system (approved 2026-10-25): paper, ink, seal red from the logo, jade and gold;
   Fraunces for titles, DM Sans for text, Noto Serif SC for Chinese. One button, chip and card style sitewide. */
/* Revision 18e: Fraunces draws the first-tone pinyin vowels (ā ē ī ō ū) with the macron beside the letter
   and has no third-tone vowels (ǎ ǐ ǒ ǔ) or toned ü. Those letters come from the system serif instead. */
@font-face { font-family: 'Tone Marks'; font-style: normal; font-weight: 100 900; src: local('Times New Roman'), local('TimesNewRomanPSMT'), local('Noto Serif'), local('NotoSerif-Regular'), local('Liberation Serif');
  unicode-range: U+0100-0101, U+0112-0113, U+011A-011B, U+012A-012B, U+014C-014D, U+016A-016B, U+01CD-01DC; }
@font-face { font-family: 'Tone Marks'; font-style: italic; font-weight: 100 900; src: local('Times New Roman Italic'), local('TimesNewRomanPS-ItalicMT'), local('Noto Serif Italic'), local('NotoSerif-Italic'), local('Liberation Serif Italic');
  unicode-range: U+0100-0101, U+0112-0113, U+011A-011B, U+012A-012B, U+014C-014D, U+016A-016B, U+01CD-01DC; }
:root {
  --paper: #f7f2e8;
  --paper-2: #efe6d5;
  --card: #fffdf8;
  --ink: #192b2b;
  --ink-2: #485754;
  --ink-3: #6b7672;
  --muted: #5b6865;
  --line: #e4d9c3;
  --line-2: #cdbb98;
  --red: #ad3d2c;
  --red-deep: #8e3022;
  --red-tint: #f5e2da;
  --jade: #183f35;
  --jade-deep: #0f2520;
  --teal: #183f35;
  --gold: #c6ad79;
  --gold-deep: #8a7246;
  --white: #fff;
  --wood: #4a7c59;
  --fire: #c0492f;
  --earth: #a8823a;
  --metal: #6f7a82;
  --water: #2e4a66;
  --serif: 'Tone Marks', 'Fraunces', 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --zh: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --radius: 14px;
  --radius-lg: 22px;
  --radius-btn: 10px;
  --shadow: 0 1px 0 rgba(25, 43, 43, .04), 0 22px 48px -22px rgba(25, 43, 43, .32);
  --shadow-sm: 0 1px 2px rgba(25, 43, 43, .06), 0 8px 20px -12px rgba(25, 43, 43, .22);
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.62 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }
[lang="zh"] { font-family: var(--zh); }
:focus-visible { outline: 2.5px solid var(--gold-deep); outline-offset: 3px; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--ink); color: #fff; border-radius: 8px; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* Type */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; letter-spacing: -.018em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, 5.1vw, 66px); line-height: 1.04; }
h2 { font-size: clamp(30px, 3.3vw, 44px); line-height: 1.1; }
h3 { font-size: 22px; line-height: 1.2; }
h1 em, h2 em, h3 em { font-style: italic; color: var(--red); }
p { margin: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0; font: 600 12.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--red); }
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: currentColor; }
.lede { font-size: clamp(17px, 1.5vw, 19.5px); line-height: 1.6; color: var(--ink-2); }

/* Icons: one line set, 24 grid, 1.6 stroke */
.i { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.22em; }

/* Buttons: one red primary per screen; secondary and text links for the rest */
.button { display: inline-flex; align-items: center; justify-content: center; gap: .6em; white-space: nowrap; padding: 17px 26px; border: 1.5px solid transparent; border-radius: var(--radius-btn); font: 600 16px/1 var(--sans); text-decoration: none; transition: background .18s, transform .18s, box-shadow .18s, border-color .18s; }
.button.primary { background: var(--red); color: #fff; box-shadow: 0 12px 26px -12px rgba(173, 61, 44, .7); }
.button.primary:hover { background: var(--red-deep); transform: translateY(-1px); }
.button.secondary { background: transparent; border-color: rgba(25, 43, 43, .28); color: var(--ink); }
.button.secondary:hover { border-color: var(--ink); background: rgba(255, 255, 255, .5); }
.button.light { background: var(--paper); color: var(--jade); }
.button.light:hover { background: #fff; transform: translateY(-1px); }
.button.small { padding: 11px 16px; font-size: 14.5px; }
.button.full-width { width: 100%; }
.text-link { display: inline-flex; align-items: center; gap: .4em; padding-bottom: 2px; border-bottom: 1.5px solid var(--line-2); font-weight: 600; color: var(--ink); text-decoration: none; }
.text-link:hover { border-color: var(--red); color: var(--red); }

/* Chips: chart-type badges and element tags */
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 13px 5px 5px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font: 500 13.5px/1.2 var(--sans); color: var(--ink); }
.chip .han { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 5px; border-radius: 7px; background: var(--red-tint); color: var(--red); font: 600 14px/1 var(--zh); }
.chip .han .i { width: 15px; height: 15px; }
.chip.jade .han { background: #e1ebe5; color: var(--jade); }
.chip.gold .han { background: #f3ead6; color: var(--gold-deep); }
.element { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font: 600 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.element::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.element.wood { color: var(--wood); background: #e5efe7; }
.element.fire { color: var(--fire); background: #f7e4de; }
.element.earth { color: var(--earth); background: #f3ead7; }
.element.metal { color: var(--metal); background: #eceef0; }
.element.water { color: var(--water); background: #e3e9f0; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247, 242, 232, .88); -webkit-backdrop-filter: saturate(1.2) blur(12px); backdrop-filter: saturate(1.2) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.is-scrolled { border-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand-name { font: 600 19px/1 var(--sans); letter-spacing: -.015em; }
.brand-light { font-weight: 500; color: rgba(25, 43, 43, .6); }
.site-nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.site-nav a { padding: 6px 0; border-bottom: 1.5px solid transparent; font: 500 15px/1 var(--sans); color: var(--ink-2); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); border-color: var(--red); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.menu-button { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: transparent; color: var(--ink); }
.menu-button .i { width: 24px; height: 24px; }

/* Revision 18b: the shared footer on brand pages, on a dark ground (its text is shared; see site-footer.css) */
body > .site-footer { flex-direction: column; justify-content: center; gap: 14px; margin: 0; padding: 40px var(--gutter); border: 0; background: var(--jade-deep); color: #a9b3ad; font: 400 14px/1.7 var(--sans); text-align: center; }
body > .site-footer nav { justify-content: center; }
body > .site-footer a { color: #d9d2c3; text-decoration-color: rgba(198, 173, 121, .5); }
body > .site-footer a:hover { color: #fff; }

/* Name card: the brand's core object */
.name-card { position: relative; isolation: isolate; padding: 30px 30px 24px; border-radius: var(--radius-lg); background: var(--card); box-shadow: var(--shadow); }
.name-card::before { content: ""; position: absolute; inset: 9px; border: 1px solid var(--line-2); border-radius: 15px; opacity: .75; pointer-events: none; }
.nc-top { display: flex; justify-content: space-between; align-items: center; font: 600 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.nc-top img { width: 26px; height: 26px; }
.nc-hanzi { margin: 22px 0 10px; text-align: center; font: 600 clamp(76px, 8vw, 104px)/1 var(--zh); letter-spacing: .06em; color: var(--ink); }
.nc-hanzi span { display: inline-block; }
.nc-pinyin { display: flex; justify-content: center; align-items: center; gap: 12px; font: italic 400 25px/1 var(--serif); color: var(--ink-2); }
.play { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1.5px solid var(--line-2); border-radius: 50%; background: var(--paper); color: var(--red); transition: background .15s, transform .15s; }
.play:hover { background: var(--red-tint); transform: scale(1.05); }
.play .i { width: 18px; height: 18px; }
.nc-rule { display: flex; align-items: center; gap: 12px; margin: 22px 0 18px; }
.nc-rule::before, .nc-rule::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.nc-rule b { width: 7px; height: 7px; transform: rotate(45deg); background: var(--gold); }
.nc-chars { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.nc-char { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: start; }
.nc-char .h { grid-row: span 3; padding-top: 2px; font: 600 34px/1 var(--zh); color: var(--red); }
.nc-char .p { font: 600 14.5px/1.2 var(--sans); }
.nc-char .m { font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.nc-char .element { justify-self: start; margin-top: 6px; }
.nc-image { margin: 18px 0 0; text-align: center; font: italic 400 16.5px/1.45 var(--serif); color: var(--ink-2); }
.nc-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.nc-foot { margin-top: 18px; text-align: center; font: 600 10.5px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3); }
@keyframes stamp { 0% { opacity: 0; transform: scale(1.5) rotate(-6deg); filter: blur(3px); } 60% { opacity: 1; transform: scale(.96); filter: blur(0); } 100% { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.name-card.is-revealing .nc-hanzi span { animation: stamp .7s cubic-bezier(.2, .8, .2, 1) both; }
.name-card.is-revealing .nc-hanzi span:nth-child(2) { animation-delay: .32s; }
.name-card.is-revealing :is(.nc-pinyin, .nc-rule, .nc-chars, .nc-image, .nc-badges) { animation: rise .6s ease both .8s; }

@media (max-width: 960px) {
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 16px; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); }
  .site-header.menu-open .site-nav { display: flex; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .header-actions { margin-left: auto; }
  .menu-button { display: inline-flex; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .eyebrow { font-size: 11.5px; letter-spacing: .12em; }
  .eyebrow::before { width: 14px; }
  .site-header .wrap { height: 62px; gap: 6px; }
  .brand { gap: 8px; }
  .brand img { width: 28px; height: 28px; }
  .brand-name { font-size: 15.5px; }
  .header-actions { gap: 2px; }
  .header-actions .button { padding: 10px 12px; font-size: 13.5px; }
  .menu-button { width: 40px; }
  .name-card { padding: 24px 20px 20px; }
  .nc-chars { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
