/* ============================================
   ECH Body-Check Clinic — Check-in Flow
   Premium wellness aesthetic
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Inter:wght@300;400;500;600;700&family=Noto+Serif+HK:wght@300;400;500;600;700&family=Noto+Sans+HK:wght@300;400;500;600;700&display=swap');

:root {
  /* Cool clinical neutrals */
  --bg: #FFFFFF;
  --bg-soft: #F5F7FA;
  --parchment: #EBEFF5;
  --parchment-deep: #DDE0E7;
  --line: #D2D8E2;
  --line-soft: #E5E9F0;

  /* Ink (deep blue-grays) */
  --ink: #0E2A40;
  --ink-soft: #3D5063;
  --ink-mute: #6B7A8C;
  --ink-faint: #A4AEBC;

  /* Accents — EC Healthcare blue */
  --gold: #076AA3;            /* primary blue (kept var name to avoid breakage) */
  --gold-deep: #054E78;       /* darker blue */
  --gold-soft: #E3EEF6;       /* very light blue tint */
  --sage: #4FB39A;
  --sage-deep: #2E8A73;
  --sage-soft: #E5F3EF;
  --terracotta: #C44E4E;
  --terracotta-soft: #FBEAEA;

  /* Type */
  --serif: 'Cormorant Garamond', 'Noto Serif HK', Georgia, serif;
  --serif-tc: 'Noto Serif HK', 'Cormorant Garamond', serif;
  --sans: 'Inter', 'Noto Sans HK', -apple-system, sans-serif;
  --sans-tc: 'Noto Sans HK', 'Inter', sans-serif;

  /* Spacing scale */
  --shadow-sm: 0 1px 2px rgba(42, 38, 32, 0.04), 0 1px 1px rgba(42, 38, 32, 0.03);
  --shadow-md: 0 4px 16px rgba(42, 38, 32, 0.06), 0 1px 3px rgba(42, 38, 32, 0.04);
  --shadow-lg: 0 12px 40px rgba(42, 38, 32, 0.10), 0 4px 12px rgba(42, 38, 32, 0.05);
  --shadow-card: 0 1px 0 rgba(255,255,255,0.6) inset, 0 1px 3px rgba(42, 38, 32, 0.05), 0 8px 24px rgba(42, 38, 32, 0.04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #1a1815;
  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
  overflow: hidden;
}

#root { width: 100%; height: 100vh; }

/* ============================================
   Tablet stage — center the iPad in viewport
   ============================================ */
.stage {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 30% 20%, #1a3247 0%, #0a1825 70%);
  position: relative;
  overflow: hidden;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.015) 1px, transparent 0);
  background-size: 4px 4px;
  pointer-events: none;
}

/* ============================================
   Tablet bezel
   ============================================ */
.tablet-bezel {
  width: 1194px;
  height: 834px;
  background: #0e0d0b;
  border-radius: 32px;
  padding: 14px;
  box-shadow:
    0 0 0 2px #2a2620,
    0 0 0 3px #4a4036,
    0 40px 80px rgba(0,0,0,0.6),
    0 20px 40px rgba(0,0,0,0.4);
  position: relative;
  transform-origin: center;
}

.tablet-camera {
  position: absolute;
  left: 50%;
  top: 6px;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1a1814;
  box-shadow: inset 0 0 2px rgba(120, 100, 80, 0.5);
}

.tablet-screen {
  width: 100%;
  height: 100%;
  background: var(--bg);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

html:fullscreen .stage {
  background: var(--bg);
}
html:fullscreen .tablet-bezel,
body.presentation-fullscreen .tablet-bezel {
  width: 100vw;
  height: 100vh;
  padding: 0;
  border-radius: 0;
  background: var(--bg);
  box-shadow: none;
  transform: none !important;
}
html:fullscreen .tablet-camera,
html:fullscreen .status-bar,
body.presentation-fullscreen .tablet-camera,
body.presentation-fullscreen .status-bar {
  display: none;
}
html:fullscreen .tablet-screen,
body.presentation-fullscreen .tablet-screen {
  border-radius: 0;
}
html:fullscreen .app,
body.presentation-fullscreen .app {
  inset: 0;
}
body.presentation-fullscreen .stage {
  background: var(--bg);
}

/* iPad status bar */
.status-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  z-index: 100;
  letter-spacing: 0.02em;
}
.status-bar .right { display: flex; gap: 6px; align-items: center; }
.status-bar svg { display: block; }

/* ============================================
   App chrome
   ============================================ */
.app {
  position: absolute;
  inset: 22px 0 0 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* Top bar with brand + progress + lang */
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-soft);
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line-soft);
}
.brand-mark img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.brand-mark.mm-logo-mark {
  width: 112px;
  height: 38px;
  padding: 4px 6px;
  border-radius: 8px;
}
.brand-name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.brand-sub {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

/* Progress dots */
.progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
}
.progress-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  position: relative;
}
.progress-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 600;
  background: var(--bg-soft);
  color: var(--ink-mute);
  transition: all 0.4s ease;
}
.progress-step.active .progress-num {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.progress-step.done .progress-num {
  background: var(--sage-deep);
  color: var(--bg);
  border-color: var(--sage-deep);
}
.progress-step.active .progress-label { color: var(--ink); font-weight: 600; }
.progress-label .tc {
  display: block;
  margin-top: 2px;
  font-family: var(--sans-tc);
  font-size: 10px;
  letter-spacing: 0;
  opacity: 0.72;
}
.progress-divider {
  width: 16px; height: 1px;
  background: var(--line);
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-soft);
  padding: 2px;
}
.lang-btn {
  padding: 5px 14px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s;
}
.lang-btn.active {
  background: var(--ink);
  color: var(--bg);
}

/* ============================================
   Pages
   ============================================ */
.page {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.page-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  animation: pageEnter 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-body {
  flex: 1;
  overflow-y: auto;
  padding: 36px 56px 24px;
}

.page-foot {
  height: 88px;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  flex-shrink: 0;
}

/* ============================================
   Headings — bilingual
   ============================================ */
.eyebrow {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.h-display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 52px;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
}
.h-display .tc {
  font-family: var(--serif-tc);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.h-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}
.h-title .tc {
  font-family: var(--serif-tc);
  font-weight: 500;
}

.h-section {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 14px 0;
}

.lede {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
  font-weight: 400;
  max-width: 64ch;
}
.lede .tc { font-family: var(--sans-tc); }

.bilingual {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.bilingual .en { font-family: var(--serif); }
.bilingual .tc {
  font-family: var(--serif-tc);
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.72em;
  letter-spacing: 0.04em;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: #1a1612; transform: translateY(-1px); }
.btn-primary:disabled {
  background: var(--ink-faint);
  color: var(--bg);
  cursor: not-allowed;
  opacity: 0.6;
}
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--parchment); }

.btn-lg { padding: 18px 36px; font-size: 15px; }
.btn .arrow { font-size: 18px; line-height: 1; }

/* ============================================
   Welcome page
   ============================================ */
.welcome {
  flex: 1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  background: var(--bg);
}
.welcome-left {
  padding: 80px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(135deg, var(--bg) 0%, var(--gold-soft) 100%);
  position: relative;
  overflow: hidden;
}
.welcome-left::before {
  content: "";
  position: absolute;
  top: -100px; right: -100px;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-soft) 0%, transparent 70%);
  opacity: 0.6;
}
.welcome-eyebrow {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 24px;
  position: relative;
}
.welcome-headline {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 76px;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 8px 0;
  position: relative;
}
.welcome-headline em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}
.welcome-headline-tc {
  font-family: var(--serif-tc);
  font-weight: 400;
  font-size: 32px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin: 12px 0 0 0;
  position: relative;
}
.welcome-meta {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.welcome-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--ink-soft);
}
.welcome-meta-row .icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
}

.welcome-right {
  padding: 80px 56px;
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--line-soft);
}
.welcome-right h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 8px 0;
  color: var(--ink);
}
.welcome-right .tc-h {
  font-family: var(--serif-tc);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink-soft);
  margin: 0 0 36px 0;
}

.lang-card-row {
  display: flex;
  gap: 16px;
  margin-bottom: 36px;
}
.lang-card {
  flex: 1;
  padding: 28px 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.25s;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lang-card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.lang-card.selected {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}
.lang-card-name {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
}
.lang-card-name.tc { font-family: var(--serif-tc); font-weight: 500; }
.lang-card-sub {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
}

.welcome-cta-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.welcome-cta-hint {
  font-size: 12px;
  color: var(--ink-mute);
  font-style: italic;
}
.welcome-cta-hint .tc { font-family: var(--sans-tc); font-style: normal; }

/* ============================================
   Form fields
   ============================================ */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
}
.field-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.field-label .tc {
  font-family: var(--sans-tc);
  letter-spacing: 0.04em;
  text-transform: none;
  font-weight: 500;
  color: var(--ink-mute);
  font-size: 12px;
}
.field-label .req { color: var(--terracotta); margin-left: -6px; }
.field-label .opt {
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
  font-weight: 500;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-transform: uppercase;
  margin-left: auto;
}

.field-input {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: all 0.2s;
  letter-spacing: 0.02em;
  width: 100%;
}
.field-input:focus {
  border-color: var(--ink);
  background: var(--bg);
  box-shadow: 0 0 0 4px var(--gold-soft);
}
.field-input::placeholder { color: var(--ink-faint); }

.field-input.tappable {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
}
.field-input.tappable.active {
  border-color: var(--ink);
  background: var(--bg);
  box-shadow: 0 0 0 4px var(--gold-soft);
}
.field-input.tappable .placeholder { color: var(--ink-faint); }
.field-input.tappable .value { color: var(--ink); letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.field-input.tappable .caret {
  width: 2px; height: 20px;
  background: var(--ink);
  margin-left: 1px;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.field-hint {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
}
.field-hint .tc { font-family: var(--sans-tc); }

.hkid-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hkid-row .field-input { flex: 1; }
.hkid-row .check-digit {
  width: 56px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.hkid-paren {
  font-size: 22px;
  color: var(--ink-faint);
  font-weight: 300;
}

/* ============================================
   Number pad
   ============================================ */
.numpad {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 320px;
  box-shadow: var(--shadow-sm);
}
.numpad-key {
  height: 56px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.numpad-key:hover { background: var(--parchment); }
.numpad-key:active {
  transform: scale(0.96);
  background: var(--ink);
  color: var(--bg);
}
.numpad-key.alpha {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.04em;
}
.numpad-key.fn {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.numpad-key.fn-del {
  background: var(--parchment);
}

/* ============================================
   Check-in layout
   ============================================ */
.checkin {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  height: 100%;
  align-items: start;
}
.checkin-page-body {
  padding: 24px 48px 16px;
}
.checkin-page-body .h-display {
  font-size: 46px;
}
.checkin-form {
  padding-right: 0;
}
.checkin-form .field {
  gap: 6px;
  margin-bottom: 14px;
}
.checkin .field-input {
  padding: 12px 14px;
  min-height: 46px;
}
.checkin .field-input.tappable {
  min-height: 46px;
}
.checkin-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.segmented button {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  font: inherit;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
}
.segmented button span {
  display: block;
  margin-top: 2px;
  font-family: var(--sans-tc);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-mute);
}
.segmented button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.segmented button.active span {
  color: rgba(255,255,255,.72);
}
.checkin .numpad {
  width: 300px;
  padding: 10px;
  gap: 6px;
}
.checkin .numpad-key {
  height: 38px;
  font-size: 22px;
}
.checkin .numpad-key.alpha {
  font-size: 15px;
}
.checkin .numpad-key.fn {
  font-size: 10px;
}

.upload-card {
  background: var(--bg-soft);
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.checkin .upload-card {
  padding: 12px 14px;
}
.checkin .upload-icon {
  width: 36px;
  height: 36px;
}
.demo-scan-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.demo-scan-actions button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-soft);
  font: inherit;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  padding: 8px 10px;
  cursor: pointer;
}
.demo-scan-actions button:hover {
  border-color: var(--gold-deep);
  background: var(--gold-soft);
}
.demo-scan-actions button span {
  display: block;
  margin-top: 1px;
  font-family: var(--sans-tc);
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-mute);
}
.upload-card:hover {
  border-color: var(--gold-deep);
  background: var(--gold-soft);
}
.upload-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
  flex-shrink: 0;
}
.upload-text { display: flex; flex-direction: column; gap: 2px; }
.upload-text .t1 { font-size: 13px; font-weight: 600; color: var(--ink); }
.upload-text .t2 { font-size: 11px; color: var(--ink-mute); }

/* ============================================
   Booked items
   ============================================ */
.booking-summary {
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 22px 26px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 28px;
}
.booking-summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 18px;
  border-left: 1px solid var(--line-soft);
}
.booking-summary-item:first-child { border-left: none; padding-left: 0; }
.booking-summary-item .k {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
}
.booking-summary-item .v {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.booking-summary-item .v-sm {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
}

.package-banner {
  background: linear-gradient(135deg, var(--ink) 0%, var(--gold-deep) 100%);
  color: var(--bg);
  border-radius: 18px;
  padding: 28px 32px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.package-banner::after {
  content: "";
  position: absolute;
  right: -80px; top: -80px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold) 0%, transparent 70%);
  opacity: 0.5;
}
.package-banner-text { position: relative; z-index: 1; }
.package-banner .pkg-eyebrow {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
  margin-bottom: 6px;
}
.package-banner .pkg-name {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  margin: 0;
}
.package-banner .pkg-name .tc {
  font-family: var(--serif-tc);
  font-weight: 500;
  margin-left: 12px;
  color: rgba(247, 243, 236, 0.7);
  font-size: 22px;
}
.package-banner .pkg-count {
  position: relative;
  z-index: 1;
  text-align: right;
}
.package-banner .pkg-count .num {
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 300;
  line-height: 1;
  color: #ffffff;
}
.package-banner .pkg-count .lbl {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(247, 243, 236, 0.6);
  font-weight: 600;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.item-card {
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all 0.2s;
}
.item-card.completed {
  background: var(--sage-soft);
  border-color: var(--sage);
  opacity: 0.85;
}
.item-card.completed .item-name { text-decoration: line-through; text-decoration-color: var(--sage-deep); text-decoration-thickness: 1px; }
.item-check {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--ink-mute);
}
.item-card.completed .item-check {
  background: var(--sage-deep);
  border-color: var(--sage-deep);
  color: var(--bg);
}
.item-body { flex: 1; min-width: 0; }
.item-cat {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
  margin-bottom: 4px;
}
.item-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 2px;
}
.item-name-tc {
  font-family: var(--serif-tc);
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.item-meta {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 6px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.item-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-faint); }

/* ============================================
   Questionnaire
   ============================================ */
.q-wrap {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 56px;
  height: 100%;
}
.q-side {
  border-right: 1px solid var(--line-soft);
  padding-right: 32px;
}
.q-side-progress {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.q-side-progress strong {
  font-size: 56px;
  font-weight: 400;
  color: var(--ink);
  display: block;
  line-height: 1;
  letter-spacing: -0.02em;
}
.q-bar {
  height: 4px;
  background: var(--line-soft);
  border-radius: 2px;
  overflow: hidden;
  margin: 16px 0 28px;
}
.q-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.q-section-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.q-section {
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--ink-mute);
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line-soft);
}
.q-section:last-child { border-bottom: none; }
.q-section .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line);
  flex-shrink: 0;
}
.q-section.done .dot { background: var(--sage-deep); }
.q-section.active {
  color: var(--ink);
  font-weight: 600;
}
.q-section.active .dot { background: var(--gold-deep); box-shadow: 0 0 0 4px var(--gold-soft); }
.q-section .tc { font-family: var(--sans-tc); margin-left: 6px; opacity: 0.7; font-weight: 400; }

.q-main { padding-bottom: 16px; }
.q-eyebrow {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 600;
  margin-bottom: 12px;
}
.q-question {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 4px 0;
  letter-spacing: -0.01em;
}
.q-question-tc {
  font-family: var(--serif-tc);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink-soft);
  margin: 0 0 28px 0;
  line-height: 1.4;
}

.opt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.opt-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.opt-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.opt-grid.col-1 { grid-template-columns: 1fr; max-width: 560px; }

.opt-card {
  background: var(--bg-soft);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--sans);
  position: relative;
}
.opt-card:hover {
  border-color: var(--ink);
  background: var(--bg);
}
.opt-card.selected {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}
.opt-card .opt-mark {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.opt-card.selected .opt-mark {
  background: var(--gold);
  border-color: var(--gold);
  color: #ffffff;
}
.opt-card.checkbox .opt-mark { border-radius: 6px; }
.opt-card .opt-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.opt-card .opt-en {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.opt-card .opt-tc {
  font-family: var(--sans-tc);
  font-size: 13px;
  color: var(--ink-mute);
  font-weight: 500;
}
.opt-card.selected .opt-tc { color: rgba(247, 243, 236, 0.7); }
.opt-card .opt-icon {
  font-family: var(--serif);
  font-size: 20px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
  flex-shrink: 0;
}
.opt-card.selected .opt-icon { background: var(--gold); color: #ffffff; border-color: var(--gold); }

.q-stack { display: flex; flex-direction: column; gap: 28px; }
.q-stack.compact {
  gap: 20px;
}
.q-block-label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.q-block-label .tc { color: var(--ink-mute); font-family: var(--sans-tc); font-weight: 500; }
.q-block-label .badge {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--gold-soft);
  color: var(--gold-deep);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  margin-left: auto;
}

/* Date selectors */
.date-row {
  display: flex;
  gap: 10px;
}
.date-cell {
  flex: 1;
  background: var(--bg-soft);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.date-cell:hover { border-color: var(--ink); }
.date-cell.active { border-color: var(--ink); background: var(--bg); box-shadow: 0 0 0 4px var(--gold-soft); }
.date-cell-label {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
}
.date-cell-value {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
}

/* ============================================
   Upsell page
   ============================================ */
.upsell-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line-soft);
}
.upsell-hero h1 {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
}
.upsell-hero h1 em { font-style: italic; color: var(--gold-deep); }
.upsell-hero-tc {
  font-family: var(--serif-tc);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-top: 10px;
}
.upsell-hero-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.upsell-hero-meta strong {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0;
}

.recos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.reco-card {
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
}
.reco-card:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.reco-card.added {
  border-color: var(--ink);
  background: var(--bg);
  box-shadow: var(--shadow-card);
}
.reco-card.featured {
  border: 1px solid var(--gold);
  background: linear-gradient(180deg, var(--gold-soft) 0%, var(--bg-soft) 30%);
}
.reco-card-flag {
  position: absolute;
  top: 14px; right: 14px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  background: var(--gold);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 999px;
}
.reco-card-img {
  height: 110px;
  background:
    repeating-linear-gradient(135deg, var(--bg-soft) 0 8px, var(--parchment) 8px 16px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', monospace;
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  position: relative;
  border-bottom: 1px solid var(--line-soft);
}
.reco-card-img .placeholder-tag {
  background: rgba(255,255,255,0.85);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  backdrop-filter: blur(4px);
}
.reco-card-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.reco-card-cat {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 700;
}
.reco-card-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.reco-card-name-tc {
  font-family: var(--serif-tc);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-top: 2px;
}
.reco-why {
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.reco-why-label {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.reco-why-text {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.reco-why-text .tc { font-family: var(--sans-tc); display: block; margin-top: 4px; color: var(--ink-mute); font-size: 11px; }

.reco-meta-row {
  display: flex;
  gap: 14px;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-mute);
  align-items: center;
}
.reco-meta-row svg { flex-shrink: 0; }

.reco-foot {
  border-top: 1px solid var(--line-soft);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.3);
}
.reco-price {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.reco-price .price-label {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.reco-price .now {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1;
}
.reco-price .now sub {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
  margin-left: 2px;
  vertical-align: baseline;
}
.reco-price .was {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-mute);
  text-decoration: line-through;
}
.reco-add-btn {
  background: var(--ink);
  color: var(--bg);
  border: none;
  border-radius: 999px;
  padding: 9px 18px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.reco-add-btn:hover { transform: translateY(-1px); }
.reco-add-btn.added {
  background: var(--sage-deep);
  color: var(--bg);
}

.upsell-cart {
  position: fixed;
  bottom: 96px;
  right: 56px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 16px;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow-lg);
  font-family: var(--sans);
  z-index: 5;
  animation: cartSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes cartSlide {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.upsell-cart .count {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  color: var(--gold);
  line-height: 1;
}
.upsell-cart .label {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(247,243,236,0.7);
  text-transform: uppercase;
  font-weight: 600;
}
.upsell-cart .total {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--bg);
  border-left: 1px solid rgba(247,243,236,0.2);
  padding-left: 18px;
}

/* ============================================
   Final / queue page
   ============================================ */
.final {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  background: var(--bg);
}
.final-left {
  background: linear-gradient(160deg, var(--ink) 0%, var(--gold-deep) 100%);
  color: var(--bg);
  padding: 64px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.final-left::after {
  content: "";
  position: absolute;
  bottom: -120px; left: -120px;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold) 0%, transparent 70%);
  opacity: 0.35;
}
.final-eyebrow {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold);
}
.final-title {
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 16px 0 8px 0;
  position: relative;
}
.final-title em { font-style: italic; color: var(--gold); }
.final-title-tc {
  font-family: var(--serif-tc);
  font-size: 26px;
  font-weight: 500;
  color: rgba(247,243,236,0.7);
}
.queue-card {
  background: rgba(247, 243, 236, 0.06);
  border: 1px solid rgba(247, 243, 236, 0.15);
  border-radius: 22px;
  padding: 30px 34px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(4px);
}
.queue-card-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.queue-card-label {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(247,243,236,0.6);
  font-weight: 600;
}
.queue-num {
  font-family: var(--serif);
  font-size: 96px;
  font-weight: 300;
  color: #ffffff;
  line-height: 0.9;
  letter-spacing: -0.02em;
}
.queue-num span { color: rgba(247,243,236,0.4); font-size: 0.4em; }
.queue-meta {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: var(--sans);
  font-size: 12px;
  text-align: right;
}
.queue-meta-item .k {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(247,243,236,0.5);
  font-weight: 600;
  margin-bottom: 2px;
}
.queue-meta-item .v {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
}

.final-right {
  padding: 56px 56px;
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.final-right h3 {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-mute);
  margin: 0 0 8px 0;
}
.final-step {
  display: flex;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}
.final-step:last-child { border-bottom: none; }
.final-step-num {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--gold-deep);
  line-height: 1;
  width: 36px;
  flex-shrink: 0;
}
.final-step-body { flex: 1; }
.final-step-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 2px;
}
.final-step-tc {
  font-family: var(--serif-tc);
  font-size: 13px;
  color: var(--ink-mute);
  font-weight: 500;
  margin-bottom: 4px;
}
.final-step-desc {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ============================================
   Knowledge wiki showcase (tree-only)
   ============================================ */
.wiki-showcase {
  min-height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.wiki-showcase--tree-only {
  padding: 28px 36px 20px;
  background: linear-gradient(165deg, var(--bg) 0%, var(--bg-soft) 100%);
  gap: 18px;
}
.wiki-coverage {
  flex-shrink: 0;
}
.wiki-coverage-tagline {
  margin: 0 0 14px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 900px;
}
.wiki-coverage-tagline-tc {
  display: block;
  margin-top: 8px;
  font-family: var(--sans-tc);
  font-size: 12px;
  color: var(--ink-mute);
  line-height: 1.55;
}
.wiki-coverage-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.wiki-coverage-chip {
  background: rgba(255,255,255,.85);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 0;
  box-shadow: 0 2px 10px rgba(23,48,67,.06);
}
.wiki-coverage-chip-en {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  line-height: 1.25;
}
.wiki-coverage-chip-tc {
  display: block;
  margin-top: 4px;
  font-family: var(--sans-tc);
  font-size: 11px;
  color: var(--ink-mute);
  line-height: 1.25;
}
.wiki-tree-root {
  overflow: auto;
  padding-right: 6px;
}
.wiki-tree-root--fill {
  flex: 1;
  min-height: 0;
  background: rgba(255,255,255,.76);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  padding: 22px 26px;
  box-shadow: var(--shadow-sm);
}
.wiki-tree-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  padding-top: 4px;
}
.wiki-tree-fallback {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-mute);
}
.wiki-tree-node { margin-bottom: 4px; }
.wiki-tree-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.wiki-tree-toggle {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  margin-top: 2px;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  font-family: var(--sans);
}
.wiki-tree-toggle:hover { background: #fff; }
.wiki-tree-leaf-mark {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  margin-top: 2px;
  border-radius: 50%;
  border: 2px solid var(--gold-deep);
  opacity: 0.45;
}
.wiki-tree-body { flex: 1; min-width: 0; }
.wiki-tree-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
}
.wiki-tree-link {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(203,169,100,.45);
}
.wiki-tree-link:hover { color: var(--gold-deep); border-bottom-color: var(--gold-deep); }
.wiki-tree-title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
}
.wiki-tree-title-tc {
  font-family: var(--serif-tc);
  font-size: 15px;
  color: var(--gold-deep);
}
.wiki-tree-blurb {
  margin: 6px 0 0;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 72ch;
}
.wiki-tree-blurb-tc {
  margin: 4px 0 0;
  font-family: var(--sans-tc);
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-mute);
  max-width: 72ch;
}
.wiki-tree-children {
  margin-top: 8px;
  margin-left: 8px;
  padding-left: 16px;
  border-left: 2px solid rgba(203,169,100,.35);
}
.wiki-showcase--graph .wiki-tree-node.wiki-tree-depth-0 > .wiki-tree-children {
  border-left-color: rgba(23, 48, 67, 0.35);
}
.wiki-showcase--graph .wiki-tree-node.wiki-tree-depth-1 > .wiki-tree-children {
  border-left-color: rgba(203, 169, 100, 0.55);
}
.wiki-showcase--graph .wiki-tree-node.wiki-tree-depth-2 > .wiki-tree-children {
  border-left-color: rgba(99, 140, 120, 0.45);
}
.wiki-showcase--graph .wiki-tree-node.wiki-tree-depth-3 > .wiki-tree-children {
  border-left-color: rgba(23, 48, 67, 0.22);
}
.wiki-tree-link--section {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-bottom-style: dashed;
  border-bottom-color: rgba(23, 48, 67, 0.2);
}
.wiki-tree-link--doc {
  font-size: 17px;
}
.wiki-tree-link--asset {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  border-bottom-color: rgba(179, 51, 51, 0.35);
}
.wiki-tree-title--section {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.wiki-tree-title--group {
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
  color: var(--ink);
}
.wiki-tree-leaf-mark--pdf {
  border-radius: 4px;
  border-color: rgba(179, 51, 51, 0.55);
  opacity: 0.85;
}
.wiki-showcase--tree-only .wiki-tree-depth-0 > .wiki-tree-row .wiki-tree-link,
.wiki-showcase--tree-only .wiki-tree-depth-0 > .wiki-tree-row .wiki-tree-title {
  font-size: 20px;
}

/* ============================================
   Executive framework (CEO / clinical narrative)
   ============================================ */
.exec-framework {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: linear-gradient(165deg, var(--bg) 0%, var(--bg-soft) 100%);
}
.exec-framework-inner {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 28px 36px 20px;
  max-width: 920px;
  margin: 0 auto;
  width: 100%;
}
.exec-framework--fallback {
  padding: 48px;
  text-align: center;
}
.exec-framework-hero {
  margin-bottom: 28px;
}
.exec-framework-eyebrow {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-mute);
}
.exec-framework-title {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 300;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 12px 0 8px;
  line-height: 1.05;
}
.exec-framework-title-tc {
  font-family: var(--serif-tc);
  font-size: 22px;
  color: var(--gold-deep);
  margin-bottom: 18px;
}
.exec-framework-lede {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 12px;
  max-width: 62ch;
}
.exec-framework-lede-tc {
  font-family: var(--sans-tc);
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-mute);
  margin: 0;
  max-width: 62ch;
}
.exec-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}
@media (max-width: 900px) {
  .exec-metrics { grid-template-columns: repeat(2, 1fr); }
}
.exec-metric {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.exec-metric-n {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 300;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 6px;
}
.exec-metric-label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.exec-metric-label-tc {
  font-family: var(--sans-tc);
  font-size: 11px;
  color: var(--gold-deep);
  margin-bottom: 6px;
}
.exec-metric-hint {
  font-family: var(--sans);
  font-size: 10px;
  color: var(--ink-mute);
  line-height: 1.4;
  margin-top: 4px;
}
.exec-pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 8px 4px;
  margin-bottom: 36px;
  padding: 20px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.exec-pipeline-step {
  flex: 1 1 160px;
  min-width: 140px;
  max-width: 200px;
  padding: 12px 10px;
  text-align: center;
}
.exec-pipeline-num {
  font-family: var(--serif);
  font-size: 11px;
  color: var(--gold-deep);
  margin-bottom: 6px;
}
.exec-pipeline-title {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}
.exec-pipeline-title-tc {
  font-family: var(--serif-tc);
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.exec-pipeline-detail {
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-mute);
  margin: 0;
}
.exec-pipeline-detail-tc {
  font-family: var(--sans-tc);
  font-size: 10px;
  line-height: 1.45;
  color: var(--ink-mute);
  margin: 6px 0 0;
  opacity: 0.9;
}
.exec-pipeline-connector {
  display: flex;
  align-items: center;
  font-size: 18px;
  color: var(--gold);
  padding: 0 2px;
  flex: 0 0 auto;
}
@media (max-width: 720px) {
  .exec-pipeline-connector { display: none; }
}
.exec-h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  margin: 8px 0 16px;
  letter-spacing: -0.02em;
}
.exec-lenses {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
@media (max-width: 800px) {
  .exec-lenses { grid-template-columns: 1fr; }
}
.exec-lens {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 18px 16px;
}
.exec-lens-idx {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  margin-bottom: 8px;
}
.exec-lens-h {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  margin: 0 0 4px;
  color: var(--ink);
}
.exec-lens-h-tc {
  font-family: var(--serif-tc);
  font-size: 14px;
  color: var(--gold-deep);
  margin-bottom: 10px;
}
.exec-lens-p {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 8px;
}
.exec-lens-p-tc {
  font-family: var(--sans-tc);
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-mute);
  margin: 0;
}
.exec-pillars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
@media (max-width: 720px) {
  .exec-pillars { grid-template-columns: 1fr; }
}
.exec-pillar {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--bg-soft);
}
.exec-pillar-h {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 4px;
  color: var(--ink);
}
.exec-pillar-h-tc {
  font-family: var(--serif-tc);
  font-size: 13px;
  color: var(--gold-deep);
  margin-bottom: 10px;
}
.exec-pillar p {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 8px;
}
.exec-pillar-tc {
  font-family: var(--sans-tc);
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-mute);
  margin: 0 !important;
}
.exec-footnote {
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.55;
  color: var(--ink-mute);
  margin: 0 0 10px;
  max-width: 70ch;
}
.exec-footnote-tc {
  font-family: var(--sans-tc);
  font-size: 10px;
  line-height: 1.5;
  color: var(--ink-mute);
  margin: 0 0 24px;
  max-width: 70ch;
  opacity: 0.95;
}

/* ============================================
   OTP / focus-blink
   ============================================ */
.field-input.numpad-target {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.15em;
  font-weight: 500;
}

/* ============================================
   Misc
   ============================================ */
.helper-row {
  display: flex;
  gap: 16px;
  align-items: center;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-mute);
}
.divider {
  height: 1px;
  background: var(--line-soft);
  margin: 24px 0;
}

/* Custom scroll */
.page-body::-webkit-scrollbar { width: 6px; }
.page-body::-webkit-scrollbar-track { background: transparent; }
.page-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

/* Welcome footer adjustments */
.welcome-foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Section header on questionnaire pages */
.q-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}
.q-header-num {
  font-family: var(--serif);
  font-size: 12px;
  color: var(--ink-mute);
  font-style: italic;
  letter-spacing: 0.04em;
}

/* Footer stepper */
.foot-secondary {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-mute);
}
.foot-secondary strong {
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
}

/* ============================================
   Data route / standalone deck (no tablet chrome)
   ============================================
   Global html,body { overflow:hidden } + #root { height:100vh } lock the tablet app to
   the viewport; /data is a long scrolling document — restore normal overflow here.
   ============================================ */
html:has(body.data-route) {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}
body.data-route {
  margin: 0;
  min-height: 100vh;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--bg);
}
body.data-route #root {
  height: auto;
  min-height: 100vh;
}
.executive-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.executive-topbar {
  flex-shrink: 0;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.executive-topbar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.executive-topbar--data .executive-topbar-inner {
  align-items: flex-start;
}
.executive-topbar-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.executive-topbar-note {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  line-height: 1.45;
  max-width: 56ch;
}
.executive-topbar-note-tc {
  display: block;
  margin-top: 6px;
  font-family: var(--sans-tc);
  font-size: 11px;
  color: var(--ink-mute);
  font-weight: 500;
}
.executive-topbar-badge {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-mute);
}
.executive-topbar-link {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-deep);
  text-decoration: none;
}
.executive-topbar-link:hover {
  text-decoration: underline;
}
.executive-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
/* Long standalone pages scroll the window; do not trap content in a fixed viewport slice */
body.data-route .executive-main {
  min-height: auto;
  flex: 1 1 auto;
  overflow: visible;
}
body.executive-route .exec-framework--standalone,
body.data-route .exec-framework--standalone {
  flex: 1;
  min-height: 0;
}

/* ============================================
   /data — dimensions tree (EC Healthcare)
   ============================================ */
.dim-shell {
  font-family: var(--sans);
  color: var(--ink);
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 48px;
  width: 100%;
  box-sizing: border-box;
}
.dim-shell--dense {
  max-width: 1220px;
}
.dim-sup-zh {
  display: block;
  font-family: var(--sans-tc);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-mute);
  line-height: 1.45;
  margin-top: 4px;
  max-width: 72ch;
}
.dim-hero-org-en {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold-deep);
}
.dim-loading {
  padding: 48px 24px;
  text-align: center;
  color: var(--ink-mute);
  font-family: var(--sans);
}
.dim-loading--err {
  color: #a33;
}
.dim-hero {
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 28px;
}
.dim-hero--minimal {
  padding: 8px 0 16px;
  margin-bottom: 20px;
}
.dim-hero-org {
  margin-bottom: 10px;
}
.dim-hero-tag,
.dim-hero-tag-tc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 6px;
  max-width: 70ch;
}
.dim-hero-tag-tc {
  font-family: var(--sans-tc);
  font-size: 12px;
  color: var(--ink-mute);
}
.dim-hero-title {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 12px 0 6px;
  line-height: 1.15;
}
.dim-hero-title-tc {
  font-family: var(--serif-tc);
  font-size: 20px;
  color: var(--gold-deep);
  margin-bottom: 16px;
}
.dim-hero-lede,
.dim-hero-lede-tc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 10px;
  max-width: 72ch;
}
.dim-hero-lede-tc {
  font-family: var(--sans-tc);
  font-size: 13px;
  color: var(--ink-mute);
}
.dim-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.dim-total-chip {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 120px;
  box-shadow: var(--shadow-sm);
}
.dim-total-n {
  display: block;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 300;
  color: var(--ink);
  line-height: 1;
}
.dim-total-l {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.dim-columns {
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.dim-branch {
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.dim-branch--live {
  border-color: rgba(23, 48, 67, 0.14);
}
.dim-branch--illustrative {
  border-style: dashed;
  opacity: 0.98;
}
.dim-branch--planned {
  border-style: dashed;
  opacity: 0.85;
}
.dim-branch-head {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.95) 0%, rgba(247, 243, 236, 0.9) 100%);
}
.dim-branch-head h2 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
}
.dim-branch-label {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  display: block;
  margin: 0;
}
.dim-branch-head h2 > .dim-sup-zh {
  margin-top: 0;
}
.dim-branch-head h2 > .dim-badge {
  margin-top: 4px;
}
.dim-branch-label-tc {
  font-family: var(--serif-tc);
  font-size: 16px;
  color: var(--gold-deep);
}
.dim-branch-sub,
.dim-branch-sub-tc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 8px 0 0;
  max-width: 68ch;
}
.dim-branch-sub-tc {
  font-family: var(--sans-tc);
  font-size: 12px;
  color: var(--ink-mute);
}
.dim-source-note {
  font-size: 11px;
  color: var(--ink-mute);
  margin: 10px 0 0;
  font-style: italic;
}
.dim-badge {
  display: inline-block;
  margin-left: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  vertical-align: middle;
}
.dim-badge--illus {
  background: rgba(179, 140, 74, 0.18);
  color: var(--gold-deep);
  border: 1px solid rgba(179, 140, 74, 0.35);
}
.dim-badge--plan {
  background: rgba(23, 48, 67, 0.06);
  color: var(--ink-mute);
  border: 1px solid var(--line-soft);
}
.dim-badge-sub {
  font-family: var(--sans-tc);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  opacity: 0.88;
  margin-left: 4px;
}
.dim-tree {
  padding: 12px 8px 16px;
  max-height: none;
}
.dim-details {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  margin: 10px 12px;
  background: rgba(255, 255, 255, 0.85);
}
.dim-details-sum {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 13px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.dim-sum-primary {
  font-weight: 700;
  color: var(--ink);
}
.dim-details-sum::-webkit-details-marker {
  display: none;
}
.dim-details-sum::before {
  content: "▸ ";
  opacity: 0.45;
}
.dim-details[open] > .dim-details-sum::before {
  content: "▾ ";
}
.dim-details-body {
  padding: 0 14px 14px 18px;
  border-left: 2px solid rgba(179, 140, 74, 0.35);
  margin-left: 14px;
}
.dim-comments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.dim-comment-block {
  margin-bottom: 0;
  padding: 12px;
  border: 1px solid rgba(23, 48, 67, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
}
.dim-comment-head {
  margin-bottom: 12px;
}
.dim-comment-head .dim-comment-en {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 4px;
}
.dim-rule-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dim-rule-card {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 10px 12px 12px;
  background: rgba(255, 255, 255, 0.92);
  border-left-width: 4px;
  border-left-style: solid;
}
.dim-rule-card--panic {
  border-left-color: #c44;
}
.dim-rule-card--ref_high,
.dim-rule-card--ref_low {
  border-left-color: #c9a227;
}
.dim-rule-card--positive,
.dim-rule-card--negative {
  border-left-color: #5a7a90;
}
.dim-rule-card--compound {
  border-left-color: var(--gold-deep);
}
.dim-rule-card--other {
  border-left-color: var(--line);
}
.dim-rule-row--clause {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.dim-multi-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-deep);
  border: 1px solid rgba(179, 140, 74, 0.45);
  border-radius: 4px;
  padding: 2px 6px;
}
.dim-gloss-en {
  font-size: 11px;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 8px 0 0;
}
.dim-catalogue-block {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-soft);
}
.dim-catalogue-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 6px;
}
.dim-catalogue-bullets {
  margin: 0;
  padding-left: 1.1rem;
  font-family: var(--sans-tc);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink);
}
.dim-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dim-dot--panic {
  background: #c44;
  box-shadow: 0 0 0 2px rgba(204, 68, 68, 0.25);
}
.dim-dot--ref {
  background: #c9a227;
}
.dim-dot--flag {
  background: #5a7a90;
}
.dim-dot--compound {
  background: transparent;
  border: 2px solid var(--gold-deep);
}
.dim-dot--other {
  background: var(--ink-mute);
}
.dim-clause {
  font-size: 12px;
}
.dim-clause-sep {
  opacity: 0.5;
  margin: 0 2px;
}
.dim-codes {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.dim-code {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-deep);
}
.dim-survey-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.dim-survey-card {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.95);
}
.dim-survey-block {
  margin-top: 10px;
}
.dim-survey-block:first-of-type {
  margin-top: 8px;
}
.dim-field-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 4px;
}
.dim-field-en {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
}
.dim-rule-id {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-deep);
  margin-bottom: 2px;
}
.dim-img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  padding: 16px;
}
.dim-img-card {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.9);
}
.dim-img-mod {
  margin-bottom: 10px;
}
.dim-img-mod-en {
  display: block;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
}
.dim-img-findings {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dim-img-finding {
  padding: 10px 0;
  border-top: 1px dashed var(--line-soft);
  font-size: 12px;
  line-height: 1.5;
}
.dim-img-finding:first-of-type {
  border-top: none;
  padding-top: 0;
}
.dim-img-find-en {
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.dim-img-action-en {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 6px;
  line-height: 1.5;
}
.dim-ec-pillars {
  padding: 8px 8px 16px;
}
.dim-details--pillar {
  margin: 10px 12px;
}
.dim-ec-scenarios {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dim-ec-scenario {
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
}
.dim-ec-scenario:first-child {
  border-top: none;
  padding-top: 0;
}
.dim-ec-block {
  margin-bottom: 12px;
}
.dim-ec-block:last-child {
  margin-bottom: 0;
}
.dim-ec-k {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 6px;
}
.dim-ec-en {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
}
.dim-planned-list {
  list-style: none;
  margin: 0;
  padding: 16px 20px 20px;
}
.dim-planned-li {
  padding: 14px 0;
  border-top: 1px dashed var(--line-soft);
}
.dim-planned-li:first-child {
  border-top: none;
}
.dim-planned-name-en {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 4px;
  color: var(--ink);
}
.dim-planned-note {
  font-size: 12px;
  color: var(--ink-soft);
  max-width: 65ch;
}
.dim-foot {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px;
  color: var(--ink-mute);
  line-height: 1.55;
}
.dim-foot-tc {
  font-family: var(--sans-tc);
  font-size: 10px;
}
.dim-foot-link {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: 12px;
  font-weight: 600;
  font-size: 13px;
  color: var(--gold-deep);
  text-decoration: none;
}
.dim-foot-link-en {
  font-weight: 600;
}
.dim-foot-link:hover {
  text-decoration: underline;
}

/* View toggle + dark tree table (/data) */
.dim-hero--with-toggle {
  padding-bottom: 12px;
}
.dim-hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
}
.dim-view-bar {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: rgba(23, 48, 67, 0.06);
  border: 1px solid var(--line-soft);
  flex-shrink: 0;
}
.dim-view-btn {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-mute);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.dim-view-btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
}
.dim-view-btn--active {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

body.data-route.data-tree-view {
  background: #080b10;
}
body.data-route.data-tree-view .executive-topbar {
  background: rgba(12, 16, 22, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
body.data-route.data-tree-view .executive-topbar-badge {
  color: rgba(255, 255, 255, 0.45);
}
body.data-route.data-tree-view .executive-topbar-link {
  color: #7ec8ff;
}

.dim-shell--tree-view {
  color: #e6edf3;
  max-width: 1280px;
  padding-left: 16px;
  padding-right: 16px;
}
.dim-shell--tree-view .dim-hero--minimal {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.dim-shell--tree-view .dim-total-chip {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}
.dim-shell--tree-view .dim-total-n {
  color: #f0f6fc;
}
.dim-shell--tree-view .dim-total-l {
  color: rgba(255, 255, 255, 0.45);
}
.dim-shell--tree-view .dim-view-bar {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}
.dim-shell--tree-view .dim-view-btn {
  color: rgba(255, 255, 255, 0.55);
}
.dim-shell--tree-view .dim-view-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.dim-shell--tree-view .dim-view-btn--active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: none;
}

.dim-tree-wrap {
  overflow-x: auto;
  margin: 0 -4px;
  padding: 4px 4px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(18, 22, 30, 0.98) 0%, rgba(10, 13, 18, 0.99) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 48px rgba(0, 0, 0, 0.35);
}
.dim-tree-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.45;
  font-family: var(--sans);
}
.dim-tree-th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 0;
  z-index: 1;
}
.dim-tree-th--tree {
  min-width: 220px;
  width: 30%;
}
.dim-tree-th--meta {
  min-width: 160px;
  width: 22%;
}
.dim-tree-tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.dim-tree-tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}
.dim-tree-tr--branch {
  background: rgba(126, 200, 255, 0.04);
}
.dim-tree-tr--branch:nth-child(even) {
  background: rgba(126, 200, 255, 0.05);
}
.dim-tree-td {
  padding: 8px 14px 10px;
  vertical-align: top;
}
.dim-tree-cell {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}
.dim-tree-label-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  min-width: 0;
  flex: 1;
}
.dim-tree-outline {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  flex-shrink: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: rgba(130, 168, 205, 0.42);
  user-select: none;
  padding-top: 1px;
}
.dim-tree-rail {
  display: inline-flex;
  width: 14px;
  justify-content: center;
  flex-shrink: 0;
}
.dim-tree-rail--pipe {
  color: rgba(130, 168, 205, 0.5);
}
.dim-tree-fork {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 1px;
  color: rgba(130, 168, 205, 0.55);
}
.dim-tree-fork-char {
  width: 14px;
  text-align: center;
}
.dim-tree-fork-arm {
  opacity: 0.65;
  margin-left: -1px;
}
.dim-tree-label {
  font-weight: 600;
  color: #f0f6fc;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.dim-tree-zh {
  font-family: var(--sans-tc);
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.4;
}
.dim-tree-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 4px;
  vertical-align: middle;
}
.dim-tree-tag--live {
  background: rgba(46, 160, 67, 0.25);
  color: #56d364;
  border: 1px solid rgba(86, 211, 100, 0.35);
}
.dim-tree-tag--illus {
  background: rgba(210, 153, 34, 0.18);
  color: #e3b341;
  border: 1px solid rgba(227, 179, 65, 0.35);
}
.dim-tree-tag--plan {
  background: rgba(139, 148, 158, 0.15);
  color: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.dim-tree-td--detail {
  color: rgba(230, 237, 243, 0.88);
  max-width: 52ch;
}
.dim-tree-detail {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.5;
}
.dim-tree-dash {
  opacity: 0.35;
}
.dim-tree-td--meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
}
.dim-tree-meta-inner {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.dim-tree-meta-stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.dim-tree-sev {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.dim-tree-sev--panic {
  color: #ff7b72;
}
.dim-tree-sev--ref_high,
.dim-tree-sev--ref_low {
  color: #e3b341;
}
.dim-tree-sev--positive,
.dim-tree-sev--negative {
  color: #79c0ff;
}
.dim-tree-sev--compound {
  color: #d2a8ff;
}
.dim-tree-multi {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #d2a8ff;
  border: 1px solid rgba(210, 168, 255, 0.35);
  border-radius: 4px;
  padding: 1px 5px;
}
.dim-tree-codes {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.dim-tree-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(110, 176, 255, 0.12);
  color: #a6d5ff;
}
.dim-tree-route {
  font-size: 11px;
  line-height: 1.45;
  color: rgba(230, 237, 243, 0.92);
}
.dim-tree-hint {
  font-size: 10px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
}

.dim-foot--tree {
  border-top-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.45);
}
.dim-foot--tree .dim-sup-zh {
  color: rgba(255, 255, 255, 0.38);
}
.dim-foot--tree .dim-foot-link {
  color: #7ec8ff;
}

/* /data — D3 node–link graph */
.dim-graph-wrap {
  width: 100%;
  max-height: min(78vh, 1200px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(12, 16, 24, 0.95) 0%, rgba(6, 8, 12, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.dim-graph-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 10px;
  padding: 4px 2px 0;
  line-height: 1.45;
}
.dim-graph-fallback {
  padding: 24px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  text-align: center;
}
.dim-graph-svg {
  display: block;
  min-width: 100%;
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.dim-graph-svg:active {
  cursor: grabbing;
}
.dim-graph-bg {
  fill: transparent;
  pointer-events: all;
}
.dim-graph-link {
  stroke: rgba(130, 175, 215, 0.42);
  stroke-width: 1.35px;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.dim-graph-label {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  fill: rgba(240, 246, 252, 0.92);
  paint-order: stroke fill;
  stroke: rgba(8, 10, 14, 0.85);
  stroke-width: 2.5px;
}
.dim-graph-label-line2 {
  opacity: 0.92;
}
.dim-graph-action {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  fill: rgba(163, 205, 238, 0.82);
  stroke: rgba(8, 10, 14, 0.82);
  stroke-width: 2px;
  paint-order: stroke fill;
}
.dim-graph-dot {
  fill: rgba(160, 200, 240, 0.85);
  stroke: rgba(8, 11, 16, 0.9);
  stroke-width: 1.25px;
}
.dim-graph-node--root .dim-graph-dot {
  fill: #f0f6fc;
}
.dim-graph-node--domain .dim-graph-dot {
  fill: #58a6ff;
}
.dim-graph-node--category .dim-graph-dot,
.dim-graph-node--section .dim-graph-dot {
  fill: #79c0ff;
}
.dim-graph-node--subgroup .dim-graph-dot,
.dim-graph-node--modality .dim-graph-dot,
.dim-graph-node--pillar .dim-graph-dot {
  fill: #a6d5ff;
}
.dim-graph-node--rule .dim-graph-dot,
.dim-graph-node--survey-rule .dim-graph-dot {
  fill: #56d364;
}
.dim-graph-node--finding .dim-graph-dot,
.dim-graph-node--scenario .dim-graph-dot {
  fill: #e3b341;
}
.dim-graph-node--planned .dim-graph-dot {
  fill: rgba(187, 195, 207, 0.85);
}
.dim-graph-node--folded .dim-graph-dot {
  stroke-dasharray: 3 3;
  opacity: 0.9;
}
.dim-graph-node--click:focus {
  outline: none;
}
.dim-graph-node--click:focus-visible .dim-graph-dot {
  stroke: #58a6ff;
  stroke-width: 2.5px;
}
.dim-graph-fold-badge {
  fill: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  font-weight: 600;
}
