:root {
    color-scheme: light;
    --paper: #f6f3ec;
    --paper-deep: #eee9df;
    --surface: #fffefa;
    --ink: #202b25;
    --muted: #777a70;
    --line: #e4dfd4;
    --green: #314d3e;
    --green-deep: #233b30;
    --sage: #dce4d8;
    --rust: #bc684c;
    --shadow: 0 18px 50px rgb(42 48 39 / 8%);
    font-family: "DM Sans", "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--paper);
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(ellipse at 90% 0%, rgb(220 228 216 / 40%), transparent 30rem),
        var(--paper);
}

body,
button,
.account-panel form p input,
.account-panel form p textarea,
.account-panel form p select,
.search-form input {
    font-family: "DM Sans", "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid rgb(188 104 76 / 55%);
    outline-offset: 3px;
}

img {
    max-width: 100%;
}

h1,
h2,
h3,
h4 {
    margin-top: 0;
    color: var(--ink);
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 600;
    letter-spacing: -0.035em;
}

p {
    line-height: 1.75;
}

.site-header {
    position: relative;
    z-index: 2;
    border-bottom: 1px solid rgb(32 43 37 / 7%);
    background: rgb(246 243 236 / 88%);
    backdrop-filter: blur(16px);
}

.site-nav {
    width: min(1160px, calc(100% - 56px));
    min-height: 88px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 11px;
    color: var(--ink);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    line-height: 1.3;
    text-transform: uppercase;
}

.brand-mark,
.footer-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: var(--green);
    color: #fffefa;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 24px;
    letter-spacing: -.08em;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(12px, 2.1vw, 28px);
}

.nav-links a {
    color: #555c53;
    font-size: 12px;
    font-weight: 600;
    transition: color .2s ease;
}

.nav-links a:hover {
    color: var(--rust);
}

.nav-links a:last-child {
    padding: 11px 17px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--green);
}

.page-shell {
    width: min(1160px, calc(100% - 56px));
    flex: 1;
    margin: 0 auto;
    padding: 0 0 88px;
}

.home-hero {
    position: relative;
    overflow: hidden;
    min-height: 470px;
    margin: 38px 0 88px;
    padding: clamp(52px, 9vw, 104px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    border-radius: 8px;
    background:
        radial-gradient(ellipse at 80% 12%, rgb(231 191 145 / 31%), transparent 20rem),
        radial-gradient(ellipse at 90% 100%, rgb(163 184 152 / 26%), transparent 24rem),
        linear-gradient(118deg, #294438 0%, #385343 52%, #52634e 100%);
    box-shadow: var(--shadow);
    color: #fffefa;
}

.home-hero::after {
    position: absolute;
    right: 8%;
    bottom: -118px;
    width: 340px;
    height: 340px;
    border: 1px solid rgb(255 254 250 / 14%);
    border-radius: 50%;
    content: "";
    box-shadow: 0 0 0 34px rgb(255 254 250 / 4%), 0 0 0 68px rgb(255 254 250 / 3%);
    pointer-events: none;
}

.home-hero .eyebrow {
    color: #d8c5a9;
}

.home-hero h1 {
    max-width: 730px;
    margin: 13px 0 15px;
    color: #fffefa;
    font-size: clamp(48px, 7vw, 83px);
    line-height: 1.02;
}

.home-hero h1 em {
    color: #e8c5a2;
    font-weight: 500;
}

.hero-copy {
    max-width: 480px;
    margin: 0 0 28px;
    color: rgb(255 254 250 / 78%);
    font-size: 16px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--rust);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .18em;
    line-height: 1.5;
    text-transform: uppercase;
}

.button {
    min-height: 46px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-light {
    background: #f6ede0;
    color: var(--green-deep);
}

.button-light:hover {
    background: #fffefa;
}

.button-dark {
    background: var(--green);
    color: white;
}

.button-dark:hover {
    background: var(--green-deep);
}

.button-outline {
    border-color: var(--line);
    background: var(--surface);
    color: var(--green);
}

.button-outline:hover {
    border-color: var(--green);
}

.section-block {
    margin: 0 0 24px;
}

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

.section-heading h2,
.page-intro h1 {
    margin: 0;
    font-size: clamp(34px, 4vw, 48px);
    line-height: 1.1;
}

.section-heading .eyebrow {
    margin-bottom: 9px;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--green);
    font-size: 12px;
    font-weight: 700;
}

.text-link span {
    color: var(--rust);
    font-size: 17px;
    transition: transform .2s ease;
}

.text-link:hover span {
    transform: translateX(4px);
}

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

.post-card {
    overflow: hidden;
    min-width: 0;
    border: 1px solid rgb(32 43 37 / 6%);
    border-radius: 5px;
    background: var(--surface);
    box-shadow: 0 8px 26px rgb(42 48 39 / 4%);
    transition: box-shadow .25s ease, transform .25s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.post-image {
    position: relative;
    overflow: hidden;
    height: 224px;
    display: block;
    background: var(--sage);
}

.post-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .5s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.04);
}

.post-image-placeholder {
    background:
        radial-gradient(circle at 70% 25%, rgb(232 197 162 / 70%), transparent 22%),
        linear-gradient(140deg, #c6d1c2, #e7dcc9);
}

.post-card-body {
    padding: 24px 24px 27px;
}

.post-card-body h2,
.post-card-body h3 {
    margin: 13px 0 10px;
    font-size: 25px;
    line-height: 1.22;
}

.post-card-body h2 a:hover,
.post-card-body h3 a:hover {
    color: var(--rust);
}

.post-date {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.category-tag {
    padding: 6px 10px;
    display: inline-block;
    border-radius: 99px;
    background: #edf1e9;
    color: var(--green);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
}

.post-excerpt {
    margin: 0 0 18px;
    color: #71766d;
    font-size: 13px;
    line-height: 1.75;
}

.post-card-body .text-link {
    margin-top: auto;
}

.page-intro {
    padding: 84px 0 47px;
    text-align: center;
}

.page-intro .eyebrow {
    margin-bottom: 13px;
}

.page-intro p:last-child {
    margin: 14px 0 0;
    color: var(--muted);
}

.post-grid + .pagination {
    margin-top: 46px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
}

.pagination p {
    color: var(--muted);
    font-size: 12px;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 35px;
    border: 1px dashed #d5d0c5;
    border-radius: 5px;
    color: var(--muted);
    text-align: center;
}

.article-page {
    max-width: 850px;
    margin: 62px auto 0;
}

.article-featured-image {
    width: 100%;
    max-height: 480px;
    margin-bottom: 44px;
    display: block;
    border-radius: 6px;
    background: var(--sage);
    object-fit: cover;
}

.article-header {
    max-width: 720px;
    margin: 0 auto 38px;
    text-align: center;
}

.article-header h1 {
    margin: 18px 0 14px;
    font-size: clamp(42px, 7vw, 70px);
    line-height: 1.08;
}

.article-byline {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.article-byline span,
.comment-card small span {
    padding: 0 7px;
    color: var(--rust);
}

.article-content {
    max-width: 700px;
    margin: 0 auto;
    color: #454b44;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 19px;
    line-height: 1.95;
    overflow-wrap: anywhere;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    margin-top: 1.7em;
    line-height: 1.25;
}

.article-content blockquote {
    margin: 32px 0;
    padding: 6px 0 6px 24px;
    border-left: 3px solid var(--rust);
    color: var(--green);
    font-size: 1.2em;
    font-style: italic;
}

.article-content a {
    color: var(--green);
    text-decoration: underline;
    text-decoration-color: #b8c4b3;
    text-underline-offset: 4px;
}

.article-content img {
    height: auto;
    border-radius: 5px;
}

.article-actions {
    max-width: 700px;
    margin: 36px auto 0;
    padding-bottom: 42px;
    border-bottom: 1px solid var(--line);
}

.comments-section {
    max-width: 700px;
    margin: 36px auto 0;
}

.comments-section h2 {
    font-size: 32px;
}

.comment-card {
    margin: 14px 0;
    padding: 20px 23px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
}

.comment-card p {
    margin: 0 0 10px;
}

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

.search-form {
    max-width: 660px;
    margin: 0 auto 40px;
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
}

.search-form button,
form button[type="submit"] {
    min-height: 46px;
    padding: 0 21px;
    border: 0;
    border-radius: 4px;
    background: var(--green);
    color: white;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: background .2s ease, transform .2s ease;
}

.search-form button:hover,
form button[type="submit"]:hover {
    transform: translateY(-1px);
    background: var(--green-deep);
}

.results-heading {
    margin: 0 0 22px;
    font-size: 26px;
}

.search-result {
    grid-column: span 1;
}

.account-panel {
    max-width: 780px;
    margin: 66px auto 0;
    padding: clamp(28px, 5vw, 52px);
    border: 1px solid rgb(32 43 37 / 7%);
    border-radius: 7px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.account-panel > h1 {
    margin: 0 0 10px;
    font-size: clamp(34px, 5vw, 48px);
}

.account-panel > h2 {
    margin: 38px 0 17px;
    font-size: 27px;
}

.account-panel > p {
    color: var(--muted);
}

.account-panel > a {
    margin: 5px 8px 5px 0;
}

.account-panel form {
    margin: 24px 0 20px;
}

.account-panel form p {
    margin: 0 0 18px;
}

.account-panel form label {
    margin-bottom: 7px;
    display: block;
    color: #51584f;
    font-size: 12px;
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid #dcd8ce;
    border-radius: 4px;
    background: #fffefa;
    color: var(--ink);
    font-size: 14px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.account-panel form p input:focus,
.account-panel form p textarea:focus,
.account-panel form p select:focus,
.search-form input:focus {
    border-color: #829482;
    box-shadow: 0 0 0 3px rgb(130 148 130 / 13%);
    outline: none;
}

textarea {
    min-height: 130px;
    resize: vertical;
}

.account-panel form p input[type="checkbox"] {
    width: 18px;
    min-height: 18px;
    margin-right: 8px;
    accent-color: var(--green);
    vertical-align: middle;
}

.account-panel form p input[type="file"] {
    min-height: 0;
    padding: 9px;
    font-size: 12px;
}

.account-panel form p:has(input[type="checkbox"]) label {
    display: inline;
}

.account-panel form ul.errorlist {
    margin: 5px 0;
    padding: 0;
    color: #a43f34;
    font-size: 12px;
    list-style: none;
}

.account-panel .button {
    margin-top: 9px;
}

.dashboard-welcome {
    margin: 0;
}

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

.stat-card {
    padding: 20px;
    border-radius: 5px;
    background: #edf1e9;
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.stat-card strong {
    margin-top: 6px;
    display: block;
    color: var(--green);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 32px;
}

.dashboard-post {
    margin: 12px 0;
    padding: 17px 19px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fffefa;
}

.dashboard-post h3 {
    margin: 0 0 5px;
    font-size: 20px;
}

.dashboard-post p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.dashboard-post-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-post-actions a {
    color: var(--green);
}

.dashboard-post-actions a:last-child {
    color: var(--rust);
}

.profile-photo {
    width: 160px;
    height: 160px;
    margin: 0 auto 25px;
    display: block;
    border: 5px solid white;
    border-radius: 50%;
    box-shadow: 0 8px 30px rgb(42 48 39 / 12%);
    object-fit: cover;
}

.message-list {
    margin: 17px 0;
    padding: 12px 15px;
    border-radius: 4px;
    background: #f7e9df;
    color: #793f2e;
    font-size: 13px;
}

.danger-copy {
    color: #934a3d;
}

.editor-form .ql-toolbar.ql-snow {
    border-color: #dcd8ce;
    border-radius: 4px 4px 0 0;
    background: #f8f7f1;
}

.editor-form .ql-container.ql-snow {
    min-height: 270px;
    border-color: #dcd8ce;
    border-radius: 0 0 4px 4px;
    background: #fffefa;
    font-family: "DM Sans", "Segoe UI", sans-serif;
    font-size: 15px;
}

.editor-form .ql-editor {
    min-height: 270px;
    line-height: 1.7;
}

.editor-form .ql-editor.ql-blank::before {
    color: #999b91;
    font-style: normal;
}

.site-footer {
    min-height: 100px;
    padding: 23px max(28px, calc((100% - 1160px) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
}

.site-footer p {
    margin: 0;
}

.site-footer p:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-mark {
    width: 29px;
    height: 29px;
    font-size: 17px;
}

@media (max-width: 850px) {
    .site-nav {
        width: min(100% - 36px, 700px);
        padding: 16px 0;
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 10px 20px;
    }

    .nav-links a:last-child {
        padding: 0;
        border: 0;
    }

    .page-shell {
        width: min(100% - 36px, 700px);
    }

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

    .home-hero {
        min-height: 410px;
        margin-top: 24px;
        margin-bottom: 65px;
    }
}

@media (max-width: 560px) {
    .site-nav,
    .page-shell {
        width: calc(100% - 32px);
    }

    .nav-links {
        gap: 9px 16px;
    }

    .nav-links a {
        font-size: 11px;
    }

    .home-hero {
        min-height: 380px;
        padding: 38px 26px;
    }

    .home-hero::after {
        right: -150px;
        opacity: .6;
    }

    .home-hero h1 {
        font-size: 51px;
    }

    .hero-copy {
        font-size: 14px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .post-grid {
        grid-template-columns: 1fr;
        gap: 17px;
    }

    .post-image {
        height: 230px;
    }

    .page-intro {
        padding: 57px 0 35px;
    }

    .article-page {
        margin-top: 34px;
    }

    .article-featured-image {
        margin-bottom: 30px;
    }

    .article-content {
        font-size: 17px;
        line-height: 1.8;
    }

    .search-form {
        align-items: stretch;
        flex-direction: column;
    }

    .account-panel {
        margin-top: 32px;
        padding: 25px 20px;
    }

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

    .stat-card {
        padding: 14px 17px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .stat-card strong {
        margin: 0;
    }

    .dashboard-post {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-footer {
        padding: 20px 16px;
        align-items: flex-start;
        flex-direction: column;
    }

    .pagination {
        gap: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
