:root {
    --brand-dark: #103728;
    --brand-primary: #59b43a;
    --brand-primary-strong: #2f7d32;
    --brand-primary-soft: #e7f5e5;
    --brand-primary-muted: #d9efd5;
    --brand-ink: #1f3128;
    --brand-surface: #f6fbf4;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--brand-surface);
    color: var(--brand-ink);
}

.container {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header,
.site-footer {
    background: var(--brand-dark);
    color: #fff;
    padding: 16px 0;
}

.brand {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.hero {
    padding: 72px 0;
}

.hero h1 {
    margin-top: 0;
    font-size: 2rem;
}

a {
    color: inherit;
}

.public-body {
    background:
        radial-gradient(circle at top left, rgba(89, 180, 58, 0.15), transparent 32%),
        linear-gradient(180deg, #fbfef9 0%, #eef7eb 100%);
}

.site-main {
    min-height: 60vh;
}

.public-alert {
    margin-top: 18px;
}

.public-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(8px);
    background: rgba(16, 55, 40, 0.94);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 74px;
}

.public-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.public-nav a {
    color: #e4f6df;
    text-decoration: none;
    font-size: 0.96rem;
}

.public-nav a:hover {
    color: #fff;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 10px 12px;
    cursor: pointer;
}

.nav-toggle-icon {
    display: grid;
    gap: 4px;
}

.nav-toggle-bar {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #fff;
}

.nav-toggle-label {
    margin-left: 6px;
    font-size: 0.9rem;
    font-weight: 700;
}

.site-ribbon {
    background: var(--brand-primary);
    color: #f7fff5;
    padding: 10px 0;
    font-size: 0.95rem;
}

.hero-home,
.page-hero {
    padding: 84px 0 56px;
}

.hero-carousel {
    position: relative;
    min-height: 58vh;
    height: min(72vh, 760px);
    overflow: hidden;
    background: var(--brand-dark);
}

.hero-carousel-track,
.hero-slide {
    height: 100%;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transform: scale(1.02);
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.hero-slide-media,
.hero-slide-media img {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-slide-media img {
    object-fit: cover;
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(16, 55, 40, 0.84) 0%, rgba(16, 55, 40, 0.58) 45%, rgba(16, 55, 40, 0.30) 100%);
}

.hero-slide-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-slide-copy {
    width: min(680px, 100%);
    color: #fff;
    padding: 48px 0;
}

.hero-slide-copy .eyebrow {
    background: rgba(231, 245, 229, 0.14);
    color: #f7fff5;
}

.hero-slide-copy p {
    color: rgba(255, 255, 255, 0.86);
}

.hero-carousel-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
    border: 0;
    border-radius: 999px;
    background: rgba(16, 55, 40, 0.54);
    color: #fff;
    padding: 12px 14px;
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.hero-carousel-control.prev {
    left: 18px;
}

.hero-carousel-control.next {
    right: 18px;
}

.hero-carousel-dots {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 3;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-carousel-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.hero-carousel-dot.is-active {
    background: #fff;
}

.page-hero.compact {
    padding: 70px 0 34px;
}

.hero-grid,
.two-column {
    display: grid;
    grid-template-columns: 1.25fr 0.95fr;
    gap: 28px;
    align-items: start;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--brand-primary-soft);
    color: var(--brand-primary-strong);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hero-home h1,
.page-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(2rem, 4vw, 3.7rem);
    line-height: 1.05;
}

.hero-home p,
.page-hero p {
    font-size: 1.08rem;
    line-height: 1.7;
    color: #415548;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.hero-card-stack,
.stack-list {
    display: grid;
    gap: 16px;
}

.hero-card,
.public-card,
.panel-surface,
.list-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.hero-card,
.public-card,
.panel-surface {
    padding: 24px;
}

.card-media,
.article-media {
    display: block;
    width: calc(100% + 48px);
    max-width: calc(100% + 48px);
    margin: -24px -24px 18px;
    object-fit: cover;
}

.card-media {
    aspect-ratio: 16 / 10;
    border-radius: 18px 18px 0 0;
}

.article-media {
    width: 100%;
    max-width: 100%;
    margin: 0 0 18px;
    border-radius: 14px;
    aspect-ratio: 16 / 9;
}

.list-card {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.list-card-media {
    width: 138px;
    min-width: 138px;
    height: 92px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid #dbe2ea;
}

.section-block {
    padding: 42px 0;
}

.section-block.soft {
    background: rgba(255, 255, 255, 0.6);
}

.section-block.accent {
    background: linear-gradient(135deg, var(--brand-dark), var(--brand-primary-strong));
    color: #fff;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.section-head h2,
.panel-surface h2 {
    margin: 0 0 10px;
    font-size: 1.6rem;
}

.section-head a,
.public-card a,
.list-card a {
    color: var(--brand-primary-strong);
    font-weight: 700;
    text-decoration: none;
}

.section-block.accent .section-head a,
.section-block.accent a {
    color: #fff;
}

.card-grid {
    display: grid;
    gap: 18px;
}

.card-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.proposal-badge {
    display: block;
    width: 46px;
    height: 6px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.proposal-card h3,
.public-card h3 {
    margin-top: 0;
}

.newsletter-band {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
}

.newsletter-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.newsletter-inline input {
    min-width: 220px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.38);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 24px;
    padding: 36px 0 18px;
}

.public-footer a {
    display: block;
    color: #def5d8;
    text-decoration: none;
    margin-bottom: 10px;
}

.footer-bottom {
    padding: 16px 0 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.meta-list,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-left: 0;
    list-style: none;
}

.meta-list li,
.tag-chip {
    background: var(--brand-primary-soft);
    color: var(--brand-primary-strong);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.92rem;
}

.prose {
    line-height: 1.8;
    color: #334155;
}

.article-meta {
    margin-top: 0;
    color: #64748b;
}

.quote-card p {
    font-style: italic;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.media-tile {
    background: #fff;
    border-radius: 16px;
    padding: 18px;
    border: 1px solid #dbe2ea;
}

.gallery-item-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 12px;
}

.media-placeholder {
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    background: linear-gradient(135deg, #d5e7cf, #eef7ea);
    display: grid;
    place-items: center;
    margin-bottom: 12px;
    color: #31523d;
    text-transform: uppercase;
    font-weight: 700;
}

.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--brand-dark), var(--brand-primary-strong));
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card,
.panel-card,
.stat-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

.auth-card {
    width: min(440px, 100%);
    padding: 32px;
}

.auth-brand a {
    color: var(--brand-dark);
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 700;
}

.auth-header h1,
.page-head h1 {
    margin-bottom: 8px;
}

.auth-form {
    display: grid;
    gap: 12px;
}

.auth-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-sizing: border-box;
}

.auth-link {
    margin-bottom: 0;
    margin-top: 16px;
}

.auth-link a {
    color: var(--brand-primary-strong);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 10px;
    padding: 12px 16px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
}

.btn-primary {
    background: var(--brand-primary-strong);
    color: #fff;
}

.btn-danger {
    background: #b91c1c;
    color: #fff;
}

.alert {
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-info {
    background: var(--brand-primary-soft);
    color: var(--brand-primary-strong);
    overflow-wrap: anywhere;
}

.error-list {
    margin: 0;
    padding-left: 18px;
}

.admin-page {
    background: #e2e8f0;
}

.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
}

.admin-sidebar {
    background: var(--brand-dark);
    color: #fff;
    padding: 24px;
}

.admin-logo {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.admin-nav {
    display: grid;
    gap: 8px;
}

.admin-nav a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 10px;
}

.admin-nav a.active,
.admin-nav a:hover {
    background: rgba(89, 180, 58, 0.18);
    color: #fff;
}

.admin-main {
    display: grid;
    grid-template-rows: auto 1fr;
}

.admin-topbar {
    background: #fff;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}

.admin-topbar span {
    display: block;
    color: #64748b;
    font-size: 0.92rem;
}

.admin-content {
    padding: 24px;
}

.page-head-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 24px 0;
}

.stat-card,
.panel-card {
    padding: 22px;
}

.stat-card span {
    display: block;
    color: #64748b;
    margin-bottom: 8px;
}

.stat-card strong {
    font-size: 2rem;
}

.admin-form {
    display: grid;
    gap: 18px;
}

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

.form-field {
    display: grid;
    gap: 8px;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-sizing: border-box;
    background: #fff;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-light {
    background: var(--brand-primary-soft);
    color: var(--brand-dark);
}

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

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: #475569;
    font-size: 0.92rem;
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.table-meta {
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 4px;
}

.table-actions form {
    margin: 0;
}

.table-thumb {
    display: block;
    width: 110px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #dbe2ea;
    background: #f8fafc;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.checkbox-card {
    display: flex;
    gap: 10px;
    padding: 14px;
    border: 1px solid #dbe2ea;
    border-radius: 12px;
    background: #f8fafc;
    align-items: flex-start;
}

.checkbox-card span {
    display: grid;
}

.checkbox-card small {
    color: #64748b;
}

.permission-groups {
    display: grid;
    gap: 18px;
}

.permission-group {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
}

.permission-group h3 {
    margin-top: 0;
}

.status-pill {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: capitalize;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-inactive {
    background: #e2e8f0;
    color: #334155;
}

.status-blocked {
    background: #fee2e2;
    color: #991b1b;
}

.status-draft {
    background: #e2e8f0;
    color: #334155;
}

.status-review {
    background: #fef3c7;
    color: #92400e;
}

.status-published,
.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-archived,
.status-inactive {
    background: #e5e7eb;
    color: #374151;
}

.status-new,
.status-pending {
    background: var(--brand-primary-soft);
    color: var(--brand-primary-strong);
}

.status-read,
.status-active,
.status-completed {
    background: #dcfce7;
    color: #166534;
}

.status-replied,
.status-cancelled,
.status-bounced {
    background: #fef3c7;
    color: #92400e;
}

.status-spam,
.status-unsubscribed {
    background: #fee2e2;
    color: #991b1b;
}

.form-field-checkbox {
    align-content: end;
}

@media (max-width: 900px) {
    .hero-carousel {
        min-height: 52vh;
        height: 62vh;
    }

    .hero-grid,
    .two-column,
    .newsletter-band,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .card-grid.three,
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

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

@media (max-width: 640px) {
    .list-card-media {
        width: 100%;
        min-width: 100%;
        height: 180px;
    }

    .hero-carousel {
        min-height: 50vh;
        height: 56vh;
    }

    .hero-slide-copy {
        width: 100%;
    }

    .hero-carousel-control {
        top: auto;
        bottom: 72px;
        transform: none;
    }

    .hero-carousel-control.prev {
        left: 16px;
    }

    .hero-carousel-control.next {
        right: 16px;
    }

    .header-inner,
    .section-head,
    .newsletter-inline {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-inner {
        position: relative;
        width: 100%;
    }

    .nav-toggle {
        display: inline-flex;
        align-self: flex-end;
    }

    .public-nav {
        display: none;
        width: 100%;
        gap: 8px;
        padding: 12px;
        border-radius: 16px;
        background: rgba(15, 23, 42, 0.98);
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-sizing: border-box;
    }

    .public-nav.is-open {
        display: grid;
    }

    .public-nav a {
        width: 100%;
        padding: 10px 4px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .public-nav a:last-child {
        border-bottom: 0;
    }

    .card-grid.three,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

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

    .admin-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .page-head-inline,
    .form-actions,
    .table-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
