/* laoxinglin.com — the apricot grove. Single-theme warm paper by design (see BRAND.md). */

/* Metric-matched fallback: Georgia adjusted toward Fraunces, so the font swap
   barely moves the layout (CLS). */
@font-face {
  font-family: "Fraunces Fallback";
  src: local("Georgia");
  size-adjust: 90%;
  ascent-override: 98%;
  descent-override: 27%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Newsreader Fallback";
  src: local("Georgia");
  size-adjust: 92%;
  ascent-override: 96%;
  descent-override: 26%;
  line-gap-override: 0%;
}
/* CJK fallback pinned to Noto Serif SC's line metrics, so hanzi headings
   don't shift when the webfont arrives. */
@font-face {
  font-family: "Noto SC Fallback";
  src: local("Songti SC"), local("SimSun");
  ascent-override: 116%;
  descent-override: 29%;
  line-gap-override: 0%;
}

:root {
  --paper: #FAF3E9;
  --paper-deep: #F3E8D8;
  --card: #FFFBF4;
  --ink: #362A1D;
  --ink-soft: #6E5C48;
  --line: #E5D5C0;
  --apricot: #C96F2B;
  --apricot-deep: #A85718;
  --grove: #4E6E52;
  --grove-deep: #3A5540;
  --gold: #B98A2F;
  --apricot-ink: #8C4A10;
  --gold-ink: #7A5A1D;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* content sits above the wind canvas (z 0); petals drift behind cards and text */
main, .masthead, .colophon { position: relative; z-index: 1; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Newsreader", "Newsreader Fallback", Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0;
}
[lang="zh"] { font-family: "Noto Serif SC", "Noto SC Fallback", "Songti SC", serif; }
img { max-width: 100%; height: auto; }
a { color: var(--apricot-ink); }
a:focus-visible { outline: 2px solid var(--apricot); outline-offset: 2px; }
h1, h2, h3 { font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-weight: 600; line-height: 1.15; text-wrap: balance; }

/* ---------- masthead ---------- */
.masthead {
  display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap;
  max-width: 68rem; margin: 0 auto; padding: 1.1rem 1.5rem;
}
.wordmark { display: flex; align-items: center; gap: .6rem; margin-right: auto; text-decoration: none; }
.wordmark img { width: 40px; height: 40px; }
.wm-text { font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-weight: 700; font-size: 1.3rem; color: var(--ink); letter-spacing: -.01em; }
.wm-hanzi { font-weight: 700; color: var(--apricot); font-size: 1rem; letter-spacing: .12em; }
.masthead nav { display: flex; gap: 1.3rem; flex-wrap: wrap; }
.masthead nav a {
  font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-weight: 500; font-size: .95rem;
  color: var(--ink); text-decoration: none;
}
.masthead nav a:hover, .masthead nav a[aria-current] { color: var(--apricot-deep); text-decoration: underline; text-underline-offset: 4px; }
.masthead nav a.find { color: var(--grove-deep); font-weight: 600; }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger { display: none; font-size: 1.5rem; line-height: 1; color: var(--ink); cursor: pointer; padding: .2rem .45rem; border-radius: 8px; }
.nav-toggle:focus-visible + .nav-burger { outline: 2px solid var(--apricot); outline-offset: 2px; }
@media (max-width: 44rem) {
  .masthead nav { display: none; }
  .nav-burger { display: block; }
  .nav-toggle:checked ~ nav {
    display: flex; flex-direction: column; gap: .85rem;
    width: 100%; padding: .8rem 0 .3rem;
    border-top: 1px solid var(--line); margin-top: .5rem;
  }
  .nav-toggle:checked + .nav-burger { color: var(--apricot-deep); }
}

/* ---------- breadcrumbs ---------- */
.crumbs {
  max-width: 68rem; margin: 0 auto; padding: .2rem 1.5rem 0;
  font-family: "Fraunces", "Fraunces Fallback", Georgia, serif;
  font-size: .82rem; color: var(--ink-soft);
  position: relative; z-index: 1;
}
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--apricot-deep); text-decoration: underline; }
.crumbs span[aria-hidden] { color: var(--line); margin: 0 .15rem; }
.crumbs span[aria-current] { color: var(--apricot-ink); }

/* ---------- home hero ---------- */
.hero {
  max-width: 68rem; margin: 0 auto; padding: 1.6rem 1.5rem 0;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.5rem; align-items: start;
}
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); margin: 0 0 1rem; letter-spacing: -.015em; }
.hero h1 [lang="zh"] { color: var(--apricot); white-space: nowrap; }
.speech { font-size: 1.1rem; font-style: italic; color: var(--ink-soft); margin: 0 0 1.3rem; max-width: 34rem; }
.speech .who {
  display: block; margin-top: .5rem; font-style: normal;
  font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-size: .78rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--grove);
}
.hero-art img { display: block; width: 100%; margin: 0 auto; }
.hero-cta { display: flex; align-items: flex-end; gap: 1rem; }
.who-avatar {
  width: 44px; height: 44px; vertical-align: middle; margin-right: .2rem;
  background: var(--paper-deep); border: 1px solid var(--line);
  border-radius: 50%; object-fit: cover; object-position: top;
}
.btn {
  display: inline-block; background: var(--apricot); color: #FFFBF4; text-decoration: none;
  font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-weight: 600; font-size: 1.02rem;
  padding: .75rem 1.5rem; border-radius: 12px;
}
.btn:hover { background: var(--apricot-deep); }
.cub-spot { width: 84px; height: auto; }

/* ---------- home bands ---------- */
.band { max-width: 68rem; margin: 0 auto; padding: 3rem 1.5rem 0; }
.band-head { display: flex; align-items: baseline; gap: .9rem; margin-bottom: 1.3rem; flex-wrap: wrap; }
.band-head .hz { font-weight: 700; color: var(--apricot-ink); font-size: 1.05rem; letter-spacing: .1em; }
.band-head h2 { font-size: 1.6rem; margin: 0; letter-spacing: -.01em; }
.band-head .all { margin-left: auto; font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-size: .92rem; font-weight: 500; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; }
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  transition: transform .15s ease;
}
.tile:hover { transform: translateY(-3px); }
.t-art { aspect-ratio: 3 / 2; overflow: hidden; display: block; }
.t-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.t-body { display: block; padding: .9rem 1.05rem 1.1rem; }
.t-title { display: block; font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-weight: 600; font-size: 1.08rem; }
.t-hz { color: var(--apricot-deep); font-size: .88rem; margin-left: .35rem; }
.t-desc { display: block; margin-top: .25rem; font-size: .92rem; color: var(--ink-soft); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.herb-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.15rem 1.25rem; text-decoration: none; color: var(--ink); display: block;
  transition: transform .15s ease; position: relative;
}
.h-art { position: absolute; top: .8rem; right: .9rem; width: 84px; height: 84px; object-fit: contain; }
.herb-card .h-top, .herb-card .h-latin { padding-right: 88px; }
.entry-illo { float: right; width: 180px; height: 180px; object-fit: contain; margin: 0 0 .8rem 1.2rem; }
.listing-spot { float: right; width: 130px; height: 130px; object-fit: contain; margin: 0 0 .5rem 1rem; }
.seal { width: 36px; height: 36px; vertical-align: -11px; margin-right: .35rem; opacity: .9; }
.colophon-stamp { width: 72px; height: 72px; float: right; margin: 0 0 .5rem 1rem; opacity: .92; }
@media (max-width: 40rem) { .listing-spot { width: 96px; height: 96px; } }
@media (max-width: 40rem) { .entry-illo { width: 120px; height: 120px; } }
.herb-card:hover { transform: translateY(-3px); }
.h-top { display: flex; align-items: baseline; gap: .6rem; }
.h-hanzi { font-weight: 700; font-size: 1.45rem; }
.h-pinyin { font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-weight: 600; font-size: 1.02rem; color: var(--apricot-deep); }
.h-latin { display: block; font-size: .84rem; font-style: italic; color: var(--ink-soft); margin: .1rem 0 .5rem; }
.h-blurb { display: block; font-size: .94rem; margin-bottom: .7rem; }

.pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.pill {
  font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-size: .71rem; font-weight: 600; letter-spacing: .05em;
  padding: .2rem .58rem; border-radius: 999px; border: 1px solid var(--line);
  color: var(--ink-soft); background: var(--paper);
}
.pill.warm { border-color: var(--apricot); color: var(--apricot-deep); }
.pill.organ { border-color: var(--grove); color: var(--grove-deep); }

.story { max-width: 68rem; margin: 3.2rem auto 0; padding: 0 1.5rem; }
.story-inner {
  background: var(--paper-deep); border-radius: 18px; padding: 2.2rem;
  display: grid; grid-template-columns: .85fr 1.15fr; gap: 2.2rem; align-items: center;
}
.story .cutout img { width: 100%; max-width: 22rem; margin: 0 auto; display: block; }
.story h2 { font-size: 1.6rem; margin: 0 0 .6rem; }
.hz-line { color: var(--gold-ink); font-weight: 700; letter-spacing: .18em; margin-top: 1rem; }

/* ---------- entries (herb/formula/concept/prose pages) ---------- */
.entry { max-width: 46rem; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.entry.listing { max-width: 68rem; }
.entry.wide { max-width: 62rem; }
.entry.wide .formula-body, .entry.wide .entry-head { max-width: 46rem; }
.ing-cell a { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.ing-cell a:hover { text-decoration: underline; }
.ing-art { width: 52px; height: 52px; object-fit: contain; flex: none; }
.entry-head { margin-bottom: 1.8rem; }
.kicker {
  font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-size: .76rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--apricot); margin: 0 0 .4rem;
}
.entry h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin: 0 0 .35rem; letter-spacing: -.012em; }
.e-hanzi { color: var(--apricot); font-weight: 700; }
.e-latin { margin: .1rem 0 .8rem; color: var(--ink-soft); }
.entry-head .pills { margin-bottom: 1rem; }
.entry-head .speech { font-size: 1.05rem; border-left: 3px solid var(--line); padding-left: 1rem; }
.entry h2 { font-size: 1.35rem; margin: 2.2rem 0 .7rem; }
.entry h3 { font-size: 1.1rem; margin: 1.8rem 0 .5rem; }
.entry p { margin: .8rem 0; }
.entry ul, .entry ol { padding-left: 1.1rem; }
.entry li { margin: .35rem 0; }
.entry li::marker { color: var(--apricot); }
.entry blockquote { border-left: 3px solid var(--gold); margin: 1.2rem 0; padding: .2rem 0 .2rem 1.1rem; color: var(--ink-soft); font-style: italic; }
.entry-art { border-radius: 14px; border: 1px solid var(--line); margin: 0 0 1.4rem; display: block; }
.entry img { border-radius: 12px; }
sup.cite a { text-decoration: none; font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-size: .72em; color: var(--apricot-deep); }

.tablewrap { overflow-x: auto; margin: 1rem 0; }
.entry table { border-collapse: collapse; width: 100%; font-size: .96rem; background: var(--card); border-radius: 10px; overflow: hidden; }
.entry th {
  font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-size: .73rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; text-align: left; color: var(--ink-soft);
  padding: .6rem .85rem; border-bottom: 2px solid var(--line);
}
.entry td { padding: .55rem .85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.entry tr:last-child td { border-bottom: none; }
.entry td.num { font-variant-numeric: tabular-nums; }

/* ---------- about page: single-column story flow ---------- */
.entry.about { max-width: 46rem; }
.about-legend img { width: 100%; height: auto; max-width: 30rem; display: block; margin: 1.6rem auto 0; }
.about-grid { margin-top: 1.2rem; }
.about-sec h2 { margin-top: 2rem; }
.editor-block .editor-photo { border-radius: 14px; border: 1px solid var(--line); display: block; margin: 1.4rem auto; }

.hall-vignette { margin: 3.2rem auto 0; max-width: 34rem; text-align: center; }
.hall-vignette img { width: 100%; height: auto; }
.hall-vignette figcaption { margin-top: .7rem; font-style: italic; color: var(--ink-soft); font-size: 1rem; }

.crosslinks { margin-top: 2.2rem; background: var(--paper-deep); border-radius: 12px; padding: 1.1rem 1.4rem; }
.crosslinks h2 { margin: 0 0 .5rem; font-size: 1.1rem; }
.crosslinks ul { margin: 0; padding-left: 1.2rem; }

.references { margin-top: 2.5rem; border-top: 2px solid var(--line); padding-top: 1rem; }
.references h2 { font-size: 1.1rem; }
.references ol { padding-left: 1.3rem; font-size: .92rem; color: var(--ink-soft); }
.references a { overflow-wrap: anywhere; }
.backref { text-decoration: none; }
.revised { margin-top: 2rem; font-size: .88rem; font-style: italic; color: var(--ink-soft); }

/* ---------- colophon ---------- */
.colophon { border-top: 2px solid var(--line); margin-top: 3.5rem; }
.colophon-inner { max-width: 68rem; margin: 0 auto; padding: 1.6rem 1.5rem 2.4rem; }
.disclaimer { max-width: 44rem; font-size: .92rem; font-style: italic; color: var(--ink-soft); }
.colophon-nav { font-size: .92rem; margin: .8rem 0; }
.colophon-meta { font-size: .88rem; color: var(--gold-ink); }
.copyright { font-size: .85rem; color: var(--ink-soft); margin-top: .6rem; }
.copyright a { color: var(--ink-soft); }

/* ---------- responsive ---------- */
@media (max-width: 58rem) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; }
}
@media (max-width: 52rem) {
  .cards { grid-template-columns: 1fr; }
  .story-inner { grid-template-columns: 1fr; padding: 1.5rem; }
  .story .cutout img { max-width: 17rem; }
}
@media (max-width: 34rem) {
  .tiles { grid-template-columns: 1fr; }
  .cub-spot { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile, .herb-card { transition: none; }
}
