:root {
    --rs-red: #c8202b;
    --rs-red-dark: #9c1820;
    --rs-charcoal: #1f2327;
    --rs-charcoal-2: #2a2f34;
    --rs-text: #2c3036;
    --rs-muted: #5d646c;
    --rs-line: #e3e6e9;
    --rs-bg: #ffffff;
    --rs-bg-soft: #f5f7f9;
    --rs-max: 1140px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    color: var(--rs-text);
    background: var(--rs-bg);
    line-height: 1.65;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    color: var(--rs-charcoal);
    line-height: 1.2;
    font-weight: 700;
    margin: 0 0 .6em;
}

h1 { font-size: 2.3rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }

a { color: var(--rs-red); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    max-width: var(--rs-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Header / Nav ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid var(--rs-line);
    box-shadow: 0 1px 6px rgba(0,0,0,.04);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 76px;
}

.brand img { display: block; height: 38px; width: auto; }

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    font-size: 1.6rem;
    color: var(--rs-charcoal);
    cursor: pointer;
    line-height: 1;
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav a, .main-nav .group > span {
    display: block;
    padding: 10px 14px;
    color: var(--rs-charcoal);
    font-size: .95rem;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
}

.main-nav a:hover { background: var(--rs-bg-soft); text-decoration: none; color: var(--rs-red); }
.main-nav a.active { color: var(--rs-red); }

.main-nav .group { position: relative; }
.main-nav .group > span::after { content: " \25BE"; color: var(--rs-muted); font-size: .75em; }

.main-nav .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 235px;
    background: #fff;
    border: 1px solid var(--rs-line);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    padding: 6px;
    display: none;
    flex-direction: column;
}

.main-nav .group:hover .submenu,
.main-nav .group:focus-within .submenu { display: flex; }

.main-nav .submenu a { font-weight: 500; }

.btn {
    display: inline-block;
    background: var(--rs-red);
    color: #fff !important;
    padding: 12px 22px;
    border-radius: 6px;
    font-weight: 700;
    border: 0;
    cursor: pointer;
    transition: background .15s ease;
}
.btn:hover { background: var(--rs-red-dark); text-decoration: none; }
.btn-ghost { background: transparent; color: #fff !important; border: 2px solid #fff; padding: 10px 20px; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(rgba(20,23,26,.78), rgba(20,23,26,.82)), var(--rs-charcoal);
    color: #fff;
    padding: 86px 0;
    text-align: center;
}
.hero h1 { color: #fff; font-size: 2.7rem; max-width: 900px; margin-left: auto; margin-right: auto; text-shadow: 0 2px 14px rgba(0,0,0,.5); }
.hero p.lead { font-size: 1.35rem; color: #f1f2f3; max-width: 760px; margin: 0 auto 1.6em; font-weight: 300; text-shadow: 0 1px 10px rgba(0,0,0,.5); }
.hero .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Page banner (interior pages) ---------- */
.page-banner { background: var(--rs-charcoal); color: #fff; padding: 56px 0; }
.page-banner .eyebrow { color: #ff8089; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; margin-bottom: .5em; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.page-banner h1 { color: #fff; margin: 0; text-shadow: 0 2px 12px rgba(0,0,0,.5); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section.alt { background: var(--rs-bg-soft); }
.section .eyebrow { color: var(--rs-red); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; margin-bottom: .5em; }
.lead { font-size: 1.2rem; color: var(--rs-muted); }
.narrow { max-width: 820px; }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
    background: #fff;
    border: 1px solid var(--rs-line);
    border-radius: 10px;
    padding: 28px;
    transition: box-shadow .15s ease, transform .15s ease;
}
.card:hover { box-shadow: 0 12px 30px rgba(0,0,0,.08); transform: translateY(-3px); }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card .more { font-weight: 700; }

.stat-row { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; text-align: center; }
.stat { flex: 1 1 200px; }
.stat .num { font-size: 2.6rem; font-weight: 800; color: var(--rs-red); line-height: 1; }
.stat .lbl { color: var(--rs-muted); font-size: .95rem; margin-top: .4em; }

.pkg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pkg { border: 1px solid var(--rs-line); border-radius: 10px; overflow: hidden; }
.pkg .pkg-head { background: var(--rs-charcoal); color: #fff; padding: 18px 22px; }
.pkg .pkg-head h3 { color: #fff; margin: 0 0 .15em; }
.pkg .pkg-head .size { color: #ff8089; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.pkg ul { margin: 0; padding: 20px 22px 22px 38px; }
.pkg li { margin-bottom: .5em; }

ul.ticks { list-style: none; padding: 0; }
ul.ticks li { padding-left: 30px; position: relative; margin-bottom: .6em; }
ul.ticks li::before { content: "\2713"; position: absolute; left: 0; color: var(--rs-red); font-weight: 800; }

.accred-row {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    padding: 30px 0;
    border-top: 1px solid var(--rs-line);
}
.accred-row:first-child { border-top: 0; padding-top: 0; }
.accred-row .accred-logo { flex: 0 0 180px; display: flex; justify-content: center; }
.accred-row .accred-logo img {
    max-height: 150px;
    max-width: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
}
.accred-row .accred-body { flex: 1; min-width: 0; }
.accred-row .accred-body p:last-child { margin-bottom: 0; }
.accred-row .approval { font-weight: 700; color: var(--rs-charcoal); }
@media (max-width: 700px) {
    .accred-row { flex-direction: column; align-items: center; gap: 18px; }
    .accred-row .accred-body { text-align: left; }
}

.policy-note {
    font-size: .9rem;
    color: var(--rs-muted);
    background: var(--rs-bg-soft);
    border: 1px solid var(--rs-line);
    border-radius: 6px;
    padding: 10px 14px;
    margin: 0 0 1.4em;
}
.policy-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 1.6em;
}
.policy-bar .ref { color: var(--rs-muted); font-size: .9rem; font-weight: 600; }
.sign-off {
    margin-top: 2.2em;
    padding-top: 1.2em;
    border-top: 1px solid var(--rs-line);
}
.sign-off .name { font-weight: 700; color: var(--rs-charcoal); font-size: 1.05rem; }
.sign-off .role { color: var(--rs-muted); }
.sign-off .date { color: var(--rs-muted); margin-top: .3em; }

.content-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--rs-line);
    margin: 0 0 1.4em;
}
figure.fig { margin: 0 0 1.6em; }
figure.fig figcaption {
    font-size: .9rem;
    color: var(--rs-muted);
    text-align: center;
    margin-top: .6em;
    font-style: italic;
}

.callout {
    border-left: 4px solid var(--rs-red);
    background: var(--rs-bg-soft);
    padding: 18px 24px;
    border-radius: 0 8px 8px 0;
    font-weight: 600;
    color: var(--rs-charcoal);
    margin: 0 0 1.2em;
}

.cta-band { background: var(--rs-charcoal); color: #fff; text-align: center; padding: 60px 0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #d6d9dc; max-width: 640px; margin: 0 auto 1.4em; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-line { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.contact-line .ic { color: var(--rs-red); font-size: 1.3rem; line-height: 1.3; }
.contact-line .lbl { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--rs-muted); }
.contact-line .val { font-size: 1.1rem; font-weight: 600; color: var(--rs-charcoal); }
.contact-line a.val { color: var(--rs-red); }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; }
.field input, .field textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--rs-line);
    border-radius: 6px;
    font: inherit;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--rs-charcoal); color: #b9bfc5; padding: 50px 0 26px; font-size: .95rem; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1em; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; }
.site-footer a { color: #cfd4d9; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: .55em; }
.footer-bottom { border-top: 1px solid #3a4046; margin-top: 36px; padding-top: 20px; text-align: center; color: #8b9197; font-size: .85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .main-nav {
        position: absolute;
        top: 76px; left: 0; right: 0;
        background: #fff;
        display: none;
        padding: 10px 0;
        box-shadow: 0 10px 24px rgba(0,0,0,.1);
        border-bottom: 1px solid var(--rs-line);
        max-height: calc(100vh - 76px);
        max-height: calc(100dvh - 76px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    .nav-toggle-cb:checked ~ .main-nav { display: block; }
    .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
    .main-nav .submenu { position: static; display: flex; box-shadow: none; border: 0; padding-left: 18px; }
    .grid-3, .grid-2, .pkg-grid, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2rem; }
    h1 { font-size: 1.9rem; }
}

/* ---------- Blazor framework UI ---------- */
h1:focus { outline: none; }
.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid { outline: 1px solid #e50000; }
.validation-message { color: #e50000; }

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

.blazor-error-boundary { background: var(--rs-red); padding: 1rem 1rem 1rem 1rem; color: white; }
.blazor-error-boundary::after { content: "An error has occurred."; }
