/* ═══════════════════════════════════════════════════════════════
   RefreshBalance — Calculator Design System v2.0
   Premium animated UI — all 225 calculators share this stylesheet
═══════════════════════════════════════════════════════════════ */

/* ── Google Fonts ────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800;900&display=swap');

/* ── Design Tokens ───────────────────────────────────────────── */
:root {
    --rb-green: #16a34a;
    --rb-teal: #0d9488;
    --rb-blue: #2563eb;
    --rb-purple: #7c3aed;
    --rb-amber: #d97706;
    --rb-red: #dc2626;
    --rb-indigo: #4338ca;
    --rb-rose: #e11d48;
    --rb-cyan: #0891b2;

    --rb-slate: #1e293b;
    --rb-mid: #475569;
    --rb-light: #94a3b8;
    --rb-border: #e2e8f0;
    --rb-surface: #f8fafc;
    --rb-white: #ffffff;

    --rb-radius: 1.25rem;
    --rb-shadow: 0 4px 24px rgba(0, 0, 0, .07);
    --rb-shadow-lg: 0 12px 40px rgba(0, 0, 0, .12);
    --rb-font: 'Inter', system-ui, sans-serif;
    --rb-head: 'Plus Jakarta Sans', 'Inter', sans-serif;

    /* Hero colour map */
    --hero-green: linear-gradient(135deg, #14532d, #16a34a);
    --hero-teal: linear-gradient(135deg, #134e4a, #0d9488);
    --hero-blue: linear-gradient(135deg, #1e3a8a, #2563eb);
    --hero-purple: linear-gradient(135deg, #4c1d95, #7c3aed);
    --hero-amber: linear-gradient(135deg, #78350f, #d97706);
    --hero-red: linear-gradient(135deg, #7f1d1d, #dc2626);
    --hero-indigo: linear-gradient(135deg, #312e81, #4338ca);
    --hero-rose: linear-gradient(135deg, #881337, #e11d48);
    --hero-cyan: linear-gradient(135deg, #164e63, #0891b2);
}

/* ── Base reset ──────────────────────────────────────────────── */
.rb-calc-wrap {
    font-family: var(--rb-font);
    color: var(--rb-slate);
}

.rb-calc-wrap *,
.rb-calc-wrap *::before,
.rb-calc-wrap *::after {
    box-sizing: border-box;
}

/* ════════════════════════════════════════════════════════════════
   HERO SECTION
════════════════════════════════════════════════════════════════ */
.rb-hero {
    position: relative;
    padding: 4rem 2rem 5rem;
    text-align: center;
    overflow: hidden;
    border-radius: 0 0 2rem 2rem;
    background: var(--hero-green);
    color: #fff;
}

/* Dynamic hero backgrounds per colour token */
.rb-hero--green {
    background: var(--hero-green);
}

.rb-hero--teal {
    background: var(--hero-teal);
}

.rb-hero--blue {
    background: var(--hero-blue);
}

.rb-hero--purple {
    background: var(--hero-purple);
}

.rb-hero--amber {
    background: var(--hero-amber);
}

.rb-hero--red {
    background: var(--hero-red);
}

.rb-hero--indigo {
    background: var(--hero-indigo);
}

.rb-hero--rose {
    background: var(--hero-rose);
}

.rb-hero--cyan {
    background: var(--hero-cyan);
}

/* Animated orbs in hero */
.rb-hero::before,
.rb-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: .18;
    animation: rbOrb 8s ease-in-out infinite alternate;
}

.rb-hero::before {
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, .5);
    top: -80px;
    left: -60px;
}

.rb-hero::after {
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, .4);
    bottom: -60px;
    right: -40px;
    animation-delay: -4s;
}

@keyframes rbOrb {
    0% {
        transform: scale(1) translate(0, 0)
    }

    100% {
        transform: scale(1.25) translate(20px, 20px)
    }
}

.rb-hero__icon {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: .75rem;
    display: block;
    animation: rbIconPop .6s cubic-bezier(.34, 1.56, .64, 1) both;
}

@keyframes rbIconPop {
    from {
        opacity: 0;
        transform: scale(.5) rotate(-10deg);
    }

    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.rb-hero__badge {
    display: inline-block;
    background: rgba(255, 255, 255, .25);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .3rem .9rem;
    border-radius: 2rem;
    border: 1.5px solid rgba(255, 255, 255, .35);
    margin-bottom: 1rem;
    animation: rbFadeUp .5s .1s ease both;
}

.rb-hero__title {
    font-family: var(--rb-head);
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 900;
    line-height: 1.15;
    margin: 0 0 .75rem;
    animation: rbFadeUp .5s .2s ease both;
}

.rb-hero__tagline {
    font-size: clamp(.95rem, 2vw, 1.1rem);
    opacity: .9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    text-align: center;
    animation: rbFadeUp .5s .3s ease both;
}

@keyframes rbFadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ════════════════════════════════════════════════════════════════
   3-COLUMN AD LAYOUT
════════════════════════════════════════════════════════════════ */

/* Outer wrapper: left-ad | calculator | right-ad */
.rb-calc-outer {
    display: grid;
    grid-template-columns: 160px 1fr 160px;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 1.5rem auto 3rem;
    padding: 0 1rem;
    align-items: start;
}

/* ── Prevent empty calc container from creating whitespace ── */
#rb-calc-ui:empty {
    display: none;
}

/* Center column */
.rb-calc-body {
    min-width: 0;
    /* prevent grid blowout */
    padding: 0 0.25rem;
}

/* Sidebar ad columns — desktop only */
.rb-ad-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 1.5rem;
}

.rb-ad-vertical {
    width: 160px;
    min-height: 600px;
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: sticky;
    top: 88px;
    /* below sticky nav */
}

/* Mobile square ad — shown ONLY on mobile (hidden on desktop) */
.rb-ad-mobile-square {
    display: none;
    margin: 1.5rem 0;
}

.rb-ad-square-inner {
    width: 300px;
    max-width: 100%;
    height: 250px;
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.rb-ad-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
}

/* ── Responsive: collapse sidebar ads, show mobile square ad ─── */
@media (max-width: 1100px) {
    .rb-calc-outer {
        grid-template-columns: 1fr;
        max-width: 800px;
    }

    .rb-ad-sidebar {
        display: none;
        /* hidden on tablet + mobile */
    }

    .rb-ad-mobile-square {
        display: flex;
        justify-content: center;
    }
}


/* ── Advertisement Slots ───────────────────────────────────── */
.rb-ad-slot {
    margin: 1.5rem 0;
    text-align: center;
    background: var(--rb-surface);
    border: 1px dashed var(--rb-border);
    border-radius: var(--rb-radius);
    padding: 1rem;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Top ad — give breathing room below hero */
.rb-ad-slot-top {
    margin-top: 2rem;
}

.rb-ad-placeholder {
    color: var(--rb-light);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── Card ──────────────────────────────────────────────────── */
.rb-card {
    background: var(--rb-white);
    border: 1.5px solid var(--rb-border);
    border-radius: var(--rb-radius);
    padding: 2rem;
    box-shadow: var(--rb-shadow);
    margin-bottom: 1.25rem;
    animation: rbCardIn .5s ease both;
}

@keyframes rbCardIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.rb-card-title {
    font-family: var(--rb-head);
    font-size: 1rem;
    font-weight: 700;
    color: var(--rb-slate);
    margin: 0 0 1.25rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* ── Unit toggle ──────────────────────────────────────────── */
.rb-unit-toggle {
    display: inline-flex;
    background: var(--rb-surface);
    border: 1.5px solid var(--rb-border);
    border-radius: 3rem;
    padding: .2rem;
    margin-bottom: 1.5rem;
    gap: .2rem;
}

.rb-unit-btn {
    padding: .5rem 1.25rem;
    border: none;
    border-radius: 3rem;
    font-family: var(--rb-font);
    font-size: .85rem;
    font-weight: 600;
    color: var(--rb-mid);
    background: transparent;
    cursor: pointer;
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
}

.rb-unit-btn.active {
    background: var(--rb-white);
    color: var(--rb-slate);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
}

/* ── Form rows ────────────────────────────────────────────── */
.rb-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 500px) {
    .rb-form-row {
        grid-template-columns: 1fr;
    }
}

.rb-field {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.rb-field label {
    font-size: .78rem;
    font-weight: 700;
    color: var(--rb-mid);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.rb-field input[type=number],
.rb-field input[type=text],
.rb-field input[type=date],
.rb-field input[type=time],
.rb-field select {
    width: 100%;
    padding: .875rem 1rem;
    border: 2px solid var(--rb-border);
    border-radius: .875rem;
    font-family: var(--rb-font);
    font-size: .95rem;
    color: var(--rb-slate);
    background: var(--rb-surface);
    transition: border-color .2s, box-shadow .2s, transform .15s;
    outline: none;
    appearance: none;
}

.rb-field input:focus,
.rb-field select:focus {
    border-color: var(--rb-green);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, .12);
    transform: translateY(-1px);
}

.rb-field input:hover,
.rb-field select:hover {
    border-color: #a3e4b7;
}

/* Input with addon (unit label) */
.rb-input-wrap {
    position: relative;
}

.rb-input-wrap input {
    padding-right: 3.5rem;
}

.rb-input-addon {
    position: absolute;
    right: .875rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .8rem;
    font-weight: 700;
    color: var(--rb-light);
    pointer-events: none;
}

/* Form block (labeled section) */
.rb-form-block {
    margin-bottom: 1.5rem;
}

.rb-label {
    display: block;
    font-size: .78rem;
    font-weight: 700;
    color: var(--rb-mid);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .875rem;
}

/* ── Option cards (sex, activity, etc.) ─────────────────── */
.rb-option-grid {
    display: grid;
    gap: .625rem;
}

.rb-option-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
}

.rb-option-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.rb-option-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 480px) {

    .rb-option-grid.cols-3,
    .rb-option-grid.cols-4 {
        grid-template-columns: 1fr 1fr;
    }
}

.rb-option {
    display: flex;
    cursor: pointer;
}

.rb-option input {
    display: none;
}

.rb-option .opt-body {
    flex: 1;
    padding: .875rem 1rem;
    border: 2px solid var(--rb-border);
    border-radius: .875rem;
    font-size: .85rem;
    font-weight: 600;
    color: var(--rb-mid);
    background: var(--rb-surface);
    text-align: center;
    transition: all .2s cubic-bezier(.4, 0, .2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
}

.rb-option .opt-body:hover {
    border-color: #86efac;
    background: #f0fdf4;
    transform: translateY(-2px);
}

.rb-option.selected .opt-body {
    border-color: var(--rb-green);
    background: #f0fdf4;
    color: #15803d;
    box-shadow: 0 4px 16px rgba(22, 163, 74, .2);
    transform: translateY(-2px);
}

/* ── Primary button ──────────────────────────────────────── */
.rb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 3rem;
    font-family: var(--rb-head);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--rb-green), #15803d);
    cursor: pointer;
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 0 6px 24px rgba(22, 163, 74, .3);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.rb-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background .2s;
}

.rb-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(22, 163, 74, .4);
}

.rb-btn:hover::after {
    background: rgba(255, 255, 255, .08);
}

.rb-btn:active {
    transform: translateY(-1px);
}

/* Colour variants */
.rb-btn--teal {
    background: linear-gradient(135deg, var(--rb-teal), #0f766e);
    box-shadow: 0 6px 24px rgba(13, 148, 136, .3);
}

.rb-btn--teal:hover {
    box-shadow: 0 10px 32px rgba(13, 148, 136, .4);
}

.rb-btn--blue {
    background: linear-gradient(135deg, var(--rb-blue), #1d4ed8);
    box-shadow: 0 6px 24px rgba(37, 99, 235, .3);
}

.rb-btn--blue:hover {
    box-shadow: 0 10px 32px rgba(37, 99, 235, .4);
}

.rb-btn--purple {
    background: linear-gradient(135deg, var(--rb-purple), #6d28d9);
    box-shadow: 0 6px 24px rgba(124, 58, 237, .3);
}

.rb-btn--purple:hover {
    box-shadow: 0 10px 32px rgba(124, 58, 237, .4);
}

.rb-btn--amber {
    background: linear-gradient(135deg, var(--rb-amber), #b45309);
    box-shadow: 0 6px 24px rgba(217, 119, 6, .3);
}

.rb-btn--amber:hover {
    box-shadow: 0 10px 32px rgba(217, 119, 6, .4);
}

.rb-btn--red {
    background: linear-gradient(135deg, var(--rb-red), #b91c1c);
    box-shadow: 0 6px 24px rgba(220, 38, 38, .3);
}

.rb-btn--red:hover {
    box-shadow: 0 10px 32px rgba(220, 38, 38, .4);
}

/* ════════════════════════════════════════════════════════════════
   RESULT SECTION
════════════════════════════════════════════════════════════════ */
.rb-result {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .5s ease, transform .5s cubic-bezier(.34, 1.2, .64, 1);
    pointer-events: none;
}

.rb-result.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ── Main metric ─────────────────────────────────────────── */
.rb-metric {
    text-align: center;
    padding: .5rem 0 1rem;
}

.rb-metric-value {
    font-family: var(--rb-head);
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 900;
    line-height: 1;
    color: var(--rb-green);
    animation: rbCountUp .6s cubic-bezier(.34, 1.2, .64, 1) both;
}

@keyframes rbCountUp {
    from {
        opacity: 0;
        transform: scale(.7);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.rb-metric-label {
    font-size: .875rem;
    color: var(--rb-light);
    margin-top: .375rem;
    font-weight: 500;
}

/* ── Result panel — hidden until .visible is added by JS ─── */
.rb-result {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height .5s ease, opacity .35s ease;
    /* pointer-events off while hidden so tab-order stays clean */
    pointer-events: none;
}

.rb-result.visible {
    max-height: 9999px;
    /* large enough for any result */
    opacity: 1;
    pointer-events: auto;
    margin-top: 1.5rem;
}

/* ── Stat grid ───────────────────────────────────────────── */
.rb-stat-grid {
    display: grid;
    gap: .75rem;
}

.rb-stat-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
}

.rb-stat-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.rb-stat-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 500px) {

    .rb-stat-grid.cols-3,
    .rb-stat-grid.cols-4 {
        grid-template-columns: 1fr 1fr;
    }
}

.rb-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.25rem .875rem;
    background: var(--rb-surface);
    border: 1.5px solid var(--rb-border);
    border-radius: var(--rb-radius);
    gap: .2rem;
    transition: transform .2s, box-shadow .2s;
    animation: rbStatPop .4s cubic-bezier(.34, 1.3, .64, 1) both;
}

.rb-stat:nth-child(1) {
    animation-delay: .05s;
}

.rb-stat:nth-child(2) {
    animation-delay: .1s;
}

.rb-stat:nth-child(3) {
    animation-delay: .15s;
}

.rb-stat:nth-child(4) {
    animation-delay: .2s;
}

@keyframes rbStatPop {
    from {
        opacity: 0;
        transform: scale(.85) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.rb-stat:hover {
    transform: translateY(-3px);
    box-shadow: var(--rb-shadow);
}

/* Colour tinted stat variants */
.rb-stat.green {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.rb-stat.teal {
    background: #f0fdfa;
    border-color: #99f6e4;
}

.rb-stat.blue {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.rb-stat.purple {
    background: #faf5ff;
    border-color: #e9d5ff;
}

.rb-stat.amber {
    background: #fffbeb;
    border-color: #fde68a;
}

.rb-stat.red {
    background: #fef2f2;
    border-color: #fecaca;
}

.rb-stat.indigo {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.rb-stat.rose {
    background: #fff1f2;
    border-color: #fecdd3;
}

.rb-stat.cyan {
    background: #ecfeff;
    border-color: #a5f3fc;
}

.stat-val {
    font-family: var(--rb-head);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--rb-slate);
    line-height: 1;
}

.stat-lbl {
    font-size: .75rem;
    font-weight: 700;
    color: var(--rb-mid);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.stat-sub {
    font-size: .7rem;
    color: var(--rb-light);
}

/* ── Triage band ─────────────────────────────────────────── */
.rb-triage {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: .875rem;
    border: 1.5px solid var(--rb-border);
    margin-top: 1rem;
    animation: rbFadeUp .4s ease both;
}

.rb-triage.green {
    background: #f0fdf4;
    border-color: #86efac;
}

.rb-triage.teal {
    background: #f0fdfa;
    border-color: #5eead4;
}

.rb-triage.amber {
    background: #fffbeb;
    border-color: #fcd34d;
}

.rb-triage.red {
    background: #fef2f2;
    border-color: #fca5a5;
    animation: rbUrgent 2s ease-in-out 3;
}

.rb-triage.blue {
    background: #eff6ff;
    border-color: #bfdbfe;
}

@keyframes rbUrgent {

    0%,
    100% {
        box-shadow: none;
    }

    50% {
        box-shadow: 0 0 0 6px rgba(220, 38, 38, .15);
    }
}

.rb-triage-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: .3rem;
    background: var(--rb-light);
    animation: rbPulseDot 2s ease-in-out infinite;
}

@keyframes rbPulseDot {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: .7;
    }
}

.rb-triage.green .rb-triage-dot {
    background: var(--rb-green);
}

.rb-triage.amber .rb-triage-dot {
    background: var(--rb-amber);
}

.rb-triage.red .rb-triage-dot {
    background: var(--rb-red);
}

.rb-triage.blue .rb-triage-dot {
    background: var(--rb-blue);
}

.rb-triage-text {
    flex: 1;
}

.rb-triage-text strong {
    display: block;
    font-size: .95rem;
    font-weight: 700;
    color: var(--rb-slate);
    margin-bottom: .25rem;
}

.rb-triage-text span {
    font-size: .85rem;
    color: var(--rb-mid);
    line-height: 1.5;
}

/* ── Alert boxes ─────────────────────────────────────────── */
.rb-alert {
    display: flex;
    gap: .875rem;
    padding: 1rem 1.25rem;
    border-radius: .875rem;
    font-size: .85rem;
    line-height: 1.6;
    color: var(--rb-mid);
    background: #fffbeb;
    border: 1.5px solid #fde68a;
    animation: rbFadeUp .4s ease both;
}

.rb-alert.green {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}

.rb-alert.blue {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.rb-alert.red {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.rb-alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.rb-alert p {
    margin: 0;
}

/* ── Progress bars ───────────────────────────────────────── */
.rb-progress-bar-wrap {
    height: 10px;
    background: var(--rb-surface);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--rb-border);
}

.rb-progress-bar {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--rb-green), #4ade80);
    transition: width .8s cubic-bezier(.4, 0, .2, 1);
    width: 0;
}

/* ── Gradient meter (BMI scale etc.) ────────────────────── */
.rb-meter {
    height: 12px;
    border-radius: 6px;
    position: relative;
    overflow: visible;
    margin: .5rem 0;
}

.rb-meter-pointer {
    position: absolute;
    top: -4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--rb-white);
    border: 3px solid var(--rb-slate);
    box-shadow: var(--rb-shadow);
    transform: translateX(-50%);
    transition: left .8s cubic-bezier(.34, 1.3, .64, 1);
}

/* ── FAQ section ─────────────────────────────────────────── */
.rb-faq {
    margin-top: 2rem;
}

.rb-faq h3 {
    font-family: var(--rb-head);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: var(--rb-slate);
}

.rb-faq details {
    border: 1.5px solid var(--rb-border);
    border-radius: .875rem;
    margin-bottom: .625rem;
    overflow: hidden;
    transition: box-shadow .2s;
}

.rb-faq details[open] {
    box-shadow: var(--rb-shadow);
    border-color: #86efac;
}

.rb-faq summary {
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    background: var(--rb-surface);
    transition: background .15s;
    user-select: none;
    -webkit-user-select: none;
}

.rb-faq summary::-webkit-details-marker {
    display: none;
}

.rb-faq summary::after {
    content: '›';
    font-size: 1.25rem;
    color: var(--rb-light);
    transition: transform .25s;
    flex-shrink: 0;
}

.rb-faq details[open] summary {
    background: #f0fdf4;
}

.rb-faq details[open] summary::after {
    transform: rotate(90deg);
}

.rb-faq .rb-faq-body {
    padding: 1rem 1.25rem;
    font-size: .875rem;
    color: var(--rb-mid);
    line-height: 1.65;
    border-top: 1px solid var(--rb-border);
    animation: rbFadeUp .25s ease;
}

/* ── Schema trust strip ──────────────────────────────────── */
.rb-trust-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: var(--rb-surface);
    border-top: 1px solid var(--rb-border);
    margin-top: 2rem;
    font-size: .78rem;
    color: var(--rb-light);
}

.rb-trust-strip span {
    display: flex;
    align-items: center;
    gap: .35rem;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 540px) {
    .rb-hero {
        padding: 3rem 1.25rem 4rem;
    }

    .rb-calc-body {
        padding: 0 .75rem;
    }

    .rb-card {
        padding: 1.5rem 1.25rem;
    }

    .rb-btn {
        padding: .875rem 1.5rem;
        font-size: .95rem;
    }

    .rb-metric-value {
        font-size: 2.5rem;
    }

    .rb-stat-grid.cols-3 {
        grid-template-columns: 1fr 1fr;
    }
}

/* ════════════════════════════════════════════════════════════════
   SEO ARTICLE CONTENT
   Applied to .rb-seo-article wrapper around the_content() output
════════════════════════════════════════════════════════════════ */

.rb-seo-article {
    font-family: var(--rb-font);
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--rb-mid);
    margin-top: 2.5rem;
}

/* Introduction paragraph — slightly larger */
.rb-seo-article>p:first-of-type {
    font-size: 1.1rem;
    color: var(--rb-slate);
    line-height: 1.75;
}

/* H2 headings */
.rb-seo-article h2,
.rb-seo-article h2.wp-block-heading {
    font-family: var(--rb-head) !important;
    font-size: 1.65rem !important;
    font-weight: 800 !important;
    color: var(--rb-slate) !important;
    margin-top: 2.5rem !important;
    margin-bottom: 1rem !important;
    letter-spacing: -0.025em !important;
    line-height: 1.25 !important;
}

/* H3 headings */
.rb-seo-article h3,
.rb-seo-article h3.wp-block-heading {
    font-family: var(--rb-head) !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: var(--rb-slate) !important;
    margin-top: 1.75rem !important;
    margin-bottom: .875rem !important;
    letter-spacing: -0.015em !important;
    line-height: 1.3 !important;
}

/* H4 headings */
.rb-seo-article h4,
.rb-seo-article h4.wp-block-heading {
    font-family: var(--rb-head) !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: var(--rb-slate) !important;
    margin-top: 1.5rem !important;
    margin-bottom: .625rem !important;
}

/* Paragraphs */
.rb-seo-article p {
    margin-bottom: 1.25rem !important;
    color: var(--rb-mid);
    line-height: 1.8;
}

/* Strong / bold text */
.rb-seo-article strong,
.rb-seo-article b {
    font-weight: 700;
    color: var(--rb-slate);
}

/* Lists */
.rb-seo-article ul,
.rb-seo-article ol {
    margin-bottom: 1.5rem !important;
    padding-left: 1.875rem !important;
}

.rb-seo-article li {
    margin-bottom: .625rem !important;
    color: var(--rb-mid);
    line-height: 1.7;
}

.rb-seo-article ul li::marker {
    color: var(--rb-green);
}

.rb-seo-article ol li::marker {
    color: var(--rb-green);
    font-weight: 700;
}

/* Links */
.rb-seo-article a {
    color: var(--rb-green);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    font-weight: 500;
    transition: color .2s, text-decoration-thickness .2s;
}

.rb-seo-article a:hover {
    color: #15803d;
    text-decoration-thickness: 2px;
}

/* Blockquote */
.rb-seo-article blockquote {
    border-left: 4px solid var(--rb-green);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: #f0fdf4;
    border-radius: 0 .75rem .75rem 0;
    font-style: italic;
    color: var(--rb-mid);
}

/* Table inside SEO article */
.rb-seo-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: .9rem;
}

.rb-seo-article th {
    background: var(--rb-surface);
    padding: .75rem 1rem;
    text-align: left;
    font-weight: 700;
    color: var(--rb-slate);
    border-bottom: 2px solid var(--rb-border);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.rb-seo-article td {
    padding: .65rem 1rem;
    border-bottom: 1px solid var(--rb-border);
    color: var(--rb-mid);
}

.rb-seo-article tr:hover td {
    background: var(--rb-surface);
}

/* WordPress block separator */
.rb-seo-article hr,
.rb-seo-article .wp-block-separator {
    border: none;
    border-top: 1px solid var(--rb-border);
    margin: 2rem 0;
}

/* Code inline */
.rb-seo-article code {
    background: var(--rb-surface);
    padding: .15em .4em;
    border-radius: .3em;
    font-size: .88em;
    font-family: 'Courier New', monospace;
    color: var(--rb-slate);
    border: 1px solid var(--rb-border);
}

/* Mobile responsive for SEO article */
@media (max-width: 540px) {
    .rb-seo-article {
        font-size: 1rem;
    }

    .rb-seo-article h2,
    .rb-seo-article h2.wp-block-heading {
        font-size: 1.4rem !important;
        margin-top: 2rem !important;
    }

    .rb-seo-article h3,
    .rb-seo-article h3.wp-block-heading {
        font-size: 1.15rem !important;
    }
}