/* ==========================================================================
   Redesign foundation (AB#16536): home page first (AB#16623)

   The marketing site in the Clover app's own visual language: the tokens,
   type, buttons, chips, tabs and tables of ../clover-website (via the
   @clover/figma-tokens values mirrored in clover-design-system).

   Everything is scoped to body.rd, so only pages that opt in (the home page
   for now) pick it up. The rest of the site keeps design-system.css +
   site-layout.css until each template is rolled out (AB#16630).
   ========================================================================== */

/* ── Brand display face ──
   Rebond-Grotesque.otf is the Book weight (usWeightClass 400); the app asks
   it for 700 and gets a synthesized bold. Declare the real weights instead. */
@font-face {
  font-family: 'Rebond Grotesque';
  src: url('/static/clover-ds/fonts/RebondGrotesque-Book.woff2') format('woff2'),
       url('/static/clover-ds/fonts/Rebond-Grotesque.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Rebond Grotesque';
  src: url('/static/clover-ds/fonts/RebondGrotesque-Semibold.woff2') format('woff2'),
       url('/static/clover-ds/fonts/ESRebondGrotesque-Semibold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ── */
body.rd {
  /* Ink (core-color-fg-*) */
  --rd-ink-900: #171e25;        /* display headings (app page-heading) */
  --rd-ink-800: #25292e;        /* fg-strong */
  --rd-ink-600: #4b545d;        /* fg-medium */
  --rd-ink-500: #5f6872;        /* meta text, 5.6:1 on white */
  --rd-ink-400: #9099a3;        /* fg-weak: icons and rules only, never text */

  /* Surfaces (core-color-bg-surface-*) */
  --rd-surface: #ffffff;
  --rd-surface-1: #fafbfc;
  --rd-surface-2: #edf1f5;
  --rd-slate: #28323c;          /* surface-3: the app's nav rail */
  --rd-slate-hover: #37404a;
  --rd-slate-active: #274760;
  --rd-slate-line: #3e4751;

  /* Lines */
  --rd-line: #dde1e4;           /* border-on-surface */
  --rd-line-soft: #e8eaeb;      /* table borders */
  --rd-line-form: #bfc7d0;      /* border-forms, secondary buttons */

  /* Blue: #0088CC is the brand (graphics, icons, focus). Text and filled
     buttons use the app's hover/selected blues so white labels pass AA. */
  --rd-blue: #0088cc;
  --rd-blue-ink: #1377b1;       /* comp-button primary hover, 4.9:1 */
  --rd-blue-press: #04689a;     /* core-color-selected-primary */
  --rd-blue-deep: #035a85;
  --rd-blue-tint: #e7f3fa;
  --rd-focus: rgba(5, 136, 204, 0.32);

  /* Status (core-color-success/danger + app warning) */
  --rd-green: #08a262;
  --rd-green-ink: #06764a;
  --rd-green-tint: #e3f7ee;
  --rd-red: #ab2345;
  --rd-red-tint: #fbe8ec;
  --rd-orange: #f2994a;
  --rd-orange-ink: #9a520f;
  --rd-orange-tint: #fdf1e6;

  /* Type */
  --rd-font-display: 'Rebond Grotesque', 'Inter', system-ui, sans-serif;
  --rd-font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Radii (cds-radius-*) */
  --rd-r-sm: 4px;
  --rd-r: 6px;
  --rd-r-lg: 8px;
  --rd-r-xl: 12px;
  --rd-r-2xl: 16px;

  /* Depth (app button, menu and frame shadows) */
  --rd-shadow-btn: 0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 0 1px rgba(0, 0, 0, 0.48);
  --rd-shadow-btn-2: 0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.12);
  --rd-shadow-menu: 0 8px 18px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.1), 0 8px 24px rgba(0, 0, 0, 0.04);
  --rd-shadow-frame: 0 1px 2px rgba(23, 30, 37, 0.06), 0 18px 44px -14px rgba(23, 30, 37, 0.2);
  --rd-shadow-card: 0 1px 2px rgba(23, 30, 37, 0.05), 0 6px 18px -8px rgba(23, 30, 37, 0.14);

  /* Layout */
  --rd-container: 1200px;
  --rd-gutter: clamp(20px, 4vw, 40px);
  --rd-section: clamp(72px, 8vw, 112px);
  --nav-height: 68px;

  --rd-ease: cubic-bezier(0.22, 1, 0.36, 1);

  font-family: var(--rd-font);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.011em;
  color: var(--rd-ink-800);
  background: var(--rd-surface);
  caret-color: var(--rd-blue);
  font-feature-settings: "cv11" 1;
}

/* ── Browser surfaces ── */
html:has(body.rd) {
  scrollbar-color: #c3cad1 var(--rd-surface, #fff);
  scroll-padding-top: 84px;
}
body.rd ::selection { background: rgba(0, 136, 204, 0.18); color: inherit; }
body.rd :focus-visible {
  outline: 2px solid var(--rd-blue);
  outline-offset: 2px;
}
body.rd a { color: inherit; }
body.rd h1, body.rd h2, body.rd h3, body.rd h4 {
  font-family: var(--rd-font);
  color: var(--rd-ink-800);
}
body.rd .skip-link {
  top: auto;
  bottom: 100%;
  background: var(--rd-slate);
  font-size: 14px;
  font-weight: 600;
  border-radius: 0 0 var(--rd-r) 0;
}
body.rd .skip-link:focus { top: 0; bottom: auto; z-index: 1000; }

/* ── Layout ── */
.rd-wrap {
  width: 100%;
  max-width: calc(var(--rd-container) + 2 * var(--rd-gutter));
  margin-inline: auto;
  padding-inline: var(--rd-gutter);
}
.rd-section { padding-block: var(--rd-section); }
.rd-band { background: var(--rd-surface-1); border-block: 1px solid var(--rd-line-soft); }
.rd-clip { overflow-x: clip; }

/* Section heading block: heading, then a lead. No kicker labels. */
.rd-head { display: flex; flex-direction: column; gap: 16px; max-width: 720px; margin-bottom: clamp(36px, 4.5vw, 56px); }
.rd-head--center { margin-inline: auto; text-align: center; align-items: center; }
.rd-head--row {
  max-width: none;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}
.rd-head--row > div { display: flex; flex-direction: column; gap: 16px; max-width: 680px; }

/* ── Type ── */
.rd-h1 {
  font-family: var(--rd-font-display);
  font-weight: 600;
  font-size: clamp(2.25rem, 1.2rem + 2.5vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--rd-ink-900);
}
.rd-h1 .rd-l { display: block; }
.rd-h2 {
  font-family: var(--rd-font-display);
  font-weight: 600;
  font-size: clamp(1.875rem, 1.25rem + 2vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.028em;
  color: var(--rd-ink-900);
  text-wrap: balance;
}
.rd-h3 {
  font-family: var(--rd-font);
  font-weight: 600;
  font-size: clamp(1.1875rem, 1.1rem + 0.35vw, 1.375rem);
  line-height: 1.3;
  letter-spacing: -0.022em;
  color: var(--rd-ink-800);
  text-wrap: balance;
}
.rd-lead {
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  line-height: 1.55;
  color: var(--rd-ink-600);
  max-width: 62ch;
  text-wrap: pretty;
}
.rd-text { font-size: 16px; line-height: 1.6; color: var(--rd-ink-600); text-wrap: pretty; }

/* Kinetic headline word: a fixed slot sized by its longest word (data-sizer),
   so nothing reflows while the words cycle. Each word is drawn from its
   data-word, so none of them is in the heading's text; a visually hidden
   word gives the h1 one plain sentence. */
.rd-kinetic {
  display: inline-grid;
  vertical-align: bottom;
  color: var(--rd-blue-ink);
  text-align: left;
}
.rd-kinetic::before { content: attr(data-sizer); grid-area: 1 / 1; visibility: hidden; }
.rd-kinetic > span { grid-area: 1 / 1; }
.rd-kinetic-word::before { content: attr(data-word); }
.rd-kinetic-word {
  opacity: 0;
  transform: translateY(0.18em);
  transition: opacity 0.38s var(--rd-ease), transform 0.5s var(--rd-ease);
}
.rd-kinetic-word.is-active { opacity: 1; transform: none; }
.rd-kinetic-word.is-leaving { opacity: 0; transform: translateY(-0.18em); }

/* ── Buttons (app Button: 6px radius, Inter 600, layered shadow) ── */
.rd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--rd-r);
  font-family: var(--rd-font);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.rd-btn svg { width: 16px; height: 16px; flex-shrink: 0; transition: transform 0.2s var(--rd-ease); }
.rd-btn:hover svg { transform: translateX(2px); }
.rd-btn--primary { background: var(--rd-blue-ink); color: #fff !important; box-shadow: var(--rd-shadow-btn); }
.rd-btn--primary:hover { background: var(--rd-blue-press); }
.rd-btn--primary:active { background: var(--rd-blue-deep); }
.rd-btn--secondary {
  background: #fff;
  color: var(--rd-ink-800) !important;
  border: 1px solid var(--rd-line-form);
  box-shadow: var(--rd-shadow-btn-2);
}
.rd-btn--secondary:hover { background: #f3f4f5; }
.rd-btn--secondary:active { background: #eceef0; }
.rd-btn--invert {
  background: transparent;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.42);
}
.rd-btn--invert:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.6); }
.rd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* ── Chips (app Chip: 6px, 1px hairline, 500 weight) ── */
.rd-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: var(--rd-r);
  border: 1px solid rgba(37, 41, 46, 0.08);
  background: var(--rd-surface-2);
  color: var(--rd-ink-600);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.rd-chip--up { text-transform: uppercase; font-size: 11px; letter-spacing: 0.03em; font-weight: 600; }
.rd-chip--blue { background: var(--rd-blue-tint); color: var(--rd-blue-press); }
.rd-chip--green { background: var(--rd-green-tint); color: var(--rd-green-ink); }
.rd-chip--red { background: var(--rd-red-tint); color: var(--rd-red); }

/* ── Tabs (app Tabs: underline, selected = strong ink + blue bar) ── */
.rd-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--rd-line);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rd-tabs::-webkit-scrollbar { display: none; }
.rd-tab {
  position: relative;
  flex-shrink: 0;
  padding: 10px 12px 12px;
  background: none;
  border: 0;
  font-family: var(--rd-font);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--rd-ink-600);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.rd-tab:hover { color: var(--rd-ink-800); }
.rd-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--rd-blue-press);
  transform: scaleX(0);
  transition: transform 0.3s var(--rd-ease);
}
.rd-tab[aria-selected="true"] { color: var(--rd-ink-800); font-weight: 600; }
.rd-tab[aria-selected="true"]::after { transform: scaleX(1); }
.rd-tab:focus-visible { outline-offset: -2px; border-radius: 4px; }

/* ── Accordion (FAQ list; markup from partials/rd/faq.html.j2, toggled by
   the shared script in base.html.j2) ── */
body.rd .faq-list { max-width: none; margin: 0; color: inherit; border-top: 1px solid var(--rd-line); }
body.rd .faq-item { border-bottom: 1px solid var(--rd-line); }
body.rd .faq-question {
  gap: 24px;
  padding: 20px 2px;
  font-family: var(--rd-font);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--rd-ink-800);
}
body.rd .faq-question:hover { color: var(--rd-blue-ink); }
/* App Accordion toggle icon */
.rd-acc-icon { display: inline-flex; flex-shrink: 0; width: 20px; height: 20px; color: var(--rd-ink-600); }
.rd-acc-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transform: none !important; }
.rd-acc-icon .rd-acc-open,
.faq-item.is-open .rd-acc-icon .rd-acc-closed,
details[open] > summary .rd-acc-icon .rd-acc-closed { display: none; }
.faq-item.is-open .rd-acc-icon .rd-acc-open,
details[open] > summary .rd-acc-icon .rd-acc-open { display: block; }
body.rd .faq-answer { font-size: 16px; color: var(--rd-ink-600); line-height: 1.65; transition: grid-template-rows 0.32s var(--rd-ease), opacity 0.25s ease; }
body.rd .faq-answer-inner > p { max-width: 68ch; padding: 0 2px 22px; text-wrap: pretty; }

/* Restyle the existing mockup partials' window chrome: no fake macOS dots,
   app top-bar treatment, frame depth. */
body.rd .cm-window {
  border: 1px solid var(--rd-line);
  border-radius: var(--rd-r-xl);
  box-shadow: var(--rd-shadow-frame);
}
body.rd .cm-window-dots { display: none; }
body.rd .cm-window-bar { padding: 11px 16px; border-bottom: 1px solid var(--rd-line); background: var(--rd-surface-1); }
body.rd .cm-window-caption { margin-left: 0; font-size: 12.5px; color: var(--rd-ink-600); }

/* ── Supplier logo strip (calm, no dock magnification) ── */
.rd-logos { padding-block: clamp(36px, 5vw, 56px); }
.rd-logos-label { text-align: center; font-size: 14px; color: var(--rd-ink-500); margin-bottom: 22px; }
.rd-logos-viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.rd-logos-track { display: flex; width: max-content; animation: rd-marquee 60s linear infinite; }
.rd-logos-viewport:hover .rd-logos-track { animation-play-state: paused; }
.rd-logo { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; height: 52px; }
.rd-logo img { display: block; max-width: none; filter: grayscale(1); }
.rd-logos-track { align-items: center; }
.rd-logos-track .rd-logo { margin-inline: 26px; }
@keyframes rd-marquee { to { transform: translateX(-50%); } }

/* ── Security facts (restyle of partials/cta-security-badges.html.j2) ── */
body.rd .cta-security,
body.rd .cta-security--light,
body.rd .cta-security--dark { margin: 0; padding: 0; border: 0; }
body.rd .cta-security-list { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 0; list-style: none; justify-content: flex-start; }
body.rd .cta-security-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--rd-font);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: none;
}
body.rd .cta-security-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rd-green); }
body.rd .cta-security-badge.is-progress .cta-security-dot { background: var(--rd-orange); }
body.rd .cta-security--dark .cta-security-badge { color: rgba(255, 255, 255, 0.86); }
body.rd .cta-security--dark .cta-security-badge.is-muted { color: rgba(255, 255, 255, 0.66); }
body.rd .cta-security--dark .cta-security-badge.is-muted a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.35); }
body.rd .cta-security--light .cta-security-badge { color: var(--rd-ink-800); }
body.rd .cta-security--light .cta-security-badge.is-muted { color: var(--rd-ink-500); }
body.rd .cta-security--light .cta-security-badge.is-muted a { color: var(--rd-blue-ink); }

/* ── Nav (restyled: app top bar, solid white, hairline) ── */
body.rd .nav-wrapper {
  height: var(--nav-height);
  background: #fff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom: 1px solid var(--rd-line-soft);
}
body.rd .nav-inner {
  max-width: calc(var(--rd-container) + 2 * var(--rd-gutter));
  padding-inline: var(--rd-gutter);
}
body.rd .nav-logo { color: var(--rd-ink-900); }
body.rd .nav-links > li > a {
  display: flex;
  align-items: center;
  height: var(--nav-height);
  padding: 0 14px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--rd-ink-800);
}
body.rd .nav-links > li > a:hover,
body.rd .nav-dropdown:hover > a { opacity: 1; color: var(--rd-blue-ink); }
body.rd .nav-links > li > a.is-active { color: var(--rd-blue-ink); }
body.rd .nav-cta .button,
body.rd .nav-mobile .button {
  height: 38px;
  padding: 0 14px;
  gap: 8px;
  border-radius: var(--rd-r);
  background: var(--rd-blue-ink);
  background-image: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: var(--rd-shadow-btn);
  filter: none;
}
body.rd .nav-cta .button:hover,
body.rd .nav-mobile .button:hover { background: var(--rd-blue-press); filter: none; box-shadow: var(--rd-shadow-btn); }
body.rd .nav-cta .button svg { transition: transform 0.2s var(--rd-ease); }
body.rd .nav-cta .button:hover svg { transform: translateX(2px); }

/* Solutions mega menu */
body.rd .nav-dropdown-menu {
  top: calc(100% + 6px);
  border: 1px solid var(--rd-line);
  border-radius: var(--rd-r-xl);
  box-shadow: var(--rd-shadow-menu);
}
body.rd .nav-dropdown-menu::before { top: -8px; height: 8px; }
body.rd .nav-dropdown-major-title {
  font-family: var(--rd-font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.025em;
  color: var(--rd-ink-900);
  font-variation-settings: normal;
}
body.rd .nav-dropdown-brand { font-family: inherit; letter-spacing: inherit; }
body.rd .nav-dropdown-major-sub { font-size: 13px; color: var(--rd-ink-600); }
body.rd .nav-dropdown-menu .nav-dropdown-cat { color: var(--rd-ink-800); }
body.rd .nav-dropdown-cat:hover,
body.rd .nav-dropdown-cat:hover .nav-dropdown-cat-arr,
body.rd .nav-dropdown-menu .nav-dropdown-cat-proc:hover,
body.rd .nav-dropdown-ind:hover { color: var(--rd-blue-ink); }
body.rd .nav-dropdown-menu .nav-dropdown-cat-proc { font-size: 13px; color: var(--rd-ink-600); }
body.rd .nav-dropdown-minor { background: var(--rd-surface-1); border-left-color: var(--rd-line-soft); border-top-right-radius: var(--rd-r-xl); }
body.rd .nav-dropdown-menu:not(:has(.nav-dropdown-foot)) .nav-dropdown-minor { border-bottom-right-radius: var(--rd-r-xl); }
body.rd .nav-dropdown-minor-title {
  font-family: var(--rd-font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--rd-ink-600);
}
body.rd .nav-dropdown-menu .nav-dropdown-ind { font-size: 14px; color: var(--rd-ink-800); border-bottom-color: var(--rd-line-soft); }
body.rd .nav-dropdown-ind-foot {
  font-family: var(--rd-font);
  font-style: normal;
  font-size: 13px;
  color: var(--rd-ink-500);
  border-top-color: var(--rd-line-soft);
}
body.rd .nav-dropdown-foot {
  background: var(--rd-surface-1);
  border-top-color: var(--rd-line-soft);
  border-bottom-left-radius: var(--rd-r-xl);
  border-bottom-right-radius: var(--rd-r-xl);
}
body.rd .nav-dropdown-foot-text { font-size: 13px; color: var(--rd-ink-600); }
body.rd .nav-dropdown-foot-text strong { color: var(--rd-ink-800); }
body.rd .nav-dropdown-menu .nav-dropdown-foot-cta {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--rd-line-form);
  border-radius: var(--rd-r);
  background: #fff;
  background-image: none;
  color: var(--rd-ink-800);
  box-shadow: var(--rd-shadow-btn-2);
  font-size: 13px;
}
body.rd .nav-dropdown-menu .nav-dropdown-foot-cta:hover { background: #f3f4f5; }

/* Mobile menu */
body.rd .nav-hamburger svg { stroke: var(--rd-ink-800); }
body.rd .nav-mobile { padding: 8px var(--rd-gutter) 24px; border-bottom-color: var(--rd-line-soft); }
body.rd .nav-mobile a,
body.rd .nav-mobile-toggle { font-size: 16px; color: var(--rd-ink-800); border-bottom-color: var(--rd-line-soft); }
body.rd .nav-mobile-group { border-bottom-color: var(--rd-line-soft); }
body.rd .nav-mobile-submenu a { padding: 9px 0 9px 16px; border-bottom: 0; font-size: 15px; color: var(--rd-ink-600); }
body.rd .nav-mobile-submenu a.nav-mobile-cat { margin-top: 10px; color: var(--rd-ink-800); }
/* The page you're on, in the dropdown and the mobile menu */
body.rd .nav-dropdown-menu a[aria-current="page"],
body.rd .nav-mobile a[aria-current="page"] { color: var(--rd-blue-ink); font-weight: 600; }
body.rd .nav-mobile-label {
  font-family: var(--rd-font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--rd-ink-500);
}
body.rd .nav-mobile .button { height: 44px; margin-top: 16px !important; }

/* ── Footer (app surface-1) ── */
body.rd .footer {
  background: var(--rd-surface-1);
  border-top: 1px solid var(--rd-line-soft);
  padding-top: clamp(48px, 6vw, 72px);
  padding-bottom: 32px;
}
body.rd .footer .padding-global { padding-inline: var(--rd-gutter); }
body.rd .footer .container-large { max-width: var(--rd-container); }
body.rd .footer-brand .nav-logo { color: var(--rd-ink-900); }
body.rd .footer-brand p { font-size: 14px; color: var(--rd-ink-600); }
body.rd .footer-col-title { font-size: 14px; font-weight: 600; color: var(--rd-ink-800); letter-spacing: -0.01em; }
body.rd .footer-col a { font-size: 14px; color: var(--rd-ink-600); }
body.rd .footer-col a:hover { color: var(--rd-blue-ink); }
body.rd .footer-bottom { font-size: 13px; color: var(--rd-ink-500); border-top-color: var(--rd-line); }
body.rd .footer-legal a:hover { color: var(--rd-blue-ink); }

/* ── Motion preferences ── */
@media (prefers-reduced-motion: reduce) {
  body.rd *, body.rd *::before, body.rd *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .rd-logos-track { animation: none !important; flex-wrap: wrap; justify-content: center; width: auto; }
  .rd-logos-track [data-dupe] { display: none; }
  .rd-logos-viewport { -webkit-mask-image: none; mask-image: none; }
}

/* ── Mockup atoms: initials avatar + company square (app UserAvatar / CompanyLogo) ── */
.rd-av,
.rd-co {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--s, 24px);
  height: var(--s, 24px);
  color: #fff;
  font-family: var(--rd-font);
  font-size: calc(var(--s, 24px) * 0.4);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
}
.rd-av { border-radius: 50%; background: var(--av, #3971fb); }
.rd-co { border-radius: calc(var(--s, 22px) * 0.27); background: var(--co, #1ea2e2); }

.rd-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Check list (building-block bullets) */
.rd-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rd-checks li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; font-size: 15px; line-height: 1.5; color: var(--rd-ink-800); }
.rd-checks svg { width: 18px; height: 18px; margin-top: 2px; color: var(--rd-blue); }

/* ── Phones: shorter footer (brand on top, link groups 2 × 2) and a fade
   hint on tab rows that scroll sideways ── */
@media (max-width: 767px) {
  body.rd .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  body.rd .footer-brand { grid-column: 1 / -1; }
  body.rd .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
  .rd-tabs {
    padding-right: 28px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
  }
}

/* Labels on filled controls: `body.rd a { color: inherit }` would otherwise
   win over the global white .button / .skip-link colours. */
body.rd .nav-cta .button,
body.rd .nav-mobile .button,
body.rd .skip-link { color: #fff; }

/* Existing mockup partials inside the redesign: settle with an ease-out
   instead of an overshoot, and drop the pulsing status dot. */
body.rd .ac-banner,
body.rd .om-d-check,
body.rd .om-a-event { transition-timing-function: ease, var(--rd-ease); }
body.rd .om-d-badge--prog::before { animation: none; }

body.rd .cta-security-badge.is-muted a { display: inline-flex; align-items: center; gap: 5px; }
body.rd .cta-security-arrow { transition: transform 0.2s var(--rd-ease); }
body.rd .cta-security-badge.is-muted a:hover .cta-security-arrow { transform: translateX(2px); }

/* ── Shared page blocks (macros in partials/rd/_ui.html.j2) ── */

/* Breadcrumb above an interior page's H1: navigation, not a kicker. */
.rd-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--rd-ink-500); }
body.rd .rd-crumb a { text-decoration: none; color: var(--rd-ink-600); }
body.rd .rd-crumb a:hover { color: var(--rd-blue-ink); text-decoration: underline; text-underline-offset: 4px; }
.rd-crumb li + li::before { content: "/"; margin-right: 6px; color: var(--rd-line-form); }

/* App table of links: one row per destination (industries, processes). */
.rd-table {
  border: 1px solid var(--rd-line-soft);
  border-radius: var(--rd-r-lg);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(23, 30, 37, 0.04);
}
.rd-tr {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 5fr) minmax(0, 2.2fr);
  gap: 24px;
  align-items: center;
  padding: 18px 24px;
  border-top: 1px solid var(--rd-line-soft);
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.rd-tr:first-child { border-top: 0; }
.rd-th { padding-block: 11px; background: var(--rd-surface-1); font-size: 13px; font-weight: 500; color: var(--rd-ink-600); }
a.rd-tr:hover { background: #f4f9fc; }
.rd-tr-name { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 600; letter-spacing: -0.018em; color: var(--rd-ink-800); }
.rd-tr-name > i, .rd-tr-name > svg { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--rd-surface-2); color: var(--rd-ink-600); font-size: 17px; }
/* The icon font's glyph box sits on the text baseline; as a block it centres in the tile. */
.rd-tr-name > i::before { display: block; }
.rd-tr-name > svg { padding: 7px; fill: none; stroke: var(--rd-ink-600); stroke-width: 1.6; }
.rd-tr-desc { font-size: 15px; line-height: 1.5; color: var(--rd-ink-600); text-wrap: pretty; }
.rd-tr-link { justify-self: end; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--rd-blue-ink); white-space: nowrap; }
.rd-tr-link svg { width: 15px; height: 15px; transition: transform 0.2s var(--rd-ease); }
a.rd-tr:hover .rd-tr-link svg { transform: translateX(3px); }
.rd-tr--more { background: var(--rd-surface-1); }
.rd-tr--more .rd-tr-name > i { background: #fff; border: 1px dashed var(--rd-line-form); }

/* Link grid: destinations three across in hairline cells (industries). */
.rd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rd-line); }
.rd-grid-item { display: flex; flex-direction: column; gap: 6px; padding: 24px 24px 24px 0; border-bottom: 1px solid var(--rd-line-soft); text-decoration: none; }
.rd-grid-item:not(:nth-child(3n+1)) { padding-left: 24px; border-left: 1px solid var(--rd-line-soft); }
.rd-grid-name { display: flex; align-items: center; gap: 12px; margin-bottom: 2px; font-size: 16px; font-weight: 600; letter-spacing: -0.018em; color: var(--rd-ink-800); }
.rd-grid-name i { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--rd-surface-2); color: var(--rd-ink-600); font-size: 17px; }
.rd-grid-name i::before { display: block; }
.rd-grid-item--more .rd-grid-name i { background: #fff; border: 1px dashed var(--rd-line-form); }
.rd-grid-desc { font-size: 14px; line-height: 1.5; color: var(--rd-ink-600); text-wrap: pretty; }
.rd-grid-go { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 4px; font-size: 14px; font-weight: 600; color: var(--rd-blue-ink); }
.rd-grid-go svg { width: 14px; height: 14px; transition: transform 0.2s var(--rd-ease); }
.rd-grid-item:hover .rd-grid-name { color: var(--rd-blue-ink); }
.rd-grid-item:hover .rd-grid-go svg { transform: translateX(3px); }

/* Split: a sticky heading column beside long content (FAQ, stories). */
.rd-split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.rd-split-head { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--nav-height) + 40px); }

/* Closing demo band (slate, the app's rail colour). */
.rd-cta { background: var(--rd-slate); color: #fff; padding-block: clamp(64px, 8vw, 104px) clamp(40px, 5vw, 56px); }
.rd-cta-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: end; }
.rd-cta .rd-h2 { color: #fff; }
.rd-cta-body { margin-top: 18px; font-size: 17px; line-height: 1.6; color: rgba(255, 255, 255, 0.78); max-width: 56ch; }
.rd-cta-foot { margin-top: clamp(40px, 5vw, 56px); padding-top: 24px; border-top: 1px solid var(--rd-slate-line); }

/* Status tags over a section or a panel: "Today" (how it breaks now) in red,
   "In Clover" (how it runs) in green, each a tinted pill with a hairline ring. */
.rd-tag { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.4; }
.rd-tag i { width: 20px; height: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-size: 9px; }
.rd-tag--bad { background: #fbe3e9; color: #96193a; box-shadow: inset 0 0 0 1px #f1c6d0; }
.rd-tag--bad i { background: var(--rd-red); }
.rd-tag--good { background: #d6f3e5; color: #05603c; box-shadow: inset 0 0 0 1px #b9e5cf; }
.rd-tag--good i { background: #27ae60; }
.rd-tag--info { background: var(--rd-blue-tint); color: var(--rd-blue-deep); box-shadow: inset 0 0 0 1px #cfe6f3; }
.rd-tag--info i { background: var(--rd-blue); }
.rd-head--center .rd-tag { align-self: center; }

/* App shell (macro app_shell): the product's own window after the UI kit's
   SideNav and TopBar, 56px slate rail and 56px top bar, around a page's
   mockup. The page sets the frame's width and shadow. */
.rd-app { display: grid; grid-template-columns: 56px minmax(0, 1fr); border: 1px solid var(--rd-line); border-radius: var(--rd-r-xl); background: #fff; box-shadow: var(--rd-shadow-frame); overflow: hidden; font-family: var(--rd-font); font-size: 13px; letter-spacing: -0.01em; color: var(--rd-ink-800); user-select: none; }
.rd-app-rail { display: flex; flex-direction: column; background: var(--rd-slate); }
.rd-app-rail > span { position: relative; height: 56px; display: flex; align-items: center; justify-content: center; color: #a9adb1; }
.rd-app-rail > .rd-app-logo { border-bottom: 1px solid var(--rd-slate-line); }
.rd-app-rail img { display: block; width: 28px; height: 22px; }
.rd-app-rail i { font-size: 24px; }
.rd-app-rail > .is-active { background: var(--rd-slate-active); color: #fff; }
.rd-app-rail b { position: absolute; top: 5px; right: 5px; min-width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 3px solid var(--rd-slate); border-radius: 9px; background: var(--rd-blue); color: #fff; font-size: 12px; font-weight: 500; line-height: 16px; box-sizing: border-box; }
.rd-app-main { min-width: 0; }
.rd-app-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; padding: 0 12px; border-bottom: 1px solid var(--rd-line); background: var(--rd-surface-1); }
.rd-app-left { flex: 1 1 0; display: flex; align-items: center; }
.rd-app-create { display: inline-flex; align-items: center; height: 32px; padding: 0 10px; border-radius: var(--rd-r); background: var(--rd-blue); color: #fff; font-size: 14px; font-weight: 600; line-height: 18px; letter-spacing: -0.01em; white-space: nowrap; box-shadow: var(--rd-shadow-btn); }
.rd-app-search { flex: 0 1 552px; min-width: 0; height: 32px; display: flex; align-items: center; gap: 6px; padding: 0 10px 0 9px; border: 1px solid var(--rd-line-form); border-radius: var(--rd-r-lg); background: #fff; font-size: 14px; color: var(--rd-ink-400); white-space: nowrap; overflow: hidden; }
.rd-app-search i { flex-shrink: 0; font-size: 18px; }
.rd-app-search span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rd-app-right { flex: 1 1 0; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.rd-app-tools { display: flex; align-items: center; gap: 4px; }
.rd-app-tools > span { flex-shrink: 0; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: var(--rd-r); color: var(--rd-ink-600); }
.rd-app-tools i { position: relative; font-size: 24px; }
/* The bell's unread dot */
.rd-app-tools .is-unread i::after { content: ""; position: absolute; top: 0; right: 4px; width: 7px; height: 7px; border: 1px solid #fff; border-radius: 50%; background: #f75734; }
/* Profile: the company's mark with the person's face over it, in a grey pill */
.rd-app-me { flex-shrink: 0; display: flex; align-items: center; gap: 1px; height: 32px; padding: 1px; border-radius: 18px; background: #e9eaeb; }
.rd-app-me > span { width: 30px; height: 30px; flex-shrink: 0; border: 1px solid #e9eaeb; border-radius: 50%; background: #fff; overflow: hidden; box-sizing: border-box; }
.rd-app-me > span + span { margin-left: -8px; }
.rd-app-me img { display: block; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.rd-app-me i { margin: -1px 6px 0 0; font-size: 18px; color: var(--rd-ink-600); }
/* A tab's count, after the UI kit's small Chip (macro tab_count) */
.rd-count { display: inline-flex; align-items: center; justify-content: center; padding: 2px 6px; border: 1px solid rgba(37, 41, 46, 0.08); border-radius: var(--rd-r); background: #eff0f1; font-size: 12px; font-weight: 500; line-height: 16px; letter-spacing: 0.2px; color: var(--rd-ink-800); }
/* A record's tabs (macro app_tabs): Overview, Contacts 4, Documents 12,
   Certificates 3, one lit */
.rd-app-tabs { display: flex; gap: 18px; height: 38px; padding: 0 18px; border-bottom: 1px solid var(--rd-line-soft); font-size: 12.5px; font-weight: 500; color: var(--rd-ink-600); white-space: nowrap; overflow: hidden; box-sizing: border-box; }
.rd-app-tabs > span { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; border-bottom: 2px solid transparent; box-sizing: border-box; }
.rd-app-tabs > .is-active { border-bottom-color: var(--rd-blue-press); font-weight: 600; color: var(--rd-ink-800); }
@media (max-width: 600px) {
  /* Phone: a narrower rail with the first five modules; the top bar keeps
     Create, the bell and the profile */
  .rd-app { grid-template-columns: 44px minmax(0, 1fr); }
  .rd-app-rail > span { height: 48px; }
  .rd-app-rail > span:nth-child(n+7) { display: none; }
  .rd-app-rail i { font-size: 20px; }
  .rd-app-rail img { width: 24px; height: 19px; }
  .rd-app-top { height: 48px; gap: 10px; padding: 0 10px; }
  .rd-app-search, .rd-app-tools > span:nth-child(n+2) { display: none; }
}

/* Closing call card (macro call_card): a slate card inside the page width,
   the copy beside "What we promise" or, when called with a form, the copy
   and the promise above it beside the form. */
.rd-call { padding-block: 0 var(--rd-section); }
.rd-call--gap { padding-top: var(--rd-section); }
.rd-call-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: clamp(28px, 4vw, 56px); align-items: center; padding: clamp(24px, 4vw, 48px); border-radius: var(--rd-r-2xl); background: var(--rd-slate); color: #fff; }
.rd-call-copy { display: flex; flex-direction: column; gap: 14px; }
body.rd .rd-call h2 { font-family: var(--rd-font-display); font-size: clamp(1.625rem, 1.1rem + 1.6vw, 2.25rem); line-height: 1.1; letter-spacing: -0.025em; color: #fff; }
.rd-call-copy > p { max-width: 50ch; font-size: 17px; line-height: 1.6; color: rgba(255, 255, 255, 0.8); text-wrap: pretty; }
.rd-call-copy .rd-actions { margin-top: 6px; }
.rd-call-copy .rd-promise { margin-top: 6px; }
.rd-promise { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: var(--rd-r-xl); background: rgba(255, 255, 255, 0.06); }
body.rd .rd-promise h3 { font-family: var(--rd-font); font-size: 12px; font-weight: 600; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.66); }
.rd-promise ul { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.rd-promise li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.5; }
.rd-promise li i { width: 22px; height: 22px; flex-shrink: 0; margin-top: 1px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--rd-green); color: #fff; font-size: 10px; }
body.rd .rd-call-alt { align-self: flex-start; font-size: 15px; font-weight: 600; color: #fff; text-decoration: none; opacity: 0.85; }
body.rd .rd-call-alt:hover { opacity: 1; }
.rd-call-alt span { white-space: nowrap; }
.rd-call-alt svg { display: inline-block; width: 15px; height: 15px; margin-left: 4px; vertical-align: -2px; transition: transform 0.2s var(--rd-ease); }
.rd-call-alt:hover svg { transform: translateX(3px); }
.rd-call-foot { margin-top: 20px; padding-inline: clamp(8px, 2vw, 24px); }

@media (max-width: 991px) {
  .rd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rd-grid-item:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
  .rd-grid-item:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--rd-line-soft); }
  .rd-split { grid-template-columns: minmax(0, 1fr); }
  .rd-split-head { position: static; }
  .rd-tr { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .rd-tr-desc { grid-column: 1 / -1; grid-row: 2; padding-left: 44px; }
  .rd-th { display: none; }
  .rd-cta-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
}
@media (max-width: 767px) {
  .rd-grid { grid-template-columns: minmax(0, 1fr); }
  .rd-grid-item:nth-child(even) { padding-left: 0; border-left: 0; }
  .rd-grid-item { padding: 18px 0; }
  .rd-tr { padding: 16px 18px; }
  .rd-tr-link { font-size: 0; gap: 0; }
  .rd-tr-link svg { width: 18px; height: 18px; }
  .rd-tr-desc { padding-left: 0; }
  .rd-cta .rd-actions .rd-btn { flex: 1 1 auto; }
}

/* ── Demo form (app inputs: 40px, Form Border, 6px; posted by js/form-submit.js) ── */
.rd-form { display: flex; flex-direction: column; gap: 16px; padding: clamp(20px, 2.5vw, 28px); border-radius: var(--rd-r-xl); background: #fff; color: var(--rd-ink-800); box-shadow: var(--rd-shadow-frame); }
.rd-field { display: flex; flex-direction: column; gap: 6px; }
.rd-field label { font-size: 14px; font-weight: 500; color: var(--rd-ink-800); }
.rd-field label span { font-weight: 400; color: var(--rd-ink-500); }
.rd-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--rd-line-form);
  border-radius: var(--rd-r);
  background: #fff;
  font: inherit;
  font-size: 15px;
  color: var(--rd-ink-800);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.rd-input::placeholder { color: var(--rd-ink-500); opacity: 1; }
.rd-input:hover { border-color: #9aa5b1; }
.rd-input:focus { outline: none; border-color: var(--rd-blue); box-shadow: 0 0 0 3px var(--rd-focus); }
textarea.rd-input { height: auto; min-height: 88px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
select.rd-input {
  appearance: none;
  padding-right: 36px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b545d' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
}
select.rd-input:invalid { color: var(--rd-ink-500); }
.rd-form .rd-btn { width: 100%; justify-content: center; margin-top: 4px; }
.rd-form-alt { font-size: 14px; text-align: center; }
body.rd .form-consent { margin-top: -4px; font-size: 13px; color: var(--rd-ink-500); }
@media (max-width: 767px) { body.rd .form-consent { font-size: 14px; } }
body.rd .rd-form-alt a { color: var(--rd-blue-ink); font-weight: 500; text-decoration: none; }
.rd-form-alt a:hover { text-decoration: underline; text-underline-offset: 4px; }
body.rd .form-message-success { padding: 24px; border-radius: var(--rd-r-xl); background: #fff; color: var(--rd-ink-800); font-size: 15px; line-height: 1.6; box-shadow: var(--rd-shadow-frame); }
body.rd .form-message-success a { color: var(--rd-blue-ink); }
body.rd .form-message-error { padding: 10px 12px; border-radius: var(--rd-r); background: var(--rd-red-tint); color: var(--rd-red); font-size: 14px; }

/* ── Progress pills (shared .pcc-* control from site-layout.css): app colours,
   Brand Blue fill on the Track, 2px corners instead of the round pill ── */
body.rd .pcc-dot { border-radius: 2px; background: #d3d9df; transition: width 0.45s var(--rd-ease), background-color 0.3s ease; }
body.rd .pcc-dot:hover:not(.is-active) { background: var(--rd-line-form); }
body.rd .pcc-dot.is-active { background: #e3e8ee; }
body.rd .pcc-dot-fill { background: var(--rd-blue); }

/* ── Solution Templates slice (behind features.solution_templates, AB#16636) ── */
.rd-tpl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rd-line); }
.rd-tpl-item { display: flex; flex-direction: column; gap: 8px; padding: 22px 20px 22px 0; border-bottom: 1px solid var(--rd-line-soft); text-decoration: none; }
.rd-tpl-item:not(:nth-child(4n+1)) { padding-left: 20px; border-left: 1px solid var(--rd-line-soft); }
.rd-tpl-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.rd-tpl-item h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.018em; color: var(--rd-ink-800); }
.rd-tpl-item p { font-size: 14px; line-height: 1.5; color: var(--rd-ink-600); text-wrap: pretty; }
.rd-tpl-item--more { justify-content: center; }
.rd-tpl-foot { margin-top: 24px; }
body.rd .rd-tpl-foot a { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--rd-blue-ink); text-decoration: none; }
.rd-tpl-foot svg { width: 15px; height: 15px; transition: transform 0.2s var(--rd-ease); }
.rd-tpl-foot a:hover svg { transform: translateX(3px); }
@media (max-width: 991px) {
  .rd-tpl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rd-tpl-item:not(:nth-child(4n+1)) { padding-left: 0; border-left: 0; }
  .rd-tpl-item:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--rd-line-soft); }
}
@media (max-width: 767px) {
  .rd-tpl { grid-template-columns: minmax(0, 1fr); }
  .rd-tpl-item:nth-child(even) { padding-left: 0; border-left: 0; }
  .rd-tpl-item { padding: 18px 0; }
}

/* ── Long-form text: blog articles and the legal pages (AB#16642, AB#16643).
   Body HTML comes from Markdown, so everything is styled by element. ── */
.rd-prose { font-size: 17px; line-height: 1.7; color: var(--rd-ink-800); text-wrap: pretty; }
.rd-prose > :first-child { margin-top: 0; }
.rd-prose p, .rd-prose ul, .rd-prose ol, .rd-prose blockquote { margin: 0 0 1.15em; }
.rd-prose h2 {
  margin: 2em 0 0.6em;
  font-family: var(--rd-font-display);
  font-size: clamp(1.5rem, 1.3rem + 0.6vw, 1.75rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.022em;
  color: var(--rd-ink-900);
  text-wrap: balance;
}
.rd-prose h3 { margin: 1.7em 0 0.5em; font-size: 1.1875rem; font-weight: 600; line-height: 1.35; letter-spacing: -0.018em; }
.rd-prose h4 { margin: 1.6em 0 0.5em; font-size: 1rem; font-weight: 600; line-height: 1.4; letter-spacing: -0.012em; }
.rd-prose h2 + h3, .rd-prose h3 + h4 { margin-top: 0.8em; }
.rd-prose strong { font-weight: 600; color: var(--rd-ink-900); }
.rd-prose ul, .rd-prose ol { padding-left: 1.35em; }
.rd-prose li { margin-bottom: 0.45em; padding-left: 0.2em; }
.rd-prose li > p { margin-bottom: 0.45em; }
.rd-prose li::marker { color: var(--rd-ink-500); }
.rd-prose ol > li::marker { font-weight: 600; font-variant-numeric: tabular-nums; }
body.rd .rd-prose a {
  color: var(--rd-blue-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(19, 119, 177, 0.4);
  overflow-wrap: anywhere;
  transition: text-decoration-color 0.15s ease;
}
body.rd .rd-prose a:hover { text-decoration-color: currentColor; }
.rd-prose blockquote { padding: 2px 0 2px 20px; border-left: 1px solid var(--rd-line-form); color: var(--rd-ink-600); }
.rd-prose blockquote p:last-child { margin-bottom: 0; }
.rd-prose img { display: block; width: 100%; height: auto; margin: 2em 0; border-radius: var(--rd-r-lg); border: 1px solid var(--rd-line-soft); }
.rd-prose p:has(> img:only-child) { margin: 0; }
.rd-prose hr { margin: 2.5em 0; border: 0; border-top: 1px solid var(--rd-line); }
.rd-prose .post-video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 2em; border-radius: var(--rd-r-lg); overflow: hidden; background: var(--rd-surface-2); }
.rd-prose .post-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ── Blog cards (listing, related posts) ── */
.rd-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 3.5vw, 48px) clamp(20px, 2.4vw, 32px); }
.rd-post { display: flex; flex-direction: column; gap: 10px; text-decoration: none; min-width: 0; }
.rd-post-img { aspect-ratio: 16 / 9; margin-bottom: 8px; border-radius: var(--rd-r-lg); overflow: hidden; border: 1px solid var(--rd-line-soft); background: var(--rd-surface-2); }
.rd-post-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--rd-ease); }
.rd-post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; line-height: 1.4; color: var(--rd-ink-500); }
.rd-post-meta > * + *::before { content: "·"; margin-right: 8px; color: var(--rd-ink-400); }
.rd-post-cat { font-weight: 600; color: var(--rd-blue-ink); }
.rd-post-title { font-size: 18px; font-weight: 600; line-height: 1.35; letter-spacing: -0.02em; color: var(--rd-ink-800); text-wrap: balance; transition: color 0.15s ease; }
.rd-post-dek { font-size: 15px; line-height: 1.55; color: var(--rd-ink-600); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rd-post-by { display: flex; align-items: center; gap: 8px; margin-top: 2px; font-size: 14px; font-weight: 500; color: var(--rd-ink-600); }
.rd-post-by img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.rd-post:hover .rd-post-title { color: var(--rd-blue-ink); }
.rd-post:hover .rd-post-img img { transform: scale(1.025); }
@media (max-width: 991px) { .rd-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .rd-posts { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .rd-post-img img { transition: none; } .rd-post:hover .rd-post-img img { transform: none; } }
