/*!
 * Chakra Qi — design system
 * ------------------------------------------------------------------
 * Direction: clinical calm meets classical Chinese ink work.
 * Warm paper ground, ink typography, restrained elemental accents.
 * Deliberately NOT the red-and-gold "chinatown" look — the audience is
 * a Western wellness reader who trusts clean typography and white space.
 *
 * No external font or CSS dependencies: faster, private, and it means the
 * site has no third-party requests to disclose in a privacy policy.
 */

:root {
  --ink: #171613;
  --ink-soft: #4a4741;
  --ink-mute: #7d7970;
  --paper: #faf8f4;
  --paper-2: #f2eee6;
  --paper-3: #e8e2d6;
  --line: #ddd6c8;
  --line-soft: #eae4d8;
  --white: #fffefb;

  --wood: #3f8f5f;
  --fire: #c8492f;
  --earth: #c99a3f;
  --metal: #8b98a3;
  --water: #2f5a86;
  --accent: var(--earth);
  --good: #3f8f5f;
  --warn: #c8492f;

  --font-display: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Songti SC', 'Noto Serif SC', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --w: 1120px;
  --w-narrow: 720px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(23, 22, 19, .04), 0 8px 24px -12px rgba(23, 22, 19, .12);
  --shadow-lg: 0 2px 6px rgba(23, 22, 19, .05), 0 24px 60px -24px rgba(23, 22, 19, .22);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--fire); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.15rem); margin-top: 2.4em; }
h3 { font-size: 1.28rem; margin-top: 1.9em; }
h4 { font-size: 1.05rem; margin-top: 1.5em; letter-spacing: 0; }
h2:first-child, h3:first-child { margin-top: 0; }

p { margin: 0 0 1.15em; }
ul, ol { margin: 0 0 1.15em; padding-left: 1.3em; }
li { margin-bottom: .4em; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.8em 0; }

.wrap { width: 100%; max-width: var(--w); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: var(--w-narrow); }
.section { padding: 72px 0; }
.section--tight { padding: 44px 0; }
.section--paper2 { background: var(--paper-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.center { text-align: center; }
.muted { color: var(--ink-mute); }
.small { font-size: .875rem; line-height: 1.55; }
.tiny { font-size: .78rem; line-height: 1.5; }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }

/* ---------- wordmark ---------- */
.wordmark {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: .26em;
  font-size: .95rem;
  text-transform: uppercase;
  color: var(--ink);
}
.wordmark .zh { letter-spacing: .1em; font-weight: 400; color: var(--ink-mute); margin-left: .5em; font-size: .8em; }

/* ---------- header ---------- */
.masthead {
  position: sticky; top: 0; z-index: 60;
  background: rgba(250, 248, 244, .9);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.masthead .wrap { display: flex; align-items: center; gap: 26px; height: 62px; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { font-size: .9rem; color: var(--ink-soft); }
.nav a:hover { color: var(--ink); }
.nav a[aria-current='page'] { color: var(--ink); font-weight: 600; }
@media (max-width: 860px) {
  .nav { display: none; }
  .nav.is-open {
    display: flex; position: absolute; top: 62px; left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start; padding: 18px 22px; gap: 14px;
  }
}
.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 11px; font: inherit; font-size: .85rem; cursor: pointer; color: var(--ink);
}
@media (max-width: 860px) { .nav-toggle { display: block; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-body); font-size: .94rem; font-weight: 600;
  padding: 12px 22px; border-radius: 100px; border: 1px solid transparent;
  cursor: pointer; text-align: center; line-height: 1.2;
  transition: transform .12s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: #000; color: var(--paper); box-shadow: var(--shadow); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--block { width: 100%; }
.btn--lg { padding: 15px 30px; font-size: 1rem; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- hero ---------- */
.hero { padding: 84px 0 60px; position: relative; overflow: hidden; }
.hero::after {
  content: ''; position: absolute; inset: auto -20% 20% 55%; height: 420px; z-index: 0;
  background: radial-gradient(closest-side, rgba(201, 154, 63, .13), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { max-width: 17ch; }
.hero .lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 56ch; margin-bottom: 1.6em; }
.hero .eyebrow {
  font-size: .78rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: 1.4em;
}

/* ---------- layout helpers ---------- */
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 52px; align-items: start; }
/* Tables on narrow screens.
   A table with width:100% inside a 390px viewport does not scroll — it
   compresses, columns collapse to one word per line, and the last columns are
   pushed off screen. Confirmed by measuring: the four-pillar table showed only
   two of its four pillars on a phone.

   Setting `display: block; overflow-x: auto` on the table alone does NOT fix
   it, because the anonymous table box still sizes itself to the available
   width. The fix is a scroll container around the table plus a min-width on
   the table, which is what makes it wider than its container and therefore
   scrollable.

   Every table is wrapped in .tscroll automatically by layout() in
   src/partials.js, and the client-rendered tables in the report renderer and
   the calculator wrap themselves. Any new table gets this for free. */
.tscroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* A visible hint that there is more to the right, on touch devices. */
  margin-bottom: 2px;
}
@media (max-width: 760px) {
  .tscroll > .pillars { min-width: 500px; }
  .tscroll > .bp-table { min-width: 480px; }
  .tscroll > .bp-table--hours { min-width: 560px; }
  .tscroll > .bp-mini { min-width: 420px; }
  .tscroll > table { min-width: 480px; }
}

@media (max-width: 900px) {
  .grid--2, .grid--3, .grid--4, .split { grid-template-columns: 1fr; }
  .split { gap: 30px; }
  .section { padding: 52px 0; }
  .hero { padding: 56px 0 40px; }
}

/* ---------- cards ---------- */
.card {
  background: var(--white); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
}
.card--flat { box-shadow: none; }
.card--pad-lg { padding: 34px; }
.card h3:first-child, .card h2:first-child { margin-top: 0; }
.card__label {
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: .9em;
}

/* ---------- tool cards on home ---------- */
.tool {
  display: flex; flex-direction: column; height: 100%;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow); transition: box-shadow .18s ease, transform .18s ease;
}
.tool:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.tool--free { border-top: 3px solid var(--earth); }
.tool h3 { font-size: 1.4rem; margin-bottom: .35em; }
.tool p { color: var(--ink-soft); font-size: .95rem; }
.tool .tool__cta { margin-top: auto; padding-top: 18px; }

/* ---------- pills / badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: .45em;
  font-size: .76rem; font-weight: 600; letter-spacing: .04em;
  padding: 4px 11px; border-radius: 100px;
  background: var(--paper-2); color: var(--ink-soft); border: 1px solid var(--line-soft);
}
.pill--free { background: rgba(63, 143, 95, .1); color: #2c6743; border-color: rgba(63, 143, 95, .24); }
.pill--paid { background: rgba(201, 154, 63, .13); color: #855f14; border-color: rgba(201, 154, 63, .3); }
.pill--soon { background: var(--paper-2); color: var(--ink-mute); }
.pill--wood { background: rgba(63,143,95,.12); color: #2c6743; border-color: rgba(63,143,95,.25); }
.pill--fire { background: rgba(200,73,47,.1); color: #9c3520; border-color: rgba(200,73,47,.24); }
.pill--earth { background: rgba(201,154,63,.13); color: #855f14; border-color: rgba(201,154,63,.3); }
.pill--metal { background: rgba(139,152,163,.15); color: #55626e; border-color: rgba(139,152,163,.32); }
.pill--water { background: rgba(47,90,134,.11); color: #234869; border-color: rgba(47,90,134,.26); }

/* ---------- elemental meter ---------- */
.meter { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; margin-bottom: 10px; }
.meter__name { font-size: .9rem; font-weight: 600; display: flex; align-items: center; gap: .5em; }
.meter__val { font-family: var(--font-mono); font-size: .8rem; color: var(--ink-mute); }
.meter__track { grid-column: 1 / -1; height: 7px; border-radius: 100px; background: var(--paper-3); overflow: hidden; }
.meter__fill { height: 100%; border-radius: 100px; background: var(--ink-mute); }
.meter__fill--wood { background: var(--wood); }
.meter__fill--fire { background: var(--fire); }
.meter__fill--earth { background: var(--earth); }
.meter__fill--metal { background: var(--metal); }
.meter__fill--water { background: var(--water); }
.dot { width: 9px; height: 9px; border-radius: 100px; display: inline-block; flex: none; }
.dot--wood { background: var(--wood); } .dot--fire { background: var(--fire); }
.dot--earth { background: var(--earth); } .dot--metal { background: var(--metal); }
.dot--water { background: var(--water); }

/* ---------- four pillars table ---------- */
.pillars { width: 100%; border-collapse: separate; border-spacing: 0; }
.pillars th, .pillars td { padding: 13px 12px; text-align: center; border-bottom: 1px solid var(--line-soft); }
.pillars thead th {
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 600; border-bottom: 1px solid var(--line);
}
.pillars tbody th { text-align: left; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; }
.pillars .gz { font-family: var(--font-display); font-size: 1.75rem; line-height: 1.25; }
.pillars .gz .g { color: var(--ink); }
.pillars .gz .z { color: var(--ink-soft); }
.pillars .gz--wood .g, .pillars .gz--wood .z { color: var(--wood); }
.pillars .gz--fire .g, .pillars .gz--fire .z { color: var(--fire); }
.pillars .gz--earth .g, .pillars .gz--earth .z { color: #a87c1f; }
.pillars .gz--metal .g, .pillars .gz--metal .z { color: #6c7a86; }
.pillars .gz--water .g, .pillars .gz--water .z { color: var(--water); }
.pillars .sub { font-size: .76rem; color: var(--ink-mute); display: block; margin-top: 3px; }
.pillars tr:last-child th, .pillars tr:last-child td { border-bottom: 0; }

/* ---------- forms ---------- */
.field { margin-bottom: 18px; }
.field > label, .fieldset__legend {
  display: block; font-size: .78rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-mute); margin-bottom: 7px;
}
.input, .select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; appearance: none;
}
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%237d7970' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.input:focus, .select:focus { outline: 2px solid rgba(201, 154, 63, .45); outline-offset: 1px; border-color: var(--earth); }
.field__hint { font-size: .8rem; color: var(--ink-mute); margin: 6px 0 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: .87rem; color: var(--ink-soft); }
.checkbox input { margin-top: 4px; width: 16px; height: 16px; flex: none; accent-color: var(--earth); }
.error-text { color: var(--warn); font-size: .85rem; margin-top: 8px; display: none; }
.error-text.is-shown { display: block; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 19px 34px 19px 0; position: relative;
  font-family: var(--font-display); font-size: 1.1rem; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; color: var(--ink-mute); font-family: var(--font-body);
}
.faq details[open] summary::after { content: '–'; }
.faq .faq__body { padding: 0 40px 20px 0; color: var(--ink-soft); }
.faq .faq__body p:last-child { margin-bottom: 0; }

/* ---------- pricing ---------- */
.price-card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow);
}
.price-card--featured { border-color: var(--ink); border-width: 2px; box-shadow: var(--shadow-lg); }
.price-card__amount { font-family: var(--font-display); font-size: 2.6rem; line-height: 1; margin: 12px 0 2px; }
.price-card__period { font-size: .85rem; color: var(--ink-mute); }
.price-card ul { list-style: none; padding: 0; margin: 22px 0; }
.price-card li { font-size: .92rem; color: var(--ink-soft); padding-left: 26px; position: relative; margin-bottom: 10px; }
.price-card li::before {
  content: '✓'; position: absolute; left: 0; top: 0; color: var(--good); font-weight: 700;
}
.price-card .btn { margin-top: auto; }

/* ---------- prose (articles) ---------- */
.prose { max-width: 680px; }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose blockquote {
  margin: 1.8em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--earth);
  font-family: var(--font-display); font-size: 1.1rem; color: var(--ink-soft);
}
.prose table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: .92rem; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; }
.prose th { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); border-bottom-color: var(--line); }
.prose code { font-family: var(--font-mono); font-size: .88em; background: var(--paper-2); padding: 2px 5px; border-radius: 4px; }
.lead { font-size: 1.18rem; color: var(--ink-soft); }

/* ---------- breadcrumbs ---------- */
.crumbs { font-size: .82rem; color: var(--ink-mute); padding: 18px 0 0; }
.crumbs a { color: var(--ink-mute); }
.crumbs a:hover { color: var(--ink); }
.crumbs span { margin: 0 .5em; opacity: .5; }

/* ---------- callout / disclaimer ---------- */

/* ---------- email capture ----------
   Deliberately styled as a warm paper panel rather than the dark ink
   "upgrade" card, so it reads as a service rather than a sales pitch.
   It sits directly beneath a result the visitor has just received. */
.capture {
  background: var(--paper-2);
  border: 1px solid var(--line);
  box-shadow: none;
}
.capture h3, .capture__pitch {
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1.35;
  margin: 0 0 .9em;
}
.capture__context {
  font-size: .92rem;
  color: var(--ink);
  font-weight: 600;
  margin: 0 0 .6em;
}
.capture__form { display: flex; gap: 10px; align-items: stretch; }
.capture__form .input { flex: 1 1 auto; min-width: 0; background: var(--white); }
.capture__form .btn { flex: 0 0 auto; }
.capture__note { color: var(--ink-mute); margin: 12px 0 0; }
.capture__status { margin: 10px 0 0; font-weight: 600; color: var(--good); }
.capture__status.is-error { color: var(--warn); }
.capture__status:empty { margin: 0; }
.capture--compact h3, .capture--compact .capture__pitch { font-size: 1.05rem; }
@media (max-width: 620px) {
  .capture__form { flex-direction: column; }
  .capture__form .btn { width: 100%; }
}

.callout {
  background: var(--paper-2); border-left: 3px solid var(--line);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 18px 20px; margin: 1.6em 0;
  font-size: .92rem; color: var(--ink-soft);
}
.callout--medical { border-left-color: var(--fire); background: rgba(200, 73, 47, .05); }
.callout--method { border-left-color: var(--water); background: rgba(47, 90, 134, .05); }
.callout strong { color: var(--ink); }
.disclaimer-bar {
  background: var(--ink); color: rgba(250, 248, 244, .8); font-size: .8rem;
  padding: 11px 0; text-align: center;
}
.disclaimer-bar strong { color: var(--paper); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--paper-2); padding: 52px 0 34px; margin-top: 40px; }
.footer .grid { gap: 34px; }
.footer h4 { font-family: var(--font-body); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 1em; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: .55em; }
.footer a { font-size: .89rem; color: var(--ink-soft); }
.footer__legal { border-top: 1px solid var(--line); margin-top: 38px; padding-top: 22px; font-size: .8rem; color: var(--ink-mute); display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }

/* ---------- result blocks ---------- */
.result { display: none; }
.result.is-shown { display: block; animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); overflow: hidden; }
.stat { background: var(--white); padding: 17px 18px; }
.stat__label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: .35em; }
.stat__value { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.25; }
.stat__value small { font-family: var(--font-body); font-size: .72rem; color: var(--ink-mute); display: block; letter-spacing: .04em; margin-top: 2px; }

.tag-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 1.2em; padding: 0; list-style: none; }
.tag-list li { margin: 0; }

.toc { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 18px 22px; background: var(--white); }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc a { color: var(--ink-soft); }

.score-list { list-style: none; padding: 0; margin: 0; }
.score-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.score-item:last-child { border-bottom: 0; }
.score-item__name { font-weight: 600; font-size: .95rem; }
.score-item__num { font-family: var(--font-mono); font-size: .84rem; color: var(--ink-mute); }
.score-item__bar { grid-column: 1 / -1; height: 6px; background: var(--paper-3); border-radius: 100px; overflow: hidden; }
.score-item__bar i { display: block; height: 100%; background: var(--ink); border-radius: 100px; }
.score-item--primary .score-item__bar i { background: var(--fire); }

.verdict { display: inline-flex; align-items: center; gap: .4em; font-size: .78rem; font-weight: 600; }
.verdict--supportive { color: var(--good); }
.verdict--straining { color: var(--warn); }
.verdict--neutral { color: var(--ink-mute); }

.hours { list-style: none; padding: 0; margin: 0; }
.hours li {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: baseline;
  padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: .9rem;
}
.hours li:last-child { border-bottom: 0; }
.hours .h-time { font-family: var(--font-mono); font-size: .8rem; color: var(--ink-mute); }
@media (max-width: 620px) {
  .hours li { grid-template-columns: 1fr; gap: 3px; }
  .hours .h-time { order: -1; }
}

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--white); padding: 10px 16px; border-radius: 8px; border: 1px solid var(--ink); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media print {
  .masthead, .nav, .footer, .tool .tool__cta, .disclaimer-bar { display: none !important; }
  body { font-size: 11pt; background: #fff; }
  .card, .tool, .price-card { box-shadow: none; border-color: #ccc; }
}

/* ============================================================
   THE ELEMENTAL BLUEPRINT — report document
   ============================================================
   Screen: a readable document on a paper ground.
   Print: a clean A4/Letter PDF. The print rules at the bottom are not
   decoration — the report IS the product, so page breaks and margins are
   part of the deliverable rather than a finishing touch. */

.bp-doc {
  background: var(--white);
  color: var(--ink);
  max-width: 820px;
  margin: 26px auto 0;
  padding: 54px 58px 46px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.bp-section { margin: 0 0 44px; }
.bp-section:last-child { margin-bottom: 0; }
.bp-h2 {
  font-size: 1.85rem;
  margin: 0 0 .35em;
  padding-bottom: .35em;
  border-bottom: 2px solid var(--ink);
}
.bp-lead { font-size: 1.06rem; color: var(--ink-soft); margin-bottom: 1.3em; }
.bp-muted { color: var(--ink-mute); font-weight: 400; }
.bp-small { font-size: .87rem; line-height: 1.55; }
.bp-nowrap { white-space: nowrap; }
.bp-mt { margin-top: 22px; }
.bp-doc h3 { font-size: 1.3rem; margin: 0 0 .3em; }
.bp-doc h4 { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); margin: 1.6em 0 .5em; }
.bp-doc p { margin: 0 0 .9em; }
.bp-doc ul { margin: 0 0 1em; padding-left: 1.15em; }
.bp-doc li { margin-bottom: .32em; font-size: .95rem; }

/* cover */
.bp-cover { margin: 0 0 46px; padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.bp-cover__mark { display: flex; align-items: baseline; gap: 12px; margin-bottom: 40px; }
.bp-cover__wordmark { font-weight: 600; letter-spacing: .26em; text-transform: uppercase; font-size: .82rem; }
.bp-cover__zh { color: var(--ink-mute); font-size: .85rem; letter-spacing: .1em; }
.bp-cover__title { font-size: 3.1rem; line-height: 1.06; margin: 0 0 .28em; }
.bp-cover__sub { font-family: var(--font-display); font-size: 1.3rem; color: var(--ink-soft); margin-bottom: 1.6em; }
.bp-cover__meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 26px; margin: 0 0 26px; }
.bp-cover__meta div { border-top: 1px solid var(--line-soft); padding-top: 9px; }
.bp-cover__meta dt { font-size: .7rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-mute); }
.bp-cover__meta dd { margin: 3px 0 0; font-family: var(--font-display); font-size: 1.06rem; }
.bp-cover__note { font-size: .76rem; color: var(--ink-mute); margin: 0; }

/* summary points */
.bp-points { display: grid; gap: 14px; margin-bottom: 30px; }
.bp-point { border-left: 3px solid var(--earth); padding-left: 16px; }
.bp-point__label { font-size: .7rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: .3em; }
.bp-point__text { font-size: .97rem; }

/* chart line */
.bp-chartline {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); overflow: hidden;
}
.bp-cell { background: var(--white); padding: 15px 12px; text-align: center; }
.bp-cell__role { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 6px; }
.bp-cell__gz { font-family: var(--font-display); font-size: 1.7rem; line-height: 1.1; }
.bp-cell__sub { font-size: .7rem; color: var(--ink-mute); margin-top: 6px; }

/* pillars */
.bp-pillar { border-top: 1px solid var(--line-soft); padding-top: 20px; margin-top: 22px; }
.bp-pillar__head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.bp-pillar__q { font-size: .92rem; color: var(--ink-soft); font-style: italic; margin-bottom: .7em !important; }
.bp-tag {
  font-size: .72rem; letter-spacing: .08em; padding: 3px 10px; border-radius: 100px;
  background: var(--paper-2); border: 1px solid var(--line-soft); white-space: nowrap; color: var(--ink-soft);
}
.bp-mini { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: .82rem; }
.bp-mini th {
  text-align: left; font-size: .64rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 600; padding: 6px 12px 6px 0; vertical-align: top; white-space: nowrap;
}
.bp-mini td { padding: 6px 16px 6px 0; color: var(--ink-soft); }

/* tables */
.bp-table { width: 100%; border-collapse: collapse; margin: 8px 0 0; font-size: .88rem; }
.bp-table th {
  text-align: left; font-size: .66rem; letter-spacing: .11em; text-transform: uppercase;
  color: var(--ink-mute); border-bottom: 1px solid var(--line); padding: 8px 10px 8px 0;
}
.bp-table td { border-bottom: 1px solid var(--line-soft); padding: 9px 10px 9px 0; vertical-align: top; }
.bp-table--hours td { font-size: .82rem; }
.bp-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }

/* boxes */
.bp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.bp-box { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 20px 22px; background: var(--paper); }
.bp-box__label { font-size: .68rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: .5em; }
.bp-box__big { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.25; margin: 0 0 .4em !important; }
.bp-note { font-size: .85rem; background: rgba(47,90,134,.06); border-left: 3px solid var(--water); padding: 8px 12px; border-radius: 0 4px 4px 0; }
.bp-caution { font-size: .85rem; background: rgba(200,73,47,.06); border-left: 3px solid var(--fire); padding: 10px 14px; border-radius: 0 4px 4px 0; }

/* constitution scores */
.bp-scores { list-style: none; padding: 0; margin: 0 0 8px; }
.bp-scores li { padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.bp-score__row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.bp-score__name { font-size: .93rem; font-weight: 600; }
.bp-score__num { font-family: var(--font-mono); font-size: .8rem; color: var(--ink-mute); }
.bp-score__bar { height: 5px; background: var(--paper-3); border-radius: 100px; overflow: hidden; margin-top: 5px; }
.bp-score__bar i { display: block; height: 100%; background: var(--metal); border-radius: 100px; }
.bp-scores li.is-primary .bp-score__bar i { background: var(--fire); }

/* 90-day plan */
.bp-phase { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 20px 22px; margin-bottom: 16px; background: var(--paper); }
.bp-phase__head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: .5em; }
.bp-phase__head h3 { margin: 0; }
.bp-phase__label { font-size: .68rem; letter-spacing: .13em; text-transform: uppercase; color: var(--earth); font-weight: 600; }

/* print bar */
.bp-printbar { max-width: 820px; margin: 26px auto 0; text-align: center; }
.bp-printbar .btn { margin-bottom: 10px; }

/* ---------- glossary ----------
   Built as a definition list rather than prose so that each entry stands
   alone: a reader can land on a single term, and so can anything parsing
   the page for definitions. */
.glossary-nav {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0;
  padding-top: 20px; border-top: 1px solid var(--line-soft);
}
.glossary-nav a {
  font-size: .86rem; padding: 6px 13px; border-radius: 100px;
  background: var(--paper-2); border: 1px solid var(--line-soft); color: var(--ink-soft);
}
.glossary-nav a:hover { border-color: var(--ink); color: var(--ink); }
.glossary { margin: 1.6em 0 0; }
.glossary__entry {
  padding: 18px 0; border-top: 1px solid var(--line-soft);
  display: grid; grid-template-columns: 220px 1fr; gap: 8px 28px;
  break-inside: avoid; page-break-inside: avoid;
}
.glossary__entry dt { font-family: var(--font-display); font-size: 1.08rem; }
.glossary__entry dd { margin: 0; }
.glossary__entry dd p { margin: 0 0 .5em; color: var(--ink-soft); font-size: .95rem; }
@media (max-width: 720px) {
  .glossary__entry { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- compatibility page ---------- */
/* Solar term depth: the per-constitution grid. This is the section that
   answers "what does this weather do to MY pattern", so it is built to be
   scannable rather than read as prose. */
.climate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 1.6em 0 1.8em; }
.climate-item {
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 15px 17px; background: var(--white); break-inside: avoid; page-break-inside: avoid;
}
.climate-item__name { font-weight: 600; font-size: .93rem; margin-bottom: .4em; }
.climate-item p { margin: 0 0 .5em !important; color: var(--ink-soft); }
.climate-item a { color: var(--ink-mute); }
.climate-item a:hover { color: var(--fire); }
@media (max-width: 780px) { .climate-grid { grid-template-columns: 1fr; } }

.bp-locked { list-style: none; padding: 0; margin: 0 0 8px; }
.bp-locked li { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.bp-locked li:last-child { border-bottom: 0; }
.bp-locked__tag {
  font-size: .6rem; letter-spacing: .12em; text-transform: uppercase;
  background: var(--paper-3); color: var(--ink-mute);
  padding: 2px 7px; border-radius: 100px; margin-left: 6px; vertical-align: middle;
}
.bp-unlock { display: flex; gap: 10px; margin: 14px 0 0; }
.bp-unlock .input { flex: 1 1 auto; min-width: 0; }
.bp-unlock .input.mono, #bp-code, #cp-code { font-family: var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 620px) { .bp-unlock { flex-direction: column; } .bp-unlock .btn { width: 100%; } }

.cp-set {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 20px 22px 8px;
  margin: 0;
  background: var(--paper);
}
.cp-set legend {
  font-family: var(--font-display);
  font-size: 1.1rem;
  padding: 0 8px;
  margin-left: -4px;
}
.cp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 22px 0 0; }
.cp-advanced { margin-top: 20px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.cp-advanced summary {
  cursor: pointer; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-mute); list-style: none;
}
.cp-advanced summary::-webkit-details-marker { display: none; }
.cp-advanced summary::before { content: '▸ '; }
.cp-advanced[open] summary::before { content: '▾ '; }

/* Advanced settings on the calculator form.
 * Two switches matter to a minority of visitors but double the number of
 * decisions on the first screen. Folded away, the form asks for four things
 * — date, time, city, and whether the time is known — which is the actual
 * cost of a first reading. */
details.advanced { margin: 4px 0 18px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
details.advanced summary {
  cursor: pointer; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-mute); list-style: none;
}
details.advanced summary::-webkit-details-marker { display: none; }
details.advanced summary::before { content: '▸ '; }
details.advanced[open] summary::before { content: '▾ '; }

/* Small, deliberate hint under the date and time fields.
 * Native date/time inputs look like pickers, and visitors often assume the
 * calendar is the only way in — so they hunt for the right month instead of
 * typing 1990-05-15. One line of text removes that whole detour. */
.field__hint--tip {
  display: flex;
  gap: 6px;
  align-items: baseline;
  margin-top: 6px;
  padding-left: 8px;
  border-left: 2px solid #c99a3f;
  color: var(--ink-soft);
  font-size: .74rem;
  line-height: 1.45;
}
.field__hint--tip b {
  flex: none;
  font-size: .66rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8a6a2f;
}
.cp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin: 0 0 24px; }
.cp-pair__side { border-top: 2px solid var(--ink); padding-top: 12px; }
.cp-actions { counter-reset: cpact; }
.cp-actions li { padding: 14px 0 14px 40px; position: relative; }
.cp-actions li::before {
  counter-increment: cpact; content: counter(cpact);
  position: absolute; left: 0; top: 13px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  font-size: .72rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.cp-actions .bp-score__name { font-weight: 400; font-size: .96rem; }
@media (max-width: 780px) {
  .cp-grid, .cp-pair { grid-template-columns: 1fr; }
}

/* ---------------- PRINT: the deliverable ---------------- */
@page { size: A4; margin: 17mm 16mm 15mm; }

@media print {
  .bp-doc {
    max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none;
    font-size: 9.6pt; line-height: 1.5;
  }
  .bp-h2 { font-size: 15pt; margin-bottom: .3em; }
  .bp-lead { font-size: 10pt; }
  .bp-doc p, .bp-doc li { font-size: 9.6pt; }
  .bp-doc h3 { font-size: 12pt; }
  .bp-doc h4 { font-size: 7.6pt; margin: 1.2em 0 .35em; }
  .bp-cover__title { font-size: 27pt; }
  .bp-cover__sub { font-size: 11pt; }
  .bp-cell__gz { font-size: 14pt; }
  .bp-box__big { font-size: 12pt; }
  .bp-table { font-size: 8.4pt; }
  .bp-table td, .bp-table th { padding: 4px 6px 4px 0; }
  .bp-mini { font-size: 8pt; }
  .bp-small { font-size: 8.4pt; }
  .bp-tag { border: 0; background: transparent; padding: 0; color: var(--ink-mute); font-size: 8pt; }

  /* The report replaces the site chrome. Note the deliberate absence of any
     sibling or descendant selector that could catch <main> — an earlier
     '.masthead + *' rule did exactly that and silently printed blank pages,
     because <main> is the very next element after the masthead. */
  .masthead, .footer, .disclaimer-bar, .crumbs, .no-print, .bp-printbar, .hero { display: none !important; }
  body { background: #fff; }
  main { padding: 0 !important; }

  /* page structure */
  .bp-cover { break-after: page; page-break-after: always; border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
  .bp-break { break-before: page; page-break-before: always; }
  .bp-section { margin-bottom: 22pt; }
  /* Only the large blocks are kept whole. Marking every small cell and chart
     line as unbreakable made the print engine solve a much bigger pagination
     problem, and on Safari that alone turns "Save as PDF" into a thirty-second
     wait. The big blocks still stay together, which is what matters. */
  .bp-pillar, .bp-phase, .bp-box { break-inside: avoid; page-break-inside: avoid; }
  .bp-pillar__head, .bp-h2, .bp-phase__head { break-after: avoid; page-break-after: avoid; }
  .bp-table tr { break-inside: avoid; page-break-inside: avoid; }
  .bp-table thead { display: table-header-group; }

  /* element colours must survive the printer */
  .bp-dot, .bp-score__bar i, .bp-caution, .bp-note, .bp-point { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (max-width: 780px) {
  .bp-doc { padding: 30px 22px; margin-top: 16px; }
  .bp-cover__title { font-size: 2.1rem; }
  .bp-two, .bp-cover__meta { grid-template-columns: 1fr; }
  .bp-chartline { grid-template-columns: repeat(2, 1fr); }
}
