:root {
    color-scheme: light;
    --navy: #12243a;
    --green: #087f5b;
    --green-dark: #066548;
    --ink: #1e2b3b;
    --muted: #5d6b7a;
    --line: #e1e8ed;
    --surface: #fff;
    --canvas: #f3f6f5;
    --shadow: 0 12px 34px rgb(18 36 58 / 7%);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--canvas);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    line-height: 1.6;
}

a {
    color: var(--green);
    text-underline-offset: .18em;
}

a:hover {
    color: var(--green-dark);
}

:focus-visible {
    outline: 3px solid #63c99d;
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    z-index: 1100;
    top: .5rem;
    left: .5rem;
    padding: .7rem 1rem;
    transform: translateY(-150%);
    border-radius: .65rem;
    background: var(--surface);
    color: var(--navy);
    box-shadow: var(--shadow);
}

.skip-link:focus {
    transform: translateY(0);
}

.topbar {
    background: var(--navy);
    box-shadow: 0 5px 24px rgb(18 36 58 / 12%);
}

.navbar-brand {
    letter-spacing: .035em;
}

.brand-logo {
    max-width: 180px;
    max-height: 40px;
    object-fit: contain;
}

.topbar .nav-link {
    color: rgb(255 255 255 / 82%);
}

.topbar .nav-link:hover,
.topbar .nav-link:focus-visible {
    color: #fff;
}

.topbar .dropdown-toggle {
    text-decoration: none;
}

.dropdown-menu {
    border: 1px solid var(--line);
    border-radius: .8rem;
    box-shadow: var(--shadow);
}

.dropdown-item:active {
    background: var(--green);
}

.hero {
    min-height: 340px;
    border: 1px solid #dce8e2;
    background:
        radial-gradient(ellipse at 90% 10%, rgb(8 127 91 / 10%), transparent 32%),
        linear-gradient(120deg, #fff 0%, #edf7f1 100%);
}

.eyebrow {
    color: var(--green);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .15em;
}

.green {
    color: var(--green);
}

.hero-card,
.panel,
.auth-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.hero-card,
.panel {
    padding: 24px;
}

.panel {
    transition: box-shadow .18s ease, transform .18s ease;
}

.panel:hover {
    box-shadow: 0 16px 38px rgb(18 36 58 / 10%);
}

.metric {
    margin: .25rem 0;
    color: var(--navy);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.2;
}

.section-title {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -.04em;
}

.panel h5 {
    font-weight: 750;
}

.form-control,
.form-select {
    min-height: 2.8rem;
    border-color: #d3dde5;
    border-radius: 10px;
    padding: .65rem .85rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #3ba97b;
    box-shadow: 0 0 0 .2rem rgb(8 127 91 / 16%);
}

.btn {
    border-radius: 10px;
    font-weight: 650;
}

.btn-success {
    border-color: var(--green);
    background: var(--green);
}

.btn-success:hover,
.btn-success:focus {
    border-color: var(--green-dark);
    background: var(--green-dark);
}

.auth-card {
    max-width: 520px;
    margin: 20px auto;
    padding: 28px;
}

.editor {
    min-height: 440px;
    resize: vertical;
    line-height: 1.8;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.preserve {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.reference {
    max-height: 320px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f5f8fa;
    padding: 12px;
}

.footer {
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .9rem;
}

.footer a {
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #19a875;
    box-shadow: 0 0 0 5px rgb(25 168 117 / 12%);
}

.table {
    --bs-table-color: var(--ink);
    --bs-table-border-color: var(--line);
}

.table > :not(caption) > * > * {
    padding: .8rem .6rem;
}

details summary {
    cursor: pointer;
    font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

@media (max-width: 767px) {
    .hero {
        min-height: 0;
        padding: 24px !important;
    }

    .panel,
    .auth-card,
    .hero-card {
        padding: 18px;
    }

    .editor {
        min-height: 320px;
    }
}
