/*
 * UI widgets (System/UI_Layout + System/UI_Widget). Loaded automatically when a widget is used.
 * Version 2026111900 (= System/UI_Core/Assets::UI_VERSION and upb.js VERSION; bump all three on every change).
 * Every plugin ships a copy; when several plugins render on one page only the newest copy is loaded.
 *
 * Rules:
 * - Everything is scoped to upb-* classes: nothing here restyles RISE itself (no body/.btn/.row rules).
 * - Colors, radius, shadows and spacing come from the --upb-* tokens below. RISE theme tokens
 *   (--app-*) are used when they exist, so pages follow the active RISE theme.
 * - Change the brand color per page with $layout->page([...], ["accent" => "#e11d48"]).
 * - Responsive rules use container queries: grids/columns react to the width of their parent block,
 *   so they also work inside sidebars, cards and modals.
 */

/* ==========================================================================
   1. Tokens
   ========================================================================== */

:root {
    --upb-font: var(--app-font-family, inherit);
    --upb-heading: var(--app-heading-color, #111827);
    --upb-text: var(--app-text-color, #4b5563);
    --upb-muted: var(--app-muted-color, #6b7280);
    --upb-ink: #0f172a;
    --upb-ink-contrast: #ffffff;

    --upb-surface: #ffffff;
    --upb-surface-soft: #f5f7fa;
    --upb-surface-strong: #eceff3;
    --upb-border: #e6e8eb;
    --upb-border-strong: #cfd4da;
    --upb-dark: #0f172a;

    --upb-radius-sm: 8px;
    --upb-radius: 14px;
    --upb-radius-lg: 20px;
    --upb-radius-btn: 10px;

    --upb-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
    --upb-shadow: 0 8px 24px -8px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.05);
    --upb-shadow-lg: 0 24px 48px -16px rgba(15, 23, 42, 0.24), 0 4px 12px rgba(15, 23, 42, 0.06);

    --upb-gutter: clamp(16px, 4vw, 32px);
    --upb-container-w: 1200px;
    --upb-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* accent + derived colors: also declared on .upb-page so a page accent recomputes them */
:root,
.upb-page {
    --upb-accent: #4f46e5;
    --upb-accent-2: #7c3aed;
    --upb-accent-contrast: #ffffff;
    --upb-accent-hover: color-mix(in srgb, var(--upb-accent) 85%, #000000);
    --upb-accent-soft: color-mix(in srgb, var(--upb-accent) 10%, transparent);
    --upb-accent-soft-strong: color-mix(in srgb, var(--upb-accent) 18%, transparent);
}

/* RISE dark themes */
.color-1E202D,
.color-1e202d,
.color-1d2632,
.color-1D2632 {
    --upb-ink: #ffffff;
    --upb-ink-contrast: #111827;
    --upb-surface: rgba(255, 255, 255, 0.03);
    --upb-surface-soft: rgba(255, 255, 255, 0.05);
    --upb-surface-strong: rgba(255, 255, 255, 0.08);
    --upb-border: rgba(255, 255, 255, 0.1);
    --upb-border-strong: rgba(255, 255, 255, 0.2);
    --upb-dark: #0b0d13;
}

/* text on dark/image/accent backgrounds */
.upb-on-dark {
    --upb-heading: #ffffff;
    --upb-text: rgba(255, 255, 255, 0.84);
    --upb-muted: rgba(255, 255, 255, 0.64);
    --upb-ink: #ffffff;
    --upb-ink-contrast: #0f172a;
    --upb-surface: rgba(255, 255, 255, 0.08);
    --upb-surface-soft: rgba(255, 255, 255, 0.08);
    --upb-surface-strong: rgba(255, 255, 255, 0.14);
    --upb-border: rgba(255, 255, 255, 0.16);
    --upb-border-strong: rgba(255, 255, 255, 0.32);
    color: var(--upb-text);
}

/* on an accent background the primary button turns white */
.upb-section-accent,
.upb-box-accent,
.upb-hero-accent {
    --upb-btn-primary-bg: #ffffff;
    --upb-btn-primary-fg: var(--upb-accent);
    --upb-btn-primary-hover: #f1f5f9;
}

/* ==========================================================================
   2. Base + utilities
   ========================================================================== */

.upb-page {
    background: var(--upb-page-bg, var(--upb-surface));
    font-family: var(--upb-font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--upb-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

:where([class^="upb-"], [class*=" upb-"]),
:where([class^="upb-"], [class*=" upb-"])::before,
:where([class^="upb-"], [class*=" upb-"])::after {
    box-sizing: border-box;
}

.upb-page img {
    max-width: 100%;
}

.upb-text-start {
    text-align: start;
}

.upb-text-center {
    text-align: center;
}

.upb-text-end {
    text-align: end;
}

.upb-gap-none {
    gap: 0;
}

.upb-gap-xs {
    gap: 8px;
}

.upb-gap-sm {
    gap: 12px;
}

.upb-gap-md {
    gap: 20px;
}

.upb-gap-lg {
    gap: 28px;
}

.upb-gap-xl {
    gap: clamp(32px, 4vw, 48px);
}

.upb-items-stretch {
    align-items: stretch;
}

.upb-items-start {
    align-items: flex-start;
}

.upb-items-center {
    align-items: center;
}

.upb-items-end {
    align-items: flex-end;
}

.upb-items-baseline {
    align-items: baseline;
}

.upb-justify-start {
    justify-content: flex-start;
}

.upb-justify-center {
    justify-content: center;
}

.upb-justify-end {
    justify-content: flex-end;
}

.upb-justify-between {
    justify-content: space-between;
}

.upb-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

.upb-icon svg {
    width: 1em;
    height: 1em;
    margin: 0 !important;
    stroke-width: 2;
}

.upb-icon i {
    font-size: 1em;
    line-height: 1;
}

.upb-fade-in {
    animation: upb-fade-in 0.35s var(--upb-ease);
}

@keyframes upb-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
   3. Layout
   ========================================================================== */

/* blocks whose width drives the responsive rules of their children */
.upb-cq,
.upb-container,
.upb-grid-item,
.upb-col,
.upb-sidebar-main,
.upb-sidebar-inner,
.upb-box-content,
.upb-card-body {
    container-type: inline-size;
}

.upb-container {
    width: 100%;
    max-width: var(--upb-container-w);
    margin-inline: auto;
    padding-inline: var(--upb-gutter);
}

.upb-container-narrow {
    --upb-container-w: 780px;
}

.upb-container-wide {
    --upb-container-w: 1440px;
}

.upb-container-fluid {
    --upb-container-w: none;
}

/* same widths and gutter as Bootstrap .container (RISE public topbar/footer) */
.upb-container-site {
    --upb-container-w: 100%;
}

@media (min-width: 576px) {
    .upb-container-site {
        --upb-container-w: 540px;
        padding-inline: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
    }
}

@media (min-width: 768px) {
    .upb-container-site {
        --upb-container-w: 720px;
    }
}

@media (min-width: 992px) {
    .upb-container-site {
        --upb-container-w: 960px;
    }
}

@media (min-width: 1200px) {
    .upb-container-site {
        --upb-container-w: 1140px;
    }
}

@media (min-width: 1400px) {
    .upb-container-site {
        --upb-container-w: 1320px;
    }
}

.upb-container .upb-container {
    padding-inline: 0;
}

.upb-section {
    position: relative;
    isolation: isolate;
    color: var(--upb-text);
    background-size: cover;
    background-position: center;
}

.upb-section-soft {
    background-color: var(--upb-surface-soft);
}

.upb-section-dark {
    background-color: var(--upb-dark);
}

.upb-section-accent {
    background-color: var(--upb-accent);
}

.upb-section-image {
    background-color: var(--upb-dark);
}

.upb-section-image::before,
.upb-box-image::before,
.upb-hero-has-image::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(10, 14, 26, calc(var(--upb-overlay, 0.55) * 0.75)) 0%, rgba(10, 14, 26, var(--upb-overlay, 0.55)) 100%);
}

.upb-pad-none {
    padding-block: 0;
}

.upb-pad-xs {
    padding-block: 16px;
}

.upb-pad-sm {
    padding-block: clamp(24px, 4vw, 40px);
}

.upb-pad-md {
    padding-block: clamp(48px, 7vw, 88px);
}

.upb-pad-lg {
    padding-block: clamp(64px, 10vw, 128px);
}

.upb-pad-xl {
    padding-block: clamp(88px, 13vw, 168px);
}

.upb-pad-top-none {
    padding-top: 0;
}

.upb-pad-top-xs {
    padding-top: 16px;
}

.upb-pad-top-sm {
    padding-top: clamp(24px, 4vw, 40px);
}

.upb-pad-top-md {
    padding-top: clamp(48px, 7vw, 88px);
}

.upb-pad-top-lg {
    padding-top: clamp(64px, 10vw, 128px);
}

.upb-pad-top-xl {
    padding-top: clamp(88px, 13vw, 168px);
}

.upb-pad-bottom-none {
    padding-bottom: 0;
}

.upb-pad-bottom-xs {
    padding-bottom: 16px;
}

.upb-pad-bottom-sm {
    padding-bottom: clamp(24px, 4vw, 40px);
}

.upb-pad-bottom-md {
    padding-bottom: clamp(48px, 7vw, 88px);
}

.upb-pad-bottom-lg {
    padding-bottom: clamp(64px, 10vw, 128px);
}

.upb-pad-bottom-xl {
    padding-bottom: clamp(88px, 13vw, 168px);
}

.upb-stack {
    display: flex;
    flex-direction: column;
}

.upb-stack > * {
    min-width: 0;
}

.upb-inline {
    display: flex;
    flex-wrap: wrap;
}

.upb-grid {
    display: grid;
    grid-template-columns: repeat(var(--upb-cols-xs, 1), minmax(0, 1fr));
}

@container (min-width: 480px) {
    .upb-grid {
        grid-template-columns: repeat(var(--upb-cols-sm, var(--upb-cols-xs, 1)), minmax(0, 1fr));
    }
}

@container (min-width: 720px) {
    .upb-grid {
        grid-template-columns: repeat(var(--upb-cols-md, var(--upb-cols-sm, var(--upb-cols-xs, 1))), minmax(0, 1fr));
    }
}

@container (min-width: 960px) {
    .upb-grid {
        grid-template-columns: repeat(var(--upb-cols-lg, var(--upb-cols-md, var(--upb-cols-sm, var(--upb-cols-xs, 1)))), minmax(0, 1fr));
    }
}

.upb-grid-item,
.upb-col {
    min-width: 0;
}

/* stretched grid cells: let cards fill the row height */
.upb-items-stretch > .upb-grid-item {
    display: flex;
    flex-direction: column;
}

.upb-items-stretch > .upb-grid-item > * {
    flex: 1 1 auto;
}

.upb-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

@container (min-width: 720px) {
    .upb-columns {
        grid-template-columns: var(--upb-template);
    }
}

@container (max-width: 719.98px) {
    .upb-columns-reverse > .upb-col:last-child {
        order: -1;
    }
}

.upb-sidebar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.upb-sidebar-sm {
    --upb-sidebar-w: 280px;
}

.upb-sidebar-md {
    --upb-sidebar-w: 340px;
}

.upb-sidebar-lg {
    --upb-sidebar-w: 400px;
}

@container (min-width: 960px) {
    .upb-sidebar-end {
        grid-template-columns: minmax(0, 1fr) var(--upb-sidebar-w);
    }

    .upb-sidebar-start {
        grid-template-columns: var(--upb-sidebar-w) minmax(0, 1fr);
    }

    .upb-sidebar-start > .upb-sidebar {
        order: -1;
    }

    .upb-sidebar-sticky .upb-sidebar-inner {
        position: sticky;
        top: 24px;
    }
}

.upb-sidebar-main {
    min-width: 0;
}

.upb-space {
    display: block;
    width: 100%;
}

.upb-space-none {
    height: 0;
}

.upb-space-xs {
    height: 8px;
}

.upb-space-sm {
    height: 16px;
}

.upb-space-md {
    height: clamp(24px, 4vw, 40px);
}

.upb-space-lg {
    height: clamp(40px, 6vw, 64px);
}

.upb-space-xl {
    height: clamp(56px, 9vw, 104px);
}

hr.upb-divider {
    border: 0;
    border-top: 1px solid var(--upb-border);
    opacity: 1;
    color: var(--upb-border);
    margin: 0;
}

hr.upb-divider-xs {
    margin-block: 8px;
}

hr.upb-divider-sm {
    margin-block: 16px;
}

hr.upb-divider-md {
    margin-block: clamp(24px, 4vw, 40px);
}

hr.upb-divider-lg {
    margin-block: clamp(40px, 6vw, 64px);
}

hr.upb-divider-xl {
    margin-block: clamp(56px, 9vw, 104px);
}

/* ==========================================================================
   4. Typography: headline, eyebrow, meta, prose
   ========================================================================== */

.upb-headline {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.upb-headline.upb-text-center {
    align-items: center;
}

.upb-headline.upb-text-end {
    align-items: flex-end;
}

.upb-eyebrow {
    font-size: 0.8125rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--upb-accent);
}

.upb-on-dark .upb-eyebrow {
    color: inherit;
}

.upb-headline-title {
    margin: 0;
    color: var(--upb-heading);
    font-family: inherit;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.upb-headline-sm .upb-headline-title {
    font-size: 1.375rem;
    letter-spacing: -0.01em;
}

.upb-headline-md .upb-headline-title {
    font-size: clamp(1.75rem, 3.2vw, 2.375rem);
}

.upb-headline-lg .upb-headline-title {
    font-size: clamp(2.125rem, 4.4vw, 3.125rem);
    line-height: 1.1;
}

.upb-headline-xl .upb-headline-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.upb-headline-accent .upb-headline-title::after {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    margin-top: 16px;
    border-radius: 3px;
    background: var(--upb-accent);
}

.upb-headline-accent.upb-text-center .upb-headline-title::after {
    margin-inline: auto;
}

.upb-headline-accent.upb-text-end .upb-headline-title::after {
    margin-left: auto;
}

.upb-headline-text {
    max-width: 68ch;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--upb-text);
}

.upb-headline-sm .upb-headline-text {
    font-size: 0.975rem;
}

.upb-headline-text > :last-child {
    margin-bottom: 0;
}

.upb-headline .upb-buttons {
    margin-top: 12px;
}

.upb-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    font-size: 0.8125rem;
    color: var(--upb-muted);
}

.upb-meta-item {
    display: inline-flex;
    align-items: center;
}

.upb-meta-item:not(:first-child)::before {
    content: "";
    width: 3px;
    height: 3px;
    margin-right: 10px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.7;
}

.upb-text-center .upb-meta {
    justify-content: center;
}

.upb-prose {
    color: var(--upb-text);
    font-size: 1.0625rem;
    line-height: 1.75;
    overflow-wrap: break-word;
}

.upb-prose-lg {
    font-size: 1.1875rem;
}

.upb-prose > * {
    margin-top: 0;
    margin-bottom: 0;
}

.upb-prose > * + * {
    margin-top: 1.1em;
}

.upb-prose :is(h1, h2, h3, h4, h5, h6) {
    color: var(--upb-heading);
    font-family: inherit;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.upb-prose h1 {
    font-size: 2em;
}

.upb-prose h2 {
    font-size: 1.6em;
}

.upb-prose h3 {
    font-size: 1.3em;
}

.upb-prose h4 {
    font-size: 1.1em;
}

.upb-prose > :is(h1, h2) {
    margin-top: 1.8em;
}

.upb-prose > :is(h3, h4, h5, h6) {
    margin-top: 1.5em;
}

.upb-prose > :first-child {
    margin-top: 0;
}

.upb-prose :is(h1, h2, h3, h4, h5, h6) + * {
    margin-top: 0.6em;
}

.upb-prose a {
    color: var(--upb-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.upb-prose a:hover {
    color: var(--upb-accent-hover);
}

.upb-prose :is(ul, ol) {
    padding-left: 1.4em;
}

.upb-prose li + li {
    margin-top: 0.4em;
}

.upb-prose li::marker {
    color: var(--upb-muted);
}

.upb-prose img,
.upb-prose video,
.upb-prose iframe {
    max-width: 100%;
    height: auto;
    border-radius: var(--upb-radius);
}

.upb-prose blockquote {
    padding: 0.2em 0 0.2em 1.2em;
    background: none;
    border-left: 3px solid var(--upb-accent);
    color: var(--upb-heading);
    font-size: 1.1em;
    font-style: italic;
}

.upb-prose code {
    padding: 0.15em 0.4em;
    border-radius: 6px;
    background: var(--upb-surface-soft);
    color: var(--upb-heading);
    font-size: 0.875em;
}

.upb-prose pre {
    padding: 1em 1.2em;
    border-radius: var(--upb-radius);
    background: #0f172a;
    color: #e2e8f0;
    font-size: 0.875em;
    line-height: 1.6;
    overflow-x: auto;
}

.upb-prose pre code {
    padding: 0;
    background: none;
    color: inherit;
}

.upb-prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.upb-prose :is(th, td) {
    padding: 0.6em 0.8em;
    border-bottom: 1px solid var(--upb-border);
    text-align: left;
}

.upb-prose th {
    color: var(--upb-heading);
    font-weight: 600;
}

.upb-prose hr {
    border: 0;
    border-top: 1px solid var(--upb-border);
    opacity: 1;
}

/* ==========================================================================
   5. Buttons + badges
   ========================================================================== */

.upb-btn,
.upb-btn:hover,
.upb-btn:focus {
    color: var(--upb-btn-fg);
    text-decoration: none;
}

.upb-btn {
    --upb-btn-bg: transparent;
    --upb-btn-fg: var(--upb-heading);
    --upb-btn-border: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0.75em 1.35em;
    border: 1px solid var(--upb-btn-border);
    border-radius: var(--upb-radius-btn);
    background: var(--upb-btn-bg);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s var(--upb-ease);
}

.upb-btn:hover {
    transform: translateY(-1px);
}

.upb-btn:active {
    transform: none;
}

.upb-btn:focus-visible {
    outline: 2px solid var(--upb-accent);
    outline-offset: 2px;
}

.upb-btn .upb-icon {
    font-size: 1.05em;
    transition: transform 0.2s var(--upb-ease);
}

.upb-btn:hover .upb-btn-label + .upb-icon {
    transform: translateX(3px);
}

.upb-btn-sm {
    padding: 0.55em 1em;
    font-size: 0.8125rem;
    border-radius: var(--upb-radius-sm);
}

.upb-btn-lg {
    padding: 0.9em 1.65em;
    font-size: 1.0625rem;
}

.upb-btn-pill {
    border-radius: 999px;
}

.upb-btn-block {
    display: flex;
    width: 100%;
}

.upb-btn-icon-only {
    padding: 0.75em;
}

.upb-btn-primary {
    --upb-btn-bg: var(--upb-btn-primary-bg, var(--upb-accent));
    --upb-btn-fg: var(--upb-btn-primary-fg, var(--upb-accent-contrast));
    box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--upb-accent) 70%, transparent);
}

.upb-btn-primary:hover {
    --upb-btn-bg: var(--upb-btn-primary-hover, var(--upb-accent-hover));
}

.upb-btn-secondary {
    --upb-btn-bg: var(--upb-ink);
    --upb-btn-fg: var(--upb-ink-contrast);
}

.upb-btn-secondary:hover {
    --upb-btn-bg: color-mix(in srgb, var(--upb-ink) 86%, var(--upb-ink-contrast));
}

.upb-btn-outline {
    --upb-btn-border: var(--upb-border-strong);
}

.upb-btn-outline:hover {
    --upb-btn-border: var(--upb-heading);
    --upb-btn-bg: var(--upb-surface-soft);
}

.upb-btn-soft {
    --upb-btn-bg: var(--upb-accent-soft);
    --upb-btn-fg: var(--upb-accent);
}

.upb-btn-soft:hover {
    --upb-btn-bg: var(--upb-accent-soft-strong);
}

.upb-on-dark .upb-btn-soft {
    --upb-btn-bg: rgba(255, 255, 255, 0.12);
    --upb-btn-fg: #ffffff;
}

.upb-btn-ghost:hover {
    --upb-btn-bg: var(--upb-surface-soft);
}

.upb-btn-light {
    --upb-btn-bg: #ffffff;
    --upb-btn-fg: #0f172a;
    box-shadow: var(--upb-shadow-sm);
}

.upb-btn-light:hover {
    --upb-btn-bg: #f1f5f9;
}

.upb-btn-link {
    --upb-btn-fg: var(--upb-accent);
    padding: 0;
    border: 0;
}

.upb-btn-link:hover {
    transform: none;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.upb-btn-gradient {
    --upb-btn-fg: #ffffff;
    border: 0;
    background: linear-gradient(135deg, var(--upb-accent), var(--upb-accent-2));
    box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--upb-accent-2) 70%, transparent);
}

.upb-btn-gradient:hover {
    filter: brightness(1.06);
}

.upb-btn-success {
    --upb-btn-bg: #16a34a;
    --upb-btn-fg: #ffffff;
}

.upb-btn-success:hover {
    --upb-btn-bg: #15803d;
}

.upb-btn-danger {
    --upb-btn-bg: #dc2626;
    --upb-btn-fg: #ffffff;
}

.upb-btn-danger:hover {
    --upb-btn-bg: #b91c1c;
}

.upb-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.upb-text-center .upb-buttons {
    justify-content: center;
}

.upb-badge,
a.upb-badge:hover {
    color: var(--upb-badge-fg);
    text-decoration: none;
}

.upb-badge {
    --upb-badge-c: var(--upb-badge-color, var(--upb-accent));
    --upb-badge-fg: var(--upb-badge-c);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: max-content;
    max-width: 100%;
    padding: 3px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: color-mix(in srgb, var(--upb-badge-c) 12%, transparent);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.upb-badge-solid {
    --upb-badge-fg: #ffffff;
    background: var(--upb-badge-c);
}

.upb-badge-outline {
    background: transparent;
    border-color: color-mix(in srgb, var(--upb-badge-c) 45%, transparent);
}

.upb-on-dark .upb-badge-soft:not([style]) {
    --upb-badge-fg: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

a.upb-badge:hover {
    filter: brightness(0.94);
}

.upb-text-center > .upb-badge,
.upb-text-center .upb-block-body > .upb-badge {
    margin-inline: auto;
}

/* ==========================================================================
   6. Image (+ ratios used by block/card media)
   ========================================================================== */

.upb-image {
    display: block;
    margin: 0;
}

.upb-image-inner {
    position: relative;
    overflow: hidden;
    border-radius: var(--upb-radius);
    line-height: 0;
}

.upb-image-plain .upb-image-inner {
    border-radius: 0;
}

.upb-image-shadow .upb-image-inner {
    box-shadow: var(--upb-shadow-lg);
}

.upb-image-circle .upb-image-inner {
    border-radius: 50%;
}

.upb-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

.upb-image-inner .upb-img {
    border-radius: inherit;
}

.upb-image-frame .upb-image-inner {
    padding: 8px;
    border: 1px solid var(--upb-border);
    border-radius: var(--upb-radius-lg);
    background: var(--upb-surface);
    box-shadow: var(--upb-shadow-sm);
}

.upb-image-frame .upb-img {
    border-radius: var(--upb-radius-sm);
}

.upb-image-link {
    display: block;
}

.upb-image-link .upb-img {
    transition: transform 0.6s var(--upb-ease);
}

.upb-image-link:hover .upb-img {
    transform: scale(1.03);
}

.upb-image-caption {
    margin-top: 10px;
    color: var(--upb-muted);
    font-size: 0.875rem;
    line-height: 1.5;
    text-align: center;
}

.upb-ratio-1x1 .upb-img {
    aspect-ratio: 1 / 1;
}

.upb-ratio-4x3 .upb-img {
    aspect-ratio: 4 / 3;
}

.upb-ratio-3x2 .upb-img {
    aspect-ratio: 3 / 2;
}

.upb-ratio-16x9 .upb-img {
    aspect-ratio: 16 / 9;
}

.upb-ratio-21x9 .upb-img {
    aspect-ratio: 21 / 9;
}

.upb-ratio-3x4 .upb-img {
    aspect-ratio: 3 / 4;
}

.upb-fit-contain .upb-img {
    object-fit: contain;
}

/* ==========================================================================
   7. Box
   ========================================================================== */

.upb-box {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: var(--upb-radius-lg);
    color: var(--upb-text);
    background-size: cover;
    background-position: center;
}

.upb-box-content {
    position: relative;
    width: 100%;
}

.upb-box-soft {
    background-color: var(--upb-surface-soft);
}

.upb-box-plain {
    border-radius: 0;
    overflow: visible;
}

.upb-box-bordered {
    border: 1px solid var(--upb-border);
    background-color: var(--upb-surface);
}

.upb-box-elevated {
    background-color: var(--upb-surface);
    box-shadow: var(--upb-shadow);
}

.upb-box-dark,
.upb-box-image {
    background-color: var(--upb-dark);
}

.upb-box-accent {
    background-color: var(--upb-accent);
}

.upb-box-pad-none {
    padding: 0;
}

.upb-box-pad-xs {
    padding: 12px;
}

.upb-box-pad-sm {
    padding: 20px;
}

.upb-box-pad-md {
    padding: clamp(24px, 3.5vw, 40px);
}

.upb-box-pad-lg {
    padding: clamp(32px, 5vw, 56px);
}

.upb-box-pad-xl {
    padding: clamp(40px, 7vw, 80px);
}

.upb-box-height-sm,
.upb-box-height-md,
.upb-box-height-lg {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.upb-box-height-sm {
    min-height: 280px;
}

.upb-box-height-md {
    min-height: 420px;
}

.upb-box-height-lg {
    min-height: 560px;
}

/* ==========================================================================
   8. Hero
   ========================================================================== */

.upb-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    padding-block: clamp(56px, 9vw, 112px);
    color: var(--upb-text);
    background-size: cover;
    background-position: center;
}

.upb-hero > .upb-cq {
    width: 100%;
}

.upb-hero-soft {
    background-color: var(--upb-surface-soft);
}

.upb-hero-light {
    background-color: var(--upb-surface);
}

.upb-hero-dark {
    background-color: var(--upb-dark);
}

.upb-hero-accent {
    background-color: var(--upb-accent);
}

.upb-hero-height-md {
    min-height: clamp(420px, 62vh, 600px);
}

.upb-hero-height-lg {
    min-height: clamp(480px, 82vh, 780px);
}

.upb-hero-height-full {
    min-height: 100svh;
}

.upb-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
}

.upb-hero-body {
    max-width: 760px;
    min-width: 0;
}

.upb-hero-center .upb-hero-body {
    max-width: 860px;
    margin-inline: auto;
    text-align: center;
}

.upb-hero-center .upb-buttons {
    justify-content: center;
}

@container (min-width: 880px) {
    .upb-hero-split .upb-hero-inner {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    }
}

.upb-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--upb-accent-soft);
    color: var(--upb-accent);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.upb-on-dark .upb-hero-eyebrow {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    backdrop-filter: blur(6px);
}

.upb-hero-title {
    margin: 0 0 20px;
    color: var(--upb-heading);
    font-family: inherit;
    font-size: clamp(2.25rem, 5.2vw, 4rem);
    font-weight: 750;
    line-height: 1.07;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.upb-hero-text {
    max-width: 620px;
    margin-bottom: 32px;
    color: var(--upb-text);
    font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
    line-height: 1.65;
}

.upb-hero-center .upb-hero-text {
    margin-inline: auto;
}

.upb-hero-text > :last-child {
    margin-bottom: 0;
}

.upb-hero-body > :last-child {
    margin-bottom: 0;
}

.upb-hero-media {
    min-width: 0;
}

/* ==========================================================================
   9. Block (feature item) + lead shapes
   ========================================================================== */

.upb-block {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    color: var(--upb-text);
}

.upb-block-horizontal {
    flex-direction: row;
    align-items: flex-start;
    gap: 18px;
}

.upb-block-vertical.upb-text-center {
    align-items: center;
}

.upb-block-horizontal.upb-block-middle {
    align-items: center;
}

.upb-block-lead {
    flex-shrink: 0;
    line-height: 0;
}

.upb-block-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.upb-block-title {
    margin: 0;
    color: var(--upb-heading);
    font-family: inherit;
    font-size: 1.125rem;
    font-weight: 650;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.upb-block-title-lg {
    font-size: clamp(1.25rem, 2.2vw, 1.625rem);
    line-height: 1.25;
}

.upb-block-title-xl {
    font-size: clamp(1.5rem, 3.2vw, 2.25rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.upb-block-subtitle {
    color: var(--upb-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.upb-block-text {
    font-size: 0.975rem;
    line-height: 1.65;
}

.upb-block-text > :last-child,
.upb-block-content > :last-child {
    margin-bottom: 0;
}

.upb-block-body > .upb-buttons {
    margin-top: 10px;
}

.upb-block-media {
    overflow: hidden;
    border-radius: var(--upb-radius);
    line-height: 0;
}

.upb-block-link,
.upb-block-link:hover {
    color: inherit;
    text-decoration: none;
}

.upb-block-link:hover {
    color: var(--upb-accent);
}

/* the whole block/card is clickable when it has a link */
.upb-block.upb-has-link .upb-block-link::after,
.upb-card.upb-has-link .upb-block-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.upb-has-link .upb-buttons,
.upb-has-link .upb-badge {
    position: relative;
    z-index: 2;
}

.upb-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: var(--upb-accent);
    font-size: 0.9rem;
    font-weight: 600;
}

.upb-more .upb-icon {
    transition: transform 0.2s var(--upb-ease);
}

.upb-has-link:hover .upb-more .upb-icon {
    transform: translateX(4px);
}

.upb-block-divider.upb-block-horizontal .upb-block-body {
    padding-left: 18px;
    border-left: 1px solid var(--upb-border);
}

.upb-block-divider.upb-block-vertical .upb-block-lead::after {
    content: "";
    display: block;
    width: 40px;
    height: 2px;
    margin-top: 16px;
    border-radius: 2px;
    background: var(--upb-border-strong);
}

.upb-block-divider.upb-text-center .upb-block-lead::after {
    margin-inline: auto;
}

/* stat lead */
.upb-stat-value {
    color: var(--upb-heading);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 750;
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.upb-block-lead-stat.upb-block-vertical {
    gap: 10px;
}

.upb-block-lead-stat.upb-block-horizontal .upb-block-lead {
    min-width: 3.2em;
}

/* icon / number / image lead */
.upb-lead {
    --upb-lead-size: 56px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--upb-lead-size);
    height: var(--upb-lead-size);
    overflow: hidden;
    font-size: calc(var(--upb-lead-size) * 0.42);
    line-height: 1;
}

.upb-lead-sm {
    --upb-lead-size: 40px;
}

.upb-lead-lg {
    --upb-lead-size: 72px;
}

.upb-lead-image.upb-lead-sm {
    --upb-lead-size: 48px;
}

.upb-lead-image.upb-lead-md {
    --upb-lead-size: 64px;
}

.upb-lead-image.upb-lead-lg {
    --upb-lead-size: 96px;
}

.upb-lead-number {
    font-size: 0.82em;
    font-weight: 700;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

.upb-lead img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* tones */
.upb-tone-soft {
    background: var(--upb-accent-soft);
    color: var(--upb-accent);
}

.upb-on-dark .upb-tone-soft {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.upb-tone-solid {
    background: var(--upb-accent);
    color: var(--upb-accent-contrast);
}

.upb-tone-dark {
    background: var(--upb-ink);
    color: var(--upb-ink-contrast);
}

.upb-tone-outline {
    border: 1.5px solid currentColor;
    color: var(--upb-accent);
}

.upb-tone-plain {
    overflow: visible;
    color: var(--upb-accent);
    font-size: calc(var(--upb-lead-size) * 0.56);
}

.upb-block-horizontal .upb-tone-plain {
    width: auto;
}

.upb-lead-image {
    background: var(--upb-surface-soft);
    color: inherit;
}

/* shapes */
.upb-shape-rounded {
    border-radius: 28%;
}

.upb-shape-circle {
    border-radius: 50%;
}

.upb-shape-square {
    border-radius: 4px;
}

.upb-shape-pill {
    width: calc(var(--upb-lead-size) * 1.6);
    border-radius: 999px;
}

.upb-shape-dome {
    border-radius: 999px 999px 10px 10px;
}

.upb-shape-blob {
    border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%;
}

.upb-shape-hexagon {
    clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%);
    width: calc(var(--upb-lead-size) * 1.1);
}

.upb-shape-octagon {
    clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
}

.upb-shape-pentagon {
    clip-path: polygon(50% 0, 100% 38%, 82% 100%, 18% 100%, 0 38%);
    padding-top: 8%;
}

.upb-shape-diamond {
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
    width: calc(var(--upb-lead-size) * 1.12);
    height: calc(var(--upb-lead-size) * 1.12);
}

.upb-shape-shield {
    clip-path: polygon(0 0, 100% 0, 100% 64%, 50% 100%, 0 64%);
    padding-bottom: 12%;
}

.upb-shape-star {
    clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    width: calc(var(--upb-lead-size) * 1.2);
    height: calc(var(--upb-lead-size) * 1.2);
    padding-top: 8%;
    font-size: calc(var(--upb-lead-size) * 0.3);
}

.upb-shape-tag {
    clip-path: polygon(0 0, 78% 0, 100% 50%, 78% 100%, 0 100%);
    width: calc(var(--upb-lead-size) * 1.25);
    padding-right: 14%;
}

.upb-shape-none {
    width: auto;
    height: auto;
    overflow: visible;
    background: none;
}

/* ==========================================================================
   10. Card
   ========================================================================== */

.upb-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    border-radius: var(--upb-radius-lg);
    background: var(--upb-surface);
    color: var(--upb-text);
    transition: transform 0.3s var(--upb-ease), box-shadow 0.3s var(--upb-ease), border-color 0.3s;
}

.upb-card .upb-block {
    position: static;
}

.upb-card-bordered {
    border: 1px solid var(--upb-border);
}

.upb-card-elevated {
    box-shadow: var(--upb-shadow);
}

.upb-card-soft {
    background: var(--upb-surface-soft);
}

.upb-card-flat {
    overflow: visible;
    border-radius: 0;
    background: transparent;
}

.upb-card-body {
    flex: 1 1 auto;
}

.upb-card-pad-sm .upb-card-body {
    padding: 18px;
}

.upb-card-pad-md .upb-card-body {
    padding: 24px;
}

.upb-card-pad-lg .upb-card-body {
    padding: clamp(28px, 3.5vw, 36px);
}

.upb-card-flat .upb-card-body {
    padding: 16px 0 0;
}

.upb-card-media {
    position: relative;
    overflow: hidden;
    line-height: 0;
}

.upb-card-flat .upb-card-media {
    border-radius: var(--upb-radius);
}

.upb-card-media .upb-img {
    transition: transform 0.6s var(--upb-ease);
}

.upb-card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--upb-shadow-lg);
}

.upb-card-flat.upb-card-hover:hover {
    box-shadow: none;
}

.upb-card-hover.upb-card-bordered:hover {
    border-color: var(--upb-border-strong);
}

.upb-card-hover:hover .upb-card-media .upb-img {
    transform: scale(1.04);
}

@container (min-width: 500px) {
    .upb-card-horizontal:has(> .upb-card-media) {
        flex-direction: row;
    }

    .upb-card-horizontal > .upb-card-media {
        width: 42%;
        flex-shrink: 0;
    }

    .upb-card-horizontal > .upb-card-media .upb-img {
        height: 100%;
        aspect-ratio: auto;
    }

    .upb-card-flat.upb-card-horizontal:has(> .upb-card-media) > .upb-card-body {
        align-self: center;
        padding: 0 0 0 clamp(24px, 4cqi, 48px);
    }

    .upb-card-flat.upb-card-horizontal > .upb-card-media {
        width: 52%;
    }

    .upb-card-flat.upb-card-horizontal > .upb-card-media .upb-img {
        aspect-ratio: 16 / 9;
    }
}

/* overlay: media fills the card, text sits on a dark gradient */
.upb-card-overlay {
    justify-content: flex-end;
    min-height: 340px;
    background: var(--upb-dark);
}

.upb-card-overlay > .upb-card-media {
    position: absolute;
    inset: 0;
}

.upb-card-overlay > .upb-card-media .upb-img {
    height: 100%;
    aspect-ratio: auto;
}

.upb-card-overlay > .upb-card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 14, 26, 0) 30%, rgba(10, 14, 26, 0.88) 100%);
}

.upb-card-overlay > .upb-card-body {
    position: relative;
    flex: 0 0 auto;
}

/* ==========================================================================
   11. List
   ========================================================================== */

.upb-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.upb-list > li {
    margin: 0;
}

.upb-list-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.upb-list-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.upb-list-body {
    flex: 1 1 auto;
    min-width: 0;
}

.upb-list-title {
    color: var(--upb-heading);
    font-weight: 600;
    line-height: 1.45;
}

.upb-list-text {
    margin-top: 2px;
    color: var(--upb-text);
    font-size: 0.925em;
    line-height: 1.6;
}

.upb-list-value {
    margin-left: auto;
    padding-left: 12px;
    color: var(--upb-muted);
    font-size: 0.875em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.upb-list-link,
.upb-list-link:hover {
    color: inherit;
    text-decoration: none;
}

.upb-list-item.upb-has-link .upb-list-link::after {
    content: "";
    position: absolute;
    inset: 0;
}

/* check */
.upb-list-check .upb-list-marker {
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--upb-accent-soft);
    color: var(--upb-accent);
    font-size: 13px;
}

.upb-on-dark .upb-list-check .upb-list-marker {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.upb-list-check .upb-list-title {
    font-weight: 500;
}

/* timeline */
.upb-list-timeline {
    gap: 0;
}

.upb-list-timeline .upb-list-item {
    gap: 18px;
    padding-bottom: 28px;
}

.upb-list-timeline > li:last-child .upb-list-item {
    padding-bottom: 0;
}

.upb-list-timeline > li:not(:last-child) .upb-list-item::before {
    content: "";
    position: absolute;
    top: 50px;
    bottom: 6px;
    left: 22px;
    width: 1px;
    background: var(--upb-border);
}

.upb-list-timeline .upb-list-marker {
    width: 45px;
    height: 45px;
    border: 1px solid var(--upb-border);
    border-radius: 50%;
    background: var(--upb-surface);
    box-shadow: var(--upb-shadow-sm);
    color: var(--upb-heading);
    font-size: 18px;
}

.upb-list-number {
    font-size: 0.8125rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.upb-list-timeline .upb-list-body {
    padding-top: 10px;
}

.upb-list-timeline .upb-list-title {
    font-size: 1.0625rem;
    font-weight: 650;
}

/* divided */
.upb-list-divided {
    gap: 0;
}

.upb-list-divided .upb-list-item {
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--upb-border);
}

.upb-list-divided > li:last-child .upb-list-item {
    border-bottom: 0;
}

.upb-list-divided .upb-list-title {
    font-weight: 500;
}

/* links */
.upb-list-links {
    gap: 2px;
}

.upb-list-links .upb-list-item {
    align-items: center;
    padding: 9px 12px;
    border-radius: var(--upb-radius-sm);
    transition: background-color 0.2s;
}

.upb-list-links .upb-list-marker {
    order: 3;
    margin-left: 4px;
    color: var(--upb-muted);
    font-size: 15px;
    transition: transform 0.2s var(--upb-ease);
}

.upb-list-links .upb-list-value {
    order: 2;
}

.upb-list-links .upb-list-title {
    font-weight: 500;
}

.upb-list-links .upb-list-item:hover {
    background: var(--upb-surface-soft);
}

.upb-list-links .upb-list-item:hover .upb-list-marker {
    transform: translateX(3px);
}

.upb-list-links .upb-list-item.is-active {
    background: var(--upb-accent-soft);
}

.upb-list-links .upb-list-item.is-active .upb-list-title,
.upb-list-links .upb-list-item.is-active .upb-list-marker {
    color: var(--upb-accent);
}

/* pills */
.upb-list-pills {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
}

.upb-text-center .upb-list-pills {
    justify-content: center;
}

.upb-pill,
a.upb-pill:hover {
    text-decoration: none;
}

.upb-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border: 1px solid var(--upb-border);
    border-radius: 999px;
    background: var(--upb-surface);
    color: var(--upb-text);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

a.upb-pill:hover {
    border-color: var(--upb-accent);
    color: var(--upb-accent);
}

.upb-pill.is-active,
a.upb-pill.is-active:hover {
    border-color: var(--upb-accent);
    background: var(--upb-accent);
    color: var(--upb-accent-contrast);
}

.upb-pill-count {
    color: var(--upb-muted);
    font-size: 0.9em;
}

.upb-pill.is-active .upb-pill-count {
    color: inherit;
    opacity: 0.8;
}

/* bullet */
.upb-list-bullet {
    gap: 8px;
}

.upb-list-dot {
    width: 6px;
    height: 6px;
    margin-top: 0.62em;
    border-radius: 50%;
    background: var(--upb-accent);
}

.upb-list-bullet .upb-list-title {
    font-weight: 400;
    color: var(--upb-text);
}

/* ==========================================================================
   12. Accordion (Bootstrap collapse, restyled)
   ========================================================================== */

.upb-accordion {
    --bs-accordion-bg: transparent;
    --bs-accordion-border-color: var(--upb-border);
    --bs-accordion-btn-focus-box-shadow: none;
    --bs-accordion-active-bg: transparent;
    --bs-accordion-active-color: var(--upb-heading);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upb-accordion .accordion-item {
    overflow: hidden;
    border: 1px solid var(--upb-border) !important;
    border-radius: var(--upb-radius) !important;
    background: var(--upb-surface);
    color: var(--upb-text);
}

.upb-accordion .accordion-header {
    margin: 0;
}

.upb-accordion .accordion-button {
    gap: 16px;
    padding: 18px 20px;
    border-radius: 0 !important;
    background: transparent;
    box-shadow: none !important;
    color: var(--upb-heading);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.upb-accordion .accordion-button::after {
    width: 24px;
    height: 24px;
    margin-left: auto;
    border-radius: 50%;
    background:
        linear-gradient(currentColor, currentColor) center / 10px 2px no-repeat,
        linear-gradient(currentColor, currentColor) center / 2px 10px no-repeat,
        var(--upb-surface-soft);
    color: var(--upb-accent);
    transform: none;
    transition: background-size 0.25s var(--upb-ease), background-color 0.25s;
}

.upb-accordion .accordion-button:not(.collapsed)::after {
    background:
        linear-gradient(currentColor, currentColor) center / 10px 2px no-repeat,
        linear-gradient(currentColor, currentColor) center / 2px 0 no-repeat,
        var(--upb-accent-soft);
    transform: none;
}

.upb-accordion .accordion-button:focus-visible {
    outline: 2px solid var(--upb-accent);
    outline-offset: -2px;
}

.upb-accordion .accordion-body {
    padding: 0 20px 20px;
    color: var(--upb-text);
    line-height: 1.7;
}

.upb-accordion .accordion-body > :last-child {
    margin-bottom: 0;
}

.upb-accordion-flush,
.upb-accordion-plain {
    gap: 0;
}

.upb-accordion-flush .accordion-item,
.upb-accordion-plain .accordion-item {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent;
}

.upb-accordion-flush .accordion-item {
    border-bottom: 1px solid var(--upb-border) !important;
}

.upb-accordion-flush .accordion-button,
.upb-accordion-plain .accordion-button {
    padding-inline: 0;
}

.upb-accordion-flush .accordion-body,
.upb-accordion-plain .accordion-body {
    padding-inline: 0;
}

.upb-accordion-soft .accordion-item {
    border: 0 !important;
    background: var(--upb-surface-soft);
}

.upb-accordion-soft .accordion-button::after {
    background-color: var(--upb-surface);
}

/* ==========================================================================
   13. Pricing
   ========================================================================== */

.upb-pricing {
    display: flex;
    flex-direction: column;
}

.upb-pricing-toggle {
    display: inline-flex;
    align-self: center;
    gap: 4px;
    margin-bottom: 32px;
    padding: 4px;
    border: 1px solid var(--upb-border);
    border-radius: 999px;
    background: var(--upb-surface-soft);
}

.upb-pricing-period {
    padding: 8px 20px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--upb-muted);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.upb-pricing-period:hover {
    color: var(--upb-heading);
}

.upb-pricing-period.is-active {
    background: var(--upb-surface);
    box-shadow: var(--upb-shadow-sm);
    color: var(--upb-heading);
}

.upb-plan {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    padding: clamp(24px, 3vw, 32px);
    border: 1px solid var(--upb-border);
    border-radius: var(--upb-radius-lg);
    background: var(--upb-surface);
    color: var(--upb-text);
}

.upb-plan-featured {
    border-color: var(--upb-accent);
    box-shadow: 0 0 0 1px var(--upb-accent), var(--upb-shadow-lg);
}

.upb-plan-head {
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.upb-plan-name {
    margin: 0;
    color: var(--upb-heading);
    font-family: inherit;
    font-size: 1.125rem;
    font-weight: 650;
}

.upb-plan-text {
    margin-top: -8px;
    color: var(--upb-muted);
    font-size: 0.925rem;
}

.upb-plan-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
}

.upb-plan-amount {
    color: var(--upb-heading);
    font-size: clamp(2.25rem, 4vw, 2.75rem);
    font-weight: 750;
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.upb-plan-period {
    color: var(--upb-muted);
    font-size: 0.95rem;
}

.upb-plan-features {
    flex: 1 1 auto;
    padding-top: 20px;
    border-top: 1px solid var(--upb-border);
}

.upb-plan-action {
    margin-top: auto;
}

/* ==========================================================================
   14. Slider
   ========================================================================== */

.upb-slider {
    --upb-pv: 1;
    position: relative;
}

@container (min-width: 540px) {
    .upb-slider {
        --upb-pv: min(var(--upb-per-view, 1), 2);
    }
}

@container (min-width: 900px) {
    .upb-slider {
        --upb-pv: var(--upb-per-view, 1);
    }
}

.upb-slider-gap-none {
    --upb-slider-gap: 0px;
}

.upb-slider-gap-sm {
    --upb-slider-gap: 12px;
}

.upb-slider-gap-md {
    --upb-slider-gap: 20px;
}

.upb-slider-gap-lg {
    --upb-slider-gap: 28px;
}

.upb-slider-viewport {
    overflow: hidden;
    border-radius: var(--upb-radius-lg);
}

.upb-slider-track {
    display: flex;
    margin-left: calc(var(--upb-slider-gap) * -1);
    touch-action: pan-y pinch-zoom;
}

.upb-slider-slide {
    flex: 0 0 calc(100% / var(--upb-pv));
    min-width: 0;
    padding-left: var(--upb-slider-gap);
}

.upb-slider-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--upb-shadow);
    color: #0f172a;
    font-size: 18px;
    cursor: pointer;
    transform: translateY(-50%);
    transition: opacity 0.2s, transform 0.2s var(--upb-ease);
}

.upb-slider:has(.upb-slider-dots:not([hidden])) .upb-slider-arrow {
    top: calc(50% - 18px);
}

.upb-slider-arrow:hover {
    transform: translateY(-50%) scale(1.06);
}

.upb-slider-arrow:disabled {
    opacity: 0;
    pointer-events: none;
}

.upb-slider-arrow:focus-visible {
    outline: 2px solid var(--upb-accent);
    outline-offset: 2px;
}

.upb-slider-prev {
    left: 12px;
}

.upb-slider-next {
    right: 12px;
}

.upb-slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.upb-slider-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--upb-border-strong);
    cursor: pointer;
    transition: width 0.3s var(--upb-ease), background-color 0.3s;
}

.upb-slider-dot.is-active {
    width: 24px;
    background: var(--upb-accent);
}

.upb-on-dark .upb-slider-dot.is-active {
    background: #ffffff;
}

/* ==========================================================================
   15. Showcase (filterable grid)
   ========================================================================== */

.upb-showcase-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
}

.upb-showcase-filter {
    padding: 8px 18px;
    border: 1px solid var(--upb-border);
    border-radius: 999px;
    background: transparent;
    color: var(--upb-text);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.upb-showcase-filter:hover {
    border-color: var(--upb-heading);
    color: var(--upb-heading);
}

.upb-showcase-filter.is-active {
    border-color: var(--upb-ink);
    background: var(--upb-ink);
    color: var(--upb-ink-contrast);
}

.upb-showcase-item[hidden] {
    display: none !important;
}

/* ==========================================================================
   16. Pagination, breadcrumb, search
   ========================================================================== */

.upb-pagination {
    display: flex;
}

.upb-pagination ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.upb-page-link,
a.upb-page-link:hover {
    text-decoration: none;
}

.upb-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--upb-border);
    border-radius: var(--upb-radius-btn);
    background: var(--upb-surface);
    color: var(--upb-heading);
    font-size: 0.9rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

a.upb-page-link:hover {
    border-color: var(--upb-heading);
    color: var(--upb-heading);
}

.upb-page-link.is-active {
    border-color: var(--upb-ink);
    background: var(--upb-ink);
    color: var(--upb-ink-contrast);
}

.upb-page-link.is-disabled {
    opacity: 0.4;
}

.upb-page-gap {
    padding: 0 4px;
    color: var(--upb-muted);
}

.upb-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--upb-muted);
    font-size: 0.875rem;
}

.upb-breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.upb-breadcrumb-item + .upb-breadcrumb-item::before {
    content: "/";
    opacity: 0.6;
}

.upb-breadcrumb a,
.upb-breadcrumb a:hover {
    color: var(--upb-text);
    text-decoration: none;
}

.upb-breadcrumb a:hover {
    color: var(--upb-accent);
}

.upb-breadcrumb [aria-current] {
    overflow: hidden;
    max-width: 40ch;
    color: var(--upb-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upb-text-center .upb-breadcrumb ol {
    justify-content: center;
}

.upb-search {
    --upb-search-height: 48px;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 480px;
    height: var(--upb-search-height);
    padding: 4px;
    border: 1px solid var(--upb-border);
    border-radius: 999px;
    background: var(--upb-surface);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.upb-search:focus-within {
    border-color: var(--upb-accent);
    box-shadow: 0 0 0 3px var(--upb-accent-soft);
}

.upb-search .upb-search-icon {
    width: 40px;
    height: 100%;
    color: var(--upb-muted);
    font-size: 18px;
}

.upb-search-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0 12px 0 0;
    border: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
    color: var(--upb-heading);
    font-family: inherit;
    font-size: 16px;
    line-height: 1;
    -webkit-appearance: none;
    appearance: none;
}

.upb-search-input::placeholder {
    color: var(--upb-muted);
}

.upb-search-input::-webkit-search-decoration,
.upb-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.upb-search-button {
    flex-shrink: 0;
    height: 100%;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: var(--upb-ink);
    color: var(--upb-ink-contrast);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s;
}

.upb-search-button:hover {
    background: color-mix(in srgb, var(--upb-ink) 86%, var(--upb-ink-contrast));
}

.upb-search-button:focus-visible {
    outline: 2px solid var(--upb-accent);
    outline-offset: 2px;
}

.upb-text-center .upb-search {
    margin-inline: auto;
}

/* ==========================================================================
   17. Large reading text: $layout->page([...], ["text_size" => "lg"])
       Sizes in px: RISE sets the root font size to 14px, so rem values stay small.
       Reading text = .upb-prose-lg (about 17px); everything else is sized around it.
   ========================================================================== */

.upb-text-size-lg {
    font-size: 17px;
}

.upb-text-size-lg .upb-prose {
    font-size: 17px;
}

.upb-text-size-lg .upb-headline-text {
    font-size: 18px;
}

.upb-text-size-lg .upb-headline-sm .upb-headline-title {
    font-size: 24px;
}

.upb-text-size-lg .upb-headline-sm .upb-headline-text {
    font-size: 17px;
}

.upb-text-size-lg .upb-block-title {
    font-size: 20px;
}

.upb-text-size-lg div.upb-block-title {
    font-size: 17px;
}

.upb-text-size-lg .upb-block-title-lg {
    font-size: clamp(22px, 2.4vw, 26px);
}

.upb-text-size-lg .upb-block-title-xl {
    font-size: clamp(26px, 3.4vw, 36px);
}

.upb-text-size-lg .upb-block-text {
    font-size: 17px;
    line-height: 1.65;
}

.upb-text-size-lg .upb-block-subtitle,
.upb-text-size-lg .upb-meta {
    font-size: 15px;
}

.upb-text-size-lg .upb-block-body {
    gap: 8px;
}

.upb-text-size-lg .upb-badge {
    padding: 4px 12px;
    font-size: 13px;
}

.upb-text-size-lg .upb-pill {
    padding: 8px 16px;
    font-size: 15px;
}

.upb-text-size-lg .upb-list-title {
    font-size: 17px;
}

.upb-text-size-lg .upb-list-text {
    font-size: 16px;
}

.upb-text-size-lg .upb-breadcrumb ol {
    font-size: 15px;
}

.upb-text-size-lg .upb-btn {
    font-size: 15px;
}

.upb-text-size-lg .upb-btn-sm {
    font-size: 14px;
}

.upb-text-size-lg .upb-btn-lg {
    font-size: 17px;
}

.upb-text-size-lg .upb-more {
    font-size: 15px;
}

.upb-text-size-lg .upb-search {
    --upb-search-height: 52px;
}

.upb-text-size-lg .upb-search-input {
    font-size: 16px;
}

.upb-text-size-lg .upb-search-button {
    padding: 0 22px;
    font-size: 15px;
}

.upb-text-size-lg .upb-page-link {
    min-width: 44px;
    height: 44px;
    font-size: 15px;
}

.upb-text-size-lg .upb-image-caption {
    font-size: 15px;
}

/* ==========================================================================
   18. Motion + print
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    :where([class^="upb-"], [class*=" upb-"]),
    :where([class^="upb-"], [class*=" upb-"]) * {
        transition: none !important;
        animation: none !important;
    }
}

@media print {
    .upb-slider-arrow,
    .upb-slider-dots,
    .upb-showcase-filters,
    .upb-pricing-toggle {
        display: none !important;
    }

    .upb-hero,
    .upb-section,
    .upb-box {
        background-image: none !important;
    }
}

/* ==========================================================================
   19. Page options + hero extras: standalone page, note, rating, actions, media below
   ========================================================================== */

.upb-page-standalone {
    min-height: 100vh;
}

/* RISE's mobile app bar (logged-in users) doesn't belong on a landing page */
body:has(.upb-page-standalone) #mobile-bottom-menu {
    display: none !important;
}

.upb-hero-note {
    margin-top: 16px;
    font-size: 14px;
    color: var(--upb-muted);
}

/* rating: stars (a filled copy clipped to the value over gray stars) + text; Hero rating / rating_text / rating_position */
.upb-rating {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.upb-rating-stars {
    position: relative;
    display: inline-flex;
    gap: 2px;
    color: var(--upb-border-strong);
    font-size: 15px;
    line-height: 1;
}

.upb-rating-fill {
    position: absolute;
    inset: 0 auto 0 0;
    display: inline-flex;
    gap: 2px;
    overflow: hidden;
    color: #f59e0b;
    white-space: nowrap;
}

.upb-rating-text {
    color: var(--upb-text);
    font-size: 15px;
    font-weight: 500;
}

.upb-on-dark .upb-rating-stars {
    color: rgba(255, 255, 255, 0.28);
}

.upb-hero-rating-top {
    margin-bottom: 20px;
}

.upb-hero-rating-buttons_top {
    margin-bottom: 24px;
}

.upb-hero-center .upb-rating {
    align-items: center;
}

.upb-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px 32px;
}

.upb-hero-center .upb-hero-actions {
    justify-content: center;
}

.upb-hero-center .upb-hero-rating-top {
    display: flex;
}

/* inside a hero: under centered text, or beside the text in the split layout */
.upb-hero-media-below {
    width: 100%;
    max-width: 960px;
    margin-inline: auto;
}
