/* 即时可知 — static styles for the admission care prototype. */

:root {
  --bg: #f3f0e8;
  --surface: #ffffff;
  --ink: #1a2420;
  --line: #c9d5ce;
  --pine: #143d32;
  --pine-deep: #0c2b23;
  --mint: #e5f2eb;
  --clay: #8c2f1f;
  --clay-bg: #fff3ec;
  --focus: #8c2f1f;
  --radius: 18px;
  --shadow: 0 10px 28px rgba(20, 61, 50, 0.06);
  color-scheme: light;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { font-size: 100%; }

html[data-font="lg"] { font-size: 118%; }

html[data-font="xl"] { font-size: 136%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei",
    "Source Han Sans SC", "WenQuanYi Micro Hei", "Droid Sans Fallback", sans-serif;
  font-size: 1.25rem;
  line-height: 1.65;
  line-break: strict;
  color: var(--ink);
  background: var(--bg);
}

main { flex: 1; width: 100%; }

h1, h2, h3, p { overflow-wrap: anywhere; }

h1, h2, h3 { line-height: 1.3; font-weight: 800; }

h1 { font-size: clamp(1.85rem, 4vw, 2.55rem); margin: 0 0 12px; }

h2 { font-size: 1.55rem; margin: 0 0 12px; }

h3 { font-size: 1.28rem; margin: 0 0 12px; }

p { margin: 0 0 12px; }

a {
  color: var(--pine-deep);
  text-underline-offset: 3px;
}

a:hover { text-decoration-thickness: 3px; }

:focus {
  outline: 3px solid transparent;
  outline-offset: 3px;
}

:focus-visible {
  outline-color: var(--focus);
}

@supports not selector(:focus-visible) {
  :focus { outline-color: var(--focus); }
}

.skip {
  position: absolute;
  left: 12px;
  top: 12px;
  transform: translateY(-160%);
  background: #fff;
  color: var(--ink);
  padding: 12px 16px;
  z-index: 30;
  border-radius: 12px;
  border: 2px solid var(--pine);
  font-weight: 700;
  text-decoration: none;
}

.skip:focus { transform: none; }

.wrap {
  width: min(760px, calc(100% - 32px));
  margin-inline: auto;
}

.wrap-wide {
  width: min(980px, calc(100% - 32px));
}

.site-header {
  background: var(--surface);
  border-bottom: 2px solid var(--line);
}

.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  min-height: 48px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--pine);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.35rem;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }

.brand-name { font-weight: 800; font-size: 1.25rem; }

.brand-sub { font-size: 0.95rem; font-weight: 600; }

.font-switch {
  display: inline-flex;
  align-items: stretch;
  border: 2px solid var(--pine);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.font-label {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-weight: 800;
  background: var(--mint);
  border-right: 2px solid var(--pine);
}

.font-switch button {
  min-height: 48px;
  min-width: 52px;
  padding: 8px 12px;
  border: 0;
  border-right: 2px solid var(--pine);
  background: #fff;
  color: var(--pine);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.font-switch button:last-child { border-right: 0; }

.font-switch button[aria-pressed="true"] {
  background: var(--pine);
  color: #fff;
}

.font-switch button:hover { background: var(--mint); }

.font-switch button[aria-pressed="true"]:hover { background: var(--pine-deep); }

.nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 0 14px;
}

.nav-row a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--pine);
  font-weight: 800;
  border: 2px solid transparent;
}

.nav-row a:hover { background: var(--mint); }

.nav-row a[aria-current="page"] {
  background: var(--pine);
  color: #fff;
}

.nav-row a[aria-current="page"]:hover { background: var(--pine-deep); }

.nav-badge {
  border: 2px solid currentColor;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 0.85em;
  line-height: 1.5;
}

.page { padding: 22px 0 36px; }

.card, .phrase, .topic {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card, .topic { padding: 20px 18px; margin: 0 0 16px; }

.lead { font-size: 1.2rem; }

.cta-list, .stack { display: grid; gap: 12px; }

.cta {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--pine);
  border-radius: 18px;
  padding: 16px;
  min-height: 92px;
}

.cta:hover { background: var(--mint); }

.cta-primary { background: var(--pine); color: #fff; }

.cta-primary:hover { background: var(--pine-deep); color: #fff; }

.cta-title { display: block; font-size: 1.4rem; font-weight: 800; }

.cta-desc {
  display: block;
  margin-top: 4px;
  font-weight: 600;
  font-size: 1.05rem;
}

.cta-primary .cta-desc { color: #f3faf6; }

.cta-text { flex: 1; }

.cta-go, .icon-bubble {
  flex: 0 0 auto;
}

.icon-bubble {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--mint);
  color: var(--pine);
}

.cta-primary .icon-bubble { background: rgba(255, 255, 255, 0.14); color: #fff; }

.icon-bubble svg { width: 36px; height: 36px; }

.cta-go {
  border: 2px solid currentColor;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 800;
  font-size: 1rem;
}

button, input, summary { font: inherit; color: inherit; }

.btn {
  appearance: none;
  border: 2px solid var(--pine);
  background: #fff;
  color: var(--pine-deep);
  font-weight: 800;
  min-height: 56px;
  padding: 12px 16px;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.3;
}

.btn:hover { background: var(--mint); }

.btn-primary { background: var(--pine); color: #fff; border-color: var(--pine); }

.btn-primary:hover { background: var(--pine-deep); }

.btn-urgent { background: var(--clay); color: #fff; border-color: var(--clay); }

.btn-urgent:hover { background: #6e2418; }

.btn:disabled {
  background: #e4ebe7;
  color: #243832;
  border-color: #b7c4bc;
  cursor: not-allowed;
}

.plain-list, .steps-ol { padding-left: 1.3em; }

.plain-list li, .steps-ol li { margin: 8px 0; }

.roadmap, .toc, .step-jump {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 12px 0 0;
}

.roadmap-steps,
.step-jump {
  display: grid;
  grid-template-columns: 1fr;
}

.roadmap-steps li,
.step-jump li { display: flex; }

.roadmap a, .toc a, .step-jump button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 2px solid var(--pine);
  background: #fff;
  color: var(--pine-deep);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.roadmap-steps a,
.step-jump button {
  width: 100%;
  border-radius: 14px;
  justify-content: flex-start;
  min-height: 56px;
}

.roadmap a:hover, .toc a:hover, .step-jump button:hover { background: var(--mint); }

.step-jump button[aria-current="step"] {
  background: var(--pine);
  color: #fff;
}

.step-jump button.is-understood { box-shadow: inset 0 0 0 2px var(--pine); }

.step-jump button[aria-current="step"].is-understood { box-shadow: none; }

.tick { display: none; }

.is-understood .tick { display: inline; }

.is-understood .tick::before { content: "✓"; }

.num {
  width: 1.6em;
  height: 1.6em;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--mint);
  color: var(--pine-deep);
  font-size: 0.95rem;
}

.roadmap a .num { background: var(--pine); color: #fff; }

.callout, .caution, .note, .status {
  border-radius: 14px;
  padding: 14px 16px;
  margin: 14px 0;
}

.callout {
  background: var(--mint);
  border-left: 6px solid var(--pine);
  font-weight: 800;
  font-size: 1.28rem;
}

.callout .label, .caution .label, .urgent-label {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.caution, .urgent-label, .phrase.is-urgent {
  background: var(--clay-bg);
}

.caution { border-left: 6px solid var(--clay); }

.note { background: #fff; border: 2px solid var(--line); }

.status { background: var(--mint); font-weight: 800; }

.progress-label { font-weight: 800; margin-bottom: 8px; }

.track {
  height: 14px;
  background: #e1ebe6;
  border-radius: 999px;
  border: 2px solid var(--pine);
  overflow: hidden;
}

#progress-fill {
  height: 100%;
  width: 20%;
  background: var(--pine);
}

.step-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.step-kicker .eyebrow { margin: 0; }

.action-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: #fff;
  border-top: 2px solid var(--line);
  box-shadow: 0 -8px 24px rgba(20, 40, 32, 0.08);
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 8px;
}

.bar-label {
  margin: 0 0 8px;
  font-weight: 800;
  text-align: center;
}

.page-intro { margin-bottom: 8px; }

.eyebrow { margin: 0 0 6px; font-weight: 800; color: var(--pine-deep); }

.intro-actions,
.help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.intro-actions .btn { flex: 1 1 220px; }

.fact-row,
.service-grid {
  list-style: none;
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 12px 0 16px;
}

#urgent { scroll-margin-top: 220px; }

.fact,
.service-card {
  background: #fff;
  border: 2px solid var(--pine);
  border-radius: 16px;
  color: var(--ink);
}

.fact { padding: 14px 16px; }

.fact strong,
.service-title {
  display: block;
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.3;
}

.service-grid li { display: flex; }

.service-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  min-height: 104px;
  padding: 14px 16px;
  text-decoration: none;
}

.service-card:hover { background: var(--mint); }

.service-kicker {
  font-weight: 800;
  color: var(--pine-deep);
  font-size: 0.95rem;
}

.service-desc { font-weight: 600; }

.help-strip {
  background: var(--pine);
  color: #f4faf7;
  border-radius: var(--radius);
  padding: 18px 16px;
  margin: 8px 0 16px;
}

.help-strip h2,
.help-strip p { color: #f4faf7; }

.help-strip a:not(.btn) { color: #fff; font-weight: 800; }

.help-strip .btn {
  background: #fff;
  color: var(--pine-deep);
  border-color: #fff;
}

.help-strip .btn:hover { background: var(--mint); }

.help-strip .btn-urgent {
  background: #fff6f3;
  color: #6e2418;
  border-color: #fff;
}

.help-strip .btn-urgent:hover { background: #ffe4db; }

.confirm-list {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.confirm-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 2px solid var(--line);
}

.confirm-list .num { flex: 0 0 auto; margin-top: 2px; }

.prep {
  margin-top: 16px;
  padding: 14px;
  border: 2px dashed var(--pine);
  border-radius: 16px;
  background: #fbfcfa;
}

.filter-bar {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--bg);
  padding: 10px 0 12px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.chip-row button {
  min-height: 48px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 2px solid var(--pine);
  background: #fff;
  color: var(--pine-deep);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.chip-row button:hover { background: var(--mint); }

.chip-row button[aria-pressed="true"] {
  background: var(--pine);
  color: #fff;
}

.chip-row button[aria-pressed="true"]:hover { background: var(--pine-deep); }

.phrase-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.phrase { padding: 16px; }

.phrase.is-urgent { border-color: var(--clay); }

.phrase.is-wide { grid-column: 1 / -1; }

.phrase .btn, .topic .btn, .fill-row .btn { width: 100%; }

.topic .form-actions .btn,
.topic .row-actions .btn,
.topic details .btn {
  width: auto;
  flex: 1 1 12rem;
}

label { display: block; font-weight: 800; margin: 8px 0; }

input[type="text"], input[type="tel"], select, textarea {
  width: 100%;
  min-height: 56px;
  padding: 10px 14px;
  border: 2px solid var(--pine);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}

textarea {
  min-height: 7.5rem;
  resize: vertical;
  line-height: 1.5;
}

::placeholder { color: #3d5148; opacity: 1; }

.hint { font-size: 1.05rem; }

#show-dialog {
  border: none;
  padding: 0;
  background: transparent;
  width: min(920px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
}

#show-dialog::backdrop { background: rgba(16, 28, 24, 0.78); }

#show-dialog .sheet {
  background: #fff;
  color: var(--ink);
  border-radius: 20px;
  border: 4px solid var(--pine);
  padding: 22px 18px 16px;
  max-height: calc(100vh - 28px);
  overflow: auto;
}

#show-dialog.is-urgent .sheet { border-color: var(--clay); }

#show-text {
  font-size: clamp(2rem, 7vw, 4.25rem);
  font-weight: 800;
  line-height: 1.35;
  margin: 8px 0 20px;
  user-select: text;
  white-space: pre-wrap;
}

#show-dialog.is-long #show-text {
  font-size: clamp(1.45rem, 4.2vw, 2.2rem);
}

.dialog-actions { display: grid; gap: 8px; }

.topic-head, .ai-hero {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.pill {
  display: inline-block;
  border: 2px solid var(--clay);
  color: var(--clay);
  background: var(--clay-bg);
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 800;
  font-size: 1rem;
}

.bedside-card {
  border: 4px solid var(--pine);
  border-radius: 18px;
  padding: 18px;
  background: #fff;
  margin: 12px 0;
}

.bedside-card .huge {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 8px;
}

.pre-card {
  white-space: pre-wrap;
  font-weight: 800;
  font-size: 1.15rem;
}

.status-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 12px 0 0;
}

.status-chip {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  min-width: 9.5rem;
  padding: 8px 14px;
  border: 2px solid var(--pine);
  border-radius: 14px;
  background: #fff;
}

.status-k { font-weight: 800; }

.status-v { font-weight: 800; }

.field-grid {
  display: grid;
  gap: 12px;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: grid;
  gap: 10px;
}

.check-row {
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.check-row.is-done {
  background: var(--mint);
  border-color: var(--pine);
}

.check-row label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  margin: 0;
  cursor: pointer;
}

.check-row input[type="checkbox"] {
  width: 1.75rem;
  height: 1.75rem;
  margin: 0;
  accent-color: var(--pine);
}

.check-title { font-weight: 800; overflow-wrap: anywhere; }

.check-state {
  font-weight: 800;
  color: var(--pine-deep);
  white-space: nowrap;
}

.check-cue {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 2px solid var(--line);
}

.form-actions, .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.mini-list { display: grid; gap: 10px; margin-top: 12px; }

.mini-item {
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.mini-item.is-done { background: var(--mint); border-color: var(--pine); }

.mini-item h3 { margin-bottom: 4px; }

details.note summary {
  font-weight: 800;
  min-height: 48px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

details.note .btn { width: 100%; margin-top: 8px; }

.dev-note {
  margin-top: 16px;
  border-top: 2px solid var(--line);
  padding-top: 8px;
}

code {
  font-family: ui-monospace, "Sarasa Mono SC", monospace;
  font-size: 0.95em;
}

.site-footer {
  background: var(--surface);
  border-top: 2px solid var(--line);
  padding: 20px 0 28px;
}

.site-footer p { margin-bottom: 8px; }

.fine-print { font-size: 1.05rem; }

.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;
}

html.wizard-ready:not(.show-all) #wizard [data-step]:not(.is-active),
html.wizard-ready:not(.show-all) #done:not(.is-active),
html.wizard-ready:not(.show-all) .step-move {
  display: none;
}

html.show-all #understood-status { display: none !important; }

#show-all { width: 100%; }

#restart { display: none; }

html.js #restart { display: inline-flex; }

section[id], .topic[id], h2[id], h2[tabindex="-1"] { scroll-margin-top: 16px; }

html.wizard-ready:not(.show-all) #wizard a,
html.wizard-ready:not(.show-all) #wizard button,
html.wizard-ready:not(.show-all) #wizard h2 {
  scroll-margin-bottom: 160px;
}

@media (min-width: 720px) {
  .phrase-list { grid-template-columns: 1fr 1fr; }
  .phrase.is-wide, .phrase.is-urgent { grid-column: 1 / -1; }
  .field-grid { grid-template-columns: 1fr 1fr; }
  .fact-row { grid-template-columns: repeat(3, 1fr); }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .service-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 899px) {
  .step-jump {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .step-jump li { flex: 0 0 auto; }

  .step-jump button {
    width: auto;
    border-radius: 999px;
    min-height: 48px;
  }
}

@media (min-width: 900px) {
  .roadmap-steps,
  .step-jump { grid-template-columns: repeat(5, minmax(0, 1fr)); }

  .step-jump button {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    min-height: 92px;
    padding: 10px 8px;
  }
}

@media (max-width: 640px) {
  .action-row { grid-template-columns: 1fr 1fr; }
  #got-it { grid-column: 1 / -1; order: -1; }
  .cta { align-items: flex-start; }
  .topic-head, .ai-hero { flex-direction: column; }
  .check-row label { grid-template-columns: auto 1fr; }
  .check-state { grid-column: 2; }
  .status-chip { flex: 1 1 100%; }
  .topic .form-actions .btn,
  .topic .row-actions .btn { flex-basis: 100%; }
  .intro-actions { flex-direction: column; }
  .intro-actions .btn { width: 100%; }
}

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

@media (prefers-contrast: more) {
  :root { --line: #143d32; --bg: #fff; }
  .card, .phrase, .topic, .cta, .btn, .check-row, .status-chip, .mini-item, .service-card, .fact, .help-strip { border-width: 3px; }
}

@media (forced-colors: active) {
  .btn, .cta, .phrase, .card, .topic, .nav-row a, .step-jump button,
  .check-row, .status-chip, .mini-item, .service-card, .chip-row button, .help-strip {
    border: 1px solid ButtonText;
  }
  .help-strip { background: Canvas; color: CanvasText; }
  .help-strip h2, .help-strip p, .help-strip a { color: CanvasText; }
}

@media print {
  .action-bar, .font-switch, .site-nav, .skip, .btn, .fine-print, #show-dialog {
    display: none !important;
  }
  body { background: #fff; display: block; }
  .card, .phrase, .topic { box-shadow: none; break-inside: avoid; }
  html.wizard-ready [data-step],
  html.wizard-ready #done { display: block !important; }
}
