/* Theme: all brand colours live here. To re-skin, edit this block only. */
:root {
  /* surfaces */
  --bg: #f7f4ec;
  --surface: #fffdf8;
  --tint: #e6eddc;
  --hero-top: #e4ecd6;
  --hero-mid: #eff2e3;
  --seedling-end: #efe9d8;
  /* text */
  --ink: #1f3a2c;
  --ink-soft: #566a5d;
  /* brand */
  --accent: #2d5a3d;
  --accent-mid: #6a9a72;
  --accent-soft: #a9bf9f;
  --leaf: #5f8f5a;
  --line: #e2dccb;
  --line-strong: #cfc8b4;
  /* status (kept distinct from the brand green) */
  --ok: #1b6b5d;
  --ok-bg: #dff1ec;
  --warn: #8a5d0a;
  --warn-bg: #fbf0d6;
  --warn-dot: #e6b85a;
  --err: #a03c28;
  --err-bg: #fbe9e4;
  --err-strong: #b9472f;
  --neutral-bg: #eeeadd;
  --pending-row: #fbf7e8;
  --tag-s: #6b3f8f;
  --tag-s-bg: #f3ecf9;
  /* membership cards */
  --grove-top: #2f5e43;
  --summit-top: #2a312c;
  --summit-bottom: #141a16;
  --mint: #b5d9bd;
  --mint-icon: #9fd1aa;
  --mint-tint: rgba(159, 209, 170, .16);
  --mint-glow: rgba(159, 209, 170, .18);
  --on-grove-h: #bcd6c1;
  --on-grove-p: #d0e0d3;
  --on-dark-soft: #d9ddd6;
  --gold: #e8c882;
  --gold-soft: #f0d9a2;
  --gold-text: #d9c28f;
  --gold-line: rgba(232, 200, 130, .35);
  --gold-tint: rgba(232, 200, 130, .16);
  /* translucent surfaces and shadows */
  --glass-65: rgba(255, 253, 248, .65);
  --glass-70: rgba(255, 253, 248, .7);
  --glass-78: rgba(255, 253, 248, .78);
  --glass-86: rgba(255, 253, 248, .86);
  --shadow-ink: rgba(31, 58, 44, .45);
  --shadow-ink-strong: rgba(31, 58, 44, .55);
  /* legacy names still referenced by inline styles in HTML */
  --mist: var(--bg);
  --sky-100: var(--tint);
  --sky-300: var(--accent-soft);
  --sky: var(--accent-mid);
  --sky-deep: var(--accent);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.05; letter-spacing: -0.005em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Atmosphere: the one signature element. Sky fading into contour lines. */
.atmosphere {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--hero-top) 0%, var(--hero-mid) 45%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.contours {
  position: absolute; inset: auto 0 0 0; height: 70%;
  width: 100%; color: var(--accent-soft); pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 60%);
  mask-image: linear-gradient(180deg, transparent, #000 60%);
}

/* Navigation */
.topnav { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; letter-spacing: .01em; }
.brand img { width: 28px; height: 28px; }
.tabs { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--glass-65); border: 1px solid var(--line); backdrop-filter: blur(6px); }
.tabs a { padding: 6px 16px; border-radius: 999px; color: var(--ink-soft); font-size: .92rem; font-weight: 500; text-decoration: none; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--ink); color: #fff; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.lang-toggle { min-width: 52px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass-65); color: var(--ink); font: 600 .85rem var(--sans); cursor: pointer; backdrop-filter: blur(6px); }
.lang-toggle:hover { border-color: var(--accent-mid); }
.tabs a { white-space: nowrap; }
@media (max-width: 520px) {
  .brand span { display: none; }
  .topnav { gap: 10px; }
  .tabs a { padding: 6px 9px; font-size: .85rem; }
  .lang-toggle { min-width: 44px; padding: 7px 10px; }
}

/* Chinese: CJK fonts have no true italics, so keep headings upright */
:lang(zh-Hant) { --serif: "Cormorant Garamond", "Noto Serif TC", "Songti TC", serif; --sans: "Hanken Grotesk", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif; }
html:lang(zh-Hant) :is(h1, h2, h3, h4, .statement) { font-style: normal; letter-spacing: .02em; }
:lang(zh-Hant) .hero h1:not([data-zh]) { font-style: italic; }

/* Hero */
.hero { position: relative; display: grid; gap: 40px; padding: 72px 24px 96px; }
@media (min-width: 880px) { .hero { grid-template-columns: 1.35fr 1fr; align-items: end; padding-top: 96px; padding-bottom: 120px; } }
.hero h1 { font-size: clamp(3.8rem, 10vw, 6.75rem); font-style: italic; font-weight: 500; letter-spacing: -0.02em; }
.hero .sub { margin-top: 6px; color: var(--ink-soft); font-size: 1rem; }
.hero .statement { margin-top: 24px; max-width: 34ch; font-family: var(--serif); font-weight: 500; font-size: clamp(1.55rem, 2.8vw, 1.95rem); line-height: 1.25; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; font-size: .95rem; font-weight: 600; text-decoration: none; transition: background-color .15s ease, border-color .15s ease; }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--accent); color: #fff; }
.btn.ghost { background: var(--glass-70); color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent-mid); color: var(--ink); }

/* At a glance */
.glance { background: var(--glass-78); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 20px; padding: 8px 24px; }
.glance div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.glance div:first-child { border-top: 0; }
.glance dt { color: var(--ink-soft); font-size: .9rem; }
.glance dd { font-weight: 500; }

/* Sections: title in a left column, content on the right */
.section { display: grid; gap: 24px; padding: 72px 0; border-top: 1px solid var(--line); }
main > .section:first-child { border-top: 0; }
@media (min-width: 880px) { .section { grid-template-columns: 240px 1fr; gap: 48px; } }
.section > h2 { font-size: 2.5rem; font-style: italic; font-weight: 500; }
.section-note { margin-top: 8px; color: var(--ink-soft); font-size: .95rem; font-family: var(--sans); }

/* Focus areas */
.focus { display: grid; gap: 16px; }
@media (min-width: 720px) { .focus { grid-template-columns: repeat(2, 1fr); } }
.focus article { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.focus svg { width: 26px; height: 26px; color: var(--accent); }
.focus h3 { font-size: 1.65rem; margin-top: 14px; }
.focus p { margin-top: 8px; color: var(--ink-soft); font-size: .95rem; }

/* Rows: date on the left, detail on the right (experience, education, recognition) */
.rows { list-style: none; }
.rows > li { display: grid; gap: 4px 24px; padding: 22px 0; border-top: 1px solid var(--line); }
.rows > li:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 640px) { .rows > li { grid-template-columns: 9.5rem 1fr; } }
.rows .when { color: var(--ink-soft); font-size: .92rem; font-variant-numeric: tabular-nums; padding-top: 3px; }
.rows h3 { font-family: var(--sans); font-size: 1.08rem; font-weight: 600; letter-spacing: 0; line-height: 1.4; }
.rows .org { color: var(--accent); font-weight: 500; }
.rows p.detail { margin-top: 6px; color: var(--ink-soft); }
.rows .current .when { color: var(--accent); font-weight: 600; }
.rows cite { font-style: italic; }

/* Projects teaser on the profile page */
.teaser { display: grid; gap: 14px; }
@media (min-width: 720px) { .teaser { grid-template-columns: repeat(3, 1fr); } }
.teaser a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; text-decoration: none; color: var(--ink); transition: border-color .15s ease; }
.teaser a:hover { border-color: var(--accent-mid); }
.teaser h3 { font-size: 1.75rem; }
.teaser p { margin-top: 6px; color: var(--ink-soft); font-size: .95rem; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--ink-soft); font-size: .9rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* Projects page */
.hero.compact { padding-bottom: 88px; }
@media (min-width: 880px) { .hero.compact { grid-template-columns: 1fr; padding-bottom: 104px; } }
.hero.compact .statement { max-width: 40ch; }
.project { padding: 80px 0; border-top: 1px solid var(--line); }
main > .project:first-child { border-top: 0; }
.project-grid { display: grid; gap: 32px; }
@media (min-width: 880px) { .project-grid { grid-template-columns: 320px 1fr; gap: 56px; } .project-intro { position: sticky; top: 32px; align-self: start; } }
.project-intro h2 { font-size: clamp(2.5rem, 5.5vw, 3.2rem); font-style: italic; font-weight: 500; }
.project-intro p { margin-top: 12px; color: var(--ink-soft); }
.stack { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.stack li { font-size: .85rem; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); }
.block + .block { margin-top: 48px; }
.block > h3 { font-family: var(--sans); font-size: .95rem; font-weight: 600; color: var(--ink-soft); letter-spacing: 0; margin-bottom: 16px; }

.stats { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats li { background: var(--surface); padding: 18px 20px; }
.stats strong { display: block; font-family: var(--serif); font-weight: 600; font-size: 2.7rem; line-height: 1; font-variant-numeric: lining-nums; }
.stats span { display: block; margin-top: 6px; color: var(--ink-soft); font-size: .88rem; }

.split { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--tint); }
.split span { height: 100%; }
.split .e { background: var(--leaf); }
.split .g { background: var(--accent); }
.split .s { background: var(--accent-soft); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 12px; font-size: .92rem; color: var(--ink-soft); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; }
.asof { margin-top: 8px; font-size: .85rem; color: var(--ink-soft); }

.pipeline { list-style: none; counter-reset: step; }
.pipeline li { counter-increment: step; display: grid; grid-template-columns: 2.25rem 1fr; gap: 2px 14px; padding: 14px 0; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .95rem; }
.pipeline li:first-child { border-top: 0; padding-top: 0; }
.pipeline li::before { content: counter(step, decimal-leading-zero); grid-row: span 2; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 1.5rem; line-height: 1.2; color: var(--accent); }
.pipeline b { color: var(--ink); font-weight: 600; }

.report { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 8px 22px; }
.report li { list-style: none; display: grid; grid-template-columns: 3.2rem 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.report li:first-child { border-top: 0; }
.tag { justify-self: start; align-self: start; margin-top: 2px;font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; line-height: 1.6; }
.tag.e { background: var(--ok-bg); color: var(--ok); }
.tag.g { background: var(--tint); color: var(--accent); }
.tag.s { background: var(--tag-s-bg); color: var(--tag-s); }
.tag.intl { background: var(--neutral-bg); color: var(--ink-soft); }
.report small { display: block; color: var(--ink-soft); font-size: .85rem; margin-top: 2px; }

.tools { display: grid; gap: 14px; }
@media (min-width: 720px) { .tools { grid-template-columns: 1fr 1fr; } }
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.tool h4 { font-family: var(--serif); font-weight: 600; font-size: 1.7rem; line-height: 1.1; }
.tool p { margin-top: 8px; color: var(--ink-soft); font-size: .95rem; }
.tool .yields { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--ink); }
.tool .yields b { color: var(--accent); font-weight: 600; }
.facts { list-style: none; display: grid; gap: 10px; }
@media (min-width: 640px) { .facts { grid-template-columns: 1fr 1fr; } }
.facts li { position: relative; padding-left: 20px; color: var(--ink-soft); }
.facts li::before { content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--accent-mid); }

@media (max-width: 520px) {
  .hero { padding-top: 48px; padding-bottom: 72px; }
  .glance div { grid-template-columns: 5.5rem 1fr; }
  .section, .project { padding: 56px 0; }
}

/* Tools page */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tool-page { padding-top: 56px; padding-bottom: 24px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px; }
.panel h2, .results-head h2, .about-data h2 { font-size: 2.1rem; font-style: italic; font-weight: 500; }
.hint { color: var(--ink-soft); font-size: .92rem; }
.form-error { color: var(--err); font-size: .92rem; min-height: 1.2em; margin-top: 8px; }
.gate { max-width: 520px; }
.gate .hint { margin-top: 6px; }
.gate-row { display: flex; gap: 10px; margin-top: 18px; }
.gate-row input { flex: 1; min-width: 0; }
input[type="password"], textarea, select {
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px;
}
input[type="password"]:focus, textarea:focus, select:focus { outline: 2px solid var(--accent-mid); outline-offset: 1px; border-color: var(--accent-mid); }
textarea { width: 100%; resize: vertical; line-height: 1.6; }
.btn { border: 0; cursor: pointer; font-family: inherit; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.setup-grid { display: grid; gap: 28px; }
@media (min-width: 880px) { .setup-grid { grid-template-columns: 1.4fr 1fr; gap: 40px; } }
.field { display: grid; gap: 8px; }
.field > label, .field .label, legend { font-weight: 600; font-size: .95rem; }
.field-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.link-btn { color: var(--accent); font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.column-pick { display: grid; gap: 6px; font-size: .92rem; }
.options { display: grid; gap: 22px; align-content: start; }
fieldset { border: 0; display: grid; gap: 10px; }
legend { margin-bottom: 8px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.check:has(input:checked) { border-color: var(--accent-mid); background: var(--tint); }
.check input { margin-top: 5px; accent-color: var(--accent); width: 16px; height: 16px; }
.check b { display: block; font-weight: 600; }
.check span { color: var(--ink-soft); font-size: .9rem; }
.check span b { color: var(--ink); font-size: 1rem; }
.year-row { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); }
.setup-actions { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.setup-actions .form-error { margin: 0; }

.results-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.results-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.results > .hint { margin-top: 6px; }
.sites { list-style: none; margin-top: 24px; display: grid; gap: 14px; }
.site { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px; }
.site[data-state="running"] { border-color: var(--accent-mid); }
.site-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.site-head h3 { font-family: var(--sans); font-size: 1.08rem; font-weight: 600; letter-spacing: 0; line-height: 1.4; }
.site-sub { color: var(--ink-soft); font-size: .88rem; margin-top: 2px; }
.pill { flex: none; font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--neutral-bg); color: var(--ink-soft); }
.pill.running { background: var(--tint); color: var(--accent); }
.pill.done { background: var(--ok-bg); color: var(--ok); }
.pill.error { background: var(--err-bg); color: var(--err); }
.site-step { margin-top: 14px; color: var(--ink-soft); font-size: .95rem; display: flex; align-items: center; gap: 10px; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.site-error { margin-top: 12px; color: var(--err); font-size: .95rem; }
.site-note { margin-top: 12px; color: var(--ink-soft); font-size: .88rem; }
.figures { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 12px; margin-top: 18px; }
@media (min-width: 720px) { .figures { grid-template-columns: repeat(6, 1fr); } }
.figures strong { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.9rem; line-height: 1; font-variant-numeric: lining-nums; }
.figures span { font-size: .85rem; color: var(--ink-soft); }
.npp { margin-top: 20px; }
.npp-title { font-size: .92rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 8px; }
.bars { list-style: none; display: grid; gap: 6px; }
.bars li { display: grid; grid-template-columns: 3rem 1fr 6.5rem; gap: 12px; align-items: center; font-size: .9rem; }
.bars .yr { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.bars .bar { height: 10px; background: var(--tint); border-radius: 999px; overflow: hidden; }
.bars .bar i { display: block; height: 100%; background: var(--leaf); border-radius: 999px; }
.bars .val { text-align: right; font-variant-numeric: tabular-nums; }
.species-list { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.species-list summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .95rem; }
.table-scroll { max-height: 420px; overflow: auto; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; }
.species-list table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.species-list th { position: sticky; top: 0; background: var(--bg); text-align: left; font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.species-list td { padding: 8px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.species-list .cn { display: block; }
.species-list td i { color: var(--ink-soft); font-size: .85rem; }
.species-list .num { text-align: right; font-variant-numeric: tabular-nums; }
.species-list + .hint, .species-list .hint { margin-top: 8px; }
.badge-s { display: inline-block; font-size: .75rem; font-weight: 600; padding: 1px 7px; border-radius: 6px; margin: 1px 0; white-space: nowrap; }
.badge-s.threat { background: var(--err-bg); color: var(--err); }
.badge-s.prot { background: var(--tint); color: var(--accent); }
.badge-s.endemic { background: var(--ok-bg); color: var(--ok); }
.badge-s.intro { background: var(--neutral-bg); color: var(--ink-soft); }

.about-data { margin-top: 64px; padding-top: 48px; border-top: 1px solid var(--line); }
.about-data dl { display: grid; gap: 18px; margin-top: 20px; }
@media (min-width: 880px) { .about-data dl { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.about-data dt { font-weight: 600; }
.about-data dd { margin-top: 4px; color: var(--ink-soft); font-size: .95rem; }

/* Try It: one card per usable tool */
.tool-cards { list-style: none; display: grid; gap: 20px; padding: 8px 0 88px; }
@media (min-width: 880px) { .tool-cards { grid-template-columns: 1fr 1fr; } }
.tool-card { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; }
.tool-card h2 { font-size: 2.2rem; font-style: italic; font-weight: 500; }
.tool-card-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tool-lock { color: var(--ink-soft); font-size: .85rem; }
.tool-card-lede { color: var(--ink-soft); }
.tool-io { display: grid; gap: 10px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tool-io > div { display: grid; grid-template-columns: 5.5rem 1fr; gap: 12px; }
:lang(zh-Hant) .tool-io > div { grid-template-columns: 3rem 1fr; }
.tool-io dt { color: var(--accent); font-weight: 600; font-size: .9rem; padding-top: 2px; }
.tool-io dd { font-size: .96rem; }
.tool-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.tool-tags li { padding: 3px 10px; border-radius: 999px; background: var(--tint); color: var(--ink); font-size: .82rem; }
.tool-card .actions { margin-top: auto; padding-top: 4px; }
.tool-card.soon { background: transparent; border-style: dashed; justify-content: center; }
.tool-card.soon h2 { color: var(--ink-soft); }
.link-more { font-weight: 600; text-decoration: none; }
.crumb { display: inline-block; margin-bottom: 14px; color: var(--ink-soft); font-size: .92rem; text-decoration: none; }
.crumb:hover { color: var(--ink); }
:lang(zh-Hant) .tool-card h2:not([data-zh]) { font-style: italic; }

/* ESG Daily News: live excerpt and email sign-up */
.report a { color: var(--ink); text-decoration: none; }
.report a:hover { color: var(--accent); text-decoration: underline; }
.subscribe .hint { margin-top: 6px; color: var(--ink-soft); }
.sub-form { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.sub-form input { flex: 1 1 220px; min-width: 0; padding: 11px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: inherit; color: var(--ink); }
.sub-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.sub-msg { margin-top: 10px; font-size: .95rem; }
.sub-msg:empty { display: none; }
.sub-msg.ok { color: var(--ok); }
.sub-msg.err { color: var(--err); }
.fineprint { margin-top: 12px; font-size: .82rem; color: var(--ink-soft); }

/* Admin */
.admin-bar { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--hero-mid), var(--bg)); }
.admin-bar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 16px; padding-bottom: 16px; }
.admin-user { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); font-size: .92rem; }
.btn.small { padding: 6px 14px; font-size: .88rem; }
.admin-main { padding-top: 48px; padding-bottom: 64px; }
.admin-signin { max-width: 440px; margin: 40px auto; text-align: center; }
.admin-signin h1, .admin-head h1 { font-size: 2.4rem; font-style: italic; font-weight: 500; }
.admin-signin .hint { margin-top: 6px; }
.gbutton { display: flex; justify-content: center; margin-top: 22px; min-height: 44px; }
.admin-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.admin-stats { margin-top: 24px; }
.admin-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.admin-tools input { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 9px 14px; width: min(100%, 320px); }
.admin-tools input:focus { outline: 2px solid var(--accent-mid); outline-offset: 1px; border-color: var(--accent-mid); }
.admin-table { max-height: none; margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
.admin-table table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.admin-table th { text-align: left; font-weight: 600; padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table td { padding: 10px 16px; border-top: 1px solid var(--line); }
.admin-table tr:first-child td { border-top: 0; }
.admin-table td:nth-child(1) { word-break: break-all; }
.admin-table td:nth-child(3) { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.admin-table td:last-child { text-align: right; }
.admin-table .empty { text-align: center; color: var(--ink-soft); padding: 28px; }
.link-danger { border: 0; background: none; color: var(--err); font: inherit; font-weight: 600; cursor: pointer; padding: 2px 4px; border-radius: 4px; }
.link-danger:hover { text-decoration: underline; }
.link-danger:disabled { opacity: .5; cursor: default; }
.admin-note { margin-top: 12px; }
.intro-subscribe { margin-top: 28px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.intro-subscribe h3 { font-family: var(--sans); font-size: 1rem; font-weight: 600; letter-spacing: 0; color: var(--ink); }
.intro-subscribe .hint { font-size: .9rem; }
.intro-subscribe .sub-form input { flex-basis: 100%; }
.intro-subscribe .sub-form .btn { width: 100%; justify-content: center; }

/* Member sign-in link in the nav */
.member-link { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass-65); color: var(--ink); font: 600 .85rem var(--sans); text-decoration: none; white-space: nowrap; backdrop-filter: blur(6px); max-width: 12ch; overflow: hidden; text-overflow: ellipsis; }
.member-link:hover { border-color: var(--accent-mid); color: var(--ink); }
.member-link[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
@media (max-width: 560px) {
  .topnav { flex-wrap: wrap; row-gap: 10px; }
  .nav-right { display: contents; }
  .brand { margin-right: auto; }
  .member-link { order: 1; }
  .lang-toggle { order: 2; }
  .nav-right .tabs { order: 3; width: 100%; justify-content: space-between; }
  .nav-right .tabs a { flex: 1; text-align: center; padding-left: 8px; padding-right: 8px; }
}

/* Projects hero with the benefits panel beside the title */
@media (min-width: 880px) { .hero.compact.with-aside { grid-template-columns: 1fr 380px; align-items: end; } }
.member-card { position: relative; background: var(--glass-86); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 22px; padding: 22px 22px 18px; }
.member-card h2 { font-size: 1.6rem; font-style: italic; font-weight: 500; }
.perks { list-style: none; margin-top: 12px; display: grid; gap: 10px; }
.perks li { position: relative; padding-left: 22px; }
.perks li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--accent); }
.perks li:first-child::before { background: var(--accent); }
.perks b { display: block; font-weight: 600; font-size: .95rem; }
.perks span { display: block; color: var(--ink-soft); font-size: .88rem; line-height: 1.5; }
.member-card .sub-form { margin-top: 16px; }
.member-card .sub-form input { flex-basis: 100%; }
.member-card .sub-form .btn { width: 100%; justify-content: center; }
.apply-link { display: block; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-weight: 600; font-size: .9rem; }

/* Account page */
.atmosphere.slim { padding-bottom: 8px; }
.account-main { padding-top: 48px; padding-bottom: 64px; min-height: 60vh; }
.account-card { max-width: 560px; margin: 0 auto; }
.account-card h1, .account-head h1 { font-size: 2.4rem; font-style: italic; font-weight: 500; }
.account-card > .hint { margin-top: 6px; }
.account-card .perks { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
#signin .gbutton { justify-content: flex-start; }
.reg-fields { display: grid; gap: 14px; margin-top: 22px; }
.reg-fields label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.reg-fields input { font: inherit; font-weight: 400; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.reg-fields input:focus { outline: 2px solid var(--accent-mid); outline-offset: 1px; border-color: var(--accent-mid); }
.check-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: .95rem; cursor: pointer; }
.check-row input { margin-top: 5px; accent-color: var(--accent); }
.account-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.account-dash { max-width: 880px; margin: 0 auto; }
.account-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.status-card { margin-top: 24px; border-left: 4px solid var(--accent-soft); }
.status-card.approved { border-left-color: var(--leaf); }
.status-card.rejected { border-left-color: var(--line-strong); }
.status-card h2 { font-size: 1.7rem; font-style: italic; font-weight: 500; }
.status-card p { margin-top: 6px; color: var(--ink-soft); }
.account-grid { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 720px) { .account-grid { grid-template-columns: 1fr 1fr; } }
.account-grid h2 { font-size: 1.6rem; font-style: italic; font-weight: 500; }
.account-grid .hint { margin-top: 4px; }
.switch { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; font-weight: 600; cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); }
.usage { list-style: none; display: grid; gap: 10px; margin-top: 14px; }
.usage li { display: grid; grid-template-columns: 8.5rem 1fr 4.5rem; gap: 10px; align-items: center; font-size: .92rem; }
.usage .bar { height: 8px; background: var(--tint); border-radius: 999px; overflow: hidden; }
.usage .bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.usage .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-soft); }

/* Admin tabs and member review */
.admin-tabs { display: flex; gap: 4px; padding: 4px; width: fit-content; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 28px; }
.admin-tabs button { border: 0; background: none; padding: 7px 16px; border-radius: 999px; font: 600 .92rem var(--sans); color: var(--ink-soft); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.admin-tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.admin-tabs .count { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--err-strong); color: #fff; font-size: .75rem; line-height: 20px; text-align: center; }
.admin-table small { color: var(--ink-soft); }
.admin-table tr[data-status="pending"] td { background: var(--pending-row); }
.status-cell { white-space: nowrap; }
.status-pill { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; margin-right: 6px; }
.status-pill.pending { background: var(--warn-bg); color: var(--warn); }
.status-pill.approved { background: var(--ok-bg); color: var(--ok); }
.status-pill.rejected { background: var(--neutral-bg); color: var(--ink-soft); }
.link-ok { border: 0; background: none; color: var(--ok); font: inherit; font-weight: 600; cursor: pointer; padding: 2px 4px; border-radius: 4px; }
.link-ok:hover { text-decoration: underline; }
.link-ok:disabled { opacity: .5; cursor: default; }

/* Privacy page */
.legal { padding-top: 16px; padding-bottom: 64px; }
.legal section { max-width: 720px; }
.hero .hint { margin-top: 14px; }
.legal h1 { font-size: 2.6rem; font-style: italic; font-weight: 500; }
.legal section { margin-top: 32px; }
.legal h2 { font-size: 1.6rem; font-style: italic; font-weight: 500; margin-bottom: 10px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { padding-left: 20px; display: grid; gap: 8px; }
.legal b { color: var(--ink); font-weight: 600; }
.add-member { margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; }
.add-member summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.add-member-form { display: grid; gap: 10px; margin: 14px 0 8px; }
@media (min-width: 880px) { .add-member-form { grid-template-columns: 1.4fr 1fr 1fr 1fr auto; align-items: end; } #add-member { grid-template-columns: 1.4fr 1fr 1fr 1fr auto auto; } }
.add-member-form label { display: grid; gap: 4px; font-size: .88rem; font-weight: 600; }
.add-member-form .am-summit { display: flex; align-items: center; gap: 6px; padding-bottom: 8px; }
.add-member-form .am-summit input { padding: 0; }
.add-member-form input { font: inherit; font-weight: 400; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; min-width: 0; }

/* Compact benefits panel in the Projects hero */
@media (min-width: 880px) { .hero.compact.with-aside { grid-template-columns: 1fr 360px; align-items: end; } }
.member-card { padding: 18px 20px; }
.member-card h2 { font-size: 1.35rem; }
.perks-compact { list-style: none; margin-top: 8px; display: grid; gap: 4px; font-size: .88rem; }
.perks-compact li { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; }
.perks-compact b { font-weight: 600; }
.perks-compact span { color: var(--ink-soft); font-size: .82rem; }
.perks-compact li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--accent); flex: none; align-self: center; }
.perks-compact li:first-child::before { background: var(--accent); }
.member-card .sub-inline { flex-wrap: nowrap; margin-top: 12px; }
.member-card .sub-inline input { flex: 1 1 auto; padding: 9px 14px; }
.member-card .sub-inline .btn { width: auto; flex: none; padding: 9px 16px; }
.member-card .apply-link { margin-top: 10px; padding-top: 10px; font-size: .85rem; }

/* No flash of English when Chinese is saved; reveals anyway after 1.5s if a script fails */
.lang-pending body { visibility: hidden; animation: reveal 0s 1.5s forwards; }
@keyframes reveal { to { visibility: visible; } }
.member-link { min-width: 68px; text-align: center; }

/* Motion: slow drifting contours, one fade-up for the page title, gentle lift on cards */
.contours g { animation: drift 38s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate(-30px, 0); } to { transform: translate(30px, -10px); } }
.hero > div:first-child > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero > div:first-child > *:nth-child(2) { animation-delay: .08s; }
.hero > div:first-child > *:nth-child(3) { animation-delay: .16s; }
.hero > div:first-child > *:nth-child(4) { animation-delay: .24s; }
.member-card, .glance { animation: rise .8s .2s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.teaser a, .focus article, .tool, .site, .panel.status-card { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.teaser a:hover, .focus article:hover, .tool:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -20px var(--shadow-ink); }
.tabs a, .member-link, .lang-toggle, .btn { transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.tier { display: inline-block; font: 600 .72rem var(--sans); letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; margin-right: 6px; vertical-align: 1px; }
.tier.seedling { background: var(--tint); color: var(--accent); }
.tier.grove { background: var(--accent); color: #fff; }
@media (prefers-reduced-motion: reduce) {
  .contours g, .hero > div:first-child > *, .member-card, .glance { animation: none; }
  .teaser a:hover, .focus article:hover, .tool:hover { transform: none; }
}

/* Membership tiers: two floating cards beside the Projects title */
@media (min-width: 880px) { .hero.compact.with-aside { grid-template-columns: 1fr 380px; } }
.tiers { display: grid; gap: 14px; position: relative; }
.tier-card { border-radius: 20px; padding: 16px 18px; box-shadow: 0 18px 40px -26px var(--shadow-ink-strong); animation: rise .8s .2s cubic-bezier(.2, .7, .2, 1) both, float 7s ease-in-out 1s infinite; }
.tier-card.seedling { background: linear-gradient(160deg, var(--surface) 0%, var(--seedling-end) 100%); border: 1px solid var(--line); }
.tier-card.grove { background: linear-gradient(160deg, var(--grove-top) 0%, var(--ink) 100%); color: #fff; animation-delay: .32s, 2.6s; }
.tier-card.summit { background: linear-gradient(160deg, var(--summit-top) 0%, var(--summit-bottom) 100%); color: #fff; border: 1px solid var(--gold-line); }
.summit .tier-icon { color: var(--gold); }
.summit .tier-tag { background: var(--gold-tint); color: var(--gold-soft); }
.summit h2 span { color: var(--gold-text); }
.summit > p { color: var(--on-dark-soft); }
@media (min-width: 880px) {
  .tier-card.seedling { margin-right: 26px; transform-origin: left; }
  .tier-card.grove { margin-left: 26px; }
}
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
.tier-top { display: flex; align-items: center; gap: 8px; }
.tier-icon { width: 20px; height: 20px; color: var(--accent); flex: none; }
.grove .tier-icon { color: var(--mint-icon); }
.tier-card h2 { font-size: 1.45rem; font-style: italic; font-weight: 500; line-height: 1; }
.tier-card h2 span { font-family: var(--sans); font-style: normal; font-size: .78rem; font-weight: 600; color: var(--ink-soft); margin-left: 4px; vertical-align: 2px; }
.grove h2 span { color: var(--on-grove-h); }
.tier-tag { margin-left: auto; font: 600 .72rem var(--sans); padding: 3px 9px; border-radius: 999px; background: var(--tint); color: var(--accent); white-space: nowrap; }
.grove .tier-tag { background: var(--mint-tint); color: var(--mint); }
.tier-card > p { margin-top: 8px; font-size: .86rem; line-height: 1.5; color: var(--ink-soft); }
.grove > p { color: var(--on-grove-p); }
.tier-card .sub-inline { flex-wrap: nowrap; margin-top: 10px; gap: 6px; }
.tier-card .sub-inline input { flex: 1 1 auto; min-width: 0; padding: 8px 14px; font-size: .92rem; }
.tier-card .sub-inline .btn { width: auto; flex: none; padding: 8px 16px; font-size: .9rem; }
.tier-card .sub-msg { font-size: .85rem; margin-top: 8px; }
.tier-btn { margin-top: 12px; background: #fff; color: var(--ink); padding: 8px 16px; font-size: .9rem; }
.tier-btn:hover { background: var(--mint); color: var(--ink); }
.tier-btn:focus-visible { outline-color: var(--mint); }
@media (max-width: 879px) { .tiers { max-width: 520px; } }
@media (prefers-reduced-motion: reduce) { .tier-card { animation: none; } }

/* Account page: the status card is the member's floating tier card */
.account-tier { margin-top: 24px; padding: 24px 26px; border-radius: 24px; }
.account-tier .tier-top { gap: 10px; }
.account-tier .tier-icon { width: 26px; height: 26px; }
.account-tier h2 { font-size: 2.1rem; }
.account-tier h2 span { font-size: .85rem; }
.account-tier > p { font-size: .98rem; max-width: 60ch; margin-top: 10px; }
.account-tier .account-actions { margin-top: 18px; }
.account-tier.grove::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(120% 80% at 100% 0%, var(--mint-glow), transparent 60%); }
.account-tier { position: relative; overflow: hidden; }
.account-grid .panel { transition: transform .25s ease, box-shadow .25s ease; }
.account-grid .panel:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -22px var(--shadow-ink); }
.tier-card.account-tier { margin: 24px 0 0; }

/* Report comparison */
.reports { padding-top: 40px; }
.rp-controls { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.rp-views, .rp-groups { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); width: fit-content; flex-wrap: wrap; }
.rp-views button, .rp-groups button { border: 0; background: none; padding: 7px 16px; border-radius: 999px; font: 600 .9rem var(--sans); color: var(--ink-soft); cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.rp-views button[aria-pressed="true"], .rp-groups button[aria-pressed="true"] { background: var(--ink); color: #fff; }
#rp-search { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; width: min(100%, 280px); }
#rp-search:focus { outline: 2px solid var(--accent-mid); outline-offset: 1px; }
.rp-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.rp-tabs button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 13px; font: 500 .88rem var(--sans); color: var(--ink-soft); cursor: pointer; }
.rp-tabs button small { color: var(--accent); font-weight: 600; margin-left: 2px; }
.rp-tabs button[aria-pressed="true"] { border-color: var(--accent); color: var(--ink); background: var(--tint); }
.rp-view { margin-top: 22px; }
.rp-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.rp-table { max-height: 70vh; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.rp-table table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .9rem; }
.rp-table th, .rp-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; vertical-align: top; }
.rp-table thead th { position: sticky; top: 0; z-index: 2; background: var(--bg); font-weight: 600; }
.rp-table .co { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 9rem; font-weight: 600; }
.rp-table thead .co { z-index: 3; background: var(--bg); }
.rp-table .co small { display: block; font-weight: 400; color: var(--ink-soft); font-size: .78rem; }
.rp-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.rp-table td.pending { color: var(--accent-soft); font-size: .82rem; }
.rp-table .empty { text-align: center; color: var(--ink-soft); padding: 28px; }
.sort { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; padding: 0; }
.sort:hover { color: var(--accent); }
.pg { display: inline-block; margin-left: 6px; font-size: .74rem; color: var(--accent); text-decoration: none; border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; vertical-align: 1px; }
a.pg:hover { border-color: var(--accent-mid); }
.flag { border: 0; background: none; color: var(--warn); cursor: pointer; font-size: .8rem; padding: 0 2px; }
.st-yes { color: var(--ok); font-weight: 600; } .st-adopt { color: var(--accent); font-weight: 600; }
.st-plan { color: var(--warn); } .st-no { color: var(--ink-soft); } .st-none { color: var(--accent-soft); }
.rp-tip { position: absolute; z-index: 50; max-width: 300px; background: var(--ink); color: #fff; font-size: .85rem; line-height: 1.5; padding: 10px 12px; border-radius: 10px; box-shadow: 0 12px 30px -16px rgba(0, 0, 0, .5); }
.rp-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .85rem; color: var(--ink-soft); }
.rp-legend li { display: inline-flex; align-items: center; gap: 6px; }
.lv { display: inline-block; width: 14px; height: 14px; border-radius: 50%; }
.lv.full { background: var(--leaf); } .lv.part { background: var(--warn-dot); } .lv.none { background: var(--neutral-bg); border: 1px solid var(--line-strong); } .lv.na { background: transparent; border: 1px dashed var(--line-strong); }
.rp-check th:not(.co) { white-space: normal; min-width: 4.2rem; max-width: 8rem; font-size: .76rem; font-weight: 500; color: var(--ink-soft); line-height: 1.35; }
.rp-check .item-no { display: block; font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--ink); }
.rp-check .item-name { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rp-check td { text-align: center; }
.lv-btn { border: 0; background: none; padding: 4px; border-radius: 8px; cursor: pointer; }
.lv-btn:hover, .lv-btn[aria-pressed="true"] { background: var(--tint); }
.rp-detail { margin-top: 14px; }
.rp-detail-head { color: var(--ink-soft); font-size: .9rem; }
.rp-detail p + p { margin-top: 8px; }
.lv-tag { display: inline-block; font-size: .78rem; font-weight: 600; padding: 1px 9px; border-radius: 999px; margin-right: 6px; }
.lv-tag.full { background: var(--ok-bg); color: var(--ok); } .lv-tag.part { background: var(--warn-bg); color: var(--warn); } .lv-tag.none, .lv-tag.na { background: var(--neutral-bg); color: var(--ink-soft); }
.rp-catalog { list-style: none; display: grid; gap: 10px; }
@media (min-width: 720px) { .rp-catalog { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .rp-catalog { grid-template-columns: repeat(3, 1fr); } }
.rp-catalog li { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; transition: transform .25s ease, box-shadow .25s ease; }
.rp-catalog li:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -22px var(--shadow-ink); }
.rp-catalog small { display: block; color: var(--ink-soft); font-size: .82rem; }
.rp-note { margin-top: 20px; max-width: 80ch; }
@media (max-width: 560px) { .rp-table .co { min-width: 7rem; } .rp-table th, .rp-table td { padding: 8px 10px; } }
.tier-link { display: inline-block; margin: 12px 0 0 12px; color: var(--mint); font-size: .85rem; font-weight: 600; }
.tier-link:hover { color: #fff; }

.skip-link {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--surface);
  border-radius: 8px;
  font-family: var(--sans);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; outline: 2px solid var(--accent-mid); outline-offset: 2px; }

/* CDP 2026 simulator (tools/cdp-simulator) */
.cdp-page { max-width: 1280px; }
.cdp-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.cdp-views, .cdp-tools, .cdp-themes { display: flex; flex-wrap: wrap; gap: 8px; }
.cdp-themes { margin: 14px 0; }
.cdp-views .btn[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.cdp-import { cursor: pointer; }
.cdp-fill { display: grid; gap: 18px; }
@media (min-width: 900px) { .cdp-fill { grid-template-columns: 250px minmax(0, 1fr); align-items: start; } .cdp-nav { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; } }
.cdp-nav { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; font-size: .88rem; }
.cdp-total { font-weight: 600; margin-bottom: 8px; }
.cdp-qlink { font: inherit; font-size: .8rem; padding: 3px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; }
.cdp-qlink.part { background: var(--warn-bg); } .cdp-qlink.done { background: var(--ok-bg); border-color: var(--leaf); }
.cdp-qlink.cur { outline: 2px solid var(--accent); }
.cdp-card h2 { font-size: 1.5rem; font-style: normal; line-height: 1.35; }
.cdp-qid { font-weight: 700; color: var(--accent); margin-right: 6px; }
.cdp-crumb, .cdp-tags { color: var(--ink-soft); font-size: .85rem; margin: 4px 0; }
.cdp-tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: 1px 9px; border-radius: 999px; background: var(--tint); color: var(--accent); margin-right: 4px; }
.cdp-tag.soft { background: var(--neutral-bg); color: var(--ink-soft); }
.cdp-req { color: var(--err); }
.cdp-cond { font-size: .84rem; color: var(--ink-soft); background: var(--bg); border-left: 3px solid var(--accent-soft); padding: 6px 10px; margin: 8px 0; }
.cdp-src-note { display: block; font-size: .72rem; font-weight: 500; color: var(--ink-soft); font-style: italic; }
.cdp-single, .cdp-card .table-scroll { margin: 14px 0; }
.cdp-card select, .cdp-card input[type="text"], .cdp-card input[type="number"], .cdp-card input[type="date"], .cdp-card textarea, .cdp-mfoot input[type="number"] { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); max-width: 100%; }
.cdp-card textarea { width: 100%; min-width: 14rem; }
.cdp-card select { min-width: 10rem; }
.cdp-num { display: inline-flex; align-items: center; gap: 4px; }
.cdp-num input { width: 9rem; }
.cdp-count { display: block; font-size: .75rem; color: var(--ink-soft); text-align: right; }
.cdp-multi { display: grid; gap: 4px; max-height: 18rem; overflow: auto; padding: 6px; border: 1px solid var(--line); border-radius: 10px; min-width: 14rem; }
.cdp-group { border: 0; border-top: 1px solid var(--line); padding: 6px 0 0; margin: 4px 0 0; }
.cdp-group legend { font-weight: 600; font-size: .82rem; color: var(--ink-soft); padding: 0 4px; }
.cdp-opt, .cdp-check { display: flex; align-items: flex-start; gap: 8px; font-size: .92rem; cursor: pointer; }
.cdp-yesno { display: flex; gap: 16px; }
.cdp-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cdp-table th, .cdp-table td { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; text-align: left; }
.cdp-table thead th { background: var(--bg); position: sticky; top: 0; }
.cdp-table tbody th[scope="row"] { background: var(--bg); font-weight: 600; min-width: 8rem; }
.cdp-grow th { background: var(--tint); }
.cdp-na { color: var(--ink-soft); }
.cdp-guide { margin-top: 14px; font-size: .9rem; color: var(--ink-soft); }
.cdp-guide summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.cdp-guide p, .cdp-guide li { margin-top: 6px; }
.cdp-pager { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 10px; }
.cdp-setup-grid { margin-top: 16px; }
.cdp-fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.cdp-src { margin-top: 14px; max-width: 80ch; }
.cdp-res, .cdp-gaps { margin-top: 16px; }
.cdp-grade { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.cdp-grade-v { font-family: var(--serif); font-size: 4rem; font-weight: 600; line-height: 1; color: var(--accent); }
.cdp-grade-l { font-weight: 600; }
.cdp-levels { list-style: none; display: grid; gap: 14px; margin: 18px 0; }
.cdp-lv-h { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cdp-bar-track { height: 10px; border-radius: 999px; background: var(--tint); overflow: hidden; margin-top: 6px; }
.cdp-bar-fill { height: 100%; background: var(--accent); }
.cdp-bar-fill.lv-A { background: var(--accent-mid); } .cdp-bar-fill.lv-M { background: var(--leaf); } .cdp-bar-fill.lv-L { background: var(--ok); }
.cdp-blocker { background: var(--warn-bg); color: var(--warn); padding: 8px 12px; border-radius: 10px; }
.cdp-gap-list { list-style: none; display: grid; gap: 8px; margin: 12px 0; }
.cdp-gap { display: grid; gap: 4px; width: 100%; text-align: left; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; cursor: pointer; }
.cdp-gap:hover { border-color: var(--accent-mid); }
.cdp-gap-h { display: flex; align-items: center; gap: 8px; }
.cdp-gain { margin-left: auto; font-weight: 700; color: var(--leaf); }
.cdp-gap-q { color: var(--ink-soft); font-size: .85rem; }
.cdp-gap-b { font-size: .92rem; }
.cdp-mlist { display: grid; gap: 14px; margin: 12px 0; }
.cdp-mcard { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--surface); }
.cdp-mcard.ok { border-color: var(--leaf); }
.cdp-mcard header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cdp-mcard h4 { margin: 10px 0 4px; font-size: .9rem; }
.cdp-mlist-ul { list-style: none; display: grid; gap: 6px; }
.cdp-detail { margin: 2px 0 0 28px; font-size: .84rem; color: var(--ink-soft); }
.cdp-sug, .cdp-scope { color: var(--ink-soft); font-size: .82rem; }
.cdp-mfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 12px; }
.cdp-mfoot input[type="number"] { width: 7rem; }
button.cdp-jump { background: none; border: 0; cursor: pointer; font: inherit; font-weight: 700; padding: 0; }
@media (max-width: 640px) { .cdp-card { padding: 18px; } .cdp-grade-v { font-size: 3rem; } }
.cdp-version { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; }
.cdp-version select { max-width: 11rem; }
.cdp-diff { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 8px; font-size: 0.7rem; font-weight: 600; vertical-align: middle; background: var(--ok-bg); color: var(--ok); }
.cdp-diff.changed { background: var(--warn-bg); color: var(--warn); }
.cdp-diffsum p { margin: 4px 0; }

/* CDP simulator: one module navigator in the sidebar, whole-module view, skipped questions */
.cdp-modlist { list-style: none; display: grid; gap: 2px; }
.cdp-modrow { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; width: 100%; text-align: left; font: inherit; font-size: .86rem; padding: 7px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; }
.cdp-modrow:hover { background: var(--bg); }
.cdp-modlist > li.cur > .cdp-modrow { background: var(--tint); font-weight: 600; }
.cdp-modrow-t { min-width: 0; }
.cdp-modrow-n { color: var(--ink-soft); font-variant-numeric: tabular-nums; font-weight: 500; }
.cdp-modrow.done .cdp-modrow-n { color: var(--ok); }
.cdp-modrow-bar { grid-column: 1 / -1; height: 3px; border-radius: 999px; background: var(--line); overflow: hidden; }
.cdp-modrow-bar i { display: block; height: 100%; background: var(--leaf); }
.cdp-qchips { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 4px 10px; }
@media (max-width: 899px) {
  /* Phones: modules scroll sideways; the current module's question numbers sit below them */
  .cdp-modlist { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .cdp-modlist > li { flex: none; display: contents; }
  .cdp-modrow { flex: none; width: auto; min-width: 7.5rem; border: 1px solid var(--line); background: var(--surface); }
  .cdp-modlist > li.cur > .cdp-qchips { display: none; } /* the module's questions are all on the page anyway */
}
.cdp-modhead { font-size: 1.6rem; margin-bottom: 12px; }
.cdp-modhead .hint { font-family: var(--sans); font-size: .9rem; font-weight: 500; margin-left: 8px; }
.cdp-q > .cdp-card + .cdp-card { margin-top: 16px; }
.cdp-card.cur { border-color: var(--accent); }
.cdp-card { scroll-margin-top: 16px; }
.cdp-skipped { background: transparent; border-style: dashed; padding-top: 14px; padding-bottom: 14px; }
.cdp-skipped h2 { font-size: 1.05rem; color: var(--ink-soft); }
.cdp-skip-mark { display: inline-block; margin-left: 6px; font-family: var(--sans); font-size: .72rem; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--neutral-bg); color: var(--ink-soft); vertical-align: 2px; }
.cdp-qlink.skip { background: transparent; border-style: dashed; color: var(--ink-soft); }
.cdp-qlink .cdp-skip-mark { margin-left: 4px; font-size: .66rem; padding: 0 5px; vertical-align: 1px; }
.cdp-cond-ok { border-left-color: var(--leaf); }
.cdp-fill > * { min-width: 0; } /* let the module row scroll on phones instead of widening the page */
.tier-btn.admin-go { background: transparent; color: inherit; border: 1px solid currentColor; } /* admin dashboard: the way into /admin */

/* CDP simulator: compact page header and question header */
.cdp-hero { padding-top: 8px; padding-bottom: 20px; }
.cdp-hero h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.cdp-hero .statement { font-size: 1rem; margin-top: 6px; max-width: 60ch; }
.cdp-hero .crumb { margin-bottom: 6px; }
.cdp-qhead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; font-size: .78rem; }
.cdp-qhead .cdp-qid { font-size: .95rem; margin-right: 2px; }
.cdp-pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-weight: 600; background: var(--tint); color: var(--accent); }
.cdp-pill.req { background: var(--err-bg); color: var(--err); }
.cdp-pill.soft { background: var(--neutral-bg); color: var(--ink-soft); font-weight: 500; }
.cdp-card h2.cdp-qtext { font-family: var(--sans); font-style: normal; font-size: 1.06rem; font-weight: 600; line-height: 1.5; letter-spacing: 0; }
.cdp-skipped h2.cdp-qtext { font-size: .95rem; font-weight: 500; color: var(--ink-soft); }

/* admin: broadcast tab */
.bc-form { margin-top: 24px; display: grid; gap: 16px; }
.bc-draft { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.bc-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.bc-col { margin: 0; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 12px; }
.bc-col legend { padding: 0 6px; font-weight: 600; color: var(--ink-soft); }
.bc-col label { display: grid; gap: 6px; font-size: .92rem; font-weight: 600; }
.bc-col input, .bc-col textarea { font: inherit; font-weight: 400; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; width: 100%; box-sizing: border-box; }
.bc-col input:focus, .bc-col textarea:focus { outline: 2px solid var(--accent-mid); outline-offset: 1px; border-color: var(--accent-mid); }
.bc-actions { display: flex; flex-wrap: wrap; gap: 12px; }
#bc-progress { width: 100%; margin-top: 16px; }
.bc-title { margin-top: 32px; font-size: 1.4rem; }
