/* ══════════════════════════════════════════════════════════════════════════
   RESEARCH EGYPT ACADEMY — the content pages' bodies
   (contact, terms, privacy, blog, article, course, certificate claim — every
   view that extends resources/views/site/page.blade.php).

   These pages opt into the home page's design system with
   <html class="rea-body"> (site-chrome.css stops reverting the `rea` layer
   inside the body), so the home page's tokens and primitives — paper/navy/
   blue/orange, Plus Jakarta Sans + Readex Pro, .container, .kicker, .btn
   --blue/--ghost, the course-sheet .cs__* blocks — are all live here. This
   file only adds what the home page has no class for: the page head, the
   section rhythm, the white cards, the form, the toasts, the legal reader,
   the contact grid and the certificate claim. Unlayered, so it wins over the
   rea layer where the two meet.

   Per-page additions: blog.css (index + article) and course.css.
   Motion: public/assets/rea/js/pages/pages.js (the home page's language —
   lines rising, kickers sliding in, cards fading up — CSS transitions
   toggled by IntersectionObserver; nothing moves under reduced motion).
   ══════════════════════════════════════════════════════════════════════════ */

/* ---------------------------------------------------------------- the page */
/* The rea layer gives <body> its paper, ink and type; the shell's fixed
   header keeps its height in the flow (.rea-shell--top), so the head below
   starts under it. */
.rp { overflow-x: clip; }
.rp :where(h1, h2, h3, h4) { font-family: var(--f-display); }
/* NB: every rule in this file is unlayered and so beats the rea layer
   whatever its specificity — nothing here may restyle a rea primitive
   (.btn, .kicker, .cs__*) by accident with a broad selector. */
.rp-ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
/* lms_ltr_runs(): a Latin run inside Arabic catalogue copy, kept one
   unbreakable left-to-right box so the bidi algorithm cannot split it */
.ltr-run { direction: ltr; unicode-bidi: isolate; display: inline-block; max-width: 100%; }

/* ---------------------------------------------------------------- the head
   The home hero's composition at page scale: chips/crumbs on top, a giant
   headline with its key word in orange, then the lead on one side and the
   actions on the other. */
.rp-head { padding-block: clamp(26px, 4.6vw, 72px) clamp(34px, 4.4vw, 72px); }
.rp-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: clamp(16px, 2vw, 28px); font-size: 14px; font-weight: 600; color: var(--c-muted); }
.rp-crumbs a { color: var(--c-hi-text); transition: color .25s; }
.rp-crumbs a:hover { color: var(--c-text); }
.rp-crumbs span[aria-hidden] { opacity: .5; }
.rp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(18px, 2.4vw, 34px); }
.rp-chips:not(:has(*)) { display: none; }
.rp-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 16px; border-radius: 999px; background: var(--c-card); border: 1px solid var(--c-line); font-size: 14px; font-weight: 700; color: var(--c-text); white-space: nowrap; }
.rp-chip svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--c-hi-text); }
.rp-chip b { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-weight: 800; }
.rp-chip--hot { border-color: color-mix(in srgb, var(--orange) 55%, transparent); }
.rp-chip--hot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.rp-chip--draft { background: var(--flag-soft); border-color: color-mix(in srgb, var(--orange) 45%, transparent); color: var(--orange-ink); }
a.rp-chip { transition: border-color .25s, background .25s; }
a.rp-chip:hover { border-color: var(--c-line-2); background: var(--c-hi-a); }

.rp-h1 { max-width: 15em; font-size: clamp(40px, 6.6vw, 124px); font-weight: 600; line-height: .98; letter-spacing: -.05em; text-wrap: balance; overflow-wrap: anywhere; }
html[lang="ar"] .rp-h1 { font-size: clamp(36px, 5.8vw, 108px); font-weight: 700; line-height: 1.22; letter-spacing: 0; }
.rp-h1 em, .rp-h2 em, .rp-band__t em { font-style: normal; color: var(--orange); }
.rp-h1--md { font-size: clamp(34px, 4.8vw, 88px); }
html[lang="ar"] .rp-h1--md { font-size: clamp(30px, 4.2vw, 78px); }
.rp-head__row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 22px clamp(24px, 4vw, 72px); margin-top: clamp(18px, 2.6vw, 40px); }
.rp-lead { max-width: 62ch; font-size: clamp(16px, 1.25vw, 21px); line-height: 1.75; color: var(--c-muted); }
.rp-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* ---------------------------------------------------------------- sections */
.rp-sec { padding-block: clamp(44px, 5.6vw, 104px); position: relative; }
.rp-sec--tight { padding-block: clamp(28px, 3.4vw, 60px); }
.rp-sec--sky { background: var(--sky); }
.rp-sec + .rp-sec:not(.rp-sec--sky) { padding-top: 0; }
.rp-sec--sky + .rp-sec { padding-top: clamp(44px, 5.6vw, 104px); }
.rp-sechead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 48px; margin-bottom: clamp(26px, 3.4vw, 58px); }
.rp-sechead > div { min-width: 0; }
.rp-sechead .rp-lead { max-width: 46ch; font-size: clamp(15.5px, 1.1vw, 18.5px); }
.rp .kicker { margin-bottom: clamp(12px, 1.4vw, 22px); font-size: 13.5px; }
.rp .kicker b { font-weight: inherit; }
.rp-head + .rp-sec { padding-top: 0; }
.rp-h2 { font-size: clamp(32px, 4.4vw, 82px); font-weight: 600; line-height: 1; letter-spacing: -.045em; text-wrap: balance; }
html[lang="ar"] .rp-h2 { font-size: clamp(28px, 3.8vw, 70px); font-weight: 700; line-height: 1.24; letter-spacing: 0; }
.rp-h3 { font-size: clamp(20px, 1.7vw, 30px); font-weight: 700; line-height: 1.3; letter-spacing: -.02em; }
html[lang="ar"] .rp-h3 { letter-spacing: 0; line-height: 1.45; }

/* ---------------------------------------------------------------- cards: white, rounded, a hairline, no glow */
.rp-card { position: relative; min-width: 0; padding: clamp(20px, 2.2vw, 38px); border-radius: var(--r-lg); background: var(--c-card); border: 1px solid var(--c-line); }
html[data-theme="dark"] .rp-card { background: var(--c-card); }
.rp-card--flat { border-color: transparent; }

/* the round arrow chip of the home page's course cards, on any linked card */
.rp-go { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--c-bg-2); color: var(--c-text); transition: background .35s, color .35s, transform .5s var(--ease); }
.rp-go svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .rp-go svg { transform: scaleX(-1); }
a:hover > .rp-go, a:focus-visible > .rp-go, a:hover .rp-go { background: var(--orange); color: #1B0F00; transform: rotate(-45deg); }
[dir="rtl"] a:hover > .rp-go, [dir="rtl"] a:focus-visible > .rp-go, [dir="rtl"] a:hover .rp-go { transform: rotate(45deg); }

/* icon disc */
.rp-ic { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--c-hi-a); color: var(--c-hi-text); }
.rp-ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* a link with the orange underline (the home page's .wk__more voice) */
.rp-more { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; color: var(--c-hi-text); border-bottom: 2px solid color-mix(in srgb, var(--orange) 70%, transparent); transition: color .25s, gap .3s var(--ease); }
.rp-more:hover { color: var(--c-text); gap: 14px; }
.rp-more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .rp-more svg { transform: scaleX(-1); }

/* ---------------------------------------------------------------- the statement band (the home page's .stmt, as a call-out) */
.rp-band { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px clamp(24px, 4vw, 72px); padding: clamp(28px, 4.4vw, 76px); border-radius: var(--r-lg); background: var(--stmt); color: var(--stmt-ink); overflow: hidden; }
.rp-band .kicker { color: var(--stmt-ink); opacity: .8; }
.rp-band__t { font-size: clamp(28px, 3.8vw, 70px); font-weight: 600; line-height: 1.04; letter-spacing: -.045em; color: var(--stmt-ink); text-wrap: balance; }
html[lang="ar"] .rp-band__t { font-weight: 700; line-height: 1.3; letter-spacing: 0; font-size: clamp(26px, 3.3vw, 60px); }
.rp-band__t em { color: var(--stmt-hi); }
.rp-band p:not(.kicker) { margin-top: 14px; max-width: 58ch; color: var(--stmt-ink); opacity: .82; font-size: clamp(15.5px, 1.1vw, 18.5px); line-height: 1.75; }

/* ---------------------------------------------------------------- the form (the home page's #apply field: label above, white box)
   Field names and the .field / .is-bad / .field__err / .form__err hooks are
   site.js's validator contract — styled here, never renamed. */
.rp-form.form { display: grid; gap: 16px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.rp-form .row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rp-form .field { position: relative; display: grid; gap: 8px; align-content: start; min-width: 0; }
.rp-form .field > label { font-family: var(--f-label); font-size: 13px; font-weight: 700; letter-spacing: .02em; text-transform: none; color: var(--c-text-2); }
html[lang="ar"] .rp-form .field > label { letter-spacing: 0; font-size: 14px; }
.rp-form .field > label i { font-style: normal; font-weight: 600; color: var(--c-muted); }
.rp-form .field :is(input, textarea) { width: 100%; min-height: 54px; padding: 13px 18px; border-radius: 16px; border: 1px solid var(--c-line-2); background: var(--c-field, #fff); color: var(--c-text); font: inherit; font-size: 16px; transition: border-color .25s, box-shadow .25s; }
.rp-form .field textarea { min-height: 150px; resize: vertical; line-height: 1.7; }
.rp-form .field :is(input, textarea):hover { border-color: color-mix(in srgb, var(--c-text) 30%, transparent); }
.rp-form .field :is(input, textarea):focus { outline: none; border-color: var(--c-hi); box-shadow: 0 0 0 4px var(--c-hi-a); }
.rp-form .field.is-bad :is(input, textarea), .rp-form .field.is-bad :is(input, textarea):focus { border-color: var(--c-error, #c62828); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-error, #c62828) 14%, transparent); }
.rp-form .field.is-bad > label { color: var(--c-error, #c62828); }
.rp-form :is(.field__err, .form__err) { margin: 0; font-size: 13.5px; font-weight: 600; line-height: 1.55; color: var(--c-error, #c62828); }
html[data-theme="dark"] .rp-form :is(.field__err, .form__err), html[data-theme="dark"] .rp-form .field.is-bad > label { color: #ff9b9b; }
.rp-form .field.is-shake { animation: rpShake .45s cubic-bezier(.36, .07, .19, .97) 1; }
@keyframes rpShake { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.rp-form[data-busy="1"] button[type="submit"] { opacity: .7; cursor: progress; }
.rp-form button[type="submit"] { justify-self: start; margin-top: 4px; }
/* the honeypot: off screen, never display:none (the bots it stops skip hidden inputs) */
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* the server's «sent» confirmation */
.rp-ok { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; padding: 16px 18px; border-radius: 18px; background: var(--ok-soft); color: var(--c-text); font-weight: 600; line-height: 1.7; }
.rp-ok svg { flex: none; width: 24px; height: 24px; margin-top: 2px; fill: none; stroke: var(--c-ok); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- toasts (site.js builds them; the bank lives in site/_toasts) */
.site-toasts { position: fixed; inset-block-end: 24px; inset-inline-end: 20px; z-index: 160; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 40px)); pointer-events: none; }
.site-toast { pointer-events: auto; position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: 12px; padding: 15px 17px; border-radius: 20px; background: var(--c-card); color: var(--c-text); border: 1px solid var(--c-line); border-inline-start: 4px solid var(--c-line-2); box-shadow: 0 24px 60px -30px var(--c-shadow); font-size: 15px; line-height: 1.6; animation: rpToastIn .3s var(--ease) both; }
.site-toast::after { content: ''; position: absolute; inset-block-end: 0; inset-inline-start: 0; height: 2px; width: 100%; background: currentColor; opacity: .3; transform-origin: left; animation: rpToastBar 5s linear forwards; }
[dir="rtl"] .site-toast::after { transform-origin: right; }
.site-toast:hover::after { animation-play-state: paused; }
.site-toast--ok { border-inline-start-color: var(--c-ok); color: var(--c-ok); }
.site-toast--bad { border-inline-start-color: var(--orange); color: var(--orange-ink); }
.site-toast__msg { flex: 1; color: var(--c-text); font-weight: 600; overflow-wrap: anywhere; }
.site-toast__x { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: inherit; opacity: .6; transition: opacity .2s, background .2s; }
.site-toast__x:hover { opacity: 1; background: var(--c-bg-2); }
.site-toast__x svg { width: 13px; height: 13px; }
.site-toast--out { animation: rpToastOut .24s ease forwards; }
@keyframes rpToastIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes rpToastOut { to { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes rpToastBar { to { transform: scaleX(0); } }

/* ---------------------------------------------------------------- the brand mark on these surfaces (site/mark reads --rm-*) */
.rp .rmark { --rm-a: var(--lg-a, #0d1940); --rm-b: var(--lg-c, #162b66); --rm-c: var(--lg-d, #1e3b8c); --rm-d: var(--lg-b, #084887); --rm-road: var(--lg-road, #fff); display: block; }

/* ================================================================ CONTACT */
.rp-chan { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.2vw, 20px); }
.rp-chan__c { display: flex; flex-direction: column; justify-content: space-between; gap: clamp(24px, 3vw, 54px); min-height: clamp(180px, 15vw, 250px); transition: border-color .3s, transform .5s var(--ease); }
html .rp-chan > a.rp-chan__c:hover { border-color: var(--c-line-2); transform: translateY(-3px); transition: border-color .3s, transform .5s var(--ease); }
.rp-chan__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rp-chan__k { display: block; font-size: 14px; font-weight: 700; color: var(--c-muted); margin-bottom: 6px; }
.rp-chan__v { display: block; font-family: var(--f-display); font-size: clamp(19px, 1.65vw, 30px); font-weight: 700; line-height: 1.35; color: var(--c-text); overflow-wrap: anywhere; }
.rp-chan__v[dir="ltr"] { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; letter-spacing: -.01em; }
[dir="rtl"] .rp-chan__v[dir="ltr"] { text-align: right; }
.rp-chan__c--wa { background: var(--stmt); border-color: transparent; }
.rp-chan__c--wa .rp-ic { background: var(--c-card); color: var(--c-ok); }
.rp-chan__c--wa .rp-chan__k { color: var(--stmt-ink); opacity: .8; }
.rp-chan__c--wa .rp-chan__v { color: var(--stmt-ink); }
.rp-chan__c--wa .rp-go { background: var(--c-card); }

.rp-cgrid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(14px, 1.6vw, 28px); align-items: start; }
.rp-stack { display: grid; gap: clamp(14px, 1.6vw, 28px); align-content: start; min-width: 0; }
.rp-applycard { display: grid; gap: 14px; justify-items: start; background: var(--stmt); border-color: transparent; color: var(--stmt-ink); }
.rp-applycard .kicker { margin: 0; color: var(--stmt-ink); }
.rp-applycard p:not(.kicker) { color: var(--stmt-ink); opacity: .85; line-height: 1.75; }
.rp-band__t--sm { font-size: clamp(26px, 2.6vw, 46px); }
html[lang="ar"] .rp-band__t--sm { font-size: clamp(24px, 2.3vw, 40px); }
.rp-visit { display: grid; gap: 18px; align-content: start; }
.rp-visit__row { display: flex; gap: 14px; align-items: flex-start; }
.rp-visit__row b { display: block; font-size: 15px; color: var(--c-muted); font-weight: 700; margin-bottom: 2px; }
.rp-visit__row span { display: block; font-weight: 600; line-height: 1.7; }
.rp-visit hr { border: 0; border-top: 1px solid var(--c-line); margin: 0; }
.rp-social { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-social a { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--c-bg-2); color: var(--c-text); transition: background .3s, color .3s, transform .3s var(--ease); }
.rp-social a:hover { background: var(--btn); color: #fff; transform: translateY(-2px); }
.rp-social svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ================================================================ LEGAL (terms, privacy): a contents rail + one reading card */
.rp-legal { display: grid; grid-template-columns: clamp(220px, 19vw, 320px) minmax(0, 1fr); gap: clamp(20px, 3.4vw, 64px); align-items: start; }
.rp-legal > aside { align-self: stretch; }
.rp-legal:not(:has(.rp-toc.is-ready)) { grid-template-columns: minmax(0, 1fr); }
.rp-legal:not(:has(.rp-toc.is-ready)) > aside { display: none; }
.rp-toc { position: sticky; top: calc(var(--header-h) + 28px); display: grid; gap: 4px; padding: 10px; border-radius: 26px; background: var(--c-card); border: 1px solid var(--c-line); max-height: calc(100vh - var(--header-h) - 56px); overflow-y: auto; scrollbar-width: thin; }
.rp-toc:not(.is-ready) { display: none; }
.rp-toc__t { padding: 8px 12px 6px; font-size: 13px; font-weight: 700; color: var(--c-muted); }
.rp-toc ol { display: grid; gap: 2px; }
.rp-toc a { display: flex; gap: 10px; align-items: baseline; padding: 9px 12px; border-radius: 14px; font-size: 14.5px; font-weight: 600; line-height: 1.5; color: var(--c-text-2); transition: background .25s, color .25s; }
.rp-toc a b { flex: none; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-size: 12.5px; color: var(--orange-ink); }
.rp-toc a:hover { background: var(--c-hi-a); color: var(--c-text); }
.rp-toc a[aria-current="true"] { background: var(--btn); color: #fff; }
.rp-toc a[aria-current="true"] b { color: #fff; opacity: .8; }

.rp-doc { padding: 0; overflow: hidden; }
.rp-clause { padding: clamp(22px, 2.6vw, 44px) clamp(20px, 3vw, 56px); border-top: 1px solid var(--c-line); scroll-margin-top: calc(var(--header-h) + 24px); }
.rp-clause:first-child { border-top: 0; }
.rp-clause h2, .page__cms h2 { font-size: clamp(20px, 1.8vw, 30px); font-weight: 700; line-height: 1.35; letter-spacing: -.02em; margin: 0 0 12px; scroll-margin-top: calc(var(--header-h) + 24px); }
html[lang="ar"] :is(.rp-clause h2, .page__cms h2) { letter-spacing: 0; line-height: 1.5; }
.rp-clause p, .page__cms { max-width: 76ch; font-size: clamp(16px, 1.12vw, 18.5px); line-height: 1.95; color: var(--c-text-2); }
.rp-clause p + p { margin-top: 12px; }
.rp-clause .btn { margin-top: 18px; }
/* an admin-authored body (site_page_html: escaped text, <br> per newline, <h2> per «## » line) */
.page__cms { padding: clamp(22px, 2.6vw, 44px) clamp(20px, 3vw, 56px); max-width: none; }
.page__cms h2 { margin-top: clamp(22px, 2.4vw, 38px); padding-top: clamp(18px, 2vw, 30px); border-top: 1px solid var(--c-line); }
.page__cms h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.page__cms h2 + br { display: none; }
.rp-doc__end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: clamp(20px, 2.4vw, 36px) clamp(20px, 3vw, 56px); border-top: 1px solid var(--c-line); background: var(--c-bg-2); }
.rp-doc__end p { font-weight: 600; color: var(--c-text-2); }

/* ================================================================ CERTIFICATE CLAIM */
.rp-claim { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(14px, 1.6vw, 28px); align-items: start; }
.rp-tracks { display: grid; gap: 10px; }
.rp-track { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 14px 14px clamp(18px, 2vw, 26px); border-radius: 24px; background: var(--c-card); border: 1px solid var(--c-line); font-size: clamp(16px, 1.25vw, 20px); font-weight: 700; transition: border-color .3s, transform .5s var(--ease); }
[dir="rtl"] .rp-track { padding: 14px clamp(18px, 2vw, 26px) 14px 14px; }
html .rp-tracks > a.rp-track:hover { border-color: var(--c-line-2); transform: translateY(-2px); transition: border-color .3s, transform .5s var(--ease); }
.rp-steps { display: grid; gap: 10px; counter-reset: rps; }
.rp-steps li { counter-increment: rps; display: flex; gap: 16px; align-items: flex-start; padding: 16px 18px; border-radius: 22px; background: var(--c-card); border: 1px solid var(--c-line); }
.rp-steps li::before { content: counter(rps, decimal-leading-zero); flex: none; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-weight: 800; font-size: 14px; color: var(--orange-ink); line-height: 1.9; }
.rp-steps b { display: block; font-size: 16.5px; }
.rp-steps span span { display: block; color: var(--c-muted); font-size: 14.5px; }
.rp-q { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 10px; }
.rp-q legend { padding: 0; margin-bottom: 10px; font-weight: 700; font-size: 16.5px; line-height: 1.6; color: var(--c-text); }
.rp-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-opt { position: relative; display: inline-flex; cursor: pointer; }
.rp-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rp-opt span { display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--c-line-2); background: var(--c-card); font-weight: 600; line-height: 1.4; transition: background .25s, color .25s, border-color .25s; }
.rp-opt:hover span { border-color: var(--c-hi); }
.rp-opt input:checked + span { background: var(--btn); border-color: transparent; color: #fff; }
.rp-opt input:focus-visible + span { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.rp-done { display: grid; gap: 8px; }
.rp-done__serial { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-weight: 700; color: var(--c-hi-text); letter-spacing: .04em; }
.rp-done .rp-acts { margin-top: 12px; }

/* the live certificate preview: paper, a navy frame, the orange seal */
.rp-cert { position: relative; display: grid; place-items: center; aspect-ratio: 1.414 / 1; padding: 7%; border-radius: var(--r-lg); background: #fff; color: #0d1940; text-align: center; box-shadow: 0 30px 70px -46px var(--c-shadow); border: 1px solid var(--c-line); overflow: hidden; }
.rp-cert::before { content: ''; position: absolute; inset: 4.5%; border: 1.5px solid #0d1940; border-radius: 18px; opacity: .85; }
.rp-cert::after { content: ''; position: absolute; inset: calc(4.5% + 6px); border: 1px solid rgba(13, 25, 64, .25); border-radius: 14px; }
.rp-cert > div { position: relative; z-index: 1; display: grid; justify-items: center; gap: clamp(6px, 1vw, 12px); width: 100%; }
.rp-cert .rmark { --rm-a: #0d1940; --rm-b: #162b66; --rm-c: #1e3b8c; --rm-d: #084887; --rm-road: #fff; width: min(46%, 220px); }
.rp-cert__k { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-size: clamp(9px, 1vw, 13px); font-weight: 800; letter-spacing: .22em; color: #084887; }
.rp-cert__name { font-family: var(--f-display); font-size: clamp(18px, 2.4vw, 36px); font-weight: 700; line-height: 1.3; max-width: 92%; overflow-wrap: anywhere; }
.rp-cert__line { width: 46%; height: 2px; background: #F58220; border-radius: 2px; }
.rp-cert__course { font-size: clamp(11px, 1.15vw, 15px); font-weight: 600; color: #2a3a66; }
.rp-cert__seal { position: absolute; z-index: 1; inset-block-end: 9%; inset-inline-end: 9%; width: clamp(34px, 6vw, 70px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffb26b, #F58220 55%, #c25e0b); box-shadow: 0 0 0 4px rgba(245, 130, 32, .18); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .rp-chan { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-cgrid, .rp-claim { grid-template-columns: minmax(0, 1fr); }
  .rp-legal { grid-template-columns: minmax(0, 1fr); }
  .rp-legal > aside { display: none; }
}
@media (max-width: 720px) {
  .rp-chan { grid-template-columns: minmax(0, 1fr); }
  /* a phone: each channel is one row — icon, words, arrow */
  .rp-chan__c { min-height: 0; flex-direction: row; align-items: center; gap: 14px; padding: 16px; border-radius: 24px; }
  .rp-chan__top { display: contents; }
  .rp-chan__c > span:last-child { flex: 1; min-width: 0; order: 1; }
  .rp-chan__c .rp-go { order: 2; width: 40px; height: 40px; }
  .rp-chan__c .rp-ic { width: 44px; height: 44px; border-radius: 14px; }
  .rp-chan__v { font-size: 18px; }
  .rp-chan__k { font-size: 13px; margin-bottom: 2px; }
  .rp-form .row2 { grid-template-columns: minmax(0, 1fr); }
  .rp-band { grid-template-columns: minmax(0, 1fr); }
  .rp-head__row { align-items: flex-start; }
  .rp-acts .btn { flex: 1 1 auto; }
  .site-toasts { inset-inline: 12px; width: auto; }
}

/* ================================================================ MOTION — the home page's language
   Only when scripts run and motion is welcome: <html class="rp-motion"> is
   set in the head (page.blade.php) and pages.js adds .rp-js when it takes
   over. If pages.js never arrives, the failsafe below shows everything. */
html.rp-motion [data-rp] { opacity: 0; transform: translateY(34px); }
html.rp-motion [data-rp].is-in { opacity: 1; transform: none; transition: opacity 1s var(--ease) var(--d, 0s), transform 1.1s var(--ease) var(--d, 0s); }
html.rp-motion [data-rp-lines]:not(.is-split) { opacity: 0; }
html.rp-motion .rp .kicker:not(.is-in) { opacity: 0; transform: translateX(-16px); }
html.rp-motion[dir="rtl"] .rp .kicker:not(.is-in) { transform: translateX(16px); }
html.rp-motion .rp .kicker { transition: opacity .8s cubic-bezier(.22, 1, .36, 1), transform .8s cubic-bezier(.22, 1, .36, 1); }
html.rp-motion .rp .kicker > span { display: inline-block; transform: perspective(400px) rotateX(-90deg); transition: transform .9s cubic-bezier(.34, 1.8, .64, 1) .1s; }
html.rp-motion .rp .kicker.is-in > span { transform: none; }
/* lines rise out of their own mask (main.js titles(): yPercent 115 + a small turn) */
.rp-w { display: inline-block; vertical-align: top; overflow: clip; padding-block: .14em; margin-block: -.14em; }
html[lang="ar"] .rp-w { padding-block: .22em; margin-block: -.22em; }
.rp-w > span { display: inline-block; }
html.rp-motion .is-split:not(.is-in) .rp-w > span { transform: translateY(115%) rotate(2.5deg); }
html.rp-motion[dir="rtl"] .is-split:not(.is-in) .rp-w > span { transform: translateY(115%) rotate(-2.5deg); }
html.rp-motion .is-split.is-in .rp-w > span { transform: none; transition: transform 1.15s var(--ease) calc(var(--i, 0) * 45ms); }

html.rp-motion:not(.rp-js) :is([data-rp], [data-rp-lines], .rp .kicker, .rp .kicker > span) { animation: rpFailsafe 0s 2.4s forwards; }
@keyframes rpFailsafe { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html.rp-motion [data-rp], html.rp-motion [data-rp-lines], html.rp-motion .rp .kicker, html.rp-motion .rp .kicker > span, html.rp-motion .rp-w > span { opacity: 1 !important; transform: none !important; transition: none !important; }
  .rp-go, .rp-chan__c, .rp-track, .site-toast, .site-toast--out { transition: none; animation: none; }
  .site-toast::after { display: none; }
}
/* step 21 (F-mobile): 44px tap targets on phones — here because the layered fix/mobile.css loses to this unlayered file */
@media (max-width: 900px) { .rp-crumbs a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; } }
