@import url("../brand/tokens.css");
:root {
  --paper: var(--es-ivory);
  --ink: var(--es-charcoal);
  --muted: var(--es-muted);
  --rule: var(--es-line);
  --wood: var(--es-wood);
  --fire: var(--es-fire);
  --earth: var(--es-earth);
  --metal: var(--es-metal-text);
  --water: var(--es-water);
  --font-body: var(--es-body);
  --font-display: var(--es-display);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 1rem; line-height: 1.6; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; text-underline-offset: .22em; }
img { max-width: 100%; }
[hidden] { display: none !important; }
::selection { color: var(--paper); background: var(--wood); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }
.wrap { width: min(var(--es-max-width), calc(100% - 112px)); margin-inline: auto; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 10; background: var(--paper); padding: 1rem; }
.skip-link:focus { top: 1rem; }
.site-header { display: flex; justify-content: space-between; align-items: center; min-height: 108px; border-bottom: 1px solid var(--rule); gap: 2rem; }
.wordmark { display: inline-flex; align-items: center; font-family: var(--font-display); font-size: 1.9rem; letter-spacing: -.025em; text-decoration: none; white-space: nowrap; }
.wordmark img { display: block; width: 240px; height: 45px; }
.wordmark span { font-style: italic; }
.wordmark .wordmark-period { color: var(--fire); font-style: normal; }
nav { display: flex; align-items: center; gap: 2.1rem; }
nav a { font-size: .875rem; text-decoration: none; }
nav a:hover, .text-link:hover { text-decoration: underline; }
nav .nav-explore { border: 1px solid var(--ink); padding: .55rem 1.2rem; }
.hero { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 3.5rem; padding-block: 72px 76px; }
.eyebrow { margin: 0 0 1.2rem; font-size: .8125rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: -.025em; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(3.7rem, 6.6vw, 6.4rem); }
h1 em, h2 em { font-weight: 400; }
.hero-lead { margin: 1.8rem 0 .4rem; font-size: 1.15rem; }
.hero-description { max-width: 400px; margin: 0 0 1.9rem; color: var(--muted); }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 1.6rem; min-height: 52px; padding: .8rem 1.5rem; text-decoration: none; font-size: .9375rem; font-weight: 600; border: 1px solid var(--ink); transition: background .15s, color .15s; }
.button-dark { background: var(--ink); color: var(--paper); }
.button-dark:hover { background: var(--wood); }
.availability { font-size: .875rem; line-height: 1.55; color: var(--muted); margin: 1rem 0 0; }
.hero-art { position: relative; overflow: hidden; min-height: 510px; padding: 24px; background: #eee6d7; display: flex; flex-direction: column; justify-content: space-between; }
.hero-art-heading { display: flex; justify-content: space-between; align-items: center; font-size: .75rem; letter-spacing: .13em; }
.hero-art-heading span:last-child { font-size: 1.2rem; letter-spacing: .3em; }
.hero-glyphs { display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; gap: 6px; padding-block: 30px; }
.hero-glyph { font-family: "Noto Serif CJK SC", "Songti SC", SimSun, serif; font-size: clamp(2.8rem, 5vw, 5rem); text-align: center; }
.hero-glyph:nth-child(2), .hero-glyph:nth-child(4) { transform: translateY(35px); }
.hero-glyph img { display: block; width: 100%; height: 130px; object-fit: contain; }
.wood { color: var(--wood); }.fire { color: var(--fire); }.earth { color: var(--earth); }.metal { color: var(--metal); }.water { color: var(--water); }
.hero-illustration { display: block; width: 100%; height: 405px; object-fit: contain; mix-blend-mode: multiply; }
.hero-art-caption { font-size: .8125rem; line-height: 1.6; text-align: center; margin: 8px 0; }
.hero-spectrum { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; display: grid; grid-template-columns: repeat(5, 1fr); }
.hero-spectrum i:nth-child(1) { background: var(--wood); }.hero-spectrum i:nth-child(2) { background: var(--fire); }.hero-spectrum i:nth-child(3) { background: var(--earth); }.hero-spectrum i:nth-child(4) { background: var(--metal); }.hero-spectrum i:nth-child(5) { background: var(--water); }
.element-strip { border-block: 1px solid var(--rule); }
.element-strip .wrap { display: grid; grid-template-columns: repeat(5, 1fr); padding-block: 18px; }
.element-strip span { display: flex; justify-content: center; gap: 1rem; font-family: var(--font-display); font-size: 1.125rem; border-right: 1px solid var(--rule); }
.element-strip span:first-child { justify-content: start; }.element-strip span:last-child { justify-content: end; border: 0; }
.element-strip small { font-family: var(--font-body); font-size: .8125rem; align-self: center; color: var(--muted); }
.explore-section { padding-block: 88px 80px; }
.section-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: end; margin-bottom: 2.5rem; }
h2 { font-size: clamp(2.5rem, 4.3vw, 4.25rem); }
.section-heading > p { max-width: 390px; margin: 0 0 .25rem; justify-self: end; color: var(--muted); }
.exploration-note { border-left: 3px solid var(--wood); padding: .85rem 1rem; margin-bottom: 2rem; font-size: .875rem; background: var(--es-wood-tint); }
.element-tabs { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-bottom: 28px; }
.element-tabs button { display: flex; align-items: center; justify-content: space-between; gap: .7rem; min-height: 76px; background: transparent; border: 0; border-bottom: 3px solid transparent; padding: 1rem; color: var(--ink); cursor: pointer; font-size: 1.0625rem; }
.element-tabs button:hover { background: #e8e8de; }
.element-tabs button[aria-selected="true"] { border-bottom-color: var(--wood); background: var(--es-wood-tint); }
.element-tabs button:focus-visible { outline-offset: -5px; }
.tab-number { font-size: .75rem; color: var(--muted); }.tab-character { font-family: SimSun, serif; font-size: 1.3rem; }
.element-panel { --accent: var(--wood); --wash: var(--es-wood-tint); display: grid; grid-template-columns: .95fr 1.05fr; border: 1px solid var(--rule); }
.element-panel[data-theme="fire"] { --accent: var(--fire); --wash: var(--es-fire-tint); }
.element-panel[data-theme="earth"] { --accent: var(--earth); --wash: var(--es-earth-tint); }
.element-panel[data-theme="metal"] { --accent: var(--metal); --wash: var(--es-metal-tint); }
.element-panel[data-theme="water"] { --accent: var(--water); --wash: var(--es-water-tint); }
.card-art { display: flex; flex-direction: column; justify-content: space-between; min-height: 500px; padding: 28px 32px; background: var(--wash); color: var(--accent); }
.card-topline { display: flex; justify-content: space-between; font-size: .75rem; letter-spacing: .11em; }
.card-mark { display: grid; place-items: center; flex: 1; padding: 2rem; }
.card-mark span { font-family: "Noto Serif CJK SC", SimSun, serif; font-size: 10rem; line-height: 1; }
.card-mark img { width: 220px; height: 220px; object-fit: contain; }
.card-art-bottom { display: flex; flex-direction: column; gap: .25rem; }
.card-art-bottom span:first-child { font-family: var(--font-display); font-size: 3.25rem; line-height: 1.1; letter-spacing: -.04em; }
.card-art-bottom span:last-child { font-size: .8125rem; }
.card-copy { padding: 42px 48px 28px; }
.card-copy .eyebrow { color: var(--ink); }
h3 { font-size: clamp(2.5rem, 3.6vw, 3.75rem); }
.card-tagline { font-family: var(--font-display); font-style: italic; font-size: 1.45rem; line-height: 1.35; margin: 1rem 0; }
.card-copy > p:not(.eyebrow):not(.card-tagline) { color: var(--muted); }
.reflection { border-left: 2px solid var(--accent); padding-left: 1.2rem; margin-block: 1.8rem; }
.reflection .eyebrow { font-size: .75rem; margin-bottom: .4rem; }.reflection p:last-child { margin: 0; font-size: 1.05rem; }
.button-outline { padding-inline: 1.25rem; font-weight: 400; gap: 1.5rem; }
.button-outline:hover { background: var(--ink); color: var(--paper); }.download-format { font-size: .75rem; letter-spacing: .06em; }
.download-note { font-size: .8125rem; margin: .7rem 0 0; }.status { min-height: 1.5rem; font-size: .8125rem; margin: .3rem 0 0; }
.editorial-note { max-width: 850px; font-size: .8125rem; color: var(--muted); margin: 1.2rem 0 0; }
.no-script { padding: 1rem; background: white; }
.origins-section { padding-block: 78px; color: var(--paper); background: var(--ink); }
.origins-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; }
.origins-section .eyebrow { color: #c0c9b7; }.origins-chinese { font-family: SimSun, serif; font-size: 2.25rem; letter-spacing: .15em; margin: 1.8rem 0 0; }.origins-chinese span { margin-left: 1rem; font-family: var(--font-body); font-size: .875rem; letter-spacing: .04em; }
.origins-copy { padding-top: .5rem; }.origins-copy p { margin: 0 0 1.4rem; color: #d4d6cb; }.origins-copy strong { color: var(--paper); font-weight: 400; }.text-link { font-size: .875rem; }.new-tab-note { display: block; color: #b8c0af; font-size: .75rem; margin-top: .3rem; }
.faq-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: 5rem; padding-block: 90px; }
.faq-list { border-top: 1px solid var(--rule); }.faq-list details { border-bottom: 1px solid var(--rule); padding-block: 1.25rem; }.faq-list summary { cursor: pointer; padding-right: 1rem; font-size: 1rem; min-height: 28px; }.faq-list details p { color: var(--muted); font-size: .9375rem; margin: 1rem 1.5rem 0 0; }
.site-footer { display: flex; justify-content: space-between; gap: 2rem; align-items: center; padding-block: 36px 42px; border-top: 1px solid var(--rule); }.site-footer p { color: var(--muted); font-size: .8125rem; line-height: 1.55; }.footer-preview { text-align: right; }
@media (min-width: 1500px) { .hero { gap: 5rem; } }
@media (max-width: 1000px) {
  .wrap { width: calc(100% - 56px); }.hero { gap: 2rem; padding-block: 52px; }.hero-art { min-height: 450px; padding: 24px; }.hero-illustration { height: 330px; }h1 { font-size: 4.7rem; }.element-strip small { display: none; }.element-tabs button { gap: .3rem; padding-inline: .75rem; }.tab-number { display: none; }.card-copy { padding: 32px; }.card-art { min-height: 500px; padding: 24px; }.origins-layout, .faq-section { gap: 3rem; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 1rem; }.wrap { width: calc(100% - 40px); }.site-header { min-height: 88px; gap: 1rem; }.wordmark { font-size: 1.6rem; }nav { gap: 1rem; }nav a { font-size: .8125rem; }nav .nav-explore { display: none; }.hero { grid-template-columns: 1fr; padding-block: 46px 40px; gap: 32px; }h1 { font-size: clamp(3.8rem, 10vw, 5.8rem); }.hero-copy .eyebrow { font-size: .75rem; }.hero-lead { margin-top: 1.4rem; font-size: 1.05rem; }.hero-description { max-width: 430px; }.hero-art { min-height: 330px; }.hero-glyph { font-size: 3.4rem; }.hero-glyph img { height: 85px; }.hero-glyphs { padding-block: 1rem; }.hero-art-caption { font-size: 1.85rem; margin-bottom: 10px; }.element-strip .wrap { padding-block: 14px; }.element-strip span { font-size: .9375rem; justify-content: center !important; }.explore-section { padding-block: 56px; }.section-heading { grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }.section-heading > p { max-width: 100%; justify-self: start; }.eyebrow { font-size: .75rem; margin-bottom: 1rem; }h2 { font-size: 3.1rem; }.exploration-note { margin-bottom: 1.5rem; }.element-tabs { margin-bottom: 18px; }.element-tabs button { padding: .7rem .25rem; min-height: 68px; flex-direction: column; gap: 0; font-size: .875rem; }.tab-character { font-size: 1rem; }.element-panel { grid-template-columns: 1fr; }.card-art { min-height: 330px; padding: 22px; }.card-mark { padding: 1rem; }.card-mark span { font-size: 7rem; }.card-mark img { width: 160px; height: 160px; }.card-art-bottom span:first-child { font-size: 2.5rem; }.card-copy { padding: 30px 26px 24px; }h3 { font-size: 3rem; }.card-tagline { font-size: 1.3rem; }.origins-section { padding-block: 54px; }.origins-layout { grid-template-columns: 1fr; gap: 2rem; }.origins-chinese { margin-top: 1.4rem; }.faq-section { grid-template-columns: 1fr; gap: 2rem; padding-block: 56px; }.site-footer { flex-wrap: wrap; gap: 1rem 2rem; align-items: start; padding-block: 28px; }.site-footer .wordmark { width: 100%; }.site-footer p { margin: .3rem 0; }.footer-preview { text-align: left; }
}
@media (max-width: 380px) { .wrap { width: calc(100% - 32px); }nav { gap: .7rem; }.wordmark { font-size: 1.4rem; }h1 { font-size: 3.45rem; }.hero-art { padding: 20px; min-height: 300px; }.hero-glyph { font-size: 2.8rem; }.card-copy { padding-inline: 22px; }.button { padding-inline: 1.1rem; }.element-strip span { font-size: .8125rem; } }
@media (max-width: 720px) {
  .wrap { width: calc(100% - 48px); }
  .site-header { gap: .6rem; }
  .wordmark img { width: 170px; height: auto; }
  nav { gap: .8rem; }
  .hero-art { min-height: 400px; }
  .hero-illustration { height: 320px; }
  .hero-art-caption { font-size: .75rem; line-height: 1.6; }
}
@media (max-width: 380px) {
  .wrap { width: calc(100% - 40px); }
  .site-header { min-height: 102px; flex-wrap: wrap; justify-content: start; align-content: center; gap: .3rem; }
  .site-header .wordmark { width: 100%; }
  .site-header nav { gap: 1.4rem; }
  .hero-art { min-height: 365px; }
  .hero-illustration { height: 280px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
@media print { .site-header nav, .hero, .element-strip, .section-heading, .element-tabs, .origins-section, .faq-section, .site-footer, #download-card, #share-card, .download-note, .status { display: none; }.wrap { width: 100%; }.explore-section { padding: 0; }.element-panel { break-inside: avoid; }.card-art { print-color-adjust: exact; } }

/* Birth entry keeps the established editorial layout and works without web fonts. */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.hero-secondary { display: inline-block; margin-top: 1rem; font-size: .875rem; }
.birth-section { padding-block: 76px 80px; border-bottom: 1px solid var(--rule); }
.preview-notice { padding: 1rem 1.25rem; border: 1px solid var(--earth); background: var(--es-earth-tint, #eee5d8); font-size: .875rem; }
.birth-layout { display: grid; grid-template-columns: .82fr 1fr; gap: 4rem; margin-top: 2.5rem; }
.birth-introduction, .birth-form-shell, .result-body > div { min-width: 0; }
.birth-introduction h3 { font-size: 2.2rem; }
.birth-introduction > p { color: var(--muted); }
.small-copy, .field-hint { font-size: .8125rem; line-height: 1.5; color: var(--muted); }
fieldset { margin: 0; padding: 0; min-width: 0; border: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-field { display: flex; flex-direction: column; margin-bottom: 1.25rem; min-width: 0; }
.form-field > label { font-size: .9375rem; font-weight: 600; margin-bottom: .4rem; }
input, select { font: inherit; color: var(--ink); accent-color: var(--wood); }
.form-field input, .form-field select { display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 48px; padding: .65rem .75rem; border: 1px solid var(--rule); border-radius: 0; background: #fffdf8; font-size: 1rem; }
.form-field select { text-overflow: ellipsis; }
.form-field input:disabled, .form-field select:disabled, fieldset:disabled { opacity: .68; }
.field-hint { margin: .35rem 0 0; overflow-wrap: anywhere; }
.form-status { margin: 0 0 1rem; font-size: .9375rem; }
.is-error { color: #873b2c; padding-left: .8rem; border-left: 3px solid #873b2c; }
[aria-invalid="true"] { border-color: #873b2c !important; }
.text-button { padding: .4rem 0; min-height: 44px; border: 0; background: transparent; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: .25em; text-align: left; }
.context-choice, .fold-choice { margin-bottom: 1.1rem; }
.context-choice legend, .fold-choice legend { font-size: .9375rem; font-weight: 600; margin-bottom: .5rem; }
.context-choice > label, .fold-choice > label { display: flex; gap: .7rem; align-items: flex-start; min-height: 44px; font-size: .875rem; padding-block: .45rem; }
.context-choice input, .fold-choice input, .confirm-context input { flex: 0 0 auto; margin-top: .4rem; width: 18px; height: 18px; }
.confirm-context { display: flex; gap: .7rem; font-size: .875rem; min-height: 44px; margin-block: 1rem; }
.inline-note { padding: 1rem; background: #eee6d7; border-left: 3px solid var(--earth); }
.inline-note p { margin: 0; }
.place-results { list-style: none; padding: 0; margin: .75rem 0; max-height: 320px; overflow-y: auto; }
.place-results li { border-bottom: 1px solid var(--rule); }
.place-results button { border: 0; background: #fffdf8; text-align: left; padding: .8rem; width: 100%; min-height: 48px; font-size: .875rem; cursor: pointer; overflow-wrap: anywhere; }
.place-results button:hover { background: #eee6d7; }
.selected-place { border-left: 3px solid var(--wood); padding: .6rem .8rem; font-size: .875rem; overflow-wrap: anywhere; }
.form-actions, .result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.button { cursor: pointer; }
.button:disabled { opacity: .65; cursor: wait; }
.birth-result { margin-top: 3rem; padding: 2.5rem; border: 1px solid var(--rule); background: #fffdf8; }
.result-heading h3 { font-size: clamp(3.4rem, 6vw, 5rem); }
.result-heading .eyebrow { margin-bottom: .7rem; }
.result-body { display: grid; grid-template-columns: 180px 1fr; gap: 2rem; margin-top: 1.5rem; align-items: center; }
.result-body .reflection { margin-top: 1.3rem; }
.result-warnings { margin: 2rem 0 1.5rem; padding: 1rem 1.5rem 1rem 2.5rem; border-left: 3px solid var(--earth); background: #eee6d7; font-size: .9375rem; }
.result-warnings li + li { margin-top: .7rem; }
.calculation-details { margin-top: 1.5rem; padding-block: .9rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.calculation-details summary { cursor: pointer; min-height: 32px; }
.calculation-details p { color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.notice-page { max-width: 800px; padding-block: 56px 72px; }
.notice-page h1 { font-size: clamp(2.5rem, 7vw, 4rem); }
.notice-page h2 { font-size: 1.8rem; margin: 2.2rem 0 .6rem; }
.notice-page p, .notice-page li { overflow-wrap: anywhere; }
.notice-page .back-link { display: inline-block; margin-bottom: 2rem; }
@media (max-width: 900px) { .birth-layout { gap: 2rem; grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) {
  .birth-section { padding-block: 52px; }
  .birth-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .birth-result { padding: 1.5rem; }
  .result-body { grid-template-columns: 1fr; gap: .75rem; }
  .result-body img { width: 130px; height: 130px; }
  .result-actions .button { flex: 1 1 150px; }
  .result-actions .text-link { flex-basis: 100%; }
  .form-actions .button { width: 100%; }
  .context-choice label, .fold-choice label { font-size: .9375rem; }
}
@media (max-width: 380px) { .form-row { grid-template-columns: 1fr; gap: 0; }.site-header nav { flex-wrap: wrap; }.birth-result { padding: 1.2rem; }.form-status { overflow-wrap: anywhere; } }
@media print { .birth-layout, .preview-notice, .result-actions { display: none; }.birth-result { break-inside: avoid; } }
