/* ==========================================================================
   Chemical and Pulping Ltd — site stylesheet
   Palette: deep navy / CPL blue / pine green accent / warm brass / paper
   No external fonts: system stacks so the site renders identically in China.
   ========================================================================== */

:root {
  --navy: #0f2a44;
  --navy-2: #163a5c;
  --blue: #1f4e8c;
  --blue-soft: #e8eef7;
  --green: #2f6b3a;
  --green-soft: #e7f0e8;
  --brass: #b8893b;
  --paper: #f6f4ee;
  --white: #ffffff;
  --ink: #1a1f27;
  --ink-2: #4a5260;
  --ink-3: #7a8290;
  --line: #dcd8cf;
  --shadow: 0 10px 30px rgba(15, 42, 68, .12);
  --shadow-sm: 0 2px 8px rgba(15, 42, 68, .08);
  --radius: 6px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, "Songti SC", "STSong", "SimSun", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --header-h: 76px;
  color-scheme: light;
}
.lang-zh { --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", Georgia, serif; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.65; color: var(--ink); background: var(--paper); }
.lang-zh body, body.lang-zh { line-height: 1.85; letter-spacing: .01em; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--navy); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-2); max-width: 60ch; }
.lead-sm { color: var(--ink-2); max-width: 70ch; }
.eyebrow { font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .16em; color: var(--brass); font-weight: 700; margin-bottom: .8em; }
.lang-zh .eyebrow { letter-spacing: .3em; }
.note { font-size: .85rem; color: var(--ink-3); }
.center { text-align: center; }
.right { text-align: right; }
.narrow { max-width: 640px; margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

/* Buttons */
.btn { display: inline-block; padding: .8em 1.5em; border-radius: var(--radius); font-weight: 600; font-size: .95rem; border: 1.5px solid transparent; transition: transform .2s ease, box-shadow .2s ease, background .2s; text-decoration: none; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--navy); }
.btn-light { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.6); backdrop-filter: blur(4px); }
.btn-light:hover { background: rgba(255,255,255,.26); }
.btn-ghost { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-ghost:hover { background: var(--blue-soft); }
.links-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(246,244,238,.92); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); transition: box-shadow .3s; }
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .8rem; color: var(--navy); text-decoration: none; margin-right: auto; }
.brand:hover { text-decoration: none; }
.brand img { width: auto; height: 46px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--serif); font-size: 1.05rem; }
.brand-text small { font-size: .72rem; color: var(--ink-3); letter-spacing: .02em; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .2rem; align-items: center; }
.site-nav li { position: relative; }
.site-nav a { display: block; padding: .55rem .8rem; color: var(--ink); font-weight: 500; border-radius: var(--radius); }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--blue); text-decoration: none; background: var(--blue-soft); }
.sub-toggle { display: none; }
.site-nav .sub { position: absolute; top: 100%; left: 0; min-width: 260px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: .4rem; display: none; flex-direction: column; gap: 0; }
.site-nav .sub a { padding: .55rem .8rem; font-weight: 400; }
.site-nav .has-sub:hover .sub, .site-nav .has-sub:focus-within .sub { display: flex; }
.header-tools { display: flex; align-items: center; gap: .6rem; }
.lang-menu { position: relative; }
.lang-btn { display: flex; align-items: center; gap: .4rem; font: inherit; font-weight: 600; font-size: .92rem; padding: .45rem .7rem; border: 1.5px solid var(--line); border-radius: var(--radius); color: var(--navy); background: #fff; cursor: pointer; }
.lang-btn:hover { border-color: var(--blue); }
.lang-list { position: absolute; right: 0; top: calc(100% + .4rem); list-style: none; margin: 0; padding: .3rem; min-width: 150px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: none; z-index: 60; }
.lang-menu.open .lang-list, .lang-menu:focus-within .lang-list { display: block; }
.lang-list a { display: block; padding: .5rem .8rem; color: var(--ink); border-radius: 4px; }
.lang-list a:hover { background: var(--blue-soft); text-decoration: none; }
.lang-list a[aria-current] { color: var(--blue); font-weight: 600; }
.burger { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; padding: 8px; }
.burger span { display: block; height: 2px; background: var(--navy); transition: transform .25s, opacity .25s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .brand-text small { display: none; }
  .burger { display: flex; }
  /* header has backdrop-filter, which makes it the containing block for fixed children — so position the panel absolutely below it */
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); background: var(--paper); overflow: auto; padding: 1rem var(--gutter) 2rem; transform: translateX(100%); transition: transform .3s ease; visibility: hidden; }
  .site-nav.open { visibility: visible; }
  .site-nav.open { transform: none; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a { padding: .9rem .6rem; font-size: 1.1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav .has-sub { display: grid; grid-template-columns: 1fr auto; }
  .sub-toggle { display: flex; align-items: center; justify-content: center; width: 48px; border: 0; background: none; border-bottom: 1px solid var(--line); color: var(--navy); }
  .sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .site-nav .sub { position: static; display: none; grid-column: 1 / -1; box-shadow: none; border: 0; background: var(--blue-soft); border-radius: var(--radius); padding: .2rem .6rem; margin: .3rem 0 .6rem; }
  .site-nav .sub.open { display: flex; }
  .site-nav .has-sub:hover .sub:not(.open) { display: none; }
}
@media (max-width: 480px) { .brand-text { display: none; } .brand img { height: 40px; } }

/* ==========================================================================
   Hero, page hero, bands (parallax)
   ========================================================================== */
.hero, .page-hero, .band, .cta-band { position: relative; overflow: hidden; isolation: isolate; color: #fff; }
.hero-bg { position: absolute; inset: -20% 0; background: var(--hero) center / cover no-repeat; z-index: -2; will-change: transform; }
.hero::after, .page-hero::after, .cta-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(15,42,68,.92) 0%, rgba(15,42,68,.72) 45%, rgba(15,42,68,.35) 100%); }
.band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(rgba(15,42,68,.55), rgba(15,42,68,.55)); }
.hero { min-height: min(88vh, 820px); display: flex; flex-direction: column; justify-content: center; padding: clamp(3rem, 8vw, 6rem) 0 0; }
.hero .hero-text { max-width: 760px; padding-bottom: 3rem; }
.hero h1, .page-hero h1, .cta-band h2 { color: #fff; }
.hero .eyebrow, .page-hero .eyebrow { color: #e5c785; }
.hero .lead, .page-hero .lead { color: rgba(255,255,255,.88); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); border-bottom: 0; backdrop-filter: blur(8px); border-radius: var(--radius) var(--radius) 0 0; margin-top: auto; }
.stat { padding: 1.3rem 1.4rem; border-right: 1px solid rgba(255,255,255,.18); }
.stat:last-child { border-right: 0; }
.stat-value { display: block; font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.1; color: #fff; font-variant-numeric: tabular-nums; }
.stat-label { display: block; font-size: .82rem; color: rgba(255,255,255,.78); margin-top: .3rem; letter-spacing: .02em; }
@media (max-width: 760px) { .stats-strip { grid-template-columns: 1fr 1fr; } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.18); } }
.page-hero { padding: clamp(4rem, 9vw, 7rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.page-hero .hero-text { max-width: 820px; }
/* brand hero (Company page): light ground, no photo, large logo beside the text */
.page-hero--logo { color: var(--ink); background: linear-gradient(120deg, #fff 0%, #f3f6fa 55%, #e8eef5 100%); border-bottom: 1px solid var(--line); }
.page-hero--logo::after { display: none; }
.page-hero--logo h1 { color: var(--navy); }
.page-hero--logo .eyebrow { color: #8a6d2b; }
.page-hero--logo .lead { color: var(--ink-2); }
.hero-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero-logo { display: flex; justify-content: center; }
.hero-logo img { width: 100%; max-width: 640px; height: auto; filter: drop-shadow(0 18px 40px rgba(15,42,68,.14)); }
@media (max-width: 760px) {
  .hero-split { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-logo { order: -1; }
  .hero-logo img { max-width: 360px; }
}
.band { height: clamp(220px, 34vw, 420px); }
.cta-band { padding: clamp(3.5rem, 8vw, 6rem) 0; text-align: center; }
.cta-band .wrap { max-width: 720px; }
.cta-band p { color: rgba(255,255,255,.88); font-size: 1.1rem; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.two-col.media-col { align-items: center; }
.head-row { margin-bottom: 2.5rem; align-items: end; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.media-frame { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 8px solid #fff; background: #fff; }
.checklist { list-style: none; padding: 0; margin: 1.2rem 0; }
.checklist li { position: relative; padding-left: 2rem; margin-bottom: .55rem; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .45em; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-6' fill='none' stroke='%232f6b3a' stroke-width='2'/%3E%3C/svg%3E") center / 75% no-repeat; }

/* Cards */
.cards { display: grid; gap: 1.4rem; margin-top: 2rem; }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1000px) { .cards-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .cards-3, .cards-2 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .cards-4 { grid-template-columns: 1fr; } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; position: relative; transition: transform .25s ease, box-shadow .25s ease; }
.section.alt .card { background: var(--paper); }
.section:not(.alt) .card { background: #fff; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--green); border-radius: var(--radius) 0 0 var(--radius); }
.card img { border-radius: 4px; margin-bottom: 1rem; border: 1px solid var(--line); }
.card h3 { margin-top: .2rem; }
.card p { color: var(--ink-2); font-size: .97rem; }
.card > a { font-weight: 600; }
.card-num { font-family: var(--serif); color: var(--brass); font-size: .9rem; letter-spacing: .1em; }

/* Featured projects grid */
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
@media (max-width: 1000px) { .feat-grid { grid-template-columns: repeat(2, 1fr); } }
.feat { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--navy); }
.feat img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.feat:hover img { transform: scale(1.05); }
.feat span { position: absolute; inset: auto 0 0 0; padding: 2.5rem 1rem 1rem; color: #fff; background: linear-gradient(transparent, rgba(15,42,68,.9)); display: flex; flex-direction: column; }
.feat small { opacity: .85; font-size: .78rem; }
.feat:hover { text-decoration: none; }

/* ==========================================================================
   Article pages
   ========================================================================== */
.article-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); padding: clamp(2.5rem, 6vw, 5rem) 0; }
.toc { position: sticky; top: calc(var(--header-h) + 1.5rem); align-self: start; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: .45rem 1rem; color: var(--ink-2); font-size: .92rem; margin-left: -2px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--blue); text-decoration: none; }
.toc a.active { color: var(--navy); border-left-color: var(--brass); font-weight: 600; }
@media (max-width: 900px) { .article-grid { grid-template-columns: 1fr; } .toc { position: static; } .toc ul { display: flex; flex-wrap: wrap; gap: .3rem; border: 0; } .toc a { border: 1px solid var(--line); border-radius: 999px; padding: .35rem .8rem; margin: 0; background: #fff; } }
.prose { max-width: 74ch; }
.prose-section { margin-bottom: 3.5rem; scroll-margin-top: calc(var(--header-h) + 1rem); }
.prose-section h2 { padding-bottom: .5rem; border-bottom: 1px solid var(--line); margin-bottom: 1.2rem; }
.prose p { font-size: 1.05rem; }
.fig { margin: 2rem 0; }
.fig img { border-radius: var(--radius); border: 1px solid var(--line); background: #fff; width: 100%; }
.fig figcaption { font-size: .88rem; color: var(--ink-3); margin-top: .6rem; }
.table-scroll { overflow-x: auto; margin: 1.5rem 0 .5rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.data { border-collapse: collapse; width: 100%; font-size: .93rem; }
table.data th, table.data td { padding: .65rem .8rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: var(--navy); color: #fff; font-weight: 600; white-space: nowrap; }
table.data tbody tr:nth-child(even) { background: #fafaf7; }
table.data tbody tr:hover { background: var(--blue-soft); }
table.data tbody tr.has-photos { cursor: pointer; }
table.data tbody tr.has-photos:hover { background: #dbe6f6; }
table.data tbody tr.has-photos:focus-visible { outline: 2px solid var(--brass); }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-caption { font-size: .9rem; color: var(--ink-2); font-style: italic; }
.person { display: grid; grid-template-columns: 160px 1fr; gap: 1.6rem; margin: 1.5rem 0 2.5rem; }
.person img, .person-placeholder { width: 160px; aspect-ratio: 1; object-fit: contain; object-position: center bottom; border-radius: var(--radius); border: 1px solid var(--line); background: var(--blue-soft); }
.person .role { color: var(--brass); font-weight: 600; margin-top: -.4rem; }
@media (max-width: 600px) { .person { grid-template-columns: 1fr; } }
.logo-row { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; }
.logo-row img { height: 72px; width: auto; background: #fff; padding: .6rem; border: 1px solid var(--line); border-radius: var(--radius); }

/* ==========================================================================
   Projects page
   ========================================================================== */
.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 760px) { .stat-tiles { grid-template-columns: 1fr 1fr; } }
.tile { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--green); border-radius: var(--radius); padding: 1.4rem; }
.tile .stat-value { color: var(--navy); }
.tile .stat-label { color: var(--ink-2); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.gcard { display: block; position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--navy); scroll-margin-top: calc(var(--header-h) + 1rem); }
.gcard img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gcard:hover img { transform: scale(1.05); }
.gcard:hover { text-decoration: none; }
.gcard-text { position: absolute; inset: auto 0 0 0; padding: 2rem .9rem .8rem; color: #fff; background: linear-gradient(transparent, rgba(15,42,68,.92)); display: flex; flex-direction: column; font-size: .9rem; line-height: 1.3; }
.gcard-text small { opacity: .8; font-size: .75rem; margin-top: .2rem; }
.gcard:target { outline: 3px solid var(--brass); }
.filters { display: grid; grid-template-columns: 2fr repeat(4, 1fr) auto; gap: .6rem; align-items: center; margin: 1.5rem 0 .5rem; }
@media (max-width: 1000px) { .filters { grid-template-columns: 1fr 1fr; } .filters input { grid-column: 1 / -1; } }
.filters input, .filters select { font: inherit; font-size: .92rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); min-width: 0; }
.filters output { font-size: .88rem; color: var(--ink-3); white-space: nowrap; }
table.refs { font-size: .84rem; min-width: 1080px; }
table.refs th, table.refs td { padding: .55rem .6rem; }
table.refs td.cust { min-width: 190px; }
table.refs td:nth-child(2), table.refs td:nth-child(3) { white-space: nowrap; }
table.refs td:last-child small { display: block; color: var(--ink-3); }
.tag { display: inline-block; padding: .1rem .5rem; border-radius: 999px; background: var(--blue-soft); color: var(--navy); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.tag.muted { background: #eee; color: var(--ink-3); }
tr[data-status="cancelled"] td { color: var(--ink-3); }
tr.hide { display: none; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(10,20,32,.97); display: flex; align-items: center; justify-content: center; padding: 3rem 4rem; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 9rem); object-fit: contain; border-radius: 4px; }
.lightbox figcaption { color: #fff; margin-top: .8rem; text-align: center; display: flex; flex-direction: column; }
.lightbox figcaption small { opacity: .75; }
.lb-count { opacity: .6; font-size: .8rem; margin-top: .2rem; }
.lightbox button[hidden] { display: none; }
.lightbox button { position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.3); width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: .8rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: .8rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 700px) { .lightbox { padding: 3.5rem .5rem 1rem; } .lb-prev, .lb-next { top: auto; bottom: .6rem; transform: none; } .lb-prev { left: 30%; } .lb-next { right: 30%; } }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 5rem); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.offices { display: grid; gap: 1rem; margin-bottom: 2rem; }
.office { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: var(--radius); padding: 1.2rem 1.4rem; }
.office h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.office p { margin: 0 0 .4rem; color: var(--ink-2); font-size: .95rem; }
.email-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.email-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.email-list span { color: var(--ink-2); }
.contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.4rem); box-shadow: var(--shadow-sm); }
.contact-form fieldset { border: 0; padding: 0; margin: 0 0 1.2rem; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; }
.check { display: flex; align-items: center; gap: .5rem; font-size: .95rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1.2rem; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.contact-form label { display: block; font-size: .88rem; font-weight: 600; color: var(--ink-2); margin-bottom: .9rem; }
.contact-form input:not([type=checkbox]), .contact-form textarea { display: block; width: 100%; font: inherit; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); margin-top: .3rem; background: var(--paper); color: var(--ink); }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--blue); background: #fff; outline: none; box-shadow: 0 0 0 3px var(--blue-soft); }
.req { color: #b23a3a; }
.hp { position: absolute; left: -9999px; }
.form-status { min-height: 1.4em; font-weight: 600; }
.form-status.ok { color: var(--green); }
.form-status.err { color: #b23a3a; }

.person.memorial { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brass); border-radius: var(--radius); padding: 1.4rem; }
.person.memorial .role { color: var(--ink-2); font-style: italic; }
.news-list { display: grid; gap: 1.2rem; margin-top: 1.5rem; }
.news-item { display: grid; grid-template-columns: 1fr; gap: 1.2rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.news-item:has(.news-media) { grid-template-columns: minmax(0, 1.2fr) 1fr; }
@media (max-width: 800px) { .news-item:has(.news-media) { grid-template-columns: 1fr; } }
.news-media { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
.news-media a { display: block; }
.news-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; cursor: zoom-in; transition: opacity .2s; }
.news-media a:hover img { opacity: .9; }
.news-media a:first-child { grid-column: 1 / -1; }
.news-media a:first-child img { aspect-ratio: 16 / 10; }
.fig a { display: block; cursor: zoom-in; }
@media (max-width: 560px) { .news-media { grid-template-columns: 1fr 1fr; } }
.news-item time { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--brass); font-weight: 700; margin-bottom: .4rem; }
.news-item h3 { margin-bottom: .4rem; }
.news-item p { margin: 0; color: var(--ink-2); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--navy); color: rgba(255,255,255,.8); padding: 4rem 0 2rem; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 2.5rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand img { width: 200px; height: auto; background: #fff; padding: .6rem .8rem; border-radius: var(--radius); margin-bottom: 1rem; }
.footer-brand p { font-size: .92rem; }
.site-footer h3 { color: #fff; font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5rem; font-size: .93rem; }
.site-footer a { color: #fff; }
.footer-offices li { margin-bottom: 1rem; line-height: 1.5; font-size: .86rem; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.15); margin-top: 3rem; padding-top: 1.5rem; font-size: .78rem; color: rgba(255,255,255,.55); }

/* ==========================================================================
   Chat widget
   ========================================================================== */
.chat { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 80; font-size: .95rem; }
.chat-launch { display: flex; align-items: center; gap: .5rem; background: var(--navy); color: #fff; border: 0; border-radius: 999px; padding: .75rem 1.2rem; font: inherit; font-weight: 600; cursor: pointer; box-shadow: var(--shadow); }
.chat-launch:hover { background: var(--blue); }
.chat-panel { position: absolute; right: 0; bottom: calc(100% + .8rem); width: min(400px, calc(100vw - 2rem)); height: min(560px, calc(100vh - 7rem)); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 20px 50px rgba(15,42,68,.3); display: flex; flex-direction: column; overflow: hidden; }
.chat-panel[hidden] { display: none; }
.chat-panel header { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; background: var(--navy); color: #fff; }
.chat-close { background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; line-height: 1; }
.chat-log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .7rem; background: var(--paper); }
.msg { max-width: 88%; padding: .6rem .85rem; border-radius: 12px; line-height: 1.5; white-space: pre-wrap; }
.msg.bot { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 3px; align-self: flex-start; }
.msg.user { background: var(--blue); color: #fff; border-bottom-right-radius: 3px; align-self: flex-end; }
.msg.err { background: #fbeaea; color: #8a2b2b; border-color: #efc9c9; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: .4rem; }
.chat-suggest button { font: inherit; font-size: .82rem; background: #fff; border: 1px solid var(--blue); color: var(--blue); border-radius: 999px; padding: .3rem .7rem; cursor: pointer; }
.chat-suggest button:hover { background: var(--blue-soft); }
.chat-form { display: flex; gap: .5rem; padding: .7rem; border-top: 1px solid var(--line); background: #fff; }
.chat-form textarea { flex: 1; font: inherit; resize: none; border: 1px solid var(--line); border-radius: 8px; padding: .55rem .7rem; max-height: 120px; }
.chat-form button { font: inherit; font-weight: 600; background: var(--blue); color: #fff; border: 0; border-radius: 8px; padding: 0 1rem; cursor: pointer; }
.chat-disclaimer { margin: 0; padding: .4rem .9rem .6rem; font-size: .7rem; color: var(--ink-3); background: #fff; }
.typing::after { content: "…"; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { to { content: ""; } }

/* Review-notes widget (dev builds) */
.review { position: fixed; left: max(1rem, env(safe-area-inset-left)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 80; font-size: .9rem; }
.review-launch { background: var(--brass); color: #fff; border: 0; border-radius: 999px; padding: .65rem 1.1rem; font: inherit; font-weight: 700; cursor: pointer; box-shadow: var(--shadow); }
.review-panel { position: absolute; left: 0; bottom: calc(100% + .6rem); width: min(340px, calc(100vw - 2rem)); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 1rem; display: flex; flex-direction: column; gap: .55rem; }
.review-panel[hidden] { display: none; }
.review-panel input, .review-panel textarea { font: inherit; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 6px; resize: vertical; }
.review-row { display: flex; align-items: center; gap: .6rem; }
.review-panel button { font: inherit; font-weight: 600; background: var(--navy); color: #fff; border: 0; border-radius: 6px; padding: .5rem .9rem; cursor: pointer; }
.review-status { font-size: .8rem; color: var(--ink-2); }
@media (max-width: 700px) { .review { bottom: max(4.5rem, env(safe-area-inset-bottom)); } }

/* ==========================================================================
   Motion: reveal on scroll (opt-out with reduced motion)
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease var(--d, 0ms), transform .7s ease var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-bg { inset: 0; transform: none !important; }
  .feat img, .gcard img, .card { transition: none; }
}
.no-js .reveal { opacity: 1; transform: none; }

@media print {
  .site-header, .chat, .cta-band, .band, .hero-bg, .filters, .burger { display: none !important; }
  .hero, .page-hero { color: var(--ink); } .hero::after, .page-hero::after { display: none; }
  .hero h1, .page-hero h1 { color: var(--navy); }
  tr.hide { display: table-row; }
}

/* contact cards: labelled lines, founder card */
.office h3 small { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-left: .4rem; }
.office-role { font-weight: 600; color: var(--green) !important; }
.office-line span { color: var(--ink-3); }
.office-person { border-left-color: var(--brass); }

/* multi-part articles (Pulping / Chemical Products): part headings, sub-headings, nested TOC, ordered steps, equations */
.prose-part { margin-top: 3.2rem; }
.prose-part:first-child { margin-top: 0; }
.part-heading { font-size: clamp(1.8rem, 3.4vw, 2.5rem); padding-bottom: .4rem; border-bottom: 3px solid var(--brass); }
.sub-heading { font-size: clamp(1.25rem, 2.2vw, 1.55rem); color: var(--navy); margin-top: 2rem; }
.toc .toc-part { margin-top: .6rem; }
.toc .toc-part a { font-weight: 700; color: var(--navy); }
.toc .toc-sub { padding-left: .9rem; }
.toc .toc-sub a { font-size: .9rem; }
ol.steps { padding-left: 1.4rem; margin: 0 0 1.3rem; }
ol.steps li { margin-bottom: .5rem; }
.equation { display: block; text-align: center; font-size: 1.15rem; font-family: var(--serif); padding: .6rem 0; }

/* figure pairs and inline product logos (Chemical Products) */
.fig-pair-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 600px) { .fig-pair-grid { grid-template-columns: 1fr; } }
.inline-logo img { max-width: 260px; margin: 0 0 1rem; }

/* project codes (from the reference list) on gallery cards and table rows */
.gcard-code { display: block; font-size: .78rem; color: rgba(255,255,255,.82); letter-spacing: .02em; margin-top: .15rem; }
.row-code { display: block; font-size: .78rem; color: var(--ink-3); white-space: nowrap; }

/* related-sale links in the reference table; highlighted row when jumped to */
.rel-link { color: var(--blue); text-decoration: underline dotted; text-underline-offset: 2px; }
table.data tr:target td { background: #fff6dc; }

/* review widget: attachments */
.review-files { display: block; margin: .5rem 0 .2rem; font-size: .85rem; }
.review-files span { display: block; font-weight: 600; margin-bottom: .25rem; }
.review-files input { display: block; width: 100%; font-size: .82rem; }
.review-files small { display: block; color: var(--ink-3); font-size: .74rem; margin-top: .25rem; line-height: 1.35; }

/* nested detail under a checklist item (Lu Lipeng CV, Oct 2026) */
.checklist li ul { list-style: none; padding: 0; margin: .4rem 0 0; }
.checklist li ul li { padding-left: 1.6rem; margin-bottom: .3rem; font-size: .95em; }
.checklist li ul li::before { width: .9rem; height: .9rem; top: .4em; }

/* inline video (basket cook, Oct 2026) */
.fig-video video { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); border: 1px solid var(--line); background: #000; display: block; }
