/* =========================================================
   Rubato Signals  (blog index, category, single)
   Built on the live rg- tokens. Fallbacks match rubatogroup.com.
   ========================================================= */

.rbs {
  --s-navy:   var(--rg-navy, #06162F);
  --s-ink:    var(--rg-ink, #111827);
  --s-slate:  var(--rg-slate, #667085);
  --s-mute:   var(--rg-slate-mute, #7A85A3);
  --s-lime:   var(--rg-lime, #D7F33A);
  --s-purple: var(--rg-purple, #4B1E72);
  --s-mist:   var(--rg-mist, #F5F7FB);
  --s-rule:   var(--rg-rule, #DEE3EC);
  --s-white:  #FFFFFF;
  /* purple haze: same radial washes as the site's .haze-bg sections */
  --s-haze:
    radial-gradient(52% 46% at 12% 8%,  rgba(214,188,244,.38) 0%, rgba(214,188,244,0) 100%),
    radial-gradient(46% 42% at 88% 14%, rgba(186,207,252,.42) 0%, rgba(186,207,252,0) 100%),
    radial-gradient(50% 48% at 78% 88%, rgba(240,197,231,.30) 0%, rgba(240,197,231,0) 100%),
    radial-gradient(60% 50% at 20% 95%, rgba(214,188,244,.22) 0%, rgba(214,188,244,0) 100%),
    #F7F6FC;
  --s-font:   'Manrope', 'Archivo', system-ui, sans-serif;
  --s-max:    var(--rg-max, 1240px);
  --s-copy:   var(--rg-copy, 720px);
  --s-pill:   999px;

  /* spacing scale: 8 / 16 / 24 / 40 / 64 / 104 */
  --s-1: 8px; --s-2: 16px; --s-3: 24px; --s-4: 40px; --s-5: 64px; --s-6: 104px;

  font-family: var(--s-font);
  color: var(--s-ink);
  background: var(--s-white);
  -webkit-font-smoothing: antialiased;
}

.rbs-inner {
  width: min(var(--s-max), calc(100% - 48px));
  margin-inline: auto;
}

.rbs a { color: inherit; }
.rbs a:focus-visible { outline: 2px solid var(--s-purple); outline-offset: 3px; }

/* ---------- shared bits ---------- */

.rbs-cat {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--s-purple);
  text-decoration: none;
}
.rbs-cat:hover { text-decoration: underline; text-underline-offset: 3px; }

.rbs-more {
  display: inline-block;
  margin-top: var(--s-2);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 2px solid var(--s-lime);
  padding-bottom: 2px;
}
.rbs-more:hover { border-color: var(--s-navy); }

.rbs-btn {
  display: inline-block;
  font: 700 15px/1 var(--s-font);
  color: var(--s-ink);
  background: var(--s-lime);
  padding: 16px 28px;
  border-radius: var(--s-pill);
  text-decoration: none;
}
.rbs-btn:hover { background: #E4FA5E; }

/* ---------- hero ---------- */

.rbs-hero {
  background: var(--s-haze);
  padding: clamp(56px, 8vw, 104px) 0 0;
}
.rbs-hero__kicker {
  margin: 0 0 var(--s-2);
  font-size: 14px;
  font-weight: 700;
  color: var(--s-purple);
}
.rbs-hero__kicker a { text-decoration: none; }
.rbs-hero__title {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(38px, 5.4vw, 66px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--s-navy);
}
.rbs-hero__lede {
  max-width: 44ch;
  margin: var(--s-3) 0 0;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--s-slate);
}
.rbs-hero__lede p { margin: 0; }
.rbs-hero__note {
  margin: var(--s-2) 0 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--s-navy);
}

/* category strip: a baseline with the current view marked by a lime signal dot */
.rbs-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--s-4);
  margin-top: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--s-navy);
  overflow-x: auto;
  scrollbar-width: none;
}
.rbs-cats::-webkit-scrollbar { display: none; }
.rbs-cats__item {
  position: relative;
  padding: var(--s-2) 0 var(--s-3);
  font-size: 15px;
  font-weight: 600;
  color: var(--s-slate);
  text-decoration: none;
  white-space: nowrap;
}
.rbs-cats__item:hover { color: var(--s-navy); }
.rbs-cats__item.is-current { color: var(--s-navy); font-weight: 800; }
.rbs-cats__item.is-current::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--s-lime);
  box-shadow: 0 0 0 2px var(--s-navy);
}

/* variant: filter row (tab-style, underline marks the current view)
   add class rbs-cats--tabs on the nav in template-parts/signals/categories.php */
.rbs-cats--tabs { border-top: 0; border-bottom: 1px solid var(--s-rule); gap: 0 var(--s-1); margin-left: -14px; }
.rbs-cats--tabs .rbs-cats__item { padding: var(--s-2) 14px; margin-bottom: -1px; border-bottom: 3px solid transparent; }
.rbs-cats--tabs .rbs-cats__item.is-current { border-bottom-color: var(--s-navy); }
.rbs-cats--tabs .rbs-cats__item.is-current::before { display: none; }
.rbs-cats--tabs .rbs-cats__item:hover { border-bottom-color: var(--s-rule); }

/* variant: pills. add class rbs-cats--pills */
.rbs-cats--pills { border-top: 0; gap: var(--s-1); padding-bottom: var(--s-4); }
.rbs-cats--pills .rbs-cats__item { padding: 10px 18px; font-size: 14px; border: 1px solid rgba(6,22,47,.25); border-radius: var(--s-pill); color: var(--s-navy); }
.rbs-cats--pills .rbs-cats__item:hover { border-color: var(--s-navy); }
.rbs-cats--pills .rbs-cats__item.is-current { background: var(--s-navy); border-color: var(--s-navy); color: var(--s-white); font-weight: 700; }
.rbs-cats--pills .rbs-cats__item.is-current::before { display: none; }

/* ---------- list ---------- */

.rbs-list { padding: var(--s-5) 0 var(--s-6); }

.rbs-lead {
  display: grid;
  grid-template-columns: 3fr 5fr 4fr;
  gap: var(--s-3) var(--s-4);
  padding: var(--s-4) 0 var(--s-5);
  border-bottom: 1px solid var(--s-rule);
}
.rbs-lead__meta {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  font-size: 14px;
  color: var(--s-slate);
}
.rbs-lead__label {
  margin: 0 0 var(--s-2);
  font-size: 13px;
  font-weight: 700;
  color: var(--s-mute);
}
.rbs-lead__title {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.015em;
  max-width: 22ch;
}
.rbs-lead__title a { text-decoration: none; }
.rbs-lead__title a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--s-lime); text-underline-offset: 6px; }
.rbs-lead__excerpt {
  max-width: 62ch;
  margin-top: var(--s-2);
  font-size: 18px;
  line-height: 1.55;
  color: var(--s-slate);
}
.rbs-lead__excerpt p { margin: 0; }

.rbs-rows { display: block; }

.rbs-row {
  display: grid;
  grid-template-columns: 3fr 6fr 1fr 2fr;
  gap: var(--s-2) var(--s-4);
  padding: var(--s-3) 0 var(--s-3);
  align-items: start;
  border-bottom: 1px solid var(--s-rule);
}
.rbs-row__date,
.rbs-row__time {
  font-size: 14px;
  color: var(--s-slate);
  padding-top: 6px; /* sit on the title's cap height */
}
.rbs-row__time { text-align: right; white-space: nowrap; }
.rbs-row__title {
  margin: var(--s-1) 0 0;
  font-size: clamp(20px, 2vw, 25px);
  font-weight: 700;
  line-height: 1.25;
  max-width: 30ch;
}
.rbs-row__title a { text-decoration: none; }
.rbs-row__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--s-lime); text-underline-offset: 5px; }
.rbs-row__excerpt {
  max-width: 58ch;
  margin-top: var(--s-1);
  font-size: 16px;
  line-height: 1.55;
  color: var(--s-slate);
}
.rbs-row__excerpt p { margin: 0; }

.rbs-empty {
  padding: var(--s-5) 0;
  font-size: 18px;
  color: var(--s-slate);
}

/* post image, 3:2, with a brand placeholder when none is set */
.rbs-figure {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--s-mist);
}
.rbs-figure img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rbs-figure__placeholder {
  position: relative;
  display: block;
  width: 100%; height: 100%;
  background: var(--s-haze);
  color: var(--s-purple);
}
.rbs-figure__placeholder svg {
  position: absolute;
  left: 12%; right: 12%; top: 40%;
  width: 76%; height: 20%;
  opacity: .55;
}
.rbs-figure__placeholder i {
  position: absolute;
  left: calc(12% + 76% * .39); top: calc(40% + 20% * .25);
  width: 8px; height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--s-lime);
  box-shadow: 0 0 0 2px var(--s-navy);
}
.rbs-lead .rbs-figure { align-self: start; }
.rbs-row .rbs-figure { grid-column: 4; grid-row: 1; }
.rbs-related .rbs-figure { display: none; }

/* ---------- newsletter band ---------- */

.rbs-news {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: var(--s-4);
  align-items: end;
  margin: var(--s-5) 0;
  padding: var(--s-5) clamp(24px, 5vw, 64px);
  background: var(--s-navy);
  color: var(--s-white);
}
.rbs-news h2 {
  margin: 0;
  font-size: clamp(26px, 2.8vw, 36px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  max-width: 20ch;
}
.rbs-news p {
  margin: var(--s-2) 0 0;
  max-width: 46ch;
  font-size: 17px;
  line-height: 1.5;
  color: #B9C2D6;
}
.rbs-news__form { justify-self: end; }
.rbs-news__form form { display: flex; gap: var(--s-1); flex-wrap: wrap; }
.rbs-news__form input[type="email"] {
  font: 500 15px/1 var(--s-font);
  color: var(--s-ink);
  background: var(--s-white);
  border: 0;
  padding: 16px 20px;
  min-width: 240px;
  border-radius: var(--s-pill);
}
.rbs-news__form button,
.rbs-news__form input[type="submit"] {
  font: 700 15px/1 var(--s-font);
  color: var(--s-ink);
  background: var(--s-lime);
  border: 0;
  padding: 16px 28px;
  border-radius: var(--s-pill);
  cursor: pointer;
}

/* ---------- pagination ---------- */

.rbs-pagination { margin-top: var(--s-4); }
.rbs-pagination .nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: 15px;
  font-weight: 600;
}
.rbs-pagination .page-numbers { color: var(--s-slate); text-decoration: none; }
.rbs-pagination .page-numbers.current { color: var(--s-navy); font-weight: 800; }
.rbs-pagination a.page-numbers:hover { color: var(--s-navy); }
.rbs-pagination .prev, .rbs-pagination .next { color: var(--s-navy); }
.rbs-pagination .screen-reader-text { position: absolute; clip: rect(0,0,0,0); }

/* ---------- closing band ---------- */

.rbs-cta {
  background: var(--s-navy);
  color: var(--s-white);
  padding: var(--s-6) 0;
}
.rbs-cta__inner {
  width: min(var(--s-max), calc(100% - 48px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: var(--s-4);
  align-items: center;
}
.rbs-cta__eyebrow {
  grid-column: 1 / -1;
  margin: 0 0 var(--s-2);
  font-size: 14px;
  font-weight: 700;
  color: var(--s-lime);
}
.rbs-cta h2 {
  margin: 0;
  font-size: clamp(30px, 3.6vw, 48px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.rbs-cta .rbs-btn { justify-self: end; }

/* ---------- single ---------- */

.rbs-article__head {
  background: var(--s-mist);
  padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 5vw, 64px);
}
.rbs-article__crumb {
  margin: 0 0 var(--s-3);
  font-size: 14px;
  font-weight: 700;
  color: var(--s-purple);
  display: flex;
  gap: var(--s-1);
}
.rbs-article__crumb a { text-decoration: none; }
.rbs-article__crumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.rbs-article__crumb span { color: var(--s-mute); font-weight: 400; }
.rbs-article__title {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(34px, 4.6vw, 58px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--s-navy);
}
.rbs-article__dek {
  max-width: 52ch;
  margin: var(--s-3) 0 0;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--s-slate);
}
.rbs-article__meta {
  display: flex;
  gap: var(--s-3);
  margin: var(--s-3) 0 0;
  font-size: 14px;
  color: var(--s-slate);
}

.rbs-article__figure { margin: 0; padding-top: var(--s-5); }
.rbs-article__figure img { display: block; width: 100%; height: auto; }

.rbs-prose {
  width: min(var(--s-copy), calc(100% - 48px));
  margin-inline: auto;
}
.rbs-article__body { padding: var(--s-5) 0 var(--s-4); }
.rbs-prose {
  font-size: 19px;
  line-height: 1.65;
  color: var(--s-ink);
}
.rbs-prose > * + * { margin-top: 1.25em; }
.rbs-prose h2 {
  margin-top: 2em;
  font-size: clamp(26px, 2.6vw, 32px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--s-navy);
}
.rbs-prose h3 { margin-top: 1.6em; font-size: 22px; font-weight: 700; line-height: 1.3; color: var(--s-navy); }
.rbs-prose h4 { font-size: 18px; font-weight: 700; }
.rbs-prose p { margin-bottom: 0; }
.rbs-prose a { color: var(--s-purple); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.rbs-prose a:hover { text-decoration-thickness: 2px; }
.rbs-prose strong { font-weight: 700; color: var(--s-navy); }
.rbs-prose ul, .rbs-prose ol { padding-left: 1.3em; }
.rbs-prose li + li { margin-top: .4em; }
.rbs-prose blockquote {
  margin: 2em 0;
  padding: 4px 0 4px 24px;
  border-left: 4px solid var(--s-lime);
  font-size: 23px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--s-navy);
}
.rbs-prose blockquote p { margin: 0; }
.rbs-prose blockquote cite { display: block; margin-top: .6em; font-size: 15px; font-weight: 500; font-style: normal; color: var(--s-slate); }
.rbs-prose hr { border: 0; border-top: 1px solid var(--s-rule); margin: 2.5em 0; }
.rbs-prose figure { margin: 2em 0; }
.rbs-prose img { max-width: 100%; height: auto; }
.rbs-prose figcaption { margin-top: .6em; font-size: 14px; color: var(--s-slate); }
.rbs-prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.rbs-prose th, .rbs-prose td { padding: 12px 10px; border-bottom: 1px solid var(--s-rule); text-align: left; vertical-align: top; }
.rbs-prose th { font-weight: 700; color: var(--s-navy); border-bottom-color: var(--s-navy); }
.rbs-prose pre { padding: 20px; background: var(--s-mist); font-size: 15px; overflow-x: auto; }
.rbs-prose code { font-size: .9em; background: var(--s-mist); padding: .1em .35em; }
.rbs-prose pre code { background: none; padding: 0; }
.rbs-prose .alignwide { width: min(var(--s-max), calc(100vw - 48px)); margin-left: 50%; transform: translateX(-50%); }
.rbs-prose .alignfull { width: 100vw; margin-left: 50%; transform: translateX(-50%); }

.rbs-article__tags { padding-bottom: var(--s-5); font-size: 15px; color: var(--s-slate); }
.rbs-article__tags a { color: var(--s-purple); }

.rbs-related {
  padding: var(--s-5) 0 0;
  border-top: 1px solid var(--s-navy);
}
.rbs-related__title {
  margin: 0 0 var(--s-2);
  font-size: 15px;
  font-weight: 700;
  color: var(--s-slate);
}
.rbs-related__title a { color: var(--s-purple); text-decoration: none; }
.rbs-related__title a:hover { text-decoration: underline; }
.rbs-related .rbs-row__excerpt { display: none; }

.rbs-list--tail { padding-top: 0; }
.rbs-list--tail .rbs-news { margin-bottom: 0; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .rbs-lead { grid-template-columns: 1fr; gap: var(--s-2); }
  .rbs-lead__meta { flex-direction: row; flex-wrap: wrap; gap: var(--s-2); }
  .rbs-lead__meta .rbs-cat { order: -1; }
  .rbs-lead { grid-template-columns: 1fr; }
  .rbs-lead .rbs-figure { order: -1; }
  .rbs-row { grid-template-columns: 1fr auto; gap: var(--s-1) var(--s-3); }
  .rbs-row .rbs-figure { grid-column: 1 / -1; grid-row: 1; margin-bottom: var(--s-1); }
  .rbs-row__date { grid-column: 1; grid-row: 2; }
  .rbs-row__time { grid-column: 2; grid-row: 2; }
  .rbs-row__main { grid-column: 1 / -1; }
  .rbs-news { grid-template-columns: 1fr; align-items: start; }
  .rbs-news__form { justify-self: start; }
  .rbs-cta__inner { grid-template-columns: 1fr; }
  .rbs-cta .rbs-btn { justify-self: start; }
}

@media (max-width: 600px) {
  .rbs-cats { flex-wrap: nowrap; gap: 0 var(--s-3); }
  .rbs-news__form form { flex-direction: column; }
  .rbs-news__form input[type="email"] { min-width: 0; width: 100%; }
}

@media (prefers-reduced-motion: no-preference) {
  .rbs a, .rbs-btn, .rbs-more { transition: color .15s ease, background-color .15s ease, border-color .15s ease; }
}

/* ---------- guard against parent-theme defaults ----------
   OceanWP sets its own heading colors, link colors, margins and max-widths.
   These carry enough specificity to win without !important. */
main.rbs h1, main.rbs h2, main.rbs h3, main.rbs h4 { font-family: var(--s-font); margin-bottom: 0; }
main.rbs .rbs-hero__title, main.rbs .rbs-article__title { color: var(--s-navy); }
main.rbs .rbs-lead__title, main.rbs .rbs-lead__title a,
main.rbs .rbs-row__title, main.rbs .rbs-row__title a { color: var(--s-ink); }
main.rbs .rbs-news h2, main.rbs .rbs-cta h2 { color: var(--s-white); }
main.rbs .rbs-news p { color: #B9C2D6; }
main.rbs .rbs-cta__eyebrow { color: var(--s-lime); }
main.rbs a.rbs-btn, main.rbs a.rbs-btn:hover { color: var(--s-ink); }
main.rbs a.rbs-cat, main.rbs .rbs-hero__kicker a, main.rbs .rbs-article__crumb a { color: var(--s-purple); }
main.rbs a.rbs-more { color: var(--s-ink); }
main.rbs a.rbs-cats__item { color: var(--s-slate); }
main.rbs a.rbs-cats__item.is-current { color: var(--s-navy); }
main.rbs .rbs-pagination a { color: var(--s-slate); }
main.rbs p { margin-bottom: 0; }
main.rbs .rbs-inner, main.rbs .rbs-prose { max-width: none; }
