/* ==========================================================================
   Udeyou OTP: marketing and legal pages
   /services · /pricing · /faq · /about · /contact · /terms · /privacy · errors
   Built on the tokens and components of style.css (light + [data-theme="dark"]).
   ========================================================================== */

/* ---------- 1. Inner-page hero (full bleed, under the dark header) ---------- */
.p-hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 72px 0 88px;
  color: var(--on-dark-muted);
  background:
    radial-gradient(720px 480px at 12% 18%, rgba(51, 88, 255, .30), transparent 62%),
    radial-gradient(620px 420px at 92% -6%, rgba(34, 199, 232, .14), transparent 60%),
    linear-gradient(180deg, var(--ink-950) 0%, var(--ink-900) 100%);
}
.is-bleed .site-main > .p-hero:first-child {
  margin-top: calc(-1 * var(--header-h) - 1px);
  padding-top: calc(var(--header-h) + 64px);
}
.p-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 30% 35%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 30% 35%, #000 20%, transparent 75%);
}
.p-hero::after {
  content: ""; position: absolute; inset: auto 0 0; height: 1px; z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(124, 149, 255, .35), transparent);
}
.p-hero :focus-visible { outline-color: var(--cyan); }
.p-hero.is-compact { padding-bottom: 72px; }
.is-bleed .site-main > .p-hero.is-compact:first-child { padding-top: calc(var(--header-h) + 52px); }

.p-hero-grid {
  display: grid; align-items: center; gap: 56px;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
}
.p-hero-grid.no-art { grid-template-columns: minmax(0, 1fr); }
.p-hero-grid.no-art .p-hero-copy { max-width: 760px; }
.p-hero-copy { max-width: 600px; }

.p-crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: 22px; font-size: 13.5px; color: var(--on-dark-subtle);
}
.p-crumbs a { color: rgba(222, 229, 255, .82); font-weight: 500; }
.p-crumbs a:hover { color: #fff; }
.p-crumbs [aria-current] { color: #fff; font-weight: 600; }
.p-hero .eyebrow { display: flex; width: fit-content; color: var(--brand-300); }
.p-hero-title {
  margin: 4px 0 18px;
  font-size: clamp(32px, 4vw, 50px); line-height: 1.25; font-weight: 700;
  color: #fff; text-wrap: balance;
}
.p-hero-lead { max-width: 600px; font-size: 18px; line-height: 1.9; color: var(--on-dark-muted); text-wrap: pretty; }
.p-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.p-hero .hero-facts { margin-top: 34px; padding-top: 24px; }

/* Status chips on the dark hero */
.p-chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.p-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px; border-radius: var(--radius-pill);
  font-size: 13.5px; font-weight: 500; line-height: 1.5; color: rgba(222, 229, 255, .9);
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12);
}
.p-chip svg { width: 15px; height: 15px; color: var(--cyan-300); }
.p-chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 3px rgba(245, 165, 36, .18); }
.p-chip.is-live { color: #DCE4FF; background: rgba(51, 88, 255, .20); border-color: rgba(138, 162, 255, .42); }
.p-chip.is-live .p-chip-dot { background: var(--brand-300); box-shadow: 0 0 0 3px rgba(51, 88, 255, .25); }
[data-theme="dark"] .p-chip.is-live { color: #D6DEFF; background: rgba(51, 88, 255, .18); border-color: rgba(51, 88, 255, .42); }
[data-theme="dark"] .p-chip.is-live .p-chip-dot { background: var(--brand-300); box-shadow: 0 0 0 3px rgba(51, 88, 255, .25); }

/* Artwork frame */
.p-hero-art { position: relative; margin: 0; }
.p-hero-art::before {
  content: ""; position: absolute; inset: 8% 6%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(51, 88, 255, .5), rgba(34, 199, 232, .16) 60%, transparent);
  filter: blur(30px);
}
.p-hero-art img {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: 0 0 0 1px rgba(138, 162, 255, .2), 0 40px 80px -30px rgba(0, 0, 0, .85);
}

/* Orbit visual for text-only heroes (FAQ, contact, legal) */
.p-hero-grid.has-orbit { grid-template-columns: minmax(0, 1fr) 400px; gap: 40px; }
.p-hero-grid.has-orbit .p-hero-copy { max-width: 720px; }
.p-orbit { position: relative; width: 400px; height: 300px; margin: -24px 0 -36px; }
.orbit-ring {
  position: absolute; top: 50%; left: 50%; border-radius: 50%;
  border: 1px solid rgba(138, 162, 255, .16);
  transform: translate(-50%, -50%);
}
.orbit-ring.r1 { width: 140px; height: 140px; border-color: rgba(138, 162, 255, .26); background: radial-gradient(closest-side, rgba(51, 88, 255, .28), transparent); }
.orbit-ring.r2 { width: 240px; height: 240px; border-style: dashed; border-color: rgba(138, 162, 255, .22); }
.orbit-ring.r3 { width: 320px; height: 320px; border-color: rgba(138, 162, 255, .10); }
.orbit-core {
  position: absolute; top: 50%; left: 50%; z-index: 1;
  display: block; width: 72px; height: 72px; border-radius: 18px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 8px rgba(51, 88, 255, .12), 0 18px 40px -10px rgba(51, 88, 255, .9);
}
.orbit-core img { display: block; width: 72px; height: 72px; border-radius: 18px; }
.orbit-node, .orbit-dot {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(var(--a)) translateX(var(--r)) rotate(calc(-1 * var(--a)));
}
.orbit-node {
  z-index: 1; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px;
  color: var(--cyan-300);
  background: linear-gradient(180deg, rgba(28, 38, 89, .92), rgba(18, 26, 68, .92));
  box-shadow: inset 0 0 0 1px rgba(138, 162, 255, .24), 0 14px 30px -12px rgba(0, 0, 0, .8);
}
.orbit-node svg { width: 23px; height: 23px; }
.orbit-node.n1 { --a: -32deg; --r: 160px; }
.orbit-node.n2 { --a: -148deg; --r: 120px; color: var(--brand-300); }
.orbit-node.n3 { --a: 150deg; --r: 160px; }
.orbit-node.n4 { --a: 34deg; --r: 120px; color: var(--brand-300); }
.orbit-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(34, 199, 232, .14), 0 0 14px rgba(34, 199, 232, .8); }
.orbit-dot.d1 { --a: 100deg; --r: 70px; }
.orbit-dot.d2 { --a: -95deg; --r: 160px; background: var(--brand-300); box-shadow: 0 0 0 4px rgba(138, 162, 255, .14); }
.orbit-dot.d3 { --a: 200deg; --r: 120px; width: 5px; height: 5px; }
@media (prefers-reduced-motion: no-preference) {
  .orbit-ring.r2 { animation: p-spin 60s linear infinite; }
  .orbit-node { animation: p-bob 6s ease-in-out infinite; }
  .orbit-node.n2 { animation-delay: -1.5s; }
  .orbit-node.n3 { animation-delay: -3s; }
  .orbit-node.n4 { animation-delay: -4.5s; }
}
@keyframes p-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes p-bob {
  0%, 100% { transform: translate(-50%, -50%) rotate(var(--a)) translateX(var(--r)) rotate(calc(-1 * var(--a))); }
  50% { transform: translate(-50%, calc(-50% - 6px)) rotate(var(--a)) translateX(var(--r)) rotate(calc(-1 * var(--a))); }
}

/* ---------- 2. Shared section bits ---------- */
.mk-page .section.cta-section { padding-top: 72px; padding-bottom: 96px; }
.mk-page .section.tight:not(.alt) + .section.cta-section { padding-top: 0; }
.mk-page .section .section-head { margin-bottom: 44px; }
.mk-page .section-sub code { white-space: nowrap; }

/* ---------- 3. Services ---------- */
.svc-card { display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.svc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.svc-card.is-soon { background: var(--surface); }
.svc-card .icon-tile.lg { width: 54px; height: 54px; }
.svc-list { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 10px; }
.svc-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; line-height: 1.7; color: var(--text); }
.svc-list li svg {
  flex: none; width: 20px; height: 20px; margin-top: 2px; padding: 4px; border-radius: 50%;
  color: var(--brand); background: var(--brand-50); stroke-width: 2.6;
}
.svc-card.is-soon .svc-list li svg { color: var(--subtle); background: var(--surface-3); }
.svc-foot {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  min-height: 58px; margin-top: auto; padding-top: 20px;
  border-top: 1px dashed var(--line-strong);
}
.svc-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; }
.svc-link svg { transition: transform .2s ease; }
.svc-link:hover { text-decoration: none; }
.svc-link:hover svg { transform: translateX(-3px); }

/* Supporting services */
.mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mini-card {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 22px 22px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.mini-card:hover { border-color: var(--brand-100); box-shadow: var(--shadow); transform: translateY(-2px); }
.mini-card .icon-tile { flex: none; }
.mini-card h3 { margin: 2px 0 6px; font-size: 16.5px; }
.mini-card p { font-size: 14.5px; line-height: 1.85; color: var(--muted); }
.section.alt .mini-card { background: var(--bg); box-shadow: none; }
.section.alt .mini-card:hover { background: var(--surface); }

/* Channel comparison table */
.compare-wrap { max-width: 1000px; margin-inline: auto; box-shadow: var(--shadow-sm); }
.compare th, .compare td { padding: 16px 18px; }
.compare thead th { font-size: 13px; }
.compare tbody th {
  text-align: start; white-space: nowrap; font-size: 15px; font-weight: 700; color: var(--heading);
  background: transparent; border-bottom: 1px solid var(--line);
}
.compare tbody tr:last-child th { border-bottom: 0; }
.compare tbody tr:hover th { background: var(--hover); }
.compare tbody tr:hover th:first-child { box-shadow: inset -3px 0 0 var(--brand); }
.compare tbody tr:hover td:first-child { box-shadow: none; }
.compare tr.is-live th, .compare tr.is-live td { background: rgba(51, 88, 255, .04); }
.cmp-ch { display: inline-flex; align-items: center; gap: 12px; }
.compare td { font-size: 14.5px; }
[data-theme="dark"] .compare tbody th { background: transparent; }
[data-theme="dark"] .compare tbody tr:hover th:first-child { box-shadow: inset -3px 0 0 var(--brand-300); }
[data-theme="dark"] .compare tr.is-live th, [data-theme="dark"] .compare tr.is-live td { background: rgba(51, 88, 255, .06); }

/* ---------- 4. Pricing ---------- */
.price-grid { align-items: stretch; }
.plan-head { display: flex; align-items: center; gap: 12px; }
.plan-head .plan-name { font-size: 16px; color: var(--heading); }
.plan.is-featured .plan-head .plan-name { color: var(--brand-600); }
[data-theme="dark"] .plan.is-featured .plan-head .plan-name { color: var(--brand-300); }
.price-grid .plan-price { margin-top: 18px; }
.plan-list li.off { color: var(--subtle); }
.plan-list li.off svg { color: var(--subtle); stroke-width: 1.9; }
[data-theme="dark"] .plan-list li.off svg { color: var(--subtle); }

.custom-plan {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px 24px;
  margin-top: 24px; padding: 26px 28px;
  background:
    radial-gradient(420px 200px at 100% 0%, rgba(51, 88, 255, .08), transparent 70%),
    var(--surface);
  border: 1px dashed var(--brand-200); border-radius: var(--radius-lg);
}
.custom-plan h3 { margin-bottom: 4px; font-size: 18px; }
.custom-plan p { font-size: 15px; line-height: 1.85; color: var(--muted); }
.custom-plan-actions { display: flex; flex-wrap: wrap; gap: 10px; }
[data-theme="dark"] .custom-plan { background: radial-gradient(420px 200px at 100% 0%, rgba(51, 88, 255, .14), transparent 70%), var(--surface); border-color: rgba(138, 162, 255, .3); }

.price-note {
  max-width: 860px; margin: 26px auto 0; text-align: center;
  font-size: 14.5px; line-height: 1.95; color: var(--muted); text-wrap: pretty;
}

/* Payment steps (bank transfer flow) */
.flow-steps {
  list-style: none; padding: 0; counter-reset: flow;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
}
.flow-step {
  position: relative; counter-increment: flow;
  padding: 24px 22px 26px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.flow-step::after {
  content: "0" counter(flow); position: absolute; top: 20px; inset-inline-end: 20px;
  font: 600 13px/1 var(--font-mono); color: var(--subtle); letter-spacing: .04em;
}
.flow-step-ic {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px;
  color: #fff; background: var(--grad);
  box-shadow: 0 8px 18px -10px rgba(4, 8, 20, .6), 0 0 0 1px rgba(69, 192, 141, .25);
}
.flow-step-ic svg { width: 22px; height: 22px; }
.flow-step h3 { margin: 18px 0 6px; font-size: 16.5px; }
.flow-step p { font-size: 14.5px; line-height: 1.85; color: var(--muted); }
[data-theme="dark"] .flow-step { background: rgba(255, 255, 255, .02); }

.promise-grid .feat-card h3 { margin-top: 18px; }

/* ---------- 5. FAQ ---------- */
.faq-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.faq-list {
  padding: 4px 30px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
details.faq + details.faq { border-top: 1px solid var(--line); }
details.faq summary {
  display: flex; align-items: center; gap: 16px;
  padding: 22px 0; cursor: pointer; list-style: none;
  font-size: 17px; font-weight: 600; line-height: 1.6; color: var(--heading);
  transition: color .15s;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary:hover { color: var(--brand-600); }
[data-theme="dark"] details.faq summary:hover { color: var(--brand-300); }
details.faq summary:focus-visible { outline-offset: 4px; border-radius: 6px; }
.faq-num {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  font: 600 13px/1 var(--font-mono); color: var(--brand);
  background: var(--brand-50); box-shadow: inset 0 0 0 1px var(--brand-100);
  transition: background .2s, color .2s;
}
[data-theme="dark"] .faq-num { color: var(--brand-300); }
details.faq[open] .faq-num { color: #fff; background: var(--grad); box-shadow: 0 6px 14px -8px rgba(4, 8, 20, .55); }
[data-theme="dark"] details.faq[open] .faq-num { box-shadow: 0 8px 18px -8px rgba(51, 88, 255, .8); }
.faq-q { flex: 1; min-width: 0; }
details.faq[open] .qa-toggle { background: var(--brand-50); border-color: var(--brand-100); }
details.faq[open] .qa-toggle::before, details.faq[open] .qa-toggle::after { background: var(--brand); }
details.faq[open] .qa-toggle::after { transform: rotate(0deg); }
[data-theme="dark"] details.faq:not([open]) .qa-toggle { background: var(--surface-3); }
[data-theme="dark"] details.faq[open] .qa-toggle::before, [data-theme="dark"] details.faq[open] .qa-toggle::after { background: var(--brand-300); }
.faq-body {
  padding: 0 52px 24px 0;
  font-size: 15.5px; line-height: 1.95; color: var(--muted);
}
.faq-body a { font-weight: 600; }
details.faq[open] summary { color: var(--heading); }
@media (prefers-reduced-motion: no-preference) {
  details.faq[open] .faq-body { animation: udy-fade .3s ease both; }
}

.faq-aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 16px; }
.aside-card {
  padding: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.aside-card h2 { margin-bottom: 12px; font-size: 16px; }
.aside-links { display: grid; gap: 4px; }
.aside-links a {
  display: flex; align-items: center; gap: 12px;
  margin-inline: -10px; padding: 9px 10px; border-radius: 12px;
  color: var(--text); transition: background .15s;
}
.aside-links a:hover { background: var(--hover); text-decoration: none; }
.aside-links a > span:last-child { display: grid; line-height: 1.5; }
.aside-links b { font-size: 14.5px; font-weight: 600; }
.aside-links small { font-size: 12.5px; color: var(--muted); }
.aside-facts { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.aside-facts li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.aside-facts svg { flex: none; width: 17px; height: 17px; color: var(--brand); }
[data-theme="dark"] .aside-facts svg { color: var(--brand-300); }

/* ---------- 6. About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: start; }
.about-story h2 { margin-bottom: 18px; }
.about-story p { font-size: 16.5px; line-height: 2; }
.about-story p + p { margin-top: 14px; }
.about-facts {
  overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.facts-head {
  display: flex; align-items: center; gap: 14px;
  padding: 22px 24px;
  background:
    radial-gradient(360px 160px at 0% 0%, rgba(51, 88, 255, .1), transparent 70%),
    var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.facts-head h2 { font-size: 17px; margin-bottom: 2px; }
.facts-head p { font-size: 13.5px; color: var(--muted); }
.fact-list { margin: 0; padding: 6px 24px 10px; }
.fact-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap;
  padding: 14px 0;
}
.fact-row + .fact-row { border-top: 1px dashed var(--line-strong); }
.fact-row dt { font-size: 14px; color: var(--muted); }
.fact-row dd { margin: 0; font-size: 15px; font-weight: 600; color: var(--heading); text-align: end; }
.fact-row dd small { font-weight: 500; color: var(--muted); }
.fact-row .mono { font-size: 15px; font-weight: 600; letter-spacing: .03em; }

.value-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.value-card {
  position: relative; overflow: hidden;
  padding: 30px 28px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.value-card:hover { transform: translateY(-3px); border-color: var(--brand-100); box-shadow: var(--shadow-lg); background: var(--surface); }
.value-num {
  position: absolute; top: 18px; inset-inline-end: 22px;
  font: 700 44px/1 var(--font-mono); letter-spacing: -.02em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent; opacity: .22;
}
.value-card h3 { margin: 20px 0 8px; font-size: 18px; }
.value-card p { font-size: 15px; line-height: 1.9; color: var(--muted); }
[data-theme="dark"] .value-card { background: rgba(255, 255, 255, .02); }
[data-theme="dark"] .value-card:hover { background: var(--surface); border-color: rgba(138, 162, 255, .26); }
[data-theme="dark"] .value-num { opacity: .35; }

/* ---------- 7. Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 32px; align-items: start; }
.contact-info { display: grid; gap: 14px; }
.contact-info-card {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 20px 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.contact-info-card:hover { border-color: var(--brand-100); box-shadow: var(--shadow-sm); }
.contact-ico { flex: none; }
.contact-info-card h3 { margin: 1px 0 4px; font-size: 16px; }
.contact-info-card p { font-size: 14.5px; line-height: 1.8; color: var(--muted); }
.contact-links {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  padding: 14px 4px 0; font-size: 14px; color: var(--muted);
}
.contact-links a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }

.contact-form-card { margin-bottom: 0; padding: 32px; box-shadow: var(--shadow); }
.contact-form-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.contact-form-head h2 { margin: 0 0 2px; font-size: 20px; }
.contact-form-head .muted { font-size: 14px; }
.contact-form-card .grid2.form-2 { gap: 0 16px; }
.contact-form-card label .opt { font-weight: 400; color: var(--subtle); }
.contact-form-card textarea { min-height: 168px; }
.contact-form-card .btn.large { margin-top: 6px; }
.form-note { margin-top: 14px; text-align: center; font-size: 13px; color: var(--muted); }
.hp-field { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- 8. Legal (terms + privacy) ---------- */
.legal-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
.legal-toc { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 12px; }
.toc-box {
  padding: 18px 18px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.toc-box summary {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; list-style: none; cursor: default;
  font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--subtle);
}
.toc-box summary::-webkit-details-marker { display: none; }
.toc-box ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; display: grid; gap: 1px; }
.toc-box li { counter-increment: toc; }
.toc-box a {
  display: flex; align-items: baseline; gap: 10px;
  padding: 7px 10px; margin-inline: -10px; border-radius: 9px;
  font-size: 14px; line-height: 1.55; color: var(--muted);
  transition: background .15s, color .15s;
}
.toc-box a::before { content: counter(toc); flex: none; min-width: 18px; font: 600 12px/1.55 var(--font-mono); color: var(--subtle); }
.toc-box a:hover { color: var(--heading); background: var(--hover); text-decoration: none; }
.toc-switch {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  background: var(--brand-50); border: 1px solid var(--brand-100);
}
.toc-switch:hover { text-decoration: none; border-color: var(--brand-200); }

.prose { padding: 40px 44px; margin-bottom: 0; }
.prose h2 {
  display: flex; align-items: baseline; gap: 10px;
  margin: 40px 0 12px; padding-top: 28px; border-top: 1px solid var(--line);
  font-size: 21px; scroll-margin-top: calc(var(--header-h) + 20px);
}
.prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.card.prose > * + h2 { margin-top: 36px; }
.h-num { font: 600 15px/1 var(--font-mono); color: var(--brand); }
[data-theme="dark"] .h-num { color: var(--brand-300); }
.prose h3 { margin: 22px 0 8px; font-size: 16.5px; color: var(--heading); }
.prose p, .prose li { font-size: 16px; line-height: 2; color: var(--text); }
.prose p + p { margin-top: 12px; }
.prose ul { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.prose ul li { position: relative; padding-inline-start: 22px; }
.prose ul li::before {
  content: ""; position: absolute; top: .85em; inset-inline-start: 4px;
  width: 7px; height: 7px; border-radius: 2px; background: var(--grad); transform: rotate(45deg);
}
.prose ul.no-list li::before { width: 10px; height: 2px; border-radius: 2px; top: 1em; transform: none; background: var(--danger); }
.prose a { font-weight: 600; text-decoration: underline; text-decoration-color: var(--brand-200); text-underline-offset: 4px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose b { color: var(--heading); }
.prose .table-wrap { margin: 12px 0 4px; box-shadow: none; }
.prose .retention table { min-width: 0; }
.prose .retention td { font-size: 15px; line-height: 1.8; }
.prose .retention td:first-child { width: 34%; font-weight: 600; color: var(--heading); }
.prose .updated {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 36px; padding: 16px 18px; border-radius: var(--radius);
  font-size: 14px; line-height: 1.8; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line);
}
.prose .updated svg { color: var(--brand); }
[data-theme="dark"] .prose .updated svg { color: var(--brand-300); }

/* ---------- 9. Error pages ---------- */
.page-error .error-page { display: grid; place-items: center; min-height: calc(100vh - var(--header-h) - 360px); padding: 32px 0 16px; }
.page-error .error-card {
  position: relative; isolation: isolate; overflow: hidden;
  width: 100%; max-width: 620px; padding: 48px 40px 36px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}
.page-error .error-card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 220px; z-index: -1;
  background:
    radial-gradient(360px 180px at 50% 0%, rgba(51, 88, 255, .12), transparent 70%),
    linear-gradient(rgba(51, 88, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(51, 88, 255, .05) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent);
  mask-image: linear-gradient(180deg, #000, transparent);
}
.page-error .error-visual { display: grid; justify-items: center; gap: 14px; margin-bottom: 8px; }
.page-error .error-code {
  display: block;
  font: 700 clamp(84px, 14vw, 128px)/1 var(--font-mono); letter-spacing: -.04em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 14px 24px rgba(51, 88, 255, .25));
}
.page-error .error-label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: var(--radius-pill);
  font: 600 12px/1.4 var(--font-mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-700); background: var(--brand-50); border: 1px solid var(--brand-100);
}
.page-error .error-label svg { color: currentColor; }
[data-theme="dark"] .page-error .error-label { color: var(--brand-300); }
.page-error .error-visual .error-ico { margin-bottom: 6px; }
.page-error .error-card h1 { margin: 12px 0 10px; font-size: clamp(24px, 3vw, 30px); }
.page-error .error-msg { font-size: 16px; color: var(--text); }
.page-error .error-hint { max-width: 460px; margin: 8px auto 0; font-size: 15px; line-height: 1.9; color: var(--muted); text-wrap: balance; }
.page-error .error-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.page-error .error-links {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 20px;
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 14px;
}
.page-error .error-links a { color: var(--muted); font-weight: 500; }
.page-error .error-links a:hover { color: var(--link); }
[data-theme="dark"] .page-error .error-card::before {
  background:
    radial-gradient(360px 180px at 50% 0%, rgba(51, 88, 255, .22), transparent 70%),
    linear-gradient(rgba(138, 162, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(138, 162, 255, .06) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
}

/* ---------- 10. Responsive ---------- */
@media (max-width: 1180px) {
  .flow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1060px) {
  .p-hero-grid, .p-hero-grid.has-orbit { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .p-orbit { display: none; }
  .p-hero-copy { max-width: 680px; }
  .p-hero-art { max-width: 560px; width: 100%; }
  .mini-grid, .value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq-layout { grid-template-columns: minmax(0, 1fr); }
  .faq-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .about-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-form-card { order: -1; }
  .contact-info { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-links { grid-column: 1 / -1; }
  .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .legal-toc { position: static; }
  .toc-box ol { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .toc-switch { justify-self: start; }
  .custom-plan { grid-template-columns: auto minmax(0, 1fr); }
  .custom-plan-actions { grid-column: 1 / -1; }
}

/* Three-card rows (about values, pricing promises) keep three columns until 860px:
   a 2 + 1 layout would leave an orphan card on tablets. */
@media (max-width: 1060px) and (min-width: 861px) {
  .value-grid, .promise-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 860px) {
  .value-grid, .promise-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-inline: auto; }
}

@media (max-width: 760px) {
  .svc-grid { max-width: 520px; margin-inline: auto; }
  .mini-grid, .value-grid, .flow-steps { grid-template-columns: minmax(0, 1fr); }
  .faq-aside, .contact-info { grid-template-columns: minmax(0, 1fr); }
  .toc-box ol { grid-template-columns: minmax(0, 1fr); }
  .toc-box summary { cursor: pointer; margin-bottom: 0; }
  .toc-box[open] summary { margin-bottom: 8px; }
  .toc-box summary::after {
    content: ""; width: 8px; height: 8px; margin: -4px 4px 0;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg); transition: transform .2s;
  }
  .toc-box[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
  .toc-box summary { padding-block: 2px; color: var(--heading); font-size: 14.5px; }

  /* Comparison table becomes stacked cards */
  .compare-wrap { overflow: visible; background: none; border: 0; box-shadow: none; }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: auto; min-width: 0; }
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .compare tbody { display: grid; gap: 14px; }
  .compare tr {
    padding: 6px 18px 10px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
  }
  .compare tr.is-live { border-color: rgba(51, 88, 255, .32); }
  .compare tbody th { padding: 14px 0 12px; border-bottom: 1px solid var(--line) !important; }
  .compare td {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 10px 0; border-bottom: 1px dashed var(--line);
    text-align: end;
  }
  .compare td::before { content: attr(data-label); flex: none; font-size: 13px; font-weight: 600; color: var(--muted); text-align: start; }
  .compare tr td:last-child { border-bottom: 0; }
  .compare tbody tr:hover th, .compare tbody tr:hover td { background: transparent; box-shadow: none !important; }
  .compare tr.is-live th, .compare tr.is-live td { background: transparent; }
  [data-theme="dark"] .compare tr.is-live { border-color: rgba(138, 162, 255, .34); background: linear-gradient(180deg, rgba(51, 88, 255, .1), var(--surface) 60%); }
}

@media (max-width: 600px) {
  .p-hero { padding-bottom: 64px; }
  .is-bleed .site-main > .p-hero:first-child { padding-top: calc(var(--header-h) + 36px); }
  .is-bleed .site-main > .p-hero.is-compact:first-child { padding-top: calc(var(--header-h) + 32px); }
  .p-hero.is-compact { padding-bottom: 52px; }
  .p-crumbs { margin-bottom: 16px; }
  .p-hero-lead { font-size: 16.5px; }
  .p-hero-actions .btn { flex: 1 1 auto; }
  .p-hero .hero-facts { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .p-hero-art img { border-radius: var(--radius-lg); }
  .mk-page .section.cta-section { padding-top: 56px; padding-bottom: 64px; }
  .mk-page .section .section-head { margin-bottom: 32px; }

  .mini-card { padding: 18px; gap: 14px; }
  .custom-plan { grid-template-columns: minmax(0, 1fr); padding: 22px 20px; }
  .custom-plan .icon-tile { display: none; }
  .custom-plan-actions .btn { flex: 1 1 auto; }

  .faq-list { padding: 2px 18px; }
  details.faq summary { gap: 12px; padding: 18px 0; font-size: 16px; }
  .faq-num { width: 30px; height: 30px; border-radius: 9px; font-size: 12px; }
  .faq-body { padding: 0 0 20px; font-size: 15px; }

  .about-story p { font-size: 16px; }
  .fact-list { padding: 4px 18px 8px; }
  .facts-head { padding: 18px; }
  .value-card { padding: 24px 20px; }

  .contact-form-card { padding: 22px 18px; }
  .contact-form-card .grid2.form-2 { grid-template-columns: minmax(0, 1fr); }
  .contact-info-card { padding: 16px 18px; }

  .prose { padding: 24px 18px; }
  .prose h2 { font-size: 19px; margin-top: 30px; padding-top: 22px; }
  .card.prose > * + h2 { margin-top: 28px; }
  .prose p, .prose li { font-size: 15.5px; }
  .prose .retention thead { display: none; }
  .prose .retention table, .prose .retention tbody, .prose .retention tr, .prose .retention td { display: block; width: auto; }
  .prose .retention tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .prose .retention tr:last-child { border-bottom: 0; }
  .prose .retention td { padding: 0; border: 0; }
  .prose .retention td:first-child { width: auto; margin-bottom: 2px; }
  .prose .retention tbody tr:hover td { background: transparent; box-shadow: none; }

  .page-error .error-card { padding: 36px 20px 28px; border-radius: var(--radius-lg); }
  .page-error .error-actions .btn { flex: 1 1 auto; }
}

@media (min-width: 761px) {
  .toc-box summary { pointer-events: none; }
}


/* ---------- الأسعار: أربع باقات + وسم خصم المخصص ---------- */
.price-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1180px) { .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.custom-flag { display: inline-flex; align-items: center; vertical-align: middle; margin-inline-start: 10px; padding: 3px 12px; border-radius: 999px; background: rgba(18, 185, 129, .16); color: #5BE0B0; font-size: 13px; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(18, 185, 129, .3); }
[data-theme="dark"] .custom-flag { background: rgba(43, 171, 133, .16); color: #7BE0BC; }

[data-theme="dark"] .flow-step-ic { box-shadow: 0 12px 26px -10px rgba(51, 88, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .28), 0 0 0 1px rgba(138, 162, 255, .35); }
