:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #111827;
    color: #f3f4f6;
    --background: #111827;
    --surface: #1f2937;
    --surface-soft: #253449;
    --border: #374151;
    --text-muted: #9ca3af;
    --accent: #6ee7b7;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.12), transparent 32rem),
        var(--background);
    line-height: 1.5;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: 0.75rem;
    top: -4rem;
    z-index: 10;
    border-radius: 0.4rem;
    padding: 0.7rem 1rem;
    color: #111827;
    background: #fbbf24;
}

.skip-link:focus {
    top: 0.75rem;
}

a {
    color: #6ee7b7;
}

.site-header {
    border-bottom: 1px solid rgba(107, 114, 128, 0.45);
    background: rgba(31, 41, 55, 0.92);
    backdrop-filter: blur(12px);
}

.nav,
.container {
    width: min(100% - 2rem, 70rem);
    margin: 0 auto;
}

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

.brand {
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.02em;
}

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

.nav-links form {
    margin: 0;
}

.inline-form {
    display: inline;
    margin: 0;
}

.nav-link,
.button-link {
    color: #d1d5db;
    border-radius: 0.5rem;
    padding: 0.5rem 0.65rem;
    text-decoration: none;
    background: none;
    border: 0;
    cursor: pointer;
    font: inherit;
}

.nav-link:hover,
.button-link:hover {
    color: #6ee7b7;
}

.container {
    padding: 3rem 0 4rem;
}

h1,
h2 {
    margin-top: 0;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.page-heading {
    margin-bottom: 2rem;
}

.history-section {
    margin-top: 3rem;
}

.history-section h2 {
    margin-bottom: 1rem;
}

.eyebrow {
    margin-bottom: 0.8rem;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.muted {
    color: var(--text-muted);
}

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

.card,
.panel {
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    background: rgba(31, 41, 55, 0.92);
    padding: 1.35rem;
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.12);
}

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

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

.card p {
    margin: 0.25rem 0 0;
}

.button {
    border: 0;
    border-radius: 0.65rem;
    min-height: 2.75rem;
    padding: 0.7rem 1.05rem;
    color: #06281b;
    background: #6ee7b7;
    cursor: pointer;
    font-weight: 700;
    transition: transform 120ms ease, filter 120ms ease;
}

.button.danger {
    color: #fff;
    background: #dc2626;
}

.button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.form {
    max-width: 34rem;
}

.form p {
    display: grid;
    gap: 0.45rem;
    margin: 0 0 1.15rem;
}

.form label {
    color: #e5e7eb;
    font-size: 0.95rem;
    font-weight: 650;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid #4b5563;
    min-height: 2.9rem;
    border-radius: 0.6rem;
    padding: 0.75rem 0.85rem;
    color: #f9fafb;
    background: rgba(17, 24, 39, 0.9);
    font: inherit;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

input::placeholder,
textarea::placeholder {
    color: #6b7280;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.15);
    outline: none;
}

button.button,
a.button {
    display: inline-block;
    text-decoration: none;
}

.helptext {
    color: #9ca3af;
    font-size: 0.9rem;
    line-height: 1.4;
}

.form ul.helptext {
    margin: 0;
    padding-left: 1.1rem;
}

.errorlist {
    margin: 0;
    padding: 0;
    color: #fca5a5;
    font-size: 0.9rem;
    list-style: none;
}

.messages {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.message {
    border-radius: 0.5rem;
    padding: 0.8rem 1rem;
    background: #065f46;
}

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

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(20rem, 1.1fr);
    align-items: center;
    gap: 3rem;
    max-width: 60rem;
    min-height: min(70vh, 42rem);
    margin: 0 auto;
}

.auth-intro {
    padding: 1rem 0;
}

.auth-intro h1 {
    color: var(--accent);
    font-size: clamp(2.2rem, 6vw, 3.75rem);
}

.auth-intro p {
    max-width: 32rem;
    color: var(--text-muted);
    font-size: 1.08rem;
}

.auth-card {
    border: 1px solid var(--border);
    border-radius: 1.15rem;
    padding: clamp(1.35rem, 4vw, 2.25rem);
    background: rgba(31, 41, 55, 0.96);
    box-shadow: 0 1.25rem 3rem rgba(0, 0, 0, 0.2);
}

.auth-card h2 {
    margin-bottom: 0.45rem;
}

.auth-card .form {
    max-width: none;
    margin-top: 1.5rem;
}

.auth-card .button {
    width: 100%;
    margin-top: 0.25rem;
}

.auth-footer {
    margin: 1.35rem 0 0;
    color: var(--text-muted);
    text-align: center;
}

@media (max-width: 640px) {
    .nav,
    .container {
        width: min(100% - 1.5rem, 70rem);
    }

    .nav {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.4rem;
        padding: 0.8rem 0;
    }

    .nav-links {
        width: 100%;
        justify-content: space-between;
        gap: 0.15rem;
    }

    .nav-link,
    .button-link {
        padding: 0.45rem 0.35rem;
        font-size: 0.88rem;
    }

    .container {
        padding-top: 2rem;
    }

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

    .card .button,
    .card .inline-form {
        width: 100%;
    }

    .card .inline-form .button {
        width: 100%;
    }

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

    .auth-layout {
        display: block;
        min-height: auto;
    }

    .auth-intro {
        padding: 0 0 1.5rem;
        text-align: center;
    }

    .auth-intro h1 {
        font-size: 2.35rem;
    }

    .auth-intro p {
        margin-bottom: 0;
    }
}
