:root {
    --background: #14181c;
    --panel: #1e242a;
    --panel-light: #283039;
    --text: #eef3f7;
    --muted: #9cabb8;
    --line: #38444f;
    --accent: #36a3ff;
    --danger: #df6464;
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    margin: 0;
    background:
        linear-gradient(rgba(20, 24, 28, 0.96), rgba(20, 24, 28, 0.98)),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 39px,
            rgba(54, 163, 255, 0.06) 40px
        );
    color: var(--text);
    font-family:
        Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
}

a {
    color: var(--text);
}

.site-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    min-height: calc(72px + env(safe-area-inset-top));
    padding:
        env(safe-area-inset-top)
        max(5vw, env(safe-area-inset-right))
        0
        max(5vw, env(safe-area-inset-left));
    border-bottom: 1px solid var(--line);
    background: rgba(20, 24, 28, 0.92);
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.brand {
    color: var(--text);
    font-weight: 900;
    letter-spacing: 0.18em;
    text-decoration: none;
}

.page-shell {
    flex: 1 1 auto;
    width: min(100% - 2rem, 980px);
    min-height: 0;
    margin: 0 auto;
    padding: 4rem 0;
}

.hero {
    max-width: 720px;
    padding: 8vh 0;
}

.hero h1,
.stack h1,
.form-panel h1 {
    margin: 0.25rem 0 1rem;
    font-size: clamp(2.4rem, 7vw, 5.6rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 620px;
    color: var(--muted);
    font-size: 1.15rem;
    line-height: 1.7;
}

.eyebrow {
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.15em;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.7rem 1.1rem;
    border: 1px solid var(--accent);
    border-radius: 8px;
    background: var(--accent);
    color: #07131d;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.button-secondary {
    background: transparent;
    color: var(--text);
}

.button-danger {
    border-color: var(--danger);
    background: transparent;
    color: var(--danger);
}

.stack {
    display: grid;
    gap: 1.25rem;
}

.card,
.form-panel {
    padding: clamp(1.25rem, 4vw, 2rem);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

.form-panel {
    max-width: 620px;
    margin: 0 auto;
}

form p {
    display: grid;
    gap: 0.4rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--background);
    color: var(--text);
    font: inherit;
}

.helptext,
form ul,
.errorlist {
    color: var(--muted);
    font-size: 0.85rem;
}

.errorlist {
    color: #ff9191;
}

.inline-form {
    display: inline;
}

.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

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

.message {
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.details {
    display: grid;
    gap: 1rem;
}

.details div {
    display: grid;
    grid-template-columns: minmax(150px, 0.4fr) 1fr;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

dt {
    color: var(--muted);
}

dd {
    margin: 0;
}

[hidden] {
    display: none !important;
}

.dashboard-heading {
    margin-bottom: 1rem;
}

.dashboard-heading h1 {
    max-width: 760px;
}

.card-featured {
    position: relative;
    overflow: hidden;
    border-color: rgba(54, 163, 255, 0.65);
}

.card-featured::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
    content: "";
}

.card h2 {
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
}

.card p {
    max-width: 680px;
    color: var(--muted);
    line-height: 1.65;
}

.daily-window-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem 2rem;
    padding: 1rem 0;
    color: var(--muted);
    font-size: 0.85rem;
}

@media (max-width: 640px) {
    .site-header {
        min-height: calc(64px + env(safe-area-inset-top));
        padding:
            env(safe-area-inset-top)
            max(1rem, env(safe-area-inset-right))
            0
            max(1rem, env(safe-area-inset-left));
    }

    .site-header nav {
        gap: 0.75rem;
        font-size: 0.9rem;
    }

    .page-shell {
        padding: 2rem 0;
    }
}