/* ==========================================================================
   XYZTING — front-end stylesheet
   Hand-written, no build step. Enqueued from functions.php via filemtime().

   Colour model (decided 2026-10-15):
     brand  (green)  = identity surfaces — utility bar, category strip, bands
     accent (teal)   = interactive — links, buttons, focus rings
   Two roles, one palette. Do not introduce a third hue.
   ========================================================================== */

:root {
  --brand:        #2e7d32;
  --brand-dark:   #1b5e20;
  --brand-deep:   #123f16;
  --brand-tint:   #e8f5e9;

  --accent:       #145f65;
  --accent-dark:  #0e474c;
  --accent-tint:  #e6f2f2;

  --ink:          #172126;
  --ink-soft:     #3d4a50;
  --muted:        #5b6b72;
  --line:         #dce3e4;
  --paper:        #ffffff;
  --paper-alt:    #f4f6f5;
  --pale:         #f4f6f5; /* legacy alias of --paper-alt */

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto,
               "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --fs-display: clamp(2.1rem, 4.6vw, 3.5rem);
  --fs-h1:      clamp(1.9rem, 4vw, 2.75rem);
  --fs-h2:      clamp(1.5rem, 2.6vw, 1.95rem);
  --fs-h3:      1.25rem;
  --fs-body:    1rem;
  --fs-sm:      0.9rem;
  --fs-xs:      0.78rem;

  --sp-1: 0.5rem;
  --sp-2: 0.75rem;
  --sp-3: 1.25rem;
  --sp-4: 2rem;
  --sp-5: 3.5rem;
  --sp-6: 5rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-card: 0 1px 2px rgba(23, 33, 38, 0.05), 0 8px 24px rgba(23, 33, 38, 0.06);
  --shell: 1200px;

  color-scheme: light;
}

/* --------------------------------------------------------------- base --- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

h1, h2, h3 { line-height: 1.2; overflow-wrap: anywhere; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

a, a:visited { color: var(--accent); }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

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

.site-shell { width: min(100% - 2rem, var(--shell)); margin-inline: auto; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--paper); padding: var(--sp-1); z-index: 100; }

/* -------------------------------------------------------- utility bar --- */

.utility-bar { background: var(--brand-deep); color: #fff; font-size: var(--fs-sm); }
.utility-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; min-height: 40px; }
.utility-contact, .utility-links { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.utility-bar a, .utility-bar a:visited { color: rgba(255, 255, 255, 0.88); text-decoration: none; }
.utility-bar a:hover { color: #fff; text-decoration: underline; }

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

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 84px;
  flex-wrap: wrap;
  padding-block: var(--sp-2);
}

.site-brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--ink); }
.site-brand:hover { text-decoration: none; }
.site-logo { width: auto; max-width: 64px; max-height: 46px; }
.site-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.site-brand-text strong { font-size: 1.25rem; letter-spacing: 0.01em; }
.site-brand-text small { font-size: 0.66rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }

.primary-nav { display: flex; flex-wrap: wrap; gap: 0.35rem var(--sp-3); flex: 1; justify-content: center; }
.primary-nav a { text-decoration: none; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-soft); white-space: nowrap; padding-block: 0.35rem; }
.primary-nav a:hover { color: var(--accent); }
.primary-nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.primary-nav .current-menu-item > a { color: var(--accent); box-shadow: inset 0 -2px 0 var(--brand); }

.primary-nav .xinyi-menu { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.35rem var(--sp-3); list-style: none; padding: 0; margin: 0; width: 100%; justify-content: center; }
.primary-nav .xinyi-menu li { position: relative; list-style: none; margin: 0; }
.primary-nav .xinyi-menu a { display: block; }
.primary-nav .xinyi-menu .sub-menu { list-style: none; margin: 0; padding: 0 0 0 0.8rem; border-left: 1px solid var(--line); font-size: 0.9em; }

.header-actions { display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }
.language-switcher { max-width: 100%; }
.language-switcher .trp-language-switcher { max-width: 100%; }

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

.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--brand-deep); }
/* The hero photographs are exposed dark; lift them rather than re-cut the files,
   so the originals stay the source of truth and the lift is one number to tune. */
.hero .hero-background { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; filter: brightness(1.22) saturate(1.06); }
/* Scrim heavy enough behind the copy to keep white text readable, and light on
   the right so the photograph still reads as a photograph. It falls away fast
   past the copy block: the headline is large and carries 3:1 on its own, so only
   the body copy needs the denser end of the ramp.
   It hangs off the slide, not off .hero: a slide mid-crossfade has opacity < 1,
   which makes it a stacking context, and a scrim on .hero then falls behind that
   slide's own photograph — the hero lightened for the 800ms of every transition
   and dropped back to dark when it settled. Inside the slide the order is fixed
   at photograph -> scrim -> copy whatever the stacking context does. */
.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(96deg, rgba(8, 28, 26, 0.38) 0%, rgba(8, 28, 26, 0.26) 38%, rgba(8, 28, 26, 0.06) 70%, rgba(8, 28, 26, 0) 100%);
}
/* The copy also carries a soft shadow, which is what lets the ramp above fall
   away as early as it does: past the copy block the photograph is at full
   brightness, and the shadow — not the scrim — keeps the type off it. */
.hero-eyebrow, .hero h1, .hero-title, .hero-lead {
  text-shadow: 0 1px 2px rgba(8, 28, 26, 0.6), 0 2px 14px rgba(8, 28, 26, 0.45);
}
/* A hero with no photograph at all falls back to the brand gradient. */
.hero:not(:has(.hero-background))::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, var(--brand-deep), var(--accent-dark));
}

.hero-inner {
  display: flex;
  align-items: center;
  min-height: clamp(420px, 60vh, 640px);
  padding-block: clamp(3rem, 6vw, 5rem);
}
.hero-panel { max-width: 46rem; color: #fff; }
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: #eaf7ec;
  margin: 0 0 var(--sp-2);
}
.hero h1, .hero-title { font-size: var(--fs-display); line-height: 1.08; margin: 0 0 var(--sp-2); color: #fff; }
.hero-lead { font-size: 1.08rem; color: rgba(255, 255, 255, 0.88); margin: 0 0 var(--sp-3); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin: 0; }

/* Slide stack: all slides share one grid cell and cross-fade, so the change is
   visible. Without JavaScript the :first-child rule keeps the first slide up. */
.hero-slides { display: grid; }
.hero-slide {
  grid-area: 1 / 1;
  position: relative;
  opacity: 0;
  pointer-events: none;
  transition: opacity 800ms ease;
}
.hero-slide:first-child { opacity: 1; pointer-events: auto; }
.hero-carousel .hero-slide.is-active { opacity: 1; pointer-events: auto; }
.hero-carousel .hero-slide:first-child:not(.is-active) { opacity: 0; pointer-events: none; }

/* Slow push on the active photograph so a still slide still feels alive.
   Duration tracks the carousel interval in hero-carousel.js. */
@keyframes hero-push {
  from { transform: scale(1.05); }
  to   { transform: scale(1); }
}
.hero-carousel .hero-slide.is-active .hero-background { animation: hero-push 4s ease-out both; }

@keyframes hero-fade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.hero-carousel .hero-slide.is-active .hero-panel { animation: hero-fade 700ms ease both; }

@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
  .hero-carousel .hero-slide.is-active .hero-background,
  .hero-carousel .hero-slide.is-active .hero-panel { animation: none; }
}

.hero-controls {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding-bottom: var(--sp-3);
}
.hero-arrow {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}
.hero-arrow:hover { background: rgba(0, 0, 0, 0.45); border-color: #fff; }
.hero-arrow:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.hero-dots { display: flex; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.hero-dot.is-active { background: #fff; border-color: #fff; }
.hero-dot:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.hero-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  overflow: hidden;
  transform: translateY(1px);
}
.hero-tile {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: var(--sp-2) var(--sp-3);
  background: rgba(255, 255, 255, 0.97);
  text-decoration: none;
  color: var(--ink);
  transition: background 160ms ease;
}
.hero-tile:hover { background: var(--brand-tint); text-decoration: none; }
.hero-tile-name { font-weight: 700; font-size: var(--fs-sm); }
.hero-tile-count { font-size: var(--fs-xs); color: var(--muted); }

/* --------------------------------------------------- category strip --- */

.category-strip { background: var(--brand-dark); }
.category-strip-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--sp-3);
  padding-block: 0.15rem;
}
.category-strip a, .category-strip a:visited {
  display: block;
  padding: 0.85rem 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: inset 0 -3px 0 transparent;
}
.category-strip a:hover { color: #fff; box-shadow: inset 0 -3px 0 rgba(255, 255, 255, 0.75); }

/* ------------------------------------------------------------ blocks --- */

.section { padding-block: var(--sp-5); }
.band-plain { background: var(--paper-alt); }
.band-brand { background: var(--brand); color: #fff; }
.band-brand h2 { color: #fff; margin-top: 0; }

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}
.section-heading h2 { margin: 0; }
.section-heading > a { font-weight: 600; white-space: nowrap; }

/* A short brand rule under every section title gives the page a spine without
   adding decoration. Suppressed on the coloured band where green on green
   would disappear. */
.section-heading h2::after {
  content: "";
  display: block;
  width: 52px;
  height: 3px;
  margin-top: 0.65rem;
  border-radius: 2px;
  background: var(--brand);
}
.band-brand .section-heading h2::after { background: rgba(255, 255, 255, 0.6); }

.prose { max-width: 74ch; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }

.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); font-weight: 700; font-size: var(--fs-xs); margin: 0 0 var(--sp-1); }
.note { color: var(--muted); font-size: var(--fs-sm); }
.result-count { color: var(--muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.text-link { font-weight: 600; }

/* ------------------------------------------------------- intro card --- */

.intro-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-md);
  background: var(--paper);
  padding: var(--sp-4) var(--sp-5);
  box-shadow: var(--shadow-card);
}
.intro-heading { margin: 0 0 var(--sp-2); }
.intro-chips { display: flex; flex-wrap: wrap; gap: var(--sp-1); list-style: none; margin: var(--sp-3) 0 0; padding: 0; }
.intro-chips li {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--brand-tint);
  color: var(--brand-deep);
  font-size: var(--fs-sm);
  font-weight: 600;
}

/* Two business lines, deliberately identical in weight. */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
}
.entry-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius-md);
  background: var(--paper);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.entry-image { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.entry-body { padding: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-1); flex: 1; }
.entry-body h2 { margin: 0; }
.entry-body p { margin: 0; color: var(--muted); max-width: 52ch; }
.entry-link { font-weight: 600; margin-top: auto; }

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

.range-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); }
.range-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.range-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(23,33,38,.06), 0 14px 32px rgba(23,33,38,.10); }
.range-image { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.range-body { padding: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-1); flex: 1; }
.range-body h3 { margin: 0; }
.range-body h3 a { color: var(--ink); text-decoration: none; }
.range-body h3 a:hover { color: var(--accent); }
.range-body p { margin: 0; color: var(--muted); font-size: var(--fs-sm); flex: 1; }

/* --------------------------------------------------- problem rows --- */

.problem-list { display: grid; gap: var(--sp-5); }
.problem-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); align-items: center; }
.problem-row:nth-child(even) .problem-media { order: 2; }
.problem-media { border-radius: var(--radius-md); overflow: hidden; background: var(--paper-alt); box-shadow: var(--shadow-card); }
.problem-image { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.problem-body h3 { margin: 0 0 var(--sp-2); font-size: clamp(1.35rem, 2.2vw, 1.75rem); }
.problem-points { margin: 0 0 var(--sp-2); padding-left: 1.1rem; color: var(--ink-soft); }
.problem-points li { margin-bottom: 0.3rem; }
.problem-grades {
  margin: 0 0 var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: var(--paper-alt);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: var(--fs-sm);
}
.problem-grades span { display: block; text-transform: uppercase; letter-spacing: 0.08em; font-size: var(--fs-xs); color: var(--muted); font-weight: 700; }
.problem-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); margin: 0; }
.chip {
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  text-decoration: none;
  background: var(--paper);
}
.chip:hover { border-color: var(--accent); text-decoration: none; }

/* ---------------------------------------------------- capabilities --- */

.stats-inline { display: flex; flex-wrap: wrap; gap: var(--sp-3); list-style: none; margin: 0; padding: 0; }
.stats-inline li { display: flex; align-items: baseline; gap: 0.4rem; }
.stats-inline strong { font-size: 1.35rem; color: var(--brand-dark); }
.stats-inline span { font-size: var(--fs-sm); color: var(--muted); }

.capability-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); }
.capability-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius-md);
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.capability-index {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  color: #bcdcbf;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.capability-card h3 { margin: 0; font-size: 1.05rem; }
.capability-card p { margin: 0; color: var(--muted); font-size: var(--fs-sm); }

/* --------------------------------------------------------- trust --- */

.trust-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--sp-3); }
.partner-block, .cert-block {
  padding: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper-alt);
}
.cert-list { list-style: none; margin: 0; padding: 0; }
.cert-list li { display: flex; flex-direction: column; gap: 0.1rem; padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.cert-list li:last-child { border-bottom: 0; }
.cert-list span { color: var(--muted); font-size: var(--fs-sm); }

.resource-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
}

/* ------------------------------------------------------------ cta --- */

.cta-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--sp-4); align-items: center; }
.cta-copy p { color: rgba(255, 255, 255, 0.9); margin-bottom: 0; max-width: 52ch; }
.cta-panel {
  /* Darken rather than lighten: a white veil over the brand green dropped the
     body text to about 4.2:1, under the 4.5:1 minimum. */
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-md);
  padding: var(--sp-3);
}
.cta-contact { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem var(--sp-2); margin: 0 0 var(--sp-3); }
.cta-contact dt { color: rgba(255, 255, 255, 0.82); font-size: var(--fs-sm); }
.cta-contact dd { margin: 0; font-weight: 600; }
.cta-contact a, .cta-contact a:visited { color: #fff; }

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

/* Flex rather than grid so a part-filled last row centres instead of leaving a
   single card stranded against the left edge — with five products in a
   four-column grid that happened on the category and search pages. */
.card-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3);
}
.card-grid > * { flex: 1 1 260px; max-width: 30rem; }

.product-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.product-card.has-image:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }

.product-card-media { display: block; background: var(--paper-alt); }
.product-card-image { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.product-card-body { padding: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-1); flex: 1; }

.product-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.8rem;
  margin: 0;
  font-size: var(--fs-sm);
}
.product-card-model { font-weight: 700; color: var(--accent); letter-spacing: 0.02em; }
.product-card-cat { color: var(--muted); }
.product-card-title { font-size: var(--fs-h3); margin: 0; }
.product-card-title a { text-decoration: none; color: var(--ink); }
.product-card-title a:hover { color: var(--accent); }
.product-card-summary { color: var(--muted); margin: 0; flex: 1; }
.text-link { font-weight: 600; margin-top: auto; }

/* Category filter above the product grid. */
.product-filter { margin-bottom: var(--sp-3); border-bottom: 1px solid var(--line); }
.product-filter ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--sp-3);
  list-style: none;
  margin: 0;
  padding: 0;
}
.product-filter a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 0;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  box-shadow: inset 0 -3px 0 transparent;
}
.product-filter a:hover { color: var(--accent); }
.product-filter a.is-active { color: var(--accent); box-shadow: inset 0 -3px 0 var(--brand); }
.product-filter-count {
  font-weight: 400;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
  list-style: none;
  margin: 0;
  padding: 0;
}
.category-grid a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
}
.category-grid a:hover { border-color: var(--accent); color: var(--accent); }
.category-count { color: var(--muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }

.formulation-types {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem var(--sp-3);
  margin: var(--sp-3) 0 0;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
}
.formulation-types dt { font-weight: 600; }
.formulation-types dd { margin: 0; color: var(--muted); }

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

.button, .search-form button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.2rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:visited, .button:hover { color: #fff; text-decoration: none; }
.button:hover, .search-form button:hover { background: var(--accent-dark); }
.button:focus-visible, .search-form button:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }

.button-quote { background: var(--brand); }
.button-quote:hover { background: var(--brand-dark); }

.button-ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.button-ghost:visited, .button-ghost:hover { background: var(--accent-tint); color: var(--accent-dark); }

.button-ghost-light { background: rgba(8, 28, 26, 0.38); color: #fff; border: 1px solid rgba(255, 255, 255, 0.7); }
.button-ghost-light:visited, .button-ghost-light:hover { background: rgba(8, 28, 26, 0.62); color: #fff; }

.button-on-dark { background: #fff; color: var(--brand-dark); }
.button-on-dark:visited, .button-on-dark:hover { background: var(--brand-tint); color: var(--brand-deep); }

.search-form label { display: block; font-weight: 700; margin-bottom: 0.4rem; }
.search-form > div { display: flex; gap: var(--sp-1); flex-wrap: wrap; }
.search-form input {
  min-width: min(100%, 260px);
  flex: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.7rem;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
}
.search-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ------------------------------------------------------ page types --- */

.page-content { max-width: 900px; }

.breadcrumbs { margin-bottom: var(--sp-3); font-size: var(--fs-sm); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; list-style: none; padding: 0; margin: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 0.6rem; }

.product-detail { max-width: 980px; }
.product-model { color: var(--muted); font-weight: 700; letter-spacing: 0.02em; }
.product-summary { font-size: 1.12rem; max-width: 68ch; }
.product-header { padding-bottom: var(--sp-3); border-bottom: 1px solid var(--line); }
.product-header h1 { margin: 0.2rem 0; }
.product-head-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); align-items: start; }
.product-head-grid:has(.product-head-media) { grid-template-columns: 1.15fr 1fr; }
.product-head-media { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: var(--paper-alt); }
.product-head-image { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
@media (max-width: 920px) {
  .product-head-grid:has(.product-head-media) { grid-template-columns: 1fr; }
}
.product-applications { margin-top: var(--sp-3); }
.subheading { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 var(--sp-1); }
.tag-list { display: flex; flex-wrap: wrap; gap: var(--sp-1); list-style: none; margin: 0; padding: 0; }
.tag-list li { padding: 0.3rem 0.7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--brand-tint); color: var(--brand-deep); font-size: var(--fs-sm); }
.product-cta { margin-top: var(--sp-4); }
.product-detail .section > h2 { margin-top: 0; }

.table-scroll { max-width: 100%; overflow-x: auto; }
table { border-collapse: collapse; min-width: 500px; width: 100%; }
th, td { text-align: left; padding: 0.7rem; border-bottom: 1px solid var(--line); }
th { background: var(--paper-alt); font-size: var(--fs-sm); }
.download-table { min-width: 560px; }
.download-table td:first-child { white-space: nowrap; }

.document-list { padding-left: 1.2rem; }
.document-list li { margin-bottom: 0.6rem; }

.contact-block {
  font-style: normal;
  padding: var(--sp-3) var(--sp-4);
  background: var(--paper-alt);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--brand);
}
.term-description { max-width: 68ch; }

/* ---------------------------------------------------------- footer --- */

.site-footer { background: var(--brand-deep); color: rgba(255, 255, 255, 0.8); padding: var(--sp-5) 0 var(--sp-3); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--sp-4); }
.footer-brand strong { display: block; font-size: var(--fs-h3); margin-bottom: 0.4rem; color: #fff; }
.footer-brand p { margin: 0; max-width: 44ch; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.footer-contact { font-style: normal; }
.footer-contact p { margin: 0 0 0.35rem; }
.footer-address { max-width: 30ch; }
.site-footer a, .site-footer a:visited { color: rgba(255, 255, 255, 0.92); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-social-links { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid rgba(255, 255, 255, 0.18); }

/* -------------------------------------------------------------- misc --- */

.xinyi-custom-home { min-width: 0; }

/* Elementor's kit defines its global colours on the body class and its button
   rule reads from them, so overriding .elementor-button directly loses on
   specificity. site.css already loads after the kit stylesheet, so matching the
   element plus the class is enough — no !important needed. */
body.elementor-kit-4 {
  --e-global-color-primary:   var(--accent);
  --e-global-color-secondary: var(--brand);
  --e-global-color-text:      var(--ink);
  --e-global-color-accent:    var(--accent);
}
body .elementor-widget-form .elementor-button,
body .elementor-widget-form .elementor-field-group input,
body .elementor-widget-form .elementor-field-group textarea,
body .elementor-widget-form .elementor-field-group select {
  border-radius: var(--radius-sm);
  border-color: var(--line);
}

/* Elementor's kit sets `padding-bottom: 0` on above-field labels, which butts
   each label's line box against the field's top border — the text reads as if it
   is sitting on the line. One extra class over the kit's selector beats it
   without !important. */
body.elementor-page .elementor-widget-form .elementor-form-fields-wrapper.elementor-labels-above
  .elementor-field-group > .elementor-field-label {
  padding-bottom: 0.4rem;
}

/* ------------------------------------------- about / applications --- */

.about-lead { font-size: 1.15rem; line-height: 1.55; color: var(--ink-soft); max-width: 62ch; margin: 0 0 var(--sp-3); }
.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
  list-style: none;
  margin: var(--sp-4) 0 0;
  padding: var(--sp-3) 0 0;
  border-top: 1px solid var(--line);
}
.about-stats strong { display: block; font-size: 2.1rem; line-height: 1; color: var(--brand-dark); }
.about-stats span { display: block; margin-top: 0.35rem; font-size: var(--fs-sm); color: var(--muted); }
.about-columns { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: var(--sp-4); align-items: start; }
.about-columns h2 { margin-top: 0; }
.about-facts {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--sp-3);
}
.about-facts h3 { margin: 0 0 var(--sp-2); font-size: 1.05rem; }
.about-facts dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem var(--sp-2); margin: 0; }
.about-facts dt { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
.about-facts dd { margin: 0; font-size: var(--fs-sm); }

.application-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.application-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--sp-3);
}
.application-card h3 { margin: 0.2rem 0 0.45rem; font-size: var(--fs-h3); }
.application-card p { margin: 0 0 var(--sp-2); color: var(--muted); font-size: var(--fs-sm); }
.application-code {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background: var(--brand-tint);
  color: var(--brand-dark);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
}
.application-links { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }

/* --------------------------------------------------------- honours --- */

/* Items are grouped by document shape: portrait system certificates read as a
   four-up contact sheet, landscape plaques as a three-up row. Grouping also
   keeps the letterboxing out of the picture — each group shares one aspect
   ratio, so the cards line up without a fixed-height frame. */
.honour-band + .honour-band { padding-top: 0; }
.honour-group-title { margin: 0 0 var(--sp-3); font-size: var(--fs-h3); }
.honours-grid { display: grid; gap: var(--sp-3); }
.honours-grid--certification { grid-template-columns: repeat(4, 1fr); }
.honours-grid--recognition { grid-template-columns: repeat(3, 1fr); }
.honours-grid--document { grid-template-columns: minmax(0, 560px); }
.honour-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--sp-2);
}
.honour-image {
  display: block;
  margin-bottom: var(--sp-2);
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.honour-image img { display: block; width: 100%; height: auto; }
.honour-card h3 { margin: 0 0 0.25rem; font-size: 1rem; }
.honour-issuer { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.honour-note { margin: 0.35rem 0 0; color: var(--ink-soft); font-size: var(--fs-sm); line-height: 1.45; }
.honour-year { margin: 0.2rem 0 0; font-size: var(--fs-xs); color: var(--muted); }
.honours-empty {
  max-width: 62ch;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
}
.honours-empty h2 { margin-top: 0.2rem; }
.honours-empty p { color: var(--muted); }

/* ------------------------------------------------------------ news --- */

.news-filter { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: var(--sp-3) 0; }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.news-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--sp-3);
}
.news-card h2 { margin: 0.25rem 0 0.5rem; font-size: var(--fs-h3); }
.news-card h2 a { text-decoration: none; }
.news-card h2 a:hover { text-decoration: underline; }
.news-card p { margin: 0 0 var(--sp-2); color: var(--muted); font-size: var(--fs-sm); }
.news-card .text-link { margin-top: auto; }
.news-meta { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0; font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.news-meta span { padding-left: 0.6rem; border-left: 1px solid var(--line); }
.news-single { max-width: 860px; }
.news-single h1 { margin-top: 0.3rem; }
.news-body { margin-top: var(--sp-3); }
.news-back { margin-top: var(--sp-4); }
.pagination { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: var(--sp-4); }
.pagination a, .pagination span {
  display: inline-block;
  min-width: 2.2rem;
  padding: 0.35rem 0.55rem;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.pagination .current { background: var(--brand); border-color: var(--brand); color: #fff; }
.text-link.on-dark { color: #fff; display: block; margin-top: var(--sp-2); }

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

@media (max-width: 1024px) {
  .range-grid { grid-template-columns: repeat(2, 1fr); }
  .capability-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: 1fr; }
  .cta-grid { grid-template-columns: 1fr; }
  .about-columns { grid-template-columns: 1fr; }
  .application-grid { grid-template-columns: repeat(2, 1fr); }
  .honours-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 920px) {
  .section { padding-block: var(--sp-4); }
  .card-grid { gap: var(--sp-2); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .problem-row { grid-template-columns: 1fr; gap: var(--sp-3); }
  .problem-row:nth-child(even) .problem-media { order: 0; }
  .primary-nav { justify-content: flex-start; order: 3; flex: 0 0 100%; }
  .header-actions { order: 2; }
  .hero-tiles { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 650px) {
  .utility-inner { justify-content: center; }
  .site-brand-text small { display: none; }
  .section { padding-block: 1.7rem; }
  .category-grid { grid-template-columns: 1fr; }
  .range-grid { grid-template-columns: 1fr; }
  .entry-grid { grid-template-columns: 1fr; }
  .capability-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-3); }
  .formulation-types { grid-template-columns: 1fr; gap: 0.15rem; }
  .formulation-types dd { margin-bottom: var(--sp-2); }
  .intro-card { padding: var(--sp-3); }
  .problem-body h3 { font-size: var(--fs-h3); }
  .about-stats { grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); }
  .application-grid { grid-template-columns: 1fr; }
  .honours-grid { grid-template-columns: 1fr; }
  .honours-grid--document { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .honours-empty { padding: var(--sp-3); }
}
