:root {
  --ink: #1f2a44;
  --ink-soft: #4a5570;
  --paper: #f7f9fb;
  --surface: #ffffff;
  --sage: #2f6f5e;
  --sage-deep: #234f44;
  --sage-tint: #e3efe9;
  --line: #d7dee6;
  --caution: #9a4a0b;
  --caution-tint: #fbf1e6;
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: -apple-system, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", sans-serif;
  --measure: 40rem;
  --wide: 56rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.85;
  letter-spacing: 0.01em;
}

a { color: var(--sage); text-underline-offset: 0.2em; }
a:hover { color: var(--sage-deep); }
:focus-visible { outline: 3px solid var(--sage); outline-offset: 2px; border-radius: 2px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .5rem 1rem; z-index: 10; }

/* ---------- header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .bar {
  max-width: var(--wide); margin: 0 auto; padding: .9rem 1rem;
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
}
.wordmark { font-family: var(--serif); font-weight: 700; font-size: 1.5rem; color: var(--ink); text-decoration: none; letter-spacing: .08em; }
.wordmark small { font-family: var(--sans); font-weight: 400; font-size: .8rem; color: var(--ink-soft); letter-spacing: .02em; margin-left: .5rem; }
.header-tel { font-size: .95rem; color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.header-tel strong { color: var(--ink); font-weight: 600; }

.site-nav { max-width: var(--wide); margin: 0 auto; padding: 0 1rem; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; overflow-x: auto; scrollbar-width: none; }
.site-nav ul::-webkit-scrollbar { display: none; }
.site-nav a { display: block; padding: .55rem 0 .7rem; color: var(--ink-soft); text-decoration: none; font-size: .95rem; white-space: nowrap; border-bottom: 3px solid transparent; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--sage); font-weight: 600; }

/* ---------- layout ---------- */
main { max-width: var(--wide); margin: 0 auto; padding: 0 1rem 4rem; }
.prose { max-width: var(--measure); }
.crumbs { font-size: .85rem; color: var(--ink-soft); padding-top: 1.25rem; }
.crumbs a { color: var(--ink-soft); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--line); }

h1, h2, h3 { font-family: var(--serif); line-height: 1.35; letter-spacing: .02em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); margin: 1.5rem 0 1rem; }
h2 { font-size: 1.55rem; margin: 3.25rem 0 1rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
h3 { font-size: 1.2rem; margin: 2rem 0 .5rem; }
p { margin: 0 0 1.1rem; }
ul, ol { padding-left: 1.4rem; margin: 0 0 1.2rem; }
li { margin-bottom: .35rem; }
strong { font-weight: 650; }

.lede { font-size: 1.2rem; line-height: 1.8; color: var(--ink); max-width: var(--measure); }
.meta { font-size: .85rem; color: var(--ink-soft); margin-bottom: 2rem; }

/* ---------- hero (home) ---------- */
.hero { display: grid; gap: 2.5rem; align-items: end; padding: 1rem 0 1rem; }
@media (min-width: 52rem) { .hero { grid-template-columns: 1.1fr 1fr; } }

/* ---------- dose ladder: the signature element ---------- */
.ladder { margin: 0; }
.ladder ol {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(6, 1fr); align-items: end; gap: .35rem;
  height: 15rem; border-bottom: 2px solid var(--ink);
}
.ladder li { margin: 0; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.ladder .step {
  background: var(--sage-tint); border-top: 4px solid var(--sage);
  height: calc(var(--h) * 1%); min-height: 3.4rem;
  display: flex; align-items: flex-start; justify-content: center; padding-top: .4rem;
}
.ladder li:first-child .step { background: var(--sage); }
.ladder li:first-child .dose { color: #fff; }
.ladder .dose { font-family: var(--serif); font-weight: 700; font-size: clamp(1rem, 3.2vw, 1.4rem); color: var(--sage-deep); line-height: 1.1; text-align: center; }
.ladder .dose span { display: block; font-family: var(--sans); font-weight: 400; font-size: .7rem; letter-spacing: 0; }
.ladder .tag { font-size: .75rem; color: var(--ink-soft); text-align: center; margin-bottom: .3rem; line-height: 1.3; min-height: 2em; }
.ladder figcaption { font-size: .88rem; color: var(--ink-soft); margin-top: .7rem; line-height: 1.6; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 1.25rem 0 1.75rem; border: 1px solid var(--line); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: .95rem; line-height: 1.6; }
th, td { text-align: left; vertical-align: top; padding: .7rem .85rem; border-bottom: 1px solid var(--line); }
thead th { background: var(--ink); color: #fff; font-weight: 600; }
tbody th { font-weight: 600; background: #fbfcfd; white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
td.hl, th.hl { background: var(--sage-tint); }
thead th.hl { background: var(--sage); }
.table-note { font-size: .85rem; color: var(--ink-soft); margin-top: -1rem; }

/* ---------- callouts ---------- */
.caution { border-left: 4px solid var(--caution); background: var(--caution-tint); padding: 1rem 1.15rem; margin: 1.5rem 0; max-width: var(--measure); }
.caution p:last-child, .caution ul:last-child { margin-bottom: 0; }
.caution strong:first-child { color: var(--caution); }
.keypoint { border-left: 4px solid var(--sage); background: var(--surface); padding: 1rem 1.15rem; margin: 1.5rem 0; max-width: var(--measure); }
.keypoint p:last-child { margin-bottom: 0; }

/* ---------- process steps (a real sequence) ---------- */
.steps { list-style: none; padding: 0; counter-reset: s; max-width: var(--measure); }
.steps li { counter-increment: s; position: relative; padding-left: 2.8rem; margin-bottom: 1.1rem; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: .1rem;
  width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 2px solid var(--sage);
  color: var(--sage-deep); font-family: var(--serif); font-weight: 700; font-size: .95rem;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- FAQ ---------- */
.faq { max-width: var(--measure); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 1rem 2rem 1rem 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: .85rem; font-size: 1.3rem; color: var(--sage); }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding-bottom: 1rem; }

/* ---------- related + contact ---------- */
.related { margin-top: 3.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.related h2 { border: 0; margin-top: 0; padding-top: 0; font-size: 1.2rem; }
.related ul { list-style: none; padding: 0; display: grid; gap: .25rem 2rem; }
@media (min-width: 40rem) { .related ul { grid-template-columns: 1fr 1fr; } }
.related a { display: block; padding: .35rem 0; }

.contact { margin-top: 3rem; padding: 1.75rem 1.25rem; background: var(--ink); color: #fff; }
.contact h2 { color: #fff; border: 0; margin: 0 0 .5rem; padding: 0; font-size: 1.35rem; }
.contact p { color: #d9dfea; max-width: var(--measure); }
.contact .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .6rem 1.4rem; font-weight: 600; text-decoration: none; border-radius: 999px; font-size: 1rem; }
.btn-line { background: #06c755; color: #fff; }
.btn-line:hover { background: #05a647; color: #fff; }
.btn-tel { background: transparent; color: #fff; border: 2px solid #fff; }
.btn-tel:hover { background: #fff; color: var(--ink); }

.refs { font-size: .85rem; color: var(--ink-soft); line-height: 1.7; max-width: var(--wide); }
.refs h2 { font-size: 1.05rem; }
.refs ol { padding-left: 1.2rem; }
.refs a { color: var(--ink-soft); word-break: break-word; }

/* ---------- footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); font-size: .88rem; color: var(--ink-soft); line-height: 1.75; }
.site-footer .inner { max-width: var(--wide); margin: 0 auto; padding: 2rem 1rem 6rem; }
.site-footer p { margin: 0 0 .6rem; }
.site-footer a { color: var(--ink-soft); }

/* ---------- mobile contact bar ---------- */
.mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border-top: 1px solid var(--line); z-index: 5; padding-bottom: env(safe-area-inset-bottom); }
.mobile-bar a { display: flex; align-items: center; justify-content: center; min-height: 3.25rem; font-weight: 600; text-decoration: none; }
.mobile-bar .m-line { background: #06c755; color: #fff; }
.mobile-bar .m-tel { color: var(--ink); }
@media (min-width: 48rem) { .mobile-bar { display: none; } .site-footer .inner { padding-bottom: 2rem; } }
@media (max-width: 30rem) { .header-tel { display: none; } }
