:root {
    --bg: #fff7f9;
    --surface: #fdecf1;
    --text: #2a0e17;
    --text-muted: #5c2436;
    --rose: #9e1b49;
    --rose-border: #b84a6f;
}

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

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100dvh;
    background-color: var(--bg);
    color: var(--text);
    font-family: Georgia, "Times New Roman", Times, serif;
    line-height: 1.6;
    padding: 1.25rem 1rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 68rem;
    margin-inline: auto;
}

/* Brand header with rose identity rule */
h1 {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: clamp(1.5rem, 4vw + 0.5rem, 2.5rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--rose);
    line-height: 1.2;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--rose);
}

/* Mobile-first stacked navigation */
nav {
    background-color: var(--surface);
    border: 1px solid var(--rose-border);
    border-radius: 0.25rem;
    padding: 0.5rem;
}

nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

nav li {
    display: flex;
}

nav a {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 2.75rem;
    min-width: 2.75rem;
    padding: 0.625rem 1rem;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text);
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 0.1875rem;
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

nav a:hover {
    color: var(--rose);
    border-color: var(--rose-border);
    background-color: var(--bg);
}

nav a:active {
    background-color: var(--rose);
    color: var(--bg);
}

nav a:focus-visible {
    outline: 2px solid var(--rose);
    outline-offset: 2px;
}

/* Primary content panel */
main {
    background-color: var(--surface);
    border: 1px solid var(--rose-border);
    border-top: 3px solid var(--rose);
    border-radius: 0.25rem;
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

h2 {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: clamp(1.25rem, 2.5vw + 0.5rem, 1.875rem);
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

p {
    font-size: clamp(1rem, 0.5vw + 0.9rem, 1.125rem);
    color: var(--text-muted);
    max-width: 65ch;
}

/* State 2: Intermediate / Tablet (576px+) */
@media (min-width: 36rem) {
    body {
        padding: 2rem 1.75rem 3.5rem;
        gap: 1.75rem;
    }

    nav ul {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.625rem;
    }

    nav a {
        width: auto;
        justify-content: center;
        padding: 0.625rem 1.25rem;
    }

    main {
        padding: 2.25rem 2rem;
        gap: 1rem;
    }
}

/* State 3: Desktop (896px+) */
@media (min-width: 56rem) {
    body {
        padding: 3rem 2.5rem 4.5rem;
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "brand nav"
            "main  main";
        align-items: center;
        gap: 2.25rem 2rem;
    }

    h1 {
        grid-area: brand;
        border-bottom: none;
        padding-bottom: 0;
    }

    nav {
        grid-area: nav;
        padding: 0.375rem;
    }

    main {
        grid-area: main;
        padding: 3rem 2.75rem;
        gap: 1.25rem;
    }
}
