:root {
    --paper: #f6f3ed;
    --surface: #ffffff;
    --ink: #17232b;
    --muted: #5c6b72;
    --navy: #16354a;
    --blue: #1d6f9f;
    --red: #c43c32;
    --gold: #d9a13b;
    --pale: #e9f1f2;
    --line: #d7dddc;
    --shadow: 0 18px 48px rgba(23, 35, 43, .14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Atkinson Hyperlegible", Arial, sans-serif;
    font-size: 18px;
    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

.skip-link {
    position: absolute;
    top: .5rem;
    left: 1rem;
    z-index: 50;
    transform: translateY(-140%);
    background: var(--ink);
    color: #fff;
    padding: .7rem 1rem;
    border-radius: 6px;
}

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

.shell {
    width: min(1140px, calc(100% - 32px));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(246, 243, 237, .94);
    border-bottom: 1px solid rgba(215, 221, 220, .86);
    backdrop-filter: blur(16px);
}

.nav-shell {
    position: relative;
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    text-decoration: none;
}

.brand-mark {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--red);
    color: #fff;
    font-family: Manrope, Arial, sans-serif;
    font-weight: 900;
    letter-spacing: 0;
}

.brand strong,
h1,
h2,
h3 {
    font-family: Manrope, Arial, sans-serif;
    line-height: 1.05;
}

.brand strong {
    display: block;
    font-size: 1.15rem;
}

.brand small {
    display: block;
    max-width: 460px;
    color: var(--muted);
    font-size: .83rem;
    line-height: 1.35;
}

.nav-menu {
    position: relative;
    margin-left: auto;
}

.menu-checkbox {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.menu-toggle {
    display: none;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .35rem;
}

.site-nav a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: .45rem .72rem;
    border-radius: 6px;
    color: var(--navy);
    font-weight: 800;
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    background: var(--pale);
    outline: 0;
}

.hero {
    background:
        radial-gradient(circle at 20% 8%, rgba(217, 161, 59, .22), transparent 28%),
        linear-gradient(180deg, #f6f3ed 0%, #e9f1f2 100%);
    padding: clamp(2rem, 6vw, 5.4rem) 0 2.4rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(340px, 1.1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
}

.hero-copy {
    padding: clamp(.5rem, 3vw, 2rem) 0;
}

.eyebrow {
    display: inline-flex;
    color: var(--red);
    font-size: .82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 10ch;
    margin: .75rem 0 1rem;
    font-size: clamp(2.45rem, 7vw, 5.35rem);
}

.hero p,
.page-hero p {
    max-width: 39rem;
    margin: 0 0 1.35rem;
    color: #3f515a;
    font-size: 1.15rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
}

.button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    border-radius: 7px;
    padding: .72rem 1rem;
    font-weight: 900;
    text-decoration: none;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.button.primary {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.button.primary:hover,
.button.primary:focus-visible {
    background: #fff;
    color: var(--red);
}

.button.secondary {
    background: #fff;
    border-color: var(--blue);
    color: var(--navy);
}

.button.secondary:hover,
.button.secondary:focus-visible {
    background: var(--blue);
    color: #fff;
}

.hero-art img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 10px solid #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.quick-notes {
    background: var(--navy);
    color: #fff;
}

.note-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.note-grid div {
    padding: 1.15rem 1.25rem;
    border-right: 1px solid rgba(255, 255, 255, .18);
}

.note-grid div:last-child {
    border-right: 0;
}

.note-grid strong,
.note-grid span {
    display: block;
}

.note-grid span {
    color: rgba(255, 255, 255, .76);
    font-size: .92rem;
}

.page-hero,
.article-hero {
    padding: clamp(2rem, 5vw, 4rem) 0;
    background: linear-gradient(135deg, #e9f1f2 0%, #f6f3ed 58%, #f4dfd6 100%);
}

.page-hero h1 {
    max-width: 12ch;
    margin: .45rem 0 .85rem;
    font-size: clamp(2.3rem, 6vw, 4.6rem);
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
    gap: 2rem;
    padding: 3.5rem 0;
}

.section-heading {
    margin-bottom: 1.1rem;
}

.section-heading h2 {
    margin: .35rem 0 0;
    font-size: clamp(2rem, 5vw, 3.4rem);
}

.post-list {
    display: grid;
    gap: 1.2rem;
}

.post-card {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(23, 35, 43, .08);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.post-card:hover,
.post-card:focus-within {
    transform: scale(1.025);
    border-color: #9fc2ce;
    box-shadow: 0 18px 42px rgba(23, 35, 43, .16);
}

.post-card-link {
    min-height: 100%;
    display: grid;
    grid-template-columns: minmax(220px, .46fr) minmax(0, .54fr);
    color: inherit;
    text-decoration: none;
}

.post-card-link:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: -6px;
}

.post-card-media {
    min-height: 100%;
    display: block;
    background: var(--pale);
}

.post-card-media img {
    width: 100%;
    height: 100%;
    min-height: 245px;
    object-fit: cover;
}

.post-card-body {
    padding: clamp(1rem, 2.4vw, 1.45rem);
}

.category-row {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-bottom: .65rem;
}

.category-row span {
    border: 1px solid #c8d8dc;
    border-radius: 999px;
    background: #eef5f6;
    color: var(--navy);
    padding: .2rem .55rem;
    font-size: .8rem;
    font-weight: 900;
}

.post-card h2 {
    margin: 0;
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.post-card:hover h2,
.post-card:focus-within h2 {
    color: var(--blue);
}

.post-card p {
    margin: .75rem 0 1rem;
    color: var(--muted);
}

.post-meta,
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem 1rem;
    color: #66747a;
    font-size: .9rem;
    font-weight: 800;
}

.sidebar {
    position: sticky;
    top: 104px;
    display: grid;
    gap: 1rem;
}

.side-panel,
.empty-state,
.missing-post {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 10px 24px rgba(23, 35, 43, .07);
}

.side-panel h2 {
    margin: 0 0 .85rem;
    font-size: 1.25rem;
}

.category-list,
.guide-list {
    list-style: none;
    display: grid;
    gap: .55rem;
    margin: 0;
    padding: 0;
}

.category-list a,
.category-list > li > span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--navy);
    font-weight: 900;
    text-decoration: none;
}

.category-count {
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    display: grid;
    place-items: center;
    background: var(--pale);
    border-radius: 999px;
    color: var(--navy);
    line-height: 1;
}

.guide-panel {
    background: #fff8e9;
    border-color: #ead29b;
}

.guide-list li {
    display: grid;
    gap: .2rem;
}

.guide-list strong {
    color: var(--red);
    font-family: Manrope, Arial, sans-serif;
}

.guide-list span {
    color: var(--muted);
    font-size: .94rem;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    padding-top: .5rem;
}

.pagination a,
.pagination span {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--navy);
    padding: .45rem .8rem;
    font-weight: 900;
    text-decoration: none;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.pagination a:hover,
.pagination a:focus-visible {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.article-head-grid {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(300px, .75fr);
    gap: 2rem;
    align-items: center;
}

.article-hero h1 {
    max-width: 12ch;
    margin: .75rem 0 1rem;
    font-size: clamp(2.35rem, 6vw, 4.7rem);
}

.article-hero figure {
    margin: 0;
}

.article-hero img {
    width: 100%;
    aspect-ratio: 1 / .8;
    object-fit: cover;
    border: 8px solid #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.article-body {
    max-width: 760px;
    padding: 3rem 0 4rem;
}

.article-body h2,
.article-body h3 {
    margin-top: 2rem;
}

.article-body p,
.article-body li {
    color: #334850;
}

.article-body img {
    margin: 1.5rem 0;
    border-radius: 8px;
}

.article-body blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-left: 6px solid var(--red);
    border-radius: 0 8px 8px 0;
    background: #fff4f0;
}

.site-footer {
    padding: 2rem 0;
    background: var(--ink);
    color: #fff;
}

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.site-footer p,
.footer-note {
    margin: .25rem 0 0;
    color: rgba(255, 255, 255, .76);
}

@media (max-width: 900px) {
    .hero-grid,
    .content-grid,
    .article-head-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

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

    .note-grid div {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .18);
    }

    .note-grid div:last-child {
        border-bottom: 0;
    }

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

@media (max-width: 660px) {
    body {
        font-size: 17px;
    }

    .shell {
        width: min(100% - 24px, 1140px);
    }

    .brand small {
        display: none;
    }

    .brand-mark {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .nav-shell {
        min-height: 72px;
        align-items: center;
    }

    .menu-toggle {
        width: 44px;
        height: 44px;
        display: grid;
        place-items: center;
        gap: 4px;
        padding: 10px;
        border: 2px solid var(--blue);
        border-radius: 7px;
        background: #fff;
        cursor: pointer;
    }

    .menu-toggle span {
        width: 20px;
        height: 2px;
        display: block;
        border-radius: 999px;
        background: var(--navy);
    }

    .site-nav {
        position: absolute;
        top: calc(100% + .7rem);
        right: 0;
        z-index: 30;
        display: none;
        width: min(280px, calc(100vw - 24px));
        padding: .55rem;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
        box-shadow: var(--shadow);
    }

    .menu-checkbox:focus-visible + .menu-toggle {
        outline: 3px solid var(--gold);
        outline-offset: 3px;
    }

    .menu-checkbox:checked ~ .site-nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .site-nav a {
        width: 100%;
        justify-content: flex-start;
    }

    .hero {
        padding-top: 1.5rem;
    }

    .hero h1,
    .page-hero h1,
    .article-hero h1 {
        max-width: 13ch;
    }

    .hero-art img {
        border-width: 6px;
    }

    .post-card-link {
        grid-template-columns: 1fr;
    }

    .post-card-media img {
        min-height: 215px;
    }

    .hero-actions .button {
        width: 100%;
    }
}
