/* Product detail pages (Batch 3). Loaded after the frozen homepage + inner-page stylesheets and only adds
   new classes. Reuses the frozen system: hero atmosphere, accordion + media (home.css), stacked cards
   (home.css + main.js), trust close (pages.css), media kit (media.css). */

/* ---------- breadcrumb ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 22px; font-size: 0.875rem; font-weight: 550; color: var(--ink-muted); }
.crumbs li { display: flex; align-items: center; gap: 10px; }
.crumbs li + li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--blue-300); }
.crumbs a { color: var(--ink-muted); min-height: 32px; display: inline-flex; align-items: center; transition: color 0.2s; }
.crumbs a:hover { color: var(--blue); }
.crumbs [aria-current="page"] { color: var(--navy); }

/* ---------- product hero: copy left, bespoke workflow visual right ---------- */
.hero--product .hero__split { align-items: center; }
.hero--product .h1 { max-width: 11em; }
.hero--product .lead { max-width: 36rem; }
.hero__actions--left { justify-content: flex-start; margin-top: 32px; }
.hero__visual .frame { border-radius: var(--r-xl); box-shadow: 0 34px 64px -40px rgba(11, 111, 220, 0.32); }
.nav__list a[aria-current="true"] { color: var(--blue); }
.nav__list a[aria-current="true"]::after { transform: scaleX(1); }
@media (min-width: 900px) {
  .hero--product .hero__split { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(40px, 5vw, 80px); }
}
@media (max-width: 599.98px) {
  .hero__actions--left .btn { width: 100%; }
}

/* ---------- shared editorial pieces ---------- */
.pd-sub { margin-top: 6px; font-size: 1.0625rem; font-weight: 550; color: var(--navy); }
.pd-list { margin-top: 14px; display: grid; gap: 10px; }
.pd-list li { position: relative; padding-left: 22px; font-size: 1rem; line-height: 1.6; color: var(--ink); }
.pd-list li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 8px; height: 8px; border-radius: 50%; background: var(--blue-300); }
.pd-section { padding-block: var(--section-y); }
.pd-head { display: grid; gap: 36px; align-items: center; }
.pd-head .h2 { max-width: 14em; }
.pd-head .lead { margin-top: 18px; max-width: 34rem; }
@media (min-width: 900px) {
  .pd-head { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(48px, 6vw, 96px); }
}

/* ---------- Expected outcomes: ledger + focal statement + supporting track (both pages) ---------- */
.pd-outc { padding-block: clamp(64px, 8vw, 120px); border-top: 1px solid rgba(214, 227, 245, 0.6); }
.pd-outc__grid { display: grid; gap: clamp(28px, 4vw, 44px); grid-template-areas: "head" "marks" "stmt" "track"; }
.pd-outc__head { grid-area: head; }
.pd-outc .marks { grid-area: marks; }
.pd-outc .pd-stmt { grid-area: stmt; }
.pd-outc .pd-track { grid-area: track; }
@media (min-width: 900px) {
  .pd-outc__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(56px, 7vw, 120px); row-gap: clamp(28px, 3.4vw, 48px); align-items: start; grid-template-areas: "head head" "marks stmt" "marks track"; }
  .pd-outc--stmt-first .pd-outc__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "head head" "stmt marks" "track marks"; }
}

/* ledger — value and caption, hairline rules; quiet, not a counter */
.marks { display: grid; border-top: 1px solid rgba(12, 26, 75, 0.16); }
.marks > div { display: grid; gap: 6px; padding: 24px 0 22px; border-bottom: 1px solid rgba(12, 26, 75, 0.1); }
.marks dt { font-size: clamp(2rem, 1.5rem + 1.5vw, 2.75rem); font-weight: 650; letter-spacing: -0.032em; line-height: 1.05; color: var(--navy); }
.marks dd { margin: 0; font-size: 1.0625rem; line-height: 1.4; color: var(--ink); }

/* the statement is the focal point */
.pd-stmt { font-size: clamp(1.875rem, 1.05rem + 2.7vw, 3.5rem); font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; color: var(--navy); text-wrap: balance; }
.pd-stmt em { font-style: normal; color: var(--blue); }
.pd-stmt__tail { font-weight: 500; color: var(--ink-muted); }

/* supporting track: the labels sit on one hairline, the last node is the completed state */
.pd-track { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding-top: 30px; }
.pd-track::before { content: ""; position: absolute; left: 5px; right: 0; top: 5px; height: 1px; background: linear-gradient(90deg, var(--blue-300), var(--blue-200)); }
.pd-track li { position: relative; padding-right: 14px; font-size: 1rem; font-weight: 600; line-height: 1.3; color: var(--navy); }
.pd-track li::before { content: ""; position: absolute; left: 0; top: -30px; width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 2px solid var(--blue-300); }
.pd-track li:last-child::before { background: var(--blue); border-color: var(--blue); box-shadow: 0 0 0 4px rgba(11, 111, 220, 0.14); }
@media (max-width: 599.98px) {
  .pd-track { grid-auto-flow: row; gap: 16px; padding: 0 0 0 28px; }
  .pd-track::before { left: 5px; right: auto; top: 8px; bottom: 8px; width: 1px; height: auto; background: linear-gradient(180deg, var(--blue-300), var(--blue-200)); }
  .pd-track li { padding-right: 0; font-size: 1.0625rem; }
  .pd-track li::before { left: -28px; top: 0.3em; }
}

/* ---------- AI APCM: Monthly Attestation — the outcome of the six stages, docked under the workflow media ---------- */
.attest { padding: 26px 30px 28px; }
.attest__label { font-size: 0.75rem; font-weight: 650; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-muted); }
.attest__row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-top: 10px; }
.attest__big { font-size: clamp(2.75rem, 2rem + 2.2vw, 3.75rem); font-weight: 650; letter-spacing: -0.04em; line-height: 1; color: var(--navy); }
.attest__cap { font-size: 1.0625rem; font-weight: 550; color: var(--navy); }
.attest__bar { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 4px; margin-top: 18px; }
.attest__bar i { height: 6px; border-radius: 3px; background: var(--blue); }
.attest__list { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 18px; }
.attest__list li { display: flex; align-items: center; gap: 9px; font-size: 0.9375rem; font-weight: 550; color: var(--ink); }
.attest__list li::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 10px no-repeat; }

/* ---------- APCM: "How AI APCM works" as one product interface ----------
   Left: workflow media with the Monthly Attestation docked beneath (one container). Right: heading, lead, six stages.
   Phones: heading → stages (media opens inside the active stage, frozen main.js) → attestation closes the sequence. */
.pd-how { padding-block: clamp(56px, 7vw, 104px) clamp(40px, 5vw, 72px); }
.pd-acc.wf { gap: clamp(28px, 4vw, 36px); align-items: start; }
.pd-acc .wf__list { order: 1; }
.pd-acc .wf__media { order: 2; display: flex; flex-direction: column; }   /* overrides the frozen mobile display:none — the attestation must stay visible */
.pd-acc [data-stage] { order: 1; }
.pd-acc .attest { order: 2; padding-inline: 0; border-top: 1px solid rgba(12, 26, 75, 0.1); margin-top: 6px; }
.pd-how__head .h2 { max-width: 11em; }
.pd-how__head .lead { margin-top: 14px; max-width: 30rem; }
.pd-how__head { margin-bottom: clamp(18px, 2.4vw, 30px); }
.pd-sub { margin-top: 6px; }
.pd-acc .acc__inner > .pd-sub { margin: 0 28px 0 24px; }
.pd-acc .acc__inner > .pd-list { margin: 12px 28px 0 24px; }
.pd-acc .acc__inner > .pd-list li { font-size: 0.9375rem; }
.pd-acc .acc__name { font-size: 1.0625rem; }
.pd-acc .acc__btn { min-height: 56px; padding-block: 14px; }
/* workflow scenes read a little larger inside the console */
@container (min-width: 480px) {
  .pd-acc .m { font-size: calc(clamp(11px, 2.16cqw, 15px) * var(--k, 1)); margin-block: -0.6cqw -2.6cqw; }   /* constant trim => constant frame height */
}
.pd-acc .m--a1 { --k: 1.06; }
.pd-acc .m--a3, .pd-acc .m--a4 { --k: 1.2; }
.pd-acc .m--a5 { --k: 1.05; }
@container (min-width: 480px) {   /* optical centring (measured; em = each scene's own font-size) */
  .pd-acc .m--a1 { translate: 0 2.6em; }
  .pd-acc .m--a2 { translate: 0 0.5em; }
  .pd-acc .m--a3 { translate: 0 2.9em; }
  .pd-acc .m--a4 { translate: 0 2.8em; }
  .pd-acc .m--a5 { translate: 0 1.9em; }
  .pd-acc .m--a6 { translate: 0 2.35em; }
}
@media (min-width: 900px) {
  .pd-acc.wf { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(40px, 5vw, 80px); }
  .pd-acc .wf__list { order: 2; }
  .pd-acc .wf__media {
    order: 1; position: sticky; top: calc(var(--header-h) + 24px);
    background: #fff; border: 1px solid rgba(206, 222, 244, 0.75); border-radius: var(--r-xl); overflow: hidden;
    box-shadow: 0 34px 64px -40px rgba(11, 111, 220, 0.3);
  }
  .pd-acc .wf__media .frame { border: 0; border-radius: 0; box-shadow: none; }
  .pd-acc .attest { padding-inline: 30px; margin-top: 0; }
}

/* ---------- Referral: problem / what it does band ---------- */
.pd-brief { background: linear-gradient(180deg, var(--blue-50) 0%, #f9fbff 100%); border-block: 1px solid rgba(214, 227, 245, 0.7); }
.pd-brief__in { display: grid; gap: 40px; }
.pd-brief .h2 { font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem); }
.pd-brief .pd-list { margin-top: 18px; }
.pd-brief .pd-list li { font-size: 1.0625rem; }
@media (min-width: 900px) {
  .pd-brief__in { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(48px, 7vw, 120px); }
  .pd-brief__in > div + div { border-left: 1px solid rgba(12, 26, 75, 0.1); padding-left: clamp(40px, 5vw, 80px); }
}

/* ---------- Referral: TOC follow-up status (restrained operational visual) ---------- */
.toc { max-width: 420px; padding: 26px 30px 24px; background: #fff; border: 1px solid rgba(206, 222, 244, 0.7); border-radius: var(--r-lg); box-shadow: 0 34px 64px -40px rgba(11, 111, 220, 0.32); }
.toc__label { font-size: 0.75rem; font-weight: 650; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-muted); }
.toc__big { margin-top: 10px; font-size: clamp(3rem, 2.2rem + 2.6vw, 4.25rem); font-weight: 650; letter-spacing: -0.04em; line-height: 1; color: var(--navy); }
.toc__bar { display: flex; height: 10px; margin-top: 18px; border-radius: 6px; overflow: hidden; background: var(--blue-100); }
.toc__bar i { display: block; height: 100%; }
.toc__bar i:nth-child(1) { width: 94%; background: var(--blue); }
.toc__bar i:nth-child(2) { width: 4%; background: var(--blue-300); }
.toc__bar i:nth-child(3) { width: 2%; background: var(--blue-200); }
.toc__list { margin-top: 16px; display: grid; gap: 8px; }
.toc__list li { display: flex; align-items: center; gap: 10px; font-size: 0.9375rem; font-weight: 550; color: var(--navy); }
.toc__list li::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--blue); }
.toc__list li:nth-child(2)::before { background: var(--blue-300); }
.toc__list li:nth-child(3)::before { background: var(--blue-200); }
@media (min-width: 900px) { .toc { justify-self: end; } }

/* ---------- Referral: stacked-card story (frozen .story/.stack system) ---------- */
.story--product { background: linear-gradient(180deg, #fff 0%, #f3f8ff 40%, #f5f9ff 85%, #fff 100%); }
/* the frozen stack fits scenes by --ar (width/height) and --nh (natural height in em on narrow frames) */
.m--r1, .m--r2, .m--r3, .m--r4 { aspect-ratio: 640 / 460; --ar: 1.391; --nh: 27; }
.m--r1 { --nh: 32; }
.m--r2 { --nh: 27; }
.m--r3 { --nh: 30; }
/* optical centring inside the fixed-height stack frames (em = scene font-size; narrow frames use their own layout) */
.m--r1 { translate: 0 1.38em; }
.m--r2 { translate: 0 0.78em; }
.m--r3 { translate: 0 -0.69em; }
.m--r4 { translate: 0 1.23em; }
@container (max-width: 479px) { .m--r1, .m--r2, .m--r4 { translate: none; } }
.story--product .stack { margin-top: clamp(40px, 6vw, 72px); }
.story--product .scard__text .pd-list { margin-top: 14px; }
.story--product .scard__text .pd-list li { font-size: 0.9375rem; line-height: 1.5; }
.story--product .scard__h { font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem); }
@media (max-width: 899.98px) { .story--product { --card-max: 720px; } }
@media (min-width: 900px) { .story--product .scard { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
@media (min-width: 1100px) { .story--product .scard { grid-template-columns: minmax(0, 3.7fr) minmax(0, 8.3fr); gap: clamp(28px, 3vw, 44px); padding: clamp(24px, 2.4vw, 34px); } }
@media (max-width: 899.98px) { .story--product .scard { padding: 20px 16px 16px; } }
@media (min-width: 900px) {
  .story--product { --card-h: min(540px, calc(100vh - var(--header-h) - 20px - 3 * var(--step) - 36px)); }
  @supports (height: 100svh) { .story--product { --card-h: min(540px, calc(100svh - var(--header-h) - 20px - 3 * var(--step) - 36px)); } }
}
@media (prefers-reduced-motion: no-preference) and (min-height: 540px) {
  @container (min-width: 480px) {
    .story--product .scard .m { width: min(98cqw, 860px); font-size: max(11px, min(18px, 2.3cqw)); margin-block: -6.4cqw; }
  }
}

/* ---------- final referral CTA: reuse the trust close ---------- */
.trust--cta .trust__in { grid-template-columns: 1fr; text-align: center; justify-items: center; }
.trust--cta .trust__h { max-width: 14em; }
.trust--cta .trust__p { max-width: 40ch; margin-inline: auto; }
.trust--cta .trust__mark { display: none; }

/* =====================================================================
   Scenes (HTML/CSS with real text; sized in em so they scale as one)
   ===================================================================== */

/* APCM hero: lifecycle rail (vertical spine, seven stages) */
.m--rail { aspect-ratio: auto; display: grid; padding: 1.6em 1.8em; font-size: clamp(11.5px, 2.2cqw, 14px); }
.rail { position: relative; display: grid; gap: 0.35em; }
.rail::before { content: ""; position: absolute; left: 0.75em; top: 1.1em; bottom: 1.1em; width: 1px; background: linear-gradient(180deg, var(--blue-200), var(--blue-300) 50%, var(--blue-200)); }
.rail__step { position: relative; display: grid; grid-template-columns: 1.5em minmax(0, 1fr) auto; align-items: center; gap: 0.9em; min-height: 3.2em; }
.rail__node { width: 0.8em; height: 0.8em; margin-left: 0.36em; border-radius: 50%; background: #fff; border: 0.16em solid var(--blue-300); box-shadow: 0 0 0 0.2em #fff; }
.rail__step.is-done .rail__node { background: var(--blue); border-color: var(--blue); }
.rail__step.is-now .rail__node { border-color: var(--blue); box-shadow: 0 0 0 0.2em #fff, 0 0 0 0.45em rgba(11, 111, 220, 0.14); }
.rail__lab { font-size: 1em; font-weight: 600; color: var(--navy); line-height: 1.2; }
.rail__step.is-todo .rail__lab { color: var(--ink-muted); }
.rail__ui { display: flex; align-items: center; gap: 0.5em; justify-self: end; }
.rail__ui .m-bars { width: 6.5em; }
.rail__tier { display: inline-flex; gap: 0.25em; }
.rail__tier i { width: 0.45em; height: 1.1em; border-radius: 0.2em; background: var(--blue-100); }
.rail__tier i.on { background: var(--blue); }
.m-month { display: grid; grid-template-columns: repeat(7, 0.7em); gap: 0.25em; }
.m-month i { height: 0.7em; border-radius: 0.2em; background: var(--blue-100); }
.m-month i.on { background: var(--blue-300); }
.m-month i.hit { background: var(--blue); }

/* referral hero: closed loop */
.m--loop { aspect-ratio: 600 / 330; padding: 0.8em; font-size: clamp(10.5px, 2.15cqw, 13.5px); }
.loop__stage { position: absolute; inset: 0.8em; }
.loop__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.loop__svg .t { fill: none; stroke: var(--blue-300); stroke-width: 1.3; vector-effect: non-scaling-stroke; opacity: 0.85; }
.loop__svg .d { fill: none; stroke: var(--blue); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 0.6 200; vector-effect: non-scaling-stroke; animation: loopdot 9s linear infinite; }
.loop__svg .n { fill: #fff; stroke: var(--blue-300); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
@keyframes loopdot { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -100; } }
.loop__chip { position: absolute; transform: translate(-50%, -50%); padding: 0.45em 0.95em; border-radius: 2em; background: #fff; border: 0.08em solid #dbe7f7; font-size: 0.92em; font-weight: 600; white-space: nowrap; color: var(--navy); box-shadow: 0 0.25em 0.7em rgba(11, 111, 220, 0.1); }
.loop__chip--on { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 0.4em 1em rgba(11, 111, 220, 0.3); }
.loop__hub { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 5.4em; height: 5.4em; border-radius: 1.5em; background: #fff; border: 0.08em solid #dfe8f6; box-shadow: 0 0.2em 0.5em rgba(12, 26, 75, 0.05), 0 1.4em 3em rgba(11, 111, 220, 0.16); }
.loop__hub img { width: 2.9em; height: auto; }
.loop__list { display: none; }
@media (prefers-reduced-motion: reduce) { .loop__svg .d { display: none; } }

/* scene primitives */
.m-wave { display: flex; align-items: center; gap: 0.22em; height: 2.2em; margin: 0.2em 0 0.8em; }
.m-wave i { flex: 1; border-radius: 0.2em; background: var(--blue-300); height: calc(0.4em + var(--h) * 1.6em); }
.m-wave i:nth-child(odd) { background: var(--blue); }
.tier { display: inline-flex; gap: 0.22em; }
.tier i { width: 0.42em; height: 1em; border-radius: 0.18em; background: var(--blue-100); }
.tier i.on { background: var(--blue); }
.match li { display: grid; grid-template-columns: 1.7em minmax(0, 1fr) 2.6em 4.6em 3.2em; align-items: center; gap: 0.6em; padding: 0.5em 0; border-top: 0.08em solid #edf2fa; }
.match li:first-child { border-top: 0; }
.match__hd { grid-template-columns: 1.7em minmax(0, 1fr) 2.6em 4.6em 3.2em; font-size: 0.76em; font-weight: 600; letter-spacing: 0; color: var(--ink-muted); }
.match__hd span { white-space: nowrap; overflow: hidden; }
.match .m-bars i { height: 0.45em; }
.match .ok { width: 1.1em; height: 1.1em; border-radius: 50%; background: var(--green); position: relative; }
.match .ok::after { content: ""; position: absolute; left: 0.32em; top: 0.12em; width: 0.26em; height: 0.5em; border: solid #fff; border-width: 0 0.13em 0.13em 0; transform: rotate(45deg); }
.match .pick { background: var(--blue-50); border-radius: 0.5em; margin-inline: -0.5em; padding-inline: 0.5em; box-shadow: inset 0 0 0 0.08em var(--blue-200); }
.three { display: flex; align-items: center; justify-content: center; gap: 0.6em; margin: 0.4em 0 0.9em; }
.three .m-avatar { width: 2.2em; height: 2.2em; }
.three i { width: 1.6em; height: 1px; background: var(--blue-300); }
.three .m-hub { width: 3.2em; height: 3.2em; border-radius: 0.9em; }
.three .m-hub::before { inset: -0.6em; }
.three .m-hub img { width: 1.7em; }
.big { font-size: 2.6em; font-weight: 650; letter-spacing: -0.04em; line-height: 1; color: var(--navy); }

.m-kv dd .m-check { display: inline-block; vertical-align: middle; }
.m-kv dd .tier i { display: inline-block; width: 0.42em; height: 1em; background: var(--blue-100); }
.m-kv dd .tier i.on { background: var(--blue); }

/* narrow frames */
@container (max-width: 479px) {
  .story--product .scard .m { font-size: min(14px, calc(100cqw / 21.5), calc(100cqh / var(--nh))); }
  .m--rail { padding: 1.3em 1.2em; font-size: 12px; }
  .rail__ui .m-bars { width: 4.5em; }
  .m--loop { aspect-ratio: auto; display: block; padding: 1.2em 1.1em 1.2em 2.5em; font-size: 12.5px; }
  .loop__stage, .loop__hub { display: none; }
  .loop__list { display: grid; gap: 0.55em; position: relative; }
  .loop__list::before { content: ""; position: absolute; left: -1.4em; top: 0.9em; bottom: 0.9em; width: 1px; background: linear-gradient(180deg, var(--blue-200), var(--blue-300) 50%, var(--blue-200)); }
  .loop__list li { position: relative; padding: 0.55em 0.9em; border-radius: 0.7em; background: #fff; border: 0.08em solid #dbe7f7; font-size: 0.95em; font-weight: 600; color: var(--navy); }
  .loop__list li::before { content: ""; position: absolute; left: -1.78em; top: 50%; width: 0.7em; height: 0.7em; margin-top: -0.35em; border-radius: 50%; background: var(--blue); border: 0.16em solid #fff; box-shadow: 0 0 0 0.08em var(--blue-300); }
  .loop__list li:last-child { background: var(--blue); border-color: var(--blue); color: #fff; }
  .match li { grid-template-columns: 1.5em minmax(0, 1fr) 2.4em 4.2em 3em; gap: 0.45em; }
  .match__hd { grid-template-columns: 1.5em minmax(0, 1fr) 2.4em 4.2em 3em; }
}
