:root {
    --navy-950: #081224;
    --navy-900: #102a43;
    --navy-800: #173b62;
    --navy-700: #245381;
    --gold-500: #d8b54a;
    --gold-400: #ead07a;
    --slate-50: #f5f7fb;
    --slate-100: #e8edf5;
    --slate-200: #d7dfeb;
    --slate-400: #7a8798;
    --slate-600: #425466;
    --slate-800: #1d2b3a;
    --white: #ffffff;
    --success: #16794d;
    --warning: #9a6700;
    --error: #b42318;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 10px 30px rgba(8, 18, 36, 0.06);
    --shadow-lg: 0 28px 70px rgba(8, 18, 36, 0.12);
    --font-body: "Inter", sans-serif;
    --font-heading: "Manrope", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--slate-800);
    background: linear-gradient(180deg, #f8fbff 0%, #f3f6fb 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3,
h4 {
    margin: 0 0 0.75rem;
    font-family: var(--font-heading);
    line-height: 1.05;
    color: var(--navy-950);
}

p {
    margin: 0 0 1rem;
    color: var(--slate-600);
    line-height: 1.7;
}

.shell {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.narrow {
    width: min(760px, 100%);
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: rgba(248, 251, 255, 0.84);
    border-bottom: 1px solid rgba(23, 59, 98, 0.08);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 76px;
}

.brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.brand-logo-image {
    display: block;
    width: auto;
    height: clamp(42px, 5vw, 60px);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-links a {
    color: var(--slate-600);
    font-weight: 600;
}

.nav-toggle {
    display: none;
    border: 0;
    background: transparent;
    font-size: 1.5rem;
}

.page-main {
    min-height: calc(100vh - 76px);
}

.section {
    padding: 4.5rem 0;
}

.section-soft {
    background: linear-gradient(180deg, rgba(234, 240, 248, 0.7), rgba(245, 247, 251, 0.95));
}

.hero {
    padding: 5rem 0 4rem;
}

.hero-grid,
.two-column,
.auth-grid,
.feature-grid,
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.hero-copy {
    max-width: 62ch;
    font-size: 1.05rem;
}

.hero-card {
    padding: 1.5rem;
    background: linear-gradient(160deg, rgba(16, 42, 67, 0.97), rgba(23, 59, 98, 0.92));
    color: var(--white);
}

.hero-card .stat-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-card .stat-card span,
.hero-card .stat-card strong {
    color: var(--white);
}

.section-heading {
    margin-bottom: 1.5rem;
}

.row-between {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--navy-700);
}

.card,
.stat-card,
.alert {
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(23, 59, 98, 0.08);
}

.card {
    padding: 1.35rem;
}

.card-grid,
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.stat-card {
    padding: 1.1rem;
}

.stat-card strong {
    display: block;
    margin-bottom: 0.35rem;
    font-family: var(--font-heading);
    font-size: 1.6rem;
}

.stat-card span,
.muted {
    color: var(--slate-400);
}

.button-row,
.meta-row,
.form-links,
.inline-checks,
.list-row {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 1rem;
    border-radius: 999px;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
}

.button-primary {
    background: var(--navy-950);
    color: var(--white);
}

.button-secondary {
    background: transparent;
    color: var(--navy-950);
    border-color: rgba(16, 42, 67, 0.12);
}

.button-danger {
    background: rgba(180, 35, 24, 0.1);
    color: var(--error);
    border-color: rgba(180, 35, 24, 0.2);
}

.button-sm {
    min-height: 38px;
    padding: 0 0.85rem;
    font-size: 0.9rem;
}

.badge {
    display: inline-flex;
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(216, 181, 74, 0.15);
    color: var(--navy-900);
    font-size: 0.78rem;
    font-weight: 800;
}

.stack-sm > * + *,
.stack-lg > * + * {
    margin-top: 0.85rem;
}

.stack-lg > * + * {
    margin-top: 1.2rem;
}

.form-panel {
    display: grid;
    gap: 1rem;
}

.form-row {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.inline-form {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

label span {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--navy-900);
    font-weight: 700;
}

.input {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(16, 42, 67, 0.15);
    background: #fbfcfe;
    font: inherit;
}

textarea.input {
    resize: vertical;
}

.alert {
    padding: 0.95rem 1rem;
    margin-bottom: 1rem;
}

.alert-success {
    border-left: 4px solid var(--success);
}

.alert-warning {
    border-left: 4px solid var(--warning);
}

.alert-error {
    border-left: 4px solid var(--error);
}

.alert-info {
    border-left: 4px solid var(--navy-700);
}

.flash-stack {
    padding-top: 1rem;
}

.auth-shell {
    padding-top: 3rem;
}

.auth-brand {
    background: linear-gradient(150deg, rgba(16, 42, 67, 0.98), rgba(36, 83, 129, 0.9));
    color: var(--white);
}

.auth-brand h1,
.auth-brand p,
.auth-brand .eyebrow {
    color: var(--white);
}

.practice-app {
    max-width: 860px;
}

.question-card {
    display: grid;
    gap: 1rem;
}

.option-list {
    display: grid;
    gap: 0.75rem;
}

.option-button {
    width: 100%;
    text-align: left;
    border: 1px solid rgba(16, 42, 67, 0.12);
    background: var(--white);
    padding: 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font: inherit;
}

.option-button.selected {
    border-color: var(--navy-700);
    background: rgba(36, 83, 129, 0.08);
}

.option-button.correct {
    border-color: var(--success);
    background: rgba(22, 121, 77, 0.08);
}

.option-button.incorrect {
    border-color: var(--error);
    background: rgba(180, 35, 24, 0.08);
}

.timer {
    display: inline-flex;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgba(216, 181, 74, 0.18);
    color: var(--navy-950);
    font-weight: 800;
}

.progress {
    height: 12px;
    background: var(--slate-100);
    border-radius: 999px;
    overflow: hidden;
}

.progress > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--navy-700), var(--gold-500));
}

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.85rem;
    text-align: left;
    border-bottom: 1px solid rgba(16, 42, 67, 0.08);
    vertical-align: top;
}

.status-ok {
    color: var(--success);
    font-weight: 800;
}

.status-warn {
    color: var(--warning);
    font-weight: 800;
}

.code-block {
    padding: 1rem;
    border-radius: var(--radius-md);
    background: var(--navy-950);
    color: var(--white);
    overflow-x: auto;
}

.site-footer {
    padding: 2rem 0 1.25rem;
    background: var(--navy-950);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1.5rem;
}

.site-footer h4,
.site-footer p,
.site-footer a,
.footer-brand,
.footer-bottom {
    color: rgba(255, 255, 255, 0.82);
}

.site-footer a {
    display: block;
    margin-top: 0.4rem;
}

.footer-bottom {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 1.5rem;
}

.prose h1 {
    margin-bottom: 1rem;
}

@media (max-width: 920px) {
    .hero-grid,
    .two-column,
    .auth-grid,
    .feature-grid,
    .dashboard-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 76px;
        left: 1rem;
        right: 1rem;
        background: var(--white);
        padding: 1rem;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
        flex-direction: column;
        align-items: stretch;
    }

    .nav-links.is-open {
        display: flex;
    }
}

.base-inline-logout-form {
  display: inline-flex;
}

.footer-tagline {
  color: var(--gray-400);
  margin-bottom: 1rem;
}

.footer-copyright {
  color: var(--gray-500);
  font-size: 0.875rem;
}

.link-primary {
  color: var(--primary-600);
}

.btn-full {
  width: 100%;
}

.text-white {
  color: white;
}
