/* tianzeetang.com — static catalog. Tokens come from the logo (red + green) and the
   pharmacy's herb cabinet (jade-lacquered drawers with paper labels, brass pulls). */
:root {
  --ink: #1f2a24;
  --ink-2: #4e5d55;
  --jade: #1c6b47;
  --jade-deep: #124a31;
  --cinnabar: #c4302b;
  --celadon: #eef4f0;
  --line: #d6e1da;
  --paper: #ffffff;
  --brass: #a8823e;

  --serif: "Taviraj", "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", Georgia, serif;
  --sans: "IBM Plex Sans Thai Looped", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
          "Noto Sans CJK SC", "Leelawadee UI", Tahoma, system-ui, sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.75 var(--sans);
}
:lang(zh) body, body:lang(zh) { line-height: 1.8; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--jade); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--jade-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--cinnabar); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.3; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2rem, 1.2rem + 3.2vw, 3.25rem); letter-spacing: -.005em; }
h1, h2 { text-wrap: balance; }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.measure { max-width: 68ch; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--paper); padding: .5rem 1rem; z-index: 50; }
.skip:focus { left: .5rem; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 4.25rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 52px; height: auto; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; line-height: 1.1; color: var(--cinnabar); }
.brand-sub { display: block; font-family: var(--sans); font-size: .78rem; font-weight: 400; color: var(--jade); }
.nav-desktop { display: none; }
.nav-desktop a, .menu nav a { text-decoration: none; color: var(--ink); }
.nav-desktop a[aria-current="page"], .menu nav a[aria-current="page"] { color: var(--jade); box-shadow: inset 0 -2px 0 var(--jade); }
.langs { display: flex; gap: .15rem; font-size: .9rem; }
.langs a { padding: .2rem .45rem; border-radius: var(--radius); text-decoration: none; color: var(--ink-2); }
.langs a[aria-current="true"] { background: var(--celadon); color: var(--jade-deep); font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem; justify-content: center;
  min-height: 2.75rem; padding: .5rem 1.1rem; border-radius: var(--radius);
  font: 600 1rem/1.2 var(--sans); text-decoration: none; border: 1.5px solid var(--jade);
  background: var(--jade); color: #fff; cursor: pointer;
}
.btn:hover { background: var(--jade-deep); border-color: var(--jade-deep); color: #fff; text-decoration: none; }
.btn.secondary { background: transparent; color: var(--jade); }
.btn.secondary:hover { background: var(--celadon); color: var(--jade-deep); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.call-btn { padding-inline: .8rem; }
.call-btn .num { display: none; }

.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; min-height: 2.75rem; min-width: 2.75rem; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--radius); font-size: .9rem; padding: 0 .7rem; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--celadon); }
.menu nav { position: absolute; right: 0; top: calc(100% + .5rem); width: min(18rem, 90vw); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem; display: grid; box-shadow: 0 8px 24px rgb(18 74 49 / .12); }
.menu nav a { padding: .7rem .8rem; border-radius: var(--radius); }
.menu nav a:hover { background: var(--celadon); }
.menu .langs { border-top: 1px solid var(--line); margin-top: .4rem; padding: .6rem .4rem .2rem; }

@media (min-width: 60rem) {
  .menu { display: none; }
  .nav-desktop { display: flex; gap: 1.4rem; align-items: center; }
  .nav-desktop a { padding: .3rem 0; }
  .call-btn .num { display: inline; }
}

/* ---------- hero: the herb cabinet ---------- */
.hero { border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-block: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-kicker { color: var(--jade); font-weight: 600; margin-bottom: .6rem; }
.hero h1 { max-width: 16ch; }
.hero-lede { font-size: 1.125rem; color: var(--ink-2); max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.cabinet { margin: 0; }
.drawers {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px;
  background: var(--jade-deep); padding: 6px; border-radius: 6px;
}
.drawer {
  background: #fbfcfa; border-radius: 2px; aspect-ratio: 4 / 3;
  display: grid; place-items: center; align-content: center; gap: .35rem;
  box-shadow: inset 0 0 0 1px rgb(18 74 49 / .18), inset 0 -3px 0 rgb(18 74 49 / .08);
}
.drawer span { font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", var(--serif); font-size: clamp(1rem, .8rem + .9vw, 1.45rem); color: var(--ink); letter-spacing: .08em; }
.drawer i { width: 9px; height: 9px; border-radius: 50%; background: var(--brass); box-shadow: 0 1px 0 rgb(0 0 0 / .25); }
.drawer:nth-child(n+9) { display: none; }
.cabinet figcaption { font-size: .85rem; color: var(--ink-2); margin-top: .6rem; }
@media (min-width: 48rem) {
  .hero .wrap { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 3rem; }
  .drawers { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 8px; }
  .drawer:nth-child(n+9) { display: grid; }
  .drawer:nth-child(n+21) { display: none; }
}

/* ---------- trust facts ---------- */
.facts { background: var(--celadon); border-bottom: 1px solid var(--line); }
.facts ul { list-style: none; margin: 0; padding: 1.5rem 0; display: grid; gap: 1.25rem; }
.facts li { padding-left: 1rem; border-left: 3px solid var(--jade); }
.facts strong { display: block; font-family: var(--serif); font-size: 1.15rem; color: var(--jade-deep); }
.facts span { color: var(--ink-2); font-size: .95rem; }
@media (min-width: 48rem) { .facts ul { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }

/* ---------- sections ---------- */
.section { padding-block: clamp(2.5rem, 6vw, 4rem); }
.section + .section { border-top: 1px solid var(--line); }
.section.wash { background: var(--celadon); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1.5rem; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--ink-2); }
.crumbs { font-size: .9rem; color: var(--ink-2); padding-top: 1.25rem; }
.crumbs a { color: var(--ink-2); }
.page-title { padding-block: 1rem 2rem; }
.page-title p { color: var(--ink-2); max-width: 60ch; }

/* ---------- product catalog sheet ---------- */
.catalog { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
@media (min-width: 40rem) { .catalog { grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); } }
.product { background: var(--paper); display: flex; flex-direction: column; text-decoration: none; color: var(--ink); padding: .75rem;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (min-width: 40rem) { .product { padding: 1rem; } }
.product:hover { background: #f7faf8; color: var(--ink); text-decoration: none; }
.product:hover .p-name { text-decoration: underline; text-decoration-color: var(--jade); }
.p-img { aspect-ratio: 1; display: grid; place-items: center; margin-bottom: .75rem; }
.p-img img { max-height: 100%; width: auto; object-fit: contain; }
.p-name { font-weight: 600; line-height: 1.45; }
.p-alt { font-family: var(--serif); color: var(--ink-2); font-size: .95rem; line-height: 1.45; margin-top: .15rem; }
.p-meta { margin-top: auto; padding-top: .75rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.reg { display: inline-block; border: 1.5px solid var(--cinnabar); color: var(--cinnabar); border-radius: 3px;
  font-size: .8rem; line-height: 1.3; padding: .15rem .45rem; font-weight: 600; }
.cat-tag { font-size: .8rem; color: var(--ink-2); }

.cat-block + .cat-block { margin-top: 2.5rem; }
.cat-block h2 { font-size: 1.5rem; }
.cat-block h2 small { font-family: var(--sans); font-size: .9rem; font-weight: 400; color: var(--ink-2); margin-left: .4rem; }
.cat-index { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.cat-index a { border: 1px solid var(--line); border-radius: 999px; padding: .35rem .9rem; text-decoration: none; color: var(--ink); font-size: .95rem; }
.cat-index a:hover { border-color: var(--jade); color: var(--jade); }
.finder { margin-bottom: 1.5rem; max-width: 32rem; }
.finder label { display: block; font-weight: 600; margin-bottom: .35rem; }
.finder input { width: 100%; min-height: 2.9rem; padding: .5rem .85rem; font: inherit; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); }
.finder input:focus { border-color: var(--jade); outline: none; box-shadow: 0 0 0 3px rgb(28 107 71 / .2); }
.finder-empty { padding: 1.5rem; border: 1px dashed var(--line); color: var(--ink-2); }
[hidden] { display: none !important; }

/* ---------- product detail ---------- */
.pd { display: grid; gap: 2rem; padding-block: 1rem 3rem; }
.pd-media { background: var(--celadon); border-radius: var(--radius); display: grid; place-items: center; padding: 1.5rem; align-self: start; }
.pd-media img { width: auto; max-height: 26rem; }
.pd h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); margin-bottom: .25rem; }
.pd-alt { font-family: var(--serif); font-size: 1.15rem; color: var(--ink-2); margin-bottom: 1rem; }
.pd-facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0 0 1.5rem; font-size: .98rem; }
.pd-facts dt { color: var(--ink-2); }
.pd-facts dd { margin: 0; }
.ask { border: 1px solid var(--line); border-left: 4px solid var(--jade); border-radius: var(--radius); padding: 1rem 1.25rem; background: var(--paper); }
.ask h2 { font-size: 1.15rem; margin-bottom: .35rem; }
.ask p { color: var(--ink-2); font-size: .95rem; }
.ask .hero-actions { margin-top: .75rem; }
@media (min-width: 52rem) { .pd { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem; } .pd-media { position: sticky; top: 6rem; } }

.prose { max-width: 68ch; }
.prose h3 { font-family: var(--serif); font-size: 1.2rem; color: var(--jade-deep); margin: 1.75em 0 .4em; }
.prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose table { border-collapse: collapse; margin: 1rem 0; font-size: .95rem; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: .4rem .6rem; vertical-align: top; }
.prose img { margin: .5rem 0; border-radius: 2px; }
.herbs { list-style: none; padding: 0 !important; margin: 1rem 0 1.5rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: .75rem; }
.herbs figure { margin: 0; }
.herbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin: 0; }
.herbs figcaption { font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", var(--serif); font-size: .95rem; text-align: center; margin-top: .25rem; }
.note { border-left: 3px solid var(--line); padding-left: 1rem; color: var(--ink-2); font-size: .95rem; }

/* ---------- about ---------- */
.timeline { list-style: none; padding: 0; margin: 0; max-width: 62ch; }
.timeline li { display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem; padding-block: .7rem; border-top: 1px solid var(--line); }
.timeline time { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--jade-deep); }
.split { display: grid; gap: 2rem; }
@media (min-width: 52rem) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 3rem; align-items: start; } }
.portrait { margin: 0; }
.portrait img { width: 100%; max-width: 26rem; border-radius: var(--radius); }
.portrait figcaption { font-size: .9rem; color: var(--ink-2); margin-top: .4rem; }
.gallery { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(45%, 10rem), 1fr)); gap: .5rem; }
.gallery a { display: block; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 2px; }
.letter { max-width: 30rem; border: 1px solid var(--line); padding: .5rem; background: var(--paper); }

/* ---------- news / services ---------- */
.cards { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.story { display: grid; gap: .75rem; align-content: start; text-decoration: none; color: var(--ink); }
.story img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.story h3 { margin: 0; }
.story p { color: var(--ink-2); margin: 0; }
.story:hover h3 { text-decoration: underline; text-decoration-color: var(--jade); }
.article-hero { max-width: 30rem; border-radius: var(--radius); margin-bottom: 1.5rem; }

/* ---------- order + contact ---------- */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 2rem; display: grid; gap: 1rem; max-width: 62ch; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.5rem 1fr; gap: 1rem; align-items: start; }
.steps li::before { content: counter(s); font-family: var(--serif); font-weight: 600; font-size: 1.25rem; color: var(--paper);
  background: var(--jade); width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; }
.steps strong { display: block; }
.warn { border: 1.5px solid var(--cinnabar); border-radius: var(--radius); padding: 1rem 1.25rem; max-width: 62ch; background: #fdf6f5; }
.warn strong { color: var(--cinnabar); }
.contact-grid { display: grid; gap: 2rem; }
@media (min-width: 52rem) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.contact-list { display: grid; grid-template-columns: max-content 1fr; gap: .6rem 1.25rem; margin: 0 0 1.5rem; }
.contact-list dt { color: var(--ink-2); }
.contact-list dd { margin: 0; }
.map img { border: 1px solid var(--line); border-radius: var(--radius); }
.download { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.download p { margin: 0; flex: 1 1 16rem; color: var(--ink-2); }
.download strong { color: var(--ink); display: block; }

/* ---------- footer ---------- */
.site-footer { background: var(--jade-deep); color: #e3eee7; font-size: .95rem; margin-top: 0; }
.site-footer .wrap { padding-block: 2.5rem 1.5rem; display: grid; gap: 2rem; }
.site-footer a { color: #fff; }
.site-footer h2 { color: #fff; font-size: 1.15rem; margin-bottom: .5rem; }
.site-footer address { font-style: normal; }
.foot-cols { display: grid; gap: 2rem; }
@media (min-width: 48rem) { .foot-cols { grid-template-columns: 1.3fr 1fr 1fr; } }
.foot-cols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.disclaimer { border-top: 1px solid rgb(255 255 255 / .18); padding-top: 1.25rem; color: #c6d9cd; font-size: .85rem; }
.disclaimer p { margin: 0 0 .4rem; }

@media print {
  .site-header, .site-footer, .hero-actions, .ask .hero-actions, .finder { display: none !important; }
  .pd-media { position: static; }
}

/* spacing helpers (no inline styles: the CSP allows only this stylesheet) */
.mt { margin-top: 2rem; }
.pb { padding-bottom: 3rem; }
.mb { margin-bottom: 2rem; }
.story-h { font-size: 1.25rem; margin: 0; }
.ask-link { margin: .75rem 0 0; }
.article { padding-top: 1rem; }
