/* ============================================================
   help.reda.one — portal-level styles
   Extends the shared KB chassis (styles.css). Same tokens.
   ============================================================ */

/* Brand font — Poppins, loaded via styles.css @import. Portal restyle (Oct 2026, Kunal): the
   portal now follows the REDA AI / REDA Connect / REDA One websites — Poppins, light header,
   ink headings, compact buttons, flat navy footer. Product accent colours are unchanged.
   (Plus Jakarta Sans, 16 Jul 2026, matched the older KBs and is superseded.) */
body { font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif; }

/* Entrance animation — human touch, respects reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .rise-in { opacity: 0; transform: translateY(14px); animation: riseIn .55s cubic-bezier(.2,.7,.3,1) forwards; }
  .rise-in--2 { animation-delay: .08s; }
  .rise-in--3 { animation-delay: .16s; }
  .rise-in--4 { animation-delay: .24s; }
  @keyframes riseIn { to { opacity: 1; transform: none; } }
}

:root {
  /* Product accents — Family E, decided 2026-07-16: real SLDS2 System Palette tokens,
     one per product (supersedes Family D's single shared blue). Sourced directly from
     Salesforce's own documented palette (lightningdesignsystem.com System Palette),
     not approximated — verified white-text contrast ~9.7:1 each, all "-30 step" dark tones.
     See positioning/02-reda-brand-guidelines.md §2.4. */
  --accent-reda:       #024D4C; /* --slds-g-color-palette-teal-30 — REDA One */
  --accent-fin:        #014486; /* --slds-g-color-palette-blue-30 — REDA Financials AI */
  --accent-ai:         #2F2CB7; /* --slds-g-color-palette-indigo-30 — REDA AI */
  --accent-connect:    #5B388E; /* REDA Connect — approved by Kunal, 11 October 2026 */
  --accent-pay:        #7E2600; /* --sds-g-color-palette-hot-orange-30 — REDA Pay, Kunal 14 October 2026 */
  --accent-reda-bg:    #e3eeed;
  --accent-fin-bg:     #e5edf5;
  --accent-ai-bg:      #eaeaf7;
  --accent-connect-bg: #F3EEF8;
  --accent-pay-bg:     #FEF1ED;
  /* Pure brand hues — decorative use only (gradients, shapes, the logo itself), never product-accent text */
  --brand-slate:       #254860;
  --brand-steel:       #477C98;
  --brand-cyan:        #7AD1E3;
  --brand-teal:        #6FCFC1;
  --brand-green:       #52B050;
  --brand-green-light: #8ED67E;
}

/* ---------- Brand gradient bar (page top) ---------- */
/* Hidden since the website-aligned restyle: none of the websites carries a top strip, and the
   light header's hairline border does the separating. Markup stays so the chrome is unchanged. */
.brand-bar { display: none; }

/* ---------- Announcement bar (dismissible — Salesforce Help pattern) ---------- */
.announce-bar { background: var(--accent-bg); border-bottom: 1px solid var(--border-light); }
.announce-bar__inner {
  max-width: 1200px; margin: 0 auto; padding: 11px 24px;
  display: flex; align-items: center; gap: 10px;
}
.announce-bar__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.announce-bar__text { flex: 1; font-size: 13.5px; color: var(--primary); }
.announce-bar__text strong { font-weight: 700; }
.announce-bar__text a { color: var(--accent); font-weight: 600; text-decoration: none; margin-inline-start: 6px; }
.announce-bar__text a:hover { text-decoration: underline; }
.announce-bar__close {
  flex: none; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text-3);
  cursor: pointer; font-size: 15px; line-height: 1; padding: 0;
}
.announce-bar__close:hover { background: var(--bg-hover); color: var(--primary); }
@media (max-width: 560px) {
  .announce-bar__inner { padding: 10px 16px; }
  .announce-bar__text { font-size: 12.5px; }
}

/* ---------- Portal header — light, colour logo (website-aligned restyle, Oct 2026) ---------- */
/* Same treatment as the REDA AI and REDA Connect website headers: white, translucent over
   scrolled content, a hairline ink border. */
.portal-header {
  position: sticky; top: 0; z-index: 55; /* above the sticky sidebar (50), below the lang-menu dropdown (60) */
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid rgba(10, 37, 64, .08);
  backdrop-filter: saturate(160%) blur(10px);
}
.portal-header__inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 20px; height: 66px;
}
.portal-header__brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; white-space: nowrap;
  flex-shrink: 0;              /* never squeeze below content — nowrap text would overflow the nav */
}
.portal-header__logo-icon { display: block; height: 30px; width: auto; }
.portal-header__brand .brand-title {
  font-size: 16px; font-weight: 600; color: var(--primary); letter-spacing: -.01em;
  border-inline-start: 1px solid var(--border); padding-inline-start: 12px; line-height: 1.2;
}
.portal-header__nav { display: flex; align-items: center; gap: 4px; margin-inline-start: 6px; }
.portal-header__nav > a {
  color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 8px 11px; border-radius: var(--r-btn); white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.portal-header__nav > a:hover { background: var(--bg-soft); color: var(--primary); }
/* The product you're currently in — its own accent on its own wash (each product page sets
   --accent/--accent-bg inline), a step beyond :hover. */
.portal-header__nav > a.is-current { background: var(--accent-bg); color: var(--accent); font-weight: 600; }

/* ---------- Product menu — the header's product dropdown (Kunal, 18 Oct 2026) ----------
   Home (all products) first, then each app with its tagline. <details> gives click and keyboard
   toggling; portal-kb.js adds close-on-outside-click, Escape, and one-menu-at-a-time. */
.product-menu { position: relative; }
.product-menu--reda       { --t: var(--accent-reda); }
.product-menu--financials { --t: var(--accent-fin); }
.product-menu--ai         { --t: var(--accent-ai); }
.product-menu--connect    { --t: var(--accent-connect); }
.product-menu--pay        { --t: var(--accent-pay); }
.product-menu__toggle {
  list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer;
  color: var(--primary); font-size: 14px; font-weight: 600; white-space: nowrap;
  border: 1px solid var(--border); border-radius: var(--r-btn); background: var(--bg);
  padding: 8px 12px; transition: background .15s ease, border-color .15s ease;
}
.product-menu__toggle::-webkit-details-marker { display: none; }
.product-menu__toggle:hover, .product-menu[open] .product-menu__toggle { background: var(--bg-soft); border-color: var(--text-3); }
.product-menu[open] .product-menu__toggle svg { transform: rotate(180deg); }
.product-menu__toggle svg { transition: transform .15s ease; }
/* The dot carries the current product's colour; portal-level pages (home, releases) have none. */
.product-menu__dot { display: none; width: 8px; height: 8px; border-radius: 50%; background: var(--t); flex: none; }
.product-menu[class*="product-menu--"] .product-menu__dot { display: block; }
.product-menu__panel {
  position: absolute; inset-inline-start: 0; top: calc(100% + 10px); z-index: 60;
  width: 340px; max-width: calc(100vw - 32px);
  background: var(--bg); border: 1px solid var(--border-light); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 8px;
}
.product-menu__item {
  --t: var(--primary);
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 9px 10px; border-radius: 10px; text-decoration: none;
  transition: background .12s ease;
}
.product-menu__item--reda       { --t: var(--accent-reda); }
.product-menu__item--financials { --t: var(--accent-fin); }
.product-menu__item--ai         { --t: var(--accent-ai); }
.product-menu__item--connect    { --t: var(--accent-connect); }
.product-menu__item--pay        { --t: var(--accent-pay); }
.product-menu__item:hover { background: var(--bg-soft); }
.product-menu__item.is-current { background: color-mix(in srgb, var(--t) 8%, white); }
.product-menu__item:focus-visible { outline: 2px solid var(--t); outline-offset: -2px; }
/* Home is a different kind of destination from the apps below it — set it apart with a rule. */
.product-menu__item--home { margin-bottom: 9px; }
.product-menu__item--home::after {
  content: ""; position: absolute; inset-inline: 10px; bottom: -5px; height: 1px; background: var(--border-light);
}
.product-menu__icon {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 32px; height: 32px; border-radius: 8px; background: var(--t);
}
.product-menu__item--home .product-menu__icon { background: var(--bg-soft); border: 1px solid var(--border-light); }
.product-menu__icon img { width: 18px; height: auto; display: block; }
.product-menu__text { display: flex; flex-direction: column; min-width: 0; }
.product-menu__name { font-size: 14px; font-weight: 600; color: var(--primary); line-height: 1.35; }
.product-menu__item.is-current .product-menu__name { color: var(--t); }
.product-menu__desc { font-size: 12.5px; color: var(--text-3); line-height: 1.4; }
.portal-header__spacer { flex: 1; }
.portal-search-btn {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: var(--r-btn);
  background: var(--bg); color: var(--text-2);
  font-size: 13.5px; padding: 9px 16px; min-width: 190px; cursor: pointer;
  font-family: inherit; transition: background .15s ease, border-color .15s ease;
}
.portal-search-btn:hover { background: var(--bg-soft); border-color: var(--text-3); color: var(--primary); }
.portal-search-btn kbd {
  margin-inline-start: auto; font-size: 11px; color: var(--text-3);
  border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px;
  background: var(--bg-soft); font-family: inherit;
}
/* Language selector — globe pattern from reda.one */
.lang-menu { position: relative; }
.lang-menu summary {
  list-style: none; display: flex; align-items: center; gap: 7px; cursor: pointer;
  color: var(--primary); font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--border); border-radius: var(--r-btn);
  padding: 9px 14px; transition: background .15s ease, color .15s ease;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { background: var(--bg-soft); color: var(--primary); }
.lang-menu[open] summary svg:last-child { transform: rotate(180deg); }
.lang-menu__panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60;
  min-width: 220px; background: var(--bg); border: 1px solid var(--border-light);
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px;
}
.lang-menu__head {
  font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-3); padding: 8px 12px 6px;
}
.lang-menu__panel a, .lang-menu__panel .is-soon {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 14px; color: var(--text); text-decoration: none;
  padding: 9px 12px; border-radius: 9px;
}
.lang-menu__panel a:hover { background: var(--bg-soft); }
.lang-menu__panel em { font-style: normal; font-size: 11px; color: var(--text-muted); font-weight: 600; }
.lang-menu__panel .is-active { color: var(--accent); font-weight: 600; }
.lang-menu__panel .is-active em { color: var(--accent); }
.lang-menu__panel .is-soon { color: var(--text-muted); cursor: default; }

.portal-header__site-link {
  font-size: 13.5px; font-weight: 600; color: var(--primary);
  text-decoration: none; white-space: nowrap;
  border: 1.5px solid rgba(10, 40, 80, .2); border-radius: var(--r-btn);
  padding: 8px 14px; transition: background .15s ease;
}
.portal-header__site-link:hover { background: var(--bg-soft); color: var(--primary); }

/* ---------- Hero ---------- */
/* Very subtle tint of the three product colors (teal/blue/indigo) — replaces the earlier logo-spectrum wash for consistency with header/footer */
.portal-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 420px at 88% -140px, color-mix(in srgb, var(--accent-ai) 22%, transparent), transparent 60%),
    radial-gradient(900px 400px at 50% -160px, color-mix(in srgb, var(--accent-fin) 20%, transparent), transparent 58%),
    radial-gradient(800px 380px at 8% -120px, color-mix(in srgb, var(--accent-reda) 20%, transparent), transparent 55%),
    var(--bg-soft);
  border-bottom: 1px solid var(--border-light);
  padding: 76px 24px 68px; text-align: center;
}
/* dot-grid texture, echoing the logo's connected-dots language */
.portal-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(37,72,96,.10) 1.4px, transparent 1.6px);
  background-size: 26px 26px;
  mask-image: radial-gradient(700px 420px at 50% 0, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(700px 420px at 50% 0, #000 20%, transparent 75%);
}
/* the icon mark itself as a hero watermark */
.portal-hero::after {
  content: ""; position: absolute; right: -70px; bottom: -60px; width: 420px; height: 236px;
  background: url("../img/brand/reda-icon-vector.svg") no-repeat center / contain;
  opacity: .08; pointer-events: none;
}
.portal-hero > * { position: relative; z-index: 1; }
.portal-hero h1 {
  font-size: 42px; line-height: 1.15; letter-spacing: -0.02em;
  color: var(--primary); margin: 0 0 14px; font-weight: 600;
}
.portal-hero p.lede {
  font-size: 17.5px; color: var(--text-2); max-width: 640px;
  margin: 0 auto 32px; line-height: 1.6;
}
.portal-hero__search {
  max-width: 620px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--r); padding: 16px 20px;
  box-shadow: var(--shadow-md); cursor: text;
}
.portal-hero__search:focus-within, .portal-hero__search:hover { border-color: var(--accent); }
.portal-hero__search svg { flex: none; color: var(--text-3); }
.portal-hero__search input {
  flex: 1; border: 0; outline: 0; font: inherit; font-size: 16px;
  color: var(--text); background: transparent;
}
.portal-hero__search input::placeholder { color: var(--text-muted); }
.portal-hero__quick {
  margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 10px; font-size: 13.5px;
}
.portal-hero__quick span { color: var(--text-3); }
.portal-hero__quick a {
  color: var(--accent); text-decoration: none; font-weight: 600;
  background: var(--bg); border: 1px solid var(--border-light);
  padding: 6px 12px; border-radius: 999px;
}
.portal-hero__quick a:hover { border-color: var(--accent); background: var(--accent-bg); }

/* ---------- Sections ---------- */
.portal-section { max-width: 1200px; margin: 0 auto; padding: 60px 24px 8px; }
.portal-section > h2 {
  display: flex; align-items: center; gap: 12px;
  font-size: 24px; color: var(--primary); margin: 0 0 6px; letter-spacing: -0.02em;
}
.portal-section > h2::before {
  content: ""; width: 30px; height: 11px; flex: none;
  background: url("../img/brand/dots-tri.svg") no-repeat center / contain;
}
.portal-section > p.sub { color: var(--text-2); font-size: 15px; margin: 0 0 28px; padding-inline-start: 42px; }

/* ---------- Product explorer — one full block per product, stacked (Direction D) ---------- */
.stack { display: flex; flex-direction: column; gap: 22px; }
.prod {
  --t: var(--accent-reda);
  position: relative; overflow: hidden;
  padding: 36px 36px 28px;
  border: 1px solid var(--border-light); border-radius: var(--r);
  background: linear-gradient(115deg, color-mix(in srgb, var(--t) 6%, white) 0%, white 50%);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.prod--fin { --t: var(--accent-fin); }
.prod--ai  { --t: var(--accent-ai); }
.prod--connect { --t: var(--accent-connect); }
.prod--pay { --t: var(--accent-pay); }
.prod::before {
  content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 4px;
  background: var(--t);
}
.prod:hover {
  box-shadow: var(--shadow-md); transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--t) 28%, var(--border-light));
  background: linear-gradient(115deg, color-mix(in srgb, var(--t) 9%, white) 0%, white 55%);
}
.prod__head {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-bottom: 18px;
}
/* Wordmark-weight tag — the site typeface (Poppins), same 16px / 600 as the header title */
.prod__tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: inherit; font-size: 16px; font-weight: 600; letter-spacing: .01em;
  color: #fff;
  border-radius: 9px; padding-block: 9px; padding-inline: 12px 18px;
  background: var(--t);
}
/* Icon height set to Poppins 600's measured cap-height ink (11.47px at 16px/600 — verified via canvas metrics, not 1em: a font's em-box is taller than its visible glyph ink) */
.prod__tag img { height: 11.5px; width: auto; flex: none; display: block; }
.prod__count { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.prod__main { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; flex-wrap: wrap; margin-bottom: 22px; }
.prod__main h3 { margin: 0 0 8px; font-size: 21px; color: var(--primary); letter-spacing: -.01em; }
.prod__main p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--text-2); max-width: 620px; }
.prod__browse {
  flex: none; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600; color: var(--t);
  border: 1.5px solid color-mix(in srgb, var(--t) 45%, transparent);
  border-radius: var(--r-btn); padding: 10px 16px; text-decoration: none;
  transition: background .15s ease;
}
.prod__browse:hover { background: color-mix(in srgb, var(--t) 8%, transparent); }
.prod__links {
  display: flex; flex-wrap: wrap; gap: 2px;
  border-top: 1px solid var(--border-light); padding-top: 14px;
}
.prod__links-label {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted); align-self: center; margin-inline-end: 10px;
}
.prod__links a {
  color: var(--text-2); font-size: 13.5px; text-decoration: none;
  padding: 8px 13px; border-radius: 8px;
}
.prod__links a:hover { color: var(--t); background: color-mix(in srgb, var(--t) 10%, white); }
@media (max-width: 760px) {
  .prod { padding: 28px 22px 22px; }
  .prod__main { flex-direction: column; gap: 12px; }
  .prod__links-label { width: 100%; margin: 0 0 4px; }
}

/* ---------- Releases strip ---------- */
.release-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.release-card {
  --t: var(--accent-reda);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg); border: 1px solid var(--border-light);
  border-radius: var(--r); padding-block: 20px; padding-inline: 26px 22px; text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s ease, transform .15s ease;
}
.release-card--fin { --t: var(--accent-fin); }
.release-card--ai  { --t: var(--accent-ai); }
.release-card--connect { --t: var(--accent-connect); }
.release-card--pay { --t: var(--accent-pay); }
.release-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--t);
}
.release-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.release-card__top { display: flex; align-items: center; gap: 10px; }
.release-card__product {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; font-size: 13px; font-weight: 600; letter-spacing: .01em;
  padding-block: 6px; padding-inline: 9px 13px; border-radius: 8px;
  color: #fff; background: var(--t);
}
/* Same measured-ink approach at 13px/600 (9.32px ink — verified via canvas metrics) */
.release-card__product img { height: 9.3px; width: auto; flex: none; display: block; }
.release-card__version { font-weight: 700; color: var(--primary); font-size: 15px; }
.release-card__date { margin-inline-start: auto; color: var(--text-3); font-size: 12.5px; }
.release-card p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.portal-section__more { margin-top: 20px; font-size: 14px; }
.portal-section__more a { color: var(--accent); font-weight: 600; text-decoration: none; }
.portal-section__more a:hover { text-decoration: underline; }

/* ---------- Releases timeline (/releases/, generated by build/generate-releases.mjs) ---------- */
.rel-page { max-width: 820px; margin: 0 auto; padding: 8px 24px 72px; }
.rel-page__title { font-size: 34px; color: var(--primary); margin: 24px 0 8px; }
.rel-page__intro { color: var(--text-2); font-size: 16px; line-height: 1.6; margin: 0 0 24px; }
.rel-empty { color: var(--text-3); font-size: 15px; }
/* Product tabs: the way into (and between) the per-product timelines at /releases/<product>/.
   Logical properties throughout so the row mirrors correctly under dir="rtl" (Arabic). */
.rel-tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 36px; padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
}
.rel-tab {
  --t: var(--primary);
  display: inline-flex; align-items: center;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--border-light);
  font-size: 13.5px; font-weight: 600; line-height: 1.2;
  color: var(--text-2); text-decoration: none; background: var(--bg);
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.rel-tab--reda       { --t: var(--accent-reda); }
.rel-tab--financials { --t: var(--accent-fin); }
.rel-tab--ai         { --t: var(--accent-ai); }
.rel-tab--connect    { --t: var(--accent-connect); }
.rel-tab--pay        { --t: var(--accent-pay); }
.rel-tab:hover { color: var(--t); border-color: var(--t); }
.rel-tab.is-active { background: var(--t); border-color: var(--t); color: #fff; }
/* Full release-note page (/releases/<product>/<version>). Reuses the timeline's pill + version +
   date row above the title, so a note is visibly the same object as its timeline entry. */
.rel-notes .kb-article { max-width: none; }
.rel-notes .kb-article [id] { scroll-margin-top: calc(var(--header-h) + 16px); }
.rel-notes__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.rel-notes__head + h1 { margin-top: 12px; }
@media (max-width: 640px) {
  .rel-notes__head .rel-entry__date { margin-inline-start: 0; width: 100%; }
  .rel-notes .kb-article [id] { scroll-margin-top: calc(var(--header-h) + 64px); }
}
.rel-timeline { list-style: none; margin: 0; padding: 0; }
.rel-entry {
  position: relative; padding-block: 0 36px;
  padding-inline: 30px 0;
  border-inline-start: 2px solid var(--border-light);
}
.rel-entry:last-child { border-inline-start-color: transparent; padding-bottom: 0; }
/* The node on the timeline, in the product's colour. */
.rel-entry::before {
  content: ""; position: absolute; inset-inline-start: -8px; top: 3px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--t); box-shadow: 0 0 0 4px var(--bg);
}
.rel-entry--reda        { --t: var(--accent-reda); }
.rel-entry--financials  { --t: var(--accent-fin); }
.rel-entry--ai          { --t: var(--accent-ai); }
.rel-entry--connect     { --t: var(--accent-connect); }
.rel-entry--pay         { --t: var(--accent-pay); }
.rel-entry__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.rel-entry__pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; letter-spacing: .01em;
  padding-block: 6px; padding-inline: 9px 13px; border-radius: 8px; color: #fff; background: var(--t);
}
.rel-entry__pill img { height: 9.3px; width: auto; flex: none; display: block; }
.rel-entry__version { font-weight: 700; color: var(--primary); font-size: 16px; }
.rel-entry__date { margin-inline-start: auto; color: var(--text-3); font-size: 13px; }
.rel-entry__summary { color: var(--text-2); font-size: 15px; line-height: 1.6; margin: 0 0 14px; }
.rel-changes { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 9px; }
.rel-change { display: flex; gap: 10px; align-items: baseline; font-size: 14.5px; line-height: 1.5; color: var(--text); }
/* Semantic, product-neutral: new / improved / fixed read the same across every app. */
.rel-change__type {
  flex: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 8px; border-radius: 5px; position: relative; top: 1px;
}
.rel-change__type--new      { background: #e8f5ed; color: #1a5c2e; }
.rel-change__type--improved { background: var(--accent-bg); color: var(--primary); }
.rel-change__type--fixed    { background: #fff8e1; color: #7c4a00; }
.rel-change__body a { font-weight: 600; color: var(--accent); text-decoration: none; }
.rel-change__body a:hover { text-decoration: underline; }
.rel-entry__notes { display: inline-block; font-weight: 600; font-size: 14px; color: var(--accent); text-decoration: none; }
.rel-entry__notes:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .rel-entry__date { margin-inline-start: 0; width: 100%; }
  .rel-page__title { font-size: 28px; }
}

/* ---------- Support CTA ---------- */
.portal-support {
  max-width: 1200px; margin: 64px auto 0; padding: 0 24px;
}
.portal-support__card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: linear-gradient(100deg, rgba(37,72,96,.05), rgba(111,207,193,.09) 55%, rgba(82,176,80,.08));
  border: 1px solid var(--border-light); border-radius: var(--r);
  padding: 32px 36px;
}
.portal-support__card::after {
  content: ""; position: absolute; right: -30px; top: -40px; width: 220px; height: 124px;
  background: url("../img/brand/reda-icon-vector.svg") no-repeat center / contain;
  opacity: .07; pointer-events: none;
}
.portal-support__card > * { position: relative; z-index: 1; }
.portal-support__card h2 { margin: 0 0 6px; font-size: 21px; color: var(--primary); }
.portal-support__card p { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.6; max-width: 560px; }
.portal-support__btn {
  flex: none; display: inline-block; text-decoration: none;
  background: var(--primary); color: #fff; font-weight: 600; font-size: 14.5px;
  padding: 13px 24px; border-radius: var(--r-btn);
}
.portal-support__btn:hover { background: var(--primary-hover); }
@media (max-width: 700px) {
  .portal-support__card { flex-direction: column; align-items: flex-start; }
}

/* Long article titles must remain readable in every language on narrow screens. */
.kb-article h1 { overflow-wrap: anywhere; hyphens: auto; }

/* ---------- Footer ---------- */
/* Flat ink navy, as on the REDA AI website footer (#0A2540, links #C3D3E4, tracked labels). */
.portal-footer {
  position: relative; overflow: hidden;
  margin-top: 72px; color: #C3D3E4;
  background: var(--primary);
}
.portal-footer__inner {
  max-width: 1200px; margin: 0 auto; padding: 56px 24px 44px;
  display: grid; grid-template-columns: 1.7fr repeat(4, 1fr); gap: 34px;
}
.portal-footer h4 { color: #F7F9FC; font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 16px; }
.portal-footer ul { list-style: none; margin: 0; padding: 0; }
.portal-footer li { margin-bottom: 10px; }
.portal-footer a { color: #C3D3E4; text-decoration: none; font-size: 14px; transition: color .12s ease; }
.portal-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.portal-footer__logo-full { display: block; height: 26px; width: auto; }
.portal-footer__brand p { font-size: 13.5px; line-height: 1.7; color: #9fb8cf; max-width: 300px; margin: 16px 0 0; }
.portal-footer__social { display: flex; gap: 10px; margin-top: 20px; }
.portal-footer__social a {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.12);
  color: #cddcec; transition: background .15s ease, color .15s ease, transform .15s ease;
}
.portal-footer__social a:hover { background: #fff; color: var(--primary); transform: translateY(-2px); }
.portal-footer__social svg { width: 17px; height: 17px; }
.portal-footer__certs { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.portal-footer__certs span {
  font-size: 11px; font-weight: 600; letter-spacing: .03em; color: #a9c3da;
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05);
  padding: 4px 11px; border-radius: 999px;
}
.portal-footer__contact li { font-size: 13px; color: #9fb8cf; line-height: 1.55; margin-bottom: 13px; }
.portal-footer__contact li span {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: #7f9cb8; margin-bottom: 2px;
}
.portal-footer__legal { display: flex; gap: 18px; flex-wrap: wrap; }
.portal-footer__legal a { font-size: 12.5px; color: #9fb8cf; }
.portal-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.12);
}
.portal-footer__bottom-inner {
  max-width: 1200px; margin: 0 auto; padding: 18px 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 12.5px; color: #9fb8cf;
}

/* ---------- Hub pages (product landing + category index) ----------
   Hub pages reuse the existing KB home-page chassis from styles.css
   (.hero / .home-section / .card-grid / .use-card) so they match the
   REDA & REDA Financials KBs exactly. Only the breadcrumb bar is added
   here, since .main-content itself carries no padding. */
.hub-crumb { padding: 22px 48px 0; }
@media (max-width: 560px) { .hub-crumb { padding: 18px 20px 0; } }

/* ---------- Search modal (Pagefind, modular tier) ---------- */
/* One overlay shared by every entry point. Pagefind's modular UI owns the engine,
   debounce and lazy result loading; the markup below is entirely ours, so the modal
   speaks the same design language as the rest of the portal (no pagefind-ui__*
   overrides, and no Pagefind stylesheet is loaded at all). */
.search-modal { position: fixed; inset: 0; z-index: 200; display: none; }
.search-modal.is-open { display: block; }
.search-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(9, 44, 74, .45);
  backdrop-filter: saturate(140%) blur(3px);
}
.search-modal__panel {
  position: relative; z-index: 1;
  max-width: 680px; margin: 10vh auto 0;
  background: var(--bg); border: 1px solid var(--border-light);
  border-radius: var(--r); box-shadow: var(--shadow-lg);
  padding: 14px 14px 10px;
  max-height: 74vh; display: flex; flex-direction: column;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Search field — our markup; Pagefind's Input binds to it via inputElement */
.s-field {
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px; background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: var(--r-sm);
}
.s-field:focus-within { border-color: var(--accent); background: var(--bg); }
.s-field__icon { width: 18px; height: 18px; color: var(--text-muted); flex: none; }
.s-field__input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font-family: inherit; font-size: 15.5px; color: var(--text);
  padding: 13px 0;
}
.s-field__input::placeholder { color: var(--text-muted); }
.s-field__close {
  flex: none; cursor: pointer; font-family: inherit; font-size: 11px;
  color: var(--text-3); background: var(--bg); border: 1px solid var(--border);
  border-radius: 5px; padding: 2px 7px;
}
.s-field__close:hover { color: var(--text); border-color: var(--text-muted); }

/* Scope pills — product identity, matching the portal's pill language */
.s-scope { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 2px 2px; }
.s-scope__pill {
  cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--text-2); background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 11px; transition: all .12s ease;
}
.s-scope__pill:hover { border-color: var(--text-muted); color: var(--text); }
.s-scope__pill.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.s-scope__pill--reda.is-active { background: var(--accent-reda); border-color: var(--accent-reda); }
.s-scope__pill--fin.is-active  { background: var(--accent-fin);  border-color: var(--accent-fin);  }
.s-scope__pill--ai.is-active   { background: var(--accent-ai);   border-color: var(--accent-ai);   }
.s-scope__pill--connect.is-active { background: var(--accent-connect); border-color: var(--accent-connect); }
.s-scope__pill--pay.is-active { background: var(--accent-pay); border-color: var(--accent-pay); }

.s-summary {
  padding: 12px 2px 8px; margin: 0;
  font-size: 12.5px; color: var(--text-3); font-weight: 600;
  border-bottom: 1px solid var(--border-light);
}

/* Results — this element is the IntersectionObserver root Pagefind's ResultList
   walks up to find (first non-visible overflow-y ancestor), which is what drives
   lazy loading of each result's data. Keep overflow-y: auto here. */
.s-results { overflow-y: auto; flex: 1; margin: 0 -6px; padding: 6px; }
.s-results__list { list-style: none; margin: 0; padding: 0; }

.s-res { border-radius: var(--r-sm); }
.s-res + .s-res { margin-top: 2px; }
.s-res__link { display: block; padding: 11px 10px; border-radius: var(--r-sm); text-decoration: none; }
.s-res__link:hover { background: var(--bg-soft); }
.s-res__head { display: flex; align-items: baseline; gap: 8px; }
.s-res__title { font-size: 15px; font-weight: 600; color: var(--primary); flex: 1; }
.s-res__pill {
  flex: none; font-size: 10.5px; font-weight: 600; color: #fff;
  border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}
.s-res__pill--reda { background: var(--accent-reda); }
.s-res__pill--fin  { background: var(--accent-fin);  }
.s-res__pill--ai   { background: var(--accent-ai);   }
.s-res__pill--connect { background: var(--accent-connect); }
.s-res__pill--pay { background: var(--accent-pay); }
.s-res__cat { display: block; margin-top: 3px; font-size: 11.5px; color: var(--text-muted); font-weight: 600; }
.s-res__excerpt { margin: 5px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--text-2); }
/* The API-integration articles contain long unbreakable tokens (REST paths such as
   /services/data/vXX.0/sobjects/...). Left to wrap normally they blow out the panel
   and add a horizontal scrollbar, so break them anywhere rather than overflow. */
.s-res__title, .s-res__excerpt, .s-res__sub-title, .s-res__sub-excerpt { overflow-wrap: anywhere; }
.s-res__excerpt mark, .s-res__sub-excerpt mark {
  background: var(--accent-bg); color: var(--primary); font-weight: 600;
  border-radius: 3px; padding: 0 2px;
}

/* Sub-results: jump straight to the matching section of a long article */
.s-res__subs { list-style: none; margin: 0 0 4px; padding: 0; padding-inline-start: 10px; }
.s-res__subs li { border-inline-start: 2px solid var(--border-light); }
.s-res__subs a { display: block; padding: 6px 10px; text-decoration: none; }
.s-res__subs a:hover { background: var(--bg-soft); border-inline-start-color: var(--accent); }
.s-res__sub-title { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); }
.s-res__sub-excerpt { display: block; font-size: 12.5px; line-height: 1.5; color: var(--text-3); margin-top: 1px; }

/* Loading skeletons (Pagefind renders these until each result's data resolves) */
.s-res--loading { padding: 11px 10px; }
.s-res__skel { display: block; background: var(--bg-hover); border-radius: 4px; animation: s-pulse 1.2s ease-in-out infinite; }
.s-res__skel--title { width: 46%; height: 13px; }
.s-res__skel--line { width: 82%; height: 10px; margin-top: 8px; }
@keyframes s-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .s-res__skel { animation: none; } }
.search-modal__hint {
  padding-top: 10px; margin-top: 4px;
  border-top: 1px solid var(--border-light);
  font-size: 12px; color: var(--text-muted);
}
.search-modal__hint kbd {
  border: 1px solid var(--border); border-radius: 5px;
  padding: 1px 6px; font-family: inherit; font-size: 11px; background: var(--bg-soft);
}
.search-modal__error { font-size: 14px; color: var(--text-2); line-height: 1.6; margin: 8px 0; }

@media (max-width: 560px) {
  .search-modal__panel { margin: 0; max-width: none; height: 100%; max-height: 100%; border-radius: 0; }
  .search-modal__hint { display: none; }   /* no physical Esc key — the ✕ button serves */
  .s-scope { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .s-scope::-webkit-scrollbar { display: none; }
  .s-scope__pill { white-space: nowrap; }
}

/* ---------- Responsive (mobile is a MUST) ---------- */
/* Four products + Releases no longer fit the inline header between 1000-1200px.
   Drop the decorative reda.one link and tighten the search pill before the nav wraps. */
@media (max-width: 1200px) {
  .portal-header__site-link { display: none; }
  .portal-search-btn { min-width: 0; }
  .portal-search-btn span { white-space: nowrap; }   /* never wrap the label to two lines */
  .portal-search-btn kbd { display: none; }          /* the ⌘K hint is the first thing to go */
}
/* Poppins sets wider than the previous typeface: measured one-line header widths (reda.one link
   hidden) are en 968px, pt 1014px, es 1024px, fr 1028px — so 1001-1030px overflowed in the
   translated trees. Tightening nav padding and gaps here saves ~54px, enough for every language. */
@media (max-width: 1100px) {
  .portal-header__inner { gap: 14px; }
  .portal-header__nav > a { padding-inline: 8px; }
}
@media (max-width: 1000px) {
  .portal-header__inner { flex-wrap: wrap; height: auto; padding: 10px 16px; row-gap: 2px; }
  /* Second row: the product menu and Releases. It no longer scrolls sideways — and must not:
     overflow other than visible would clip the open product panel. */
  .portal-header__nav {
    order: 10; width: 100%; margin: 4px 0 0; padding: 0 0 8px;
    display: flex; flex-wrap: nowrap; gap: 6px;
  }
  .portal-header__nav > a { white-space: nowrap; font-size: 13.5px; padding: 7px 11px; }
  .product-menu__toggle { font-size: 13.5px; padding: 7px 11px; }
  .portal-header__logo-icon { height: 24px; }
  /* The panel stays right-anchored (base rule): the language button sits at the right edge at
     every width, so a left-anchored 220px panel ran ~130px off a 375px screen and zoomed the page. */
  .portal-hero h1 { font-size: 31px; }
  .portal-hero p.lede { font-size: 15.5px; }
  .portal-footer__inner { grid-template-columns: 1fr 1fr; }
  .portal-hero::after { width: 300px; height: 168px; right: -60px; bottom: -50px; }
}
@media (max-width: 560px) {
  .portal-search-btn { min-width: 0; padding: 8px 10px; }
  .portal-search-btn span { display: none; }
  .portal-search-btn kbd { display: none; }
  .portal-header__site-link { display: none; }
  .portal-hero { padding: 44px 18px 40px; }
  .portal-hero__search { padding: 13px 16px; }
  .portal-hero__quick { gap: 8px; }
  .portal-section { padding: 44px 18px 8px; }
  .portal-section > p.sub { padding-inline-start: 0; }
  .portal-support { padding: 0 18px; margin-top: 48px; }
  .portal-support__card { padding: 26px 24px; }
  .portal-footer__inner { grid-template-columns: 1fr; gap: 26px; }
  .portal-footer__logo-full { height: 20px; }
}

/* Sidebar link to an article that exists only in English.
   The translated trees roll out article-by-article; until a page is translated its nav entry
   points at the English original (build/fix-lang-link-targets.mjs) rather than 404ing or being
   hidden. This badge is the "not yet available in this language" notice that choice owes the
   reader — it must be visible BEFORE the click, not a surprise after it. The script removes the
   badge automatically when the translation lands. */
.nav-en {
  font-size: 9px; font-weight: 700; line-height: 1; vertical-align: super;
  margin-left: 4px; padding: 1px 3px; border-radius: 3px;
  background: var(--border-light); color: var(--text-muted);
  letter-spacing: .02em;
}

/* ── Mobile sidebar drawer + product-strip overflow (audit A-02 / A-12, 2026-08-28) ────────
   The opener and the backdrop are injected at runtime by portal-kb.js, so no page markup
   carries them — see the comment there for why. Desktop is unaffected: the button is
   display:none above 900px and the strip does not overflow. */

.sidebar-toggle {
  display: none;                       /* ← shown at ≤900px, in this same file (see below) */
  align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: 0 0 auto;
  margin-inline-end: 4px; margin-inline-start: -6px;
  background: none; border: 0; border-radius: var(--r-btn);
  color: var(--primary); cursor: pointer;
}
.sidebar-toggle:hover { background: var(--bg-soft); }
.sidebar-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sidebar-toggle[aria-expanded="true"] { background: var(--bg-hover); }

.sidebar-backdrop {
  position: fixed; inset: 0; z-index: 99;
  background: rgba(2, 16, 43, .5);
}
.sidebar-backdrop[hidden] { display: none; }
/* Lock the page behind the drawer so a touch-scroll moves the nav, not the article. */
body.has-drawer-open { overflow: hidden; }

@media (max-width: 900px) {
  /* Same breakpoint the sidebar drawer uses in styles.css. This override MUST live here rather
     than beside that rule: portal.css is the second stylesheet on every page, so an
     equal-specificity `.sidebar-toggle` rule in styles.css loses to the base rule above and the
     button stays invisible — which is exactly what happened on the first attempt. */
  .sidebar-toggle { display: inline-flex; }

  /* Adding a 38px button to a wrapping flex row costs a slot, and the `flex: 1` spacer was
     claiming one of its own (105px of nothing), which pushed the language menu onto a third
     row and grew the header from 112px to 152px. The spacer only exists to shove the right-hand
     controls over on desktop; at this width `margin-inline-start: auto` does the same job for
     free and keeps toggle + brand + language on one row. */
  .portal-header__spacer { display: none; }
  .lang-menu { margin-inline-start: auto; }
}

@media (max-width: 420px) {
  /* In Poppins the longest title ("Centro de ayuda", 147px) made toggle + brand + language
     397px wide, pushing the language button onto a third row at 375px. A 14px title and
     tighter gaps bring it to ~356px. */
  .portal-header__inner { column-gap: 12px; }
  .portal-header__brand { gap: 9px; }
  .portal-header__brand .brand-title { font-size: 14px; padding-inline-start: 9px; }
}

@media (max-width: 360px) {
  /* Measured, not guessed: toggle 38 + brand 162 + language 88 + two 20px gaps + 32px padding
     = 360, so the wordmark survives on a 375px phone and only drops below that. It is the
     redundant element when something has to go — the logo beside it already links home. */
  .portal-header__brand .brand-title { display: none; }
}

@media (min-width: 901px) {
  /* Belt and braces: if a drawer is somehow left open when the viewport grows, never let the
     backdrop cover a desktop layout. */
  .sidebar-backdrop { display: none; }
}
