:root {
    --bg: #dedec8;
    --green: #577647;
    --accent: #900000;
    --text: #000000;
    --light: #eef0e4;
    --white: #ffffff;
}

/* --------------------------------------------------
   Base
   -------------------------------------------------- */

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--green);
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* --------------------------------------------------
   Header
   -------------------------------------------------- */

.site-header {
    background: var(--green);
    color: var(--white);
}

.site-header a {
    color: var(--white);
    text-decoration: none;
}

.site-header-inner {
    display: flex;
    align-items: center;
    min-height: 110px;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-mark {
    display: block;
    width: 48px;
    height: auto;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    font-style: italic;
    line-height: 1.1;
}

.brand-tagline {
    margin-top: 0.25rem;
    font-size: 0.95rem;
}

/* --------------------------------------------------
   Navigation
   -------------------------------------------------- */

.site-nav {
    background: var(--light);
}

.nav-desktop {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.nav-desktop a,
.nav-links a {
    color: var(--green);
    font-weight: 600;
    text-decoration: none;
}

.nav-desktop a:hover,
.nav-desktop a:focus,
.nav-links a:hover,
.nav-links a:focus {
    color: var(--accent);
}

.site-nav a.active {
    color: var(--accent);
    font-weight: bold;
    text-decoration: underline;
}

.nav-mobile {
    display: none;
}

/* --------------------------------------------------
   Mobile navigation
   -------------------------------------------------- */

@media (max-width: 600px) {

    .nav-desktop {
        display: none;
    }

    .nav-mobile {
        display: block;
    }

    .nav-mobile summary {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
        color: var(--green);
        font-weight: 600;
        cursor: pointer;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding-bottom: 0.75rem;
    }

    .nav-links a {
        padding: 0.5rem 0;
        border-top: 1px solid rgba(87, 118, 71, 0.2);
    }

}

/* --------------------------------------------------
   Services
   -------------------------------------------------- */

.services-intro {
    max-width: 68ch;
    margin-bottom: 2rem;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.service-card {
    background: #eef0e4;          /* Light fern green */
    border: 2px solid var(--green);
    padding: 1.25rem;
    transition: border-color 0.2s ease;
}

.service-card:hover {
    border-color: var(--accent);
}

.service-header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 0.9rem;
}

.service-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    max-width: 24px;
    max-height: 24px;
    flex: 0 0 24px;
    object-fit: contain;
    display: block;
}

.service-header h2 {
    margin: 0;
    color: var(--green);
    font-size: 1.2rem;
    line-height: 1.2;
}

.service-card p:last-of-type {
    margin-bottom: 1rem;
}

.service-card a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.service-card a:hover {
    text-decoration: underline;
}

/* Homepage featured services */

.featured-services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.featured-service {
    background: #eef0e4;
    border: 2px solid var(--green);
    padding: 1.1rem;
}

.featured-service h2 {
    font-size: 1.05rem;
}

.featured-service p {
    font-size: 0.95rem;
    margin: 0.75rem 0 1rem;
}

@media (max-width: 900px) {
    .featured-services {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .featured-services {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

/* --------------------------------------------------
   Insights
   -------------------------------------------------- */

.featured-post {
    background: #eef0e4;
    border: 2px solid var(--green);
    padding: 1.5rem;
    margin: 2rem 0 3rem;
}

.featured-post:hover {
    border-color: var(--accent);
}

.featured-post-category,
.insight-card-category {
    margin-bottom: 0.5rem;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.featured-post h2 {
    margin: 0 0 0.75rem;
    font-size: 1.7rem;
    line-height: 1.2;
}

.featured-post p {
    max-width: 75ch;
    margin: 0 0 1rem;
}

.featured-post-meta,
.insight-card-meta {
    color: var(--green);
    font-size: 0.9rem;
}

.featured-post a,
.insight-card a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.featured-post a:hover,
.insight-card a:hover {
    text-decoration: underline;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.insight-card {
    display: flex;
    flex-direction: column;
    background: #eef0e4;
    border: 2px solid var(--green);
    padding: 1.25rem;
    transition: border-color 0.2s ease;
}

.insight-card:hover {
    border-color: var(--accent);
}

.insight-card h2 {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
    line-height: 1.25;
}

.insight-card p {
    margin: 0 0 1rem;
}

.insight-card-meta {
    margin-top: auto;
    margin-bottom: 0.75rem;
}

@media (max-width: 600px) {
    .featured-post {
        padding: 1.25rem;
    }

    .featured-post h2 {
        font-size: 1.45rem;
    }

    .insights-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

/* --------------------------------------------------
   Insights
   -------------------------------------------------- */

.read-aloud {
    display: flex;
    align-items: center;
    gap: 0.2rem;

    position: sticky;
    top: 0.75rem;
    z-index: 10;

    margin-top: 1rem;
    padding: 0.5rem 0;

    background: transparent;
}

.read-aloud-button,
.read-aloud-restart {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 1.875rem;
    height: 1.875rem;
    padding: 0;

    flex-shrink: 0;

    border: 0;
    border-radius: 50%;

    background: transparent;
    color: var(--green);
    cursor: pointer;

    transition: background 0.15s ease;
}

.read-aloud-restart[hidden] {
    display: none;
}

.read-aloud-icon {
    width: 1.125rem;
    height: 1.125rem;
}

.read-aloud-button:hover,
.read-aloud-restart:hover {
    background: rgba(0, 0, 0, 0.04);
}

.read-aloud-button:focus-visible,
.read-aloud-restart:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* The controls acquire their light surround only when sticky */
.read-aloud.is-sticky .read-aloud-button,
.read-aloud.is-sticky .read-aloud-restart {
    background: rgba(229, 230, 210, 0.96);
}

.read-aloud-active {
    background: rgba(0, 0, 0, 0.04);
    border-radius: 3px;
    transition: background 0.2s ease;
}

.featured-post:hover {
    border-color: var(--accent);
}

.reading-time {
    float: right;
    margin-top: -2.5rem;
    font-size: 0.875rem;
    color: var(--green);
    white-space: nowrap;
}

.featured-post h2 {
    margin: 0 0 0.75rem;
    font-size: 1.7rem;
    line-height: 1.2;
}

.featured-post h2 a,
.insight-card h2 a {
    color: var(--green);
    text-decoration: none;
}

.featured-post h2 a:hover,
.insight-card h2 a:hover {
    color: var(--accent);
}

.featured-post p {
    max-width: 75ch;
}

.featured-post-meta,
.insight-card-meta {
    color: var(--green);
    font-size: 0.9rem;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.insight-card {
    display: flex;
    flex-direction: column;
    background: #eef0e4;
    border: 2px solid var(--green);
    padding: 1.25rem;
    transition: border-color 0.2s ease;
}

.insight-card:hover {
    border-color: var(--accent);
}

.insight-card h2 {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
    line-height: 1.25;
}

.insight-card p {
    margin-top: 0;
}

.insight-card-meta {
    margin-top: auto !important;
    margin-bottom: 0.75rem;
}

.featured-post a.read-more,
.insight-card a.read-more {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.featured-post a.read-more:hover,
.insight-card a.read-more:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {

    .featured-post {
        padding: 1.25rem;
    }

    .featured-post h2 {
        font-size: 1.45rem;
    }

    .insights-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

}

.older-posts {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.older-posts h2 {
    margin-bottom: 1rem;
}

.post-archive {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-archive li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    padding: 0.5rem 0;
}

.post-archive-marker {
    display: block;
    flex: 0 0 16px;
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.post-archive time {
    flex: 0 0 6.5rem;
    white-space: nowrap;
    font-size: 0.9rem;
}

.post-archive a {
    text-decoration: none;
}

.post-archive a:hover {
    text-decoration: underline;
}

.post-back {
    margin-top: 3rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-colour);
}

.post-back a {
    font-size: 0.95rem;
    text-decoration: none;
}

.ai-note {
    margin: 3rem 0 2rem;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid currentColor;
    background: rgba(0, 0, 0, 0.035);
}

.ai-note h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.ai-note p {
    margin-bottom: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --------------------------------------------------
   Main content
   -------------------------------------------------- */

main {
    min-width: 0;
}

h1,
h2,
h3 {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--green);
}

.hero {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.card {
    padding: 1.25rem;
    background: var(--white);
    border-left: 4px solid var(--green);
    border-radius: 6px;
}

/* --------------------------------------------------
   Footer
   -------------------------------------------------- */

.site-footer {
    background: var(--green);
    color: var(--white);
}

.site-footer a {
    color: var(--white);
    text-decoration: none;
}

/* --------------------------------------------------
   Tablet
   -------------------------------------------------- */

@media (max-width: 768px) {

    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

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

    .nav-links {
        gap: 1rem;
    }

}

/* --------------------------------------------------
   Mobile
   -------------------------------------------------- */

@media (max-width: 600px) {

    .site-header-inner {
        min-height: 0;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .brand {
        gap: 0.75rem;
    }

    .brand-mark {
        width: 36px;
    }

    .brand-name {
        font-size: 1.6rem;
    }

    .brand-tagline {
        font-size: 0.85rem;
    }

    .nav-menu summary {
        display: block;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
        color: var(--green);
        font-weight: 600;
        cursor: pointer;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding-top: 0;
        padding-bottom: 0.75rem;
    }

    .nav-links a {
        padding: 0.5rem 0;
        border-top: 1px solid rgba(87, 118, 71, 0.2);
    }

}
