/* ==========================================================================
   Heritage — the Allen & Emily theme
   Hand-written, no build step. Sections:
   1. Fonts & tokens   2. Base   3. Layout & utilities   4. Buttons & pills
   5. Header & nav     6. Footer 7. Homepage           8. Pig cards & listing
   9. Pig detail       10. Post cards & archives       11. Article
   12. Ghost content (gh-content + cards)              13. Forms & subscribe
   14. Pages & errors
   ========================================================================== */

/* 1. Fonts & tokens
   ========================================================================== */

@font-face {
    font-family: "Fraunces";
    src: url("../fonts/fraunces-latin-standard-normal.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Fraunces";
    src: url("../fonts/fraunces-latin-standard-italic.woff2") format("woff2");
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("../fonts/inter-latin-wght-italic.woff2") format("woff2");
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

:root {
    --bone: #f7f3ec;
    --bone-recessed: #f2ede3;
    --card: #fffcf6;

    --moss: #2f3a2e;
    --moss-rule: #45503f;

    --clay: #9c4428;
    --clay-dark: #72301b;
    --clay-lifted: #e7b98e;
    --clay-link-on-dark: #f2c9a0;

    --ink: #23231f;
    --ink-soft: #42403a;
    --ink-body: #2f2d28;
    --muted: #5f5b50;
    --muted-soft: #6b665a;

    --rule: #e0d8ca;
    --rule-card: #e5ddcf;
    --rule-strong: #c9bfad;
    --reserved: #bfb6a4;

    --on-dark: #e8e3d6;
    --on-dark-soft: #cfc8b9;
    --on-dark-strong: #fbf8f2;
    --on-dark-muted: #8c8679;

    --font-display: var(--gh-font-heading, "Fraunces"), Georgia, "Times New Roman", serif;
    --font-body: var(--gh-font-body, "Inter"), system-ui, -apple-system, "Segoe UI", sans-serif;

    --container: 1200px;
    --gutter: 24px;
    --measure: 760px;
    --radius: 2px;
    --section-y: 96px;
}

@media (max-width: 960px) {
    :root { --section-y: 72px; }
}

@media (max-width: 600px) {
    :root { --gutter: 18px; --section-y: 48px; }
}

/* 2. Base
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 24px;
}

body {
    margin: 0;
    background: var(--bone);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

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

img {
    height: auto;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
    margin: 0;
}

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

a:hover {
    color: var(--clay-dark);
}

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

:focus-visible {
    outline: 2px solid var(--clay);
    outline-offset: 3px;
}

.icon {
    flex-shrink: 0;
}

/* 3. Layout & utilities
   ========================================================================== */

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex-grow: 1;
}

.container {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.section {
    padding: var(--section-y) 0;
}

.section-recessed {
    background: var(--bone-recessed);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.section-moss {
    background: var(--moss);
    color: var(--on-dark);
}

.section-tight-top {
    padding-top: 24px;
}

.section-head-lede {
    max-width: 620px;
    margin-top: 12px;
}

.page-extra {
    padding: 64px 0;
}

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

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 100;
    padding: 12px 18px;
    background: var(--ink);
    color: var(--on-dark-strong);
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 16px;
    color: var(--on-dark-strong);
}

.eyebrow {
    margin: 0 0 16px;
    color: var(--clay);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.section-moss .eyebrow,
.hero .eyebrow {
    color: var(--clay-lifted);
}

.display-1,
.display-2,
.display-3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-variation-settings: "opsz" 144;
}

.display-1 {
    font-size: clamp(38px, 5.4vw, 62px);
    line-height: 1.04;
    letter-spacing: -0.015em;
}

.display-2 {
    font-size: clamp(30px, 3.8vw, 44px);
    line-height: 1.08;
    letter-spacing: -0.012em;
}

.display-3 {
    font-size: 25px;
    line-height: 1.2;
    font-variation-settings: "opsz" 36;
}

.lede {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.6;
}

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

.section-head-ruled {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--rule);
}

.text-link {
    color: var(--clay);
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 2px;
}

.section-moss .text-link {
    color: var(--clay-link-on-dark);
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 13px;
}

.breadcrumb li + li::before {
    content: "/";
    margin-right: 10px;
    color: var(--rule-strong);
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--ink);
}

.breadcrumb [aria-current] {
    color: var(--ink);
}

/* The whole card is clickable through its title link. */
.stretched-link {
    color: inherit;
    text-decoration: none;
}

.stretched-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.above-stretch {
    position: relative;
    z-index: 2;
}

/* 4. Buttons & pills
   ========================================================================== */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 28px;
    border: 1px solid var(--clay);
    border-radius: var(--radius);
    background: var(--clay);
    color: #fff8f0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.button:hover {
    background: var(--clay-dark);
    border-color: var(--clay-dark);
    color: #fff8f0;
}

.button-secondary {
    border-color: var(--rule-strong);
    background: var(--card);
    color: var(--ink);
}

.button-secondary:hover {
    border-color: var(--ink-soft);
    background: var(--card);
    color: var(--ink);
}

.button-outline-light {
    border-color: rgba(251, 248, 242, 0.45);
    background: transparent;
    color: var(--on-dark-strong);
    font-weight: 500;
}

.button-outline-light:hover {
    border-color: var(--on-dark-strong);
    background: rgba(251, 248, 242, 0.08);
    color: var(--on-dark-strong);
}

.button-small {
    min-height: 44px;
    padding: 0 20px;
    font-size: 14px;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.pill {
    display: inline-block;
    padding: 7px 12px;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.pill-available {
    background: var(--moss);
    color: var(--on-dark);
}

.pill-reserved {
    background: var(--reserved);
    color: #2b2a26;
}

.pill-clay {
    background: var(--clay);
    color: #fff8f0;
}

.pill-light {
    background: var(--bone-recessed);
    color: var(--ink-soft);
}

/* 5. Header & nav
   ========================================================================== */

.site-header {
    position: relative;
    z-index: 20;
    border-bottom: 1px solid var(--rule);
    background: var(--bone);
}

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

.wordmark {
    display: block;
    color: var(--ink);
    text-decoration: none;
}

.wordmark:hover {
    color: var(--ink);
}

.wordmark-name {
    display: block;
    font-family: var(--font-display);
    font-size: 25px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0.01em;
}

.wordmark-tagline {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.wordmark-on-dark,
.wordmark-on-dark:hover {
    color: var(--on-dark-strong);
}

.wordmark-on-dark .wordmark-tagline {
    color: var(--on-dark-muted);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.site-nav .nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 26px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav .nav a {
    display: inline-block;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    color: var(--ink);
    font-size: 14.5px;
    font-weight: 500;
    text-decoration: none;
}

.site-nav .nav a:hover {
    color: var(--clay);
}

.site-nav .nav-current a {
    border-bottom-color: var(--clay);
}

.site-nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    cursor: pointer;
}

.icon-button:hover {
    color: var(--clay);
}

.nav-quiet {
    color: var(--ink-soft);
    font-size: 14.5px;
    font-weight: 500;
    text-decoration: none;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid var(--rule);
    background: var(--card);
    color: var(--ink);
    cursor: pointer;
}

.nav-toggle .icon-menu-close {
    display: none;
}

.nav-toggle[aria-expanded="true"] .icon-menu-open {
    display: none;
}

.nav-toggle[aria-expanded="true"] .icon-menu-close {
    display: inline;
}

@media (max-width: 1060px) {
    .site-header-inner {
        min-height: 72px;
    }

    .wordmark-name {
        font-size: 22px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    /* Hidden until JS opens it; visible without JS so nothing is unreachable. */
    .js .site-nav {
        display: none;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px var(--gutter) 24px;
        border-bottom: 1px solid var(--rule);
        background: var(--bone);
        box-shadow: 0 18px 30px -24px rgba(35, 35, 31, 0.45);
    }

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

    .site-nav .nav {
        flex-direction: column;
        gap: 0;
    }

    .site-nav .nav a {
        display: block;
        padding: 14px 0;
        border-bottom: 1px solid var(--rule);
        font-size: 17px;
    }

    .site-nav .nav-current a {
        border-bottom-color: var(--rule);
        color: var(--clay);
    }

    .site-nav-actions {
        flex-wrap: wrap;
        justify-content: space-between;
        padding-top: 18px;
    }

    .site-nav-actions .button {
        flex-grow: 1;
    }
}

/* 6. Footer
   ========================================================================== */

.site-footer {
    padding: 72px 0 36px;
    background: var(--ink);
    color: var(--on-dark-soft);
}

.site-footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px 64px;
    padding-bottom: 44px;
    border-bottom: 1px solid #3a3934;
}

.site-footer-brand {
    flex: 1 1 300px;
    max-width: 380px;
}

.site-footer-brand p {
    margin-top: 22px;
    font-size: 14.5px;
    line-height: 1.65;
}

.social {
    display: flex;
    gap: 6px;
    margin: 22px 0 0 -12px;
    padding: 0;
    list-style: none;
}

.social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--on-dark-soft);
}

.social a:hover {
    color: var(--on-dark-strong);
}

.site-footer-nav {
    flex: 1 1 320px;
}

.site-footer-nav .nav {
    columns: 2 160px;
    column-gap: 40px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer-nav .nav li {
    break-inside: avoid;
}

.site-footer-nav .nav a {
    display: inline-block;
    padding: 6px 0;
    color: var(--on-dark-soft);
    font-size: 14.5px;
    text-decoration: none;
}

.site-footer-nav .nav a:hover {
    color: var(--on-dark-strong);
}

.site-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
    padding-top: 28px;
    color: var(--on-dark-muted);
    font-size: 13px;
}

/* 7. Homepage
   ========================================================================== */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: clamp(520px, 72vh, 700px);
    background: #2b2a26;
    color: var(--on-dark-strong);
    overflow: hidden;
}

.hero-media,
.hero-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-media img {
    object-fit: cover;
    object-position: 50% 42%;
    opacity: 0.84;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(25, 26, 22, 0.88) 0%, rgba(25, 26, 22, 0.6) 44%, rgba(25, 26, 22, 0.1) 80%);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding-top: 72px;
    padding-bottom: 72px;
}

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

.hero-copy .display-1 {
    color: var(--on-dark-strong);
}

.hero-copy .lede {
    max-width: 520px;
    margin-top: 24px;
    color: #ded8cb;
    font-size: 18px;
}

.hero-copy .button-row {
    margin-top: 36px;
}

@media (max-width: 700px) {
    .hero {
        align-items: flex-end;
        min-height: 560px;
    }

    .hero::after {
        background: linear-gradient(180deg, rgba(25, 26, 22, 0.3) 0%, rgba(25, 26, 22, 0.6) 45%, rgba(25, 26, 22, 0.93) 100%);
    }

    .hero-content {
        padding-top: 40px;
        padding-bottom: 32px;
    }

    .hero-copy .lede {
        font-size: 16px;
    }

    .hero-copy .button-row {
        flex-direction: column;
    }
}

.trust-strip {
    border-bottom: 1px solid var(--rule);
    background: var(--bone-recessed);
}

.trust-strip p {
    padding: 26px 0;
    color: var(--ink-soft);
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-align: center;
}

.home-available .section-head p {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 14px;
}

.notice-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    margin-top: 32px;
    padding: 22px 28px;
    border: 1px solid var(--rule);
    background: var(--bone-recessed);
}

.notice-bar p {
    color: var(--ink-soft);
    font-size: 15px;
}

.empty-state {
    padding: 48px 32px;
    border: 1px dashed var(--rule-strong);
    background: var(--card);
    text-align: center;
}

.empty-state h3 {
    margin-bottom: 10px;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
}

.empty-state p {
    max-width: 480px;
    margin: 0 auto 22px;
    color: var(--muted);
}

/* Program split */
.split {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.split-copy {
    flex: 1 1 460px;
    padding: var(--section-y) 64px var(--section-y) 0;
}

.split-media {
    position: relative;
    flex: 1 1 420px;
    min-height: 420px;
}

.split-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.split-copy .display-2 {
    margin-bottom: 24px;
    color: var(--on-dark-strong);
}

.split-copy p {
    margin-bottom: 36px;
    color: var(--on-dark-soft);
    font-size: 17px;
    line-height: 1.65;
}

@media (max-width: 920px) {
    .split > .container {
        padding: 0;
    }

    .split-copy {
        order: 2;
        padding: 48px var(--gutter);
    }

    .split-media {
        order: 1;
        min-height: 280px;
    }
}

/* Start here */
.start-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.start-card {
    position: relative;
    flex: 1 1 300px;
    padding: 34px 30px;
    border: 1px solid var(--rule-card);
    background: var(--card);
    transition: border-color 0.15s ease;
}

.start-card:hover {
    border-color: var(--rule-strong);
}

.start-card-number {
    display: block;
    margin-bottom: 18px;
    color: var(--rule-strong);
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 600;
    line-height: 1;
}

.start-card h3 {
    margin-bottom: 12px;
    font-family: var(--font-display);
    font-size: 23px;
    font-weight: 600;
    line-height: 1.25;
}

.start-card p {
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 15px;
}

.start-card-time {
    color: var(--clay);
    font-size: 14px;
    font-weight: 600;
}

/* Journal on the homepage */
.journal-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.journal-feature {
    flex: 1 1 520px;
}

.journal-list {
    display: flex;
    flex: 1 1 380px;
    flex-direction: column;
}

.journal-list .post-card + .post-card {
    border-top: 1px solid var(--rule);
}

/* Subscribe band */
.subscribe-band {
    text-align: center;
}

.subscribe-band .inner {
    max-width: 720px;
    margin: 0 auto;
}

.subscribe-band .display-2 {
    margin-bottom: 18px;
}

.subscribe-band .lede {
    margin-bottom: 34px;
}

.subscribe-band .subscribe-form {
    max-width: 520px;
    margin: 0 auto;
}

.subscribe-band .fine-print {
    margin-top: 20px;
}

.fine-print {
    color: var(--muted-soft);
    font-size: 13.5px;
    line-height: 1.55;
}

/* 8. Pig cards & listing
   ========================================================================== */

.pig-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 28px;
}

.pig-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--rule-card);
    background: var(--card);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.pig-card:hover {
    border-color: var(--rule-strong);
}

.pig-card[hidden] {
    display: none;
}

.pig-card-media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--bone-recessed);
    overflow: hidden;
}

.pig-card-media img,
.pig-card-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pig-card .pill-status {
    position: absolute;
    top: 14px;
    left: 14px;
}

.pill-stack {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.pig-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 24px 22px 22px;
}

.pig-card-title {
    margin-bottom: 6px;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
}

.pig-card-meta {
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.pig-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--rule-card);
}

.pig-card-price {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 600;
    line-height: 1;
}

.pig-card.is-reserved .pig-card-media img {
    filter: grayscale(0.4);
    opacity: 0.85;
}

.pig-card.is-reserved .pig-card-title,
.pig-card.is-reserved .pig-card-price {
    color: var(--muted-soft);
}

/* Listing page header */
.page-head {
    padding: 48px 0 44px;
    border-bottom: 1px solid var(--rule);
    background: var(--bone-recessed);
}

.page-head .breadcrumb {
    margin-bottom: 26px;
}

.page-head-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 36px 48px;
}

.page-head-copy {
    flex: 1 1 540px;
}

.page-head-copy .display-1 {
    margin-bottom: 18px;
    font-size: clamp(36px, 4.6vw, 52px);
}

.page-head-copy .lede {
    max-width: 580px;
    color: var(--ink-soft);
    font-size: 18px;
}

.stat-list {
    display: grid;
    flex: 1 1 260px;
    max-width: 340px;
    grid-template-columns: 1fr auto;
    row-gap: 11px;
    padding-top: 18px;
    border-top: 1px solid #ddd3c2;
    font-size: 14.5px;
}

.stat-list dt {
    color: var(--muted);
}

.stat-list dd {
    font-weight: 600;
    text-align: right;
}

/* Filters */
.filter-bar {
    border-bottom: 1px solid var(--rule);
}

.filter-bar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    padding-top: 18px;
    padding-bottom: 18px;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.filter-pill {
    min-height: 44px;
    padding: 0 19px;
    border: 1px solid #d5cbb9;
    border-radius: 999px;
    background: transparent;
    color: var(--ink-soft);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
}

.filter-pill:hover {
    border-color: var(--ink-soft);
}

.filter-pill[aria-pressed="true"] {
    border-color: var(--moss);
    background: var(--moss);
    color: var(--bone-recessed);
    font-weight: 600;
}

.filter-pill[hidden] {
    display: none;
}

.sort-control {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--muted);
    font-size: 13.5px;
}

.sort-control select {
    min-height: 44px;
    padding: 0 36px 0 14px;
    border: 1px solid #d5cbb9;
    border-radius: var(--radius);
    background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235f5b50' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center;
    color: var(--ink);
    font-size: 14px;
    -webkit-appearance: none;
    appearance: none;
}

/* Without JS the filters do nothing, so hide them. */
.filter-bar[data-needs-js] {
    display: none;
}

.js .filter-bar[data-needs-js] {
    display: block;
}

.pig-listing {
    padding: 48px 0 var(--section-y);
}

.pig-listing-empty-filter {
    margin-top: 28px;
}

/* Reserving steps (page content rendered as numbered columns) */
.steps .display-2 {
    max-width: 560px;
    margin-bottom: 48px;
    color: var(--on-dark-strong);
}

.steps-content ol {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.steps-content ol > li {
    counter-increment: step;
    color: var(--on-dark-soft);
    font-size: 15.5px;
    line-height: 1.65;
}

.steps-content ol > li::before {
    content: counter(step, decimal-leading-zero);
    display: block;
    margin-bottom: 16px;
    color: var(--clay-lifted);
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 600;
    line-height: 1;
}

.steps-content ol > li strong,
.steps-content ol > li b {
    display: block;
    margin-bottom: 10px;
    color: var(--on-dark-strong);
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
}

.steps-content > p {
    max-width: 640px;
    margin-bottom: 20px;
    color: var(--on-dark-soft);
}

.steps-content a {
    color: var(--clay-link-on-dark);
}

.steps-foot {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--moss-rule);
}

/* 9. Pig detail
   ========================================================================== */

.pig-top {
    padding: 24px 0 72px;
}

.pig-top .breadcrumb {
    margin-bottom: 32px;
}

.pig-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 48px 56px;
}

.pig-hero-media {
    flex: 1 1 520px;
}

.pig-hero-media img {
    width: 100%;
    aspect-ratio: 5 / 4;
    object-fit: cover;
}

.pig-hero-media figcaption {
    margin-top: 12px;
    color: var(--muted);
    font-size: 13.5px;
}

.pig-hero-info {
    flex: 1 1 380px;
}

.pig-hero-info .pill {
    margin: 0 6px 20px 0;
}

.pig-hero-info .display-1 {
    margin-bottom: 10px;
    font-size: clamp(38px, 4.4vw, 52px);
}

.pig-sub {
    margin-bottom: 28px;
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.price-box {
    padding: 26px;
    border: 1px solid var(--rule);
    background: var(--bone-recessed);
}

.price-box-price {
    display: block;
    margin-bottom: 22px;
    font-family: var(--font-display);
    font-size: 44px;
    font-weight: 600;
    line-height: 1;
}

.price-box .button-row .button {
    flex: 1 1 170px;
}

.price-box .fine-print {
    margin-top: 18px;
}

.price-box-reserved p {
    margin-bottom: 18px;
    color: var(--ink-soft);
}

.pig-body {
    padding-bottom: 24px;
}

.included {
    padding: 80px 0;
    border-top: 1px solid var(--rule);
}

.included-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 32px 56px;
}

.included-layout > h2 {
    flex: 1 1 300px;
}

.included-content {
    flex: 1 1 560px;
}

.included-content ul {
    margin: 0;
    padding: 0;
    list-style: none;
    border-bottom: 1px solid var(--rule);
}

.included-content li {
    position: relative;
    padding: 20px 0 20px 38px;
    border-top: 1px solid var(--rule);
    color: var(--muted);
    font-size: 15px;
}

.included-content li::before {
    content: "";
    position: absolute;
    top: 23px;
    left: 0;
    width: 20px;
    height: 20px;
    background: var(--clay);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5.2 5.2L20 7'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5.2 5.2L20 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.included-content li strong,
.included-content li b {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
    font-size: 16.5px;
}

.included-content > p {
    margin-bottom: 18px;
    color: var(--muted);
}

/* Pedigree snippet — paste the HTML from the setup guide into a pig post. */
.pedigree {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 8px 0;
    font-family: var(--font-body);
}

/* Line up with the text on the left, use the extra width on the right. */
.gh-canvas > .pedigree {
    grid-column: main-start / wide-end;
}

.pedigree-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.pedigree-label {
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.pedigree-box {
    padding: 14px 16px;
    border: 1px solid var(--rule);
    background: var(--card);
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.35;
}

.pedigree-box small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 400;
}

.pedigree-self {
    border-color: var(--moss);
    background: var(--moss);
    color: var(--on-dark-strong);
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
}

.pedigree-self small {
    color: var(--on-dark-soft);
    font-family: var(--font-body);
}

@media (max-width: 640px) {
    .pedigree {
        grid-template-columns: 1fr;
    }
}

/* 10. Post cards & archives
   ========================================================================== */

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 48px 32px;
}

.post-card {
    position: relative;
}

.post-card-media {
    margin-bottom: 20px;
    aspect-ratio: 3 / 2;
    background: var(--bone-recessed);
    overflow: hidden;
}

.post-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .post-card-media img {
    transform: scale(1.025);
}

.post-card-eyebrow {
    margin-bottom: 10px;
    color: var(--clay);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.post-card-title {
    margin-bottom: 10px;
    font-family: var(--font-display);
    font-size: 23px;
    font-weight: 600;
    line-height: 1.22;
}

.post-card:hover .post-card-title a {
    color: var(--clay-dark);
}

.post-card-excerpt {
    color: var(--muted);
    font-size: 15px;
}

.post-card-large .post-card-media {
    aspect-ratio: 16 / 10;
    margin-bottom: 24px;
}

.post-card-large .post-card-eyebrow {
    margin-bottom: 12px;
}

.post-card-large .post-card-title {
    margin-bottom: 14px;
    font-size: clamp(26px, 2.6vw, 33px);
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.post-card-large .post-card-excerpt {
    font-size: 16.5px;
}

.post-card-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 26px 0;
}

.post-card-row:first-child {
    padding-top: 0;
}

.post-card-row .post-card-media {
    flex: 0 0 112px;
    width: 112px;
    margin: 0;
    aspect-ratio: 1;
}

.post-card-row .post-card-eyebrow {
    margin-bottom: 8px;
    color: var(--muted);
}

.post-card-row .post-card-title {
    margin: 0;
    font-size: 20px;
    line-height: 1.28;
}

@media (max-width: 600px) {
    .post-card-row .post-card-media {
        flex-basis: 88px;
        width: 88px;
    }

    .post-card-row .post-card-title {
        font-size: 17px;
    }
}

.archive-head {
    padding: 56px 0 48px;
    border-bottom: 1px solid var(--rule);
    background: var(--bone-recessed);
}

.archive-head-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 28px;
}

.archive-head img {
    width: 96px;
    height: 96px;
    border-radius: 999px;
    object-fit: cover;
}

.archive-head .display-1 {
    font-size: clamp(36px, 4.6vw, 52px);
}

.archive-head .lede {
    max-width: 640px;
    margin-top: 12px;
}

.archive-body {
    padding: 56px 0 var(--section-y);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 64px;
    padding-top: 28px;
    border-top: 1px solid var(--rule);
    color: var(--muted);
    font-size: 14px;
}

.pagination a {
    color: var(--clay);
    font-weight: 600;
    text-decoration: none;
}

.pagination .page-number {
    margin: 0 auto;
}

/* 11. Article
   ========================================================================== */

.article-head {
    max-width: calc(var(--measure) + var(--gutter) * 2);
    margin: 0 auto;
    padding: 64px var(--gutter) 44px;
}

.article-head .display-1 {
    margin-bottom: 24px;
    font-size: clamp(34px, 4.6vw, 54px);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.article-dek {
    margin-bottom: 36px;
    color: #4a473f;
    font-size: clamp(18px, 1.8vw, 21px);
    line-height: 1.55;
}

.byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding-top: 28px;
    border-top: 1px solid var(--rule);
}

.byline-avatars {
    display: flex;
}

.byline-avatars img {
    width: 46px;
    height: 46px;
    border: 2px solid var(--bone);
    border-radius: 999px;
    object-fit: cover;
}

.byline-avatars img + img {
    margin-left: -12px;
}

.byline-text {
    flex: 1 1 180px;
}

.byline-name {
    font-size: 15px;
    font-weight: 600;
}

.byline-name a {
    color: inherit;
    text-decoration: none;
}

.byline-meta {
    color: var(--muted);
    font-size: 13.5px;
}

.share {
    display: flex;
    gap: 9px;
}

.share a,
.share button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--rule);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.share a:hover,
.share button:hover {
    border-color: var(--rule-strong);
    color: var(--ink);
}

.share button.is-copied {
    border-color: var(--moss);
    color: var(--moss);
}

.article-image {
    margin: 0 0 56px;
}

.article-image img {
    width: 100%;
    max-height: 640px;
    object-fit: cover;
}

.article-image figcaption {
    max-width: calc(var(--measure) + var(--gutter) * 2);
    margin: 14px auto 0;
    padding: 0 var(--gutter);
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.55;
}

.article-foot {
    max-width: calc(var(--measure) + var(--gutter) * 2);
    margin: 0 auto;
    padding: 24px var(--gutter) 64px;
}

.author-card {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 24px;
    padding: 30px 32px;
    border: 1px solid var(--rule-card);
    background: var(--card);
}

.author-card img {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    object-fit: cover;
}

.author-card-text {
    flex: 1 1 320px;
}

.author-card h2 {
    margin-bottom: 8px;
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 600;
}

.author-card p {
    margin-bottom: 14px;
    color: #4a473f;
    font-size: 15.5px;
    line-height: 1.65;
}

.comments {
    max-width: calc(var(--measure) + var(--gutter) * 2);
    margin: 0 auto;
    padding: 0 var(--gutter) 64px;
}

.related .eyebrow {
    margin-bottom: 36px;
    color: var(--muted);
}

/* 12. Ghost content
   ========================================================================== */

/* Breakout grid: text sits in the measure, wide and full cards break out. */
.gh-canvas {
    display: grid;
    grid-template-columns:
        [full-start] minmax(var(--gutter), auto)
        [wide-start] minmax(auto, 140px)
        [main-start] min(var(--measure), calc(100% - var(--gutter) * 2))
        [main-end] minmax(auto, 140px)
        [wide-end] minmax(var(--gutter), auto)
        [full-end];
}

.gh-canvas > * {
    grid-column: main-start / main-end;
}

.kg-width-wide {
    grid-column: wide-start / wide-end;
}

.kg-width-full {
    grid-column: full-start / full-end;
}

.kg-width-full img {
    width: 100%;
}

.gh-content {
    color: var(--ink-body);
    font-size: 18.5px;
    line-height: 1.72;
}

.gh-content > * + * {
    margin-top: 26px;
}

.gh-content > h2 {
    margin-top: 52px;
    margin-bottom: -6px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: clamp(27px, 2.8vw, 34px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.014em;
}

.gh-content > h3 {
    margin-top: 40px;
    margin-bottom: -10px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.25;
}

.gh-content > h4 {
    margin-top: 32px;
    margin-bottom: -12px;
    color: var(--ink);
    font-size: 18px;
    font-weight: 600;
}

.gh-content > :first-child {
    margin-top: 0;
}

.gh-content a {
    color: var(--clay);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.gh-content strong {
    color: var(--ink);
    font-weight: 600;
}

.gh-content ul,
.gh-content ol {
    padding-left: 26px;
}

.gh-content li + li {
    margin-top: 8px;
}

.gh-content li::marker {
    color: var(--clay);
}

.gh-content hr {
    margin-top: 48px;
    margin-bottom: 48px;
    border: 0;
    border-top: 1px solid var(--rule);
}

.gh-content figcaption {
    margin-top: 12px;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.55;
    text-align: left;
}

.gh-content .kg-width-wide figcaption,
.gh-content .kg-width-full figcaption {
    max-width: var(--measure);
    margin-left: auto;
    margin-right: auto;
    padding: 0 var(--gutter);
}

/* Pull quote (first blockquote style) and centered quote (second style). */
.gh-content blockquote:not([class]) {
    margin-top: 36px;
    margin-bottom: 36px;
    padding-left: 28px;
    border-left: 3px solid var(--clay);
    color: var(--moss);
    font-family: var(--font-display);
    font-size: 25px;
    font-style: italic;
    font-weight: 500;
    line-height: 1.4;
}

.gh-content blockquote.kg-blockquote-alt {
    margin-top: 44px;
    margin-bottom: 44px;
    padding: 0 24px;
    color: var(--moss);
    font-family: var(--font-display);
    font-size: clamp(26px, 3vw, 32px);
    font-style: normal;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
}

.gh-content blockquote p + p {
    margin-top: 16px;
}

/* Callouts: grey/white/yellow etc. become a "Key takeaways" box;
   green and accent become the dark moss box. */
.gh-content .kg-callout-card {
    display: block;
    padding: 30px 32px;
    border-radius: 0;
    border-left: 3px solid var(--clay);
    background: var(--bone-recessed);
    color: var(--ink-body);
}

.gh-content .kg-callout-card .kg-callout-emoji {
    display: none;
}

.gh-content .kg-callout-card .kg-callout-text {
    font-size: 16.5px;
    line-height: 1.65;
}

.gh-content .kg-callout-card .kg-callout-text b:first-child,
.gh-content .kg-callout-card .kg-callout-text strong:first-child {
    display: block;
    margin-bottom: 10px;
    color: var(--clay);
    font-size: 11px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

/* The label is already a block, so drop the line break typed after it. */
.gh-content .kg-callout-card .kg-callout-text b:first-child + br,
.gh-content .kg-callout-card .kg-callout-text strong:first-child + br {
    display: none;
}

.gh-content .kg-callout-card-green,
.gh-content .kg-callout-card-accent {
    border-left: 0;
    background: var(--moss);
    color: var(--on-dark);
}

.gh-content .kg-callout-card-green .kg-callout-text,
.gh-content .kg-callout-card-accent .kg-callout-text {
    color: var(--on-dark);
}

.gh-content .kg-callout-card-green .kg-callout-text b:first-child,
.gh-content .kg-callout-card-green .kg-callout-text strong:first-child,
.gh-content .kg-callout-card-accent .kg-callout-text b:first-child,
.gh-content .kg-callout-card-accent .kg-callout-text strong:first-child {
    color: var(--clay-lifted);
}

.gh-content .kg-callout-card-green a,
.gh-content .kg-callout-card-accent a {
    color: var(--clay-link-on-dark);
}

.gh-content .kg-button-card .kg-btn {
    min-height: 48px;
    padding: 0 28px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-weight: 600;
}

.gh-content .kg-button-card .kg-btn-accent {
    background: var(--clay);
    color: #fff8f0;
}

.gh-content .kg-bookmark-card a.kg-bookmark-container {
    border-color: var(--rule-card);
    border-radius: 0;
    background: var(--card);
    color: var(--ink);
}

.gh-content .kg-toggle-card {
    border-color: var(--rule-card);
    border-radius: 0;
    background: var(--card);
}

.gh-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 15.5px;
    line-height: 1.5;
}

.gh-content th,
.gh-content td {
    padding: 12px 18px 12px 0;
    border-bottom: 1px solid var(--rule);
    text-align: left;
    vertical-align: top;
}

.gh-content th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.gh-content td:first-child {
    color: var(--muted);
    white-space: nowrap;
}

.gh-content code {
    padding: 2px 6px;
    background: var(--bone-recessed);
    font-size: 0.88em;
}

.gh-content pre {
    padding: 22px 24px;
    overflow-x: auto;
    background: var(--ink);
    color: var(--on-dark);
    font-size: 14.5px;
    line-height: 1.6;
}

.gh-content pre code {
    padding: 0;
    background: none;
}

/* Paywall CTA rendered by Ghost for members-only posts */
.gh-content .gh-post-upgrade-cta-content {
    border-radius: 0;
}

/* 13. Forms & subscribe
   ========================================================================== */

.input {
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--ink);
    font-size: 15.5px;
}

.input::placeholder {
    color: var(--muted-soft);
}

.subscribe-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.subscribe-row .input {
    flex: 1 1 250px;
}

.subscribe-row .button {
    flex: 0 0 auto;
    min-height: 52px;
}

.subscribe-form .when-loading,
.subscribe-form.loading .when-idle {
    display: none;
}

.subscribe-form.loading .when-loading {
    display: inline;
}

.subscribe-form .form-message {
    display: none;
    margin-top: 14px;
    font-size: 14.5px;
    font-weight: 500;
}

.subscribe-form.success .form-success,
.subscribe-form.error .form-error {
    display: block;
}

.subscribe-form.success .subscribe-row {
    display: none;
}

.form-success {
    color: var(--moss);
}

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

.subscribe-member {
    color: var(--moss);
    font-weight: 500;
}

/* 14. Pages & errors
   ========================================================================== */

.page-article-head {
    max-width: calc(var(--measure) + var(--gutter) * 2);
    margin: 0 auto;
    padding: 64px var(--gutter) 40px;
}

.page-article-head .display-1 {
    font-size: clamp(36px, 4.6vw, 52px);
}

.page-article-head .lede {
    margin-top: 18px;
    font-size: 19px;
}

.page-article-body {
    padding-bottom: var(--section-y);
}

.error-page {
    padding: 120px 0 var(--section-y);
    text-align: center;
}

.error-code {
    color: var(--rule-strong);
    font-family: var(--font-display);
    font-size: 120px;
    font-weight: 600;
    line-height: 1;
}

.error-page .display-2 {
    margin: 20px 0 16px;
}

.error-page .lede {
    max-width: 480px;
    margin: 0 auto 32px;
}

.error-page .button-row {
    justify-content: center;
}

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