/**
 * Mohamed Saleh V2 — Digital Products Calculator
 * Economic Pricing Model + Results + SEO/AIO Content
 * Version: 1.3.2 — SaaS / Membership / Subscription Card Activation
 */

:root {
  --ms-dpc-blue: var(--ms-color-blue, #4A7CC6);
  --ms-dpc-blue-hover: var(--ms-color-blue-hover, #356CB8);
  --ms-dpc-orange: var(--ms-color-orange, #F79A10);
  --ms-dpc-orange-hover: var(--ms-color-orange-hover, #E68900);
  --ms-dpc-navy: var(--ms-color-navy, #354963);
  --ms-dpc-dark: var(--ms-color-dark, #243447);
  --ms-dpc-heading: var(--ms-color-heading, #1B2430);
  --ms-dpc-body: var(--ms-color-body, #4F5B6A);
  --ms-dpc-muted: var(--ms-color-muted, #7B8794);
  --ms-dpc-border: var(--ms-color-border, #DCE3EA);
  --ms-dpc-bg: var(--ms-color-bg, #F6F8FB);
  --ms-dpc-white: #FFFFFF;
  --ms-dpc-soft-blue: var(--ms-color-soft-blue, #EEF5FD);
  --ms-dpc-soft-orange: var(--ms-color-soft-orange, #FFF4E5);
  --ms-dpc-success: var(--ms-color-success, #2F855A);
  --ms-dpc-danger: #C2413B;
  --ms-dpc-shadow-sm: 0 10px 30px rgba(36,52,71,.06);
  --ms-dpc-shadow-md: 0 18px 50px rgba(36,52,71,.09);
  --ms-dpc-container: 1320px;
}

.ms-v2-page--digital-products-calculator .ms-dpc-hero,
.ms-v2-page--digital-products-calculator .ms-dpc-workspace,
.ms-v2-page--digital-products-calculator .ms-dpc-calculator-step,
.ms-v2-page--digital-products-calculator .ms-dpc-content-section {
  direction: rtl;
  font-family: var(--ms-font-sans, "Tajawal", Arial, sans-serif);
  color: var(--ms-dpc-body);
  box-sizing: border-box;
}

.ms-v2-page--digital-products-calculator .ms-dpc-hero *,
.ms-v2-page--digital-products-calculator .ms-dpc-workspace *,
.ms-v2-page--digital-products-calculator .ms-dpc-calculator-step *,
.ms-v2-page--digital-products-calculator .ms-dpc-content-section * { box-sizing: border-box; }

.ms-v2-page--digital-products-calculator [hidden] { display: none !important; }

.ms-dpc-container { width: min(calc(100% - 48px), var(--ms-dpc-container)); margin-inline: auto; }

.ms-v2-page--digital-products-calculator input[type="number"],
.ms-v2-page--digital-products-calculator .ms-dpc-progress strong,
.ms-v2-page--digital-products-calculator .ms-dpc-output-preview__metrics strong,
.ms-v2-page--digital-products-calculator .ms-dpc-live-total strong,
.ms-v2-page--digital-products-calculator .ms-dpc-unit-economics-preview strong,
.ms-v2-page--digital-products-calculator .ms-dpc-reference-preview strong,
.ms-v2-page--digital-products-calculator .ms-dpc-result-card strong,
.ms-v2-page--digital-products-calculator .ms-dpc-result-hero__primary strong,
.ms-v2-page--digital-products-calculator .ms-dpc-scenario-table,
.ms-v2-page--digital-products-calculator .ms-dpc-example__flow strong {
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

.ms-v2-page--digital-products-calculator input[type="number"] {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

.ms-dpc-eyebrow {
  display: inline-flex; align-items: center; gap: 9px; width: fit-content;
  margin: 0 0 20px; padding: 8px 12px; border: 1px solid rgba(74,124,198,.18);
  border-radius: 999px; background: var(--ms-dpc-soft-blue); color: var(--ms-dpc-blue-hover);
  font-size: 14px; font-weight: 700; line-height: 1.5;
}
.ms-dpc-eyebrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ms-dpc-eyebrow--compact { margin-bottom: 15px; }

.ms-dpc-btn {
  min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 20px; border: 1px solid transparent; border-radius: 9px; font: inherit;
  font-size: 16.5px; font-weight: 700; line-height: 1.4; text-decoration: none !important; cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}
.ms-dpc-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ms-dpc-btn:hover:not(:disabled) { transform: translateY(-1px); }
.ms-dpc-btn--primary { background: var(--ms-dpc-orange); border-color: var(--ms-dpc-orange); color: #fff !important; box-shadow: 0 8px 20px rgba(247,154,16,.18); }
.ms-dpc-btn--primary:hover:not(:disabled) { background: var(--ms-dpc-orange-hover); border-color: var(--ms-dpc-orange-hover); color:#fff !important; box-shadow: 0 10px 24px rgba(247,154,16,.23); }
.ms-dpc-btn--outline { background: transparent; border-color: var(--ms-dpc-blue); color: var(--ms-dpc-blue) !important; }
.ms-dpc-btn--outline:hover:not(:disabled) { background: var(--ms-dpc-soft-blue); border-color: var(--ms-dpc-blue-hover); color: var(--ms-dpc-blue-hover) !important; }
.ms-dpc-btn--soft { background:#fff; border-color: var(--ms-dpc-border); color: var(--ms-dpc-muted) !important; }
.ms-dpc-btn:disabled { transform:none; background:#E7EBEF; border-color:#D5DCE4; color:#8A96A3 !important; box-shadow:none; cursor:not-allowed; }
.ms-dpc-btn:focus-visible, .ms-dpc-choice-card:has(input:focus-visible), .ms-dpc-goal-card:has(input:focus-visible), .ms-dpc-segmented button:focus-visible { outline:3px solid rgba(74,124,198,.24); outline-offset:3px; }

/* HERO */
.ms-dpc-hero {
  position:relative; overflow:hidden; padding:76px 0 82px;
  background: radial-gradient(circle at 8% 14%, rgba(74,124,198,.09), transparent 26%), linear-gradient(180deg,#fff 0%,#FBFCFE 100%);
  border-bottom:1px solid rgba(220,227,234,.72);
}
.ms-dpc-hero::after { content:""; position:absolute; left:-90px; bottom:-110px; width:300px; height:300px; border-radius:50%; border:1px solid rgba(74,124,198,.09); box-shadow:inset 0 0 0 46px rgba(74,124,198,.018), inset 0 0 0 92px rgba(74,124,198,.014); pointer-events:none; }
.ms-dpc-hero__grid { position:relative; z-index:1; display:grid; grid-template-columns:minmax(0,1.08fr) minmax(390px,.92fr); align-items:center; gap:70px; }
.ms-dpc-hero__content { max-width:720px; }
.ms-dpc-hero__title { margin:0; color:var(--ms-dpc-heading); font-size:clamp(42px,4.2vw,58px); font-weight:800; line-height:1.22; letter-spacing:-.8px; }
.ms-dpc-hero__lead { max-width:710px; margin:24px 0 0; color:var(--ms-dpc-body); font-size:20px; font-weight:400; line-height:1.9; }
.ms-dpc-hero__actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:30px; }
.ms-dpc-trust { display:flex; flex-wrap:wrap; gap:11px 20px; margin-top:29px; padding-top:23px; border-top:1px solid var(--ms-dpc-border); }
.ms-dpc-trust span { display:inline-flex; align-items:center; gap:9px; color:var(--ms-dpc-body); font-size:15px; font-weight:600; line-height:1.6; }
.ms-dpc-trust svg { width:17px; height:17px; flex:0 0 17px; fill:none; stroke:var(--ms-dpc-blue); stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.ms-dpc-hero__visual { position:relative; }
.ms-dpc-hero__visual::before { content:""; position:absolute; inset:9% 7% -4% -3%; border-radius:26px; background:var(--ms-dpc-soft-blue); transform:rotate(-2deg); }
.ms-dpc-economics-card { position:relative; z-index:1; padding:25px; border:1px solid var(--ms-dpc-border); border-radius:18px; background:rgba(255,255,255,.98); box-shadow:var(--ms-dpc-shadow-md); }
.ms-dpc-economics-card__head { display:flex; justify-content:space-between; gap:18px; padding-bottom:19px; border-bottom:1px solid var(--ms-dpc-border); }
.ms-dpc-economics-card__head > div { display:grid; gap:6px; }
.ms-dpc-economics-card__head small { direction:ltr; width:fit-content; color:var(--ms-dpc-muted); font-size:12.5px; font-weight:700; letter-spacing:.35px; }
.ms-dpc-economics-card__head strong { color:var(--ms-dpc-heading); font-size:21px; font-weight:800; line-height:1.45; }
.ms-dpc-economics-card__head > span { height:fit-content; padding:6px 9px; border-radius:999px; background:var(--ms-dpc-soft-orange); color:#A45D00; font-size:12px; font-weight:800; }
.ms-dpc-economics-flow { display:grid; gap:9px; padding:19px 0; }
.ms-dpc-economics-flow__item { display:grid; grid-template-columns:38px 1fr; align-items:center; gap:12px; padding:11px 12px; border:1px solid transparent; border-radius:11px; }
.ms-dpc-economics-flow__item > span { width:36px; height:36px; display:grid; place-items:center; border-radius:9px; background:var(--ms-dpc-bg); color:var(--ms-dpc-muted); font-size:12px; font-weight:800; direction:ltr; }
.ms-dpc-economics-flow__item > div { display:grid; gap:2px; }
.ms-dpc-economics-flow__item strong { color:var(--ms-dpc-heading); font-size:16px; font-weight:700; }
.ms-dpc-economics-flow__item small { direction:ltr; width:fit-content; color:var(--ms-dpc-muted); font-size:12px; font-weight:500; }
.ms-dpc-economics-flow__item.is-active { border-color:rgba(74,124,198,.18); background:var(--ms-dpc-soft-blue); }
.ms-dpc-economics-flow__item.is-active > span { background:var(--ms-dpc-blue); color:#fff; }
.ms-dpc-economics-card__result { display:flex; align-items:center; gap:12px; padding:15px; border-radius:12px; background:var(--ms-dpc-dark); color:#fff; }
.ms-dpc-economics-card__result-icon { width:40px; height:40px; flex:0 0 40px; display:grid; place-items:center; border-radius:10px; background:rgba(255,255,255,.08); color:#fff; }
.ms-dpc-economics-card__result-icon svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; }
.ms-dpc-economics-card__result div { display:grid; gap:2px; }
.ms-dpc-economics-card__result small { color:var(--ms-color-border, #DCE3EA); font-size:12px; }
.ms-dpc-economics-card__result strong { font-size:16px; font-weight:800; }
.ms-dpc-market-note { display:flex; justify-content:space-between; gap:14px; margin-top:14px; padding:12px 13px; border:1px dashed rgba(74,124,198,.28); border-radius:10px; background:#FBFDFF; }
.ms-dpc-market-note strong { color:var(--ms-dpc-heading); font-size:13px; }
.ms-dpc-market-note span { direction:ltr; color:var(--ms-dpc-muted); font-size:12px; }

/* WORKSPACE */
.ms-dpc-workspace { padding:72px 0 26px; background:var(--ms-dpc-bg); scroll-margin-top:90px; }
.ms-dpc-workspace__top { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(380px,.8fr); align-items:end; gap:36px; }
.ms-dpc-section-heading h2 { margin:0; color:var(--ms-dpc-heading); font-size:clamp(30px,2.8vw,38px); font-weight:800; line-height:1.38; }
.ms-dpc-section-heading > p:not(.ms-dpc-eyebrow) { max-width:800px; margin:15px 0 0; font-size:17px; line-height:1.85; }
.ms-dpc-privacy-note { display:grid; grid-template-columns:46px 1fr; gap:14px; padding:18px; border:1px solid rgba(74,124,198,.18); border-radius:14px; background:#fff; box-shadow:inset 3px 0 0 rgba(74,124,198,.18); }
.ms-dpc-privacy-note__icon { width:44px; height:44px; display:grid; place-items:center; border-radius:11px; background:var(--ms-dpc-soft-blue); color:var(--ms-dpc-blue); }
.ms-dpc-privacy-note__icon svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.ms-dpc-privacy-note strong { color:var(--ms-dpc-heading); font-size:16px; font-weight:800; }
.ms-dpc-privacy-note p { margin:4px 0 0; font-size:14px; line-height:1.7; }
.ms-dpc-progress { margin-top:34px; padding:22px; border:1px solid var(--ms-dpc-border); border-radius:16px; background:#fff; box-shadow:var(--ms-dpc-shadow-sm); }
.ms-dpc-progress__summary { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:13px; }
.ms-dpc-progress__summary span { color:var(--ms-dpc-muted); font-size:14px; font-weight:700; }
.ms-dpc-progress__summary strong { direction:ltr; unicode-bidi:isolate; color:var(--ms-dpc-heading); font-size:15px; }
.ms-dpc-progress__track { height:5px; overflow:hidden; border-radius:999px; background:#E9EEF4; }
.ms-dpc-progress__track span { display:block; width:16.666%; height:100%; border-radius:inherit; background:var(--ms-dpc-blue); transition:width .24s ease; }
.ms-dpc-progress__steps { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px; margin:18px 0 0; padding:0; list-style:none; }
.ms-dpc-progress__steps li { min-height:66px; display:grid; grid-template-columns:32px 1fr; grid-template-rows:auto auto; column-gap:10px; align-items:center; padding:10px; border:1px solid transparent; border-radius:10px; color:var(--ms-dpc-muted); }
.ms-dpc-progress__steps li > span { grid-row:1/3; width:30px; height:30px; display:grid; place-items:center; border-radius:8px; background:var(--ms-dpc-bg); color:inherit; font-size:12px; font-weight:800; }
.ms-dpc-progress__steps li strong { align-self:end; color:var(--ms-dpc-heading); font-size:14px; font-weight:800; line-height:1.35; }
.ms-dpc-progress__steps li small { align-self:start; font-size:12px; line-height:1.35; }
.ms-dpc-progress__steps li.is-current { border-color:rgba(74,124,198,.2); background:var(--ms-dpc-soft-blue); color:var(--ms-dpc-blue-hover); }
.ms-dpc-progress__steps li.is-current > span { background:var(--ms-dpc-blue); color:#fff; }
.ms-dpc-progress__steps li.is-complete { color:var(--ms-dpc-success); }
.ms-dpc-progress__steps li.is-complete > span { background:#F0FAF5; color:var(--ms-dpc-success); }
.ms-dpc-workspace__output-preview { display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); gap:24px; align-items:center; margin-top:18px; padding:18px 22px; border:1px solid var(--ms-dpc-border); border-radius:14px; background:var(--ms-dpc-dark); color:#fff; }
.ms-dpc-workspace__output-preview > div:first-child { display:grid; gap:4px; }
.ms-dpc-workspace__output-preview small { color:#CAD4DF; font-size:13px; }
.ms-dpc-workspace__output-preview > div:first-child strong { font-size:19px; font-weight:800; }
.ms-dpc-workspace__output-preview p { margin:3px 0 0; color:var(--ms-color-border, #DCE3EA); font-size:14px; line-height:1.65; }
.ms-dpc-output-preview__metrics { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
.ms-dpc-output-preview__metrics span { min-height:36px; display:inline-flex; align-items:center; gap:7px; padding:8px 11px; border:1px solid rgba(255,255,255,.1); border-radius:8px; background:rgba(255,255,255,.06); color:var(--ms-color-border, #DCE3EA); font-size:12.5px; direction:ltr; }
.ms-dpc-output-preview__metrics strong { color:#fff; font-size:13.5px; }

/* CALCULATOR SHELL */
.ms-dpc-calculator-step { padding:24px 0 72px; background:var(--ms-dpc-bg); scroll-margin-top:94px; }
.ms-dpc-calculator-step + .ms-dpc-calculator-step { padding-top:0; }
.ms-dpc-step-shell { overflow:hidden; border:1px solid var(--ms-dpc-border); border-radius:18px; background:#fff; box-shadow:var(--ms-dpc-shadow-sm); }
.ms-dpc-step-shell__header { display:grid; grid-template-columns:60px minmax(0,1fr); gap:18px; align-items:start; padding:28px 34px 25px; border-bottom:1px solid var(--ms-dpc-border); background:#FCFDFE; }
.ms-dpc-step-index { width:56px; height:56px; display:grid; place-items:center; border-radius:13px; background:var(--ms-dpc-soft-blue); color:var(--ms-dpc-blue-hover); font-size:14px; font-weight:800; direction:ltr; }
.ms-dpc-step-shell__title p { direction:ltr; width:fit-content; margin:0 0 4px; color:var(--ms-dpc-blue); font-size:12.5px; font-weight:800; letter-spacing:.4px; }
.ms-dpc-step-shell__title h2 { margin:0; color:var(--ms-dpc-heading); font-size:28px; font-weight:800; line-height:1.45; }
.ms-dpc-step-shell__title > span { display:block; max-width:1000px; margin-top:7px; font-size:16.5px; line-height:1.8; }
.ms-dpc-form-body, .ms-dpc-results-body { display:grid; gap:20px; padding:30px 34px; }
.ms-dpc-step-shell__footer { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:22px 34px; border-top:1px solid var(--ms-dpc-border); background:#FCFDFE; }
.ms-dpc-step-action { min-width:250px; display:grid; gap:7px; }
.ms-dpc-step-action small { color:var(--ms-dpc-muted); font-size:12px; text-align:center; }
.ms-dpc-step-tip { max-width:840px; display:flex; align-items:flex-start; gap:9px; margin:0; font-size:15.5px; line-height:1.8; }
.ms-dpc-step-tip svg, .ms-dpc-method-note svg { width:19px; height:19px; flex:0 0 19px; margin-top:2px; fill:none; stroke:var(--ms-dpc-orange-hover); stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.ms-dpc-step-tip strong { color:var(--ms-dpc-heading); font-weight:800; }

/* CHOICES */
.ms-dpc-choice-fieldset { margin:0; padding:0; border:0; min-width:0; }
.ms-dpc-choice-fieldset > legend { margin-bottom:16px; color:var(--ms-dpc-heading); font-size:17px; font-weight:800; }
.ms-dpc-product-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.ms-dpc-choice-card { position:relative; min-height:148px; display:grid; align-content:start; gap:5px; padding:20px; border:1px solid var(--ms-dpc-border); border-radius:14px; background:#fff; cursor:pointer; transition:border-color .18s ease, background-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.ms-dpc-choice-card:hover:not(.ms-dpc-choice-card--disabled) { transform:translateY(-1px); border-color:#BFD3ED; box-shadow:0 10px 24px rgba(36,52,71,.05); }
.ms-dpc-choice-card input { position:absolute; opacity:0; pointer-events:none; }
.ms-dpc-choice-card__icon { width:42px; height:42px; display:grid; place-items:center; margin-bottom:6px; border-radius:10px; background:var(--ms-dpc-soft-blue); color:var(--ms-dpc-blue); }
.ms-dpc-choice-card__icon svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.ms-dpc-choice-card strong { color:var(--ms-dpc-heading); font-size:18px; font-weight:800; }
.ms-dpc-choice-card small { color:var(--ms-dpc-muted); font-size:13px; line-height:1.65; }
.ms-dpc-choice-card.is-selected { border-color:rgba(74,124,198,.42); background:#FBFDFF; box-shadow:inset 0 3px 0 var(--ms-dpc-blue); }
.ms-dpc-choice-card.is-selected::after { content:"تم الاختيار"; position:absolute; top:18px; left:18px; padding:5px 8px; border-radius:999px; background:var(--ms-dpc-soft-blue); color:var(--ms-dpc-blue-hover); font-size:10.5px; font-weight:800; }
.ms-dpc-choice-card--disabled { background:#FAFBFC; color:var(--ms-dpc-muted); cursor:not-allowed; }
.ms-dpc-choice-card--disabled::after { content:""; position:absolute; inset:0; background:rgba(246,248,251,.08); pointer-events:none; }
.ms-dpc-choice-card--disabled em { position:absolute; top:18px; left:18px; padding:5px 8px; border-radius:999px; background:#F1F3F5; color:#687684; font-size:10.5px; font-style:normal; font-weight:800; z-index:1; }

/* PANELS / FIELDS */
.ms-dpc-form-grid { display:grid; gap:18px; }
.ms-dpc-form-grid--two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.ms-dpc-form-grid--goal { grid-template-columns:minmax(0,.72fr) minmax(0,1.28fr); align-items:start; }
.ms-dpc-form-panel { min-width:0; padding:25px; border:1px solid var(--ms-dpc-border); border-radius:15px; background:#fff; }
.ms-dpc-form-panel--highlight { border-color:rgba(74,124,198,.24); background:#FBFDFF; box-shadow:inset 0 3px 0 rgba(74,124,198,.76); }
.ms-dpc-form-panel--acquisition { background:#FFFCF7; border-color:rgba(247,154,16,.20); }
.ms-dpc-form-panel--compact { max-width:none; width:100%; display:grid; grid-template-columns:minmax(0,1fr) minmax(280px,340px); align-items:end; gap:28px; }
.ms-dpc-form-panel--compact .ms-dpc-form-panel__head { margin-bottom:0; }
.ms-dpc-form-panel--recovery, .ms-dpc-form-panel--forecast, .ms-dpc-form-panel--tax, .ms-dpc-form-panel--goal-value { background:#FCFDFE; }
.ms-dpc-form-panel__head { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:22px; }
.ms-dpc-form-panel__head > div { min-width:0; }
.ms-dpc-form-panel__head small, .ms-dpc-goal-value-copy > small, .ms-dpc-reference-preview span, .ms-dpc-unit-economics-preview small { direction:ltr; display:block; width:fit-content; color:var(--ms-dpc-blue); font-size:12.5px; font-weight:800; letter-spacing:.3px; }
.ms-dpc-form-panel__head h3, .ms-dpc-goal-value-copy h3, .ms-dpc-toggle-row h3, .ms-dpc-scenario-planner h3, .ms-dpc-assumptions h3 { margin:4px 0 0; color:var(--ms-dpc-heading); font-size:22px; font-weight:800; line-height:1.5; }
.ms-dpc-form-panel__head p, .ms-dpc-goal-value-copy p, .ms-dpc-toggle-row p, .ms-dpc-scenario-planner__head p { margin:6px 0 0; font-size:15.5px; line-height:1.75; }
.ms-dpc-live-total { flex:0 0 auto; display:grid; gap:2px; padding:9px 12px; border-radius:9px; background:var(--ms-dpc-soft-blue); color:var(--ms-dpc-muted); font-size:11.5px; }
.ms-dpc-live-total strong { color:var(--ms-dpc-blue-hover); font-size:14.5px; direction:ltr; unicode-bidi:isolate; }
.ms-dpc-fields-grid { display:grid; gap:15px; }
.ms-dpc-fields-grid--2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.ms-dpc-fields-grid--3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.ms-dpc-field { display:grid; gap:7px; min-width:0; }
.ms-dpc-field > span { color:var(--ms-dpc-heading); font-size:15px; font-weight:700; line-height:1.55; }
.ms-dpc-field > small { color:var(--ms-dpc-muted); font-size:13px; line-height:1.7; }
.ms-dpc-field input, .ms-dpc-field select { width:100%; min-height:50px; padding:11px 13px; border:1px solid var(--ms-dpc-border); border-radius:9px; background:#fff; color:var(--ms-dpc-heading); font:inherit; font-size:16px; outline:none; transition:border-color .18s ease, box-shadow .18s ease; }
.ms-dpc-field select { cursor:pointer; }
.ms-dpc-field input:focus, .ms-dpc-field select:focus { border-color:var(--ms-dpc-blue); box-shadow:0 0 0 3px rgba(74,124,198,.10); }
.ms-dpc-field input:invalid { border-color:rgba(194,65,59,.5); }
.ms-dpc-field--large input { min-height:60px; font-size:24px; font-weight:800; }
.ms-dpc-input-unit { position:relative; }
.ms-dpc-input-unit input { padding-left:54px; }
.ms-dpc-input-unit b { position:absolute; left:12px; top:50%; transform:translateY(-50%); min-width:30px; padding-right:9px; border-right:1px solid var(--ms-dpc-border); color:var(--ms-dpc-muted); font-size:12px; font-weight:800; text-align:center; direction:ltr; }
.ms-dpc-inline-fields { display:grid; grid-template-columns:minmax(260px,.52fr) minmax(0,1.48fr); gap:18px; align-items:end; }
.ms-dpc-definition-box { padding:16px 18px; border:1px dashed rgba(74,124,198,.28); border-radius:11px; background:var(--ms-dpc-soft-blue); }
.ms-dpc-definition-box strong { color:var(--ms-dpc-heading); font-size:15px; }
.ms-dpc-definition-box p { margin:6px 0 0; font-size:14px; line-height:1.75; }
.ms-dpc-unit-economics-preview { display:grid; grid-template-columns:repeat(2,minmax(0,220px)) 1fr; align-items:center; gap:12px; padding:16px 18px; border-radius:13px; background:var(--ms-dpc-dark); color:#fff; }
.ms-dpc-unit-economics-preview > div { display:grid; gap:3px; padding-left:14px; border-left:1px solid rgba(255,255,255,.12); }
.ms-dpc-unit-economics-preview small { color:#BFCBDA; }
.ms-dpc-unit-economics-preview strong { direction:ltr; unicode-bidi:isolate; font-size:17px; }
.ms-dpc-unit-economics-preview p { margin:0; color:var(--ms-color-border, #DCE3EA); font-size:13.5px; line-height:1.7; }

/* FORECAST / TOGGLES */
.ms-dpc-segmented { display:inline-flex; gap:5px; padding:5px; border:1px solid var(--ms-dpc-border); border-radius:10px; background:var(--ms-dpc-bg); }
.ms-dpc-segmented label { position:relative; cursor:pointer; }
.ms-dpc-segmented label input { position:absolute; opacity:0; pointer-events:none; }
.ms-dpc-segmented label span, .ms-dpc-segmented button { min-height:38px; display:inline-flex; align-items:center; justify-content:center; padding:8px 14px; border:0; border-radius:7px; background:transparent; color:var(--ms-dpc-body); font:inherit; font-size:13px; font-weight:700; cursor:pointer; }
.ms-dpc-segmented label:has(input:checked) span, .ms-dpc-segmented button.is-active { background:#fff; color:var(--ms-dpc-blue-hover); box-shadow:0 2px 8px rgba(36,52,71,.08); }
.ms-dpc-forecast-fields { display:grid; grid-template-columns:minmax(260px,440px); gap:16px; margin-top:18px; }
.ms-dpc-forecast-fields--historical { grid-template-columns:repeat(2,minmax(220px,1fr)) minmax(260px,.8fr); align-items:end; }
.ms-dpc-formula-box { display:grid; gap:4px; padding:13px 15px; border:1px solid rgba(74,124,198,.18); border-radius:10px; background:var(--ms-dpc-soft-blue); }
.ms-dpc-formula-box span { color:var(--ms-dpc-blue-hover); font-size:11px; font-weight:800; }
.ms-dpc-formula-box code { direction:ltr; width:fit-content; color:var(--ms-dpc-heading); font-size:12px; }
.ms-dpc-formula-box strong { color:var(--ms-dpc-heading); font-size:18px; direction:ltr; unicode-bidi:isolate; }
.ms-dpc-toggle-row { display:flex; align-items:center; justify-content:space-between; gap:30px; }
.ms-dpc-toggle-row > div { max-width:850px; }
.ms-dpc-toggle-row > div > small { color:var(--ms-dpc-blue); font-size:11.5px; font-weight:800; }
.ms-dpc-switch { flex:0 0 auto; display:flex; align-items:center; gap:10px; cursor:pointer; }
.ms-dpc-switch input { position:absolute; opacity:0; }
.ms-dpc-switch > span { position:relative; width:48px; height:26px; border-radius:999px; background:#DDE3E9; transition:background-color .18s ease; }
.ms-dpc-switch > span::after { content:""; position:absolute; top:4px; right:4px; width:18px; height:18px; border-radius:50%; background:#fff; box-shadow:0 2px 5px rgba(36,52,71,.15); transition:transform .18s ease; }
.ms-dpc-switch input:checked + span { background:var(--ms-dpc-blue); }
.ms-dpc-switch input:checked + span::after { transform:translateX(-22px); }
.ms-dpc-switch b { min-width:72px; color:var(--ms-dpc-muted); font-size:12px; }
.ms-dpc-tax-fields { max-width:340px; margin-top:18px; }

/* GOAL */
.ms-dpc-reference-preview { display:grid; gap:3px; margin-top:16px; padding:14px 15px; border-radius:10px; background:var(--ms-dpc-dark); color:#fff; }
.ms-dpc-reference-preview span { color:#C8D2DE; }
.ms-dpc-reference-preview strong { direction:ltr; unicode-bidi:isolate; font-size:20px; }
.ms-dpc-reference-preview small { color:#C8D2DE; font-size:11px; line-height:1.5; }
.ms-dpc-choice-fieldset--goal { padding:2px 0; }
.ms-dpc-goal-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.ms-dpc-goal-card { position:relative; min-height:110px; display:grid; grid-template-columns:42px 1fr; gap:12px; align-items:start; padding:16px; border:1px solid var(--ms-dpc-border); border-radius:12px; background:#fff; cursor:pointer; transition:border-color .18s ease, background-color .18s ease, transform .18s ease; }
.ms-dpc-goal-card:hover { transform:translateY(-1px); border-color:#BFD3ED; }
.ms-dpc-goal-card input { position:absolute; opacity:0; pointer-events:none; }
.ms-dpc-goal-card > span { width:40px; height:40px; display:grid; place-items:center; border-radius:9px; background:var(--ms-dpc-bg); color:var(--ms-dpc-muted); font-size:11px; font-weight:800; direction:ltr; }
.ms-dpc-goal-card div { display:grid; gap:4px; }
.ms-dpc-goal-card strong { color:var(--ms-dpc-heading); font-size:16px; font-weight:800; direction:ltr; text-align:right; }
.ms-dpc-goal-card small { font-size:12px; line-height:1.55; }
.ms-dpc-goal-card.is-selected { border-color:rgba(74,124,198,.36); background:var(--ms-dpc-soft-blue); }
.ms-dpc-goal-card.is-selected > span { background:var(--ms-dpc-blue); color:#fff; }
.ms-dpc-form-panel--goal-value { display:grid; grid-template-columns:minmax(0,1fr) minmax(220px,.38fr); align-items:center; gap:24px; }
.ms-dpc-goal-value-field { max-width:320px; justify-self:end; width:100%; }
.ms-dpc-method-note { display:flex; align-items:flex-start; gap:10px; padding:15px 17px; border:1px solid rgba(247,154,16,.22); border-radius:12px; background:var(--ms-dpc-soft-orange); }
.ms-dpc-method-note p { margin:0; font-size:15px; line-height:1.8; }
.ms-dpc-method-note strong { color:var(--ms-dpc-heading); }

/* RESULTS */
.ms-dpc-result-hero { display:grid; grid-template-columns:minmax(0,1fr) minmax(320px,.55fr); gap:24px; align-items:center; padding:26px; border-radius:16px; background:var(--ms-dpc-dark); color:#fff; }
.ms-dpc-result-hero__copy > span { display:inline-flex; padding:7px 10px; border-radius:999px; background:rgba(74,124,198,.2); color:#D7E7FA; font-size:12px; font-weight:800; }
.ms-dpc-result-hero__copy h3 { margin:9px 0 0; font-size:24px; font-weight:800; }
.ms-dpc-result-hero__copy p { max-width:760px; margin:9px 0 0; color:var(--ms-color-border, #DCE3EA); font-size:15.5px; line-height:1.75; }
.ms-dpc-result-hero__primary { min-width:0; display:grid; gap:5px; padding:18px; border:1px solid rgba(255,255,255,.1); border-radius:13px; background:rgba(255,255,255,.06); }
.ms-dpc-result-hero__primary small { color:#CBD6E2; font-size:12px; font-weight:800; direction:ltr; }
.ms-dpc-result-hero__primary strong { color:#fff; font-size:clamp(28px,3vw,38px); font-weight:800; direction:ltr; unicode-bidi:isolate; }
.ms-dpc-result-hero__primary span { color:#CBD6E2; font-size:12.5px; }
.ms-dpc-results-grid { display:grid; gap:14px; }
.ms-dpc-results-grid--primary { grid-template-columns:repeat(4,minmax(0,1fr)); }
.ms-dpc-results-grid--secondary { grid-template-columns:repeat(3,minmax(0,1fr)); }
.ms-dpc-result-card { min-width:0; min-height:142px; padding:20px; border:1px solid var(--ms-dpc-border); border-radius:13px; background:#fff; }
.ms-dpc-result-card--featured { border-color:rgba(74,124,198,.3); background:#FBFDFF; box-shadow:inset 0 3px 0 var(--ms-dpc-blue); }
.ms-dpc-result-card small { display:block; color:var(--ms-dpc-muted); font-size:12px; font-weight:800; direction:ltr; text-align:right; line-height:1.45; }
.ms-dpc-result-card strong { display:block; margin-top:8px; color:var(--ms-dpc-heading); font-size:24px; font-weight:800; direction:ltr; unicode-bidi:isolate; overflow-wrap:anywhere; }
.ms-dpc-result-card p { margin:8px 0 0; font-size:13.5px; line-height:1.7; }
.ms-dpc-price-health { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 20px; border:1px solid var(--ms-dpc-border); border-radius:13px; background:#fff; }
.ms-dpc-price-health > div { display:grid; gap:3px; }
.ms-dpc-price-health small { color:var(--ms-dpc-muted); font-size:12px; font-weight:800; direction:ltr; width:fit-content; }
.ms-dpc-price-health strong { color:var(--ms-dpc-heading); font-size:18px; }
.ms-dpc-price-health p { margin:0; font-size:14px; line-height:1.7; }
.ms-dpc-price-health > span { flex:0 0 auto; padding:8px 12px; border-radius:999px; background:var(--ms-dpc-bg); color:var(--ms-dpc-muted); font-size:12px; font-weight:800; }
.ms-dpc-price-health.is-positive { border-color:rgba(47,133,90,.22); background:#F9FDFB; }
.ms-dpc-price-health.is-positive > span { background:#EAF7F0; color:var(--ms-dpc-success); }
.ms-dpc-price-health.is-warning { border-color:rgba(247,154,16,.28); background:#FFFCF7; }
.ms-dpc-price-health.is-warning > span { background:var(--ms-dpc-soft-orange); color:#9D5C00; }
.ms-dpc-price-health.is-danger { border-color:rgba(194,65,59,.24); background:#FFF9F8; }
.ms-dpc-price-health.is-danger > span { background:#FDEDEC; color:var(--ms-dpc-danger); }
.ms-dpc-scenario-planner { padding:22px; border:1px solid var(--ms-dpc-border); border-radius:15px; background:#FCFDFE; }
.ms-dpc-scenario-planner__head { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; margin-bottom:18px; }
.ms-dpc-scenario-planner__head > div:first-child > small { color:var(--ms-dpc-blue); font-size:12px; font-weight:800; direction:ltr; }
.ms-dpc-scenario-table-wrap { overflow-x:auto; }
.ms-dpc-scenario-table { width:100%; border-collapse:collapse; min-width:700px; }
.ms-dpc-scenario-table th, .ms-dpc-scenario-table td { padding:13px 12px; border-bottom:1px solid var(--ms-dpc-border); text-align:right; vertical-align:middle; }
.ms-dpc-scenario-table th { color:var(--ms-dpc-heading); font-size:13px; font-weight:800; background:#fff; }
.ms-dpc-scenario-table td { font-size:13.5px; }
.ms-dpc-scenario-table td strong { color:var(--ms-dpc-heading); font-size:15px; direction:ltr; unicode-bidi:isolate; }
.ms-dpc-scenario-table .is-feasible { color:var(--ms-dpc-success); font-weight:800; }
.ms-dpc-scenario-table .is-unavailable { color:var(--ms-dpc-danger); font-weight:800; }
.ms-dpc-assumptions { display:grid; grid-template-columns:minmax(240px,.42fr) minmax(0,1.58fr); gap:24px; padding:22px; border-radius:15px; background:var(--ms-dpc-soft-blue); }
.ms-dpc-assumptions > div > small { color:var(--ms-dpc-blue); font-size:12px; font-weight:800; direction:ltr; }
.ms-dpc-assumptions ul { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:0; padding:0; list-style:none; }
.ms-dpc-assumptions li { padding:13px 14px; border:1px solid rgba(74,124,198,.14); border-radius:10px; background:#fff; }
.ms-dpc-assumptions li strong { display:block; color:var(--ms-dpc-heading); font-size:13px; direction:ltr; text-align:right; }
.ms-dpc-assumptions li span { display:block; margin-top:5px; font-size:13px; line-height:1.7; }

/* CONTENT */
.ms-dpc-content-section { padding:76px 0; background:#fff; }
.ms-dpc-content-section--framework { background:#fff; }
.ms-dpc-content-section--education { background:var(--ms-dpc-bg); }
.ms-dpc-content-section--faq { background:#fff; }
.ms-dpc-content-section--cta { padding:64px 0 78px; background:var(--ms-dpc-bg); }
.ms-dpc-framework-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-top:30px; }
.ms-dpc-framework-grid article { display:grid; grid-template-columns:46px 1fr; gap:14px; padding:22px; border:1px solid var(--ms-dpc-border); border-radius:15px; background:#fff; }
.ms-dpc-framework-grid article > span { width:44px; height:44px; display:grid; place-items:center; border-radius:10px; background:var(--ms-dpc-soft-blue); color:var(--ms-dpc-blue); font-size:12px; font-weight:800; direction:ltr; }
.ms-dpc-framework-grid article small { color:var(--ms-dpc-blue); font-size:12px; font-weight:800; direction:ltr; }
.ms-dpc-framework-grid article h3 { margin:5px 0 0; color:var(--ms-dpc-heading); font-size:20px; font-weight:800; line-height:1.5; }
.ms-dpc-framework-grid article p { margin:7px 0 0; font-size:15.5px; line-height:1.8; }
.ms-dpc-framework-equation { display:grid; grid-template-columns:auto 1fr auto; gap:20px; align-items:center; margin-top:18px; padding:20px 22px; border-radius:14px; background:var(--ms-dpc-dark); color:#fff; }
.ms-dpc-framework-equation span { color:#C8D2DE; font-size:14px; }
.ms-dpc-framework-equation strong { direction:ltr; color:#fff; font-size:18px; text-align:center; }
.ms-dpc-framework-equation p { margin:0; color:#C8D2DE; font-size:13px; line-height:1.6; }
.ms-dpc-definitions-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-top:30px; }
.ms-dpc-definitions-grid article { padding:20px; border:1px solid var(--ms-dpc-border); border-radius:13px; background:#fff; }
.ms-dpc-definitions-grid h3 { margin:0; color:var(--ms-dpc-heading); font-size:18px; font-weight:800; direction:ltr; text-align:right; }
.ms-dpc-definitions-grid p { margin:8px 0 0; font-size:15.5px; line-height:1.8; }
.ms-dpc-definitions-grid p strong { color:var(--ms-dpc-heading); }
.ms-dpc-example { margin-top:18px; padding:24px; border:1px solid rgba(74,124,198,.2); border-radius:15px; background:#fff; }
.ms-dpc-example__intro small { color:var(--ms-dpc-blue); font-size:12px; font-weight:800; direction:ltr; }
.ms-dpc-example__intro h3 { margin:4px 0 0; color:var(--ms-dpc-heading); font-size:21px; font-weight:800; }
.ms-dpc-example__intro p { margin:5px 0 0; font-size:15px; line-height:1.75; }
.ms-dpc-example__flow { display:flex; align-items:stretch; gap:10px; margin-top:18px; overflow-x:auto; padding-bottom:4px; }
.ms-dpc-example__flow > div { min-width:190px; display:grid; gap:5px; padding:14px; border:1px solid var(--ms-dpc-border); border-radius:10px; background:var(--ms-dpc-bg); }
.ms-dpc-example__flow > div span { color:var(--ms-dpc-muted); font-size:12px; direction:ltr; }
.ms-dpc-example__flow > div strong { color:var(--ms-dpc-heading); font-size:16px; direction:ltr; unicode-bidi:isolate; }
.ms-dpc-example__flow > b { align-self:center; color:var(--ms-dpc-blue); font-size:18px; }
.ms-dpc-example__flow > div.is-result { border-color:rgba(74,124,198,.24); background:var(--ms-dpc-soft-blue); }
.ms-dpc-example > p { margin:16px 0 0; font-size:14.5px; line-height:1.75; }
.ms-dpc-faq-layout { display:grid; grid-template-columns:minmax(280px,.55fr) minmax(0,1.45fr); gap:50px; align-items:start; }
.ms-dpc-section-heading--side { position:sticky; top:100px; }
.ms-dpc-faq-list { display:grid; gap:10px; }
.ms-dpc-faq-list details { border:1px solid var(--ms-dpc-border); border-radius:12px; background:#fff; }
.ms-dpc-faq-list summary { position:relative; padding:18px 20px 18px 52px; color:var(--ms-dpc-heading); font-size:16px; font-weight:800; line-height:1.65; cursor:pointer; list-style:none; }
.ms-dpc-faq-list summary::-webkit-details-marker { display:none; }
.ms-dpc-faq-list summary::after { content:"+"; position:absolute; left:18px; top:50%; transform:translateY(-50%); width:26px; height:26px; display:grid; place-items:center; border-radius:7px; background:var(--ms-dpc-soft-blue); color:var(--ms-dpc-blue); font-size:18px; font-weight:600; }
.ms-dpc-faq-list details[open] summary::after { content:"−"; }
.ms-dpc-faq-list details > div { padding:0 20px 18px; }
.ms-dpc-faq-list details p { margin:0; font-size:15.5px; line-height:1.85; }
.ms-dpc-cta-panel { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(360px,.8fr); align-items:center; gap:34px; padding:32px; border-radius:18px; background:var(--ms-dpc-dark); color:#fff; }
.ms-dpc-cta-panel__copy .ms-dpc-eyebrow { margin-bottom:13px; background:rgba(74,124,198,.16); border-color:rgba(255,255,255,.1); color:#D7E7FA; }
.ms-dpc-cta-panel__copy h2 { margin:0; color:#fff; font-size:clamp(27px,2.6vw,36px); font-weight:800; line-height:1.45; }
.ms-dpc-cta-panel__copy > p:last-child { margin:11px 0 0; color:var(--ms-color-border, #DCE3EA); font-size:16px; line-height:1.8; }
.ms-dpc-cta-panel__actions { display:grid; gap:10px; }
.ms-dpc-tax-disclaimer { margin:18px auto 0; max-width:1040px; color:var(--ms-dpc-muted); font-size:13.5px; line-height:1.75; text-align:center; }
.ms-dpc-tax-disclaimer strong { color:var(--ms-dpc-heading); }

/* PREMIUM POLISH V1.1.0 */
@media (min-width:861px) {
  .ms-dpc-form-panel--compact > .ms-dpc-field { align-self:end; }
  .ms-dpc-form-panel--compact > .ms-dpc-field select { min-height:52px; }
  .ms-dpc-form-panel--compact .ms-dpc-form-panel__head p { max-width:720px; }
  .ms-dpc-results-grid--secondary .ms-dpc-result-card { min-height:156px; }
}

/* RESPONSIVE */
@media (max-width:1100px) {
  .ms-dpc-hero__grid { grid-template-columns:minmax(0,1fr) minmax(340px,.82fr); gap:42px; }
  .ms-dpc-workspace__top { grid-template-columns:1fr; align-items:start; }
  .ms-dpc-privacy-note { max-width:760px; }
  .ms-dpc-progress__steps { grid-template-columns:repeat(6,minmax(130px,1fr)); overflow-x:auto; padding-bottom:4px; }
  .ms-dpc-product-grid { grid-template-columns:repeat(3,minmax(220px,1fr)); overflow-x:auto; padding-bottom:5px; }
  .ms-dpc-results-grid--primary, .ms-dpc-results-grid--secondary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ms-dpc-definitions-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width:860px) {
  .ms-dpc-container { width:min(calc(100% - 30px),var(--ms-dpc-container)); }
  .ms-dpc-hero { padding:58px 0 64px; }
  .ms-dpc-hero__grid { grid-template-columns:1fr; }
  .ms-dpc-hero__content { max-width:none; }
  .ms-dpc-hero__visual { max-width:580px; width:100%; margin-inline:auto; }
  .ms-dpc-workspace { padding-top:60px; }
  .ms-dpc-workspace__output-preview { grid-template-columns:1fr; }
  .ms-dpc-output-preview__metrics { justify-content:flex-start; }
  .ms-dpc-form-grid--two, .ms-dpc-form-grid--goal, .ms-dpc-form-panel--goal-value, .ms-dpc-form-panel--compact, .ms-dpc-result-hero, .ms-dpc-assumptions, .ms-dpc-framework-grid, .ms-dpc-faq-layout, .ms-dpc-cta-panel { grid-template-columns:1fr; }
  .ms-dpc-goal-value-field { justify-self:start; }
  .ms-dpc-framework-equation { grid-template-columns:1fr; text-align:right; }
  .ms-dpc-framework-equation strong { text-align:right; }
  .ms-dpc-section-heading--side { position:static; }
  .ms-dpc-inline-fields { grid-template-columns:1fr; }
  .ms-dpc-forecast-fields--historical { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ms-dpc-forecast-fields--historical .ms-dpc-formula-box { grid-column:1/-1; }
}

@media (max-width:640px) {
  .ms-dpc-container { width:min(calc(100% - 24px),var(--ms-dpc-container)); }
  .ms-dpc-hero { padding:46px 0 52px; }
  .ms-dpc-eyebrow { margin-bottom:16px; font-size:12.5px; }
  .ms-dpc-hero__title { font-size:40px; line-height:1.28; letter-spacing:-.45px; }
  .ms-dpc-hero__lead { margin-top:18px; font-size:18px; line-height:1.85; }
  .ms-dpc-hero__actions { display:grid; grid-template-columns:1fr; margin-top:24px; }
  .ms-dpc-btn { width:100%; }
  .ms-dpc-trust { display:grid; grid-template-columns:1fr; gap:10px; margin-top:24px; }
  .ms-dpc-economics-card { padding:18px; }
  .ms-dpc-workspace { padding:52px 0 24px; }
  .ms-dpc-section-heading h2 { font-size:29px; }
  .ms-dpc-section-heading > p:not(.ms-dpc-eyebrow) { font-size:16px; }
  .ms-dpc-progress { padding:18px 16px; }
  .ms-dpc-workspace__output-preview { padding:16px; }
  .ms-dpc-calculator-step { padding-bottom:58px; }
  .ms-dpc-step-shell__header { grid-template-columns:50px minmax(0,1fr); gap:12px; padding:22px 18px 20px; }
  .ms-dpc-step-index { width:46px; height:46px; border-radius:11px; font-size:13px; }
  .ms-dpc-step-shell__title h2 { font-size:24px; }
  .ms-dpc-step-shell__title > span { font-size:14.5px; }
  .ms-dpc-form-body, .ms-dpc-results-body { padding:20px 18px; }
  .ms-dpc-step-shell__footer { align-items:stretch; flex-direction:column-reverse; padding:18px; }
  .ms-dpc-step-action { min-width:0; width:100%; }
  .ms-dpc-product-grid { grid-template-columns:1fr; overflow:visible; }
  .ms-dpc-choice-card { min-height:0; }
  .ms-dpc-fields-grid--2, .ms-dpc-fields-grid--3, .ms-dpc-goal-grid, .ms-dpc-results-grid--primary, .ms-dpc-results-grid--secondary, .ms-dpc-definitions-grid, .ms-dpc-assumptions ul { grid-template-columns:1fr; }
  .ms-dpc-form-panel { padding:19px; }
  .ms-dpc-form-panel__head { flex-direction:column; }
  .ms-dpc-live-total { width:100%; }
  .ms-dpc-unit-economics-preview { grid-template-columns:1fr; }
  .ms-dpc-unit-economics-preview > div { padding:0 0 9px; border-left:0; border-bottom:1px solid rgba(255,255,255,.12); }
  .ms-dpc-forecast-fields, .ms-dpc-forecast-fields--historical { grid-template-columns:1fr; }
  .ms-dpc-toggle-row, .ms-dpc-scenario-planner__head, .ms-dpc-price-health { align-items:flex-start; flex-direction:column; }
  .ms-dpc-segmented { width:100%; }
  .ms-dpc-segmented label, .ms-dpc-segmented button { flex:1; }
  .ms-dpc-segmented label span { width:100%; }
  .ms-dpc-result-hero { padding:20px; }
  .ms-dpc-result-hero__copy h3 { font-size:21px; }
  .ms-dpc-content-section { padding:62px 0; }
  .ms-dpc-cta-panel { padding:24px 20px; }
}

@media (prefers-reduced-motion:reduce) {
  .ms-dpc-btn, .ms-dpc-choice-card, .ms-dpc-goal-card, .ms-dpc-progress__track span, .ms-dpc-switch > span, .ms-dpc-switch > span::after { transition:none; }
}

/* ==========================================================
   FINAL DESKTOP POLISH V1.2.0
   Based on full-page Desktop QA after V1.1.0 deployment.
   No financial formula logic is changed in this pass.
   ========================================================== */

/* Critical contrast fix: WordPress/global heading rules can override inheritance. */
.ms-v2-page--digital-products-calculator .ms-dpc-result-hero__copy h3 {
  color: #FFFFFF !important;
}

.ms-v2-page--digital-products-calculator .ms-dpc-result-hero__copy p {
  color: var(--ms-color-border, #DCE3EA);
}

@media (min-width: 861px) {
  /* Form readability and rhythm */
  .ms-v2-page--digital-products-calculator .ms-dpc-form-body,
  .ms-v2-page--digital-products-calculator .ms-dpc-results-body {
    gap: 22px;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-form-panel {
    padding: 27px;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-form-panel__head p,
  .ms-v2-page--digital-products-calculator .ms-dpc-goal-value-copy p,
  .ms-v2-page--digital-products-calculator .ms-dpc-toggle-row p,
  .ms-v2-page--digital-products-calculator .ms-dpc-scenario-planner__head p {
    font-size: 16px;
    line-height: 1.8;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-field > span {
    font-size: 15.5px;
    line-height: 1.6;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-field > small {
    font-size: 13.5px;
    line-height: 1.75;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-field input,
  .ms-v2-page--digital-products-calculator .ms-dpc-field select {
    min-height: 52px;
  }

  /* Stronger choice hierarchy without adding visual noise */
  .ms-v2-page--digital-products-calculator .ms-dpc-choice-card strong {
    font-size: 18.5px;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-choice-card small {
    font-size: 13.5px;
    line-height: 1.7;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-choice-card.is-selected::after,
  .ms-v2-page--digital-products-calculator .ms-dpc-choice-card--disabled em {
    font-size: 11.5px;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-goal-card strong {
    font-size: 16.5px;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-goal-card small {
    font-size: 13px;
    line-height: 1.65;
  }

  /* Make primary step actions visually consistent across all steps */
  .ms-v2-page--digital-products-calculator .ms-dpc-step-action .ms-dpc-btn {
    width: 100%;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-step-action small {
    font-size: 12.5px;
  }

  /* Result hierarchy and contrast */
  .ms-v2-page--digital-products-calculator .ms-dpc-result-hero__copy h3 {
    font-size: 26px;
    line-height: 1.45;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-result-hero__copy p {
    font-size: 16px;
    line-height: 1.8;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-result-hero__primary small,
  .ms-v2-page--digital-products-calculator .ms-dpc-result-hero__primary span {
    font-size: 13px;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-result-card small {
    font-size: 13px;
    line-height: 1.5;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-result-card strong {
    font-size: 25px;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-result-card p {
    font-size: 14.5px;
    line-height: 1.75;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-results-grid--primary .ms-dpc-result-card {
    min-height: 148px;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-results-grid--secondary .ms-dpc-result-card {
    min-height: 152px;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-price-health p {
    font-size: 14.5px;
    line-height: 1.75;
  }

  /* Scenario and assumptions readability */
  .ms-v2-page--digital-products-calculator .ms-dpc-scenario-table th {
    font-size: 13.5px;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-scenario-table td {
    font-size: 14px;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-scenario-table td strong {
    font-size: 15.5px;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-assumptions li strong {
    font-size: 13.5px;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-assumptions li span {
    font-size: 14px;
    line-height: 1.75;
  }

  /* SEO/AIO content should remain comfortably readable at desktop distance */
  .ms-v2-page--digital-products-calculator .ms-dpc-framework-grid article p,
  .ms-v2-page--digital-products-calculator .ms-dpc-definitions-grid p {
    font-size: 16px;
    line-height: 1.85;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-framework-equation span {
    font-size: 14.5px;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-framework-equation p {
    font-size: 13.5px;
    line-height: 1.7;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-example__intro p {
    font-size: 15.5px;
    line-height: 1.8;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-example > p {
    font-size: 15px;
    line-height: 1.8;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-faq-list summary {
    font-size: 16.5px;
  }

  .ms-v2-page--digital-products-calculator .ms-dpc-faq-list details p {
    font-size: 16px;
    line-height: 1.9;
  }
}



/* ==========================================================
   MOBILE & TABLET RESPONSIVE QA V1.3.0
   Based on deployed 390px full-page QA.
   Goals:
   - Remove hidden horizontal navigation patterns.
   - Reduce unnecessary vertical length without shrinking text.
   - Keep numeric fields comfortably tappable.
   - Fix mixed RTL/LTR wrapping in result copy.
   - Present scenario comparison as mobile cards, not a squeezed table.
   ========================================================== */

.ms-dpc-results-content {
  display: grid;
  gap: 20px;
}

.ms-dpc-results-empty {
  display: grid;
  grid-template-columns: 56px minmax(0,1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border: 1px dashed rgba(74,124,198,.34);
  border-radius: 15px;
  background: #FBFDFF;
}

.ms-dpc-results-empty__icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--ms-dpc-soft-blue);
  color: var(--ms-dpc-blue);
}

.ms-dpc-results-empty__icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ms-dpc-results-empty__copy small {
  display: block;
  color: var(--ms-dpc-blue);
  font-size: 12px;
  font-weight: 800;
  direction: ltr;
  width: fit-content;
}

.ms-dpc-results-empty__copy h3 {
  margin: 5px 0 0;
  color: var(--ms-dpc-heading);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.5;
}

.ms-dpc-results-empty__copy p {
  margin: 6px 0 0;
  color: var(--ms-dpc-body);
  font-size: 14.5px;
  line-height: 1.8;
}

/* Defensive wrapping for Arabic copy that contains long English finance terms. */
.ms-v2-page--digital-products-calculator .ms-dpc-calculator-step p,
.ms-v2-page--digital-products-calculator .ms-dpc-step-shell__title > span,
.ms-v2-page--digital-products-calculator .ms-dpc-field > small,
.ms-v2-page--digital-products-calculator .ms-dpc-assumptions li span {
  overflow-wrap: anywhere;
  word-break: normal;
}

.ms-v2-page--digital-products-calculator .ms-dpc-result-card p,
.ms-v2-page--digital-products-calculator .ms-dpc-price-health p,
.ms-v2-page--digital-products-calculator .ms-dpc-assumptions li span,
.ms-v2-page--digital-products-calculator .ms-dpc-scenario-planner h3,
.ms-v2-page--digital-products-calculator .ms-dpc-method-note p {
  unicode-bidi: plaintext;
}

@media (max-width: 860px) {
  .ms-dpc-results-empty {
    grid-template-columns: 52px minmax(0,1fr);
  }

  .ms-dpc-results-empty > .ms-dpc-btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  /* Tablet: show all six progress steps without horizontal scrolling. */
  .ms-dpc-progress__steps {
    grid-template-columns: repeat(3, minmax(0,1fr));
    overflow: visible;
    padding-bottom: 0;
  }
}

@media (max-width: 640px) {
  /* Hero: preserve authority while avoiding a needlessly tall first viewport. */
  .ms-dpc-hero {
    padding: 40px 0 46px;
  }

  .ms-dpc-hero__title {
    font-size: 38px;
    line-height: 1.3;
  }

  .ms-dpc-hero__lead {
    font-size: 17px;
    line-height: 1.85;
  }

  .ms-dpc-trust {
    margin-top: 22px;
    padding-top: 19px;
  }

  .ms-dpc-economics-card {
    padding: 17px;
  }

  .ms-dpc-economics-card__head strong {
    font-size: 19px;
  }

  .ms-dpc-economics-flow__item {
    padding: 9px 10px;
  }

  .ms-dpc-market-note {
    display: grid;
    gap: 4px;
  }

  /* Workspace */
  .ms-dpc-workspace {
    padding-top: 46px;
  }

  .ms-dpc-progress {
    margin-top: 26px;
    padding: 16px;
  }

  /* All six steps are visible. No hidden horizontal scroll on mobile. */
  .ms-dpc-progress__steps {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
  }

  .ms-dpc-progress__steps li {
    min-height: 60px;
    grid-template-columns: 28px 1fr;
    column-gap: 8px;
    padding: 9px;
  }

  .ms-dpc-progress__steps li > span {
    width: 27px;
    height: 27px;
  }

  .ms-dpc-progress__steps li strong {
    font-size: 13px;
  }

  .ms-dpc-progress__steps li small {
    font-size: 11px;
  }

  .ms-dpc-workspace__output-preview {
    gap: 13px;
  }

  .ms-dpc-output-preview__metrics {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .ms-dpc-output-preview__metrics span {
    width: 100%;
    justify-content: space-between;
  }

  /* Step shells */
  .ms-dpc-calculator-step {
    padding: 20px 0 46px;
  }

  .ms-dpc-step-shell {
    border-radius: 15px;
  }

  .ms-dpc-step-shell__header {
    grid-template-columns: 46px minmax(0,1fr);
    gap: 11px;
    padding: 20px 17px 18px;
  }

  .ms-dpc-step-index {
    width: 43px;
    height: 43px;
  }

  .ms-dpc-step-shell__title h2 {
    font-size: 22px;
    line-height: 1.5;
  }

  .ms-dpc-step-shell__title > span {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.75;
  }

  .ms-dpc-form-body,
  .ms-dpc-results-body {
    gap: 16px;
    padding: 18px 17px;
  }

  .ms-dpc-form-panel {
    padding: 17px;
  }

  .ms-dpc-form-panel__head h3,
  .ms-dpc-goal-value-copy h3,
  .ms-dpc-toggle-row h3,
  .ms-dpc-scenario-planner h3,
  .ms-dpc-assumptions h3 {
    font-size: 20px;
  }

  .ms-dpc-form-panel__head h3 {
    unicode-bidi: plaintext;
  }

  .ms-dpc-form-panel__head p,
  .ms-dpc-goal-value-copy p,
  .ms-dpc-toggle-row p,
  .ms-dpc-scenario-planner__head p {
    font-size: 14px;
    line-height: 1.75;
  }

  /* Correct mobile action order: context/back first, primary action last. */
  .ms-dpc-step-shell__footer {
    flex-direction: column;
    gap: 12px;
    padding: 17px;
  }

  .ms-dpc-step-shell__footer > .ms-dpc-btn,
  .ms-dpc-step-shell__footer .ms-dpc-step-action,
  .ms-dpc-step-shell__footer .ms-dpc-step-action .ms-dpc-btn {
    width: 100%;
  }

  /* Product choices: two-column scan at 390px instead of six tall cards. */
  .ms-dpc-product-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
  }

  .ms-dpc-choice-card {
    min-height: 132px;
    padding: 15px;
  }

  .ms-dpc-choice-card__icon {
    width: 38px;
    height: 38px;
    margin-bottom: 4px;
  }

  .ms-dpc-choice-card strong {
    font-size: 16px;
    line-height: 1.45;
  }

  .ms-dpc-choice-card small {
    font-size: 12px;
    line-height: 1.55;
  }

  .ms-dpc-choice-card[data-dpc-product-card="other"] {
    grid-column: 1 / -1;
    min-height: 92px;
    grid-template-columns: 40px minmax(0,1fr);
    grid-template-rows: auto auto;
    column-gap: 12px;
    align-content: center;
  }

  .ms-dpc-choice-card[data-dpc-product-card="other"] .ms-dpc-choice-card__icon {
    grid-row: 1 / 3;
    margin: 0;
  }

  .ms-dpc-choice-card--disabled {
    grid-column: 1 / -1;
    min-height: 116px;
  }

  .ms-dpc-choice-card.is-selected::after,
  .ms-dpc-choice-card--disabled em {
    top: 12px;
    left: 12px;
  }

  /* Numeric inputs: pair simple fields on 390px. Readability wins again under 370px. */
  .ms-dpc-fields-grid--2,
  .ms-dpc-fields-grid--3 {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 12px;
  }

  .ms-dpc-fields-grid--3 > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .ms-dpc-field > span {
    font-size: 14px;
    line-height: 1.5;
  }

  .ms-dpc-field > small {
    font-size: 12.5px;
    line-height: 1.65;
  }

  .ms-dpc-field input,
  .ms-dpc-field select {
    min-height: 50px;
    padding: 10px 11px;
    font-size: 15.5px;
  }

  .ms-dpc-field--large input {
    min-height: 58px;
    font-size: 23px;
  }

  /* Results: two-column KPI scan at 390px, with safe wrapping for mixed-language copy. */
  .ms-dpc-results-grid--primary,
  .ms-dpc-results-grid--secondary {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
  }

  .ms-dpc-result-card {
    min-height: 0;
    padding: 15px;
  }

  .ms-dpc-result-card small {
    font-size: 11.5px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .ms-dpc-result-card strong {
    margin-top: 7px;
    font-size: 21px;
  }

  .ms-dpc-result-card p {
    margin-top: 7px;
    font-size: 12.75px;
    line-height: 1.65;
    overflow-wrap: anywhere;
  }

  .ms-dpc-result-hero {
    gap: 14px;
    padding: 18px;
  }

  .ms-dpc-result-hero__primary {
    padding: 15px;
  }

  .ms-dpc-price-health {
    gap: 12px;
  }

  /* Pricing Scenarios becomes a native mobile card grid; no horizontal table scroll. */
  .ms-dpc-scenario-planner {
    padding: 17px;
  }

  .ms-dpc-scenario-table-wrap {
    overflow: visible;
  }

  .ms-dpc-scenario-table {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .ms-dpc-scenario-table thead {
    display: none;
  }

  .ms-dpc-scenario-table tbody {
    display: grid;
    gap: 10px;
  }

  .ms-dpc-scenario-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    overflow: hidden;
    border: 1px solid var(--ms-dpc-border);
    border-radius: 11px;
    background: #fff;
  }

  .ms-dpc-scenario-table td {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 4px;
    padding: 11px;
    border-bottom: 1px solid var(--ms-dpc-border);
    text-align: right;
    overflow-wrap: anywhere;
  }

  .ms-dpc-scenario-table td:nth-child(odd) {
    border-inline-end: 1px solid var(--ms-dpc-border);
  }

  .ms-dpc-scenario-table td:nth-last-child(-n+2) {
    border-bottom: 0;
  }

  .ms-dpc-scenario-table td::before {
    color: var(--ms-dpc-muted);
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.35;
    direction: rtl;
    text-align: right;
  }

  .ms-dpc-scenario-table td:nth-child(1)::before { content: "الهدف"; }
  .ms-dpc-scenario-table td:nth-child(2)::before { content: "السعر المحسوب"; }
  .ms-dpc-scenario-table td:nth-child(3)::before { content: "مقارنة بالمرجعي"; }
  .ms-dpc-scenario-table td:nth-child(4)::before { content: "الجدوى"; }

  .ms-dpc-scenario-table td strong {
    font-size: 13.5px;
  }

  /* Model notes */
  .ms-dpc-assumptions {
    gap: 14px;
    padding: 17px;
  }

  .ms-dpc-assumptions ul {
    gap: 9px;
  }

  /* Worked example: show the whole equation instead of hiding steps off-canvas. */
  .ms-dpc-example {
    padding: 19px;
  }

  .ms-dpc-example__flow {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    overflow: visible;
  }

  .ms-dpc-example__flow > div {
    min-width: 0;
    width: 100%;
  }

  .ms-dpc-example__flow > b {
    justify-self: center;
    line-height: 1;
  }

  .ms-dpc-example__flow > div.is-result strong {
    direction: rtl;
    unicode-bidi: plaintext;
    text-align: right;
  }

  /* Lower content spacing */
  .ms-dpc-content-section {
    padding: 56px 0;
  }

  .ms-dpc-content-section--cta {
    padding: 52px 0 64px;
  }

  .ms-dpc-faq-list summary {
    padding: 16px 17px 16px 48px;
  }

  /* Compact initial Results state. Detailed KPIs appear only after calculation. */
  .ms-dpc-results-empty {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 11px;
    padding: 19px;
  }

  .ms-dpc-results-empty__icon {
    width: 46px;
    height: 46px;
  }

  .ms-dpc-results-empty__copy h3 {
    font-size: 20px;
  }

  .ms-dpc-results-empty__copy p {
    font-size: 14px;
    line-height: 1.75;
  }
}

/* Narrow phones: do not squeeze paired fields just to save height. */
@media (max-width: 370px) {
  .ms-dpc-hero__title {
    font-size: 34px;
  }

  .ms-dpc-product-grid,
  .ms-dpc-fields-grid--2,
  .ms-dpc-fields-grid--3,
  .ms-dpc-results-grid--primary,
  .ms-dpc-results-grid--secondary {
    grid-template-columns: 1fr;
  }

  .ms-dpc-fields-grid--3 > :last-child:nth-child(odd),
  .ms-dpc-choice-card--disabled,
  .ms-dpc-choice-card[data-dpc-product-card="other"] {
    grid-column: auto;
  }

  .ms-dpc-choice-card[data-dpc-product-card="other"] {
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: none;
    align-content: start;
  }

  .ms-dpc-choice-card[data-dpc-product-card="other"] .ms-dpc-choice-card__icon {
    grid-row: auto;
    margin-bottom: 4px;
  }

  .ms-dpc-result-card p {
    font-size: 13px;
  }
}


/* ==========================================================
   CARD LINK ACTIVATION V1.3.2
   Activates the dedicated SaaS / Membership / Subscription model card
   while preserving the existing visual treatment.
   ========================================================== */
.ms-v2-page--digital-products-calculator .ms-dpc-choice-card--linked {
  color: inherit !important;
  text-decoration: none !important;
}

.ms-v2-page--digital-products-calculator .ms-dpc-choice-card--linked em {
  position: absolute;
  top: 18px;
  left: 18px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #F1F3F5;
  color: #687684;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 800;
  z-index: 1;
}

.ms-v2-page--digital-products-calculator .ms-dpc-choice-card--linked:focus-visible {
  outline: 3px solid rgba(74,124,198,.24);
  outline-offset: 3px;
}

@media (min-width: 861px) {
  .ms-v2-page--digital-products-calculator .ms-dpc-choice-card--linked em {
    font-size: 11.5px;
  }
}
