/* steps follow-up — agent «visual» (steps 10–15). Loaded after v3.css on every rea page (ReaPage::cssFiles; sorted, so after
   cards/course/data/media/mobile/sections). On the shell pages this file sits in the cascade layer `rea` with the rest of the
   rea CSS, so the rules that must beat a page's own unlayered CSS (type sizes, orange text) use !important: an important
   declaration beats every normal one whichever layer it is in. Dark theme and mobile sizes are left as they were. */

/* ======================================================================== 10 · orange TEXT on light grounds (AC-09)
   --orange (#F58220) stays for everything that is not text (dots, rules, buttons, glows) and for text on navy. Text on a
   light ground takes one of two tokens: large (>= 24px) #D96A0B = 3.23:1 on the base ground, small #B45309 = 4.64:1. The two
   light-blue grounds (see 12) are a touch darker, so inside them the tokens step down one notch to keep the same minimums:
   large #C85E08 = 3.48:1 on --sky, small #944600 = 5.19:1 even on the --stmt cards (#D5E4F8) that sit in the blue sections.
   --orange-ink (theme-v2's #A34E00, used by page CSS for small marks, list markers and step counters) takes the same #944600:
   #A34E00 is 4.46:1 on --stmt. Only the light theme defines them: every rule below is scoped to it, and dark keeps
   #F58220 on navy (6.6:1). */
html:not([data-theme="dark"]) { --orange-lg: #D96A0B; --orange-sm: #B45309; --orange-ink: #944600; }
html:not([data-theme="dark"]) :is(.on-sky, .rp-sec--sky, .rp-band, [data-ground="sky"], main > section.section:nth-child(even of section:not([hidden]))) {
  --orange-lg: #C85E08; --orange-sm: #944600;
}
/* the closing call (section.cta) keeps its blue glow, centred under its title: the title word sits on ~#E4EAF2 there,
   where #D96A0B measures 2.88:1. One notch down: #C85E08 = 3.25:1 even at the glow's darkest point. */
html:not([data-theme="dark"]) main > section.cta { --orange-lg: #C85E08; --orange-sm: #944600; }

/* large orange text: the key word in a title, the big step numbers, the footer call, the falling letters, the error page's
   big code (its last digit; errors.css, on a white card) */
html:not([data-theme="dark"]) :is(
  .sec-title em, .about__statement em, .about__statement em .w, .cta__l em, .hero__h1 em, .fcta__t em, .fcta__h em,
  .rp-h1 em, .rp-h2 em, .rp-band__t em, .fcta__ar, .fcta__rot, .fcta__rot span, .stop__n b, .fletters b:nth-child(3n),
  #journey[data-v="h"] .stop__n b, .stmt__t em, .aix__st em, .vis__title em, .rerr__digits i:last-child
) { color: var(--orange-lg) !important; -webkit-text-fill-color: currentColor !important; }

/* small orange text: section numbers, value numbers, kickers' numbers, counters, tags */
html:not([data-theme="dark"]) :is(
  .kicker span, .rp .kicker b, .val__n, .cd-unit:first-child .dg, .tk__stamp, .pcard__idx b, .rail__n, .pv__n
) { color: var(--orange-sm) !important; }

/* ======================================================================== 11 · type sizes (AC-10)
   H1 at most 72px; section titles 44–48px on a desktop screen. From 601px up only — the mobile sizes stay as they were. */
@media (min-width: 601px) {
  .hero[data-v] .hero__h1, html[lang] .hero[data-v] .hero__h1, html[lang] .rp-h1:not(.rp-h1--md), .bl-article .rp-h1 {
    font-size: clamp(44px, 5vw, 72px) !important; line-height: 1.04 !important;
  }
  html[lang="ar"] .hero[data-v] .hero__h1, html[lang="ar"] .rp-h1:not(.rp-h1--md), html[lang="ar"] .bl-article .rp-h1 { line-height: 1.3 !important; }
  .rp-h1--md { font-size: clamp(40px, 4.8vw, 66px) !important; }
  .bl-article .rp-h1, html[lang] .bl-article .rp-h1 { font-size: clamp(38px, 4.2vw, 60px) !important; }
  .sec-title, html[lang] .sec-title, .about__statement, html[lang] .about__statement, .vis__title, .rp-h2, html[lang] .rp-h2,
  body[data-page="apply"] .register .sec-title, .rauth__title.sec-title, .errpg__title.sec-title {
    font-size: clamp(40px, 3.5vw, 48px) !important; line-height: 1.1 !important;
  }
  html[lang="ar"] :is(.sec-title, .about__statement, .rp-h2) { line-height: 1.3 !important; }
  /* the closing lines are headlines of their own: same ceiling as the H1 */
  .cta__title, .stmt__t, .footer[data-v="h"] .fcta__h, .fcta__h { font-size: clamp(40px, 5vw, 72px) !important; line-height: 1.1 !important; }
  html[lang="ar"] :is(.cta__title, .stmt__t, .fcta__h) { line-height: 1.3 !important; }
}
/* sections close up under their title now that it is smaller: the head no longer pushes the content a screen away */
@media (min-width: 901px) {
  .v3 .sec-head { margin-bottom: clamp(28px, 3vw, 44px); }
}
/* phones, Latin titles: each title line is a clip mask for its rise-in (main.js titles()). At the phone size (40px on a
   0.98 line height) the .06em of room under the line cut 3px off the descenders (g, p, y — "message" lost the tail of its
   g at 375). The Arabic rule's .16em fits them; the line still starts fully hidden (it rises from 115% of its height). */
@media (max-width: 600px) {
  html:not([lang="ar"]) .sec-title .ln { padding-bottom: .16em; margin-bottom: -.16em; }
}

/* ======================================================================== 12 · two grounds, white article cards, blue course cards (AC-11)
   Ground 1 = the page's light grey; ground 2 = the light blue (--sky), on every second section. The peach (--warm) and the
   peach tile are folded into the blue; the sections' own tints and glows are removed so no third tone is left. */
html.v3, html.v3[data-theme="dark"] { --warm: var(--sky); --tile-ai: var(--tile-lang); }
html.v3[data-ground] body, html.v3[data-ground="sky"] body, html.v3[data-ground="warm"] body { background-color: var(--c-bg) !important; }
main > section.section, main > section.progs, main > section.vision, main > section.register, main > section.bootc, main > section.about,
main > section.previews, main > section.tickets { background: none; }
/* parity counts the sections that are on screen: a section main.js hides for want of data (e.g. instructors under 4) stays in
   the DOM with [hidden], and counting it would put two sections of the same ground side by side. The hero (not .section)
   is the first counted one, so the grounds read base, sky, base… from there. Browsers without `of S` drop these two rules
   and show the one base ground. */
main > section.section:nth-child(even of section:not([hidden])) { background: var(--sky); }
html.v3[data-theme="dark"] main > section.section:nth-child(even of section:not([hidden])) { --c-card: #172A63; --c-bg-2: #0F1D4C; }
/* article cards: all white (the card colour), a hairline keeps them apart from the grey ground */
#articles[data-v="h"] .art, #articles[data-v="h"] .art:nth-child(n) { background: var(--c-card); border: 1px solid var(--c-line); }
/* course cards: all light blue, the design card included */
.wk__img--none, .wk__c[data-cat="design"] .wk__img--none, .wk__c--soon[data-cat="ai"] .wk__m, .cs__media--word[data-cat="ai"] { background: var(--sky); }

/* ======================================================================== 13 · Arabic text never under 13px (AC-12)
   The cta ring («CODE \ CREATE \ CHANGE») is decoration: aria-hidden in the markup, and left small on purpose. */
html[lang="ar"] :is(
  .boot__pct, .mmenu__label, .mmenu__foot .mono, .chip, .countdown__label, .cd-unit > span, .hero__scroll, .kicker,
  .stat dt, .spk__tag, .spk__talk .mono, .bcard__k, .venue__hud, .map-riverlabel, .map-riverlabel--sm, .map-lat, .ticket__badge, .ticket__tag,
  .ticket__stub, .reg__contact .mono, .field label, .field .opt, .bpass__top, .bpass__grid .mono, .bpass__stub .mono, .footer__links h3,
  .footer__links .soon, .soon, .pcard__k, .tk__k, .tk__pm, .tk__top, .spk__badge, .pmodes li, .pvc__k, .pv__d, .pstats span, .btl__d,
  .hlive__k, .parent__k, .vis__k, .vis__vk, .rail__k, .stop__n, .apick__k, .progs__fk, .pvr__k, .fhelp__k, .bootc__fk, .cs__ck,
  .cs__free span, .cs__ai, .lab__k, .lab__prompt span, .lab__src span, .lab__tools li, .lab__tiles em, .lab__pts em, .lab__rk, .lab__mx li,
  .aix__us span, .bn__k, .bn__d, .bn__ik, .lab__src b, .lab__prompt b, .rp-toc a b, .reg__wa span, .countdown__note, .langsw
) { font-size: 13px !important; }

/* ======================================================================== 15 · footer details (AC-15)
   The e-mail is one line (v3.css let it break anywhere). The big faded logo gets its own band above the letters' landing
   strip: the falling RESEARCH letters land in the strip below it (they fall through the faint logo, they never rest on it). */
.footer [data-email] { white-space: nowrap; overflow-wrap: normal !important; }
.fgiant { padding-bottom: calc(clamp(64px, 9.5vw, 180px) * 2.2); min-height: 0; }
