
/*
  乔不不斯个人品牌设计系统 v2.0
  双主题核心：dark / light / system

  用法：
  1. 在 <head> 中加载本文件与 theme-controller.js。
  2. 组件只使用语义变量，不写死黑白色。
  3. html[data-theme="dark|light"] 由控制器维护。
*/


:root,
html[data-theme="dark"] {
  color-scheme: dark;

  /* Signature dark palette */
  --bg: #0B0D0F;
  --bg2: #13161A;
  --bg3: #1C2026;
  --text: #F7F8FA;
  --muted: #A9B0BA;
  --dim: #737C88;
  --accent: #58E1C1;
  --accent2: #3BB89A;
  --accent3: #7AF2D8;
  --accent-ink: #07110E;
  --border: rgba(255, 255, 255, 0.08);
  --border2: rgba(255, 255, 255, 0.14);

  /* Semantic surfaces */
  --surface: var(--bg2);
  --surface-raised: rgba(19, 22, 26, 0.94);
  --card: var(--bg3);
  --card2: var(--bg2);
  --surface-inset: rgba(5, 6, 7, 0.58);
  --surface-nav: rgba(11, 13, 15, 0.82);
  --surface-hover: rgba(28, 32, 38, 0.96);

  /* Accent treatments */
  --accent-dim: rgba(88, 225, 193, 0.11);
  --accent-soft: rgba(88, 225, 193, 0.055);
  --accent-glow: rgba(88, 225, 193, 0.28);
  --accent-border: rgba(88, 225, 193, 0.30);

  /* Atmosphere and elevation */
  --grid-line: rgba(88, 225, 193, 0.032);
  --ambient-strong: rgba(88, 225, 193, 0.11);
  --ambient-soft: rgba(88, 225, 193, 0.055);
  --page-fade: rgba(11, 13, 15, 0.94);
  --shadow-color: rgba(0, 0, 0, 0.30);
  --shadow-soft: 0 18px 52px rgba(0, 0, 0, 0.18);
  --shadow-card: 0 30px 100px var(--shadow-color);

  /* Status */
  --danger: #F6B66B;
  --danger-soft: rgba(246, 182, 107, 0.11);
  --success: var(--accent);
  --score-low: #FF8791;
  --score-mid: #FFD177;
  --focus-ring: rgba(88, 225, 193, 0.18);
}

html[data-theme="light"] {
  color-scheme: light;
  --score-low: #B63244;
  --score-mid: #896000;
  --score-mid-fill: #D69F25;

  /* Cold-mist light palette: intentionally not pure white */
  --bg: #EEF2F0;
  --bg2: #F8FAF9;
  --bg3: #E3E9E6;
  --text: #151A18;
  --muted: #56615D;
  --dim: #77827E;
  --accent: #137A66;
  --accent2: #0C6656;
  --accent3: #1C947C;
  --accent-ink: #F7FFFC;
  --border: rgba(21, 26, 24, 0.10);
  --border2: rgba(21, 26, 24, 0.18);

  --surface: var(--bg2);
  --surface-raised: rgba(248, 250, 249, 0.94);
  --card: var(--bg3);
  --card2: var(--bg2);
  --surface-inset: rgba(223, 230, 226, 0.72);
  --surface-nav: rgba(238, 242, 240, 0.86);
  --surface-hover: #DFE7E3;

  --accent-dim: rgba(19, 122, 102, 0.11);
  --accent-soft: rgba(19, 122, 102, 0.055);
  --accent-glow: rgba(19, 122, 102, 0.16);
  --accent-border: rgba(19, 122, 102, 0.32);

  --grid-line: rgba(19, 122, 102, 0.052);
  --ambient-strong: rgba(19, 122, 102, 0.10);
  --ambient-soft: rgba(19, 122, 102, 0.05);
  --page-fade: rgba(238, 242, 240, 0.93);
  --shadow-color: rgba(28, 45, 39, 0.12);
  --shadow-soft: 0 14px 38px rgba(28, 45, 39, 0.08);
  --shadow-card: 0 24px 72px var(--shadow-color);

  --danger: #9A5B16;
  --danger-soft: rgba(154, 91, 22, 0.10);
  --success: var(--accent);
  --focus-ring: rgba(19, 122, 102, 0.18);
}

:root {
  /* Typography */
  --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Layout */
  --wrap: 1120px;
  --wrap-narrow: 840px;
  --radius-sharp: 2px;
  --radius-card: 12px;
  --radius-panel: 16px;
  --transition-theme: 180ms ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--transition-theme), color var(--transition-theme);
}

button, input, textarea, select { color-scheme: inherit; }
button { font: inherit; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

:root { --content: min(1100px, calc(100% - 48px)); }
body { min-width: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
:where(h1,h2,h3,p,ol,ul,dl,dd) { margin: 0; }
h1,h2,h3 { line-height: 1.25; letter-spacing: -.035em; }
p,dd,li { overflow-wrap: anywhere; }
a { color: var(--accent); text-underline-offset: 3px; }
button { cursor: pointer; }
.shell { width: var(--content); margin-inline: auto; }
main { padding-block: clamp(32px, 6vw, 78px); }
.overline,.tag { color: var(--accent); font-size: .87rem; font-weight: 720; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 22px; }
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border2); background: var(--surface); color: var(--text); padding: 8px 16px; border-radius: 8px; font: inherit; font-weight: 650; text-decoration: none; text-align: center; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.note { font-size: .875rem; color: var(--muted); margin-top: 12px; }
.card { border: 1px solid var(--border2); border-radius: 12px; background: var(--surface); padding: clamp(17px, 3vw, 27px); min-width: 0; }
dt { color: var(--muted); font-size: .87rem; }
dd { margin-top: 3px; }
.narrow { max-width: 790px; margin-inline: auto; }
.page-title { font-size: clamp(28px, 5vw, 45px); margin-top: 10px; }
.form-intro { margin-top: 8px; color: var(--muted); }
.progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style:none; padding: 0; gap: 8px; margin-block: 17px 20px; }
.progress li { border-top: 3px solid var(--border2); padding-top: 5px; color: var(--muted); font-size: .875rem; }
.progress li[aria-current] { color: var(--accent); font-weight: 750; }
.progress li.done { border-color: var(--accent-border); }
.progress li[aria-current] { border-color: var(--accent); }
.form-card > * + * { margin-top: 21px; }
fieldset { min-inline-size: 0; border: 0; padding: 0; margin: 0; }
legend,.field-title { color: var(--text); font-weight: 730; padding: 0; }
.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 7px; }
.option { display: flex; align-items: start; gap: 8px; padding: 9px 11px; border: 1px solid var(--border2); border-radius: 8px; cursor: pointer; min-height: 44px; font-size: .92rem; }
.option:has(input:checked) { border-color: var(--accent); background: var(--accent-dim); }
.option input { accent-color: var(--accent); margin-top: .45em; flex-shrink: 0; }
.option-example { display: block; margin-top: 4px; color: var(--muted); line-height: 1.55; }
.control { display: block; width: 100%; margin-top: 6px; border: 1px solid var(--border2); border-radius: 8px; background: var(--surface-inset); color: var(--text); padding: 11px 12px; font: inherit; }
textarea.control { resize: vertical; min-height: 92px; }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; }
.form-foot .primary { margin-inline-start: auto; }
.error { color: var(--danger); }
.report h2 { font-size: clamp(21px, 3vw, 28px); }
.report h3 { font-size: 1.08rem; }
.report p { margin-top: 7px; }
.report { display: grid; gap: 24px; max-width: 1060px; }
main:has(.report) { padding-block-start: clamp(20px,4vw,48px); }
.report .summary {
  display: grid;
  grid-template-columns: minmax(0,1.8fr) minmax(205px,1fr);
  align-items: center;
  gap: clamp(20px,4vw,52px);
  background: linear-gradient(125deg,var(--accent-dim),var(--accent-soft));
  border-color: var(--accent-border);
  padding: clamp(22px,5vw,54px);
  border-radius: 22px;
}
.summary .page-title { margin: 0 0 clamp(13px,2.5vw,23px); font-size: clamp(16px,2.15vw,22px); letter-spacing: 0; }
.summary-priorities { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.summary-priorities li { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 6px 11px; border: 1px solid var(--accent-border); border-radius: 8px; background: var(--surface); }
.summary-priorities strong { color: var(--text); font-weight: 740; font-size: 1rem; }
.summary .summary-conclusion { margin: 5px 0 0; font-size: clamp(29px,4.4vw,51px); line-height: 1.2; text-wrap: balance; }
.summary-aside { padding-inline-start: clamp(16px,3.3vw,36px); border-inline-start: 1px solid var(--accent-border); }
.summary-aside .summary-label { margin-top: 0; margin-bottom: 8px; color: var(--muted); font-size: .86rem; font-weight: 680; }
.summary-link { display: inline-block; font-weight: 700; font-size: .9rem; margin-top: 14px; }
.report-detail { display: grid; gap: clamp(21px,3.5vw,36px); min-width: 0; }
.report-detail > h2 { margin-top: 10px; font-size: clamp(24px,3.7vw,36px); }
.report-detail > .card > h3 { font-size: clamp(20px, 3vw, 26px); line-height: 1.25; }
.report-overview { display: grid; grid-template-columns: minmax(0,1fr); gap: clamp(12px,2.5vw,23px); }
.report-overview h3 { font-size: clamp(20px,2.4vw,26px); }
.report-overview .stage-cards li:not([aria-current]) { background: transparent; border-color: var(--border); }
.report h4 { margin: 0; line-height: 1.35; }
.stage-cards, .closure-check ul {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
  list-style: none;
  margin-top: 14px;
  padding: 0;
}
.stage-cards li, .closure-check li {
  background: var(--surface-inset);
  padding: 12px 13px;
  border: 1px solid var(--border2);
  border-radius: 9px;
}
.stage-cards li[aria-current='step'] { background: var(--accent-dim); border: 2px solid var(--accent); padding: 11px 12px; }
.stage-card-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; margin-bottom: 6px; }
.stage-card-heading strong { color: var(--accent); font-size: 1.2rem; }
.stage-card-heading span { color: var(--accent-ink); background: var(--accent); border-radius: 5px; padding: 2px 8px; font-size: .78rem; font-weight: 760; }
.stage-card-desc { color: var(--muted); font-size: .88rem; line-height: 1.6; margin-top: 8px; }
.closure-check p { color: var(--muted); font-size: .87rem; line-height: 1.58; }
.closure-check { padding: 14px 0 16px; }
.closure-check ul { grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 9px; }
.closure-check li > div { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 9px; }
.diagnostic-charts { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(14px,3vw,30px); margin-top: 18px; }
.diagnostic-charts > * { min-width: 0; }
.diagnostic-charts figure { margin: 0; }
.diagnostic-charts h4 { font-size: .91rem; }
.diagnostic-map .diagnostic-charts .score-bars { margin-top: 0; }
.score-bars { --score-ink: var(--muted); display: grid; gap: 8px; list-style: none; padding: 0; margin: 14px 0 4px; }
.score-bars li { display: grid; grid-template-columns: minmax(160px,31%) minmax(0,1fr); align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
[data-score-band="low"] { --score-ink: var(--score-low); }
[data-score-band="mid"] { --score-ink: var(--score-mid); --score-fill: var(--score-mid-fill,var(--score-ink)); }
[data-score-band="full"] { --score-ink: var(--accent); }
.score-bars li[data-priority] { background: var(--accent-soft); border-color: var(--accent-border); }
.diagnostic-charts .score-bars { margin-top: 9px; gap: 6px; }
.diagnostic-charts .score-bars li { grid-template-columns: minmax(0,1fr); gap: 4px; padding: 5px 8px; }
.diagnostic-charts .score-track span { height: 7px; }
.score-bar-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.score-value { color: var(--score-ink); margin-left: auto; font-weight: 750; white-space: nowrap; }
.score-track { position: relative; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 4px; }
.score-track span { height: 12px; border-radius: 3px; background: var(--surface-hover); border: 1px solid var(--border); }
.score-track .filled { background: var(--score-fill,var(--score-ink)); border-color: var(--score-fill,var(--score-ink)); }
.score-bars li[data-zero] .score-track::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: 3px; border-radius: 3px; background: var(--score-ink); }
.score-radar { display: block; width: min(100%,455px); height: auto; margin: 6px auto; }
.action-steps { margin: 14px 0 0; padding-left: 1.55em; }
.action-steps li { padding: 9px 0 9px 5px; border-top: 1px solid var(--border); }
.action-steps li::marker { color: var(--accent); font-weight: 750; }
.action-steps li p { color: var(--muted); margin-top: 5px; }
.report { --progress-text:#8dbdff; --progress-bg:rgba(105,163,255,.15); }
html[data-theme='light'] .report { --progress-text:#254f82; --progress-bg:#e0eaf8; }
.diagnostic-status, .diagnostic-priority { font-size: .77rem; font-weight: 740; border: 1px solid transparent; border-radius: 5px; padding: 1px 6px; line-height: 1.55; }
.diagnostic-status { display: inline-flex; align-items: baseline; gap: 4px; color: var(--muted); }
.diagnostic-status[data-status='done'] { background: var(--accent-dim); color: var(--accent); border-color: var(--accent-border); }
.diagnostic-status[data-status='progress'] { background: var(--progress-bg); color: var(--progress-text); }
.diagnostic-status[data-status='gap'] { background: var(--danger-soft); color: var(--danger); }
.diagnostic-status[data-status='verify'] { border-style: dashed; border-color: var(--border2); }
.diagnostic-status[data-status='waiting'] { background: var(--surface-inset); }
.diagnostic-priority { color: var(--accent-ink); background: var(--accent); }
.score-bars li[data-ai] { margin-top: 5px; border-top-color: var(--accent-border); }
.report-facts,.support-grid { display: grid; gap: 10px; margin-top: 14px; }
.report-facts { grid-template-columns: repeat(3,minmax(0,1fr)); }
.report-facts div { border: 1px solid var(--border2); padding: 10px 12px; border-radius: 8px; background: var(--surface); }
.support-grid { grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 13px; }
.report-facts dd { font-weight: 680; }
.report-check { margin-top: 20px; padding: 15px 18px; border-inline-start: 3px solid var(--accent); background: var(--accent-dim); border-radius: 0 9px 9px 0; }
.report-check h5 { color: var(--accent); }
.report-next { color: var(--muted); }
.report-path { padding: clamp(18px,3vw,34px); background: var(--surface); border: 1px solid var(--border2); border-radius: 16px; }
.report-path h3 { font-size: clamp(23px,3.4vw,31px); margin-bottom: 18px; }
.path-list { padding: 0; list-style: none; display: grid; gap: 16px; margin-bottom: 0; }
.path-list > li {
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(0,1fr);
  align-items: start;
  gap: 16px clamp(18px,3vw,32px);
  padding: clamp(18px,2.4vw,28px);
  border: 1px solid var(--border2);
  border-radius: 14px;
  background: var(--bg2);
}
.path-list > li:is([data-current],[data-parallel]) { border-color: var(--accent-border); background: var(--accent-soft); }
.path-item-heading { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.path-item-heading h4 { font-size: 1.22rem; }
.path-detail,.path-links { min-width: 0; }
.path-detail p,.path-score p { margin: 6px 0 0; font-size: .97rem; line-height: 1.72; color: var(--text); }
.path-detail p + h5 { margin-top: 16px; }
.path-links { padding-inline-start: 20px; border-inline-start: 1px solid var(--border2); }
.path-list h5,.execution-item h5,.report-ai h5 { margin: 0; font-size: .94rem; color: var(--accent); font-weight: 720; }
.path-links .summary-rows { margin: 10px 0 0; }
.path-links .summary-rows > div { grid-template-columns: max-content minmax(0,1fr); gap: 6px 12px; padding: 7px 0; border-top: 1px solid var(--border); }
.path-links .summary-rows > div:first-child { border-top: 0; padding-top: 0; }
.path-links .summary-rows :is(dt,dd) { font-size: .93rem; line-height: 1.62; }
.path-links dt { color: var(--text); font-weight: 700; }
.path-links dd { color: var(--muted); }
.path-score { grid-column: 1 / -1; display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.path-score > span,.report-ai h4 span,.ai-score-pill { padding: 3px 9px; border-radius: 6px; background: var(--surface-hover); font-size: .86rem; white-space: nowrap; }
.path-score strong,.report-ai h4 strong,.ai-score-pill strong { color: var(--score-ink,var(--text)); }
.path-score p { flex: 1 1 260px; margin: 0; color: var(--muted); font-size: .93rem; }
.path-score p strong { color: var(--text); }
.report-ai { border-inline-start: 3px solid var(--accent-border); }
.report-ai[data-current] { border-color: var(--accent); }
.report-ai-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.report-ai-heading h3 { font-size: clamp(20px,3vw,26px); }
.report-ai[data-current] .path-timing { background: var(--accent); color: var(--accent-ink); }
.report-ai-overview { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.25fr); gap: 14px 20px; margin-top: 16px; }
.report-ai[data-current] .report-ai-overview { grid-template-columns: minmax(0,1fr); }
.report-ai-overview > div { padding: 18px 20px; background: var(--surface-inset); border: 1px solid var(--border); border-radius: 12px; }
.report-ai-overview > div:last-child { background: var(--accent-soft); border-color: var(--accent-border); }
.report-ai-overview h4 { font-size: 1rem; color: var(--muted); margin-bottom: 8px; }
.ai-verdict-headline { font-size: 1.2rem; font-weight: 760; color: var(--accent); line-height: 1.4; margin-top: 0 !important; }
.ai-try-lead { font-size: 1rem; color: var(--text); line-height: 1.72; }
.report-ai-overview p { margin-bottom: 0; }
.execution-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 16px 0 20px;
}
.execution-flow > li { position: relative; min-width: 0; }
.execution-flow > li:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 700;
  font-size: .95rem;
  pointer-events: none;
}
.flow-node {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 12px 13px;
  border: 1px solid var(--border2);
  border-radius: 12px;
  background: var(--surface-inset);
  color: var(--text);
  text-decoration: none;
  transition: border-color 140ms ease, transform 140ms ease;
}
.flow-node:hover { border-color: var(--accent); transform: translateY(-1px); }
.execution-flow > li:is([data-current],[data-parallel]) .flow-node {
  background: var(--accent-dim);
  border: 2px solid var(--accent);
}
.execution-flow > li[data-deferred] .flow-node { border-style: dashed; opacity: .88; }
.flow-num {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-hover);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 750;
}
.execution-flow > li:is([data-current],[data-parallel]) .flow-num {
  background: var(--accent);
  color: var(--accent-ink);
}
.flow-label { font-size: 1rem; line-height: 1.3; }
.flow-timing { font-size: .78rem; color: var(--muted); line-height: 1.4; }
.execution-flow > li:is([data-current],[data-parallel]) .flow-timing { color: var(--accent); font-weight: 700; }
.report-appendix h3 { font-size: 1.08rem; margin-bottom: 6px; }
.operation-stay-tip {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: .92rem;
  font-weight: 650;
}
.execution-list { position: relative; display: grid; gap: 11px; margin: 14px 0 0; padding: 0 0 0 13px; border-inline-start: 2px solid var(--border2); list-style: none; }
.execution-item { border: 1px solid var(--border2); background: var(--surface); border-radius: 8px; overflow: hidden; scroll-margin-top: 18px; }
.execution-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 8px; padding: 8px 12px; background: var(--surface-inset); }
.execution-item:is([data-current],[data-parallel]) .execution-heading { color: var(--accent-ink); background: var(--accent); }
.execution-item[data-deferred] { border-style: dashed; }
.execution-item[data-deferred] .execution-heading { background: var(--bg); }
.execution-item[data-deferred] .path-timing { color: var(--muted); }
.execution-item:is([data-current],[data-parallel]) .path-timing { background: transparent; color: inherit; border: 1px solid currentColor; }
.execution-number { display: inline-grid; place-items: center; width: 23px; height: 23px; border: 1px solid currentColor; border-radius: 50%; font-size: .76rem; font-weight: 730; }
.execution-body,.report-execution > .execution-item { padding: 8px 12px 12px; }
.execution-body > p:first-child { margin-top: 0; }
.execution-body > p:last-child { margin-bottom: 0; }
.report-execution > .execution-item { margin-top: 14px; background: var(--accent-soft); }
.execution-item:is([data-current],[data-parallel]) { border-color: var(--accent); }
.execution-item .report-check { padding: 10px 14px; margin-top: 12px; }
.path-timing { justify-self: start; border-radius: 4px; padding: 1px 7px; background: var(--surface-hover); color: var(--text); font-size: .81rem; font-weight: 700; }
.path-list li:is([data-current],[data-parallel]) .path-timing { background: var(--accent); color: var(--accent-ink); }
.priority-role { font-size: .79rem; font-weight: 650; }
.report :is(#report-path-title,#report-execution-title,#report-ai-title) { scroll-margin-top: 22px; }
details > summary { font-weight: 700; cursor: pointer; }
.checklist { padding: 0; margin-top: 10px; list-style: none; }
.checklist li { padding: 10px 0; border-top: 1px solid var(--border2); display: grid; grid-template-columns: 6em minmax(0,1fr); gap: 9px; font-size: .94rem; }
.checklist li span { color: var(--muted); }
.checklist li.priority b { color: var(--accent); }
footer { border-top: 1px solid var(--border2); color: var(--muted); font-size: .86rem; padding-block: 15px 20px; }
@media(max-width: 700px) {
  :root { --content: calc(100% - 32px); }
  .report .summary,.report-overview { grid-template-columns: minmax(0,1fr); }
  .summary-aside { border-inline-start: 0; padding-inline-start: 0; padding-top: 16px; border-top: 1px solid var(--accent-border); }
}
@media(max-width: 530px) {
  .options,.support-grid { grid-template-columns: 1fr; }
  .report-facts { grid-template-columns: 1fr; gap: 6px; }
  .report-facts div { display: grid; grid-template-columns: 5.5em 1fr; align-items: baseline; gap: 7px; }
  .diagnostic-charts,.path-list > li,.report-ai-overview { grid-template-columns: minmax(0,1fr); }
  .path-links { padding-inline-start: 0; padding-top: 8px; border-inline-start: 0; border-top: 1px solid var(--border); }
}
@media print {
  :root, html[data-theme='dark'] { color-scheme: light; --bg:#EEF2F0; --surface:#F8FAF9; --text:#151A18; --muted:#56615D; --accent:#137A66; --border2:#BABFBC; --accent-soft:#E3E9E6; }
  #q-site-header,.actions,.report-contents,footer,.support-grid,#claim { display: none; }
  body.q-has-header, main { padding: 0; }
  .card { break-inside: avoid; }
}

/* Forms and result sections share the same surfaces in both themes. */
body { font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Noto Sans SC', 'Segoe UI', sans-serif; }
.progress { grid-template-columns: repeat(var(--steps, 4), minmax(0, 1fr)); }
.progress li { line-height: 1.4; }
#quiz { margin-top: 19px; }
.question-panel { padding: 0; border: 0; background: transparent; }
#quiz #question-fields { display: grid; gap: 18px; }
#quiz #question-fields > [data-field],
#quiz .stage-group-fields > [data-field] {
  margin: 0;
  padding: clamp(14px, 3vw, 22px);
  border: 1px solid var(--border2);
  border-radius: 12px;
  background: var(--surface);
}
.stage-field-group {
  display: grid;
  gap: 14px;
  padding: clamp(16px, 2.5vw, 24px);
  border: 1px solid var(--border2);
  border-radius: 16px;
  background: var(--surface-inset);
}
.stage-group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.stage-group-num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .88rem;
  font-weight: 760;
  flex-shrink: 0;
}
.stage-group-head h2 { font-size: 1.15rem; margin: 0; line-height: 1.25; }
.stage-group-head p { font-size: .88rem; color: var(--muted); margin: 2px 0 0; line-height: 1.45; }
.stage-group-count {
  margin-inline-start: auto;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 650;
  white-space: nowrap;
}
.stage-group-fields { display: grid; gap: 14px; }
#quiz #question-fields legend { float: left; width: 100%; margin-bottom: 5px; }
#quiz .options { clear: both; grid-template-columns: minmax(0,1fr); gap: 6px; }
#quiz .field-hint { clear: both; margin-bottom: 9px; }
#question-fields:empty { display: none; }
.field-hint { margin-top: 5px; }
.field-title small, .extra-field small { color: var(--muted); font-size: .8em; font-weight: 400; }
.extra-field { margin-top: 12px; }
.form-message:empty { display:none; }
.form-message { margin-top: 10px; }
.confirm-summary + .confirm-summary { margin-top: 12px; }
.summary-rows { margin-top: 11px; }
.summary-rows > div { display: grid; grid-template-columns: minmax(95px, 24%) minmax(0,1fr); gap: 4px 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.summary-rows dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.save-hint { margin-top: 13px; }
.result-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: .92rem; }
.stage-tag { display: inline-block; color: var(--accent); background: var(--accent-dim); border: 1px solid var(--accent-border); border-radius: 6px; padding: 2px 8px; font-weight: 740; }
.result-context { color: var(--muted); font-size: .91rem; }
.report > .voyage-card {
  border-color: var(--accent-border);
  border-top: 3px solid var(--accent);
  background: linear-gradient(var(--accent-dim),var(--accent-soft) 230px,var(--surface));
}
.voyage-output { border-top: 1px solid var(--border2); padding-top: 16px; margin-top: 16px; }
.voyage-save-tip { margin: 8px 0 0; }
.voyage-preview { display: block; width: min(100%,560px); height: auto; margin: 14px auto 0; border: 1px solid var(--border2); border-radius: 9px; -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; }
.voyage-intro { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 18px; padding-bottom: 14px; margin-bottom: 12px; border-bottom: 1px solid var(--accent-border); }
.voyage-card h2 { margin: 0; font-size: clamp(25px,4vw,34px); }
.voyage-intro .btn { gap: 8px; white-space: nowrap; }
#voyage-form { scroll-margin-top: 22px; }
.voyage-link { display: inline-block; margin-top: 9px; font-size: .92rem; font-weight: 680; }
.voyage-card-content { padding: 13px clamp(12px,3vw,23px) 17px; margin-top: 19px; border: 1px solid var(--accent-border); border-radius: 10px; background: var(--surface); }
.voyage-card-content h3 { margin-bottom: 10px; font-size: 1.12rem; }
.voyage-stage { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 12px; margin-bottom: 12px; color: var(--muted); }
.voyage-stage strong { color: var(--text); }
.voyage-scores,.voyage-tasks { padding-top: 13px; margin-top: 14px; border-top: 1px solid var(--border2); }
.voyage-charts { margin-top: 8px; }
.voyage-charts .score-bars { margin-top: 0; }
.voyage-tasks .summary-rows { margin: 3px 0 0; }
.voyage-tasks .summary-rows > div { grid-template-columns: minmax(0,34%) minmax(0,1fr); }
.voyage-tasks .summary-rows > div:first-child { border-top: 0; }
.voyage-tasks dt { font-weight: 650; color: var(--text); }
.voyage-tasks dd { min-width: 0; }
@media(max-width:700px) {
  .voyage-tasks .summary-rows > div { grid-template-columns: minmax(0,1fr); }
}
.voyage-card .field-title { display: block; margin-top: 12px; }
.wechat-course-card {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 270px);
  align-items: center;
  gap: clamp(20px, 3.2vw, 38px);
  border-color: var(--accent-border);
  border-top: 3px solid var(--accent);
  background: linear-gradient(135deg, var(--accent-soft), var(--surface) 58%);
  scroll-margin-top: 22px;
}
.wechat-course-copy { min-width: 0; }
.wechat-course-eyebrow {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: .82rem;
  font-weight: 740;
  margin-bottom: 10px;
}
.wechat-course-card h2 { font-size: clamp(22px, 3.2vw, 30px); margin: 0; line-height: 1.28; }
.wechat-course-desc { color: var(--muted); font-size: .98rem; line-height: 1.72; margin-top: 12px; }
.wechat-course-desc strong { color: var(--text); font-weight: 720; }
.wechat-course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 16px;
}
.wechat-course-meta > div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 10px;
  background: var(--surface-inset);
  border: 1px solid var(--border2);
}
.wechat-course-meta span { color: var(--muted); font-size: .84rem; }
.wechat-course-meta strong { color: var(--accent); font-family: var(--font-mono); font-size: .96rem; font-weight: 760; }
.wechat-course-actions { margin-top: 18px; gap: 10px; }
.wechat-course-qr {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--border2);
  box-shadow: var(--shadow-soft);
}
.wechat-course-qr img {
  display: block;
  width: min(100%, 230px);
  height: auto;
  border-radius: 8px;
}
.wechat-course-qr figcaption {
  color: #374151;
  font-size: .82rem;
  font-weight: 650;
  text-align: center;
  line-height: 1.45;
}
@media (max-width: 740px) {
  .wechat-course-card { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .wechat-course-qr { max-width: 260px; margin-inline: auto; width: 100%; }
}
@media (max-width: 530px) {
  .wechat-course-actions { flex-direction: column; align-items: stretch; }
  .wechat-course-actions .btn { width: 100%; min-height: 48px; }
  .wechat-course-meta > div { width: 100%; justify-content: space-between; }
}
.evidence-more { margin-top: 8px; color: var(--muted); }
.report-actions { margin-top: 1px; }
.operation p { margin-top: 10px; }
.operation-steps { margin: 22px 0 0; padding-left: 1.45em; color: var(--muted); }
.operation-steps li + li { margin-top: 6px; }
.operation-spinner {
  display: block;
  width: 34px;
  height: 34px;
  margin-bottom: 18px;
  border: 3px solid var(--accent-border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: operation-spin 850ms linear infinite;
}
@keyframes operation-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .operation-spinner { animation: none; } }
@media(max-width: 530px) {
  .report-actions { gap: 8px; }
  .progress li { font-size: .76rem; }
  .closure-check ul,.score-bars li { grid-template-columns: minmax(0,1fr); }
  .score-bars li { gap: 5px; }
  .summary-rows > div { grid-template-columns: minmax(0,1fr); }
  .report-actions .primary { width: 100%; }
  .checklist li { grid-template-columns: 5em minmax(0,1fr); }
  .form-foot .btn { padding-inline: 12px; }
}

/* Homepage */
body:has(.entry-page) {
  --entry-width: min(1344px, calc(100% - clamp(36px, 10vw, 160px)));
  --entry-hero-bg: #152420;
  --entry-paper: #111815;
  --entry-case-bg: #14231e;
  --entry-photo-mat: #31554a;
  --entry-report-bg: #1d3e35;
  --entry-report-text: #f2f8f2;
  --entry-report-muted: #c7ddd3;
  --entry-report-rule: #507467;
}
html[data-theme="light"] body:has(.entry-page) {
  --entry-hero-bg: #eef3e8;
  --entry-paper: #f9faf4;
  --entry-case-bg: #ebf2e8;
  --entry-photo-mat: #cbdcc6;
  --entry-report-bg: #163f35;
}
body:has(.entry-page) footer .shell, .entry-wrap { width: var(--entry-width); margin-inline: auto; }
body:has(.entry-page) footer { background: var(--entry-paper); }
#app:has(.entry-page) { width: 100%; padding: 0; }
.entry-page { background: var(--entry-paper); }
.entry-hero-band { background: var(--entry-hero-bg); }
.entry-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.23fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5.7vw, 90px);
  padding-block: clamp(44px, 5.3vw, 82px) clamp(46px, 5.5vw, 86px);
}
.entry-hero h1 {
  display: grid;
  justify-items: start;
  font-size: clamp(42px, 6.55vw, 98px);
  line-height: 1.07;
  letter-spacing: -.065em;
  font-weight: 800;
}
.entry-hero h1 span:first-child { font-size: .71em; color: var(--text); margin-bottom: .10em; }
.entry-hero h1 span:last-child { color: var(--accent); }
.entry-promise { margin-top: clamp(20px, 2.4vw, 32px); display: grid; gap: 14px; }
.entry-promise-lead { font-size: clamp(1.06rem, 1.65vw, 1.32rem); color: var(--muted); line-height: 1.55; }
.entry-loop-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
}
.entry-loop-pills li {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--text);
  font-size: clamp(.9rem, 1.15vw, 1.02rem);
  font-weight: 680;
}
.entry-promise-result { font-size: clamp(1.12rem, 1.9vw, 1.48rem); line-height: 1.55; color: var(--text); }
.entry-promise-result strong { color: var(--accent); font-weight: 760; }
.entry-fit {
  margin-top: clamp(22px, 2.5vw, 34px);
  padding: 16px 20px;
  border-inline-start: 4px solid var(--accent);
  border-radius: 0 14px 14px 0;
  background: var(--accent-soft);
  display: grid;
  gap: 8px;
}
.entry-fit h2 { color: var(--accent); font-size: 1.02rem; font-weight: 760; letter-spacing: 0; }
.entry-fit ul { display: grid; gap: 6px; padding: 0; list-style: none; }
.entry-fit li {
  position: relative;
  padding-inline-start: 18px;
  color: var(--text);
  font-size: clamp(1rem, 1.42vw, 1.18rem);
  font-weight: 600;
  line-height: 1.55;
}
.entry-fit li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 800;
}
.entry-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-top: clamp(24px, 2.7vw, 36px); }
.entry-actions .btn {
  gap: 14px;
  min-height: 60px;
  padding-inline: 34px;
  border-radius: 99px;
  font-size: 1.12rem;
  font-weight: 760;
}
.entry-actions .btn.primary { box-shadow: 0 12px 30px var(--accent-glow); }
.entry-actions .btn:hover { background: var(--accent2); border-color: var(--accent2); }
.entry-actions p { color: var(--muted); font-size: .95rem; }
.entry-person { position: relative; isolation: isolate; min-width: 0; padding-inline: 3% 1%; }
.entry-person::before {
  position: absolute;
  z-index: -1;
  content: '';
  inset: 4% 0 25% 2%;
  transform: rotate(6deg);
  border-radius: 48% 48% 21px 21px / 38% 38% 21px 21px;
  background: var(--entry-photo-mat);
  pointer-events: none;
}
.entry-person img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.25;
  object-fit: cover;
  object-position: 52% 39%;
  border-radius: 48% 48% 21px 21px / 38% 38% 21px 21px;
}
.entry-person-profile {
  position: relative;
  width: min(100% - 14px, 510px);
  margin: -26px auto 0;
  padding: 22px clamp(18px, 2.4vw, 28px) 24px;
  border: 1px solid var(--accent-border);
  border-top: 3px solid var(--accent);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.entry-person-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.entry-person-profile h2 { font-size: clamp(1.38rem, 2.1vw, 1.72rem); margin: 0; }
.person-mbti {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 760;
  letter-spacing: .06em;
}
.entry-person-profile ul {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 10px;
  padding: 0;
  list-style: none;
  font-size: .92rem;
  line-height: 1.45;
}
.entry-person-profile li {
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--surface-inset);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
}
.entry-person-purpose { border-top: 1px solid var(--border2); padding-top: 12px; margin-top: 14px; }
.entry-person-purpose h3 { color: var(--accent); font-size: .9rem; font-weight: 740; margin-bottom: 5px; }
.entry-person-purpose p { font-size: .96rem; color: var(--text); line-height: 1.65; }

.entry-problems { padding-block: clamp(52px, 6.5vw, 96px); }
.entry-section-head p { color: var(--muted); font-size: clamp(1rem, 1.35vw, 1.14rem); margin-top: 12px; max-width: 58ch; }
.entry-page :is(.entry-problems, .entry-contents, .entry-cases) h2 {
  font-size: clamp(30px, 4.15vw, 54px);
  line-height: 1.15;
  letter-spacing: -.05em;
}
.entry-problem-rows {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 24px);
  margin-top: clamp(24px, 3vw, 40px);
  padding: 0;
  list-style: none;
}
.entry-problem-rows > li {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(20px, 2.2vw, 28px);
  border: 1px solid var(--border2);
  border-top: 3px solid var(--accent-border);
  border-radius: 16px;
  background: var(--surface);
}
.entry-problem-rows > li:nth-child(n+4) { grid-column: span 3; }
.entry-problem-rows .problem-tag { color: var(--accent); font-size: .9rem; font-weight: 760; letter-spacing: .02em; }
.entry-problem-rows strong { color: var(--text); font-weight: 720; font-size: clamp(1.04rem, 1.35vw, 1.18rem); line-height: 1.6; text-wrap: pretty; }

.entry-contents { color: var(--entry-report-text); background: var(--entry-report-bg); padding-block: clamp(50px, 6vw, 90px); }
.entry-contents dl { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: clamp(16px, 2.2vw, 26px); margin-top: clamp(26px, 3.2vw, 42px); }
.entry-contents dl > div {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--entry-report-rule);
  border-radius: 18px;
  padding: clamp(22px, 2.5vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.content-step {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 760;
  color: #7AF2D8;
  line-height: 1;
}
.entry-contents dt { color: var(--entry-report-text); font-size: clamp(1.14rem, 1.8vw, 1.38rem); font-weight: 760; line-height: 1.38; margin: 4px 0 2px; text-wrap: balance; }
.entry-contents dd { color: var(--entry-report-muted); font-size: .98rem; line-height: 1.72; margin: 0; }

.entry-cases { background: var(--entry-case-bg); padding-block: clamp(52px, 6.4vw, 94px); }
.entry-cases-heading { margin-bottom: clamp(24px, 2.8vw, 38px); }
.entry-cases-heading p { color: var(--muted); margin-top: 10px; font-size: 1rem; }
.entry-cases-actions { justify-content: center; margin-top: clamp(28px, 3.6vw, 50px); }
.entry-cases-actions .btn { min-height: 62px; padding-inline: 40px; font-size: 1.16rem; }
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.case-grid > li { min-width: 0; }
.case-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 18px;
  padding: clamp(20px, 2.4vw, 30px);
}
.case-byline { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; font-size: .9rem; }
.case-byline strong { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.case-byline em { font-style: normal; font-weight: 500; color: var(--muted); font-size: .86rem; }
.case-byline span {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: .82rem;
  font-weight: 720;
}
.case-quote {
  margin: 0;
  padding: 12px 16px;
  border-inline-start: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: var(--surface-inset);
  color: var(--text);
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  font-weight: 650;
  line-height: 1.6;
}
.case-facts { display: grid; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.case-facts > div { display: grid; gap: 3px; }
.case-facts dt { color: var(--accent); font-size: .85rem; font-weight: 750; }
.case-facts dd { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.66; }

@media (max-width: 960px) {
  .entry-problem-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entry-problem-rows > li, .entry-problem-rows > li:nth-child(n+4) { grid-column: auto; }
}
@media (max-width: 820px) {
  .case-grid { grid-template-columns: minmax(0, 1fr); }
  .path-list > li { grid-template-columns: minmax(0, 1fr); }
  .path-links { padding-inline-start: 0; padding-top: 12px; border-inline-start: 0; border-top: 1px solid var(--border); }
  .diagnostic-charts, .report-ai-overview { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 740px) {
  .entry-hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 28px 36px; }
  .entry-hero h1 { font-size: clamp(38px, 9.5vw, 58px); }
  .entry-promise { margin-top: 16px; gap: 11px; }
  .entry-promise-lead { font-size: .98rem; }
  .entry-loop-pills { gap: 6px; }
  .entry-loop-pills li { padding: 5px 11px; font-size: .86rem; }
  .entry-promise-result { font-size: 1.06rem; }
  .entry-fit { margin-top: 18px; padding: 13px 15px; }
  .entry-fit li { font-size: .96rem; }
  .entry-person { width: min(100%, 440px); justify-self: center; padding-inline: 0; }
  .entry-problem-rows { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .entry-contents dl { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .entry-cases-heading { align-items: start; flex-wrap: wrap; }
  .stage-cards { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .execution-flow {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .execution-flow > li { flex: 0 0 132px; scroll-snap-align: start; }
  .execution-flow > li:not(:last-child)::after { right: -16px; display: block; }
}
@media (max-width: 530px) {
  .entry-hero h1 { font-size: clamp(34px, 9.6vw, 44px); }
  .entry-actions { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 20px; }
  .entry-actions .btn, .entry-cases-actions .btn { width: 100%; min-height: 54px; padding-inline: 20px; font-size: 1.05rem; }
  .entry-actions p { text-align: center; font-size: .88rem; }
  .entry-person-profile { width: calc(100% - 8px); margin-top: -18px; padding: 18px 16px 20px; }
  .entry-person-profile ul { gap: 6px; font-size: .84rem; }
  .entry-person-purpose p { font-size: .9rem; }
  .entry-person img { aspect-ratio: 1.35; }
  .entry-problems, .entry-contents, .entry-cases { padding-block: 38px; }
  .entry-page :is(.entry-problems, .entry-contents, .entry-cases) h2 { font-size: clamp(26px, 7.2vw, 34px); }
  .entry-problem-rows > li, .entry-contents dl > div, .case-card { padding: 18px 16px; border-radius: 14px; }
  .case-quote { padding: 10px 12px; font-size: .96rem; }
  .stage-field-group { padding: 13px 12px; border-radius: 14px; gap: 11px; }
  .stage-group-head { gap: 10px; align-items: flex-start; }
  .stage-group-num { width: 30px; height: 30px; font-size: .82rem; }
  .stage-group-head h2 { font-size: 1.04rem; }
  .stage-group-head p { font-size: .82rem; }
  .report { gap: 16px; }
  .report .summary { padding: 20px 16px; border-radius: 16px; gap: 18px; }
  .summary .summary-conclusion { font-size: clamp(22px, 6.4vw, 30px); }
  .report-contents {
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 2px;
  }
  .report-contents::-webkit-scrollbar { display: none; }
  .report-contents a { flex-shrink: 0; padding-inline: 10px; font-size: .84rem; }
  .stage-cards li, .stage-cards li[aria-current='step'] { padding: 13px 14px; }
  .stage-card-heading strong { font-size: 1.08rem; }
  .stage-card-heading span { font-size: .74rem; padding: 2px 7px; }
  .stage-cards h4 { font-size: .96rem; }
  .stage-card-desc { font-size: .86rem; }
  .report-path { padding: 16px 14px; }
  .path-list > li { padding: 16px 14px; gap: 12px; }
  .path-detail p, .path-score p { font-size: .92rem; line-height: 1.66; }
  .path-links .summary-rows > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .report-ai-overview > div { padding: 14px 15px; }
  .ai-verdict-headline { font-size: 1.08rem; }
  .voyage-intro .btn { width: 100%; }
  .report-actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .report-actions .btn { width: 100%; min-height: 48px; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.survey .form-intro { max-width: 57ch; }
#quiz .option:hover { border-color: var(--accent-border); }
#quiz .option:focus-within, #quiz .option:has(input:checked) { border-color: var(--accent); }
#quiz [data-field]:has([aria-invalid="true"]) :is(legend,.field-title) { color: var(--danger); }
#quiz .control[aria-invalid="true"] { border-color: var(--danger); }
#quiz :is([data-field], input, textarea) { scroll-margin-block-end: 98px; }
.form-advance {
  position: sticky;
  z-index: 2;
  bottom: 0;
  padding: 8px 0 max(8px,env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--border2);
  margin-top: 20px;
}
.form-advance .form-foot { margin-top: 0; }
.form-advance .form-message { margin: 0 0 8px; font-size: .9rem; }
.question-progress { margin-inline-start: auto; color: var(--muted); font-size: .82rem; }
.question-progress:empty { display: none; }
.form-advance .primary { margin-inline-start: 0; }
.question-progress:empty + .primary { margin-inline-start: auto; }
.profile-fields {
  border: 1px solid var(--border2);
  border-radius: 12px;
  background: var(--surface);
}
.profile-fields summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
  padding: 10px clamp(14px,3vw,22px);
  color: var(--text);
  list-style: none;
}
.profile-fields summary::-webkit-details-marker { display: none; }
.profile-fields summary::after { content: '＋'; color: var(--accent); font-size: 1.2rem; }
.profile-fields[open] summary::after { content: '−'; }
.profile-fields:not([open]) .when-open, .profile-fields[open] .when-closed { display: none; }
.profile-fields #question-fields { padding: 0 clamp(10px,2vw,18px) 12px; }

.confirm-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.confirm-heading h2 { font-size: clamp(17px,3vw,21px); }
.review-edit {
  min-height: 44px;
  min-width: 48px;
  padding: 5px 8px;
  background: transparent;
  border: 0;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.report-contents {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 7px;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--border2);
  border-radius: 10px;
  background: var(--surface);
}
.report-contents a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 10px;
  color: var(--text);
  font-size: .88rem;
  font-weight: 680;
  text-decoration: none;
}
.report-contents a:hover, .score-link:hover { color: var(--accent); text-decoration: underline; }
.report [id] { scroll-margin-top: 16px; }
.report .stage-reading { margin-top: 12px; }
.score-link { color: var(--text); text-decoration: none; }
.score-link span { color: var(--accent); font-size: .82em; }
@media (max-width: 530px) {
  .survey .form-foot .btn { padding-inline: 12px; }
  .question-progress { font-size: .74rem; }
  .report-contents {
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 2px;
  }
  .report-contents::-webkit-scrollbar { display: none; }
  .report-contents a { flex-shrink: 0; padding-inline: 10px; font-size: .84rem; }
}
