:root {
    font-family: Monaco, ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
    color: #f5f5f0;
    background-color: #07080c;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img,
video {
    max-width: 100%;
    height: auto;
}

body {
    margin: 0;
    background: radial-gradient(circle at top right, #2b6cff 0%, #07080c 55%);
    min-height: 100vh;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    position: sticky;
    top: 0;
    background: rgba(10, 11, 17, 0.8);
    gap: 1rem;
}

.site-title {
    font-weight: 600;
    letter-spacing: 0.12rem;
    font-size: 1.50rem;
    line-height: 1.2;
    margin: 0;
}

.site-title a {
    color: inherit;
    text-decoration: none;
}

nav a {
    margin-left: 1.5rem;
    color: inherit;
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.08rem;
    white-space: nowrap;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(1.25rem, 3vw, 3rem);
}

.hero {
    padding: 3rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero h1 {
    margin: 0 0 0.75rem;
    font-size: 2.5rem;
    line-height: 1.2;
}

.hero p {
    margin: 0 0 1.5rem;
    max-width: 36rem;
}

.hero-actions .primary {
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #f8b82b, #ff6b6b);
    color: #07080c;
    font-weight: 600;
    text-decoration: none;
}

.panels {
    margin-top: 2.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.panels article {
    padding: 1.75rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.panels article h2 {
    margin-top: 0;
}

.info-card,
.error-card {
    margin-top: 2rem;
    padding: 2rem;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.15);
}

footer {
    text-align: center;
    padding: 2rem;
    color: rgba(245, 245, 240, 0.7);
}

.footer-links {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 0.75rem;
    margin: 0;
    padding: 0;
}

.footer-links .footer-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(248, 184, 43, 0.45);
    padding-bottom: 0.1rem;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-links .footer-link:hover,
.footer-links .footer-link:focus-visible {
    color: #f8b82b;
    border-bottom-color: #f8b82b;
}

footer a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(248, 184, 43, 0.45);
    padding-bottom: 0.1rem;
}

footer a:hover,
footer a:focus-visible {
    color: #f8b82b;
    border-bottom-color: #f8b82b;
}

code {
    color: #f8b82b;
}

.todos-hero,
.todo-form-card,
.todo-detail,
.todos-grid {
    background: rgba(255, 255, 255, 0.02);
}

.todos-hero {
    margin: 2rem 0;
    padding: 2rem 2.5rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "intro actions"
        "search search"
        "status status";
    align-items: end;
    gap: 1.25rem;
}

.todos-hero > :nth-child(1) {
    grid-area: intro;
    min-width: 0;
}

.todos-hero > :nth-child(2) {
    grid-area: actions;
    justify-self: end;
}

.todos-hero > :nth-child(3) {
    grid-area: search;
}

.todos-hero > :nth-child(4) {
    grid-area: status;
}

.todos-hero h1 {
    margin: 0 0 0.5rem;
    font-size: 2.25rem;
}

.todos-hero .subtitle {
    max-width: 28rem;
    margin: 0;
    color: rgba(245, 245, 240, 0.8);
}

.eyebrow {
    letter-spacing: 0.3rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    color: rgba(245, 245, 240, 0.6);
}

.todos-hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.todos-search {
    margin-bottom: 1.5rem;
}

.search-input {
    width: 100%;
    min-width: 0;
    padding: 0.95rem 1.2rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
    color: inherit;
    font-size: 1rem;
    letter-spacing: 0.02rem;
}

a.primary,
button.primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.75rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #f8b82b, #ff6b6b);
    color: #07080c;
    text-transform: uppercase;
    letter-spacing: 0.08rem;
    font-weight: 600;
    border: none;
    text-decoration: none;
}

a.ghost,
button.ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(245, 245, 240, 0.4);
    padding: 0.75rem 1.5rem;
    color: inherit;
    text-decoration: none;
    background: transparent;
}

.status-pill {
    margin-bottom: 1rem;
    padding: 0.85rem 1.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.todos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.todo-card {
    padding: 1.5rem;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.todo-card h3 {
    margin: 0.5rem 0 0.25rem;
    font-size: 1.4rem;
}

.todo-title-link {
    color: inherit;
    text-decoration: none;
    display: inline-block;
}

.todo-title-link:hover,
.todo-card h3:hover .todo-title-link,
.todo-card h3:focus-within .todo-title-link {
    text-decoration: underline;
    text-underline-offset: 0.2rem;
}

.todo-title-link:focus-visible {
    outline: 2px solid rgba(245, 245, 240, 0.6);
    outline-offset: 0.2rem;
    border-radius: 6px;
}

.todo-meta {
    margin: 0;
    color: rgba(245, 245, 240, 0.6);
    font-size: 0.85rem;
}

.todo-card-footer {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.todo-detail,
.todo-form-card {
    padding: 2rem;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 2rem;
}

.todo-detail-header h1,
.todo-form-card h1 {
    margin-top: 0.25rem;
    font-size: 2rem;
}

.todo-detail-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.75rem;
    flex-wrap: wrap;
}

.form-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.form-field label {
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
    color: rgba(245, 245, 240, 0.6);
}

.form-field input,
.form-field textarea,
.form-field select {
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
    font-size: 1rem;
}

/* Inline form field for checkboxes and similar controls */
.form-field--inline {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.form-field--inline > label {
    margin-bottom: 0;
    text-transform: none;
    font-size: 1rem;
    color: rgba(245, 245, 240, 0.9);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

/* Checkbox appearance: small, aligned, themed accent color */
.form-field--inline input[type="checkbox"],
.form-field input[type="checkbox"] {
    width: 1.05rem;
    height: 1.05rem;
    padding: 0;
    margin: 0;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.03);
    accent-color: #f8b82b;
}

.form-actions {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    .site-header {
        padding: 1rem 1.25rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem 1rem;
    }

    nav a {
        margin-left: 0;
        letter-spacing: 0.06rem;
    }

    .todos-hero {
        padding: 1.5rem;
        grid-template-columns: 1fr;
        grid-template-areas:
            "intro"
            "actions"
            "search"
            "status";
        align-items: start;
    }

    .todos-hero > :nth-child(2) {
        justify-self: start;
    }

    .todos-hero h1 {
        font-size: 2rem;
    }
}

@media (max-width: 540px) {
    .site-title {
        letter-spacing: 0.08rem;
        text-align: center;
        width: 100%;
    }

    .hero {
        padding: 1.5rem;
        border-radius: 22px;
    }

    .hero h1 {
        font-size: 2.1rem;
    }

    .todos-grid {
        grid-template-columns: 1fr;
    }

    .todo-card {
        min-height: auto;
    }

    .todo-detail,
    .todo-form-card {
        padding: 1.5rem;
        border-radius: 22px;
    }

    a.primary,
    button.primary,
    a.ghost,
    button.ghost {
        width: 100%;
    }
}

.validation {
    color: #ff6b6b;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Delete button styles */
button.delete {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 107, 107, 0.4);
    padding: 0.75rem 1.5rem;
    color: #ff6b6b;
    text-decoration: none;
    background: transparent;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
}

button.delete:hover {
    border-color: #ff6b6b;
}

button.delete--confirming {
    background: #f8b82b;
    color: #07080c;
    border-color: #f8b82b;
}
