:root {
    --navy: #0b2447;
    --blue: #0f6db5;
    --sky: #eaf5ff;
    --green: #0f8f5f;
    --teal: #0b8f8f;
    --orange: #c76b16;
    --red: #b42318;
    --text: #1f2937;
    --muted: #64748b;
    --border: #d7e0ea;
    --bg: #f8fafc;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
}

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
}

/* Header / Navigation */
.site-header {
    background: var(--white);
    color: var(--text);
    padding: 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 6vw;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--navy);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--navy);
    color: var(--white);
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.nav-links a {
    margin-left: 18px;
    font-weight: 700;
    color: var(--navy);
    white-space: nowrap;
}

.nav-links a.active {
    color: var(--blue);
}

/* Main layout */
main {
    padding: 34px 6vw 60px;
}

section,
.section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 8px 22px rgba(15, 35, 65, 0.05);
}

.section.light {
    background: #f7fbff;
}

h1 {
    font-size: clamp(2rem, 5vw, 4.1rem);
    line-height: 1.05;
    margin: 0 0 18px;
    max-width: 1080px;
    color: var(--navy);
}

h2 {
    margin: 0 0 10px;
    color: var(--navy);
    font-size: clamp(1.45rem, 3vw, 2.1rem);
}

h3 {
    margin: 0 0 8px;
    color: var(--navy);
}

.section-subtitle,
.section-lead {
    color: var(--muted);
    margin-top: 0;
    max-width: 960px;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--navy), #0d4f8b);
    color: var(--white);
    border: 0;
    border-radius: 0;
    margin: -34px -6vw 24px;
    padding: 54px 6vw 42px;
}

.hero .container {
    max-width: 1180px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr;
    gap: 24px;
    align-items: center;
}

.hero h1 {
    color: var(--white);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.82rem;
    color: var(--blue);
    font-weight: 700;
    margin-bottom: 14px;
}

.hero .eyebrow {
    color: #b9d9ff;
}

.hero-text,
.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    max-width: 850px;
    color: var(--muted);
    margin: 0 0 26px;
}

.hero .hero-text,
.hero .hero-subtitle {
    color: #e2eefc;
}

.hero-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 16px;
    padding: 18px;
}

.hero-card h3 {
    color: var(--white);
}

.hero-card li {
    color: #e2eefc;
}

.hero-card strong {
    display: block;
    color: #fff;
}

.hero-card span {
    color: #d9e9ff;
    font-size: 0.95rem;
}

.hero-actions,
.button-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}

/* Buttons */
button,
.button,
.button-link {
    border: 0;
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 800;
    cursor: pointer;
    color: white;
    background: var(--blue);
    box-shadow: 0 4px 10px rgba(15, 109, 181, 0.2);
    display: inline-block;
}

.button.primary {
    background: var(--blue);
}

.button.secondary,
button.secondary {
    background: var(--green);
}

button.warning {
    background: var(--orange);
}

button.danger {
    background: var(--red);
}

.button-link {
    background: var(--navy);
}

.button:hover,
.button-link:hover {
    text-decoration: none;
    opacity: 0.92;
}

/* Grids and cards */
.cards-grid,
.grid-2,
.grid-3,
.grid-4 {
    display: grid;
    gap: 18px;
    margin-top: 20px;
}

.two-column,
.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-column,
.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.card {
    background: #fbfdff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
}

.card h3 {
    font-size: 1.05rem;
}

.card ol,
.card ul {
    margin-top: 1rem;
    padding-left: 1.3rem;
    line-height: 1.8;
}

.card li {
    margin-bottom: 0.35rem;
}

/* Pills */
.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.pill {
    border-radius: 999px;
    background: var(--sky);
    color: var(--navy);
    padding: 7px 11px;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Pipeline flow */
.flow {
    display: grid;
    grid-template-columns: repeat(7, minmax(110px, 1fr));
    gap: 10px;
    align-items: stretch;
    margin-top: 22px;
}

.flow-step {
    background: var(--sky);
    border: 1px solid #bdd7f0;
    border-radius: 13px;
    padding: 14px 12px;
    min-height: 104px;
    position: relative;
}

.flow-step:not(:last-child)::after {
    content: "→";
    position: absolute;
    right: -15px;
    top: 40%;
    font-weight: 900;
    color: var(--blue);
}

.flow-step strong {
    display: block;
    color: var(--navy);
    margin-bottom: 5px;
}

.flow-step span {
    color: var(--muted);
    font-size: 0.9rem;
}

/* Scope cards */
.include {
    border-left: 6px solid var(--green);
}

.exclude {
    border-left: 6px solid var(--red);
}

ul {
    margin: 10px 0 0 20px;
    padding: 0;
}

li {
    margin: 6px 0;
}

/* Code / output */
pre {
    background: #0f172a;
    color: #d1fae5;
    border-radius: 14px;
    padding: 16px;
    overflow-x: auto;
    min-height: 110px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 12px;
    font-size: 0.95rem;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--navy);
    color: white;
}

tr:nth-child(even) td {
    background: #f4f7fb;
}

.small {
    color: var(--muted);
    font-size: 0.9rem;
}

/* Live Stats page hero readability fix */
.live-hero,
.stats-hero {
    background: linear-gradient(135deg, var(--navy), #0d4f8b);
    color: #ffffff;
    border: 0;
    border-radius: 0;
    margin: -34px -6vw 24px;
    padding: 54px 6vw 42px;
}

.live-hero h1,
.stats-hero h1 {
    color: #ffffff;
}

.live-hero .eyebrow,
.stats-hero .eyebrow {
    color: #b9d9ff;
}

.live-hero .hero-text,
.live-hero .hero-subtitle,
.stats-hero .hero-text,
.stats-hero .hero-subtitle {
    color: #e2eefc;
}

/* Footer */
.site-footer,
footer {
    padding: 28px 6vw;
    color: var(--muted);
    border-top: 1px solid var(--border);
    background: #ffffff;
}

/* Responsive */
@media (max-width: 1100px) {
    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .flow {
        grid-template-columns: 1fr;
    }

    .flow-step:not(:last-child)::after {
        content: "↓";
        right: 50%;
        top: auto;
        bottom: -22px;
    }
}

@media (max-width: 900px) {
    .hero-grid,
    .two-column,
    .three-column,
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .navbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .nav-links a {
        margin-left: 0;
        margin-right: 14px;
    }
}

@media (max-width: 760px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .navbar {
        position: static;
    }
}