/* cb-diff.css: /cross-border-divorce/ section 5: the statement (Statement.astro, cbs-) and the five
   differences carousel (Differences.astro, .cb-diff). Motion: cb-statement.js (the statement only; the
   carousel is the shared site.js [data-carousel] engine).

   STATEMENT (the 離婚手續 s3 phone recipe at every width, dp-stage.css lines 200-290):
   DEFAULT = FINAL STATE: a green band with the statement, every character shown, no pin. Armed
   (html[data-cbs-armed], cb-statement.js, motion allowed): the pin is RUNWAY screens tall (written by the JS),
   the stage is sticky 100vh, the characters light one by one from ONE number (--cbs-s, px travelled into
   the reveal) and the next block, .cb-diff, is pulled up one screen (margin-top: -1 screen) and scrolls OVER
   the still-pinned stage as an opaque cover (z-index 2, paper ground). No opacity hand-off, so there is no
   frame where both the statement and the carousel are gone (the s5 blank-viewport row).

   DIFFERENCES: a copy of public/components/mt-s3.css (贍養費 s3) re-scoped .mt-orders -> .cb-diff and
   [data-carousel-tabs="orders"] -> [data-carousel-tabs="cbdiff"]; plus the 香港 | 內地 compare cells and the
   light switch into s6 (dp-consultant.css's .dpc-ground shows through this section once it is on). */

/* ================= the statement ================= */
.cb .cb-stmt { position: relative; padding: 72px 0 0; background: var(--paper); }
.cb .cbs-pin { position: relative; }
.cb .cbs-stage { position: relative; overflow: clip; border-radius: var(--r-sec) var(--r-sec) 0 0; padding: 120px var(--pad); display: flex; align-items: center; justify-content: center; }
.cb .cbs-bg {
  position: absolute; inset: 0; z-index: 0;
  background-color: var(--green);
  background-image:
    radial-gradient(60% 42% at 18% 16%, rgba(122, 158, 130, .42), rgba(122, 158, 130, 0) 70%),
    radial-gradient(52% 38% at 86% 74%, rgba(233, 169, 58, .26), rgba(233, 169, 58, 0) 72%),
    radial-gradient(70% 50% at 8% 96%, rgba(11, 43, 33, .58), rgba(11, 43, 33, 0) 68%);
  background-repeat: no-repeat;
}
.cb .cbs-bg::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.cb .cbs-heading {
  position: relative; z-index: 1; margin: 0; text-align: center; font-family: var(--serif); font-weight: 500;
  font-size: clamp(28px, 6.2vw, 72px); line-height: 1.2; letter-spacing: -.03em; color: var(--paper);
}
.cb .cbs-heading .cbs-line { display: block; white-space: nowrap; }
.cb .cbs-heading .cbs-line + .cbs-line { margin-top: .18em; }
.cb .cbs-ch { display: inline-block; font-style: normal; }

/* armed: the paper gap above the stage stays (the dark pricing card above must not merge into the green stage) */
html[data-cbs-armed] .cb .cbs-pin { height: calc(var(--screen) * var(--cbs-runway, 2.85)); }
html[data-cbs-armed] .cb .cbs-stage { position: sticky; top: 0; height: var(--screen); padding: 0 var(--pad); border-radius: 0; }
html[data-cbs-armed] .cb .cbs-ch {
  --u: clamp(0, calc((var(--cbs-s, 0) - var(--i, 0) * var(--cbs-stagger, 30)) / 300), 1);
  opacity: calc(.08 + .92 * var(--u));
  transform: scale(calc(.9 + .1 * var(--u)));
  filter: blur(calc((1 - var(--u)) * 5px));
}
/* the cover: the carousel section is pulled up one screen and paints OVER the pinned stage */
html[data-cbs-armed] .cb .cb-diff { margin-top: calc(var(--screen) * -1); }
@media (prefers-reduced-motion: reduce) { .cb .cbs-ch { opacity: 1 !important; transform: none !important; filter: none !important; } }
@media (max-width: 899px) {
  .cb .cb-stmt { padding-top: 44px; }
  .cb .cbs-stage { padding: 72px 20px; }
}
/* EDIT ROUND 2 (#84 row 2, owner 2026-09-26 "same here ... should never happen again"): from 900 up the statement is
   ONE line. The two .cbs-line phrases and their 13 .cbs-ch units (cb-statement.js counts them, --i unchanged) stay,
   side by side; the phrase gap margin is zeroed (on an inline-block it would drop phrase 2). The size fits the whole
   line inside the stage's content box (the query container, 100cqi): 17 glyphs of 1em at -.03em = 16.49em (divisor
   16.8), capped at the old 72px. Below 900 unchanged. Asserted by lab/probe-cb-steps.mjs st1. */
@media (min-width: 900px) {
  .cb .cbs-stage { container-type: inline-size; }
  .cb .cbs-heading { white-space: nowrap; font-size: min(72px, 100cqi / 16.8); }
  .cb .cbs-heading .cbs-line { display: inline-block; }
  .cb .cbs-heading .cbs-line + .cbs-line { margin-top: 0; }
}

/* ================= the five differences (mt-s3.css, re-scoped) ================= */
.cb .cb-diff { position: relative; z-index: 2; background: var(--paper, #F2F3EE); color: var(--ink, #10201B); overflow: clip; padding: 120px 0; border-radius: var(--r-sec) var(--r-sec) 0 0; transition: background-color .8s cubic-bezier(.22, 1, .36, 1); }
.cb .cb-diff-head { padding-inline: var(--pad); }
.cb .cb-diff .eyebrow i { background: var(--amber); }
.cb .cb-diff .h2 { margin-top: 12px; }
.cb .cb-diff-sub { margin: 14px auto 0; max-width: 34em; }
.cb .cb-diff .svc-tabrow { display: flex; margin-top: 28px; }
.cb .cb-diff .svc-tabrow .seg-scroll { flex: 1 1 auto; margin-top: 0; }
@media (min-width: 1024px) { .cb .cb-diff .svc-tabrow .seg-scroll { overflow: visible; } }
.cb .cb-diff [data-carousel-tabs="cbdiff"] { background: rgba(16,32,27,.06); min-width: 0; }
.cb .cb-diff [data-carousel-tabs="cbdiff"] button { color: rgba(16,32,27,.64); font-weight: 500; min-height: 44px; }
.cb .cb-diff [data-carousel-tabs="cbdiff"] button small { color: rgba(16,32,27,.5); }
.cb .cb-diff [data-carousel-tabs="cbdiff"] button.on { color: var(--ink); }
.cb .cb-diff [data-carousel-tabs="cbdiff"] button.on small { color: rgba(16,32,27,.62); }
.cb .cb-diff [data-carousel-tabs="cbdiff"] button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.cb .cb-diff .carousel { overflow-x: clip; overflow-y: visible; margin-top: 40px; }
.cb .cb-diff .slide { background: #FFFFFF; transform-origin: center; transition: opacity .5s ease, transform .5s ease, box-shadow .5s ease; }
.cb .cb-diff .slide.on { opacity: 1; transform: scale(1); box-shadow: 0 0 0 1px rgba(233,169,58,.55), 0 30px 80px rgba(16,32,27,.14); }
.cb .cb-diff .slide:not(.on) { opacity: .32; transform: scale(.96); }
.cb .cb-diff .scene { aspect-ratio: 4 / 3; align-self: center; background: var(--cb-sand); }
.cb .cb-diff .scene img { object-fit: contain; padding: 8%; box-sizing: border-box; }
.cb .cb-diff .slide-copy { gap: 12px; }
.cb .cb-diff .cbd-h3 { font-family: var(--serif); font-weight: 500; font-size: 44px; line-height: 1.2; color: var(--ink); }
.cb .cb-diff .slide-copy .sub { color: var(--green); font-weight: 500; font-size: 18px; }
.cb .cb-diff .slide-copy .sub::before { content: ''; display: inline-block; width: 18px; height: 3px; background: var(--amber); margin-right: 10px; vertical-align: middle; }
.cb .cbd-cmp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 4px; }
.cb .cbd-cell { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: var(--r-sm, 14px); background: #F6F3EC; }
.cb .cbd-cell.cbd-cn { background: #EEF2EE; }
.cb .cbd-cell b { font-family: var(--serif); font-weight: 500; font-size: 18px; color: var(--ink); }
.cb .cbd-cell p { margin: 0; font-size: 15px; line-height: 1.7; color: rgba(16,32,27,.78); }
.cb .cbd-law { margin-top: auto; padding-top: 6px; border-top: 1px solid rgba(16,32,27,.12); font-size: 13px; letter-spacing: .04em; color: rgba(16,32,27,.66); }
.cb .cb-diff .cbd-body { margin: 0; font-size: 15px; line-height: 1.7; color: rgba(16,32,27,.72); }
.cb .cb-diff .slide-copy .row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.cb .cb-diff .slide-copy .btn.btn-outline { color: var(--ink); border-color: rgba(16,32,27,.3); }
.cb .cbd-go { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-color: rgba(16,32,27,.35); text-underline-offset: 5px; }
.cb .cbd-go:hover { text-decoration-color: var(--amber); }

.cb .cb-diff .arrows { color: rgba(16,32,27,.68); margin-top: 20px; }
.cb .cb-diff .arrows button { border-color: rgba(16,32,27,.16); width: 48px; height: 48px; }

/* the light switch into s6: once dp-consultant.js turns the ground on, this section lets the green show
   through and its own words switch to the light ink on the same .8s clock (cu-access.css did the same to
   撫養權 s5). The white cards keep their own ground. */
html.dpc-ground-on .cb .cb-diff { background-color: transparent; }
.cb .cb-diff-head .h2, .cb .cb-diff-sub, .cb .cb-diff-head .eyebrow, .cb .cb-diff .arrows { transition: color .8s cubic-bezier(.22, 1, .36, 1); }
html.dpc-ground-on .cb .cb-diff-head .h2 { color: var(--paper); }
html.dpc-ground-on .cb .cb-diff-sub, html.dpc-ground-on .cb .cb-diff-head .eyebrow, html.dpc-ground-on .cb .cb-diff .arrows { color: var(--mute-d); }
html.dpc-ground-on .cb .cb-diff .arrows button { border-color: var(--line-d); color: var(--paper); }
html.dpc-ground-on .cb .cb-diff [data-carousel-tabs="cbdiff"] { background: rgba(255,255,255,.08); }
html.dpc-ground-on .cb .cb-diff [data-carousel-tabs="cbdiff"] button:not(.on) { color: var(--mute-d); }
html.dpc-ground-on .cb .cb-diff [data-carousel-tabs="cbdiff"] button:not(.on) small { color: var(--mute-d); }
@media (prefers-reduced-motion: reduce) { .cb .cb-diff, .cb .cb-diff-head .h2, .cb .cb-diff-sub, .cb .cb-diff-head .eyebrow, .cb .cb-diff .arrows { transition: none; } }

@media (max-width: 1023px) {
  .cb .cbd-cmp { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 899px) {
  .cb .cb-diff { padding: 72px 0; }
  .cb .cb-diff .svc-tabrow { margin-top: 20px; }
  .cb .cb-diff [data-carousel-tabs="cbdiff"] .seg-ind { display: none; }
  .cb .cb-diff [data-carousel-tabs="cbdiff"] button.on { background: var(--amber); color: var(--ink); }
  .cb .cb-diff .carousel { margin-top: 20px; }
  .cb .cb-diff .scene { aspect-ratio: 16 / 11; }
  .cb .cb-diff .cbd-h3 { font-size: 30px; }
  .cb .cbd-cell { padding: 12px 14px; }
}
/* while the ground is on (s6 crossing mid-screen) the pinned statement is long past; it must not show
   through the now-transparent carousel section where the two overlap (the cover's one-screen overlap) */
html.dpc-ground-on .cb .cbs-stage { visibility: hidden; }
/* #91 scroll-to-turn pin (owner 2026-09-26, #84 row 3): Differences.astro carries the homepage settings, so the
   head + card pin under the nav (site.css [data-carousel-pin]) while the runway turns one card per band. Fit the pin
   to the screen the way mt-s3.css does (the picture height follows the viewport) so the arrows + counter stay on
   screen while pinned at 1024x768 .. 1920x1080. Only while the runway is live: reduced motion keeps the static layout. */
@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  .cb .cb-diff .svc-tabrow { margin-top: 22px; }
  .cb .cb-diff .carousel { margin-top: 24px; }
  .cb .cb-diff .scene { aspect-ratio: auto; height: clamp(260px, calc(100vh - 540px), 560px); }
}
@media (min-width: 1024px) and (max-height: 860px) and (prefers-reduced-motion: no-preference) {
  .cb .cb-diff .svc-tabrow { margin-top: 14px; }
  .cb .cb-diff .carousel { margin-top: 12px; }
  .cb .cb-diff .arrows { margin-top: 8px; }
  .cb .cb-diff .slide { padding-block: 14px; }
  /* this card carries more than 贍養費's (title, point, the 香港 | 內地 cells, a link row): measured 2026-09-26 the
     copy column (364-415px) sets the card height here, not the picture, and the arrows sat 25-70px under the fold
     at 1366x768 / 1024x768 / 1280x720. Same words, tighter type and spacing on short screens only. */
  .cb .cb-diff .h2 { margin-top: 6px; }
  .cb .cb-diff-sub { margin-top: 8px; }
  .cb .cb-diff .slide-copy { gap: 8px; }
  .cb .cb-diff .cbd-h3 { font-size: 32px; }
  .cb .cbd-cmp { gap: 10px; margin-top: 0; }
  .cb .cbd-cell { gap: 4px; padding: 10px 14px; }
  .cb .cbd-cell p { line-height: 1.55; }
  .cb .cbd-law { padding-top: 4px; }
}
/* site.css drops .slide-copy .btn to 42px on phones: 44px on this page (page probe, tap) */
@media (max-width: 899px) { .cb .cb-diff .slide-copy .btn { height: 44px; } }
