:root {
    --ink: #26312f;
    --muted: #6d766f;
    --cream: #fbf7f0;
    --linen: #f1e7dc;
    --sage: #789181;
    --sage-dark: #3f6358;
    --blue: #8aa5b1;
    --clay: #c86b4e;
    --white: #ffffff;
    --line: #ddd4c8;
    --shadow: 0 18px 45px rgba(45, 49, 45, 0.12);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

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

a {
    color: var(--sage-dark);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    line-height: 1.08;
    letter-spacing: 0;
}

h1 {
    font-size: clamp(2.8rem, 9vw, 6.4rem);
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h3 {
    font-size: 1.2rem;
}

input,
select,
textarea,
button {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem clamp(1rem, 4vw, 3rem);
    background: rgba(251, 247, 240, 0.95);
    border-bottom: 1px solid rgba(221, 212, 200, 0.75);
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--ink);
    min-width: 0;
}

.brand img {
    width: 90px;
    height: auto;
    object-fit: contain;
}

.brand span {
    display: grid;
    line-height: 1.15;
}

.brand small {
    color: var(--muted);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--ink);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.75rem 1.05rem;
    border: 0;
    border-radius: var(--radius);
    background: var(--sage-dark);
    color: var(--white);
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(63, 99, 88, 0.18);
}

.button:hover {
    background: #314f47;
    text-decoration: none;
}

.button-muted {
    background: var(--white);
    color: var(--sage-dark);
    border: 1px solid var(--line);
    box-shadow: none;
}

.button-muted:hover {
    background: #f7f2ea;
}

.button-small {
    min-height: 38px;
    padding: 0.55rem 0.8rem;
    font-size: 0.9rem;
}

.flash {
    width: min(1120px, calc(100% - 2rem));
    margin: 1rem auto;
    padding: 0.9rem 1rem;
    border-radius: var(--radius);
    background: var(--white);
    border-left: 5px solid var(--blue);
    box-shadow: var(--shadow);
}

.flash p:last-child {
    margin-bottom: 0;
}

.flash-error {
    border-color: var(--clay);
}

.flash-success {
    border-color: var(--sage);
}

.hero-section {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
    min-height: calc(100vh - 82px);
    padding: clamp(2rem, 7vw, 6rem) clamp(1rem, 5vw, 4rem) 3rem;
}

.hero-copy {
    max-width: 760px;
}

.launch-pill,
.eyebrow,
.card-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 1rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: #e6eee8;
    color: var(--sage-dark);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.hero-lead {
    font-size: clamp(1.2rem, 2.2vw, 1.55rem);
    color: #344441;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0 0.8rem;
}

.microcopy {
    color: var(--muted);
    font-size: 0.95rem;
}

.hero-collage {
    position: relative;
    min-height: 680px;
}

.hero-image {
    border-radius: var(--radius);
    object-fit: cover;
    box-shadow: var(--shadow);
}

.hero-image-large {
    width: 76%;
    height: 680px;
    margin-left: auto;
}

.hero-image-small {
    position: absolute;
    left: 0;
    width: 42%;
    height: 240px;
    border: 8px solid var(--cream);
}

.hero-image-small.top {
    top: 8%;
}

.hero-image-small.bottom {
    bottom: 8%;
}

.section {
    padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 5vw, 4rem);
}

.section-soft {
    background: var(--linen);
}

.section-heading {
    max-width: 860px;
    margin-bottom: 2rem;
}

.three-column,
.resource-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.feature-card,
.resource-preview-card,
.admin-panel,
.auth-card,
.success-panel,
.empty-state {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.feature-card,
.resource-preview-card {
    padding: 1.4rem;
}

.feature-card .card-kicker {
    background: #f3e3d8;
    color: #8d412a;
}

.image-band,
.community-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
    align-items: stretch;
    gap: 0;
    background: var(--ink);
    color: var(--cream);
}

.image-band img,
.community-section img {
    width: 100%;
    height: 100%;
    min-height: 520px;
    object-fit: cover;
}

.image-band div,
.community-section div {
    display: grid;
    align-content: center;
    padding: clamp(2rem, 5vw, 4rem);
}

.image-band .eyebrow,
.community-section .eyebrow {
    background: rgba(255, 255, 255, 0.14);
    color: var(--cream);
}

.stage-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.stage-grid span {
    padding: 1rem;
    border-radius: var(--radius);
    background: #e5eee8;
    color: var(--sage-dark);
    font-weight: 800;
    text-align: center;
}

.community-section {
    grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1fr);
    background: #efe5d9;
    color: var(--ink);
}

.community-section img {
    min-height: 460px;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 2rem clamp(1rem, 5vw, 4rem);
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.site-footer div {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.site-footer img {
    width: 90px;
    height: auto;
    object-fit: contain;
}

.form-hero,
.resource-hero {
    padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 5vw, 4rem) 2rem;
    background: var(--linen);
}

.form-hero div,
.resource-hero div {
    max-width: 780px;
}

.form-section,
.resource-browser {
    width: min(1120px, calc(100% - 2rem));
    margin: 2rem auto 4rem;
}

.panel-form {
    display: grid;
    gap: 1rem;
    padding: clamp(1.25rem, 4vw, 2rem);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

label,
fieldset {
    display: grid;
    gap: 0.4rem;
    color: var(--ink);
    font-weight: 750;
}

label span,
legend {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 650;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cfc6bb;
    border-radius: var(--radius);
    background: #fffcf7;
    color: var(--ink);
    padding: 0.75rem 0.85rem;
}

textarea {
    resize: vertical;
}

fieldset {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.checkbox-grid label,
.check-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 650;
}

.checkbox-grid input,
.check-row input {
    width: auto;
}

.success-panel,
.auth-card {
    width: min(720px, calc(100% - 2rem));
    margin: 3rem auto 5rem;
    padding: clamp(1.5rem, 4vw, 2.25rem);
}

.auth-card {
    max-width: 520px;
}

.resource-browser {
    width: min(1320px, calc(100% - 2rem));
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(150px, 0.8fr)) auto;
    gap: 0.85rem;
    align-items: end;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.masonry-grid {
    column-count: 4;
    column-gap: 1rem;
}

.resource-card {
    display: inline-block;
    width: 100%;
    margin: 0 0 1rem;
    overflow: hidden;
    break-inside: avoid;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 12px 26px rgba(45, 49, 45, 0.1);
}

.resource-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #e8ede4;
}

.resource-card-body {
    padding: 1rem;
}

.resource-card h2 {
    font-size: 1.15rem;
    margin-bottom: 0.55rem;
}

.card-meta,
.tag-line,
.source-line {
    color: var(--muted);
    font-size: 0.86rem;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.7rem;
}

.card-meta span {
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    background: #e6eee8;
    color: var(--sage-dark);
    font-weight: 800;
}

.empty-state {
    padding: 2rem;
    text-align: center;
}

.admin-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
    background: #f7f1e9;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 1rem;
    border-right: 1px solid var(--line);
    background: var(--white);
}

.admin-brand {
    margin-bottom: 1.5rem;
}

.admin-nav {
    display: grid;
    gap: 0.35rem;
}

.admin-nav a {
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius);
    color: var(--ink);
    font-weight: 750;
}

.admin-nav a:hover,
.admin-nav .is-active {
    background: #e6eee8;
    text-decoration: none;
}

.admin-main {
    min-width: 0;
    padding: clamp(1rem, 3vw, 2rem);
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-topbar h1 {
    margin-bottom: 0;
    font-size: clamp(2rem, 5vw, 3.5rem);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stats-grid article {
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.stats-grid span {
    display: block;
    font-size: 2.3rem;
    font-weight: 850;
    color: var(--sage-dark);
}

.stats-grid p {
    margin-bottom: 0;
    color: var(--muted);
}

.admin-panel {
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.panel-heading h2 {
    margin-bottom: 0;
    font-size: 1.35rem;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    padding: 0.8rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.85rem;
}

.status-badge {
    display: inline-flex;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    background: #e6eee8;
    color: var(--sage-dark);
    font-size: 0.82rem;
    font-weight: 800;
}

.status-pending,
.status-pending_approval {
    background: #f7ead8;
    color: #9a5a24;
}

.status-rejected,
.status-disabled {
    background: #f3ddd6;
    color: #8d412a;
}

.status-approved,
.status-active {
    background: #e6eee8;
    color: var(--sage-dark);
}

.status-preview {
    background: #e7eef2;
    color: #4a6978;
}

.admin-form {
    max-width: 980px;
}

.switch-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.current-file {
    font-size: 0.9rem;
}

.thumb-preview {
    width: 180px;
    height: 110px;
    object-fit: cover;
    border-radius: var(--radius);
}

.admin-filter {
    grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.5fr) minmax(160px, 0.5fr) auto;
}

.bulk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.bulk-actions select {
    width: min(260px, 100%);
}

.inline-form {
    display: flex;
    gap: 0.4rem;
}

.inline-form select {
    min-width: 160px;
}

.inline-form button {
    border: 0;
    border-radius: var(--radius);
    background: var(--sage-dark);
    color: var(--white);
    padding: 0.5rem 0.75rem;
    cursor: pointer;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1100px) {
    .hero-section,
    .image-band,
    .community-section {
        grid-template-columns: 1fr;
    }

    .hero-section {
        min-height: auto;
    }

    .hero-collage {
        min-height: 520px;
    }

    .hero-image-large {
        height: 520px;
    }

    .masonry-grid {
        column-count: 3;
    }

    .filter-bar,
    .admin-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .site-header {
        align-items: flex-start;
    }

    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 76px;
        left: 1rem;
        right: 1rem;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--white);
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: flex;
    }

    .hero-collage {
        min-height: 420px;
    }

    .hero-image-large {
        width: 82%;
        height: 420px;
    }

    .hero-image-small {
        width: 48%;
        height: 160px;
        border-width: 5px;
    }

    .three-column,
    .resource-preview-grid,
    .form-grid,
    .checkbox-grid,
    .stage-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .masonry-grid {
        column-count: 2;
    }

    .site-footer,
    .panel-heading,
    .admin-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .admin-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .brand img {
        width: 66px;
        height: auto;
    }

    .brand small {
        display: none;
    }

    .hero-section {
        padding-top: 2rem;
    }

    .hero-collage {
        min-height: 360px;
    }

    .hero-image-large {
        width: 100%;
        height: 360px;
    }

    .hero-image-small {
        display: none;
    }

    .filter-bar,
    .admin-filter {
        grid-template-columns: 1fr;
    }

    .masonry-grid {
        column-count: 1;
    }
}
