:root {
    --paper: #fffaf2;
    --surface: #ffffff;
    --ink: #18323a;
    --muted: #607078;
    --teal: #087f8c;
    --teal-dark: #075f69;
    --coral: #e64f3f;
    --sun: #f5b640;
    --mint: #ccebdc;
    --line: #d8e1de;
    --shadow: 0 18px 46px rgba(24, 50, 58, .12);
}

* {
    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;
    left: 1rem;
    top: .5rem;
    z-index: 20;
    transform: translateY(-140%);
    background: var(--ink);
    color: #fff;
    padding: .7rem 1rem;
    border-radius: 6px;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 250, 242, .92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(216, 225, 222, .78);
}

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

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

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

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

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

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

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

.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 a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: .45rem .72rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    color: var(--teal-dark);
}

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

.hero {
    background:
        radial-gradient(circle at 18% 10%, rgba(245, 182, 64, .22), transparent 30%),
        linear-gradient(180deg, #fffaf2 0%, #eef7f1 100%);
    padding: clamp(2rem, 6vw, 5.5rem) 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(--coral);
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
}

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

.hero p {
    max-width: 32rem;
    margin: 0 0 1.4rem;
    color: #37525b;
    font-size: 1.15rem;
}

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

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

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

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

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

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

.hero-art {
    position: relative;
}

.hero-art::before {
    content: "";
    position: absolute;
    inset: auto auto -18px -18px;
    width: min(34%, 160px);
    aspect-ratio: 1;
    background: var(--sun);
    border-radius: 8px;
    z-index: 0;
}

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

.quick-notes {
    background: #18323a;
    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, .78);
    font-size: .92rem;
}

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

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

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

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

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

.post-card:hover,
.post-card:focus-within {
    transform: scale(1.025);
    border-color: #a8d8ca;
    box-shadow: 0 18px 42px rgba(24, 50, 58, .14);
}

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

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

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

.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;
    gap: .45rem;
    flex-wrap: wrap;
    margin-bottom: .65rem;
}

.category-row span {
    background: #e9f6ef;
    color: var(--teal-dark);
    border: 1px solid #b7ded0;
    border-radius: 999px;
    padding: .2rem .55rem;
    font-size: .8rem;
    font-weight: 800;
    text-decoration: none;
}

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

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

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

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

.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(24, 50, 58, .06);
}

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

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

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

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

.maker-note {
    background: #fff3d4;
    border-color: #efce77;
}

.external-link-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .55rem;
}

.external-link-list a {
    display: block;
    padding: .62rem .72rem;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f6fbf8;
    color: var(--teal-dark);
    font-weight: 800;
    overflow-wrap: anywhere;
    text-decoration: none;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.external-link-list a:hover,
.external-link-list a:focus-visible {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
}

.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-radius: 7px;
    padding: .45rem .8rem;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--teal-dark);
    text-decoration: none;
    font-weight: 800;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

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

.category-hero,
.article-hero {
    padding: clamp(2rem, 5vw, 4rem) 0;
    background: linear-gradient(135deg, #eaf7ef 0%, #fffaf2 58%, #ffe7cf 100%);
}

.category-hero p {
    max-width: 46rem;
    margin: .9rem 0 0;
    color: var(--muted);
    font-size: 1.1rem;
}

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

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

.article-hero figure {
    margin: 0;
}

.article-hero img {
    width: 100%;
    aspect-ratio: 1 / .8;
    object-fit: cover;
    border-radius: 8px;
    border: 8px solid #fff;
    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: #324951;
}

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

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

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

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

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

@media (max-width: 880px) {
    .footer-grid {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-nav {
        justify-content: flex-start;
    }

    .hero-grid,
    .content-grid,
    .article-head-grid {
        grid-template-columns: 1fr;
    }

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

    .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;
    }
}

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

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

    .brand {
        align-items: flex-start;
    }

    .brand small {
        display: none;
    }

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

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

    .nav-menu {
        position: relative;
    }

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

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

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

    .menu-checkbox:focus-visible + .menu-toggle {
        outline: 3px solid var(--sun);
        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;
        padding-inline: .58rem;
    }

    .hero {
        padding-top: 1.5rem;
    }

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

    .post-card {
        transform-origin: center;
    }

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

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

    .content-grid {
        padding: 2.25rem 0;
    }

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