/* SME Clinic — 月結單初步分析網站樣式
   品牌色值：由用戶提供的公司 Logo 取樣（青綠 #119aa3、深藍 #13294b）。如品牌檔另有準確色值，請在此替換。 */
:root {
  --brand: #119aa3;
  --brand-strong: #0e7f87;
  --brand-soft: #e3f4f5;
  --brand-ink: #0b5f66;
  --navy: #13294b;
  --ink: #13294b;
  --ink-2: #4b5563;
  --ink-3: #6b7280;
  --surface: #ffffff;
  --surface-2: #f5f7f9;
  --surface-3: #eceff3;
  --border: #e3e7ec;
  --border-strong: #c9d0d8;
  --ok: #1b7f4a;
  --ok-soft: #e4f4ea;
  --warn: #9a6400;
  --warn-soft: #fff4d6;
  --err: #b42318;
  --err-soft: #fde8e6;
  --info: #1d4ed8;
  --info-soft: #e8efff;
  --chart-line: #119aa3;
  --chart-low: #b42318;
  --grid: #e3e7ec;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 16px rgba(16, 24, 40, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "PingFang HK", "PingFang TC", "Hiragino Sans", "Noto Sans HK", "Noto Sans TC", "Microsoft JhengHei", "Segoe UI", Roboto, sans-serif;
  --max: 1120px;
  --nav-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html:focus-within { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--brand-strong); text-underline-offset: 3px; }
a:hover { color: var(--brand-ink); }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin-bottom: 0.35em; }
strong { font-weight: 700; }
small, .small { font-size: 0.9rem; }
.muted { color: var(--ink-3); }
.ink2 { color: var(--ink-2); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip-link:focus { top: 8px; }
:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.section { padding: 56px 0; }
.section--tight { padding: 36px 0; }
.section--alt { background: var(--surface-2); }
.section-head { max-width: 720px; margin-bottom: 28px; }
.section-head p { color: var(--ink-2); }
.eyebrow { display: inline-block; font-size: 0.85rem; font-weight: 600; color: var(--brand-ink); background: var(--brand-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 14px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 10px;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-strong); color: #fff; }
.btn--secondary { background: var(--surface); color: var(--brand-ink); border-color: var(--border-strong); }
.btn--secondary:hover { border-color: var(--brand); background: var(--brand-soft); }
.btn--ghost { background: transparent; color: var(--brand-ink); }
.btn--ghost:hover { background: var(--brand-soft); }
.btn--danger { background: var(--surface); color: var(--err); border-color: var(--border-strong); }
.btn--danger:hover { background: var(--err-soft); border-color: var(--err); }
.btn--sm { min-height: 44px; padding: 8px 14px; font-size: 0.95rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-strong); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: var(--nav-h); gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.logo__mark { width: 42px; height: 42px; flex: none; object-fit: contain; }
.logo__img { height: 44px; width: auto; display: block; }
.site-footer .logo__img { height: 40px; }
.logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.logo__name { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.logo__tag { font-size: 0.72rem; letter-spacing: 0.18em; color: var(--navy); font-weight: 500; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--brand-ink); background: var(--brand-soft); }
.nav .btn { margin-left: 8px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border-strong); border-radius: 8px; width: 44px; height: 44px; font-size: 1.2rem; cursor: pointer; }
@media (max-width: 820px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .nav { position: absolute; left: 0; right: 0; top: var(--nav-h); background: #fff; border-bottom: 1px solid var(--border); flex-direction: column; align-items: stretch; padding: 12px 16px 16px; display: none; }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px; }
  .nav .btn { margin: 8px 0 0; }
  .header-actions { display: flex; gap: 8px; align-items: center; }
}
@media (min-width: 821px) { .header-actions .btn--mobile-upload { display: none; } }
@media (max-width: 820px) { .header-actions .btn--mobile-upload { display: inline-flex; } }

/* Hero — 依用戶提供的橫額圖版式：左方文字，右方相片（assets/hero-photo.jpg，由橫額圖右半裁出） */
.hero { position: relative; overflow: hidden; background: var(--surface); }
.hero__bg { position: absolute; top: 0; bottom: 0; right: 0; width: 50%; background: linear-gradient(135deg, #f2f8f7 0%, #dcefec 100%); background-image: url("../assets/hero-photo.jpg"); background-size: cover; background-position: center 25%; }
.hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #fff 0%, rgba(255,255,255,0) 38%); }
.hero .container { position: relative; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 560px) 1fr; gap: 40px; align-items: center; min-height: 560px; padding-block: 56px; }
.hero h1 { margin-bottom: 12px; color: var(--navy); font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 900; }
.hero h1 .hero__h1-sub { display: block; color: var(--brand); font-size: 0.68em; font-weight: 800; margin-top: 6px; }
.hero__sub { font-size: 1.12rem; color: var(--ink-2); max-width: 520px; }
.hero__note { margin-top: 14px; color: var(--ink-2); font-size: 0.95rem; }
.hero__scope { margin-top: 10px; color: var(--ink-3); font-size: 0.9rem; }
.hero__photo { display: none; }
@media (max-width: 900px) {
  .hero__bg { display: none; }
  .hero__grid { grid-template-columns: 1fr; gap: 20px; min-height: 0; padding-block: 32px 0; }
  .hero__photo { display: block; margin: 8px -16px 0; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #f2f8f7 0%, #dcefec 100%); background-image: url("../assets/hero-photo.jpg"); background-size: cover; background-position: center 20%; }
}

/* Report preview card (hero visual) */
.preview { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 18px; }
.preview__tag { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 600; color: var(--warn); background: var(--warn-soft); padding: 3px 10px; border-radius: 999px; margin-bottom: 12px; }
.preview__title { font-weight: 700; margin-bottom: 4px; }
.preview__meta { font-size: 0.85rem; color: var(--ink-3); margin-bottom: 14px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.kpi__label { font-size: 0.8rem; color: var(--ink-3); }
.kpi__value { font-weight: 700; font-size: 1.05rem; }
.preview__chart { border-top: 1px solid var(--border); padding-top: 10px; }
.preview__chart-title { font-size: 0.85rem; color: var(--ink-2); margin-bottom: 4px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-2); margin-bottom: 0; }
.card__icon { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-strong); display: grid; place-items: center; margin-bottom: 14px; font-size: 1.2rem; }
@media (max-width: 820px) { .cards { grid-template-columns: 1fr; } }

/* About block */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; }
.company-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.company-box dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; }
.company-box dt { color: var(--ink-3); font-size: 0.9rem; }
.company-box dd { margin: 0; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }

/* Data handling list */
.handling { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.handling__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.handling__item h3 { font-size: 1.02rem; margin-bottom: 6px; }
.handling__item p { color: var(--ink-2); margin-bottom: 0; }
@media (max-width: 820px) { .handling { grid-template-columns: 1fr; } }

/* Pending (待核實) marker — 上線前必須以核實資料取代 */
.pending { display: inline-block; border: 1px dashed var(--warn); color: var(--warn); background: var(--warn-soft); padding: 0 6px; border-radius: 4px; font-size: 0.92em; }

/* Notices */
.notice { display: flex; gap: 12px; align-items: flex-start; border-radius: 10px; padding: 12px 14px; border: 1px solid var(--border); background: var(--surface-2); }
.notice__icon { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 0.85rem; font-weight: 700; }
.notice--info { background: var(--info-soft); border-color: #c7d7fb; }
.notice--info .notice__icon { background: var(--info); color: #fff; }
.notice--warn { background: var(--warn-soft); border-color: #f1dca0; }
.notice--warn .notice__icon { background: var(--warn); color: #fff; }
.notice--err { background: var(--err-soft); border-color: #f3b8b3; }
.notice--err .notice__icon { background: var(--err); color: #fff; }
.notice--ok { background: var(--ok-soft); border-color: #b7e0c6; }
.notice--ok .notice__icon { background: var(--ok); color: #fff; }
.notice p { margin: 0; }
.demo-banner { position: sticky; top: var(--nav-h); z-index: 40; background: var(--warn-soft); border-bottom: 1px solid #f1dca0; color: #5a3b00; font-weight: 600; text-align: center; padding: 10px 16px; font-size: 0.95rem; }

/* Upload */
.upload-wrap { max-width: 720px; }
.dropzone { border: 2px dashed var(--border-strong); border-radius: 14px; background: var(--surface); padding: 32px 20px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-drag { border-color: var(--brand); background: var(--brand-soft); }
.dropzone__icon { font-size: 1.8rem; margin-bottom: 8px; }
.dropzone__main { font-weight: 600; font-size: 1.05rem; margin-bottom: 4px; }
.dropzone__help { color: var(--ink-3); font-size: 0.92rem; margin: 0; }
.file-row { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--surface); flex-wrap: wrap; }
.file-row__icon { width: 40px; height: 40px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-strong); display: grid; place-items: center; font-weight: 700; font-size: 0.8rem; flex: none; }
.file-row__meta { flex: 1 1 200px; min-width: 0; }
.file-row__name { font-weight: 600; overflow-wrap: anywhere; }
.file-row__size { color: var(--ink-3); font-size: 0.9rem; }
.file-row__actions { display: flex; gap: 8px; }
.consent { display: flex; gap: 12px; align-items: flex-start; margin: 20px 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.consent input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
.consent label { cursor: pointer; }
.upload-foot { color: var(--ink-3); font-size: 0.92rem; margin-top: 12px; }
.hidden { display: none !important; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--border); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--ink-3); flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq .faq__body { padding: 0 0 16px; color: var(--ink-2); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface-2); padding: 40px 0 32px; margin-top: 40px; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--brand-ink); text-decoration: underline; }
.footer-scope { border-top: 1px solid var(--border); margin-top: 24px; padding-top: 16px; color: var(--ink-3); font-size: 0.9rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; } }

/* Sticky mobile CTA */
.sticky-cta { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--border); }
@media (max-width: 820px) { .sticky-cta { display: block; } .sticky-cta.is-hidden { display: none; } body.has-sticky { padding-bottom: 72px; } }

/* Status page */
.status-wrap { max-width: 680px; margin: 0 auto; }
.status-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.steps { list-style: none; padding: 0; margin: 20px 0; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.steps li:last-child { border-bottom: 0; }
.step__icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 0.85rem; font-weight: 700; flex: none; background: var(--surface-3); color: var(--ink-3); }
.step--active .step__icon { background: var(--info); color: #fff; }
.step--done .step__icon { background: var(--ok); color: #fff; }
.step--error .step__icon { background: var(--err); color: #fff; }
.step__label { font-weight: 600; }
.step__state { margin-left: auto; color: var(--ink-3); font-size: 0.9rem; }
.spinner { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } html { scroll-behavior: auto; } }
.file-meta-line { color: var(--ink-3); font-size: 0.92rem; }

/* Report */
.report-head { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; }
.report-meta { display: grid; grid-template-columns: repeat(4, auto); gap: 8px 24px; margin-top: 12px; }
.report-meta div { font-size: 0.92rem; }
.report-meta dt { color: var(--ink-3); font-size: 0.82rem; }
.report-meta dd { margin: 0; font-weight: 600; }
@media (max-width: 820px) { .report-head { grid-template-columns: 1fr; } .report-meta { grid-template-columns: 1fr 1fr; } }
.report-section { padding: 28px 0; border-top: 1px solid var(--border); }
.report-section:first-of-type { border-top: 0; }
.report-section h2 { font-size: 1.3rem; }
.summary-line { font-size: 1.15rem; background: var(--brand-soft); border-left: 4px solid var(--brand); padding: 16px 18px; border-radius: 0 10px 10px 0; }
.summary-line p { margin: 0; }
.kpi-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.stat__label { font-size: 0.85rem; color: var(--ink-3); margin-bottom: 2px; }
.stat__value { font-size: 1.35rem; font-weight: 700; }
.stat--net .stat__value { color: var(--ink); }
@media (max-width: 900px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } .kpi-row .stat:last-child { grid-column: span 2; } }
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.chart-card__title { font-weight: 600; margin-bottom: 2px; }
.chart-card__sub { color: var(--ink-3); font-size: 0.9rem; margin-bottom: 8px; }
.chart { position: relative; width: 100%; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; padding: 6px 10px; border-radius: 6px; font-size: 0.85rem; white-space: nowrap; transform: translate(-50%, -110%); display: none; }
.chart .tip strong { display: block; font-size: 1rem; }
.chart-foot { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 10px; color: var(--ink-2); font-size: 0.92rem; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-weight: 600; color: var(--ink-2); font-size: 0.88rem; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tag { display: inline-block; font-size: 0.8rem; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.tag--confirm { background: var(--warn-soft); color: #5a3b00; }
.tag--in { background: var(--ok-soft); color: var(--ok); }
.tag--out { background: var(--surface-3); }
.tx-list { display: none; }
@media (max-width: 640px) {
  .table-wrap.tx-table { display: none; }
  .tx-list { display: block; }
  .tx-item { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: var(--surface); }
  .tx-item__top { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
  .tx-item__amt { white-space: nowrap; font-variant-numeric: tabular-nums; }
  .tx-item__meta { color: var(--ink-3); font-size: 0.88rem; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px 12px; }
}

/* Question cards (initial + full report shared) */
.qcards { display: grid; gap: 16px; }
.qcard { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px; }
.qcard__cat { font-size: 0.8rem; color: var(--ink-3); margin-bottom: 4px; }
.qcard h3 { font-size: 1.12rem; margin-bottom: 8px; }
.qcard__block { margin-bottom: 10px; }
.qcard__label { font-size: 0.85rem; font-weight: 600; color: var(--ink-3); margin-bottom: 2px; }
.qcard__block p { margin: 0; color: var(--ink-2); }
.qcard__evidence { list-style: none; padding: 0; margin: 0; font-size: 0.92rem; }
.qcard__evidence li { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 6px 10px; background: var(--surface-2); border-radius: 8px; margin-bottom: 6px; }
.qcard__evidence .amt { font-variant-numeric: tabular-nums; font-weight: 600; }
.qcard__evidence .page { color: var(--ink-3); }
.qcard__cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; }
.qcard__cta p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }

.next-block { background: var(--brand-soft); border: 1px solid #c7e1d9; border-radius: 16px; padding: 26px 28px; }
.next-block h2 { font-size: 1.35rem; }
.next-block p { color: var(--ink-2); }
.advisor-block { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 26px 28px; text-align: center; }
.advisor-block h2 { font-size: 1.3rem; }
.report-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(16,24,40,.55); }
.modal.is-open { display: flex; }
.modal__box { background: var(--surface); border-radius: 16px; width: 100%; max-width: 520px; padding: 24px; box-shadow: var(--shadow); max-height: calc(100vh - 32px); overflow: auto; }
.modal__box h2 { font-size: 1.25rem; margin-bottom: 6px; }
.modal__cat { display: inline-block; font-size: 0.85rem; background: var(--surface-3); border-radius: 999px; padding: 3px 10px; margin-bottom: 12px; }
.modal textarea { width: 100%; min-height: 110px; font: inherit; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; resize: vertical; }
.modal__foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.modal__note { font-size: 0.88rem; color: var(--ink-3); margin: 10px 0 0; }

/* Prose pages */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; font-size: 1.35rem; }
.prose h3 { margin-top: 1.2em; }
.prose table { font-size: 0.95rem; }
.toc { background: var(--surface-2); border-radius: 12px; padding: 14px 18px; margin-bottom: 24px; }
.toc ol { margin: 0; }

/* Checklist (intake) */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.checklist li:last-child { border-bottom: 0; }
.checklist .chk { width: 24px; height: 24px; border-radius: 6px; border: 2px solid var(--border-strong); display: grid; place-items: center; font-size: 0.8rem; color: var(--ok); }
.checklist .chk.is-on { border-color: var(--ok); background: var(--ok-soft); }
.checklist .req { font-size: 0.8rem; color: var(--ink-3); }

/* Analysis grid (full report) */
.analysis-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.analysis-item { border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; background: var(--surface); }
.analysis-item h3 { font-size: 1.02rem; margin-bottom: 6px; }
.analysis-item p { margin: 0 0 6px; color: var(--ink-2); font-size: 0.95rem; }
.analysis-item--missing { border-style: dashed; background: var(--surface-2); }
@media (max-width: 760px) { .analysis-grid { grid-template-columns: 1fr; } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 0.95rem; z-index: 90; display: none; }
.toast.is-open { display: block; }

/* Print — 下載摘要版型 */
@media print {
  .site-header, .site-footer, .sticky-cta, .no-print, .modal, .toast, .demo-banner.no-print { display: none !important; }
  body { font-size: 12pt; color: #000; }
  .report-section { break-inside: avoid; padding: 14px 0; }
  .qcard, .stat, .chart-card { border-color: #999; break-inside: avoid; }
  .kpi-row { grid-template-columns: repeat(5, 1fr); }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #555; }
  .print-only { display: block !important; }
}
.print-only { display: none; }

/* 區 C：報告預覽 + 三張卡片 */
.preview-row { display: grid; grid-template-columns: minmax(0, 460px) 1fr; gap: 24px; align-items: start; }
.cards--stack { grid-template-columns: 1fr; gap: 14px; }
@media (max-width: 900px) { .preview-row { grid-template-columns: 1fr; } }
.kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi__value { overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .kpis { grid-template-columns: 1fr; gap: 6px; }
  .kpi { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
}

/* Hero 後備：assets/hero-banner.jpg 未放置時，右方顯示品牌色底區塊 */
@media (min-width: 901px) {
  .hero--fallback .hero__bg { display: none; }
  .hero--fallback .hero__photo { display: block; aspect-ratio: 4 / 3; border-radius: 20px; background: linear-gradient(135deg, #f2f8f7 0%, #d5ecee 100%); }
}
