/* ChinaDirect Sourcing — design system v3 "Navy Editorial".
   Unified language, derived from world-class B2B practice:
   - one navy voice (~65%), rust accent only at anchor points (~10%), neutrals carry the rest;
   - editorial type scale: display serif headings ≈ 3x body, uppercase tracked eyebrows,
     hairline rules and numerals as rhythm devices;
   - baseline spacing scale (4/8/12/16/24/40/64) applied consistently;
   - crisp images: components size to natural image widths (≥700px sources), no upscale blur;
   - motion only as hover lift; touch targets ≥44px; sticky blur header. */

:root {
  --navy: #10344f;
  --navy-deep: #0b2740;
  --blue: #1c5f8b;
  --accent: #b5472e;
  --ink: #212830;
  --muted: #5c6670;
  --line: #e3e8ee;
  --bg: #ffffff;
  --wash: #f4f7fa;
  --panel: #ffffff;
  --sans: "Open Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem; --s6: 1.5rem; --s10: 2.5rem; --s16: 4rem;
  --shadow: 0 18px 44px -18px rgba(16, 52, 79, 0.26);
  --shadow-sm: 0 8px 20px -10px rgba(16, 52, 79, 0.2);

  --btn: #10344f;                           /* filled button surfaces */
  --btn-hover: #0b2740;
  --on-navy: #ffffff;                      /* text on navy / navy-deep */
  --on-navy-soft: rgba(255, 255, 255, 0.75);
  --on-navy-faint: rgba(255, 255, 255, 0.65);
  --on-navy-line: rgba(255, 255, 255, 0.18);
  --header-blur: rgba(255, 255, 255, 0.88);
  --foot-bg: #0b2740;
  --chip: transparent;
  --scrim: linear-gradient(to top, rgba(11, 39, 64, 0.94), rgba(11, 39, 64, 0.5) 62%, rgba(11, 39, 64, 0));
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(1160px, 92vw); margin-inline: auto; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

/* ---------- header ---------- */

.masthead {
  position: sticky; top: 0; z-index: 60;
  background: var(--header-blur);
  backdrop-filter: blur(12px) saturate(1.25);
  border-bottom: 1px solid var(--line);
}

.masthead .bar {
  display: flex; align-items: center; gap: var(--s4);
  flex-wrap: wrap; padding-block: 0.9rem;
}

.brand img { display: block; }

.tagline {
  margin: 0 0 0 0.35rem;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

.call {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1.2; padding: 0.55rem 1.1rem; min-height: 44px;
  border: 0; border-radius: 3px; background: var(--btn); color: var(--on-navy);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.call:hover { text-decoration: none; background: var(--btn-hover); box-shadow: var(--shadow-sm); }
.call span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--on-navy-soft); }
.call strong { font-size: 1.08rem; color: var(--on-navy); }

.lang-switch { display: flex; gap: 0.4rem; margin-left: auto; }
.lang-switch .tgl {
  font: inherit; font-size: 0.85rem; min-height: 44px; padding: 0 0.7rem;
  border: 1px solid var(--line); border-radius: 3px; background: var(--panel); color: var(--navy); cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.lang-switch .tgl:hover { border-color: var(--navy); }
.lang-switch .tgl[aria-current="true"] { background: var(--btn); border-color: var(--btn); color: var(--on-navy); font-weight: 600; }

.nav { display: flex; flex-wrap: wrap; gap: 0.1rem 1.1rem; padding-bottom: 0.9rem; font-size: 0.92rem; line-height: 1.6; }
.nav a { position: relative; padding: 0.4rem 0; color: var(--navy); font-weight: 400; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.1rem; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.16s ease;
}
.nav a:hover { color: var(--accent); text-decoration: none; }
.nav a:hover::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--navy); font-weight: 700; }
.nav a[aria-current="page"]::after { transform: scaleX(1); height: 3px; }

/* ---------- lead banner ---------- */

.lead { position: relative; margin: var(--s6) 0; }
/* family ladder keeps every section band on one rhythm: full column width, shared
   ceiling height. Landscape sources stay untouched; taller sources crop slightly. */
.lead img { display: block; width: 100%; height: auto; max-height: 300px; object-fit: cover; object-position: center 40%; border-radius: 8px; }
.lead span {
  position: absolute; inset: auto 0 0 0;
  padding: 2.2rem 1.4rem 1rem; border-radius: 0 0 8px 8px;
  background: var(--scrim);
  text-shadow: 0 1px 2px rgba(11,39,64,0.5);
  color: var(--on-navy); font-family: var(--serif); font-size: 1.3rem; font-weight: 400;
}

/* ---------- typography ---------- */

main { padding-bottom: var(--s16); }

h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(2.1rem, 4.6vw, 3.2rem); line-height: 1.12; color: var(--navy); margin: 0 0 1.1rem; letter-spacing: -0.018em; }
h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 1.8rem); color: var(--navy); margin: var(--s10) 0 var(--s4); letter-spacing: -0.01em; }
h3 { font-size: 1.08rem; color: var(--navy); margin: var(--s6) 0 var(--s3); font-weight: 700; }
h4 { font-size: 1rem; color: var(--ink); margin: var(--s4) 0 var(--s2); }
p { margin: 0 0 var(--s4); text-wrap: pretty; }
ul, ol { margin: 0 0 var(--s6); padding-left: 1.2rem; }
li { margin-bottom: var(--s2); }

.crumbs { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: var(--s6); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--navy); }

/* every level-1 page opens crumbs → h1 → accent bar, same as the home hero */
.prose > h1:first-of-type { margin-bottom: var(--s6); }
.prose > h1:first-of-type::after { content: ""; display: block; width: 64px; height: 4px; background: var(--accent); margin-top: var(--s4); border-radius: 2px; }

/* ---------- eyebrow label (shared rhythm device) ---------- */

.rail section h2, .sitefoot h2 {
  font-family: var(--sans); font-size: 0.76rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted);
}

/* ---------- two-column hierarchy + contextual rail ---------- */

.layout { display: grid; gap: var(--s6); align-items: start; }

.prose { min-width: 0; }
.prose p { max-width: 78ch; }
.prose > section { padding-top: var(--s2); }

.rail { display: grid; gap: var(--s6); }
.rail section h2 { margin: 0 0 var(--s4); border-bottom: 1px solid var(--line); padding-bottom: var(--s3); }
.rail ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; font-size: 0.95rem; }
.rail li a { color: var(--navy); }
.rail li a:hover { color: var(--accent); }
.rail li a[aria-current="page"] { color: var(--accent); font-weight: 700; }
.rail-cta { background: var(--wash); border-radius: 8px; padding: var(--s4); border: 1px solid var(--line); }
/* About Us / Testimonials / Contact Us rails hold the CTA alone — drop it below
   the header hairline so the card floats instead of sitting on the divider */
.rail-cta:first-child { margin-top: var(--s6); }
/* .rail section h2 above has higher specificity than .rail-cta h2 alone —
   double the class so the CTA eyebrow really sheds its divider and breathes */
.rail .rail-cta h2 { border-bottom: 0; padding-bottom: 0; margin-bottom: var(--s2); color: var(--navy); font-family: var(--serif); font-size: 1.05rem; letter-spacing: normal; text-transform: none; font-weight: 700; }
.rail-cta p { font-size: 0.92rem; color: var(--muted); margin: var(--s2) 0 var(--s3); }
.rail-cta a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 1.1rem; border-radius: 3px; background: var(--btn); color: var(--on-navy); font-weight: 600; font-size: 0.92rem; }
.rail-cta a:hover { text-decoration: none; background: var(--btn-hover); }
.rail-tel { margin: var(--s3) 0 0; font-size: 0.92rem; color: var(--navy); font-weight: 600; }

@media (min-width: 900px) {
  .layout.rail-on { grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: var(--s10); }
  .rail { position: sticky; top: 96px; }
  .rail-on .prose { max-width: none; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: stretch; gap: var(--s10); }
}

/* ---------- homepage hero ---------- */

.hero { padding-block: var(--s4) var(--s6); display: grid; gap: var(--s6); }
.hero h1 { max-width: 34ch; font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.hero h1::after { content: ""; display: block; width: 64px; height: 4px; background: var(--accent); margin-top: var(--s4); border-radius: 2px; }

.hero .lead { margin: 0; height: 100%; }
.hero .lead img { width: 100%; height: 100%; max-height: 420px; object-fit: cover; border-radius: 10px; }

.bullets { list-style: none; padding: 0; display: grid; gap: 0.5rem; max-width: 64ch; }
.bullets li { display: flex; align-items: baseline; gap: 0.65rem; margin: 0; }
.bullets img { width: 18px; flex: none; align-self: center; }
.bullets strong { color: var(--navy); font-weight: 700; }

.cta { display: flex; flex-wrap: wrap; gap: var(--s4); margin-top: var(--s6); }
.cta a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 1.3rem; border-radius: 3px;
  background: var(--btn); color: var(--on-navy); font-weight: 600;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.cta a:hover { text-decoration: none; background: var(--btn-hover); box-shadow: var(--shadow-sm); }
.cta a:last-child { background: transparent; color: var(--navy); border: 1px solid var(--navy); }
.cta a:last-child:hover { background: var(--wash); }

/* ---------- stats strip (credibility anchor) ---------- */

.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s6);
  background: var(--wash); border-radius: 8px;
  padding: var(--s6) var(--s6); margin-block: var(--s10);
}
.stats div { text-align: left; }
.stats strong { display: block; font-family: var(--serif); font-size: clamp(1.9rem, 3.4vw, 2.5rem); line-height: 1.06; color: var(--navy); font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.stats strong em { font-style: normal; color: var(--accent); }
.stats span { display: block; margin-top: var(--s2); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }

/* ---------- shared section header rhythm ---------- */

section > h2 { position: relative; padding-bottom: var(--s3); border-bottom: 1px solid var(--line); }
section > h2 + p { max-width: 70ch; color: var(--ink); }

/* ---------- cards ---------- */

.cards { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.card {
  display: block; border: 1px solid var(--line); border-top: 3px solid var(--navy);
  border-radius: 8px; padding: var(--s4); background: var(--panel); color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card p { margin: 0; color: var(--muted); }
.card img { width: 100%; height: 160px; object-fit: cover; border-radius: 5px; margin-bottom: var(--s3); }

/* ---------- content photos ---------- */

p.shot { margin-block: var(--s6); }
p.shot img { display: block; margin-inline: auto; width: auto; max-width: 100%; border-radius: 8px; }

/* ---------- team grid (about) ---------- */

.team { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: var(--s6); }
.tm { margin: 0; }
.tm img { display: block; margin-inline: auto; width: auto; max-width: 100%; height: auto; border-radius: 8px; }
.tm figcaption { font-size: 0.85rem; color: var(--muted); padding-top: var(--s2); }

/* ---------- video cards ---------- */

.vcard { display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); color: var(--ink); transition: transform 0.16s ease, box-shadow 0.16s ease; }
.vcard:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow); }
.vgrid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-block: var(--s6); }
.vcard img { width: 100%; height: 138px; object-fit: cover; }
.vcard span { display: block; padding: var(--s3); font-size: 0.92rem; line-height: 1.35; color: var(--navy); font-weight: 600; }
.more { margin-top: var(--s2); }
.more a { font-weight: 600; }

/* ---------- related-articles row list ---------- */

.rellist { list-style: none; padding: 0; margin: var(--s4) 0 var(--s6); display: grid; gap: var(--s3); }
.rellist li { display: flex; align-items: center; gap: var(--s3); margin: 0; }
.rellist img { width: 96px; height: 60px; object-fit: cover; border-radius: 5px; flex: none; }
.rellist span { font-size: 0.95rem; color: var(--navy); line-height: 1.4; }

/* ---------- numbered steps ---------- */

.steps { list-style: none; padding: 0; display: grid; gap: var(--s4); }
.steps li { position: relative; padding-left: 3.2rem; margin: 0; }
.steps span { position: absolute; left: 0; top: -0.05rem; font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: var(--accent); }
.steps h3 { margin: 0 0 0.2rem; }
.steps p { margin: 0; color: var(--muted); }

.tick { list-style: none; padding: 0; display: grid; gap: 0.55rem; }
.tick li { padding-left: 1.6rem; position: relative; margin: 0; }
.tick li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 14px; height: 14px; background: url("tick.png") no-repeat center / contain; }

/* ---------- copy-left / video-right split (home supplier band) ---------- */

.split { display: grid; gap: var(--s6); align-items: start; }
.split > div { min-width: 0; order: 1; }
.vplay { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; background: var(--wash); order: 2; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s10); }
  /* wide: video leads left, copy right, matching the source-site layout */
  .split > div { order: 2; }
  .vplay { order: 1; }
}

/* ---------- testimonial quote cards ---------- */

.tgrid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-block: var(--s6); }
.tcard { margin: 0; display: flex; gap: var(--s4); align-items: flex-start; border: 1px solid var(--line); border-radius: var(--r-lg, 8px); background: var(--wash); padding: var(--s4); transition: transform 0.16s ease, box-shadow 0.16s ease; }
.tcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.tcard img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.tcard h3 { margin: 0; font-size: 1rem; font-family: var(--serif); }
.tco { margin: 0.1rem 0 0.35rem; font-size: 0.8rem; color: var(--muted); }
.stars { display: inline-flex; gap: 2px; margin-bottom: 0.45rem; }
.stars svg { width: 13px; height: 13px; fill: var(--accent); }
.tcard blockquote { margin: 0; padding: 0; border: 0; font-size: 0.92rem; line-height: 1.55; color: var(--ink); }

/* ---------- template catalogue (downloads) ---------- */

.tpl-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-block: var(--s6); }
.tpl {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  border: 1px solid var(--line); border-left: 3px solid var(--navy); border-radius: 6px;
  padding: var(--s4); background: var(--panel); color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.tpl img { width: 48px; height: 48px; object-fit: contain; flex: none; }
.tpl strong { flex: 1; color: var(--navy); font-weight: 700; }
.tpl span { font-family: var(--serif); font-size: 1.15rem; color: var(--accent); white-space: nowrap; }
.tpl:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-sm); border-left-color: var(--accent); }

/* ---------- awards ---------- */

.awards { display: grid; gap: var(--s6); grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); }
.award { border-left: 3px solid var(--accent); padding-left: var(--s4); }
.award img { height: 48px; width: auto; object-fit: contain; margin-bottom: 0.55rem; background: var(--chip); border-radius: 4px; padding: 0 0.3rem; }
.award h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.award p { font-size: 0.92rem; color: var(--muted); margin-bottom: var(--s3); }
.award ul { margin: 0; font-size: 0.92rem; color: var(--muted); }

/* ---------- about-us blocks ---------- */

.values { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: var(--s6); }
.values > div { background: var(--wash); border-radius: 8px; padding: var(--s4); font-size: 0.95rem; color: var(--muted); }
.values strong { display: block; color: var(--navy); font-family: var(--serif); font-size: 1.05rem; margin-bottom: var(--s2); }

.person { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s6); align-items: start; margin-block: var(--s6); }
.person img { width: auto; max-width: 220px; height: auto; border-radius: 8px; }
.person h3 { margin: 0 0 0.15rem; font-family: var(--serif); font-size: 1.25rem; letter-spacing: -0.01em; }
.person .role { margin: 0 0 var(--s3); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); font-weight: 700; }
.person .social { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: var(--s3); }
.person .social a { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.55rem; border: 1px solid var(--line); border-radius: 3px; color: var(--navy); font-size: 0.8rem; font-weight: 600; }
.person .social svg { width: 13px; height: 13px; fill: currentColor; flex: none; }
.person .social a:hover { border-color: var(--navy); text-decoration: none; }
@media (max-width: 760px) {
  .person { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
  .person img { max-width: 180px; }
}

/* ---------- subnav (section tabs) ---------- */

.subnav { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: var(--s6); touch-action: manipulation; }
.subnav a {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.5rem;
  border: 1px solid var(--line); border-radius: 3px; color: var(--navy); background: var(--panel);
  font-weight: 600; font-size: 0.78rem; white-space: nowrap;
}
.subnav a:hover { border-color: var(--navy); text-decoration: none; }
.subnav a[aria-current="page"] { background: var(--btn); border-color: var(--btn); color: var(--on-navy); }

/* ---------- forms ---------- */

.contact-form, .sitefoot form { display: grid; gap: var(--s3); max-width: 520px; }
.contact-form label, .sitefoot label { display: grid; gap: 0.3rem; font-size: 0.95rem; color: var(--muted); }
.contact-form input, .contact-form textarea, .sitefoot input {
  font: inherit; padding: 0.65rem 0.75rem; border: 1px solid var(--line); border-radius: 3px;
  background: var(--on-navy); color: var(--ink);
}
.contact-form input:focus, .contact-form textarea:focus, .sitefoot input:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.contact-form button, .sitefoot button {
  font: inherit; min-height: 46px; padding: 0 1.3rem; border: 0; border-radius: 3px;
  background: var(--btn); color: var(--on-navy); cursor: pointer; justify-self: start; font-weight: 600;
  transition: background 0.15s ease, transform 0.15s ease;
}
.contact-form button:hover, .sitefoot button:hover { background: var(--btn-hover); transform: translateY(-1px); }

.facts { list-style: none; padding: 0; display: grid; gap: 0.6rem; max-width: 520px; }
/* label column + value column: when a zh value wraps, the continuation stays
   aligned under the value instead of falling back beneath the label */
.facts li { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: var(--s1) var(--s3); align-items: baseline; border-bottom: 1px dashed var(--line); padding-bottom: 0.6rem; margin: 0; }
.facts li > a { min-width: 0; overflow-wrap: anywhere; }
.facts span { display: inline-block; color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- article list ---------- */

article { display: flow-root; padding-block: var(--s6); border-bottom: 1px solid var(--line); }
article .athumb { float: left; margin: 0 var(--s4) var(--s3) 0; }
article .athumb img { width: 168px; height: 108px; object-fit: cover; border-radius: 6px; }
article h2 { margin: 0 0 0.3rem; font-size: 1.22rem; border-bottom: 0; padding-bottom: 0; }
article h2 a { color: var(--navy); }
article h2 a:hover { color: var(--accent); text-decoration: none; }
article p { margin: 0; color: var(--muted); font-size: 0.97rem; max-width: 78ch; }

/* ---------- footer (dark close) ---------- */

.sitefoot { background: var(--foot-bg); color: var(--on-navy); padding-block: var(--s16) var(--s6); margin-top: var(--s16); }
.sitefoot a { color: var(--on-navy-soft); }
.sitefoot a:hover { color: var(--on-navy); }
.foot-grid { display: grid; gap: var(--s6); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.sitefoot h2 { color: var(--on-navy); margin: 0 0 var(--s4); border-bottom: 1px solid var(--on-navy-line); padding-bottom: var(--s3); letter-spacing: 0.12em; }
.sitefoot ul { list-style: none; padding: 0; margin: 0 0 var(--s4); font-size: 0.95rem; }
.sitefoot li { margin-bottom: 0.35rem; }
.sitefoot label { color: var(--on-navy-soft); }
.sitefoot input { background: var(--panel); border-color: var(--panel); color: var(--ink); }
.agree { font-size: 0.85rem; color: var(--on-navy-faint); }
.fineprint { margin-top: var(--s10); font-size: 0.85rem; color: var(--on-navy-faint); }

/* ---------- theme toggle (light/dark) ---------- */

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 3px;
  background: var(--panel); color: var(--navy); cursor: pointer;
  transition: border-color 0.15s ease;
}
.theme-toggle:hover { border-color: var(--navy); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy: #dcebf7;
    --navy-deep: #eaf2f8;
    --blue: #7fb6dd;
    --accent: #d4715a;
    --ink: #e8edf2;
    --muted: #a9b6c2;
    --line: #223341;
    --bg: #0e1a24;
    --wash: #16252f;
    --panel: #1b2c39;
    --btn: #2c6288;
    --btn-hover: #38749e;
    --on-navy: #ffffff;
    --on-navy-soft: rgba(255, 255, 255, 0.82);
    --on-navy-faint: rgba(255, 255, 255, 0.7);
    --on-navy-line: rgba(255, 255, 255, 0.22);
    --header-blur: rgba(14, 26, 36, 0.88);
    --foot-bg: #0a1c2a;
  --chip: #f2f5f8;
    --chip: #f2f5f8;
    --shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.5);
    --shadow-sm: 0 8px 20px -10px rgba(0, 0, 0, 0.42);
    --scrim: linear-gradient(to top, rgba(7, 17, 24, 0.94), rgba(7, 17, 24, 0.5) 62%, rgba(7, 17, 24, 0));
  }
}
:root[data-theme="dark"] {
  --navy: #dcebf7;
  --navy-deep: #eaf2f8;
  --blue: #7fb6dd;
  --accent: #d4715a;
  --ink: #e8edf2;
  --muted: #a9b6c2;
  --line: #223341;
  --bg: #0e1a24;
  --wash: #16252f;
  --panel: #1b2c39;
  --btn: #2c6288;
  --btn-hover: #38749e;
  --on-navy: #ffffff;
  --on-navy-soft: rgba(255, 255, 255, 0.82);
  --on-navy-faint: rgba(255, 255, 255, 0.7);
  --on-navy-line: rgba(255, 255, 255, 0.22);
  --header-blur: rgba(14, 26, 36, 0.88);
  --shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 8px 20px -10px rgba(0, 0, 0, 0.42);
  --scrim: linear-gradient(to top, rgba(7, 17, 24, 0.94), rgba(7, 17, 24, 0.5) 62%, rgba(7, 17, 24, 0));
}

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  body { font-size: 16px; }
  .masthead .bar { gap: 0.6rem; }
  .tagline { display: none; }
  .nav { font-size: 0.88rem; gap: 0.1rem 0.8rem; }
  .stats { gap: var(--s3); padding: var(--s4); }
  .stats strong { font-size: clamp(1.35rem, 6.2vw, 1.9rem); }
  .stats span { letter-spacing: 0.07em; }
  /* first fold must end right after the hero CTA */
  h1 { font-size: clamp(1.7rem, 6.4vw, 2.2rem); margin-bottom: var(--s4); letter-spacing: -0.01em; }
  h2 { margin-top: var(--s6); }
  .hero { padding-block: var(--s3) var(--s6); gap: var(--s4); }
  .hero h1::after { margin-top: 0.7rem; }
  .bullets { gap: 0.35rem; }
  .cta { margin-top: var(--s4); gap: var(--s3); }
  .lead img { width: 100%; max-height: 200px; }
  .hero .lead { height: auto; }
  .hero .lead img { height: auto; max-height: 220px; }
  article .athumb img { width: 132px; height: 88px; }
}
