* {
    box-sizing: border-box;
}

:root {
    --bg: #f5f0e8;
    --bg-soft: rgba(255, 255, 255, 0.72);
    --surface: rgba(255, 255, 255, 0.86);
    --surface-strong: #ffffff;
    --text: #1f2a1f;
    --muted: #5f6c60;
    --line: rgba(31, 42, 31, 0.12);
    --accent: #1f7a4c;
    --accent-strong: #0d5e38;
    --accent-soft: #d9efe3;
    --shadow: 0 18px 50px rgba(38, 54, 40, 0.10);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(207, 235, 221, 0.85), transparent 32%),
        linear-gradient(180deg, #fbf8f2 0%, var(--bg) 100%);
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.page-shell {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 40px;
}

.site-header,
.site-footer,
.card,
.hero-panel,
.toolbar,
.slider-panel,
.notice,
.empty-state,
.data-table,
.auth-card {
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
}

.site-header,
.site-footer,
.card,
.hero-panel,
.toolbar,
.slider-panel,
.notice,
.empty-state,
.data-table,
.auth-card,
.form-card {
    border-radius: 20px;
}

.site-header {
    padding: 20px;
    position: sticky;
    top: 16px;
    z-index: 10;
}

.brand-row,
.site-nav,
.hero,
.metric-grid,
.feature-grid,
.list-grid,
.section-heading,
.toolbar,
.toolbar-actions,
.slider-panel,
.stats-grid,
.inline-options {
    display: flex;
    gap: 16px;
}

.brand-row,
.toolbar,
.slider-panel {
    align-items: center;
    justify-content: space-between;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.brand-mark img {
    width: 58px;
    height: 58px;
}

.brand-mark strong {
    display: block;
    font-size: 1.15rem;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 4px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.partner-logos {
    display: flex;
    gap: 10px;
}

.partner-logos img {
    width: 92px;
    height: 44px;
}

.site-nav {
    flex-wrap: wrap;
    margin-top: 18px;
}

.site-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--muted);
    transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    background: var(--accent-soft);
    color: var(--accent-strong);
    transform: translateY(-1px);
}

.site-nav .nav-accent {
    background: var(--accent);
    color: #ffffff;
}

.content {
    padding-top: 28px;
}

.hero {
    align-items: stretch;
    gap: 24px;
}

.hero-copy,
.hero-panel {
    flex: 1;
    min-width: 0;
}

.hero-copy {
    padding: 12px 0;
}

.hero-copy h1,
.section-heading h1,
.auth-card h1 {
    margin: 0 0 14px;
    font-size: clamp(2.2rem, 4vw, 4.3rem);
    line-height: 0.98;
}

.hero-copy p,
.section-heading p,
.auth-card p,
.muted {
    color: var(--muted);
}

.hero-panel {
    padding: 24px;
}

.panel-label {
    margin: 0 0 16px;
    color: var(--muted);
}

.metric-grid,
.feature-grid,
.list-grid,
.stats-grid {
    flex-wrap: wrap;
}

.metric-grid {
    gap: 14px;
}

.metric-card {
    flex: 1 1 140px;
    min-height: 112px;
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, var(--surface-strong), rgba(255, 255, 255, 0.7));
    border: 1px solid rgba(31, 42, 31, 0.08);
}

.metric-card span,
.metric-card strong {
    display: block;
}

.metric-card strong {
    margin-top: 14px;
    font-size: 2rem;
}

.hero-actions,
.feature-grid,
.list-grid,
.stats-grid {
    margin-top: 20px;
}

.button,
button,
input,
select {
    font: inherit;
}

.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.button:hover,
button:hover,
.button:focus-visible,
button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(31, 122, 76, 0.12);
}

.button.primary,
button.primary {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.section {
    margin-top: 28px;
}

.section.compact {
    margin-top: 12px;
}

.section-heading {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.section-heading h1,
.section-heading h2,
.card h2,
.card h3 {
    margin: 0;
}

.feature-grid .card,
.stats-grid .card,
.list-grid .card {
    flex: 1 1 280px;
}

.card {
    padding: 22px;
    transition: transform 180ms ease, border-color 180ms ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(31, 122, 76, 0.24);
}

.chip {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 0.85rem;
}

.scoreline {
    margin: 14px 0 8px;
    font-size: 2rem;
    font-weight: 700;
}

.toolbar,
.slider-panel {
    flex-wrap: wrap;
    padding: 18px;
    margin-bottom: 18px;
}

.toolbar label,
.stack-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 180px;
    flex: 1 1 180px;
}

input,
select {
    min-height: 46px;
    width: 100%;
    padding: 0 14px;
    border: 1px solid rgba(31, 42, 31, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
}

input[type="range"] {
    padding: 0;
}

.toolbar-actions {
    align-items: flex-end;
    flex-wrap: wrap;
}

.data-table {
    overflow: hidden;
}

.table-head,
.table-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 16px 18px;
}

.table-head {
    background: rgba(31, 122, 76, 0.08);
    font-weight: 700;
}

.table-row:nth-child(even) {
    background: rgba(255, 255, 255, 0.5);
}

.compact-table .table-head,
.compact-table .table-row {
    padding: 12px 14px;
}

.team-score-head,
.team-score-row {
    grid-template-columns: 1.8fr repeat(4, minmax(0, 1fr));
}

.empty-state,
.notice {
    padding: 18px 20px;
}

.notice.success {
    border-color: rgba(31, 122, 76, 0.22);
    background: rgba(217, 239, 227, 0.86);
}

.notice.error {
    border-color: rgba(170, 58, 58, 0.18);
    background: rgba(253, 233, 233, 0.9);
}

.auth-shell {
    min-height: 70vh;
    display: grid;
    place-items: center;
}

.auth-card,
.form-card {
    width: min(560px, 100%);
    padding: 28px;
}

.stack-form {
    display: grid;
    gap: 16px;
}

.form-footnote {
    margin-top: 16px;
}

.inline-options {
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
    padding: 0;
    border: 0;
}

.inline-options legend {
    width: 100%;
    margin-bottom: 10px;
    font-weight: 600;
}

.inline-options label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: auto;
}

.inline-options input {
    width: auto;
    min-height: auto;
}

.slider-copy p,
.slider-copy strong {
    margin: 0;
}

.slider-control {
    min-width: 220px;
}

.site-footer {
    margin-top: 28px;
    padding: 20px;
    color: var(--muted);
}

.text-link {
    color: var(--accent-strong);
    text-decoration: none;
    font-weight: 600;
}

code {
    font-family: Consolas, monospace;
}

@media (max-width: 900px) {
    .hero {
        flex-direction: column;
    }

    .brand-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .page-shell {
        width: min(100% - 20px, 1160px);
    }

    .site-header {
        position: static;
    }

    .hero-copy h1,
    .section-heading h1,
    .auth-card h1 {
        font-size: 2.2rem;
    }

    .table-head,
    .table-row {
        grid-template-columns: 1fr;
    }

    .team-score-head,
    .team-score-row {
        grid-template-columns: 1fr;
    }

    .partner-logos {
        flex-wrap: wrap;
    }

    .partner-logos img {
        width: 80px;
    }
}
