:root {
    --ink: #24302a;
    --ink-soft: #425048;
    --muted: #6b756e;
    --paper: #fbfaf6;
    --paper-warm: #f6f1e7;
    --surface: #edf1e7;
    --surface-strong: #dfe8d7;
    --accent: #65794f;
    --accent-dark: #405431;
    --accent-light: #e6ecdd;
    --gold: #b8864b;
    --line: #d9ddd2;
    --white: #ffffff;
    --max: 1180px;
    --reading: 760px;
    --radius: 20px;
    --shadow: 0 18px 50px rgba(36,48,42,.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-dark); text-underline-offset: .18em; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid rgba(184,134,75,.42); outline-offset: 3px; }
img { max-width: 100%; height: auto; }
.site-shell { width: min(calc(100% - 48px), var(--max)); margin-inline: auto; }
.content-shell { max-width: var(--reading); padding-block: 78px; }

/* Header */
.site-header {
    position: relative;
    z-index: 10;
    border-bottom: 1px solid rgba(64,84,49,.12);
    background: rgba(251,250,246,.96);
}
.header-inner { min-height: 104px; display: flex; align-items: center; gap: 38px; }
.site-brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; line-height: 1.05; }
.brand-name, .footer-brand {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    font-size: 31px;
    letter-spacing: -.025em;
}
.brand-name::after { content: '.'; color: var(--gold); }
.brand-tagline { margin-top: 9px; font-size: 12px; color: var(--muted); letter-spacing: .055em; }
.primary-nav { margin-left: auto; }
.menu { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.menu a { position: relative; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 700; }
.primary-nav .menu a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -7px; height: 2px; background: var(--gold); transition: right .18s ease; }
.primary-nav .menu a:hover::after { right: 0; }
.menu-toggle { display: none; margin-left: auto; border: 1px solid var(--line); background: var(--white); color: var(--ink); border-radius: 999px; padding: 8px 15px; font: inherit; font-size: 14px; font-weight: 700; }

/* General content */
.entry-header { margin-bottom: 32px; }
.entry-title, .listing-header h1, .empty-state h1 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(42px,6vw,68px);
    line-height: 1.04;
    letter-spacing: -.035em;
    margin: 0 0 24px;
}
.entry-kicker, .eyebrow, .card-meta { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--accent-dark); }
.entry-kicker a { text-decoration: none; }
.entry-meta { color: var(--muted); font-size: 14px; }
.entry-content > p:first-child { font-size: 1.22em; line-height: 1.6; color: #373a31; }
.entry-content h2 { font-family: Georgia, 'Times New Roman', serif; font-size: 36px; line-height: 1.15; margin: 2.2em 0 .55em; }
.entry-content h3 { font-family: Georgia, 'Times New Roman', serif; font-size: 27px; line-height: 1.2; margin: 1.8em 0 .45em; }
.entry-content ul, .entry-content ol { padding-left: 1.35em; }
.entry-content blockquote { margin: 2em 0; padding: 8px 0 8px 24px; border-left: 4px solid var(--accent); font-family: Georgia, 'Times New Roman', serif; font-size: 24px; }
.featured-image { margin: 0 0 42px; }
.featured-image img { border-radius: var(--radius); }
.listing-shell { padding-block: 72px; }
.listing-header { max-width: 760px; margin-bottom: 42px; }
.post-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.post-card { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 28px rgba(36,48,42,.035); }
.post-card h2 { font-family: Georgia, 'Times New Roman', serif; font-size: 30px; line-height: 1.15; margin: .2em 0 .5em; }
.post-card h2 a { text-decoration: none; color: var(--ink); }
.post-card p { color: var(--muted); }
.text-link { font-weight: 700; }
.button { display: inline-block; background: var(--accent-dark); color: #fff; text-decoration: none; padding: 11px 18px; border-radius: 999px; font-weight: 700; }
.empty-state { padding-block: 100px; }
.search-form { display: flex; gap: 8px; max-width: 560px; }
.search-field { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; }
.search-submit { border: 0; border-radius: 10px; background: var(--accent-dark); color: #fff; padding: 12px 18px; font-weight: 700; }
.screen-reader-text { position: absolute!important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { clip: auto!important; width: auto; height: auto; margin: 8px; padding: 12px; z-index: 100000; background: #fff; color: #000; }

/* Homepage hero */
.home-shell { width: min(calc(100% - 48px),var(--max)); margin-inline: auto; padding-block: 0; }
.home-content { max-width: none; }
.home-content > h1 {
    position: relative;
    max-width: 950px;
    margin: 0;
    padding-top: 118px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(58px,8.2vw,104px);
    line-height: .92;
    letter-spacing: -.055em;
    text-wrap: balance;
}
.home-content > h1::before {
    content: 'FERRET PROBLEM?';
    display: block;
    margin-bottom: 22px;
    color: var(--accent);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .18em;
}
.home-content > h1::after { content: ''; display: block; width: 72px; height: 5px; margin-top: 32px; border-radius: 99px; background: var(--gold); }
.home-content > h1 + p { max-width: 790px; margin: 34px 0 0; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(23px,2.4vw,31px); line-height: 1.45; color: var(--ink-soft); }
.home-content > h1 + p + p { max-width: 680px; margin: 18px 0 0; color: var(--muted); font-size: 17px; }

/* Homepage sections */
.home-content > h2 {
    margin: 112px 0 18px;
    padding-top: 68px;
    border-top: 1px solid var(--line);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(36px,4vw,52px);
    line-height: 1.04;
    letter-spacing: -.035em;
    text-wrap: balance;
}
.home-content > h2::before { content: ''; display: block; width: 34px; height: 4px; margin-bottom: 20px; border-radius: 99px; background: var(--accent); }
.home-content > h2 + p { max-width: 720px; color: var(--muted); }

/* Problem navigation: still just a UL in the editor */
.home-content > ul {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 15px;
    margin: 38px 0 0;
    padding: 0;
    list-style: none;
}
.home-content > ul li { margin: 0; }
.home-content > ul a {
    position: relative;
    display: flex;
    min-height: 132px;
    align-items: flex-end;
    overflow: hidden;
    padding: 22px 48px 22px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--ink);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
    text-decoration: none;
    box-shadow: 0 8px 28px rgba(36,48,42,.035);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.home-content > ul a::before { content: ''; position: absolute; width: 62px; height: 62px; right: -17px; top: -17px; border-radius: 50%; background: var(--accent-light); transition: transform .18s ease; }
.home-content > ul a::after { content: '→'; position: absolute; right: 20px; bottom: 18px; color: var(--gold); font-family: Arial, Helvetica, sans-serif; font-size: 20px; }
.home-content > ul a:hover { transform: translateY(-4px); border-color: #c5cdbb; background: #fff; box-shadow: var(--shadow); }
.home-content > ul a:hover::before { transform: scale(1.18); }

/* Common problem cards without extra wrappers */
.home-content > h2:nth-of-type(2) { margin-bottom: 34px; }
.home-content > h2:nth-of-type(2) ~ h3 {
    position: relative;
    max-width: 920px;
    margin: 18px 0 0;
    padding: 30px 34px 8px 38px;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--white);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(25px,3vw,32px);
    line-height: 1.15;
    letter-spacing: -.018em;
}
.home-content > h2:nth-of-type(2) ~ h3::before { content: '?'; position: absolute; left: -14px; top: 27px; display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: var(--accent-dark); color: #fff; font-family: Arial,Helvetica,sans-serif; font-size: 15px; font-weight: 800; }
.home-content > h2:nth-of-type(2) ~ h3 + p {
    max-width: 920px;
    margin: 0;
    padding: 12px 38px 16px;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    background: var(--white);
    color: var(--muted);
}
.home-content > h2:nth-of-type(2) ~ h3 + p + p {
    max-width: 920px;
    margin: 0 0 20px;
    padding: 0 38px 30px;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    background: var(--white);
}
.home-content > h2:nth-of-type(2) ~ h3 + p + p a { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; text-decoration: none; }
.home-content > h2:nth-of-type(2) ~ h3 + p + p a:hover { text-decoration: underline; }

/* Stop the card selector before the final homepage section and make it a callout. */
.home-content > h2:nth-of-type(3) {
    margin-top: 112px;
    padding: 54px 58px 0;
    border: 0;
    border-radius: 28px 28px 0 0;
    background: var(--accent-dark);
    color: #fff;
}
.home-content > h2:nth-of-type(3)::before { background: #d7b37c; }
.home-content > h2:nth-of-type(3) + p {
    max-width: none;
    margin: 0;
    padding: 18px 58px 18px;
    background: var(--accent-dark);
    color: rgba(255,255,255,.82);
}
.home-content > h2:nth-of-type(3) + p + p {
    margin: 0 0 108px;
    padding: 4px 58px 52px;
    border-radius: 0 0 28px 28px;
    background: var(--accent-dark);
}
.home-content > h2:nth-of-type(3) + p + p a {
    display: inline-block;
    padding: 11px 18px;
    border-radius: 999px;
    background: #fff;
    color: var(--accent-dark);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

/* Override the broad common-problem sibling selectors for the final callout. */
.home-content > h2:nth-of-type(3),
.home-content > h2:nth-of-type(3) + p,
.home-content > h2:nth-of-type(3) + p + p { max-width: 100%; }

/* Footer */
.site-footer { margin-top: 0; background: #e9eadf; border-top: 1px solid var(--line); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 22px 50px; align-items: start; padding-block: 52px; }
.footer-inner p { color: var(--muted); margin: .4em 0; }
.footer-nav .menu { justify-content: flex-end; }
.copyright { grid-column: 1 / -1; padding-top: 22px; border-top: 1px solid rgba(64,84,49,.12); font-size: 12px; }

@media (max-width: 900px) {
    .home-content > ul { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
    body { font-size: 17px; }
    .site-shell, .home-shell { width: min(calc(100% - 30px),var(--max)); }
    .header-inner { min-height: 82px; flex-wrap: wrap; padding-block: 14px; }
    .brand-tagline { display: none; }
    .menu-toggle { display: block; }
    .primary-nav { display: none; width: 100%; margin-left: 0; }
    .primary-nav.is-open { display: block; }
    .primary-nav .menu { align-items: flex-start; flex-direction: column; gap: 8px; padding: 12px 0 6px; }
    .primary-nav .menu a { display: block; padding: 5px 0; }
    .primary-nav .menu a::after { display: none; }
    .content-shell, .listing-shell { padding-block: 48px; }
    .post-grid { grid-template-columns: 1fr; }
    .entry-content h2 { font-size: 31px; }
    .entry-content h3 { font-size: 25px; }
    .home-content > h1 { padding-top: 72px; font-size: clamp(50px,15vw,72px); }
    .home-content > h1::before { margin-bottom: 17px; }
    .home-content > h2 { margin-top: 76px; padding-top: 46px; }
    .home-content > ul { grid-template-columns: 1fr; gap: 11px; }
    .home-content > ul a { min-height: 92px; }
    .home-content > h2:nth-of-type(2) ~ h3 { padding: 25px 22px 7px 28px; }
    .home-content > h2:nth-of-type(2) ~ h3::before { left: -8px; }
    .home-content > h2:nth-of-type(2) ~ h3 + p { padding: 10px 28px 14px; }
    .home-content > h2:nth-of-type(2) ~ h3 + p + p { padding: 0 28px 25px; }
    .home-content > h2:nth-of-type(3) { margin-top: 76px; padding: 42px 28px 0; border-radius: 22px 22px 0 0; }
    .home-content > h2:nth-of-type(3) + p { padding: 15px 28px; }
    .home-content > h2:nth-of-type(3) + p + p { margin-bottom: 72px; padding: 4px 28px 40px; border-radius: 0 0 22px 22px; }
    .footer-inner { grid-template-columns: 1fr; }
    .footer-nav .menu { align-items: flex-start; flex-direction: column; gap: 8px; margin: 8px 0; }
    .copyright { grid-column: auto; }
}

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