/* Reading pages: About, Privacy, the photography guides and the admin dashboard. Colours are the
   CSS variables from style.css, set from /api/config by pages.js; nothing here names a colour. */
html:not([lang="en"]) [lang="en"]:not(html), html[lang="en"] [lang="zh-CN"]:not(html) { display: none; }
.top a.wordmark { color: var(--ink); text-decoration: none; }
.reading { max-width: 42rem; margin: 0 auto; padding: 1rem var(--gutter) 2.5rem; }
.reading h1 { font-family: var(--serif); font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.1rem); line-height: 1.3; color: var(--ink); margin: 1.2rem 0 .5rem; text-wrap: balance; }
.reading .lede { font-size: 1.05rem; line-height: 1.75; color: var(--text2); margin: 0 0 1.6rem; }
.reading h2 { font-family: var(--round); font-size: 1.18rem; line-height: 1.4; color: var(--ink); margin: 2.4rem 0 .7rem; }
.reading h3 { font-family: var(--round); font-size: 1rem; line-height: 1.4; color: var(--accent); margin: 1.5rem 0 .4rem; }
.reading p, .reading li { font-size: 1rem; line-height: 1.8; }
.reading p { margin: 0 0 1.1em; }
.reading h2 + p, .reading h3 + p { margin-top: 0; }
.reading ul, .reading ol { margin: 0 0 1.2em; }
@media (min-width: 768px) { .reading p, .reading li { font-size: 1.05rem; } }
.reading ul, .reading ol { padding-left: 1.3rem; }
.reading li { margin: .35rem 0; }
.reading a { color: var(--accent); text-underline-offset: .18em; }
.reading .meta { font-size: .82rem; color: var(--text2); }
.reading .note { font-size: .88rem; color: var(--text2); border-left: 2px solid var(--divider); padding: .2rem 0 .2rem .9rem; margin: 1rem 0; }
.reading figure { margin: 1.4rem 0; }
.reading figure svg { width: 100%; height: auto; display: block; color: var(--ink); }
.reading figcaption { font-size: .82rem; color: var(--text2); margin-top: .4rem; }
.reading table { border-collapse: collapse; width: 100%; font-size: .88rem; margin: .8rem 0; }
.reading th, .reading td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--divider); vertical-align: top; }
.guide-list { list-style: none; padding: 0; margin: 1rem 0; }
.guide-list li { border: 1px solid var(--divider); border-radius: 1rem; padding: .85rem 1rem; margin: .7rem 0; background: var(--bg); }
.guide-list a { font-family: var(--round); font-size: 1.02rem; color: var(--ink); text-decoration: none; }
.guide-list p { margin: .25rem 0 0; font-size: .9rem; color: var(--text2); }
.next { margin-top: 2.2rem; padding-top: 1rem; border-top: 1px solid var(--divider); font-size: .9rem; }
.cta-back { display: inline-block; margin-top: 1.2rem; padding: .7rem 1.2rem; border-radius: 999px; background: var(--accent); color: var(--on-accent) !important; text-decoration: none; font-family: var(--round); }
/* A reserved advertising slot: empty and hidden until advertising is approved and switched on (docs/adsense.md). */
.ad-slot[hidden] { display: none; }
.site-links { display: flex; flex-wrap: wrap; gap: .4rem 1rem; justify-content: center; margin-top: .5rem; font-size: .85rem; }
.site-links a { color: var(--text2); text-decoration: none; display: inline-block; padding: .4rem .15rem; }  /* ≥ 24 px tall targets (WCAG 2.5.8) */
.site-links a:hover { color: var(--accent); }
.top a.wordmark > span:last-child { display: inline; }  /* Two buttons here, so the name fits even on narrow phones. */

/* The pricing page (/pricing/): two plans, a comparison and questions, in the reading column. */
.pricing { max-width: 46rem; }
.plan-status { font-size: .92rem; color: var(--text2); border: 1px solid var(--divider); border-radius: 1rem; padding: .7rem 1rem; margin: 0 0 1.4rem; background: var(--surface); }
.plans { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 1.2rem 0 2rem; }
@media (min-width: 640px) { .plans { grid-template-columns: 1fr 1fr; align-items: stretch; } }
.plan { display: flex; flex-direction: column; border: 1px solid var(--divider); border-radius: 1.4rem; padding: 1.4rem 1.3rem 1.3rem; background: var(--bg); }
.plan-featured { border-color: var(--accent); box-shadow: 0 .6rem 1.8rem rgba(0, 0, 0, .06); }
.plan-name { font-family: var(--round); font-size: 1.15rem; color: var(--ink); margin: 0 0 .4rem; }
.plan-price { display: flex; align-items: baseline; gap: .5rem; margin: 0 0 .6rem; }
.plan-price .amount { font-family: var(--serif); font-size: 2.3rem; line-height: 1; color: var(--ink); font-variant-numeric: lining-nums; }
.plan-price .per { font-size: .9rem; color: var(--text2); }
.plan-desc { font-size: .95rem; color: var(--text); margin: 0 0 .9rem; }
.plan-features { list-style: none; padding: 0; margin: 0 0 .9rem; flex: 1; }
.plan-features li { font-size: .95rem; line-height: 1.65; padding-left: 1.3rem; position: relative; margin: .15rem 0; }
.plan-features li::before { content: ""; position: absolute; left: 0; top: .62em; width: .55rem; height: .55rem; border-radius: 50%; background: var(--accent); opacity: .75; }
.plan-note { font-size: .8rem; color: var(--text2); line-height: 1.55; margin: 0 0 1rem; }
.plan-notice { font-size: .85rem; color: var(--accent); border: 1px solid var(--accent); border-radius: .8rem; padding: .45rem .7rem; margin: 0 0 .8rem; line-height: 1.5; }
.plan-kicker { font-family: var(--round); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text2); margin: 0 0 .3rem; }
.plan-confirm { font-size: .88rem; color: var(--ink); margin: .7rem 0 0; line-height: 1.55; }
.plan-cta:disabled { cursor: default; }
.plan-cta[aria-busy="true"] { opacity: .7; cursor: progress; }
.plan-cta { display: flex; align-items: center; justify-content: center; min-height: 3rem; padding: .7rem 1.1rem; border-radius: 999px; text-decoration: none; font-family: var(--round); font-size: .98rem; border: 1px solid transparent; cursor: pointer; }
.plan-cta-primary { background: var(--accent); color: var(--on-accent) !important; }
.plan-cta-secondary { border-color: var(--accent); color: var(--accent) !important; background: transparent; }
.plan-cta-current { background: var(--surface); color: var(--text2) !important; border-color: var(--divider); cursor: default; }
.plan-cta:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.plan-cta-interest { margin-top: .6rem; }
.plan-cta[aria-disabled="true"] { opacity: .55; cursor: default; pointer-events: none; }
.plan-community-note { font-size: .8rem; color: var(--text2); margin: .45rem 0 0; }
.plan-community-note[hidden] { display: none; }
.compare { font-size: .9rem; }
.compare th[scope="row"] { font-weight: 500; color: var(--text); width: 46%; }
.compare td { color: var(--text2); }
.compare thead th { color: var(--ink); font-family: var(--round); font-weight: 600; }
@media (max-width: 420px) { .compare th, .compare td { padding: .4rem .3rem; font-size: .84rem; } .plan-price .amount { font-size: 2rem; } }
.faq h3 { margin-top: 1.2rem; }

.foot-contact { display: block; width: 100%; text-align: center; color: var(--text2); font-size: .82rem; margin-top: .2rem; }
.reading .compare { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.reading .compare th, .reading .compare td { white-space: nowrap; }

/* Photography Library: records tables (static pages from tools/build_knowledge.py). */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: .6rem 0 1rem; }
table.records { border-collapse: collapse; width: 100%; font-size: .92rem; }
table.records th, table.records td { text-align: left; padding: .45rem .55rem; border-bottom: 1px solid var(--divider, #e6dfd8); vertical-align: top; }
table.records th { font-family: var(--round, inherit); font-weight: 600; white-space: nowrap; }
table.records td:first-child, table.records td:nth-child(2) { white-space: nowrap; color: var(--text2, #6b6460); }
table.records .latin { display: block; font-size: .82rem; color: var(--text2, #6b6460); }
.muted { color: var(--text2, #6b6460); }
.note { font-size: .9rem; color: var(--text2, #6b6460); border-left: 3px solid var(--divider, #e6dfd8); padding-left: .7rem; }
.sources { font-size: .85rem; color: var(--text2, #6b6460); word-break: break-word; }

/* Knowledge pages (tools/build_library_pages.py): fact lists and the timeline. */
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: .4rem 0 1rem; }
dl.facts dt { color: var(--text2, #6b6460); font-size: .9rem; }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
.tl-filters { display: flex; flex-wrap: wrap; gap: .4rem; margin: .8rem 0 1.2rem; }
.tl-filters button { font: inherit; font-size: .85rem; padding: .3rem .75rem; border-radius: 999px; border: 1px solid var(--divider, #e6dfd8); background: transparent; color: inherit; cursor: pointer; }
.tl-filters button[aria-pressed="true"] { background: var(--accent, #b07a7a); border-color: var(--accent, #b07a7a); color: var(--on-accent, #fff); }
ol.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--divider, #e6dfd8); }
.tl-item { position: relative; padding: .2rem 0 1rem 1.1rem; }
.tl-item::before { content: ""; position: absolute; left: -6px; top: .55rem; width: 10px; height: 10px; border-radius: 50%; background: var(--accent, #b07a7a); }
.tl-item.tl-jp::before { background: var(--ink, #3d5a50); }
.tl-item.tl-intl::before { background: var(--text2, #6b6460); }
.tl-item h3 { margin: .15rem 0 .2rem; font-size: 1.02rem; }
.tl-item p { margin: 0; font-size: .92rem; }
.tl-meta { margin: 0 0 .1rem; font-size: .82rem; color: var(--text2, #6b6460); letter-spacing: .01em; }
.tl-item h3 a { text-decoration: none; }
.tl-item h3 a:hover, .tl-item h3 a:focus-visible { text-decoration: underline; }
.book-title { font-size: clamp(1.45rem, 5vw, 2.1rem); line-height: 1.3; overflow-wrap: anywhere; }
.book-meta { overflow-wrap: anywhere; }
.tl-item[hidden] { display: none; }
.tl-controls { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: end; margin: .8rem 0 .3rem; }
.tl-controls label { display: flex; flex-direction: column; gap: .2rem; font-size: .82rem; color: var(--text2, #6b6460); }
.tl-controls input[type="search"], .tl-controls select { font: inherit; font-size: .9rem; padding: .35rem .6rem; border-radius: .6rem; border: 1px solid var(--divider, #e6dfd8); background: var(--bg, #fbf8f5); color: var(--text, #3f3a3b); }
.tl-controls .tl-search input { width: 16rem; max-width: 70vw; }
.tl-controls button, .tl-more { font: inherit; font-size: .85rem; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--divider, #e6dfd8); background: transparent; color: inherit; cursor: pointer; }
.tl-controls button[aria-pressed="true"] { background: var(--ink, #3d5a50); border-color: var(--ink, #3d5a50); color: var(--on-accent, #fff); }
.tl-filters button small { opacity: .7; font-size: .78em; margin-left: .15rem; }
.tl-filters.tl-regions { margin-top: -.6rem; }
.tl-regions button { font-size: .8rem; padding: .22rem .6rem; }
.tl-links { display: flex; flex-wrap: wrap; gap: .25rem .7rem; margin-top: .25rem !important; font-size: .8rem !important; }
.tl-links a { color: var(--text2, #6b6460); text-decoration: none; border-bottom: 1px dotted var(--divider, #e6dfd8); }
.tl-links a:hover, .tl-links a:focus-visible { color: var(--accent, #b07a7a); }
.tl-more { display: block; margin: .6rem auto 1.2rem; }
.tl-fallback { font-size: .85rem; color: var(--text2, #6b6460); }
/* A thin category mark on each entry, consistent with the lane dot: books warm, equipment cool, people neutral. */
.tl-item.tl-cat-photobook::before, .tl-item.tl-cat-writing::before { background: var(--accent, #b07a7a); }
.tl-item.tl-cat-film::before, .tl-item.tl-cat-camera::before, .tl-item.tl-cat-invention::before { background: var(--ink, #3d5a50); }
.tl-item.tl-cat-exhibition::before, .tl-item.tl-cat-work::before { background: var(--secondary-accent, #8c8f9b); }
.tl-item.tl-cat-institution::before { background: var(--text2, #6b6460); }
.tl-item.tl-cat-person::before { background: transparent; border: 2px solid var(--text2, #6b6460); box-sizing: border-box; }
.otd-tag { font-size: .75rem; color: var(--text2, #6b6460); border: 1px solid var(--divider, #e6dfd8); border-radius: 999px; padding: 0 .45rem; margin-left: .25rem; white-space: nowrap; vertical-align: middle; }
.book-list li { margin-bottom: .45rem; }
.book-list li p { margin: .1rem 0 0; font-size: .9rem; color: var(--text2, #6b6460); }
@media (max-width: 560px) {
  .tl-controls .tl-search { width: 100%; }
  .tl-controls .tl-search input { width: 100%; max-width: 100%; }
  .tl-filters button { font-size: .8rem; padding: .25rem .6rem; }
}
@media (min-width: 900px) {
  /* Two lanes on wide screens: the US on the left, Japan on the right, international milestones across both. */
  ol.timeline { border-left: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 2rem; }
  .tl-item { border-left: 2px solid var(--divider, #e6dfd8); }
  .tl-item.tl-us { grid-column: 1; }
  .tl-item.tl-jp { grid-column: 2; }
  .tl-item.tl-intl { grid-column: 1 / span 2; border-left-style: dashed; }
}
@media (min-width: 900px) {
  ol.timeline.tl-filtered { grid-template-columns: 1fr; }
  ol.timeline.tl-filtered .tl-item { grid-column: 1; }
}

/* Flora & Birds (tools/build_nature_pages.py). */
.nf-hero { display: flex; gap: 1rem; align-items: center; margin: .4rem 0 .6rem; }
.nf-hero svg { flex-shrink: 0; width: 120px; height: 120px; }
.nf-hero h1 { margin: 0; }
.nf-hero .lede { margin: .2rem 0 0; }
.nf-sci { margin: .15rem 0 0; color: var(--text2, #6b6460); font-size: .9rem; }
.nf-filters { display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin: .8rem 0 .4rem; }
.nf-filters label { display: flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--text2, #6b6460); }
.nf-filters select { font: inherit; font-size: .85rem; padding: .3rem .5rem; border-radius: .6rem; border: 1px solid var(--divider, #e6dfd8); background: var(--bg, #fbf8f5); color: var(--text, #3f3a3b); max-width: 11rem; }
.nf-count { font-size: .82rem; color: var(--text2, #6b6460); margin: .2rem 0 .6rem; min-height: 1.2em; }
.nf-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .7rem; }
.nf-grid li[hidden] { display: none; }
.nf-grid a, .nf-sections a { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .15rem; padding: .7rem .5rem .8rem; border: 1px solid var(--divider, #e6dfd8); border-radius: 1rem; text-decoration: none; color: inherit; height: 100%; transition: border-color .15s ease, background-color .15s ease; }
.nf-grid a:hover, .nf-grid a:focus-visible, .nf-sections a:hover, .nf-sections a:focus-visible { border-color: var(--accent, #9a5f66); background: var(--surface, #f4ece8); }
.nf-name { font-weight: 600; color: var(--ink, #34504b); }
.nf-sub { font-size: .8rem; color: var(--text2, #6b6460); overflow-wrap: anywhere; }
.nf-grid .nf-sci { font-size: .75rem; overflow-wrap: anywhere; }
.nf-sections { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .8rem; }
.nf-sample { display: flex; gap: .2rem; flex-wrap: wrap; justify-content: center; }
.nf-ethics { font-size: .88rem; line-height: 1.6; padding: .7rem .9rem; border-left: 3px solid var(--ink, #34504b); background: var(--surface, #f4ece8); border-radius: 0 .6rem .6rem 0; }

/* Open calls (tools/build_open_calls_pages.py). */
.oc-list { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .9rem; }
.oc-item { border: 1px solid var(--divider, #e6dfd8); border-radius: 1rem; padding: .9rem 1rem; }
.oc-item h3 { margin: .2rem 0 .5rem; font-size: 1.05rem; }
.oc-state { display: inline-block; margin: 0; font-size: .78rem; padding: .1rem .6rem; border-radius: 999px; background: var(--ink, #34504b); color: var(--on-accent, #fff); }
.oc-closed .oc-state { background: var(--divider, #e6dfd8); color: var(--text2, #6b6460); }
.oc-closed { opacity: .75; }

/* Payment method sheet (supporter plan): muted green, dusty pink, cream, rounded cards. */
.pay-sheet { width: min(26rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto; border: 1px solid var(--divider); border-radius: 1.2rem; background: var(--bg); color: var(--text); padding: 1.2rem 1.1rem 1rem; box-sizing: border-box; }
.pay-sheet::backdrop { background: rgba(40, 34, 36, .38); }
.pay-sheet h2 { font-family: var(--round); font-size: 1.15rem; margin: 0 0 .3rem; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: .9rem 0; }
.pay-method { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .8rem .4rem; border: 1px solid var(--divider); border-radius: 1rem; background: var(--surface); color: var(--text); font-family: var(--round); font-size: .9rem; cursor: pointer; }
.pay-method.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.pay-method:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pay-qr { border-radius: 1rem; background: var(--surface); padding: .9rem; text-align: center; }
.pay-qr-frame { position: relative; display: inline-block; max-width: 100%; }
.pay-qr-frame img { display: block; width: 240px; max-width: 100%; height: auto; border-radius: .8rem; }
.pay-notice { font-family: var(--round); color: var(--ink); margin: .8rem 0 .2rem; font-size: .95rem; }
.pay-small { font-size: .84rem; color: var(--text2); margin: .3rem 0; line-height: 1.55; }
.pay-sheet .sheet-actions { display: flex; justify-content: flex-end; margin-top: .9rem; }
@media (max-width: 380px) { .pay-methods { grid-template-columns: 1fr; } }
/* 购买套餐 (tools/build_pricing_page.py): a quiet "recommended" tag and the per-analysis price. */
.plan-badge { display: inline-block; margin-left: .5rem; padding: .08rem .55rem; border-radius: 999px; font-size: .74rem; vertical-align: middle; color: var(--accent); border: 1px solid var(--accent); font-family: var(--round); }
.plan-unit { margin: .2rem 0 .8rem; color: var(--text2); font-size: .9rem; }
.plans-packs .plan-cta { margin-top: auto; }
.plans-packs .plan-name { margin: 0 0 .3rem; font-size: 1.15rem; }
/* 观鸟清单 / 赏花清单: a compact, searchable name list. */
.nf-checklist { list-style: none; padding: 0; margin: .6rem 0 1.4rem; }
.nf-checklist li { padding: .45rem 0; border-bottom: 1px solid var(--divider, #e6dfd8); line-height: 1.5; }
.nf-checklist .nf-name { font-weight: 600; }
.nf-checklist .nf-sub { color: var(--text2, #6b6460); margin-left: .3rem; }
.nf-checklist .nf-sci { display: block; font-size: .85rem; }
.nf-filters input[type="search"] { font: inherit; font-size: .85rem; padding: .3rem .6rem; border-radius: .6rem; border: 1px solid var(--divider, #e6dfd8); background: var(--bg, #fbf8f5); color: var(--text, #3f3a3b); width: 13rem; max-width: 60vw; }
/* Flora & Birds on a phone: the hero wraps under 420px, the icon shrinks, the search box takes the full width. */
.nf-facts-photo { margin: .4rem 0 .8rem; }
/* A Commons photograph with the credit its licence requires; the page keeps its icon as well. */
.nf-photo { margin: .4rem 0 1rem; }
.nf-photo img { display: block; max-width: 100%; max-height: 32rem; width: auto; height: auto; border-radius: 1rem; background: var(--surface, #f4ece8); }
.nf-photo figcaption { font-size: .78rem; line-height: 1.5; color: var(--text2, #6b6460); margin-top: .35rem; overflow-wrap: anywhere; }
.nf-badge-note { margin: .2rem 0 .8rem; }
@media (max-width: 420px) {
  .nf-hero { flex-wrap: wrap; gap: .6rem; }
  .nf-hero svg { width: 88px; height: 88px; }
  .nf-filters input[type="search"] { width: 100%; max-width: 100%; }
  .nf-filters label { width: 100%; }
  .nf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .nf-checklist .nf-sub { display: block; margin-left: 0; }
}

/* Account pages (/account/*): one narrow form under the bilingual heading. */
.account-form { max-width: 26rem; margin: .5rem 0 1rem; }
.account-form .primary { width: 100%; margin-top: .4rem; }
.acct-email .chips { margin: .3rem 0 .4rem; }
