:root {
    --paper: #f3e8d0;
    --ink: #292621;
    --muted: #6f675b;
    --rule: #aeb09a;
    --accent: #9f4636;
    --page-width: 1120px;
    --gutter: 48px;
}

* { box-sizing: border-box; }

html { font-size: 62.5%; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background-color: #5f5b52;
    background-image: linear-gradient(rgba(32, 29, 24, .22), rgba(32, 29, 24, .22)), var(--site-background);
    background-position: center top;
    background-size: cover;
    background-attachment: fixed;
    font-family: var(--gh-font-body, Georgia), "Times New Roman", serif;
    font-size: 1.7rem;
    line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }
h1, h2, h3, h4, h5, h6, .brand-title { font-family: var(--gh-font-heading, Georgia), "Times New Roman", serif; }

.skip-link { position: fixed; z-index: 1000; top: 8px; left: 8px; padding: 10px 14px; color: #fff; background: var(--accent); transform: translateY(-150%); }
.skip-link:focus { color: #fff; transform: translateY(0); }

.site-shell {
    width: min(calc(100% - 48px), var(--page-width));
    min-height: 100vh;
    margin: 32px auto;
    padding: 40px var(--gutter) 22px;
    background-color: var(--paper);
    background-image: url("../images/parchment.webp");
    background-size: 680px;
    box-shadow: 0 0 22px rgba(22, 18, 13, .32);
}

.site-header { margin-bottom: 14px; }

.header-main {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 135px;
}

.brand { display: flex; flex-direction: column; align-items: center; text-align: center; }
.brand img { max-width: min(440px, 100%); max-height: 110px; object-fit: contain; }
.brand-title { font-size: clamp(4.8rem, 6vw, 7rem); line-height: .98; letter-spacing: -.03em; }
.brand-subtitle { margin-top: 14px; color: var(--accent); font-size: 2.3rem; line-height: 1; }

.search-launcher {
    position: absolute;
    top: 44px;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 245px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #8d8578;
    border-radius: 0;
    color: #625b50;
    background: rgba(255, 255, 255, .18);
    cursor: pointer;
    text-align: left;
}
.search-launcher:hover, .search-launcher:focus-visible { color: var(--accent); border-color: var(--accent); outline: 2px solid transparent; }

.site-navigation { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.nav { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: center; margin: 0; padding: 0; list-style: none; }
.nav li { display: flex; align-items: center; }
.nav li + li::before { content: ""; width: 1px; height: 22px; background: var(--rule); }
.nav a { display: block; padding: 15px 27px; font-size: 1.35rem; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.nav-current a { color: var(--accent); }
.mobile-navigation { display: none; }

.home-hero { margin: 0 0 36px; height: 245px; overflow: hidden; }
.home-hero {
    mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent), linear-gradient(to bottom, transparent, #000 10%, #000 88%, transparent);
    mask-composite: intersect;
}
.home-hero:empty { display: none; }
.home-hero img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.34) saturate(.72) contrast(1.04); }

.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 38px; }
.content-main { min-width: 0; }
.home-intro { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
.home-intro h1, .listing-header h1, .post-header h1 { margin: 0 0 10px; font-weight: 400; letter-spacing: -.025em; line-height: 1.1; }
.home-intro h1 { font-size: 4.4rem; }
.home-intro p { max-width: 720px; margin: 0; }

.post-feed { border-top: 1px solid var(--rule); }
.home-intro + .post-feed { border-top: 0; }
.post-card { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 28px; padding: 26px 0; border-bottom: 1px solid var(--rule); }
.post-card:not(:has(.post-card-image)) { grid-template-columns: 1fr; }
.post-card-image { aspect-ratio: 4 / 3; overflow: hidden; background: rgba(90, 77, 57, .12); }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.2) saturate(.78); transition: transform .25s ease; }
.post-card-image:hover img { transform: scale(1.025); }
.post-card-meta { margin: 0 0 8px; color: var(--accent); font-size: 1.12rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.post-card h2 { margin: 0 0 8px; font-size: 2.8rem; font-weight: 400; line-height: 1.15; }
.post-card-content > p:not(.post-card-meta) { margin: 0 0 10px; }
.read-more { color: var(--accent); font-style: italic; }

.sidebar { padding-left: 24px; border-left: 1px solid var(--rule); }
.sidebar-section + .sidebar-section { margin-top: 38px; }
.sidebar-section h2 { display: flex; gap: 14px; align-items: center; margin: 0 0 10px; color: var(--accent); font-size: 1.9rem; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; }
.sidebar-section h2::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.archive-list ul { margin: 0; padding: 0; list-style: none; }
.archive-list li { border-bottom: 1px dotted rgba(95, 88, 74, .35); }
.archive-list a { display: grid; grid-template-columns: 82px 1fr; gap: 8px; padding: 6px 0; line-height: 1.25; }
.archive-list span { color: var(--muted); font-size: 1.3rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery-grid a { aspect-ratio: 4 / 3; overflow: hidden; background: rgba(90, 77, 57, .12); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.35) saturate(.68); }

.listing-header { margin: 36px 0; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
.listing-header > p:first-child { margin: 0 0 5px; color: var(--accent); letter-spacing: .08em; text-transform: uppercase; }
.listing-header h1 { font-size: 5rem; }

.content-layout-post { padding-top: 30px; }
.post-header { margin-bottom: 26px; }
.post-kicker { display: inline-block; margin-bottom: 10px; color: var(--accent); font-size: 1.35rem; letter-spacing: .08em; text-transform: uppercase; }
.post-header h1 { font-size: clamp(4.2rem, 5vw, 6.2rem); }
.post-meta { margin: 0; color: var(--muted); font-size: 1.45rem; }
.post-feature { margin: 0 0 32px; }
.post-feature img { width: 100%; max-height: 620px; object-fit: cover; filter: sepia(.18) saturate(.82); }
.post-feature figcaption { margin-top: 8px; color: var(--muted); font-size: 1.3rem; font-style: italic; }

.gh-content { font-size: 1.85rem; line-height: 1.68; }
.gh-content > * { max-width: 740px; margin-right: auto; margin-left: auto; }
.gh-content > h2 { margin-top: 1.8em; font-size: 3.2rem; font-weight: 400; line-height: 1.2; }
.gh-content > h3 { margin-top: 1.6em; font-size: 2.5rem; font-weight: 400; }
.gh-content :where(a) { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.gh-content > blockquote:not(.kg-blockquote-alt) { padding-left: 24px; border-left: 3px solid var(--accent); color: #4a4339; font-size: 2.2rem; font-style: italic; }
.gh-content img { max-width: 100%; }
.gh-content .kg-width-wide { max-width: 920px; }
.gh-content .kg-width-full { max-width: none; }

.post-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 42px; padding: 16px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); color: var(--accent); }
.related-posts { margin-top: 36px; }
.related-posts h2 { color: var(--accent); font-size: 1.7rem; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.related-grid a { display: grid; grid-template-columns: 84px 1fr; gap: 10px; align-items: center; border-right: 1px solid var(--rule); }
.related-grid img { width: 84px; height: 64px; object-fit: cover; filter: sepia(.28) saturate(.72); }
.comments-section { margin-top: 46px; padding-top: 24px; border-top: 1px solid var(--rule); }

.page-full { max-width: 820px; margin: 48px auto; }
.page-header { text-align: center; }
.page-header > p { color: var(--muted); font-size: 2rem; }

.pagination { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; margin-top: 26px; }
.pagination a { color: var(--accent); }
.site-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 50px; padding-top: 18px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 1.35rem; }
.footer-tools, .member-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 16px; }
.member-links a { color: var(--accent); }
.site-footer .nav a { padding: 0 0 0 18px; font-size: 1.2rem; }
.site-footer .nav li + li::before { display: none; }
.error-page { padding: 100px 20px; text-align: center; }
.error-page p { margin: 0; color: var(--accent); font-size: 7rem; }
.error-page h1 { font-size: 4rem; font-weight: 400; }
.private-page { max-width: 620px; margin: 70px auto 100px; text-align: center; }
.private-kicker { margin: 0; color: var(--accent); font-size: 1.35rem; letter-spacing: .08em; text-transform: uppercase; }
.private-page h1 { margin: 8px 0; font-size: 5rem; font-weight: 400; }
.private-form { margin-top: 30px; text-align: left; }
.private-form label { display: block; margin-bottom: 8px; }
.private-form > div { display: flex; }
.private-form input { min-width: 0; flex: 1; height: 46px; padding: 0 12px; border: 1px solid #8d8578; border-radius: 0; background: rgba(255, 255, 255, .18); }
.private-form button { height: 46px; padding: 0 22px; border: 1px solid var(--accent); border-radius: 0; color: #fff; background: var(--accent); cursor: pointer; }
.private-error { color: #8b2419; }

@media (max-width: 1080px) {
    :root { --gutter: 30px; }
    .site-shell { width: min(calc(100% - 28px), var(--page-width)); margin: 14px auto; }
    .brand { align-items: flex-start; margin-right: auto; text-align: left; }
    .brand-title { font-size: 5rem; }
    .search-launcher { top: 45px; }
    .nav a { padding: 14px 15px; font-size: 1.2rem; }
    .content-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 28px; }
    .post-card { grid-template-columns: 240px minmax(0, 1fr); }
}

@media (max-width: 760px) {
    :root { --gutter: 20px; }
    html { font-size: 58%; }
    body { background-attachment: scroll; }
    .site-shell { width: 100%; margin: 0; padding-top: 22px; box-shadow: none; }
    .header-main { display: block; min-height: 0; padding-bottom: 16px; }
    .brand { align-items: center; text-align: center; }
    .brand-title { font-size: 4.6rem; }
    .brand-subtitle { margin-top: 8px; font-size: 1.8rem; }
    .search-launcher { position: static; width: 100%; margin-top: 18px; }
    .site-navigation { display: none; }
    .mobile-navigation { display: block; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
    .mobile-navigation summary { padding: 12px 0; color: var(--accent); font-size: 1.35rem; letter-spacing: .08em; list-style: none; text-align: center; text-transform: uppercase; cursor: pointer; }
    .mobile-navigation summary::-webkit-details-marker { display: none; }
    .mobile-navigation nav { border-top: 1px solid var(--rule); }
    .mobile-navigation .nav { display: block; padding: 8px 0; }
    .mobile-navigation .nav li { display: block; text-align: center; }
    .mobile-navigation .nav li + li::before { display: none; }
    .mobile-navigation .nav a { padding: 10px; white-space: normal; }
    .home-hero { height: 180px; margin-bottom: 26px; }
    .content-layout { display: block; }
    .post-card { grid-template-columns: 1fr; gap: 16px; }
    .post-card-image { aspect-ratio: 16 / 10; }
    .sidebar { margin-top: 42px; padding: 30px 0 0; border-top: 1px solid var(--rule); border-left: 0; }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .post-header h1 { font-size: 4rem; }
    .related-grid { grid-template-columns: 1fr; }
    .related-grid a { border-right: 0; border-bottom: 1px solid var(--rule); padding-bottom: 10px; }
    .site-footer { display: block; text-align: center; }
    .footer-tools, .member-links { justify-content: center; margin-top: 12px; }
    .site-footer .nav a { padding: 5px; }
    .pagination .page-number { order: -1; width: 100%; text-align: center; }
    .private-form > div { display: block; }
    .private-form input, .private-form button { width: 100%; }
    .private-form button { margin-top: 10px; }
}

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

/* Editor output: preserve card styles supplied by Ghost and constrain raw HTML. */
.gh-content { overflow-wrap: anywhere; }
.gh-content > pre { overflow-x: auto; padding: 16px; background: rgba(90, 77, 57, .08); }
.gh-content > table { display: block; overflow-x: auto; border-collapse: collapse; }
.gh-content th, .gh-content td { padding: 8px 12px; border: 1px solid var(--rule); }
.gh-content iframe, .gh-content video, .gh-content audio { max-width: 100%; }
.gh-content .kg-embed-card > iframe[src*="youtube.com"],
.gh-content .kg-embed-card > iframe[src*="youtube-nocookie.com"],
.gh-content .kg-embed-card > iframe[src*="player.vimeo.com"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.gh-content figcaption { color: var(--muted); font-size: 1.3rem; text-align: center; }
.gh-content .kg-button-card a, .gh-content .kg-bookmark-container { text-decoration: none; }

/* Wide editor cards need room; move the archive below only on affected posts. */
.content-layout-post:has(.kg-width-wide, .kg-width-full) { display: block; }
.content-layout-post:has(.kg-width-wide, .kg-width-full) > .sidebar { margin-top: 42px; padding: 30px 0 0; border-top: 1px solid var(--rule); border-left: 0; }
.page-full:has(.kg-width-wide, .kg-width-full) { max-width: none; }
.gh-content > .kg-width-wide { width: 100%; max-width: 920px; }
.gh-content > .kg-width-full { width: calc(100% + 2 * var(--gutter)); max-width: none; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); }

.member-links button { padding: 0; border: 0; color: var(--accent); background: transparent; cursor: pointer; }
.recommendations { margin: 24px 0 0; padding: 0; list-style: none; }
.recommendation + .recommendation { margin-top: 18px; }
.recommendation-favicon img { width: 28px; height: 28px; object-fit: contain; }
.recommendation-title, .recommendation-description { margin: 4px 0; }
.recommendation-url { color: var(--muted); font-size: 1.3rem; }

/* Keep the editor's card typography and full-width sections intact. */
.gh-content > .kg-width-full:not(:has(figcaption)) + .kg-width-full { margin-top: 0; }
.gh-content > .kg-width-full:not(:has(figcaption)):has(+ .kg-width-full) { margin-bottom: 0; }
.kg-content-wide { max-width: 920px; margin-inline: auto; }
.content-cta { padding: 24px; border: 1px solid var(--rule); text-align: center; }
.content-cta h2 { margin-top: 0; font-size: 2.6rem; }
.content-cta a { display: inline-block; padding: 8px; }
.listing-cover { width: 100%; max-height: 320px; object-fit: cover; margin-bottom: 24px; }
.author-image { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin-bottom: 16px; }

/* Preserve line breaks in owner-supplied homepage text. */
.home-intro > p { white-space: pre-line; }

/* Homepage structure supplied in Texts.docx. */
.brand-title { margin: 0; font-weight: 400; }
.home-quotation { margin: 0; text-align: left; }
.home-quotation blockquote { margin: 0; white-space: pre-line; font-size: 1.5rem; font-weight: 400; font-style: italic; }
.home-quotation figcaption { margin-top: 12px; font-size: 1.4rem; }
.home-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
.home-overview h2 { margin: 0 0 20px; color: var(--accent); font-size: 2.8rem; font-weight: 400; }
.home-intro h3 { margin: 0 0 14px; font-size: 2.4rem; font-weight: 400; }
.home-visitors { margin-top: 38px; }
.home-visitors p { color: var(--muted); }
.home-section { margin-top: 48px; scroll-margin-top: 20px; }
.home-section > h2 { font-size: 3rem; font-weight: 400; }
.contact-text { white-space: pre-line; overflow-wrap: anywhere; }
@media (max-width: 760px) {
    .home-overview { grid-template-columns: 1fr; gap: 24px; }
}

/* Homepage follows the supplied two-column reference; inner pages retain their navigation. */
.home-template .site-header .site-navigation,
.home-template .site-header .mobile-navigation,
.home-template .site-header .search-launcher,
.home-template .brand-subtitle { display: none; }
.home-template .header-main { min-height: 90px; }
.home-template .brand-title { font-size: clamp(3.4rem, 5vw, 5.2rem); }
.home-template .home-hero { height: auto; aspect-ratio: 1157 / 411; margin-bottom: 32px; }
.home-template .home-quotation { margin: 0 0 48px; }
.home-template .home-quotation blockquote { width: fit-content; max-width: 100%; margin: 0 auto; font-size: 1.4rem; line-height: 1.5; }
.home-template .home-quotation figcaption { font-size: 1.2rem; margin-top: 18px; }
.home-reference-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
.home-reference-columns h2 { margin: 0 0 24px; color: var(--accent); font-size: 2rem; font-weight: 400; }
.home-reference-about p { margin: 0; font-size: 1.6rem; line-height: 1.8; }
.home-reference-directory .nav { display: block; list-style: decimal; padding-left: 22px; }
.home-reference-directory .nav li { display: list-item; padding-left: 4px; margin-bottom: 9px; }
.home-reference-directory .nav li::before { display: none; }
.home-reference-directory .nav a { padding: 5px 0; font-size: 1.5rem; letter-spacing: normal; text-transform: none; white-space: normal; }
.home-reference-directory .home-visitors { margin-top: 40px; }
.home-reference-directory .home-visitors h2 { color: var(--ink); font-size: 1.6rem; margin-bottom: 16px; }
.home-reference-directory .home-visitors p { font-size: 1.2rem; }
.home-search { margin-top: 24px; border: 0; border-bottom: 1px solid var(--rule); background: transparent; color: var(--muted); padding: 4px 0; cursor: pointer; font-size: 1.4rem; }
@media (max-width: 600px) {
    .home-reference-columns { grid-template-columns: 1fr; gap: 32px; }
    .home-template .home-quotation { margin-bottom: 32px; }
}
