/* CCBONLINE — production adapter layer.
   The reference kit styles <button> where this build uses real <a> links (so
   every navigation works without JavaScript). This file re-applies the same
   geometry to the anchor form. No new colours, radii or shadows: every value
   resolves to a token in tokens.css. */

/* ---------- Nav: logo link + anchor nav items ---------- */
.nav-logo-link {
  display: flex;
  align-items: center;
  flex: none;
  text-decoration: none;
}
.nav-links a.nav-link {
  text-decoration: none;
  height: 100%;
}
.nav-links a.nav-link:hover { color: var(--ink); }
.nav-links a.nav-link.is-active,
.nav-links a.nav-link.is-here { color: var(--ink); }
.nav-sheet a.nav-sheet-link {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--rule-soft);
  padding: 14px 0;
  font: 500 14px/1 var(--font-en);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.site[data-lang='zh'] .nav-sheet a.nav-sheet-link { font-family: var(--font-cjk); }
.lang a {
  color: var(--ink-55);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.lang a:hover { color: var(--ink); }
.lang a.is-on { color: var(--ink); font-weight: 600; }

/* ---------- Utility bar qualifying label ---------- */
.utilbar .ub-k { opacity: 0.62; }

/* ---------- Skip link on the home stack ----------
   home.css scopes `.v2 .skip`. The layout emits one <a class="skip"> for every
   page, so make the behaviour identical on all three stacks. */
.page .skip,
.legal-page .skip,
.v2 .skip {
  position: absolute;
  left: 16px;
  top: -72px;
  z-index: 120;
  background: var(--ink);
  color: var(--paper);
  font: 600 13px/1 var(--font-en);
  padding: 14px 18px;
  text-decoration: none;
  transition: top 140ms var(--ease);
}
.page .skip:focus,
.legal-page .skip:focus,
.v2 .skip:focus { top: 16px; color: var(--paper); }
[data-lang='zh'] .skip { font-family: var(--font-cjk); }

/* ---------- Global focus ring ---------- */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}
:where(.v2hero, .cta-band, .utilbar, .mbar) :where(a, button):focus-visible {
  outline-color: var(--paper);
}

/* ---------- Offer card: anchor link under a hit-area button ---------- */
.offer-hit { color: inherit; }
.offers a.offer-link { text-decoration: none; }
.offer-cad .cad-stage { color: var(--teal); }

/* ---------- Service page: Chinese column keeps the English name as a gloss ---------- */
.phead-en {
  margin: 10px 0 0;
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink-55);
}

/* ---------- /about: single affirmative column ----------
   The "what we are not" column was removed from this page; the affirmative
   list must not keep a half-width measure. */
.contrast-single { grid-template-columns: minmax(0, 1fr); }
.contrast-single > div { padding-right: 0; max-width: 78ch; }

/* ---------- Breadcrumbs as anchors ---------- */
.crumbs a {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  color: var(--ink-55);
  cursor: pointer;
  text-decoration: none;
  text-transform: inherit;
  transition: color var(--dur) var(--ease);
}
.crumbs a:hover { color: var(--teal); }

/* ---------- Pager items as anchors ---------- */
a.pager-item { text-decoration: none; color: inherit; }

/* ---------- Specialized cards as anchors ---------- */
a.spec-card { text-decoration: none; color: inherit; }
a.spec-card:focus-visible { outline-offset: -3px; }

/* ---------- Legal index as anchors ---------- */
.doc-index a {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 8px 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink-55);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.doc-index a:hover { color: var(--ink); }
.doc-index a .n { font-variant-numeric: tabular-nums; color: var(--ink-70); }
.legal-page[data-lang='zh'] .doc-index a { font-family: var(--font-cjk); line-height: 1.7; font-size: 12px; }

/* ---------- Legal contact "related" links ---------- */
.contact-rows a.v-link {
  background: none;
  border: 0;
  padding: 0 0 3px;
  text-align: left;
  font: 500 13.5px/1.5 var(--font-en);
  color: var(--teal);
  cursor: pointer;
  border-bottom: 1px solid rgba(8, 126, 117, 0.32);
  margin-bottom: 8px;
  text-decoration: none;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.contact-rows a.v-link:hover { color: var(--teal-ink); border-bottom-color: var(--teal-ink); }
.legal-page[data-lang='zh'] .contact-rows a.v-link { font-family: var(--font-cjk); }

/* ---------- Footer legal row as anchors ---------- */
.foot-lawlinks a {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  color: var(--ink-55);
  cursor: pointer;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.foot-lawlinks a:hover { color: var(--teal); }

/* ---------- Dialog: notice links + sent panel ---------- */
.dlg2-notice a { text-decoration: none; }
.dlg2-sent[hidden],
.dlg2 [hidden] { display: none !important; }
.dlg2 .summary[hidden] { display: none !important; }

/* The dialog is rendered on every page and toggled with the `hidden`
   attribute; home.css positions it fixed, so hidden must win. */
#inquiry-dialog[hidden] { display: none !important; }

/* ---------- Reduced motion: never animate the overlay ---------- */
@media (prefers-reduced-motion: reduce) {
  .dlg2, .dlg2-box, .offer-detail { animation: none !important; }
}

/* ---------- Mobile bar sits above the dialog scrim ---------- */
@media (max-width: 760px) {
  .v2 { padding-bottom: 62px; }
  .page, .legal-page { padding-bottom: 0; }
}

/* ---------- Section anchors clear the sticky nav ---------- */
#services, #approach, #start, #contact, #engagement,
.mandate, .hr-block, .inv-svc, .doc-section { scroll-margin-top: 88px; }

/* ============================================================================
   Layout utilities promoted from inline `style="…"` attributes
   ----------------------------------------------------------------------------
   These replace every inline style in the JSX so the Content-Security-Policy
   can run with `style-src 'self'` and no 'unsafe-inline'.
   A CSP that permits inline styles does not constrain anything an injected
   attribute could do, so the policy is only real if this list stays at zero.

   The selectors are scoped (`.offer-detail .x`, `.cta-band .x`) on purpose:
   they have to outrank the existing module rules that already set the same
   properties, and app.css loads last, so equal specificity also wins.
   ============================================================================ */

/* 404 shell: no page header above it, so it carries its own padding. */
.wrap-404 { padding: 96px 24px; }
@media (max-width: 760px) { .wrap-404 { padding: 64px 24px; } }
.page .phead-lead-flush { border-top: 0; padding-top: 0; }

/* CtaBand lead sits a little below the heading. */
.cta-band .cta-lead-gap { margin-top: 22px; }

/* Dialog sent panel. */
.dlg2-sent .dlg2-sent-note { margin-top: 12px; font-size: 11.5px; color: var(--ink-55); }
.dlg2-sent .dlg2-sent-actions { margin-top: 22px; }

/* Home section headings: line-length caps. */
.h-section.h-cap-30 { max-width: 30ch; }
.h-section.h-cap-26 { max-width: 26ch; }

/* Offer detail: third column, baseline-aligned in the grid. */
.offer-detail .offer-detail-actions { align-self: end; }
.offer-detail .offer-detail-meta { display: block; margin-bottom: 10px; }
.offer-detail .offer-detail-cta { display: flex; margin-bottom: 12px; }
.offer-detail .offer-detail-link { display: flex; font-size: 12px; }

/* A CtaBand that follows page content needs room to separate. */
.cta-slot { margin-top: 88px; }

/* Documents: contact lead sits directly under its eyebrow. */
.doc-contact .doc-contact-lead { margin-top: 14px; }

/* Phase 3: opt-in background motion, mobile navigation and modal usability. */
#nav-sheet[hidden], .v2hero-video[hidden], .hero-video-control[hidden] {display:none!important}
.hero-video-control {display:inline-flex;align-items:center;min-height:32px;background:transparent;color:var(--paper);border:1px solid currentColor;padding:4px 10px;font:inherit;font-size:12px;cursor:pointer;margin:10px 12px 4px 0}
.hero-video-control:focus-visible {outline:2px solid var(--paper);outline-offset:3px}
.dlg2-box {overscroll-behavior:contain;max-height:calc(100dvh - 32px)}
@media(max-width:900px){.nav-toggle{min-width:44px;min-height:44px}.nav-sheet a.nav-sheet-link{min-height:44px}}
@media(max-width:560px){.dlg2-box{max-height:94dvh}.dlg2 .field input,.dlg2 .field select,.dlg2 .field textarea{font-size:16px}.dlg2-x{min-width:44px;min-height:44px}.nav-in{gap:8px}.nav-right{gap:6px}.nav-logo-link{min-width:0}.nav-logo{max-width:100%;height:auto}.lang a{min-height:32px;display:inline-flex;align-items:center}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}}

/* Mobile grid correction: footer is a grid, not a flexbox. Let real content wrap. */
.foot-lawlinks {flex-wrap:wrap;max-width:100%}
.foot-col {min-width:0;overflow-wrap:anywhere}
html[data-lang="en"] .lang a[lang="zh-CN"] {font-family:system-ui,"PingFang SC","Microsoft YaHei","Noto Sans CJK SC","Noto Sans SC",sans-serif}
@media(max-width:760px){
  .page:has(.mbar),.v2:has(.mbar){padding-bottom:calc(72px + env(safe-area-inset-bottom,0px))}
  .mbar{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mbar a,.mbar button{min-width:0;text-align:center;padding:6px;line-height:1.3;overflow-wrap:anywhere}
}
@media(max-width:560px){
  .nav-logo-link{flex:0 1 150px}.nav-toggle{flex:none}.nav-right{flex:none}
  .utilbar .ub-r{flex-wrap:wrap;gap:6px 14px;min-width:0}
  .btn{white-space:normal;max-width:100%;height:auto;min-height:44px;line-height:1.25;padding-top:10px;padding-bottom:10px}
  .entry-go{white-space:normal}
  .offers,.approach,.cta-grid,.offer-detail,.bounds-grid{grid-template-columns:minmax(0,1fr)}
  .offer-hit,.offer,.step,.cta-grid>*{min-width:0}
  .foot-logo{max-width:100%;height:auto}
  .page main,.legal-page main{overflow-wrap:anywhere}
}
