:root {
    --r4-bg: #f6f7fb;
    --r4-panel: #ffffff;
    --r4-text: #1b1f2a;
    --r4-muted: #657085;
    --r4-primary: #2f65ff;
    --r4-border: #dfe4ef;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--r4-bg);
    color: var(--r4-text);
}
a { color: inherit; }
.r4-container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.r4-narrow { max-width: 820px; }
.r4-site-header, .r4-site-footer { background: var(--r4-panel); border-bottom: 1px solid var(--r4-border); }
.r4-site-footer { border-top: 1px solid var(--r4-border); border-bottom: 0; padding: 24px 0; margin-top: 40px; color: var(--r4-muted); }
.r4-header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.r4-brand { font-weight: 800; text-decoration: none; font-size: 24px; }
.r4-nav { display: flex; gap: 18px; }
.r4-nav a { text-decoration: none; color: var(--r4-muted); }
.r4-jumbotron { padding: 72px 0; background: linear-gradient(135deg, #ffffff, #eaf0ff); border-bottom: 1px solid var(--r4-border); }
.r4-jumbotron-center { text-align: center; }
.r4-jumbotron h1 { margin: 0 0 16px; font-size: clamp(36px, 6vw, 64px); line-height: 1; }
.r4-jumbotron p { font-size: 20px; color: var(--r4-muted); }
.r4-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 12px !important; font-weight: 700; color: var(--r4-primary) !important; }
.r4-section { padding: 42px 0; }
.r4-grid { display: grid; gap: 22px; }
.r4-grid-1 { grid-template-columns: 1fr; }
.r4-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.r4-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.r4-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.r4-card { background: var(--r4-panel); border: 1px solid var(--r4-border); border-radius: 18px; overflow: hidden; box-shadow: 0 10px 30px rgba(21, 28, 48, .06); }
.r4-card-feature { border-color: rgba(47, 101, 255, .45); background: linear-gradient(180deg, #ffffff, #eef3ff); }
.r4-card-img { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.r4-card-body { padding: 22px; }
.r4-card h2 { margin: 0 0 10px; }
.r4-card p { color: var(--r4-muted); line-height: 1.55; }
.r4-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border-radius: 999px; background: #edf1f8; color: var(--r4-text); text-decoration: none; font-weight: 700; }
.r4-btn-primary { background: var(--r4-primary); color: white; }
.r4-alert { margin: 20px 0; padding: 16px; border-radius: 14px; background: var(--r4-panel); border: 1px solid var(--r4-border); }
.r4-alert p { margin-bottom: 0; }
.r4-carousel { display: flex; gap: 20px; overflow-x: auto; padding: 10px 0 20px; }
.r4-carousel-slide { min-width: 280px; background: var(--r4-panel); border: 1px solid var(--r4-border); border-radius: 16px; padding: 16px; }
.r4-carousel-slide img { width: 100%; border-radius: 12px; display: block; }
@media (max-width: 800px) {
    .r4-grid-2, .r4-grid-3, .r4-grid-4 { grid-template-columns: 1fr; }
    .r4-header-inner { align-items: flex-start; flex-direction: column; gap: 10px; padding-top: 15px; padding-bottom: 15px; }
}

.r4-error-page {
    padding: 70px 0;
}

.r4-card-meta {
    margin: 0 0 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.72;
}

.r4-footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    align-items: center;
    justify-content: space-between;
}

.r4-footer-link {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
}

.r4-footer-link:hover {
    text-decoration: underline;
}

/* Layout used when a controller explicitly asks for sidebar content. */
.r4-layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
    padding-top: 34px;
    padding-bottom: 34px;
}

.r4-layout-sidebar {
    position: sticky;
    top: 18px;
}

.r4-layout-sidebar .r4-card {
    margin-bottom: 18px;
}

@media (max-width: 900px) {
    .r4-layout-with-sidebar {
        grid-template-columns: 1fr;
    }

    .r4-layout-sidebar {
        position: static;
    }
}
