/* ASi Imperium — Corporate design system

   One header, one footer and one component set for every page. Classes are prefixed cx-
   so they never collide with the inline styles older pages still carry, and the tokens
   are prefixed --cx- for the same reason: a page that redefines --bg or --text does not
   change the header.

   Performance rules from AGENTS.md 6a apply here too: no backdrop-filter on the fixed
   header (it re-blurs on every scroll frame), no transition: all, and motion only on
   transform and opacity. */

:root {
  --cx-bg: #F7F7F5;
  --cx-surface: #FFFFFF;
  --cx-surface-2: #EFEEEA;
  --cx-ink: #17191C;
  --cx-ink-2: #3B3F45;
  --cx-muted: #5C6168;
  --cx-line: #E2E0DA;
  --cx-line-strong: #CFCCC4;
  --cx-accent: #C77B2E;
  /* Accent as text on the light ground: #C77B2E measures 2.9:1, this measures 5.4:1. */
  --cx-accent-ink: #965514;
  --cx-accent-soft: #F5EADD;
  --cx-deep: #12171D;
  --cx-deep-2: #1B222B;
  --cx-on-deep: #EEF0F2;
  --cx-on-deep-muted: #A9B0B8;
  --cx-good: #2F6B45;
  --cx-good-soft: #E3F0E7;
  --cx-warn: #8A6A12;
  --cx-warn-soft: #F6EFD9;
  --cx-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --cx-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cx-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --cx-header-h: 68px;
  --cx-radius: 10px;
  --cx-max: 1200px;
  --cx-shadow: 0 1px 2px rgba(17, 20, 24, .04), 0 8px 24px rgba(17, 20, 24, .06);
}

[data-theme="dark"] {
  --cx-bg: #0F1215;
  --cx-surface: #161A1F;
  --cx-surface-2: #1D2228;
  --cx-ink: #EDEFF1;
  --cx-ink-2: #C9CDD2;
  --cx-muted: #A1A8B0;
  --cx-line: #2A3037;
  --cx-line-strong: #3A424B;
  --cx-accent: #E09A52;
  --cx-accent-ink: #E9AE6E;
  --cx-accent-soft: #2E2418;
  --cx-deep: #0A0D10;
  --cx-deep-2: #141A20;
  --cx-on-deep: #EEF0F2;
  --cx-on-deep-muted: #A9B0B8;
  --cx-good: #7FCF98;
  --cx-good-soft: #1B3123;
  --cx-warn: #E3C35E;
  --cx-warn-soft: #352D14;
  --cx-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
}

@media (max-width: 760px) { :root { --cx-header-h: 60px; } }

/* ─── Header ─────────────────────────────────────────────────────────────── */

.cx-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  height: var(--cx-header-h);
  background: var(--cx-surface);
  border-bottom: 1px solid var(--cx-line);
  font-family: var(--cx-sans);
  color: var(--cx-ink);
}
.cx-header.is-scrolled { box-shadow: 0 1px 0 var(--cx-line), 0 6px 18px rgba(17, 20, 24, .06); }
.cx-header *, .cx-footer *, .cx-main * { box-sizing: border-box; }
.cx-header__inner {
  max-width: var(--cx-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 max(20px, env(safe-area-inset-left, 0px)) 0 max(20px, env(safe-area-inset-right, 0px));
  display: flex;
  align-items: center;
  gap: 28px;
}
.cx-header-offset { height: var(--cx-header-h); }

.cx-brand { display: inline-flex; align-items: baseline; gap: 6px; text-decoration: none; color: var(--cx-ink); flex-shrink: 0; }
.cx-brand__mark { font-family: var(--cx-serif); font-weight: 600; font-size: 1.45rem; letter-spacing: -.01em; }
.cx-brand__name { font-family: var(--cx-mono); font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--cx-muted); }

.cx-nav { flex: 1; min-width: 0; display: flex; align-items: center; }
.cx-nav__list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.cx-nav__item { position: relative; }
.cx-nav__trigger, .cx-nav__link {
  font: inherit;
  font-size: .92rem;
  font-weight: 500;
  color: var(--cx-ink-2);
  background: none;
  border: 0;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cx-nav__trigger::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease;
}
.cx-nav__trigger[aria-expanded="true"]::after { transform: translateY(1px) rotate(-135deg); }
.cx-nav__trigger:hover, .cx-nav__link:hover, .cx-nav__trigger[aria-expanded="true"] { color: var(--cx-ink); background: var(--cx-surface-2); }
.cx-nav__link[aria-current="page"], .cx-nav__item.is-current > .cx-nav__trigger { color: var(--cx-accent-ink); }

.cx-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: -8px;
  min-width: 280px;
  background: var(--cx-surface);
  border: 1px solid var(--cx-line);
  border-radius: var(--cx-radius);
  box-shadow: var(--cx-shadow);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.cx-nav__item.is-open > .cx-menu { opacity: 1; visibility: visible; transform: translateY(0); transition: opacity .18s ease, transform .18s ease, visibility 0s; }
.cx-menu--wide { width: min(720px, calc(100vw - 40px)); }
.cx-menu__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
.cx-menu--narrow .cx-menu__grid { grid-template-columns: minmax(0, 1fr); }
.cx-menu__link { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--cx-ink); }
.cx-menu__link:hover, .cx-menu__link:focus-visible { background: var(--cx-surface-2); }
.cx-menu__title { font-weight: 600; font-size: .92rem; }
.cx-menu__desc { font-size: .8rem; color: var(--cx-muted); line-height: 1.4; }
.cx-menu__foot { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; padding: 10px 12px 4px; border-top: 1px solid var(--cx-line); }
.cx-menu__foot a { font-size: .84rem; font-weight: 500; color: var(--cx-accent-ink); text-decoration: none; }
.cx-menu__foot a:hover { text-decoration: underline; text-underline-offset: 3px; }

.cx-header__actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.cx-icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
  background: none;
  color: var(--cx-ink-2);
  cursor: pointer;
}
.cx-icon-btn:hover { background: var(--cx-surface-2); color: var(--cx-ink); }
.cx-icon-btn svg { width: 18px; height: 18px; }
.cx-theme-sun { display: none; }
[data-theme="dark"] .cx-theme-sun { display: block; }
[data-theme="dark"] .cx-theme-moon { display: none; }
.cx-header .cx-header__menu { display: none; }
.cx-nav__mobile-cta { display: none; }

.cx-header :focus-visible, .cx-footer :focus-visible, .cx-main :focus-visible { outline: 2px solid var(--cx-accent); outline-offset: 2px; }

@media (max-width: 1060px) {
  /* Scoped to the header so the general .cx-btn rule further down cannot win on order. */
  .cx-header .cx-header__menu { display: inline-flex; }
  .cx-header .cx-header__cta { display: none; }
  .cx-nav {
    position: fixed;
    top: var(--cx-header-h);
    right: 0;
    bottom: 0;
    width: min(92vw, 400px);
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 18px 20px calc(28px + env(safe-area-inset-bottom, 0px));
    background: var(--cx-surface);
    border-left: 1px solid var(--cx-line);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(105%);
    transition: transform .28s cubic-bezier(.23, 1, .32, 1);
  }
  .cx-header.is-open .cx-nav { transform: translateX(0); box-shadow: -18px 0 50px rgba(0, 0, 0, .25); }
  .cx-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .cx-nav__item, .cx-nav__list > li { border-bottom: 1px solid var(--cx-line); }
  .cx-nav__trigger, .cx-nav__link { width: 100%; justify-content: space-between; padding: 14px 4px; font-size: 1rem; border-radius: 0; }
  .cx-nav__trigger:hover, .cx-nav__link:hover, .cx-nav__trigger[aria-expanded="true"] { background: none; }
  .cx-menu, .cx-menu--wide {
    position: static;
    width: auto;
    min-width: 0;
    border: 0;
    box-shadow: none;
    padding: 0 0 12px;
    background: none;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }
  .cx-nav__item.is-open > .cx-menu { display: block; }
  .cx-menu__grid { grid-template-columns: minmax(0, 1fr); }
  .cx-menu__link { padding: 9px 8px; }
  .cx-nav__mobile-cta { display: flex; flex-direction: column; gap: 10px; }
  body.cx-nav-open { overflow: hidden; }
  body.cx-nav-open::after { content: ""; position: fixed; inset: var(--cx-header-h) 0 0 0; background: rgba(0, 0, 0, .4); z-index: 8999; }
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.cx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--cx-sans);
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 11px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
  white-space: nowrap;
}
.cx-btn:active { transform: translateY(1px); }
.cx-btn--primary { background: var(--cx-ink); color: var(--cx-surface); }
.cx-btn--primary:hover { background: var(--cx-accent-ink); }
[data-theme="dark"] .cx-btn--primary { background: var(--cx-accent); color: #14110D; }
[data-theme="dark"] .cx-btn--primary:hover { background: var(--cx-accent-ink); }
.cx-btn--accent { background: var(--cx-accent); color: #fff; }
.cx-btn--accent:hover { background: var(--cx-accent-ink); }
.cx-btn--secondary { background: var(--cx-surface); color: var(--cx-ink); border-color: var(--cx-line-strong); }
.cx-btn--secondary:hover { border-color: var(--cx-ink); }
.cx-btn--ghost { background: none; color: var(--cx-ink); border-color: var(--cx-line-strong); }
.cx-btn--ghost:hover { border-color: var(--cx-ink); }
.cx-btn--on-deep { background: var(--cx-on-deep); color: var(--cx-deep); }
.cx-btn--on-deep:hover { background: var(--cx-accent); color: #14110D; }
.cx-btn--ghost-on-deep { background: none; color: var(--cx-on-deep); border-color: rgba(238, 240, 242, .35); }
.cx-btn--ghost-on-deep:hover { border-color: var(--cx-on-deep); }
.cx-link { color: var(--cx-accent-ink); font-weight: 600; text-decoration: none; }
.cx-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ─── Page structure ─────────────────────────────────────────────────────── */

.cx-main {
  font-family: var(--cx-sans);
  color: var(--cx-ink);
  background: var(--cx-bg);
  font-size: 16px;
  line-height: 1.6;
  /* Older components (the estimator, map facades) read these names. Inside a rebuilt
     page they follow the corporate tokens, so both themes stay consistent. */
  --accent: var(--cx-accent);
  --accent-text: var(--cx-accent-ink);
  --text: var(--cx-ink);
  --text-dim: var(--cx-muted);
  --text-muted: var(--cx-muted);
  --border: var(--cx-line);
  --card-bg: var(--cx-surface);
  --bg: var(--cx-bg);
  --bg-alt: var(--cx-surface-2);
  --serif: var(--cx-serif);
  --sans: var(--cx-sans);
  --mono: var(--cx-mono);
}
body:has(> .cx-main), body:has(> main.cx-main) { margin: 0; background: var(--cx-bg); }
.cx-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: rgba(238, 240, 242, .08); border-radius: 10px; }
.cx-tab { flex: 1 1 auto; font: inherit; font-size: .9rem; font-weight: 600; padding: 10px 12px; border-radius: 8px; border: 0; background: none; color: var(--cx-on-deep-muted); cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.cx-tab[aria-selected="true"] { background: var(--cx-on-deep); color: var(--cx-deep); }
.cx-tabpanel { display: flex; flex-direction: column; gap: 14px; padding: 18px 4px 4px; }
.cx-tabpanel[hidden] { display: none; }
.cx-entry { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 8px; border: 1px solid rgba(238, 240, 242, .14); text-decoration: none; color: var(--cx-on-deep); transition: border-color .15s ease, background-color .15s ease; }
.cx-entry:hover { border-color: var(--cx-accent); background: rgba(238, 240, 242, .04); }
.cx-entry__t { font-weight: 600; }
.cx-entry__p { font-family: var(--cx-mono); font-size: .78rem; color: var(--cx-accent); }
.cx-hero__panel { background: var(--cx-deep-2); border: 1px solid rgba(238, 240, 242, .12); border-radius: calc(var(--cx-radius) + 4px); padding: 16px; }
.cx-hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 960px) { .cx-hero__grid { grid-template-columns: minmax(0, 1fr); } }
.cx-wrap { max-width: var(--cx-max); margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.cx-section { padding-block: clamp(56px, 8vw, 96px); }
.cx-section--tight { padding-block: clamp(36px, 5vw, 56px); }
.cx-section--alt { background: var(--cx-surface); border-block: 1px solid var(--cx-line); }
.cx-section--deep { background: var(--cx-deep); color: var(--cx-on-deep); }
.cx-section--deep .cx-muted, .cx-section--deep .cx-lede { color: var(--cx-on-deep-muted); }
.cx-section--deep .cx-eyebrow { color: var(--cx-accent); }
.cx-stack { display: flex; flex-direction: column; gap: 16px; }
.cx-stack--lg { gap: 28px; }
.cx-head { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin-bottom: clamp(28px, 4vw, 44px); }

.cx-eyebrow { font-family: var(--cx-mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--cx-accent-ink); margin: 0; }
.cx-h1, .cx-h2, .cx-h3 { font-family: var(--cx-serif); font-weight: 500; line-height: 1.12; letter-spacing: -.012em; margin: 0; text-wrap: balance; color: inherit; }
.cx-h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); }
.cx-h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.cx-h3 { font-size: 1.3rem; font-weight: 600; line-height: 1.25; }
.cx-lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); line-height: 1.6; color: var(--cx-ink-2); margin: 0; max-width: 64ch; }
.cx-muted { color: var(--cx-muted); }
.cx-small { font-size: .88rem; }
.cx-main p { margin: 0; }
.cx-prose { max-width: 70ch; display: flex; flex-direction: column; gap: 14px; }
.cx-prose ul, .cx-prose ol { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }

.cx-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.cx-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.cx-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.cx-split { display: grid; gap: clamp(28px, 5vw, 64px); grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: start; }
@media (max-width: 900px) { .cx-split { grid-template-columns: minmax(0, 1fr); } }

/* ─── Hero ───────────────────────────────────────────────────────────────── */

.cx-hero { background: var(--cx-deep); color: var(--cx-on-deep); position: relative; overflow: hidden; }
.cx-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(238, 240, 242, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 240, 242, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), rgba(0, 0, 0, .2));
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), rgba(0, 0, 0, .2));
  pointer-events: none;
}
.cx-hero__inner { position: relative; padding-block: clamp(64px, 10vw, 120px) clamp(56px, 8vw, 96px); display: flex; flex-direction: column; gap: 24px; }
.cx-hero .cx-eyebrow { color: var(--cx-accent); }
.cx-hero .cx-lede { color: var(--cx-on-deep-muted); max-width: 62ch; }
.cx-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cx-hero__note { font-size: .86rem; color: var(--cx-on-deep-muted); }
.cx-hero--page .cx-hero__inner { padding-block: clamp(52px, 8vw, 92px) clamp(44px, 6vw, 72px); }

.cx-trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 1px;
  background: rgba(238, 240, 242, .12);
  border: 1px solid rgba(238, 240, 242, .12);
  border-radius: var(--cx-radius);
  overflow: hidden;
  margin-top: 12px;
}
.cx-trust__item { background: var(--cx-deep-2); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.cx-trust__k { font-family: var(--cx-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--cx-on-deep-muted); }
.cx-trust__v { font-weight: 600; font-size: .95rem; color: var(--cx-on-deep); }

/* ─── Cards ──────────────────────────────────────────────────────────────── */

.cx-card {
  background: var(--cx-surface);
  border: 1px solid var(--cx-line);
  border-radius: var(--cx-radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.cx-section--alt .cx-card { background: var(--cx-bg); }
a.cx-card { text-decoration: none; color: inherit; transition: border-color .15s ease, transform .15s ease; }
a.cx-card:hover { border-color: var(--cx-ink); transform: translateY(-2px); }
.cx-card__kicker { font-family: var(--cx-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--cx-muted); }
.cx-card__title { font-family: var(--cx-serif); font-weight: 600; font-size: 1.28rem; line-height: 1.2; margin: 0; }
.cx-card__body { color: var(--cx-ink-2); font-size: .95rem; }
.cx-card__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--cx-ink-2); }
.cx-card__list li { padding-left: 16px; position: relative; }
.cx-card__list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 1.5px; background: var(--cx-accent); }
.cx-card__title a { color: inherit; text-decoration: none; }
.cx-card__title a:hover { color: var(--cx-accent-ink); }
/* Offer rows: name left, price right, so a column of prices can be scanned. */
.cx-offers { gap: 0; border-top: 1px solid var(--cx-line); margin-top: 4px; }
.cx-offers li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--cx-line); }
.cx-offers li::before { content: none; }
.cx-offers .cx-price { font-size: .82rem; text-align: right; white-space: nowrap; color: var(--cx-ink); }
.cx-card__foot { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.cx-card__more { font-weight: 600; font-size: .9rem; color: var(--cx-accent-ink); }
.cx-card--deep { background: var(--cx-deep-2); border-color: rgba(238, 240, 242, .12); color: var(--cx-on-deep); }
.cx-card--deep .cx-card__body, .cx-card--deep .cx-card__list { color: var(--cx-on-deep-muted); }

.cx-tag { display: inline-flex; align-items: center; font-family: var(--cx-mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; background: var(--cx-surface-2); color: var(--cx-ink-2); white-space: nowrap; }
.cx-tag--accent { background: var(--cx-accent-soft); color: var(--cx-accent-ink); }
.cx-tag--good { background: var(--cx-good-soft); color: var(--cx-good); }
.cx-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.cx-price { font-family: var(--cx-mono); font-size: .92rem; font-variant-numeric: tabular-nums; color: var(--cx-ink); }
.cx-price strong { font-size: 1.1rem; }

/* ─── Pathways (three buyer routes) ──────────────────────────────────────── */

.cx-paths { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.cx-path { border-top: 3px solid var(--cx-accent); }
.cx-path .cx-card__title { font-size: 1.5rem; }

/* ─── Steps (operating model) ────────────────────────────────────────────── */

.cx-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--cx-line); border: 1px solid var(--cx-line); border-radius: var(--cx-radius); overflow: hidden; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); counter-reset: cx-step; }
.cx-steps li { background: var(--cx-surface); padding: 20px; display: flex; flex-direction: column; gap: 8px; counter-increment: cx-step; }
.cx-steps li::before { content: counter(cx-step, decimal-leading-zero); font-family: var(--cx-mono); font-size: .78rem; color: var(--cx-accent-ink); }
.cx-steps strong { font-family: var(--cx-serif); font-size: 1.15rem; font-weight: 600; }
.cx-steps span { font-size: .9rem; color: var(--cx-ink-2); }

/* ─── Proof ──────────────────────────────────────────────────────────────── */

.cx-case { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; background: var(--cx-surface); border: 1px solid var(--cx-line); border-radius: var(--cx-radius); overflow: hidden; }
.cx-case__media { background: var(--cx-surface-2); min-height: 260px; position: relative; }
.cx-case__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.cx-case__body { padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 860px) { .cx-case { grid-template-columns: minmax(0, 1fr); } .cx-case__media { min-height: 200px; aspect-ratio: 16 / 10; } }
.cx-quote { margin: 0; padding: 18px 20px; border-left: 3px solid var(--cx-accent); background: var(--cx-surface-2); border-radius: 0 8px 8px 0; font-family: var(--cx-serif); font-size: 1.08rem; line-height: 1.55; }
.cx-quote cite { display: block; margin-top: 10px; font-family: var(--cx-sans); font-style: normal; font-size: .85rem; color: var(--cx-muted); }

.cx-logos { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; font-family: var(--cx-serif); font-size: 1.15rem; color: var(--cx-ink-2); }
.cx-logos span { white-space: nowrap; }

/* ─── Data list, table, FAQ ──────────────────────────────────────────────── */

.cx-dl { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px 20px; margin: 0; }
.cx-dl dt { font-family: var(--cx-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cx-muted); padding-top: 3px; }
.cx-dl dd { margin: 0; }
@media (max-width: 620px) { .cx-dl { grid-template-columns: minmax(0, 1fr); gap: 2px; } .cx-dl dd { margin-bottom: 10px; } }

.cx-table-wrap { overflow-x: auto; border: 1px solid var(--cx-line); border-radius: var(--cx-radius); background: var(--cx-surface); }
.cx-table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 620px; }
.cx-table th, .cx-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--cx-line); }
.cx-table th { font-family: var(--cx-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cx-muted); font-weight: 500; background: var(--cx-surface-2); }
.cx-table tr:last-child td { border-bottom: 0; }
.cx-table td.cx-num { font-family: var(--cx-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }

.cx-faq { display: flex; flex-direction: column; border-top: 1px solid var(--cx-line); }
.cx-faq details { border-bottom: 1px solid var(--cx-line); }
.cx-faq summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; font-weight: 600; position: relative; }
.cx-faq summary::-webkit-details-marker { display: none; }
.cx-faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 1.4rem; font-weight: 400; color: var(--cx-accent-ink); transition: transform .2s ease; }
.cx-faq details[open] summary::after { transform: rotate(45deg); }
.cx-faq details > div { padding: 0 0 18px; color: var(--cx-ink-2); max-width: 72ch; display: flex; flex-direction: column; gap: 10px; }

.cx-answer { background: var(--cx-accent-soft); border-left: 3px solid var(--cx-accent); border-radius: 0 8px 8px 0; padding: 16px 18px; max-width: 74ch; }
.cx-answer strong { color: var(--cx-accent-ink); }

/* ─── Call-to-action band ────────────────────────────────────────────────── */

.cx-cta { background: var(--cx-deep); color: var(--cx-on-deep); border-radius: calc(var(--cx-radius) + 4px); padding: clamp(28px, 5vw, 52px); display: grid; grid-template-columns: minmax(0, 1.3fr) auto; gap: 24px; align-items: center; }
.cx-cta .cx-lede { color: var(--cx-on-deep-muted); }
.cx-cta__actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 820px) { .cx-cta { grid-template-columns: minmax(0, 1fr); } }

/* ─── Forms ──────────────────────────────────────────────────────────────── */

.cx-form { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.cx-form .cx-wide { grid-column: 1 / -1; }
.cx-field { display: flex; flex-direction: column; gap: 6px; font-size: .86rem; color: var(--cx-muted); }
.cx-field input, .cx-field select, .cx-field textarea {
  font: inherit;
  font-size: .95rem;
  color: var(--cx-ink);
  background: var(--cx-surface);
  border: 1px solid var(--cx-line-strong);
  border-radius: 8px;
  padding: 11px 12px;
  width: 100%;
}
.cx-field textarea { min-height: 120px; resize: vertical; }
.cx-form-status { font-size: .9rem; min-height: 1.2em; }
.cx-form-status[data-state="ok"] { color: var(--cx-good); }
.cx-form-status[data-state="error"] { color: #B4412F; }
[data-theme="dark"] .cx-form-status[data-state="error"] { color: #F08A7B; }

/* ─── Interactive selector ───────────────────────────────────────────────── */

.cx-selector { background: var(--cx-surface); border: 1px solid var(--cx-line); border-radius: calc(var(--cx-radius) + 4px); padding: clamp(20px, 3vw, 32px); display: grid; gap: 22px; }
.cx-selector__q { display: flex; flex-direction: column; gap: 10px; }
.cx-selector__label { font-weight: 600; }
.cx-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-choice {
  font: inherit;
  font-size: .9rem;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--cx-line-strong);
  background: var(--cx-bg);
  color: var(--cx-ink);
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.cx-choice:hover { border-color: var(--cx-ink); }
.cx-choice[aria-pressed="true"] { background: var(--cx-ink); color: var(--cx-surface); border-color: var(--cx-ink); }
[data-theme="dark"] .cx-choice[aria-pressed="true"] { background: var(--cx-accent); color: #14110D; border-color: var(--cx-accent); }
.cx-result { border-top: 1px solid var(--cx-line); padding-top: 20px; display: grid; gap: 12px; }
.cx-result[hidden] { display: none; }
.cx-result__title { font-family: var(--cx-serif); font-size: 1.5rem; font-weight: 600; line-height: 1.2; }

.cx-check { display: flex; flex-direction: column; gap: 8px; }
.cx-check label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--cx-line); border-radius: 8px; background: var(--cx-bg); cursor: pointer; }
.cx-check input { margin-top: 4px; accent-color: var(--cx-accent); width: 18px; height: 18px; flex-shrink: 0; }
.cx-meter { height: 8px; border-radius: 999px; background: var(--cx-surface-2); overflow: hidden; }
.cx-meter > span { display: block; height: 100%; width: 0; background: var(--cx-accent); transform-origin: left; transition: width .3s ease; }

/* ─── Latest band (cards written by scripts/latest.mjs) ──────────────────── */

.cx-latest { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.cx-latest .latest-card { background: var(--cx-surface); border: 1px solid var(--cx-line); border-radius: var(--cx-radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--cx-ink); transition: border-color .15s ease, transform .15s ease; }
.cx-latest .latest-card:hover { border-color: var(--cx-ink); transform: translateY(-2px); }
.cx-latest .latest-card__date { font-family: var(--cx-mono); font-size: .74rem; color: var(--cx-muted); }
.cx-latest .latest-card__title { font-family: var(--cx-serif); font-size: 1.2rem; font-weight: 600; line-height: 1.25; }
.cx-latest .latest-card__desc { font-size: .92rem; color: var(--cx-ink-2); }
.cx-latest .latest-card__more { margin-top: auto; font-weight: 600; font-size: .9rem; color: var(--cx-accent-ink); }

/* ─── Footer ─────────────────────────────────────────────────────────────── */

.cx-footer { background: var(--cx-deep); color: var(--cx-on-deep-muted); font-family: var(--cx-sans); font-size: .92rem; line-height: 1.6; }
.cx-footer__inner { max-width: var(--cx-max); margin: 0 auto; padding: clamp(48px, 7vw, 72px) max(20px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 40px; }
.cx-footer__top { display: grid; gap: 32px; grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .cx-footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cx-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .cx-footer__top { grid-template-columns: minmax(0, 1fr); } }
.cx-footer__brand { display: flex; flex-direction: column; gap: 14px; max-width: 420px; }
.cx-footer .cx-brand { color: var(--cx-on-deep); }
.cx-footer .cx-brand__name { color: var(--cx-on-deep-muted); }
.cx-footer__tagline { color: var(--cx-on-deep); font-family: var(--cx-serif); font-size: 1.12rem; line-height: 1.45; }
.cx-footer h2 { font-family: var(--cx-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--cx-on-deep); font-weight: 500; margin: 0 0 12px; }
.cx-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cx-footer a { color: var(--cx-on-deep-muted); text-decoration: none; }
.cx-footer a:hover { color: var(--cx-on-deep); text-decoration: underline; text-underline-offset: 3px; }
.cx-footer__entity { display: flex; flex-direction: column; gap: 4px; font-size: .86rem; }
.cx-footer__entity strong { color: var(--cx-on-deep); font-weight: 600; }
.cx-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-top: 22px; border-top: 1px solid rgba(238, 240, 242, .12); font-size: .82rem; }
.cx-footer__legal { display: flex; flex-wrap: wrap; gap: 6px 18px; }

@media (prefers-reduced-motion: reduce) {
  .cx-header *, .cx-main *, .cx-footer * { transition: none !important; animation: none !important; }
}

/* Honeypot field: off-screen rather than display:none, which some bots skip. */
.cx-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* Office map facade sizing inside rebuilt pages (the facade itself is styled by search.js). */
.cx-main .map-facade { height: 220px; }

/* Articles. Built on the same tokens as every other page; the .article-meta class name is
   kept because scripts/freshness.mjs inserts the "Updated" line after its first span. */
.cx-article__head { max-width: 760px; margin: 0 auto; padding: clamp(36px, 6vw, 72px) 20px 20px; display: flex; flex-direction: column; gap: 16px; }
.cx-article__head .cx-h1 { font-size: clamp(2rem, 4.6vw, 3rem); }
.cx-article .article-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--cx-mono); font-size: .75rem; color: var(--cx-muted); padding-bottom: 20px; border-bottom: 1px solid var(--cx-line); }
.cx-article__body { max-width: 760px; margin: 0 auto; padding: 8px 20px clamp(48px, 7vw, 80px); font-size: 1.04rem; line-height: 1.75; }
.cx-main .cx-article__body > * + * { margin-top: 18px; }
.cx-main .cx-article__body > h2 { font-family: var(--cx-serif); font-weight: 500; font-size: 1.6rem; line-height: 1.2; margin-top: 44px; }
.cx-main .cx-article__body > h3 { font-size: 1.05rem; font-weight: 600; margin-top: 28px; }
.cx-article__body ul, .cx-article__body ol { padding-left: 1.3em; margin-bottom: 0; }
.cx-article__body li + li { margin-top: 8px; }
.cx-article__body a { color: var(--cx-accent-ink); text-underline-offset: 2px; }
.cx-article__body .cx-answer { max-width: none; }
.cx-article__sources { font-size: .9rem; color: var(--cx-ink-2); border-top: 1px solid var(--cx-line); padding-top: 18px; }
.cx-main .cx-article__body > .cx-article__sources { margin-top: 48px; }
.cx-article__sources ol { display: flex; flex-direction: column; gap: 6px; }
.cx-article__sources li + li { margin-top: 0; }
.cx-article__related { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
