/* =========================================================
   人生規劃 Life Planning — base + components (Milestone 1)
   ========================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* The sticky top bar (64px) must never cover what we scroll to. */
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-zh);
  font-weight: var(--w-regular);
  /* CJK line-breaking: strict kinsoku; never split inside Latin words */
  line-break: strict;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

/* `hidden` must always win over component display rules (e.g. a closed
   life event's age field must never show). */
[hidden] { display: none !important; }

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--navy); }

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Typography primitives ---------- */

h1, h2, h3, h4, .round {
  font-family: var(--font-round);
  font-weight: var(--w-bold);
  line-height: var(--lh-tight);
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 var(--s-3); }
p:last-child { margin-bottom: 0; }

/* Bilingual pattern: Chinese leads, English follows smaller + softer. */
.zh { display: inline; }
.en {
  display: block;
  font-family: var(--font-body);
  font-weight: var(--w-medium);
  color: var(--navy-soft);
  font-size: calc(1em * var(--en-ratio));
  letter-spacing: 0.01em;
  line-height: 1.4;
  margin-top: 0.3em;
}
.en-inline {
  font-family: var(--font-body);
  font-weight: var(--w-medium);
  color: var(--navy-soft);
  font-size: var(--fs-micro);
  letter-spacing: 0.01em;
}
p .en, .body-en {
  display: block;
  font-size: var(--fs-small);
  font-weight: var(--w-regular);
  color: var(--navy-soft);
  line-height: 1.55;
  margin-top: var(--s-1);
}

/* Labels / short terms: never break mid-word (no 盈／餘).
   keep-all: CJK runs only wrap at spaces, so "每月盈餘 Monthly surplus"
   can break between zh and en but never inside 盈餘. */
.term, .label, .btn, .chip, .tab {
  word-break: keep-all;
  overflow-wrap: normal;
}
.nw { white-space: nowrap; }

/* Money & figures: lining, tabular digits; never wrap. */
.figure, .money, .num {
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  white-space: nowrap;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-round);
  font-weight: var(--w-bold);
  color: var(--green);
  font-size: var(--fs-small);
  letter-spacing: 0.08em;
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--s-7); }
.section + .section { padding-top: 0; }

.section-head { margin-bottom: var(--s-5); }
.section-head h2 { font-size: var(--fs-h2); }
.section-head .lead {
  margin-top: var(--s-3);
  max-width: 42em;
  color: var(--navy);
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--cream);
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--navy);
  text-decoration: none;
  margin-right: auto;
}
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-name {
  font-family: var(--font-round);
  font-weight: var(--w-heavy);
  font-size: 1.375rem;
  line-height: 1.1;
}
.brand-name .en-inline { display: block; font-size: 0.75rem; margin-top: 2px; }

.tabs { display: flex; gap: var(--s-1); }
.tab {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  padding: 4px var(--s-4);
  border-radius: var(--r-pill);
  color: var(--navy);
  text-decoration: none;
  font-family: var(--font-round);
  font-weight: var(--w-bold);
  font-size: 1rem;
  line-height: 1.15;
}
.tab .en-inline { font-size: 0.75rem; }
.tab:hover { background: var(--gold-tint); color: var(--navy); }
.tab[aria-current="page"] { background: var(--navy); color: var(--cream-card); }
.tab[aria-current="page"] .en-inline { color: var(--gold-prework); }

.date-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-small);
  color: var(--navy);
  white-space: nowrap;
}
.date-label { color: var(--navy-soft); line-height: 1.1; }
.date-label .en-inline { display: none; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--s-8) var(--s-7);
  isolation: isolate;
}
.hero-decor {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.hero-decor svg { width: 100%; height: 100%; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: var(--s-6);
  align-items: center;
}
.hero-copy { max-width: 40rem; }
.hero-art { width: 100%; max-width: 360px; justify-self: end; }
.hero h1 {
  font-size: var(--fs-display);
  font-weight: var(--w-heavy);
  letter-spacing: 0.02em;
  margin-top: var(--s-3);
}
.hero h1 .accent { color: var(--coral-deep); }
.hero h1 .en { font-size: 0.34em; margin-top: 0.5em; letter-spacing: 0.04em; }
.hero .lead {
  margin-top: var(--s-5);
  font-size: 1.1875rem;
  max-width: 34em;
}
.hero .lead .en { font-size: var(--fs-small); font-weight: var(--w-regular); }

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-5);
}

/* ---------- Chips ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 34px;
  padding: 4px var(--s-3);
  border-radius: var(--r-pill);
  background: var(--cream-card);
  border: 1px solid var(--line);
  font-size: var(--fs-small);
  color: var(--navy);
  line-height: 1.3;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
.chip .en-inline { font-size: 0.75rem; }
.chip--locked { background: var(--navy); color: var(--cream-card); border-color: var(--navy); }
.chip--milestone { background: var(--gold-tint); border-color: var(--gold-prework); color: var(--gold-ink); font-weight: var(--w-medium); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: var(--tap-min);
  padding: 8px var(--s-5);
  border-radius: var(--r-pill);
  border: 2px solid transparent;
  font-family: var(--font-round);
  font-weight: var(--w-bold);
  font-size: 1.0625rem;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}
.btn .en-inline { color: inherit; opacity: 0.85; font-size: 0.8125rem; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--coral); color: var(--on-coral); box-shadow: 0 6px 16px -8px rgba(201, 75, 58, 0.7); }
.btn--primary:hover { background: var(--coral-deep); color: var(--on-coral); }
.btn--secondary { background: var(--cream-card); color: var(--navy); border-color: var(--navy); }
.btn--secondary:hover { background: var(--gold-tint); }
.btn--quiet { background: transparent; color: var(--green); border-color: transparent; }
.btn--quiet:hover { background: var(--green-tint); color: var(--green); }
.btn--green { background: var(--green); color: var(--on-green); }
.btn--green:hover { background: #22574F; color: var(--on-green); }
.btn[disabled], .btn[aria-disabled="true"] {
  background: var(--cream);
  color: var(--navy-soft);
  border-color: var(--line-strong);
  border-style: dashed;
  box-shadow: none;
  cursor: not-allowed;
}

/* ---------- Cards ---------- */

.card {
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--shadow-card);
}
.card h3 { font-size: var(--fs-h3); }
.card-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 14px;
  margin-bottom: var(--s-3);
  flex: none;
}
.card-icon svg { width: 26px; height: 26px; }
.card-icon--coral { background: var(--coral-tint); color: var(--coral-deep); }
.card-icon--gold { background: var(--gold-tint); color: var(--gold-ink); }
.card-icon--green { background: var(--green-tint); color: var(--green); }

/* Placeholder card: what later milestones will fill. Calm solid fill — the
   dashed border alone says "content comes later"; nothing patterned sits
   behind the text (Wall, 2/12/2026). */
.placeholder {
  background: var(--cream-card);
  border: 2px dashed var(--line-strong);
  border-radius: var(--r-lg);
  padding: var(--s-5);
}
.placeholder h3 { font-size: var(--fs-h3); }
.placeholder .note { color: var(--navy-soft); font-size: var(--fs-small); margin-top: var(--s-2); }
.placeholder .chip--milestone { margin-top: var(--s-3); }

.grid { display: grid; gap: var(--s-4); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }

/* ---------- Meeting flow ---------- */

.stepper {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--s-5);
}
.step {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-4) var(--s-2) var(--s-2);
  border-radius: var(--r-pill);
  background: var(--cream-card);
  border: 1px solid var(--line);
  word-break: keep-all;
}
.step-num {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--line-strong);
  font-family: var(--font-round);
  font-weight: var(--w-heavy);
  color: var(--navy-soft);
  flex: none;
}
.step-text { font-family: var(--font-round); font-weight: var(--w-bold); line-height: 1.2; }
.step-text .en-inline { display: block; font-size: 0.75rem; }
.step[aria-current="step"] { background: var(--navy); border-color: var(--navy); color: var(--cream-card); }
.step[aria-current="step"] .step-num { background: var(--coral); border-color: var(--coral); color: var(--on-coral); }
.step[aria-current="step"] .en-inline { color: var(--gold-prework); }
.step-arrow { align-self: center; color: var(--gold-ink); }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
  margin-bottom: var(--s-5);
}
.toolbar .spacer { flex: 1 1 auto; }

.action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  margin-top: var(--s-6);
  padding: var(--s-5);
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
}
.action-bar p { color: var(--navy-soft); font-size: var(--fs-small); max-width: 36em; }

.stage[hidden] { display: none; }

.topic-order {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  align-items: center;
  margin-top: var(--s-3);
  padding: 0;
  list-style: none;
}
.topic-order li { display: contents; }
.topic-order .chip { background: var(--cream); }
.topic-order .sep { color: var(--gold-ink); }

.circle-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: min(100%, 300px);
  margin: var(--s-4) auto 0;
}

/* ---------- Calm notice ---------- */

.notice {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  padding: var(--s-4);
  border-radius: var(--r-md);
  background: var(--green-tint);
  color: var(--navy);
  font-size: var(--fs-small);
}
.notice svg { width: 22px; height: 22px; color: var(--green); flex: none; margin-top: 3px; }

/* ---------- Sample banner (only shown after 載入示範 — M2) ---------- */

.sample-banner {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-md);
  background: var(--coral-tint);
  border: 2px solid var(--coral);
  border-left-width: 8px;
}
.sample-banner svg { width: 26px; height: 26px; color: var(--coral-deep); flex: none; margin-top: 2px; }
.sample-banner .title {
  font-family: var(--font-round);
  font-weight: var(--w-heavy);
  font-size: 1.25rem;
  color: var(--coral-deep);
  line-height: 1.3;
  word-break: keep-all;
}
.sample-banner .body-en { color: var(--navy); }

/* ---------- Design system page ---------- */

.swatch-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.swatch {
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--cream-card);
  border: 1px solid var(--line);
}
.swatch-chip { height: 96px; position: relative; }
.swatch-chip .chip { position: absolute; top: var(--s-2); left: var(--s-2); min-height: 26px; font-size: 0.75rem; }
.swatch-meta { padding: var(--s-3) var(--s-4) var(--s-4); }
.swatch-meta .term { font-family: var(--font-round); font-weight: var(--w-bold); }
.swatch-meta code { font-size: var(--fs-small); color: var(--navy); }
.swatch-meta .use { font-size: var(--fs-micro); color: var(--navy-soft); line-height: 1.5; margin-top: var(--s-1); }
.swatch--primary .swatch-chip { height: 140px; }

.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--cream-card); }
table.spec { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
table.spec th, table.spec td { text-align: left; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); vertical-align: middle; }
table.spec th { font-family: var(--font-round); font-weight: var(--w-bold); background: var(--cream); word-break: keep-all; }
table.spec tr:last-child td { border-bottom: 0; }
table.spec td.num { text-align: right; }
.pair-sample {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 8px;
  font-weight: var(--w-bold);
  white-space: nowrap;
}
.pass { color: var(--green); font-weight: var(--w-bold); white-space: nowrap; }
.warn { color: var(--coral-deep); font-weight: var(--w-bold); white-space: nowrap; }

.type-row {
  display: grid;
  grid-template-columns: minmax(0, 150px) minmax(0, 1fr);
  gap: var(--s-4);
  align-items: baseline;
  padding-block: var(--s-4);
  border-bottom: 1px solid var(--line);
}
.type-row:last-child { border-bottom: 0; }
.type-meta { font-size: var(--fs-micro); color: var(--navy-soft); line-height: 1.5; }
.type-meta strong { display: block; color: var(--navy); font-size: var(--fs-small); font-family: var(--font-round); }

.font-status { display: grid; gap: var(--s-2); margin-top: var(--s-4); }
.font-status li { list-style: none; }

.figure-demo { display: grid; gap: var(--s-2); }
.figure-demo .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-4);
  padding-block: var(--s-2);
  border-bottom: 1px dashed var(--line-strong);
}
.figure-demo .row:last-child { border-bottom: 0; }
.figure-demo .money { font-family: var(--font-round); font-weight: var(--w-bold); font-size: var(--fs-figure-l); }
.figure-demo .money small { font-size: 0.5em; color: var(--navy-soft); margin-right: 0.25em; font-weight: var(--w-medium); }

.side-by-side { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.stat {
  padding: var(--s-4);
  border-radius: var(--r-md);
  background: var(--cream);
  border: 1px solid var(--line);
  min-width: 0;
}
.stat .label { font-family: var(--font-round); font-weight: var(--w-bold); font-size: 1rem; line-height: 1.3; }
.stat .label .en-inline { display: block; font-size: 0.75rem; }
.stat .figure { font-family: var(--font-round); font-weight: var(--w-heavy); font-size: var(--fs-figure-l); margin-top: var(--s-2); line-height: 1.1; }
.stat .figure small { font-size: 0.45em; font-weight: var(--w-medium); color: var(--navy-soft); margin-right: 0.2em; }

.wrap-demo { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: flex-start; }
.wrap-demo .narrow { width: 140px; }

.formula {
  display: block;
  padding: var(--s-4);
  border-radius: var(--r-md);
  background: var(--cream);
  border: 1px solid var(--line);
  font-family: var(--font-body);
  font-variant-numeric: lining-nums tabular-nums;
  font-size: 1.0625rem;
  overflow-x: auto;
  white-space: nowrap;
}

.ref-card {
  border: 2px dashed var(--gold);
  border-radius: var(--r-md);
  padding: var(--s-4);
  background: var(--cream-card);
}

.milestone-card {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-4);
  box-shadow: var(--shadow-card);
}
.milestone-card .card-icon { margin: 0; }
.milestone-card .age { font-family: var(--font-round); font-weight: var(--w-heavy); color: var(--navy); }

.toggle-demo { display: flex; align-items: center; gap: var(--s-3); }
.switch {
  position: relative;
  width: 52px; height: 30px;
  border-radius: var(--r-pill);
  background: var(--line-strong);
  border: 0;
  padding: 0;
  cursor: pointer;
  flex: none;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--cream-card);
  box-shadow: 0 1px 3px rgba(22, 50, 92, 0.3);
  transition: transform 160ms ease;
}
.switch[aria-checked="true"] { background: var(--green); }
.switch[aria-checked="true"]::after { transform: translateX(22px); }

.icon-grid { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 112px), 1fr)); }
.icon-tile {
  display: flex; flex-direction: column; align-items: center; gap: var(--s-2);
  padding: var(--s-4) var(--s-2);
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  text-align: center;
  font-size: var(--fs-small);
  line-height: 1.3;
  word-break: keep-all;
}
.icon-tile svg { width: 36px; height: 36px; }
.icon-tile .en-inline { display: block; font-size: 0.75rem; }

.space-row { display: flex; align-items: center; gap: var(--s-4); padding-block: var(--s-1); font-size: var(--fs-small); }
.space-bar { height: 14px; background: var(--gold); border-radius: 4px; flex: none; }

.specimen-frame {
  position: relative;
  padding: var(--s-6) var(--s-4) var(--s-4);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
}
.specimen-frame > .chip { position: absolute; top: -14px; left: var(--s-4); min-height: 28px; font-size: 0.75rem; }

/* =========================================================
   Milestone 2 — intake form
   ========================================================= */

#meeting > .sample-banner { margin-bottom: var(--s-5); }

.intake-grid {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  align-items: start;
}
fieldset.form-card { margin: 0; min-width: 0; }
.form-card { display: grid; gap: var(--s-4); }
.form-card-head { display: flex; align-items: center; gap: var(--s-3); }
.form-card-head .card-icon { margin: 0; }
.form-card-head h3 { font-size: var(--fs-h3); }
.form-card-head h3 .en { margin-top: 2px; }

.form-note { font-size: var(--fs-small); color: var(--navy); margin: 0; line-height: 1.6; }
.form-note .body-en { font-size: var(--fs-micro); }
.form-note--muted { color: var(--navy-soft); }

.field { display: grid; gap: 6px; min-width: 0; }
.field-label {
  font-family: var(--font-round);
  font-weight: var(--w-bold);
  font-size: 1rem;
  line-height: 1.3;
  word-break: keep-all;
}
.field-label .en-inline { display: block; font-size: 0.75rem; font-family: var(--font-body); font-weight: var(--w-medium); }
.field-row {
  display: grid;
  gap: var(--s-3) var(--s-4);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
  align-items: end;
}

.input {
  width: 100%;
  min-width: 0;
  min-height: var(--tap-min);
  padding: 10px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--cream-card);
  color: var(--navy);
  font-size: 1.0625rem;
  line-height: 1.3;
}
.input:hover { border-color: var(--navy-soft); }
.input:focus { outline: 3px solid var(--green); outline-offset: 1px; border-color: var(--green); }
.input.num { text-align: right; }

.input-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--cream-card);
}
.input-wrap:focus-within { outline: 3px solid var(--green); outline-offset: 1px; border-color: var(--green); }
.input-wrap .input { border: 0; background: transparent; flex: 1 1 auto; }
.input-wrap .input:focus { outline: none; }
.input-wrap--short { max-width: 160px; }
.unit {
  flex: none;
  padding-inline: 4px 12px;
  color: var(--navy-soft);
  font-size: var(--fs-small);
  white-space: nowrap;
}
.unit--pre { padding-inline: 12px 0; font-size: var(--fs-micro); letter-spacing: 0.04em; }

.switch-row { display: flex; align-items: center; gap: var(--s-3); min-height: var(--tap-min); flex-wrap: wrap; }
.switch-row .term { font-family: var(--font-round); font-weight: var(--w-bold); line-height: 1.25; }
.switch-row .term .en-inline { display: block; font-family: var(--font-body); font-weight: var(--w-medium); font-size: 0.75rem; }
/* Bigger hit area for the switch without changing its look. */
.switch { margin-block: 9px; }
.switch:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

.event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.event-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2) var(--s-4);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-md);
  background: var(--cream);
  border: 1px solid var(--line);
}
.event-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--gold-tint); color: var(--gold-ink); flex: none; }
.event-icon svg { width: 20px; height: 20px; }
.event-age { grid-template-columns: auto 140px; align-items: center; gap: var(--s-3); }
.event-age .field-label { font-size: 0.875rem; text-align: right; }
/* 追夢: the dream itself, on its own line under the switch and age. */
.event-note { flex: 1 1 100%; }
.event-note .field-label { font-size: 0.875rem; }

.breakdown { display: grid; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-md); background: var(--cream); border: 1px dashed var(--line-strong); }
.sub-head { font-family: var(--font-round); font-weight: var(--w-bold); font-size: 1rem; margin: var(--s-2) 0 0; }
.sub-head .en-inline { margin-left: 6px; }
.notice--rule { background: var(--gold-tint); }
.notice--rule svg { color: var(--gold-ink); }
.notice--rule .body-en { font-size: var(--fs-micro); }
.expense-basis { margin: 0; font-size: var(--fs-small); padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); background: var(--green-tint); }
.expense-basis .money { font-family: var(--font-round); font-weight: var(--w-bold); font-size: 1.0625rem; }
.expense-basis .money small { font-size: 0.75em; color: var(--navy-soft); font-weight: var(--w-medium); }
.expense-basis .body-en { font-size: var(--fs-micro); }

.policy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.policy-row {
  display: grid;
  gap: var(--s-3);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  padding: var(--s-3);
  border-radius: var(--r-md);
  background: var(--cream);
  border: 1px solid var(--line);
}
/* Type and insurer: one full-width row each at every width, so a long bilingual
   option (永明金融 / Sun Life, 危疾 / Critical illness, 中國人壽（海外） / China Life)
   is shown whole in the closed select. Amount + premium sit side by side on wide
   screens and stack on a phone. */
.policy-row .policy-type, .policy-row .policy-insurer,
.policy-row .policy-other, .policy-row .policy-remove { grid-column: 1 / -1; }
.policy-row .policy-remove { justify-self: end; }
.policy-type .input--select, .policy-insurer .input--select { text-overflow: clip; }
/* Native <select> with a calm chevron; the 48px touch target comes from .input. */
.input--select {
  appearance: none; -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%2316325C' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px 20px;
  cursor: pointer;
  text-overflow: ellipsis;
}
.policy-empty { color: var(--navy-soft); font-size: var(--fs-small); padding: var(--s-3) var(--s-4); border: 1px dashed var(--line-strong); border-radius: var(--r-md); }
.policy-empty .en-inline { display: block; }
.btn--small { min-height: 44px; padding: 6px var(--s-4); font-size: 1rem; justify-self: start; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; border-radius: var(--r-md); background: var(--cream); border: 1px solid var(--line); }
.seg {
  min-height: var(--tap-min);
  padding: 8px 10px;
  border-radius: var(--r-sm);
  border: 2px solid transparent;
  background: transparent;
  color: var(--navy);
  font-family: var(--font-round);
  font-weight: var(--w-bold);
  line-height: 1.25;
  cursor: pointer;
  word-break: keep-all;
}
.seg .en-inline { display: block; font-family: var(--font-body); font-weight: var(--w-medium); font-size: 0.75rem; }
.seg[aria-checked="true"] { background: var(--cream-card); border-color: var(--navy); box-shadow: var(--shadow-card); }

.advanced { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--cream); }
.advanced > summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  min-height: var(--tap-min);
  padding: 8px var(--s-4);
  cursor: pointer;
  list-style: none;
  font-family: var(--font-round);
  font-weight: var(--w-bold);
}
.advanced > summary::-webkit-details-marker { display: none; }
.advanced > summary::after { content: "＋"; color: var(--gold-ink); font-size: 1.1rem; }
.advanced[open] > summary::after { content: "－"; }
.advanced > summary .en-inline { display: block; font-size: 0.75rem; font-family: var(--font-body); font-weight: var(--w-medium); }
.advanced-state { margin-left: auto; font-size: var(--fs-micro); color: var(--navy-soft); font-family: var(--font-body); font-weight: var(--w-medium); white-space: nowrap; }
.advanced-body { display: grid; gap: var(--s-3); padding: 0 var(--s-4) var(--s-4); }

.notes-panel {
  margin-top: var(--s-5);
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-lg);
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-left: 6px solid var(--gold);
}
.notes-title { display: flex; align-items: center; gap: var(--s-2); font-size: 1.0625rem; margin-bottom: var(--s-2); }
.notes-title svg { width: 20px; height: 20px; color: var(--gold-ink); }
.notes-title .en-inline { margin-left: 4px; }
.notes-panel ul, .notice-list { margin: 0; padding-left: 1.2em; display: grid; gap: var(--s-2); font-size: var(--fs-small); }
.note-item .body-en { font-size: var(--fs-micro); margin-top: 0; }
.note-item--warn::marker { color: var(--coral-deep); }

/* =========================================================
   Milestone 2 — presentation: life circle
   ========================================================= */

.outlook { padding: var(--s-6) var(--s-5); }
.outlook-head { text-align: center; max-width: 46rem; margin: 0 auto var(--s-5); }
.outlook-head .eyebrow { justify-content: center; }
.outlook-head .eyebrow .en-inline { letter-spacing: 0.01em; }
.hook {
  margin-top: var(--s-3);
  font-size: clamp(1.45rem, 2.2vw + 0.9rem, 2.35rem);
  font-weight: var(--w-heavy);
  line-height: 1.35;
  word-break: keep-all;
  text-wrap: balance;
}
.hook-num {
  font-variant-numeric: lining-nums tabular-nums;
  font-size: 1.3em;
  color: var(--gold-ink);
  padding-inline: 0.06em;
}
.hook-num--work { color: var(--coral-deep); }
.hook-wait { display: block; font-size: 0.55em; color: var(--navy-soft); font-weight: var(--w-bold); margin-top: var(--s-2); }
.hook-en { margin: var(--s-2) 0 0; color: var(--navy-soft); font-size: var(--fs-small); }
.hook-client { margin: var(--s-3) 0 0; font-size: var(--fs-small); color: var(--navy); }
.hook-client:empty { display: none; }

.circle-notice { max-width: 46rem; margin: 0 auto var(--s-5); }

.life-circle { position: relative; width: 100%; }
.lc-stage { position: relative; width: 100%; }
.lc-svg { overflow: visible; }
.lc-svg text { font-family: var(--font-round); }
.lc-wl-zh { font-size: 17px; font-weight: 700; }
.lc-wl-num { font-size: 30px; font-weight: 900; font-variant-numeric: lining-nums tabular-nums; }
.lc-age-label { fill: #16325C; font-size: 15px; font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }
.lc-age-label--tick { font-weight: 500; }
.lc-age-label--top { font-size: 15px; font-weight: 900; }
.lc-ref-age { fill: #3A5478; font-size: 12px; font-weight: 700; font-family: var(--font-body); }
.lc-conn { fill: none; stroke: #B9A77F; stroke-width: 1.5; }
.lc-conn--dotted { stroke-dasharray: 2 3; }

.lc-cards { position: absolute; inset: 0; pointer-events: none; }
.lc-cards .lc-card { position: absolute; pointer-events: auto; }
.lc-cards--list {
  position: static;
  display: grid;
  gap: var(--s-3);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  margin-top: var(--s-5);
}
.lc-cards--list .lc-card { position: static; }

.lc-card {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  padding: var(--s-3);
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  color: var(--navy);
}
.lc-age {
  flex: none;
  min-width: 52px;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  background: var(--cream);
  border: 1.5px solid var(--navy);
  text-align: center;
  font-family: var(--font-round);
  font-weight: var(--w-heavy);
  line-height: 1.1;
}
.lc-age .num { font-size: 1.25rem; }
.lc-age small { display: block; font-size: 0.75rem; font-weight: var(--w-bold); color: var(--navy-soft); }
.lc-age--now { background: var(--coral-tint); border-color: var(--coral); }
.lc-items { display: grid; gap: var(--s-2); min-width: 0; }
.lc-item { display: flex; gap: var(--s-2); align-items: flex-start; }
.lc-ic { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--green); }
.lc-item--now .lc-ic { color: var(--coral-deep); }
.lc-item--start .lc-ic, .lc-item--retire .lc-ic { color: var(--gold-ink); }
.lc-title { font-family: var(--font-round); font-weight: var(--w-bold); font-size: 1rem; line-height: 1.3; }
.lc-title .en-inline { font-size: 0.75rem; }
.lc-desc { font-size: 0.875rem; line-height: 1.45; color: var(--navy); }
.lc-desc .en-inline { display: block; font-size: 0.75rem; }

.circle-empty { display: grid; justify-items: center; gap: var(--s-3); padding: var(--s-7) var(--s-4); text-align: center; border: 2px dashed var(--line-strong); border-radius: var(--r-lg); color: var(--navy); }
.circle-empty svg { width: 48px; height: 48px; color: var(--green); }

.circle-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-3) var(--s-5);
  margin-top: var(--s-5);
}
.legend-item { display: flex; align-items: center; gap: var(--s-2); }
.legend-item .term { font-family: var(--font-round); font-weight: var(--w-bold); line-height: 1.25; }
.legend-item .en-inline { display: block; font-family: var(--font-body); font-weight: var(--w-medium); font-size: 0.75rem; }
.legend-swatch { width: 22px; height: 22px; border-radius: 6px; flex: none; border: 1px solid rgba(22, 50, 92, 0.18); }
.legend-swatch--prework { background: var(--gold-prework); }
.legend-swatch--work { background: var(--coral); }
.legend-swatch--retire { background: var(--gold-retire); }
.legend-sum { flex-basis: 100%; text-align: center; font-family: var(--font-round); font-weight: var(--w-bold); color: var(--gold-ink); }
.legend-sum .en-inline { display: block; font-family: var(--font-body); font-weight: var(--w-medium); }
.gold-explain { max-width: 40rem; margin: var(--s-3) auto 0; text-align: center; font-size: var(--fs-small); }
.gold-explain .body-en { font-size: var(--fs-micro); }

.switch-row--ref {
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px dashed var(--line-strong);
}
.ref-hint { font-size: var(--fs-small); color: var(--navy-soft); flex-basis: 100%; }
.ref-hint .en-inline { display: block; }
@media (min-width: 720px) { .ref-hint { flex-basis: auto; margin-left: var(--s-3); } }

.ref-panel {
  margin-top: var(--s-4);
  padding: var(--s-5);
  border: 2px dashed var(--gold);
  border-radius: var(--r-lg);
  background: #FFFEFA;
}
.ref-title { font-family: var(--font-round); font-weight: var(--w-bold); font-size: var(--fs-h3); margin: 0 0 var(--s-2); }
.ref-title .en-inline { display: block; font-size: 0.8125rem; }
.ref-title--table { margin-top: var(--s-5); }
.ref-assume { font-size: var(--fs-small); }
.ref-assume .body-en { font-size: var(--fs-micro); }
.ref-grid {
  display: grid;
  gap: var(--s-3);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  margin-top: var(--s-3);
}
.ref-grid .ref-card { display: grid; gap: 4px; align-content: start; }
.ref-age { font-family: var(--font-round); font-weight: var(--w-heavy); color: var(--gold-ink); font-size: 0.9375rem; }
.ref-age .num { font-size: 1.25rem; }
.ref-zh { font-family: var(--font-round); font-weight: var(--w-bold); font-size: 1.0625rem; line-height: 1.3; }
.ref-zh .en-inline { font-size: 0.75rem; }
.ref-desc { font-size: 0.875rem; line-height: 1.45; }
.ref-desc .en-inline { display: block; font-size: 0.75rem; }
.ref-table th .en-inline, .ref-table td .en-inline { display: block; font-size: 0.75rem; }
.ref-table tbody th { font-family: var(--font-round); font-weight: var(--w-bold); background: transparent; }
.ref-table .muted { color: var(--navy-soft); }
.ref-foot { margin-top: var(--s-3); font-size: var(--fs-micro); }

/* =========================================================
   Milestone 4 — stages and discussion topics.
   Solid cream cards only; nothing patterned sits behind text.
   ========================================================= */

.stages, .topics { margin-top: var(--s-5); min-width: 0; }
.topics-head { display: flex; align-items: flex-start; gap: var(--s-3); margin-bottom: var(--s-3); }
.topics-head .card-icon { margin: 0; }
.topics-head h3 { margin: 0; }
.topics-lead, .stage-lead { margin: 0 0 var(--s-4); font-size: var(--fs-small); }
.topics-lead .body-en, .stage-lead .body-en { font-size: var(--fs-micro); }

/* Stage timeline: a quiet vertical line with one card per turning point. */
.stage-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.stage {
  position: relative;
  padding: var(--s-3) var(--s-4) var(--s-3) var(--s-5);
  border: 1px solid var(--line);
  border-left: 6px solid var(--gold);
  border-radius: var(--r-md);
  background: var(--cream-card);
  min-width: 0;
}
.stage--now { border-left-color: var(--coral); background: var(--coral-tint); }
.stage--past { border-left-color: var(--line-strong); background: var(--cream); }
.stage-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3);
  min-height: var(--tap-min);
}
summary.stage-head { cursor: pointer; list-style: none; }
summary.stage-head::-webkit-details-marker { display: none; }
summary.stage-head::after { content: "＋"; margin-left: auto; color: var(--green); font-weight: var(--w-bold); }
details[open] > summary.stage-head::after { content: "－"; }
.stage-age { font-family: var(--font-round); font-weight: var(--w-heavy); color: var(--navy); white-space: nowrap; }
.stage-name { font-family: var(--font-round); font-weight: var(--w-bold); line-height: 1.3; }
.stage-name .en-inline { display: block; margin-top: 2px; }
.stage-away { font-size: var(--fs-small); color: var(--navy); margin-left: auto; }
.stage-away .en-inline { display: block; text-align: right; }
.chip--now { background: var(--coral); border-color: var(--coral); color: var(--on-coral); font-weight: var(--w-bold); }
.chip--now .en-inline { color: var(--on-coral); }
.stage-body { padding-bottom: var(--s-2); }
.stage-text { margin: 0 0 var(--s-2); font-size: var(--fs-small); line-height: 1.65; }
.stage-text .body-en { font-size: var(--fs-micro); }
.stage-text--here { font-weight: var(--w-medium); }
/* 結婚／置業: the responsibility and the 人壽 point are the heart of the card. */
.stage-text--life {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  background: var(--gold-tint);
  border: 1px solid var(--line-strong);
  font-size: 1rem;
  line-height: 1.7;
}
.stage-text--life .body-en { font-size: var(--fs-small); }
.stage-focus {
  display: block; margin-bottom: var(--s-1);
  font-family: var(--font-round); font-weight: var(--w-heavy); font-size: var(--fs-small);
  color: var(--gold-ink); word-break: keep-all;
}
.stage-focus .en-inline { margin-left: var(--s-2); color: var(--gold-ink); }

/* Discussion topics, one under another, divided by a quiet dashed line. */
.topic { padding-top: var(--s-5); margin-top: var(--s-5); border-top: 1px dashed var(--line-strong); min-width: 0; }
.topic[hidden] { display: none; }
.topic-title {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s-2) var(--s-3);
  font-family: var(--font-round); font-weight: var(--w-heavy);
  font-size: var(--fs-h3); line-height: 1.3; margin: 0 0 var(--s-3); word-break: keep-all;
}
.topic-title .en-inline { font-size: var(--fs-small); }
.topic-no {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gold-tint); border: 2px solid var(--gold); color: var(--navy);
  font-size: 1rem; flex: none; align-self: center;
}
.topic-text { margin: 0 0 var(--s-3); font-size: var(--fs-small); line-height: 1.7; }
.topic-text .body-en { font-size: var(--fs-micro); }
.topic-text--soft { color: var(--navy-soft); }
.topic-asks { margin: 0 0 var(--s-4); padding-left: 1.25em; display: grid; gap: var(--s-2); font-size: var(--fs-small); line-height: 1.6; }
.topic-asks .body-en { font-size: var(--fs-micro); }
.topic-order { margin-top: var(--s-2); }
.topic-order .chip .en-inline { margin-left: var(--s-1); }

/* Cover-type comparison (types only; never amounts). */
.cover { margin-top: var(--s-4); display: grid; gap: var(--s-3); min-width: 0; }
.cover-title { font-family: var(--font-round); font-weight: var(--w-bold); font-size: 1.125rem; margin: 0; word-break: keep-all; }
.cover-title .en-inline { display: block; font-size: var(--fs-micro); margin-top: 2px; }
.cover-note { margin: 0; font-size: var(--fs-small); line-height: 1.6; }
.cover-note .body-en { font-size: var(--fs-micro); }
.cover-calm { background: var(--cream); border: 1px solid var(--line); }
.cover-calm p { margin: var(--s-1) 0 0; }
.cover-calm .body-en { font-size: var(--fs-micro); color: var(--navy-soft); }
.cover-table th .en-inline, .cover-table td .en-inline { display: block; font-size: 0.75rem; }
.cover-table tbody th { font-family: var(--font-round); font-weight: var(--w-bold); background: transparent; width: 42%; }
.cover-status {
  display: inline-flex; flex-direction: column; gap: 0;
  padding: 4px var(--s-3); border-radius: var(--r-md);
  font-family: var(--font-round); font-weight: var(--w-bold); line-height: 1.3;
  word-break: keep-all;
}
.cover-status .en-inline { font-weight: var(--w-medium); }
.cover-status--have { background: var(--green-tint); color: #1F5249; }
.cover-status--have .en-inline { color: #1F5249; }
.cover-status--missing { background: var(--gold-tint); color: var(--gold-ink); }
.cover-status--missing .en-inline { color: var(--gold-ink); }
.cover-from { display: block; margin-top: var(--s-1); font-size: var(--fs-micro); color: var(--navy-soft); overflow-wrap: anywhere; }
.cover-from .en-inline { display: block; }
/* 結婚／置業 on: the 人壽 row says why it matters, in a quiet gold note (solid, no pattern). */
.cover-table .cover-row--focus > th { background: var(--gold-tint); }
.cover-focus {
  display: block; margin-top: var(--s-1);
  font-family: var(--font-body); font-weight: var(--w-medium); font-size: var(--fs-micro);
  line-height: 1.5; color: var(--gold-ink);
}
.cover-focus .en-inline { display: block; color: var(--gold-ink); }

/* =========================================================
   Milestone 3 — retirement numbers (now the first discussion topic)
   Solid calm backgrounds only; nothing patterned behind text.
   ========================================================= */

.topic > .sum-sample { margin-bottom: var(--s-4); }
.topic > .summary-foot { margin-top: var(--s-5); }
.summary-body { display: grid; gap: var(--s-5); min-width: 0; }
.summary-foot { font-size: var(--fs-small); color: var(--navy); margin: 0; padding-top: var(--s-4); border-top: 1px dashed var(--line-strong); }
.summary-foot .body-en { font-size: var(--fs-micro); }

.sum-sample {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  background: var(--coral-tint);
  border: 2px solid var(--coral);
  border-left-width: 8px;
}
.sum-sample svg { width: 22px; height: 22px; color: var(--coral-deep); flex: none; margin-top: 3px; }
.sum-sample strong { font-family: var(--font-round); color: var(--coral-deep); }
.sum-sample .body-en { margin-top: 0; font-size: var(--fs-micro); color: var(--navy); }

.sum-block { display: grid; gap: var(--s-3); min-width: 0; }
.sum-title {
  font-family: var(--font-round); font-weight: var(--w-bold);
  font-size: 1.125rem; line-height: 1.3; margin: 0; word-break: keep-all;
}
.sum-title .en-inline { display: block; font-size: 0.8125rem; margin-top: 2px; }
.sum-text { margin: 0; font-size: var(--fs-small); line-height: 1.65; }
.sum-text .body-en { font-size: var(--fs-micro); }
.sum-text--soft { color: var(--navy-soft); }

/* 每月要儲 vs 而家每月可儲 — always side by side. */
.sum-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.sum-stat {
  min-width: 0;
  padding: var(--s-4);
  border-radius: var(--r-md);
  background: var(--cream);
  border: 1.5px solid var(--line-strong);
}
.sum-stat--need { background: var(--coral-tint); border-color: var(--coral); }
.sum-stat--now { background: var(--green-tint); border-color: var(--green); }
.sum-label { font-family: var(--font-round); font-weight: var(--w-bold); font-size: 1rem; line-height: 1.3; }
.sum-label .en-inline { display: block; font-size: 0.75rem; }
.sum-fig {
  margin-top: var(--s-2);
  font-family: var(--font-round); font-weight: var(--w-heavy);
  font-size: clamp(1.45rem, 1.4vw + 1rem, 2.4rem);
  line-height: 1.1;
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}
.sum-fig--long { font-size: clamp(1.1rem, 0.9vw + 0.85rem, 1.75rem); }
.sum-sub .money small, .sum-text .money small { font-size: 0.75em; font-weight: var(--w-medium); color: var(--navy-soft); margin-right: 0.25em; }
.sum-fig small { font-size: 0.42em; font-weight: var(--w-medium); color: var(--navy-soft); margin-right: 0.3em; }
.sum-sub { margin-top: var(--s-2); font-size: var(--fs-small); line-height: 1.5; }
.sum-sub .en-inline { display: block; font-size: 0.75rem; }
.sum-sub .money { font-weight: var(--w-bold); }

/* Statement panel (reached / exceeded / retired / missing data). */
.sum-state {
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-md);
  background: var(--green-tint);
  border: 1.5px solid var(--green);
}
.sum-state--info { background: var(--gold-tint); border-color: var(--gold); }
.sum-state .sum-title { margin-bottom: var(--s-2); }
.sum-state ul { margin: var(--s-2) 0 0; padding-left: 1.2em; font-size: var(--fs-small); display: grid; gap: 2px; }

/* Calculation list: label + formula on the left, figure on the right. */
.calc-list { margin: 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--cream-card); overflow: hidden; }
.calc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px var(--s-4);
  align-items: baseline;
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--line);
}
.calc-row:last-child { border-bottom: 0; }
.calc-row dt { font-family: var(--font-round); font-weight: var(--w-bold); line-height: 1.35; word-break: keep-all; min-width: 0; }
.calc-row dt .en-inline { display: block; font-size: 0.75rem; }
.calc-how {
  display: block;
  margin-top: 2px;
  font-family: var(--font-body); font-weight: var(--w-regular);
  font-size: var(--fs-small); line-height: 1.5;
  color: var(--navy-soft);
}
.calc-row dd {
  margin: 0; text-align: right;
  font-family: var(--font-round); font-weight: var(--w-bold);
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}
.calc-row dd small { font-size: 0.7em; color: var(--navy-soft); font-weight: var(--w-medium); margin-right: 0.25em; }
.calc-row--key { background: var(--coral-tint); }
.calc-row--key dt, .calc-row--key dd { color: var(--navy); }
.calc-row--key .calc-how { color: var(--navy); }

.sum-formula {
  display: block; margin: 0;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-sm);
  background: var(--cream);
  border: 1px solid var(--line);
  font-family: var(--font-body);
  font-variant-numeric: lining-nums tabular-nums;
  font-size: 1rem;
  white-space: nowrap;
  overflow-x: auto;
}

.sum-line { padding: var(--s-4); border-radius: var(--r-md); background: var(--cream); border: 1px dashed var(--line-strong); }
.sum-line .sum-result { margin: var(--s-2) 0 0; font-family: var(--font-round); font-weight: var(--w-bold); font-size: 1.0625rem; }
.sum-line .sum-result .money small { font-size: 0.7em; color: var(--navy-soft); font-weight: var(--w-medium); margin-right: 0.25em; }

/* Rim-label leader: a short dotted line from a nudged age label to its marker. */
.lc-leader { fill: none; stroke: #8A7A55; stroke-width: 1; stroke-dasharray: 2 2; }

.is-narrow .lc-wl-zh { font-size: 13px; }
.is-narrow .lc-wl-num { font-size: 21px; }
.is-narrow .lc-age-label { font-size: 13px; }
.is-narrow .lc-age-label--top { font-size: 13px; }
.is-narrow .lc-ref-age { font-size: 11px; }

/* ---------- Footer: advisor + disclaimer ---------- */

.site-footer {
  margin-top: var(--s-8);
  background: var(--navy);
  color: var(--cream-card);
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  /* thin gold rim echo */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, var(--coral) 0 38%, var(--gold) 38% 86%, var(--green) 86% 100%);
}
.site-footer a { color: var(--gold-prework); }
.site-footer a:hover { color: var(--cream-card); }
.footer-grid {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  padding-block: var(--s-7) var(--s-6);
}
.advisor-card {
  background: var(--cream-card);
  color: var(--navy);
  border-radius: var(--r-xl);
  padding: var(--s-6) var(--s-5);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s-5);
  align-items: center;
  box-shadow: var(--shadow-lift);
}
.advisor-card a { color: var(--green); }
.advisor-card a:hover { color: var(--navy); }
/* Link-buttons inside the card keep cream text (the plain-link colour above
   used to win and made the green button's label green-on-green). */
.advisor-card a.btn--green,
.advisor-card a.btn--green:hover,
.advisor-card a.btn--green:visited { color: var(--on-green); }
.advisor-card a.btn--green .en-inline { color: var(--on-green); opacity: 0.9; }
/* Cartoon portrait (Wall's Memoji, approved). Cropped round, never stretched
   (aspect-ratio + cover), no filter. Only ever used on the advisor card. */
.advisor-photo {
  display: block;
  width: 148px; height: 148px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  background: var(--cream);
  border: 4px solid var(--gold);   /* thin plain ring — no wedges, so it never echoes the life circle */
  box-shadow: 0 8px 20px -10px rgba(22, 50, 92, 0.35);
}
.advisor-info { min-width: 0; }
.advisor-kicker {
  font-family: var(--font-round);
  font-weight: var(--w-bold);
  font-size: var(--fs-small);
  color: var(--gold-ink);
  margin-bottom: var(--s-1);
}
.advisor-kicker .en-inline { margin-left: var(--s-2); }
.advisor-fine { margin-top: var(--s-3); font-size: var(--fs-small); color: var(--navy-soft); line-height: 1.5; }
.advisor-fine .body-en { font-size: var(--fs-micro); }
.advisor-contact { text-align: center; }
.advisor-name { font-family: var(--font-round); font-weight: var(--w-heavy); font-size: 1.375rem; line-height: 1.25; }
.advisor-name .en-inline { display: block; font-size: 0.875rem; margin-top: 2px; }
.advisor-role { margin-top: var(--s-2); font-weight: var(--w-medium); line-height: 1.4; }
.advisor-role .en-inline { display: block; }
.advisor-licence { margin-top: var(--s-2); font-size: var(--fs-small); }
.advisor-card .btn { margin-top: var(--s-4); }

.footer-notes h2 {
  font-size: var(--fs-h3);
  color: var(--cream-card);
  margin-bottom: var(--s-3);
}
.footer-notes p { color: #E8E1D0; font-size: var(--fs-small); }
.footer-notes .body-en { color: #BFC9D8; font-size: var(--fs-micro); }
.footer-notes .note-block + .note-block { margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid rgba(255, 253, 247, 0.14); }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3);
  padding-block: var(--s-4) var(--s-5);
  border-top: 1px solid rgba(255, 253, 247, 0.14);
  font-size: var(--fs-micro);
  color: #BFC9D8;
}

/* ---------- Narrow screens (~360px portrait) ---------- */

@media (max-width: 640px) {
  /* At ~360px the two-row bar is ~110px tall; sticky, it sliced the life-circle
     hook and the top of the reference panel. On narrow screens it now scrolls
     away with the page (the date stays), so nothing is ever covered. */
  .topbar { position: static; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--cream); }
  html { scroll-padding-top: 12px; }
  /* Row 1: brand (left) + today's date (right). Row 2: tabs full width. */
  .topbar-inner { flex-wrap: wrap; gap: var(--s-2); padding-block: var(--s-2); }
  .brand { gap: var(--s-2); min-width: 0; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-size: 1.1875rem; }
  .date-chip {
    order: 2;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    font-size: 0.875rem;
    line-height: 1.2;
    text-align: right;
  }
  .date-label { font-size: 0.75rem; }
  .date-label .en-inline { display: inline; font-size: 0.6875rem; margin-left: 4px; }
  .tabs { order: 3; width: 100%; }
  .tab { flex: 1 1 0; }
  .hero { padding-block: var(--s-6) var(--s-5); }
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-5); }
  .hero-art { max-width: 200px; justify-self: center; }
  .section { padding-block: var(--s-6); }
  .card, .placeholder { padding: var(--s-4); }
  .action-bar { padding: var(--s-4); }
  .action-bar .btn { width: 100%; }
  .type-row { grid-template-columns: 1fr; gap: var(--s-2); }
  .advisor-card { grid-template-columns: minmax(0, 1fr); padding: var(--s-5) var(--s-4); gap: var(--s-4); }
  .advisor-photo { justify-self: center; width: 160px; height: 160px; }
  .advisor-info { text-align: center; }
  .advisor-contact { width: 100%; }
  .advisor-card .btn { justify-content: center; }
  .step-arrow { display: none; }
  .side-by-side { grid-template-columns: 1fr; }
  .outlook { padding: var(--s-5) var(--s-4); }
  .policy-row { grid-template-columns: minmax(0, 1fr); }
  .policy-row .policy-remove { justify-self: end; }
  /* A phone select is ~220px of text space: trim its padding so the longest label still fits. */
  .policy-type .input--select, .policy-insurer .input--select { padding-left: 12px; padding-right: 36px; font-size: 1rem; background-position: right 10px center; }
  .toolbar .btn { flex: 1 1 auto; }
  .notes-panel { padding: var(--s-4); }
  .ref-panel { padding: var(--s-4); }
  .event-age { grid-template-columns: auto 128px; }
  .stage { padding: var(--s-2) var(--s-3) var(--s-2) var(--s-4); border-left-width: 5px; }
  .stage-away { margin-left: 0; flex-basis: 100%; }
  .stage-away .en-inline { text-align: left; }
  .topic { padding-top: var(--s-4); margin-top: var(--s-4); }
  .cover-table tbody th { width: 38%; }
  .sum-pair { gap: var(--s-2); }
  .sum-stat { padding: var(--s-3); }
  .sum-fig { font-size: 1.5rem; }
  .sum-fig--long { font-size: 1.15rem; }
  .sum-sub { font-size: 0.875rem; }
  .sum-state { padding: var(--s-3) var(--s-4); }
  .sum-formula { font-size: 0.875rem; }
  /* Calculation rows stack: label, formula, then the figure — never squeezed. */
  .calc-row { grid-template-columns: minmax(0, 1fr); padding: var(--s-3); }
  .calc-row dd { text-align: left; font-size: 1.125rem; margin-top: 2px; }
}

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

@media (max-width: 400px) {
  .policy-type .input--select, .policy-insurer .input--select { font-size: 0.9375rem; }
}

/* =========================================================
   Milestone 5b — the export is a print-only record of EXACTLY TWO A4 pages.
   「匯出紀錄」 calls window.print(). What comes out is not the meeting page
   (that is hidden in print and untouched on screen) but .print-doc:
     page 1 — 圖表與現況分析: header, life circle + hook, current situation, cover noted
     page 2 — 缺口與建議: gap figures, the calm stage / cover discussion, advisor + disclaimers
   app.js fills .print-doc from the plan model, moves the live circle and the
   advisor card in, and puts them back after printing. Each page is a fixed
   273mm box inside the 275mm print area, so a third page cannot appear; if a page
   would overflow, app.js steps data-fit 0 → 3 (tighter type) until both fit.
   Locked colours only (print-color-adjust: exact); the paper stays cream.
   ========================================================= */

.export-note { flex: 1 1 100%; margin: 0; color: var(--navy-soft); font-size: var(--fs-small); }
.export-note .body-en { font-size: var(--fs-micro); }
.export-hint { margin-bottom: var(--s-4); }

@page { size: A4 portrait; margin: 11mm 10mm; }

/* On screen the record does not exist … */
.print-doc { display: none; }
/* … except for a moment while app.js lays it out off-screen to measure it. */
html.is-printing .print-doc {
  display: block;
  position: fixed; top: 0; left: -10000px;
  width: 190mm;
  visibility: hidden; pointer-events: none;
}

/* ---------- The record itself (px units: identical on screen-measure and on paper) ---------- */
.print-doc {
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.5;
  color: var(--navy);
  background: var(--cream);
}
.print-doc *, .print-doc *::before, .print-doc *::after { box-sizing: border-box; }
.print-doc p { margin: 0; }
.print-doc h2, .print-doc h3 { margin: 0; font-family: var(--font-round); line-height: 1.25; text-wrap: balance; }
.print-doc .en-inline { font-size: 9.5px; margin-left: 4px; line-height: 1.3; }
.print-doc .body-en { display: block; font-size: 9.5px; line-height: 1.35; margin-top: 1px; color: var(--navy-soft); }
.print-doc .print-empty { display: none; }
.print-doc .pp-blank { color: var(--navy-soft); font-weight: var(--w-medium); }

.print-page {
  position: relative;
  width: 190mm; height: 273mm;
  overflow: hidden;
  display: flex; flex-direction: column; gap: 9px;
  break-inside: avoid; page-break-inside: avoid;
}
.print-page > * { flex: none; }

/* Header (page 1): title, client, date, one-line purpose, and the ONE sample mark. */
.print-head {
  padding: 8px 14px 9px;
  background: var(--cream-card);
  border: 1px solid var(--gold);
  border-left: 8px solid var(--coral);
  border-radius: 12px;
}
.print-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.print-title { font-family: var(--font-round); font-weight: var(--w-heavy); font-size: 22px; line-height: 1.2; }
.print-title .en-inline { display: block; font-size: 11px; margin: 1px 0 0; }
.print-meta { display: flex; gap: 16px; font-size: 13px; }
.print-meta .en-inline { margin: 0 4px; }
.print-purpose { margin-top: 4px; font-size: 11.5px; }
.print-sample:not([hidden]) {
  margin-top: 5px; padding: 3px 10px;
  background: var(--coral-tint); border: 1.5px solid var(--coral); border-radius: 8px;
  color: var(--coral-deep); font-size: 11.5px;
}
.print-sample strong { font-family: var(--font-round); font-weight: var(--w-heavy); }
.print-sample .body-en { display: inline; margin: 0 0 0 8px; color: var(--navy); }

.print-part {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px;
  padding-bottom: 3px;
  border-bottom: 2px solid var(--gold);
  font-size: 15px; font-weight: var(--w-heavy);
}
.print-part .en-inline { margin-left: 0; font-size: 10.5px; }
.print-part-meta { margin-left: auto; font-family: var(--font-body); font-weight: var(--w-regular); font-size: 11px; color: var(--navy-soft); }
.print-part-meta strong { font-weight: var(--w-bold); color: var(--navy); }

.pp-body { display: flex; flex-direction: column; gap: 9px; }
.pp-body > * { flex: none; }
.pp-block { break-inside: avoid; page-break-inside: avoid; }
.pp-h { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; font-size: 14px; font-weight: var(--w-bold); }
.pp-h .en-inline { margin-left: 0; font-weight: var(--w-medium); }
.pp-note { font-size: 10px; line-height: 1.4; color: var(--navy); }
.pp-calm { padding: 6px 10px; background: var(--cream-card); border: 1px solid var(--line); border-radius: 8px; font-size: 11.5px; }

/* ---- Page 1 ---- */
.pp-hook { text-align: center; }
.pp-hook-zh { font-family: var(--font-round); font-weight: var(--w-heavy); font-size: 21px; line-height: 1.3; word-break: keep-all; }
.pp-hook-zh .hook-wait { font-size: 14px; }
.pp-hook-en { margin-top: 1px; font-size: 10.5px; color: var(--navy-soft); }
.pp-hook-client { margin-top: 2px; font-size: 11.5px; }
.pp-hook-client:empty { display: none; }

.pp-row { display: grid; grid-template-columns: 440px minmax(0, 1fr); gap: 16px; align-items: start; }
.pp-wheel { width: 440px; }
.pp-wheel .life-circle { width: 440px; margin: 0; }
.pp-wheel .lc-cards { display: none; }        /* the events are listed beside the wheel instead */
.pp-wheel .circle-empty { padding: 36px 12px; font-size: 12px; }
.pp-side { display: grid; gap: 7px; align-content: start; min-width: 0; }
.pp-legend { display: grid; gap: 5px; margin: 0; justify-content: stretch; }
.pp-legend .legend-item { gap: 7px; font-size: 12px; }
.pp-legend .legend-swatch { width: 16px; height: 16px; border-radius: 4px; }
.pp-legend .legend-item .en-inline { font-size: 9.5px; margin: 0; }
.pp-legend .legend-sum { text-align: left; font-size: 11.5px; padding-top: 4px; border-top: 1px dashed var(--line-strong); }
.pp-legend .legend-sum .en-inline { font-size: 9.5px; margin: 0; }
.pp-gold { font-size: 10px; line-height: 1.4; }
.pp-events { list-style: none; margin: 0; padding: 0; display: grid; }
.pp-events li { display: flex; gap: 6px; align-items: baseline; padding: 2px 0; border-bottom: 1px dotted var(--line-strong); font-size: 12px; line-height: 1.35; }
.pp-events .pp-age { flex: none; min-width: 26px; text-align: right; font-family: var(--font-round); font-weight: var(--w-heavy); font-size: 14px; }
.pp-events .pp-noage { color: var(--navy-soft); }

.pp-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pp-fact { padding: 5px 9px; background: var(--cream-card); border: 1px solid var(--line); border-radius: 9px; }
.pp-fact-label { font-size: 10.5px; line-height: 1.25; }
.pp-fact-label .en-inline { display: block; margin: 0; font-size: 9px; }
.pp-fact-val { margin-top: 1px; font-family: var(--font-round); font-weight: var(--w-bold); font-size: 14px; line-height: 1.25; white-space: nowrap; }
.pp-fact-val .money { font-family: var(--font-round); }
.pp-fact-val .money small { font-size: 9.5px; font-weight: var(--w-medium); color: var(--navy-soft); margin-right: 3px; }

.pp-cover-table { width: 100%; border-collapse: separate; border-spacing: 0 3px; }
.pp-cover-table th, .pp-cover-table td { padding: 3px 9px; background: var(--cream-card); vertical-align: top; text-align: left; font-size: 11px; line-height: 1.35; }
.pp-cover-table th { width: 19%; border-radius: 8px 0 0 8px; font-family: var(--font-round); font-weight: var(--w-bold); border: 1px solid var(--line); border-right: 0; }
.pp-cover-table th .en-inline { display: block; margin: 0; font-family: var(--font-body); font-weight: var(--w-medium); }
.pp-cover-table td { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pp-cover-table td:first-of-type { width: 17%; }
.pp-cover-table td:last-child { border-right: 1px solid var(--line); border-radius: 0 8px 8px 0; }
.pp-cover-table .pp-row--focus th, .pp-cover-table .pp-row--focus td { background: var(--gold-tint); }
.pp-status { display: inline-flex; flex-direction: column; padding: 1px 9px; border-radius: 8px; font-family: var(--font-round); font-weight: var(--w-bold); font-size: 11px; line-height: 1.25; word-break: keep-all; }
.pp-status .en-inline { margin: 0; font-family: var(--font-body); font-weight: var(--w-medium); font-size: 9px; }
.pp-status--have { background: var(--green-tint); color: #1F5249; }
.pp-status--have .en-inline { color: #1F5249; }
.pp-status--missing { background: var(--gold-tint); color: var(--gold-ink); }
.pp-status--missing .en-inline { color: var(--gold-ink); }
.pp-cover-facts { overflow-wrap: anywhere; }
.pp-cover-facts + .pp-cover-facts { margin-top: 2px; padding-top: 2px; border-top: 1px dotted var(--line-strong); }
.pp-cover-facts .en-inline { display: block; margin: 0; }
.pp-cover-focus { margin-top: 2px; color: var(--gold-ink); font-weight: var(--w-medium); font-size: 10.5px; }
.pp-cover-focus .en-inline { display: block; margin: 0; color: var(--gold-ink); }
.pp-cover .pp-note { margin-top: 2px; }

/* ---- Page 2 ---- */
.pp-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 5px; }
.pp-stat { padding: 6px 12px 7px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--cream-card); break-inside: avoid; }
.pp-stat--need { background: var(--coral-tint); border-color: var(--coral); }
.pp-stat--now { background: var(--green-tint); border-color: var(--green); }
.pp-stat-label { font-family: var(--font-round); font-weight: var(--w-bold); font-size: 12.5px; line-height: 1.25; }
.pp-stat-label .en-inline { display: block; margin: 0; font-size: 9.5px; }
.pp-fig { margin-top: 2px; font-family: var(--font-round); font-weight: var(--w-heavy); font-size: 26px; line-height: 1.1; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.pp-fig small { font-size: 11px; font-weight: var(--w-medium); color: var(--navy-soft); margin-right: 4px; }
.pp-fig .pp-fig--long { font-size: 21px; }
.pp-stat-sub { margin-top: 2px; font-size: 11px; line-height: 1.35; }
.pp-stat-sub .en-inline { display: block; margin: 0; font-size: 9.5px; }
.pp-stat-sub .money { font-weight: var(--w-bold); }
.pp-stat-sub .money small { font-size: 9px; font-weight: var(--w-medium); color: var(--navy-soft); margin-right: 3px; }

.pp-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin-bottom: 4px; }
.pp-kv-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 2px 0; border-bottom: 1px dotted var(--line-strong); font-size: 11.5px; line-height: 1.35; }
.pp-kv-val { flex: none; font-family: var(--font-round); font-weight: var(--w-bold); white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.pp-method, .pp-straight { margin-top: 3px; font-size: 10.5px; line-height: 1.45; }
.pp-method .body-en, .pp-straight .body-en { font-size: 9px; }
.pp-straight .money small, .pp-method .money small { font-size: 8.5px; margin-right: 2px; color: var(--navy-soft); }

.pp-rec-lead { margin-bottom: 5px; }
.pp-stages { display: grid; gap: 4px; }
.pp-stage {
  display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px;
  padding: 4px 9px;
  background: var(--cream-card);
  border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: 8px;
  break-inside: avoid; page-break-inside: avoid;
}
.pp-stage--life { background: var(--gold-tint); }
.pp-stage--now { border-left-color: var(--coral); }
.pp-stage-head { display: grid; align-content: start; gap: 0; min-width: 0; }
.pp-stage-age { font-family: var(--font-round); font-weight: var(--w-heavy); font-size: 13px; line-height: 1.25; }
.pp-stage-name { font-family: var(--font-round); font-weight: var(--w-bold); font-size: 11.5px; line-height: 1.25; }
.pp-stage-name .en-inline { display: block; margin: 0; font-family: var(--font-body); font-weight: var(--w-medium); font-size: 8.5px; }
.pp-here { font-family: var(--font-round); font-weight: var(--w-bold); font-size: 9.5px; color: var(--coral-deep); }
.pp-here .en-inline { margin-left: 3px; font-size: 8.5px; color: var(--coral-deep); }
.pp-stage-zh { font-size: 10.5px; line-height: 1.4; }
.pp-stage-en { margin-top: 1px; font-size: 8.5px; line-height: 1.3; color: var(--navy-soft); }
.pp-life-tag { margin-right: 4px; font-family: var(--font-round); font-weight: var(--w-bold); color: var(--gold-ink); }
.pp-cover-sum { margin-top: 5px; padding: 4px 9px; background: var(--cream-card); border: 1px solid var(--line); border-radius: 8px; font-size: 10.5px; line-height: 1.4; }
.pp-cover-sum .body-en { font-size: 8.5px; }
.pp-topics { display: grid; gap: 6px; margin-top: 5px; }
.pp-topics--2 { grid-template-columns: 1fr 1fr; }
.pp-topic { padding: 4px 9px; background: var(--cream-card); border: 1px solid var(--line); border-radius: 8px; font-size: 10.5px; line-height: 1.4; break-inside: avoid; }
.pp-topic > strong { margin-right: 6px; font-family: var(--font-round); font-weight: var(--w-bold); }
.pp-topic > strong .en-inline { margin-left: 4px; font-size: 8.5px; }
.pp-topic .body-en { font-size: 8.5px; }

.pp-foot { margin-top: auto; display: grid; gap: 6px; }
.print-disclaimers { list-style: none; margin: 0; padding: 5px 0 0; border-top: 2px solid var(--gold); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; font-size: 10px; line-height: 1.4; }
.print-disclaimers .body-en { font-size: 8.5px; }

/* The one advisor card (moved here from the page footer), set compactly on cream. */
.print-doc .advisor-card {
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 12px;
  padding: 7px 12px;
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: none;
  break-inside: avoid;
}
.print-doc .advisor-photo { width: 62px; height: 62px; border-width: 3px; box-shadow: none; }
.print-doc .advisor-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; align-items: center; }
.print-doc .advisor-info > * { grid-column: 1; margin: 0; }
.print-doc .advisor-kicker { font-size: 10.5px; }
.print-doc .advisor-name { font-size: 16px; }
.print-doc .advisor-name .en-inline { display: inline; margin-left: 6px; font-size: 10.5px; }
.print-doc .advisor-role { margin-top: 1px; font-size: 11px; line-height: 1.3; }
.print-doc .advisor-role .en-inline { display: inline; margin-left: 4px; font-size: 9.5px; }
.print-doc .advisor-licence { margin-top: 1px; font-size: 10.5px; }
.print-doc .advisor-info > .advisor-contact {
  grid-column: 2; grid-row: 1 / span 3; justify-self: end;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 0; padding: 6px 14px; font-size: 12px; line-height: 1.25;
}
.print-doc .advisor-contact svg { width: 14px; height: 14px; }
.print-doc .advisor-contact .en-inline { font-size: 9.5px; margin: 0; }
.print-doc .advisor-info > .advisor-fine { grid-column: 2; grid-row: 4; max-width: 200px; margin-top: 3px; font-size: 9.5px; line-height: 1.35; text-align: right; }
.print-doc .advisor-fine .body-en { font-size: 8.5px; }

/* ---------- Tighter type when a page would overflow (set by app.js, never by hand) ---------- */
.print-doc[data-fit="1"] .print-page, .print-doc[data-fit="1"] .pp-body { gap: 6px; }
.print-doc[data-fit="1"] .pp-stages { gap: 3px; }
.print-doc[data-fit="1"] .pp-stage { padding: 3px 8px; }
.print-doc[data-fit="1"] .pp-fig { font-size: 23px; }
.print-doc[data-fit="1"] .pp-hook-zh { font-size: 19px; }
.print-doc[data-fit="1"] .pp-gold .body-en, .print-doc[data-fit="1"] .pp-hook-en { display: none; }

.print-doc[data-fit="2"] .print-page, .print-doc[data-fit="2"] .pp-body { gap: 5px; }
.print-doc[data-fit="2"] .pp-stages { gap: 2px; }
.print-doc[data-fit="2"] .pp-stage { padding: 2px 8px; }
.print-doc[data-fit="2"] .pp-fig { font-size: 21px; }
.print-doc[data-fit="2"] .pp-hook-zh { font-size: 18px; }
.print-doc[data-fit="2"] .pp-gold .body-en, .print-doc[data-fit="2"] .pp-hook-en { display: none; }
.print-doc[data-fit="2"] .pp-stage-zh { font-size: 10px; line-height: 1.35; }
.print-doc[data-fit="2"] .pp-stage-en { font-size: 8px; line-height: 1.25; }
.print-doc[data-fit="2"] .pp-method .body-en, .print-doc[data-fit="2"] .pp-straight .body-en { display: none; }
.print-doc[data-fit="2"] .pp-cover .pp-note .body-en { display: none; }

/* Last resort: stage rows keep their Chinese text and bilingual titles; only the
   long English paragraph is dropped, except for 結婚 / 置業 life-cover rows. */
.print-doc[data-fit="3"] .print-page, .print-doc[data-fit="3"] .pp-body { gap: 4px; }
.print-doc[data-fit="3"] .pp-stage:not(.pp-stage--life) .pp-stage-en { display: none; }
.print-doc[data-fit="3"] .pp-gold { display: none; }
.print-doc[data-fit="3"] .pp-topic .body-en, .print-doc[data-fit="3"] .pp-rec-lead .body-en { display: none; }

@media print {
  html, body, * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  html, body { margin: 0; background: var(--cream); scroll-behavior: auto; }

  /* ---- The meeting page is not part of the record (it is only hidden, never changed) ---- */
  .topbar, .hero, .hero-decor, .action-bar, .stepper, .section-head,
  [data-stage-panel="intake"], [data-present-toolbar], [data-export-hint],
  [data-sample-banner], .sample-banner, .sum-sample,
  .switch-row--ref, [data-route="design"], .site-footer,
  main, main .btn, a[href="#top"], .visually-hidden, .notes-panel { display: none !important; }

  /* ---- The two-page record ---- */
  .print-doc, html.is-printing .print-doc {
    display: block;
    position: static; left: auto; top: auto;
    width: auto;
    visibility: visible; pointer-events: auto;
  }
  .print-page--1 { break-after: page; page-break-after: always; }
  .print-page--2 { break-after: auto; page-break-after: auto; }

  /* Pressed Ctrl/Cmd+P before “Show the plan”: say so, do not print an empty record. */
  html:not(.has-plan) .print-page { display: none; }
  html:not(.has-plan) .print-doc .print-empty { display: block; padding: 16px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--navy); font-size: 14px; }
  .print-doc .print-empty .body-en { font-size: 11px; }

  /* Guard for cards, should the meeting page ever be shown in print: whole cards only,
     and never a bare `.stage` (that is also the presentation panel and the form). */
  .stage-list > li, li.stage { break-inside: avoid; page-break-inside: avoid; box-shadow: none; }
}
