:root {
  --ink: #1c1c1c;
  --muted: #7a7368;
  --accent: #1c1c1c;
  --gold: #e8c547;
  --gold-soft: #f3e3a4;
  --cream: #f7f2e6;
  --page: #f7f2e6;
  --white: #fffcf6;
  --card: #fffdf8;
  --line: #eee4d2;
  --good: #3d6b4f;
  --alert: #a94d45;
  --watch: #8a621f;
  --radius: 28px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  font-size: 16px;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  line-height: 1.6;
}
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; background: none; color: inherit; }
button, a { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #e8c547;
  outline-offset: 4px;
}
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-weight: 600; }
h1 { font-size: clamp(28px, 2.6vw, 40px); letter-spacing: -1.2px; line-height: 1.25; }
h2 { font-size: 18px; line-height: 1.5; }
h3 { font-size: 16px; line-height: 1.5; }
h4 { font-size: 14px; }
small { font-size: 12px; }
p { line-height: 1.8; }
svg { display: block; }
.skip-link {
  position: fixed; top: -80px; left: 20px; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 24px; border-radius: 999px;
}
.skip-link:focus { top: 10px; }

.layout {
  min-height: 100vh;
}
.app-shell {
  max-width: 1440px;
  margin: 0 auto;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 32px 8px;
  background: var(--cream);
}
.brand {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.brand small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.4px;
  margin-top: 2px;
}
.nav-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.nav-label {
  font-size: 11px;
  letter-spacing: 1px;
  color: #9a9080;
  white-space: nowrap;
}
.topbar nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  background: #fff8ecaa;
  border-radius: 999px;
  overflow-x: auto;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  min-height: 38px;
  border-radius: 999px;
  font-size: 13px;
  color: #6f675b;
  white-space: nowrap;
}
.nav-link:hover { background: #fff; }
.nav-link.active {
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.child-switch {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  padding: 6px 12px 6px 6px;
  background: #fff;
  border-radius: 999px;
  border: 1px solid #eadfca;
}
.mini-avatar, .avatar {
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #f3e3a4, #e8c547);
  color: var(--ink);
  border: 2px solid #fff;
}
.mini-avatar { width: 28px; height: 28px; border-radius: 50%; font-size: 12px; }
.avatar {
  width: 54px; height: 54px; border-radius: 18px; font-size: 24px;
  font-family: "Songti SC", serif; border-width: 4px; outline: 1px solid #eadfca;
}
.avatar.small { width: 46px; height: 46px; border-radius: 16px; font-size: 22px; flex-shrink: 0; }
.project-link {
  font-size: 12px;
  color: #7a7368;
  padding: 8px 12px;
  border-radius: 999px;
}
.project-link:hover { background: #fff; }

.breadcrumb {
  padding: 4px 36px 0;
  font-size: 12px;
  color: #8a8174;
}
.breadcrumb span { padding: 0 10px; color: #c4bba8; }

.app-shell main {
  max-width: 1510px;
  margin: 0 auto;
  padding: 18px 36px 16px;
  outline: 0;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 500;
  color: #9a8d72;
  margin-bottom: 8px;
  display: block;
}
.page-heading h1 { margin-bottom: 8px; }
.page-heading p { font-size: 13px; color: var(--muted); }
.heading-actions { display: flex; gap: 10px; flex-shrink: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  min-height: 42px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: #333; }
.btn.secondary { background: #fff; border-color: #eadfca; color: #4a453c; }
.btn.secondary:hover { background: #fff8ea; }
.btn.arranged { background: var(--gold-soft); color: #5c4a12; }
.text-btn {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-size: 12px;
  min-height: 32px;
  padding: 0;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-btn.subtle { color: #7a7368; text-decoration: none; }
.text-btn.subtle:hover { text-decoration: underline; }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 500;
}
.pill.good { background: #e8f0e4; color: #2a7157; }
.pill.watch { background: #fbf0d9; color: #896428; }
.pill.alert { background: #f9e8e4; color: #a35348; }
.pill.neutral, .pill.muted { background: #f3ecdc; color: #6f675b; }

.child-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #fffdf8cc;
  border: 1px solid #eadfca;
  border-radius: 24px;
  padding: 16px 22px;
  margin-bottom: 16px;
}
.child-identity { display: flex; gap: 16px; align-items: center; }
.name-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.name-row h2 { font-size: 21px; }
.name-row > span:not(.pill) { font-size: 12px; color: #6f675b; }
.child-identity p { font-size: 12px; color: #8a8174; margin-top: 4px; }
.separator { padding: 0 10px; color: #c4bba8; }
.child-status { display: flex; gap: 18px; align-items: center; }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.metric-card {
  background: var(--card);
  border-radius: 24px;
  padding: 18px 20px;
  border: 1px solid #eadfca;
  box-shadow: 0 10px 30px #1c1c1c06;
}
.metric-top { font-size: 12px; color: #7a7368; }
.metric-value {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.9px;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  margin: 4px 0;
}
.metric-value small { font-size: 12px; font-weight: 400; color: #8a8174; margin-left: 7px; }
.metric-note { font-size: 12px; color: var(--good); }
.metric-note.alert { color: var(--alert); }
.metric-note.watch { color: var(--watch); }
.metric-note.muted { color: #8a8174; }

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(270px, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}
.card {
  background: var(--card);
  border: 1px solid #eadfca;
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 10px 28px #1c1c1c05;
}
.card-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.card-heading p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.curve-card { display: flex; flex-direction: column; }
.chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}
.tabs {
  display: flex;
  padding: 4px;
  background: #f3ead6;
  border-radius: 999px;
  gap: 3px;
}
.tabs button {
  min-width: 58px;
  min-height: 32px;
  padding: 5px 13px;
  font-size: 12px;
  color: #6f675b;
  border-radius: 999px;
}
.tabs button.selected {
  background: var(--ink);
  color: #fff;
}
.chart-container { margin: 0 -7px; flex: 1; display: flex; align-items: center; min-height: 220px; }
.growth-chart { width: 100%; height: auto; overflow: visible; font-family: inherit; }
.growth-chart text { font-size: 12px; fill: #8a7d5c; }
.growth-chart .chart-bubble { fill: #f3e3a4; font-size: 12px; }
.growth-chart .chart-bubble.value { font-size: 13px; fill: #fff; font-weight: 500; }
.chart-legend {
  display: flex; gap: 18px; font-size: 12px; justify-content: center;
  color: #7a7368; margin-top: 12px; flex-wrap: wrap;
}
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.legend-line { width: 16px; height: 0; border-top: 2px dashed #c4a44a; }
.legend-line.actual { border-top: 3px solid #1c1c1c; }
.legend-area { width: 14px; height: 8px; background: #efe0b8; border-radius: 2px; }
.chart-note {
  font-size: 12px; color: #7a7368; text-align: center;
  border-top: 1px solid #eee4d2; padding-top: 12px; margin-top: 13px;
}

.insight-column { display: flex; flex-direction: column; gap: 14px; }
.prediction-card {
  padding: 22px;
  background: var(--ink);
  color: #f7f2e6;
  border-radius: 28px;
  flex: 1;
}
.prediction-card h2 { font-size: 15px; color: #fff; }
.prediction-card > p { font-size: 12px; color: #c4bba8; }
.prediction-number { font-size: 43px; letter-spacing: -1.6px; line-height: 1.45; margin: 0 0 8px; font-weight: 500; }
.prediction-number small { font-size: 14px; margin-left: 8px; color: #c4bba8; }
.range-track { height: 6px; border-radius: 5px; background: #3a3a3a; position: relative; margin: 0 0 8px; }
.range-track i { position: absolute; left: 17%; right: 17%; top: 0; height: 100%; background: var(--gold); border-radius: 5px; }
.range-track span {
  position: absolute; left: 50%; top: -4px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--gold); border: 2px solid #1c1c1c;
}
.range-label { display: flex; justify-content: space-between; font-size: 12px; color: #c4bba8; }
.prediction-foot { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #c4bba8; margin-top: 8px; }
.prediction-foot .text-btn { color: var(--gold-soft); }
.target-note {
  border-top: 1px solid #333; padding-top: 12px; margin-top: 8px;
  font-size: 12px; color: #c4bba8; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.target-note strong { color: #f3e3a4; font-weight: 500; }

.assessment-card {
  padding: 18px 22px;
  border-radius: 24px;
  border: 1px solid #eadfca;
  background: #fff8ea;
}
.assessment-card.watch { background: #faf5e9; border-color: #eee4c9; }
.assessment-card.alert { background: #fcf0eb; border-color: #efddd5; }
.assessment-head { margin-bottom: 10px; }
.assessment-head .eyebrow { margin-bottom: 2px; }
.assessment-head h3 { font-size: 14px; }
.assessment-card > p { font-size: 14px; color: #6f675b; line-height: 1.9; margin-bottom: 6px; }

.bottom-grid {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.factor-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #eee4d2;
}
.factor-row:last-child { border-bottom: 0; }
.factor-name { flex: 1; min-width: 0; }
.factor-name h3 { font-size: 13px; font-weight: 500; }
.factor-name p { font-size: 12px; color: #8a8174; margin-top: 3px; }
.factors-card > .text-btn { margin-top: 8px; }
.next-row {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #eee4d2;
}
.next-row > div { flex: 1; }
.next-row h3 { font-size: 13px; font-weight: 500; }
.next-row p { font-size: 12px; color: #8a8174; margin-top: 4px; }
.next-bottom { display: flex; margin-top: 18px; color: #8a8174; font-size: 12px; }

.assistant-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 24px;
  border: 1px solid #eadfca;
  background: linear-gradient(110deg, #fff8ea, #f3e3a4);
}
.assistant-banner h2 { font-size: 16px; }
.assistant-banner p { font-size: 12px; color: #7a7368; margin-top: 4px; }
.assistant-suggestions { margin-left: auto; display: flex; gap: 8px; }
.assistant-suggestions button {
  background: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 12px;
  color: #4a453c;
  border: 1px solid #eadfca;
}

.footer {
  max-width: 1510px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 8px 36px 24px;
  font-size: 12px;
  color: #9a9080;
}
.sidebar-message { text-align: center; }
.sidebar-message p { font-size: 12px; line-height: 1.7; }
.sidebar-message > span { display: block; font-size: 10px; letter-spacing: 1.6px; margin-top: 4px; }

.records-chart { margin-bottom: 18px; }
.records-chart .chart-container { max-width: 1050px; margin: auto; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
th { text-align: left; font-weight: 500; background: #f7f0e0; color: #8a8174; font-size: 12px; }
td, th { padding: 16px 14px; border-bottom: 1px solid #eee4d2; }
td { color: #4a453c; }
td strong { font-weight: 500; }
.latest-tag { margin-left: 8px; font-size: 12px; background: #f3e3a4; padding: 3px 8px; border-radius: 999px; }
.soft-note { color: #8a8174; padding: 18px 4px; font-size: 12px; line-height: 1.9; }

.plan-summary {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  background: var(--ink);
  color: #f7f2e6;
  border-radius: 28px;
  padding: 26px 32px;
  margin-bottom: 18px;
}
.plan-summary h2 { font-size: 23px; margin-bottom: 8px; color: #fff; }
.plan-summary p { font-size: 13px; color: #c4bba8; max-width: 650px; }
.plan-summary .eyebrow { color: var(--gold-soft); }
.progress-summary { display: flex; flex-direction: column; justify-content: center; text-align: center; min-width: 100px; }
.progress-summary strong { font-size: 40px; font-weight: 500; }
.progress-summary strong small { font-size: 20px; color: #9a9080; }
.progress-summary > span { font-size: 12px; color: #c4bba8; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.step-number { font-size: 32px; color: #e8d48a; font-weight: 300; }
.plan-meta { display: flex; align-items: center; gap: 14px; margin-top: 8px; margin-bottom: 12px; }
.plan-meta > span:last-child { font-size: 12px; color: #8a8174; }
.plan-item { padding: 24px; display: flex; flex-direction: column; }
.plan-item h2 { font-size: 21px; margin-bottom: 12px; }
.plan-item > p { font-size: 14px; color: #7a7368; margin-bottom: 20px; }
.plan-item > .btn { align-self: flex-start; margin-top: auto; }
.plan-item.completed { border-color: #e8c547; background: #fffdf4; }
.care-timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 24px; }
.care-timeline > div { position: relative; padding-top: 36px; }
.care-timeline > div:not(:last-child):after {
  content: "";
  position: absolute; left: 28px; right: -20px; top: 12px;
  border-top: 1px solid #eadfca;
}
.timeline-marker {
  display: grid; place-items: center; position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; background: var(--ink); color: #fff; border-radius: 50%; font-size: 12px;
}
.care-timeline small { color: #8a8174; font-size: 12px; }
.care-timeline h3 { margin: 8px 0; font-size: 15px; }
.care-timeline p { font-size: 12px; color: #7a7368; }

.report-sheet {
  background: var(--card);
  border: 1px solid #eadfca;
  border-radius: 28px;
  max-width: 980px;
  margin: auto;
  padding: 42px 52px;
}
.report-heading { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee4d2; padding-bottom: 22px; }
.report-heading .brand { font-size: 18px; }
.report-heading > span { font-size: 12px; color: #8a8174; }
.report-title { text-align: center; padding: 32px 0; }
.report-title h2 { font-size: 29px; }
.report-title p { font-size: 12px; color: #8a8174; margin: 12px 0; }
.report-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #f7f0e0; padding: 22px; border-radius: 18px; gap: 20px; margin-bottom: 28px;
}
.report-stats > div { text-align: center; }
.report-stats span { font-size: 12px; color: #8a8174; display: block; }
.report-stats strong { display: block; font-size: 25px; font-weight: 500; margin-top: 3px; }
.report-sheet section { padding: 22px 0; border-bottom: 1px solid #eee4d2; }
.report-sheet section h3 { font-size: 15px; margin-bottom: 14px; }
.report-sheet section p, .report-sheet section li { font-size: 13px; color: #6f675b; line-height: 1.9; }
.report-sheet section .muted-text { font-size: 12px; color: #8a8174; margin-top: 10px; }
.report-trend { margin-top: 18px; background: #f7f0e0; border-radius: 16px; padding: 16px 16px 8px; }
.report-trend .trend-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.report-trend h4 { font-size: 13px; font-weight: 500; color: #4a453c; }
.report-trend .trend-meta { font-size: 12px; color: #8a8174; }
.report-trend .chart-container { min-height: 0; margin: 0; }
.report-trend .growth-chart { min-height: 0; }
.report-trend .chart-prev { font-size: 11px; fill: #8a7d5c; }
.report-trend .chart-legend { margin-top: 4px; gap: 16px; }
.report-trend .legend-dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid #1c1c1c; background: #fff; display: inline-block;
}
.report-trend .legend-dot.now { background: #1c1c1c; }
.report-trend .chart-note { margin-top: 6px; padding-top: 8px; }
.report-plan { margin-bottom: 16px; }
.report-plan strong { font-size: 12px; font-weight: 500; }
.report-plan p { margin-top: 3px; }
.report-disclaimer { font-size: 12px; line-height: 1.9; color: #8a8174; background: #f7f0e0; border-radius: 14px; padding: 16px; margin-top: 24px; }

.vision-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  background: var(--ink);
  color: #f7f2e6;
  border-radius: 32px;
  padding: 36px;
  margin-bottom: 32px;
}
.vision-copy .eyebrow { color: var(--gold-soft); }
.vision-copy h2 { font-size: 33px; line-height: 1.5; font-weight: 500; margin: 14px 0; color: #fff; }
.vision-copy > p { color: #c4bba8; font-size: 14px; max-width: 440px; }
.vision-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.vision-tags span { border: 1px solid #5a5346; padding: 5px 10px; border-radius: 999px; font-size: 12px; color: #e8d48a; }
.vision-flow { display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.vision-node {
  display: flex; align-items: center; gap: 16px;
  border: 1px solid #3a3a3a; border-radius: 18px; padding: 16px 20px; background: #262626;
}
.vision-node h3 { font-size: 16px; font-weight: 500; color: #fff; }
.vision-node p { font-size: 12px; color: #c4bba8; }
.vision-node > b { font-size: 24px; color: var(--gold); font-weight: 300; margin-left: auto; }

.blueprint-section { margin: 32px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 18px; gap: 20px; }
.section-heading h2 { font-size: 24px; }
.section-heading > .muted-text { font-size: 12px; color: #8a8174; }
.capability-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.capability { padding: 22px; display: flex; flex-direction: column; }
.capability h3 { font-size: 15px; }
.capability p { font-size: 12px; color: #7a7368; margin: 10px 0 18px; }
.capability > .pill { align-self: flex-start; margin-top: auto; }
.stage-tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.stage-tabs button {
  padding: 16px 8px; border: 1px solid #eadfca; border-radius: 16px;
  background: #fffdf8; text-align: left;
}
.stage-tabs button span { display: block; font-size: 12px; color: #8a8174; margin-bottom: 6px; }
.stage-tabs button strong { font-size: 13px; font-weight: 500; display: block; color: #4a453c; }
.stage-tabs button.selected { background: var(--ink); border-color: var(--ink); }
.stage-tabs button.selected span { color: #c4bba8; }
.stage-tabs button.selected strong { color: #fff; }
.stage-tabs button:hover:not(.selected) { background: #f7f0e0; }
.stage-panel {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px;
  background: var(--card); border: 1px solid #eadfca; border-radius: 24px; padding: 28px;
}
.stage-intro h3 { font-size: 23px; line-height: 1.5; margin: 14px 0 12px; }
.stage-intro > p { font-size: 13px; color: #7a7368; }
.stage-deliverables { background: #f7f0e0; padding: 24px; border-radius: 18px; }
.stage-deliverables h4 { margin-bottom: 16px; }
.stage-deliverables > p { font-size: 13px; margin: 12px 0; color: #6f675b; }
.stage-gate { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; border-top: 1px solid #eee4d2; padding-top: 20px; }
.stage-gate h4 { font-size: 12px; margin-bottom: 7px; }
.stage-gate p { font-size: 12px; color: #7a7368; }
.evidence-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.evidence-grid h3 { font-size: 17px; margin-bottom: 10px; }
.evidence-grid p { font-size: 13px; color: #7a7368; }
.service-chain {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px;
  padding: 24px; border-radius: 20px; background: #f7f0e0; border: 1px solid #eadfca; margin-bottom: 18px;
}
.service-chain > div { position: relative; text-align: center; }
.service-chain > div:not(:last-child):after {
  content: "";
  position: absolute; right: -13px; top: 50%; width: 7px; height: 7px;
  border-right: 1px solid #c4a44a; border-top: 1px solid #c4a44a; transform: rotate(45deg);
}
.service-chain small { display: block; color: #9a9080; font-size: 12px; margin-bottom: 5px; }
.service-chain strong { font-size: 12px; font-weight: 500; }
.business-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.business-grid > div { padding: 16px 4px; }
.business-grid h3 { font-size: 15px; margin-bottom: 10px; }
.business-grid p { font-size: 12px; color: #7a7368; }
.blueprint-closing {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; border-top: 1px solid #eadfca; padding: 32px 0 16px;
}
.blueprint-closing h2 { font-size: 26px; }
.blueprint-closing p { font-size: 13px; color: #7a7368; margin-top: 6px; }
.blueprint-source { font-size: 12px; color: #9a9080; }
.blueprint-source a { text-decoration: underline; }
.muted-text { color: var(--muted); }

dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 64px);
  padding: 0;
  border: 1px solid #eadfca;
  border-radius: 28px;
  box-shadow: 0 30px 120px #1c1c1c33;
  color: var(--ink);
  background: #fffcf6;
  overscroll-behavior: contain;
}
dialog.wide-dialog { width: min(760px, calc(100vw - 32px)); }
dialog::backdrop { background: #1c1c1c55; backdrop-filter: blur(8px); }
.dialog-head {
  position: sticky; top: 0; background: #fffcf6;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; border-bottom: 1px solid #eee4d2; z-index: 2;
}
.dialog-head h2 { font-size: 21px; }
.icon-btn {
  min-width: 64px; height: 36px; padding: 0 14px;
  border-radius: 999px; background: #f3ead6; font-size: 13px;
}
.icon-btn:hover { background: #eadfca; }
.dialog-body { padding: 22px 24px 26px; }
.dialog-description { font-size: 13px; color: #7a7368; line-height: 1.9; margin-bottom: 20px; }
.case-list { display: flex; flex-direction: column; gap: 12px; }
.case-option {
  display: flex; gap: 16px; align-items: center; text-align: left;
  border: 1px solid #eadfca; border-radius: 18px; padding: 18px; background: #fffdf8; width: 100%;
}
.case-option.selected { border-color: var(--ink); background: #fff8ea; }
.case-option:hover { background: #f7f0e0; }
.case-option > div { flex: 1; }
.case-option h3 { font-size: 17px; }
.case-option h3 small { font-size: 12px; color: #8a8174; font-weight: 400; margin-left: 7px; }
.case-option p { font-size: 12px; color: #7a7368; margin: 5px 0; }
.case-option > div > span { font-size: 12px; color: #9a9080; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 12px; color: #6f675b; }
.field input, .field select {
  width: 100%; height: 44px; border: 1px solid #eadfca; border-radius: 12px;
  background: #fffdf8; color: var(--ink); padding: 8px 12px; font-size: 14px; min-width: 0;
}
.field small { font-size: 12px; color: #8a8174; }
.form-section-title { font-size: 14px; font-weight: 600; margin: 22px 0 16px; }
.form-section-title:first-child { margin-top: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; border-top: 1px solid #eee4d2; padding-top: 20px; }
.form-errors { color: #a2574a; font-size: 12px; line-height: 1.8; margin-top: 14px; }
.form-errors:empty { display: none; }
.assistant-disclosure {
  background: #f7f0e0; color: #6f675b; font-size: 12px; border-radius: 12px; padding: 10px 14px; margin-bottom: 18px;
}
.chat-message {
  background: #f7f0e0; padding: 18px; border-radius: 4px 18px 18px 18px;
  font-size: 14px; line-height: 1.9; color: #4a453c;
}
.chat-message.intro { font-size: 12px; background: #fffdf8; border: 1px solid #eadfca; }
.question-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 24px; }
.question-list button {
  padding: 10px 12px; text-align: left; font-size: 12px;
  border: 1px solid #eadfca; border-radius: 12px; color: #6f675b;
}
.question-list button.selected { background: var(--ink); border-color: var(--ink); color: #fff; }
.chat-question {
  margin: 18px 0 16px 36px; padding: 12px 16px;
  background: var(--ink); border-radius: 14px 4px 14px 14px; color: #f7f2e6; font-size: 13px;
}
.chat-source { font-size: 12px; color: #8a8174; line-height: 1.9; margin-top: 14px; }
.evidence-list { margin: 18px 0; }
.evidence-list p { font-size: 14px; padding: 12px 0; border-bottom: 1px solid #eee4d2; }
.evidence-list ~ p { font-size: 13px; color: #6f675b; margin-bottom: 16px; }
.export-options { display: flex; gap: 12px; flex-wrap: wrap; }
.export-help { font-size: 13px; color: #7a7368; margin-top: 18px; line-height: 1.9; }
.export-frame { display: block; width: 100%; height: 55dvh; min-height: 250px; border: 1px solid #eadfca; border-radius: 12px; background: white; }
.switch-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.prediction-number { overflow-wrap: anywhere; }

#toast {
  position: fixed; bottom: 25px; left: 50%; transform: translate(-50%, 20px);
  background: #1c1c1ceF; color: #f7f2e6; padding: 13px 22px; border-radius: 999px;
  z-index: 20; font-size: 13px; box-shadow: 0 8px 30px #1c1c1c30;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  max-width: calc(100vw - 40px); text-align: center;
}
#toast.visible { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 1600px) {
  .metric-value { font-size: 38px; }
  .growth-chart { min-height: 320px; }
  .overview-grid { grid-template-columns: 2fr 1fr; }
}

@media (max-width: 1200px) {
  .topbar, .app-shell main, .footer, .breadcrumb { padding-left: 22px; padding-right: 22px; }
  .metrics { gap: 10px; }
  .metric-value { font-size: 28px; }
  .overview-grid { grid-template-columns: minmax(0, 1.55fr) minmax(240px, 1fr); }
  .capability-grid { grid-template-columns: 1fr 1fr; }
  .stage-tabs { grid-template-columns: repeat(3, 1fr); }
  .name-row .pill { display: none; }
  .nav-label { display: none; }
}

@media (max-width: 1000px) {
  .topbar { flex-wrap: wrap; }
  .nav-wrap { order: 3; width: 100%; }
  .topbar nav { width: 100%; }
  .overview-grid, .bottom-grid { grid-template-columns: 1fr; }
  .insight-column { display: grid; grid-template-columns: 1fr 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .vision-card { grid-template-columns: 1fr; gap: 22px; padding: 24px; }
  .report-sheet { padding: 28px; }
}

@media (max-width: 740px) {
  .topbar { padding: 14px 16px 8px; gap: 10px; }
  .breadcrumb { padding: 0 16px; }
  .app-shell main { padding: 16px; }
  .page-heading { flex-wrap: wrap; align-items: flex-start; }
  .heading-actions { width: 100%; }
  .heading-actions .btn { flex: 1; }
  .child-banner { flex-wrap: wrap; }
  .child-status { width: 100%; justify-content: space-between; border-top: 1px solid #eadfca; padding-top: 10px; }
  .insight-column, .plan-grid, .care-timeline, .evidence-grid, .business-grid, .form-grid, .question-list { grid-template-columns: 1fr; }
  .assistant-banner, .footer, .blueprint-closing { flex-direction: column; align-items: flex-start; }
  .assistant-suggestions { width: 100%; margin: 0; }
  .report-stats { grid-template-columns: 1fr 1fr; }
  .stage-panel, .stage-gate { grid-template-columns: 1fr; }
  .service-chain { grid-template-columns: 1fr; }
  .service-chain > div { display: flex; align-items: center; gap: 14px; text-align: left; }
  .service-chain > div:not(:last-child):after { left: 4px; right: auto; top: auto; bottom: -12px; transform: rotate(135deg); }
  .footer { padding: 12px 16px 24px; }
  dialog, dialog.wide-dialog { width: calc(100vw - 20px); border-radius: 20px; }
  .switch-name { max-width: 140px; }
}

@media (max-width: 360px) {
  .metrics { grid-template-columns: 1fr; }
  .topbar nav { gap: 0; }
  .nav-link { padding: 8px 10px; font-size: 12px; }
}

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

@media print {
  @page { size: A4; margin: 16mm; }
  .topbar, .breadcrumb, .page-heading, .footer, .skip-link, #toast, dialog { display: none !important; }
  .layout, .app-shell { display: block; background: white; padding: 0; }
  body { background: white; }
  .app-shell main { padding: 0; max-width: none; }
  .report-sheet { border: 0; border-radius: 0; max-width: none; padding: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
