/* W16 — enterprise footer (P0 contrast + P1 redesign), pricing conversion, knowledge mega, needs scroll stage.
   Loaded last on every page. */

/* =====================================================================
   P0/P1 FOOTER. Root cause of the W15 defect: .footer-cta__title used var(--text-1) (#eef2fb, a dark-palette
   token) on the ivory .footer-band. The footer is now ONE light surface that re-scopes every palette token to a
   dark-on-light value, so anything inside it that inherits --text-*, --line-* or .btn colours stays readable.
   Measured contrast on #f4f6fa: ink 16.9:1, ink-2 10.2:1, ink-3 7.0:1, link 7.6:1 (qa/w16-check.mjs).
   ===================================================================== */
.ft {
  --ft-bg: #f4f6fa; --ft-card: #ffffff;
  --ft-ink: #0a1430; --ft-ink-2: #2e3a57; --ft-ink-3: #46526f;
  --ft-link: #1546b8; --ft-link-hover: #0d2f80; --ft-accent: #1f63e8; --ft-guard: #0f6b4a;
  --ft-line: rgb(16 34 80 / .12); --ft-line-2: rgb(16 34 80 / .2);
  --text-1: var(--ft-ink); --text-2: var(--ft-ink-2); --text-3: var(--ft-ink-3);
  --line-1: var(--ft-line); --line-2: var(--ft-line-2); --line-3: rgb(16 34 80 / .32);
  --blue-300: var(--ft-link); --blue-200: var(--ft-link-hover); --focus-ring: #1546b8;
  padding: 0; border-top: 1px solid var(--ft-line); background: var(--ft-bg); color: var(--ft-ink-2); font-size: var(--fs-sm);
}
.ft :focus-visible { outline: 2px solid #1546b8; outline-offset: 3px; }
.ft .footer-band { background: linear-gradient(180deg, #fbfaf7 0%, #f4f6fa 100%); border-block: 0; }
.ft-top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 2rem clamp(2rem, 1rem + 4vw, 5rem); align-items: center; padding-block: clamp(2.75rem, 2rem + 2.5vw, 4.25rem) clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem); }
.ft-brand { display: grid; gap: .55rem; justify-items: start; }
.ft .footer-band .brand { --brand-s: .74; }
.ft .footer-band__tag { margin: .4rem 0 0; font-family: var(--font-body); font-weight: 600; font-size: var(--fs-sm); color: var(--ft-accent); letter-spacing: 0; }
.ft-statement { margin: 0; max-width: 22ch; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.55rem, 1.1rem + 1.6vw, 2.45rem); line-height: 1.38; color: var(--ft-ink); text-wrap: balance; }
.ft .footer-band__about { margin: .35rem 0 0; max-width: 52ch; color: var(--ft-ink-2); font-size: .97rem; line-height: 1.9; }
.ft .footer-cta.ft-cta { display: grid; gap: .85rem; margin: 0; padding: clamp(1.4rem, 1rem + 1.4vw, 2.1rem); border: 1px solid var(--ft-line); border-radius: 22px; background: var(--ft-card); box-shadow: 0 24px 60px -36px rgb(10 20 48 / .35); }
.ft .footer-cta__title { margin: 0; max-width: 28ch; color: var(--ft-ink); font-family: var(--font-display); font-weight: 600; font-size: clamp(1.3rem, 1.05rem + .9vw, 1.8rem); line-height: 1.45; }
.ft .ft-cta__text, .ft .footer-cta p + p { margin: 0; color: var(--ft-ink-2); font-size: .97rem; line-height: 1.9; max-width: 54ch; }
.ft .footer-cta__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .35rem; }

/* footer buttons: explicit colours for rest / hover / focus / active / disabled (never inherited) */
.ft-btn { --_bd: transparent; font-weight: 600; }
.ft-btn--primary { --_bg: #1f63e8; --_fg: #ffffff; box-shadow: 0 12px 28px -14px rgb(31 99 232 / .75); }
.ft-btn--primary:hover { --_bg: #1749b8; --_bd: transparent; }
.ft-btn--primary:active { --_bg: #123c99; }
.ft-btn--primary .btn__icon { width: 18px; height: 18px; }
.ft-btn--ghost { --_bg: #ffffff; --_fg: #0a1430; --_bd: rgb(16 34 80 / .32); }
.ft-btn--ghost:hover { --_bg: #eef3ff; --_fg: #0d2f80; --_bd: #1546b8; }
.ft-btn--ghost:active { --_bg: #e1e9fb; }
.ft-btn:focus-visible { outline: 2px solid #1546b8; outline-offset: 3px; }
.ft-btn[aria-disabled="true"], .ft-btn:disabled { --_bg: #e7eaf1; --_fg: #46526f; --_bd: rgb(16 34 80 / .2); box-shadow: none; cursor: not-allowed; }

/* operating flow: sale/purchase → stock → entry → period → report, each with its guard */
.ft-flow { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem 1.75rem; align-items: center; margin-bottom: clamp(1.75rem, 1.4rem + 1.5vw, 2.75rem); padding: 1.1rem 1.35rem; border: 1px solid var(--ft-line); border-radius: 18px; background: rgb(255 255 255 / .75); }
.ft-flow__k { display: flex; align-items: center; gap: .5rem; margin: 0; color: var(--ft-ink); font-weight: 700; font-size: .95rem; white-space: nowrap; }
.ft-flow__k svg { width: 20px; height: 20px; color: var(--ft-accent); }
.ft-flow__list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; margin: 0; padding: 0; list-style: none; }
.ft-flow__list li { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: .6rem; align-items: start; }
.ft-flow__list li + li::before { content: ""; position: absolute; inset-inline-end: calc(100% + .1rem); top: 18px; width: .55rem; height: 2px; border-radius: 2px; background: var(--ft-accent); opacity: .5; }
.ft-flow__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #e8efff; color: #1546b8; }
.ft-flow__icon svg { width: 20px; height: 20px; }
.ft-flow__txt { display: grid; gap: .1rem; min-width: 0; }
.ft-flow__txt b { color: var(--ft-ink); font-size: .95rem; line-height: 1.5; }
.ft-flow__txt > span { color: var(--ft-ink-2); font-size: var(--fs-sm); line-height: 1.6; }
.ft-flow__txt small { display: flex; gap: .3rem; align-items: center; margin-top: .15rem; color: var(--ft-guard); font-size: var(--fs-meta); font-weight: 600; line-height: 1.5; }
.ft-flow__txt small svg { flex: none; width: 14px; height: 14px; }

/* eight information groups */
.ft-main { padding-block: clamp(2.25rem, 1.75rem + 2vw, 3.25rem) 1.5rem; }
.ft-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem clamp(1.25rem, .5rem + 2vw, 2.5rem); }
.ft-group h2 { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: .6rem; align-items: start; margin: 0 0 .75rem; font-family: var(--font-body); font-size: 1rem; font-weight: 700; line-height: 1.45; color: var(--ft-ink); }
.ft-group h2 small { display: block; margin-top: .1rem; color: var(--ft-ink-3); font-size: var(--fs-meta); font-weight: 500; line-height: 1.55; }
.ft-group__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--ft-line); background: #fff; color: #1546b8; }
.ft-group__icon svg { width: 18px; height: 18px; }
.ft-group ul { display: grid; gap: .2rem; margin: 0; padding: 0 0 0; padding-inline-start: calc(34px + .6rem); list-style: none; }
.ft-group a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ft-ink-2); font-size: .93rem; line-height: 1.55; text-underline-offset: .3em; }
.ft-group a:hover { color: var(--ft-link-hover); text-decoration: underline; }
.ft-group a:focus-visible { border-radius: 4px; }

/* help / start cards */
.ft-start { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: clamp(2rem, 1.5rem + 1.5vw, 2.75rem); }
.ft-card { display: grid; grid-template-columns: 42px minmax(0, 1fr) 18px; gap: .85rem; align-items: center; padding: 1rem 1.15rem; border: 1px solid var(--ft-line); border-radius: 16px; background: #fff; color: var(--ft-ink-2); transition: border-color var(--dur-1), box-shadow var(--dur-1), transform var(--dur-1); }
.ft-card:hover { border-color: #1546b8; box-shadow: 0 14px 30px -22px rgb(21 70 184 / .6); }
.ft-card__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #0a1430; color: #fff; }
.ft-card__icon svg { width: 21px; height: 21px; }
.ft-card__txt { display: grid; gap: .05rem; min-width: 0; }
.ft-card__txt small { color: var(--ft-accent); font-size: var(--fs-meta); font-weight: 600; }
.ft-card__txt b { color: var(--ft-ink); font-size: 1rem; line-height: 1.5; }
.ft-card__txt span { color: var(--ft-ink-2); font-size: var(--fs-sm); line-height: 1.65; }
.ft-card__go { width: 18px; height: 18px; color: #1546b8; transition: transform var(--dur-1); }
.ft-card:hover .ft-card__go { transform: translateX(-3px); }

/* legal strip */
.ft .footer-legal.ft-legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-top: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem); padding-top: 1.25rem; border-top: 1px solid var(--ft-line); color: var(--ft-ink-3); font-size: var(--fs-meta); }
.ft-legal__copy { display: grid; gap: .2rem; }
.ft-legal__copy p { margin: 0; line-height: 1.75; color: var(--ft-ink-3); }
.ft-legal__copy b { color: var(--ft-ink); font-weight: 600; }
.ft-legal__meta { display: flex; align-items: center; gap: 1rem; }
.ft-lang { padding: .25rem .7rem; border: 1px solid var(--ft-line-2); border-radius: 999px; color: var(--ft-ink-2); font-weight: 600; }
.ft-top-link { display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; color: var(--ft-link); font-weight: 600; }
.ft-top-link svg { width: 16px; height: 16px; transform: rotate(90deg); }
.ft-top-link:hover { color: var(--ft-link-hover); text-decoration: underline; }

@media (max-width: 1180px) {
  .ft-flow { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1080px) {
  .ft-top { grid-template-columns: minmax(0, 1fr); }
  .ft-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ft-flow__list { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 1rem; }
  .ft-flow__list li + li::before { display: none; }
  .ft-start { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .ft .footer-band .brand { --brand-s: .58; }
  .ft-flow { padding: 1rem; }
  .ft-flow__list { grid-template-columns: minmax(0, 1fr); gap: .7rem; }
  .ft-flow__list li { padding-bottom: .7rem; border-bottom: 1px dashed var(--ft-line-2); }
  .ft-flow__list li:last-child { padding-bottom: 0; border-bottom: 0; }
  .ft .footer-cta__actions .ft-btn { width: 100%; }
  .ft-legal__meta { width: 100%; justify-content: space-between; }
}
@media (max-width: 480px) {
  .ft-groups { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .ft-card { grid-template-columns: 38px minmax(0, 1fr) 16px; padding: .9rem; }
  .ft-card__icon { width: 38px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) { .ft-card, .ft-card__go { transition: none; } }
@media (forced-colors: active) { .ft-btn, .ft-card { border: 1px solid CanvasText; } }

/* =====================================================================
   P4 NEEDS STAGE — five cases, sidebar rail + story panel. Pinned + scroll-linked on wide/tall screens
   (.nd.is-staged, set by stage.js); a swipeable selector elsewhere. Text is never faded.
   ===================================================================== */
.nd-section .block__head { margin-bottom: clamp(1.25rem, 1rem + 1vw, 2rem); }
.nd { display: block; }
.nd-sticky { display: grid; grid-template-columns: minmax(270px, 318px) minmax(0, 1fr); gap: 1.25rem; align-items: start; min-width: 0; }
.nd-rail { display: grid; gap: .7rem; min-width: 0; }
.nd-hint { margin: 0; color: var(--text-2); font-size: var(--fs-meta); line-height: 1.7; }
.nd-hint__scroll { display: none; }
.nd.is-staged .nd-hint__scroll { display: inline; }
.nd.is-staged .nd-hint__manual { display: none; }
.nd-opts__list { gap: .45rem; }
.nd-opt { grid-template-columns: 38px minmax(0, 1fr) auto; padding: .7rem .8rem; transition: border-color var(--dur-2), background var(--dur-2), box-shadow var(--dur-2); }
.nd-opt__icon { width: 38px; height: 38px; }
.nd-opt__txt small { font-size: var(--fs-meta); }
.nd-opt__n { align-self: start; color: var(--text-3); font-size: var(--fs-micro); font-weight: 700; font-family: var(--font-num); }
.nd-opt.is-past .nd-opt__icon { color: var(--ok); }
.nd-opt:has(input:checked) .nd-opt__n { color: var(--blue-300); }
.nd-meter { display: flex; align-items: center; gap: .75rem; }
.nd-progress { flex: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.nd-progress span { position: relative; height: 4px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.nd-progress i { position: absolute; inset-block: 0; inset-inline-start: 0; width: calc(var(--f, 0) * 100%); border-radius: 4px; background: var(--blue-400); transition: width .15s linear; }
.nd-count { color: var(--text-2); font-size: var(--fs-meta); font-weight: 600; font-family: var(--font-num); direction: ltr; unicode-bidi: isolate; white-space: nowrap; }

.nd-out { gap: .85rem; }
.nd-out__k { gap: .35rem .5rem; }
.nd-out__case { padding: .1rem .6rem; border-radius: 999px; background: rgb(47 123 255 / .16); color: var(--blue-200); font-weight: 600; }
.nd-out__pain { margin: .1rem 0 0; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.75; }
.nd-scene { display: grid; gap: .55rem; }
.nd-beats__icon { display: inline-grid; place-items: center; }
.nd-beats__icon svg { width: 15px; height: 15px; }
.nd-beats__n { display: inline-flex; align-items: center; gap: .35rem; }
.nd-result { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: .75rem; align-items: stretch; }
.nd-proof { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); background: var(--line-2); }
.nd-proof > div { display: grid; gap: .1rem; align-content: center; padding: .55rem .7rem; background: var(--surface-2); min-width: 0; }
.nd-proof small { color: var(--text-3); font-size: var(--fs-micro); line-height: 1.5; }
.nd-proof b { color: var(--text-1); font-size: .95rem; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.nd-proof .is-due b { color: var(--warn); }
.nd-out .jr-limit, .nd-out .avail { margin: 0; font-size: var(--fs-sm); }
.nd-out.is-entering .nd-proof > div { animation: nd-in .45s var(--ease-out) both; animation-delay: calc(200ms + var(--i, 0) * 60ms); }

@media (min-width: 1081px) {
  /* the four steps read as one horizontal process with a thread that fills step by step */
  .nd-beats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; padding-top: .2rem; }
  .nd-beats::before { inset-inline: 1.4rem; top: 1.25rem; bottom: auto; width: auto; height: 2px; }
  .nd-beats::after { inset-inline-start: 1.4rem; top: 1.25rem; height: 2px; width: calc((100% - 2.8rem) * var(--nd-p, 0)); transition: width .4s var(--ease-out); }
  .nd-beats li, .nd-beats li:first-child { grid-template-columns: minmax(0, 1fr); gap: .45rem; padding: 0 .1rem .2rem; border-top: 0; align-content: start; }
  .nd-beats li > div { padding: .65rem .75rem; border-radius: 12px; border: 1px solid var(--line-1); background: rgb(255 255 255 / .02); transition: border-color var(--dur-2), background var(--dur-2), transform var(--dur-2); }
  .nd-beats li.is-now { background: none; }
  .nd-beats li.is-now > div { border-color: rgb(82 148 255 / .55); background: rgb(47 123 255 / .08); transform: translateY(-2px); }
  .nd-beats li.is-lit:not(.is-now) > div { border-color: var(--line-2); }
  .nd-beats p { font-size: .94rem; line-height: 1.8; }
}
.nd.is-staged::after { content: ""; display: block; height: var(--stage-run, 0px); }
.nd.is-staged .nd-sticky { position: sticky; top: calc(var(--header-h) + 12px); min-height: var(--nd-h, auto); }
.nd.is-staged, .nd.is-staged * { overflow-anchor: none; }
.nd.is-measuring .nd-out.is-entering *, .nd.is-measuring .nd-out { animation: none !important; }

@media (max-width: 1080px) {
  .nd-sticky { grid-template-columns: minmax(0, 1fr); gap: .9rem; }
  /* all five cases stay visible as a compact grid of tabs (nothing off-screen); swipe on the story steps through them
     and the meter shows where you are */
  .nd-opts__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 158px), 1fr)); gap: .4rem; }
  .nd-result { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 360px) {
  .nd-proof { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .nd-progress i, .nd-opt, .nd-beats li > div, .nd-beats::after { transition: none; }
  .nd-out.is-entering .nd-proof > div { animation: none; }
}
.nd-result .nd-gain { display: block; align-self: stretch; margin: 0; }
/* compact desktop heights (e.g. 1536×820, 1440×800): the pain quote stays in the panel, the rail lists titles */
@media (min-width: 1081px) and (max-height: 880px) {
  .nd-opt { padding: .5rem .75rem; align-items: center; }
  .nd-opt__txt small { display: none; }
  .nd-opt__icon { width: 34px; height: 34px; }
  .nd-out { gap: .55rem; padding: 1.05rem 1.25rem; }
  .nd-out h3 { font-size: clamp(1.2rem, 1rem + .6vw, 1.45rem); }
  .nd-beats p { font-size: .9rem; line-height: 1.7; }
  .nd-beats li > div { padding: .5rem .65rem; }
  .nd-proof > div { padding: .4rem .65rem; }
  .nd-result .nd-gain { padding: .55rem .8rem; line-height: 1.75; }
  .nd-out .jr-limit, .nd-out .avail { line-height: 1.7; }
}
@media (min-width: 1081px) and (max-height: 790px) {
  .nd-out { gap: .45rem; padding-block: .9rem; }
  .nd-out__pain { line-height: 1.6; }
  .nd-scene { gap: .4rem; }
}
@media (max-width: 1080px) {
  .nd-opt__txt small { display: none; }
  .nd-opt { grid-template-columns: 30px minmax(0, 1fr) auto; gap: .5rem; align-items: center; padding: .45rem .6rem; }
  .nd-opt__icon { width: 30px; height: 30px; }
  .nd-opt__icon svg { width: 18px; height: 18px; }
  .nd-opt__txt b { font-size: .9rem; line-height: 1.4; }
}

/* =====================================================================
   P2 PRICING — 0 SAR concept (clearly conditional), three quote-based tiers, selectors, comparison, governance.
   ===================================================================== */
.pr-hero .page-hero__grid { align-items: center; }
.pr-trust { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.pr-trust li { position: relative; padding-inline-start: 1.3rem; color: var(--text-2); font-size: var(--fs-sm); }
.pr-trust li::before { content: ""; position: absolute; inset-inline-start: 0; top: .55em; width: .7rem; height: .4rem; border-inline-start: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.pr-offer { position: relative; display: grid; gap: .7rem; padding: clamp(1.4rem, 1rem + 1.5vw, 2.2rem); border-radius: 26px; background: linear-gradient(160deg, #ffffff 0%, #f1f5ff 100%); color: #2e3a57; box-shadow: 0 40px 90px -40px rgb(47 123 255 / .55), 0 0 0 1px rgb(140 184 255 / .5); scroll-margin-top: calc(var(--header-h) + 16px);
  --text-1: #0a1430; --text-2: #2e3a57; --text-3: #46526f; --line-1: rgb(16 34 80 / .12); --line-2: rgb(16 34 80 / .2); --blue-300: #1546b8; --focus-ring: #1546b8; }
.pr-offer__flag { justify-self: start; margin: 0; padding: .3rem .75rem; border-radius: 999px; background: #fff4dc; color: #7a4b00; border: 1px solid #f1c66e; font-size: var(--fs-meta); font-weight: 600; line-height: 1.6; }
.pr-offer__k { margin: .2rem 0 0; color: #1546b8; font-weight: 700; font-size: var(--fs-sm); }
.pr-price { display: inline-flex; align-items: baseline; gap: .35rem; margin: 0; color: #0a1430; font-family: var(--font-num); font-weight: 700; line-height: 1; }
.pr-offer .pr-price { font-size: clamp(3.6rem, 2.6rem + 3vw, 5.2rem); }
.pr-price__n { letter-spacing: -.02em; }
.pr-offer__t { margin: 0; color: #0a1430; font-size: clamp(1.2rem, 1rem + .7vw, 1.55rem); line-height: 1.5; }
.pr-offer__list { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.pr-offer__list li { color: #2e3a57; font-size: var(--fs-sm); line-height: 1.8; }
.pr-offer__list b { color: #0a1430; }
.pr-offer__note { margin: 0; color: #46526f; font-size: var(--fs-meta); line-height: 1.75; }
.pr-offer__note b { color: #7a4b00; }

.pr-pick { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 1rem 2rem; margin-bottom: 1rem; }
.pr-pick__set { margin: 0; padding: 0; border: 0; min-width: 0; }
.pr-pick__set legend { margin-bottom: .5rem; color: var(--text-1); font-weight: 600; font-size: var(--fs-sm); }
.pr-pick__opts { display: flex; flex-wrap: wrap; gap: .5rem; }
.pr-chip { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: .45rem 1rem; border-radius: 999px; border: 1px solid var(--line-2); background: rgb(255 255 255 / .03); color: var(--text-2); cursor: pointer; transition: border-color var(--dur-1), background var(--dur-1); }
.pr-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pr-chip b { font-weight: 600; font-size: var(--fs-sm); }
.pr-chip:hover { border-color: var(--line-3); }
.pr-chip:has(input:checked) { border-color: var(--blue-400); background: var(--blue-600); color: #fff; }
.pr-chip:has(input:focus-visible) { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.pr-advice { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1rem 2rem; margin-bottom: 1.75rem; padding: 1.25rem 1.4rem; border-radius: 18px; border: 1px solid var(--line-2); background: var(--surface-1); }
.pr-advice__k { margin: 0 0 .35rem; color: var(--blue-300); font-size: var(--fs-meta); font-weight: 600; }
.pr-advice__t { margin: 0; color: var(--text-1); font-family: var(--font-display); font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); line-height: 1.6; }
.pr-advice__why { margin: .4rem 0 0; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.8; }
.pr-advice__side { display: grid; gap: .5rem; align-content: start; }
.pr-advice__side .ticks { margin: 0; }
.pr-advice__mods { display: flex; flex-wrap: wrap; gap: .35rem; }
.pr-advice .avail { margin: 0; }

.pr-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }
.pr-card { position: relative; display: flex; flex-direction: column; gap: .55rem; padding: 1.35rem 1.25rem 1.25rem; border-radius: 20px; border: 1px solid var(--line-2); background: var(--surface-1); transition: border-color var(--dur-2), box-shadow var(--dur-2), transform var(--dur-2); }
.pr-card h3 { margin: 0; font-size: 1.3rem; line-height: 1.4; }
.pr-card__tag { margin: 0; color: var(--text-3); font-size: var(--fs-meta); font-weight: 600; }
.pr-card .pr-price { color: var(--text-1); font-size: 2.6rem; }
.pr-card .pr-price--quote { font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; line-height: 1.6; min-height: 2.6rem; display: flex; align-items: center; }
.pr-card__flag { margin: 0; padding: .3rem .6rem; border-radius: 10px; background: rgb(242 187 85 / .14); color: var(--warn); font-size: var(--fs-meta); line-height: 1.6; }
.pr-card__fit { margin: 0; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.8; }
.pr-card__k { margin: .2rem 0 0; color: var(--text-1); font-size: var(--fs-meta); font-weight: 700; }
.pr-card .ticks { margin: 0; flex: 1; align-content: start; }
.pr-card .ticks li { font-size: var(--fs-sm); }
.pr-card__limits { margin: 0; padding-top: .5rem; border-top: 1px dashed var(--line-2); color: var(--text-3); font-size: var(--fs-meta); line-height: 1.7; }
.pr-card__ctas { display: grid; gap: .4rem; justify-items: center; margin-top: .3rem; }
.pr-card__note { margin: 0; text-align: center; color: var(--warn); font-size: var(--fs-meta); font-weight: 600; }
.pr-card__rec { display: none; position: absolute; top: -.8rem; inset-inline-start: 1.1rem; margin: 0; padding: .15rem .7rem; border-radius: 999px; background: var(--blue-600); color: #fff; font-size: var(--fs-micro); font-weight: 700; }
.pr-card.is-rec { border-color: var(--blue-400); box-shadow: 0 0 0 1px var(--blue-400), 0 30px 60px -36px rgb(47 123 255 / .8); transform: translateY(-4px); }
.pr-card.is-rec .pr-card__rec { display: block; }
.pr-card--free { background: linear-gradient(180deg, rgb(47 123 255 / .16), var(--surface-1) 55%); border-color: rgb(140 184 255 / .45); }

.pr-compare { margin-top: clamp(2rem, 1.5rem + 2vw, 3rem); }
.pr-compare__t { margin: 0 0 .8rem; font-size: var(--fs-h3); }
.pr-table { width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.pr-table th, .pr-table td { padding: .75rem .9rem; border-bottom: 1px solid var(--line-1); text-align: start; vertical-align: middle; line-height: 1.6; color: var(--text-2); }
.pr-table thead th { color: var(--text-1); font-weight: 700; background: var(--surface-1); }
.pr-table tbody th { color: var(--text-1); font-weight: 600; }
.pr-table .is-rec { background: rgb(47 123 255 / .1); color: var(--text-1); }
.pr-table .pr-price--cell { font-size: 1.35rem; color: var(--text-1); }
.pr-table td small { display: block; color: var(--warn); font-size: var(--fs-micro); }
.pr-compare__note { margin: .8rem 0 0; color: var(--text-3); font-size: var(--fs-meta); }

.pr-states { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.pr-state { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1rem; align-items: baseline; padding: .8rem 1rem; border-radius: 14px; border: 1px solid var(--line-2); background: #fff; }
.pr-state b { justify-self: start; padding: .15rem .65rem; border-radius: 999px; font-size: var(--fs-meta); }
.pr-state span { color: var(--text-2); font-size: var(--fs-sm); line-height: 1.8; }
.pr-state--ok b { background: #ddf5ea; color: #0f6b4a; }
.pr-state--warn b { background: #fff1d6; color: #7a4b00; }
.pr-state--wait b { background: #e8efff; color: #1546b8; }

@media (max-width: 1180px) { .pr-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.6rem; } }
@media (max-width: 860px) { .pr-pick, .pr-advice { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .pr-cards { grid-template-columns: minmax(0, 1fr); }
  .pr-state { grid-template-columns: minmax(0, 1fr); gap: .35rem; }
  .pr-chip { padding-inline: .8rem; }
}
@media (prefers-reduced-motion: reduce) { .pr-card, .pr-chip { transition: none; } .pr-card.is-rec { transform: none; } }

/* =====================================================================
   P3 KNOWLEDGE MEGA — daily jobs tablist → preview (outcome, mini diagram, start a task, find an answer),
   six most-used guides, search + reading list. Light panel, dark ink (≥4.5:1), text ≥14px.
   ===================================================================== */
.mega__grid--resources.kn-grid { grid-template-columns: 236px minmax(0, 1.15fr) minmax(0, 1fr) 236px; gap: 1.25rem; }
.kn-jobs { display: grid; gap: .3rem; }
.kn-job { grid-template-columns: 34px minmax(0, 1fr); align-items: center; }
.kn-preview { display: grid; gap: .65rem; align-content: start; padding: 1rem 1.1rem; border-radius: 16px; background: linear-gradient(180deg, #f3f7ff, #fff 70%); border: 1px solid rgb(45 108 240 / .18); min-width: 0; }
.kn-preview:focus-visible { outline: 2px solid #1546b8; outline-offset: 2px; }
.kn-preview__out { display: flex; gap: .45rem; align-items: flex-start; margin: 0; color: #0a1430; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; line-height: 1.6; }
.kn-preview__out svg { flex: none; width: 18px; height: 18px; margin-top: .25rem; color: #1d6b43; }
.kn-flow { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; margin: .1rem 0 0; padding: 0; list-style: none; }
.kn-flow::before { content: ""; position: absolute; top: 13px; inset-inline: 12%; height: 2px; background: rgb(45 108 240 / .25); }
.kn-flow li { position: relative; display: grid; justify-items: center; gap: .3rem; text-align: center; color: #2e3a57; font-size: .875rem; line-height: 1.45; }
.kn-flow__n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 2px solid #1f63e8; color: #1546b8; font-family: var(--font-num); font-weight: 700; font-size: .875rem; }
.kn-preview.is-entering .kn-flow li { animation: nd-slide .4s var(--ease-out) both; animation-delay: calc(var(--i) * 60ms); }
.kn-start { display: grid; grid-template-columns: minmax(0, 1fr) 18px; align-items: center; gap: 0 .5rem; padding: .6rem .85rem; border-radius: 12px; background: #1f63e8; color: #fff; text-decoration: none; }
.kn-start small { grid-column: 1; color: #fff; font-size: .875rem; }
.kn-start b { grid-column: 1; font-size: .95rem; line-height: 1.5; }
.kn-start svg { grid-column: 2; grid-row: 1 / span 2; width: 18px; height: 18px; }
.kn-start:hover { background: #1749b8; }
.kn-ask { display: flex; gap: .35rem; align-items: center; margin: .2rem 0 0; color: #0a1430; font-weight: 700; font-size: .875rem; }
.kn-ask svg { width: 16px; height: 16px; color: #1546b8; }
.kn-answers { display: grid; gap: .1rem; margin: 0; padding: 0; list-style: none; }
.kn-answers a { display: flex; justify-content: space-between; gap: .5rem; align-items: center; min-height: 36px; padding: .3rem .5rem; margin-inline: -.5rem; border-radius: 8px; color: #1a2b55; font-size: .9rem; line-height: 1.5; text-decoration: none; }
.kn-answers a:hover { background: #eef3fd; color: #0d2f80; }
.kn-answers svg { flex: none; width: 15px; height: 15px; color: #1546b8; }
.kn-note { margin: 0; padding: .45rem .6rem; border-radius: 10px; background: #fff6e2; color: #6b4300; font-size: .875rem; line-height: 1.6; }
.kn-grid .mega__guides { grid-template-columns: minmax(0, 1fr); gap: .35rem; }
.kn-grid .mega__guide { padding: .5rem .7rem; gap: .15rem; }
.kn-col-side { display: grid; gap: .9rem; align-content: start; }
.kn-search { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: .55rem; align-items: center; padding: .6rem .75rem; border-radius: 12px; border: 1px solid rgb(16 34 80 / .2); background: #fff; color: #0a1430; text-decoration: none; }
.kn-search svg { width: 20px; height: 20px; color: #1546b8; }
.kn-search b { display: block; font-size: .925rem; }
.kn-search small { display: block; color: #4a5672; font-size: .875rem; }
.kn-search:hover { border-color: #1546b8; }
@media (min-width: 1081px) and (max-width: 1300px) {
  .mega__grid--resources.kn-grid { grid-template-columns: 210px minmax(0, 1.2fr) minmax(0, 1fr); }
  .kn-col-side { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .mega__grid--resources.kn-grid { grid-template-columns: minmax(0, 1fr); }
  .kn-jobs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kn-grid .mega__guides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .kn-grid .mega__guides { grid-template-columns: minmax(0, 1fr); }
  .kn-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: .6rem; }
  .kn-flow::before { display: none; }
}
@media (prefers-reduced-motion: reduce) { .kn-preview.is-entering .kn-flow li { animation: none; } }

/* W16 chapters: per-chapter reading fill under each index stop + "chapter x of 6 · step y of 4" status */
.ch-index a::after { content: ""; position: absolute; inset-inline-start: 44px; inset-inline-end: 0; bottom: 2px; height: 2px; border-radius: 2px; background: linear-gradient(270deg, var(--blue-400) calc(var(--f, 0) * 100%), transparent 0); opacity: .9; }
.ch-index a[aria-current]::after { height: 3px; }
.ch-now { margin: .9rem 0 0; padding: .45rem .7rem; border-radius: 10px; background: rgb(47 123 255 / .12); color: var(--blue-200); font-size: var(--fs-meta); font-weight: 600; line-height: 1.6; }
.ch-rail a { background-image: linear-gradient(270deg, rgb(82 148 255 / .35) calc(var(--f, 0) * 100%), transparent 0); background-repeat: no-repeat; background-size: 100% 3px; background-position: bottom; }

/* W16: case changes never fade text — the entrance is motion only (no opacity), so content is readable at once */
@keyframes nd-slide { from { transform: translateY(8px); } to { transform: none; } }
.nd-out.is-entering .nd-beats li, .nd-out.is-entering .nd-proof > div { animation-name: nd-slide; }
@media (prefers-reduced-motion: reduce) { .nd-out.is-entering .nd-beats li, .nd-out.is-entering .nd-proof > div { animation: none; } }
