/* Hearth & Home: palette shared with the Hearth & Home Press planner covers. */
:root {
  --bg: #F7F1E4;
  --surface: #FFFDF8;
  --ink: #372F26;
  --muted: #6B5F52;
  --line: #E4DACA;
  --dash: #D6C8B2;
  --accent: #A85F33;
  --accent-ink: #FFFFFF;
  --accent-hover: #7E4424;
  --footer-bg: #372F26;
  --footer-ink: #EDE3D3;
  --footer-muted: #D9CDBA;
  --sage: #D8E3D6;   --sage-ink: #3F5543;
  --ice: #D3E9EF;    --ice-ink: #2E5F6E;
  --clay: #F1D9C6;   --clay-ink: #7E4424;
  --sand: #EFE4CF;   --sand-ink: #5A4D3F;
  --display: Fraunces, Georgia, "Times New Roman", serif;
  --ui: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;
  --read: "Source Serif 4", Georgia, "Times New Roman", serif;
  --max: 1200px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1F1B17; --surface: #29241F; --ink: #F1E9DC; --muted: #BFB3A3;
    --line: #3A332C; --dash: #4A4138;
    --accent: #E39A6C; --accent-ink: #1F1B17; --accent-hover: #F0B58F;
    --footer-bg: #141210; --footer-ink: #E6DCCB; --footer-muted: #B5A895;
    --sage: #2F3A31; --sage-ink: #C3D6C4;
    --ice: #263A40;  --ice-ink: #BCDDE6;
    --clay: #45311F; --clay-ink: #F2C9A8;
    --sand: #3A3228; --sand-ink: #E4D5BD;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.55 var(--ui); }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.muted { color: var(--muted); }
.small { font-size: .875rem; }
.strong { font-weight: 700; }
.kicker { margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sage-ink); }
.icon { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.tint-sage { background: var(--sage); color: var(--sage-ink); }
.tint-ice { background: var(--ice); color: var(--ice-ink); }
.tint-clay { background: var(--clay); color: var(--clay-ink); }
.tint-sand { background: var(--sand); color: var(--sand-ink); }
.tone-sage { color: var(--sage-ink); } .tone-ice { color: var(--ice-ink); }
.tone-clay { color: var(--clay-ink); } .tone-sand { color: var(--sand-ink); }

/* header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row { min-height: 76px; display: flex; align-items: center; gap: 12px 36px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 1.5rem/1 var(--display); }
.logo { width: 32px; height: 32px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.topic-nav { display: flex; gap: 8px 26px; flex: 1; font-weight: 600; font-size: .95rem; }
.topic-nav a, .planners-link { color: var(--ink); text-decoration: none; padding: 6px 0; }
.topic-nav a:hover, .planners-link:hover, .topic-nav a[aria-current="page"] { color: var(--accent); }
.planners-link { font-weight: 600; font-size: .95rem; }

/* type */
.display { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.06; margin: 0; }
.eyebrow { margin: 0; font-size: .85rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sage-ink); }
.lede { margin: 0; font-size: 1.2rem; line-height: 1.55; color: var(--muted); max-width: 44rem; }
.section { padding-top: 64px; padding-bottom: 64px; }
.section-h { font: 600 2rem/1.2 var(--display); margin: 0 0 24px; }
.small-h { font-size: 1.6rem; }
.section-sub { margin: -14px 0 24px; }
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* buttons & chips */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 24px; border-radius: 26px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.button:hover { background: var(--accent-hover); color: var(--accent-ink); }
.button.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.button.ghost:hover { background: var(--ink); color: var(--bg); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 4px 11px; border-radius: 14px; font-size: .8rem; font-weight: 700; }

/* hero */
.hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: center; padding-top: 64px; padding-bottom: 56px; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; }
.hero h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); }
.hero-art { position: relative; aspect-ratio: 1 / 1; max-height: 540px; border-radius: 28px; overflow: hidden; background: var(--sage); }
.hero-art > img { width: 100%; height: 100%; object-fit: cover; }
.week-card { position: absolute; right: 24px; bottom: 24px; width: min(280px, 78%); background: var(--surface); border-radius: 16px; padding: 20px 22px; box-shadow: 0 18px 40px rgba(55,47,38,.18); }
.week-h { margin: 0 0 12px; font: 600 1.2rem/1.2 var(--display); }
.week-grid { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px 10px; font-size: .9rem; }
.day { font-weight: 700; color: var(--sage-ink); }
.meal { border-bottom: 1px dashed var(--line); padding-bottom: 6px; }

/* topic tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.topic-tile { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.topic-tile:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-2px); }
.topic-tile img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; }
.tile-name { font: 600 1.3rem/1.2 var(--display); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.card { display: flex; flex-direction: column; gap: 14px; color: var(--ink); text-decoration: none; }
.card:hover { color: var(--ink); }
.card:hover .card-title { color: var(--accent); }
.card-img { aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-img img { transform: scale(1.03); }
.card-title { font: 600 1.5rem/1.2 var(--display); }
.card-desc { color: var(--muted); }

.upcoming { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.upcoming li { padding: 18px 20px; border-radius: 16px; border: 1.5px dashed var(--dash); }

/* shelf */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.shelf-item { display: flex; flex-direction: column; gap: 10px; }
.shelf-img { height: 300px; border-radius: 16px; background: var(--sand); display: flex; align-items: center; justify-content: center; padding: 22px; }
.shelf-img img { max-height: 100%; width: auto; box-shadow: 8px 10px 22px rgba(55,47,38,.22); border-radius: 3px; }
.shelf-name { font: 600 1.2rem/1.25 var(--display); }

/* article */
.article-head { display: flex; flex-direction: column; gap: 18px; padding-top: 44px; padding-bottom: 36px; }
.article-title { font-size: clamp(2.1rem, 4.6vw, 3.6rem); max-width: 56rem; }
.crumbs { font-size: .9rem; color: var(--muted); }
.article-hero { aspect-ratio: 5 / 2; max-height: 460px; width: 100%; border-radius: 28px; overflow: hidden; margin-top: 8px; }
.article-hero img { width: 100%; height: 100%; object-fit: cover; object-position: center 66%; }
.article-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 72px; padding-bottom: 72px; }
.toc { position: sticky; top: 24px; align-self: start; padding: 20px 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.toc ol { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: .95rem; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--accent); }

.prose { max-width: 680px; font: 400 1.2rem/1.72 var(--read); }
.prose > * { margin: 0 0 1.1rem; }
.prose h2 { font: 600 2rem/1.2 var(--display); margin: 2.4rem 0 .8rem; scroll-margin-top: 24px; }
.prose h3 { font: 600 1.4rem/1.3 var(--display); margin: 1.8rem 0 .5rem; }
.prose ul, .prose ol { padding-left: 1.5rem; }
.prose li { margin-bottom: .4rem; }
.prose code { font-size: .9em; background: var(--sand); padding: .05em .3em; border-radius: 4px; }
.callout { display: flex; gap: 14px; padding: 18px 22px; border-radius: 18px; background: var(--sage); color: var(--sage-ink); font: 400 1.05rem/1.55 var(--ui); }
.callout p { margin: 0; color: var(--ink); }
.callout .icon { width: 24px; height: 24px; margin-top: 2px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
table { border-collapse: collapse; width: 100%; font: 400 1rem/1.4 var(--ui); background: var(--surface); }
th, td { text-align: left; padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--sage); border-top: 0; }

.product-card { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 24px; align-items: center; padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); font-family: var(--ui); margin: 2rem 0; }
.product-card img { width: 100%; border-radius: 4px; box-shadow: 6px 8px 16px rgba(55,47,38,.2); }
.product-card p { margin: 0 0 8px; font-size: 1rem; line-height: 1.5; }
.product-name { font: 600 1.35rem/1.25 var(--display) !important; }
.product-card .button { margin: 6px 0 10px; }
.product-card .small { font-size: .85rem; }

.minis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.mini-card { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 22px; align-items: center; color: var(--ink); text-decoration: none; }
.mini-card:hover .mini-title { color: var(--accent); }
.mini-card img { width: 180px; height: 180px; border-radius: 18px; object-fit: cover; }
.mini-card div { display: flex; flex-direction: column; gap: 8px; }
.mini-title { font: 600 1.4rem/1.2 var(--display); }

/* topic page */
.topic-banner-row { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding-top: 48px; padding-bottom: 48px; }
.topic-banner-row > div { display: flex; flex-direction: column; gap: 14px; }
.topic-banner h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--ink); }
.topic-banner .lede { color: var(--ink); opacity: .85; }
.topic-banner .crumbs a { color: inherit; }
.topic-img { width: 240px; height: 240px; border-radius: 50%; object-fit: cover; border: 6px solid var(--surface); flex-shrink: 0; }
.section .small-h { margin-top: 48px; }

/* footer */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-top: 52px; padding-bottom: 52px; font-size: .95rem; }
.footer-grid > div { display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { color: var(--footer-ink); }
.footer-grid p { margin: 0; color: var(--footer-muted); line-height: 1.6; max-width: 30rem; }
.footer-brand { font: 600 1.4rem/1.2 var(--display); color: var(--footer-ink) !important; }
.footer-h { font-weight: 700; color: var(--footer-ink) !important; }

/* responsive */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 36px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-grid { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; }
  .minis { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .header-row { gap: 10px; min-height: 0; }
  .brand { font-size: 1.3rem; }
  .planners-link { margin-left: auto; }
  .topic-nav { order: 3; flex-basis: 100%; overflow-x: auto; gap: 8px; padding-bottom: 2px; scrollbar-width: none; }
  .topic-nav a { white-space: nowrap; padding: 7px 13px; border-radius: 18px; background: var(--sand); color: var(--sand-ink); font-size: .88rem; }
  .section { padding-top: 44px; padding-bottom: 44px; }
  .section-h { font-size: 1.6rem; }
  .cards { grid-template-columns: 1fr; gap: 28px; }
  .card-img { aspect-ratio: 4 / 3; }
  .tiles { gap: 12px; }
  .topic-tile { padding: 16px; }
  .topic-tile img { width: 64px; height: 64px; }
  .tile-name { font-size: 1.1rem; }
  .week-card { right: 14px; bottom: 14px; padding: 14px 16px; }
  .week-grid { font-size: .82rem; }
  .article-hero { aspect-ratio: 4 / 3; border-radius: 20px; }
  .prose { font-size: 1.1rem; }
  .prose h2 { font-size: 1.6rem; }
  .product-card { grid-template-columns: 1fr; }
  .product-card img { width: 120px; }
  .mini-card { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; }
  .mini-card img { width: 96px; height: 96px; border-radius: 14px; }
  .mini-title { font-size: 1.1rem; }
  .topic-banner-row { flex-direction: column-reverse; align-items: flex-start; gap: 20px; padding-top: 28px; }
  .topic-img { width: 120px; height: 120px; border-width: 4px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
