/* ==========================================================================
   PawCare Guide
   An editorial reference: warm paper, deep pine ink, hairline rules.
   One stylesheet, light + dark, mobile first.
   ========================================================================== */

/* --- tokens ------------------------------------------------------------ */

:root {
  color-scheme: light dark;

  --paper: #f6f1e8;
  --paper-2: #efe8da;
  --surface: #fffcf6;
  --ink: #17160f;
  --ink-2: #3b382e;
  --muted: #72695b;
  --line: #e0d5c2;
  --line-soft: #ebe3d4;

  --brand: #22412f;
  --brand-ink: #1a3527;
  --brand-soft: #e4eae0;
  --clay: #a8452c;
  --clay-ink: #8e3722;
  --clay-soft: #f4e3d8;
  --sand: #e8dcc2;
  --gold: #a9863f;

  --link: var(--brand);
  --shadow: 0 1px 2px rgba(23, 22, 15, .05), 0 18px 40px -26px rgba(23, 22, 15, .45);

  --serif: "Fraunces", "Iowan Old Style", "Georgia", "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 72rem;
  --measure: 42rem;
  --radius: 2px;
  --head-h: 4.15rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14130f;
    --paper-2: #1a1813;
    --surface: #1d1b16;
    --ink: #f1ebde;
    --ink-2: #d7cfc0;
    --muted: #9f9585;
    --line: #322e26;
    --line-soft: #27241d;

    --brand: #a8c8b1;
    --brand-ink: #c3dcc9;
    --brand-soft: #1e2a21;
    --clay: #e08a68;
    --clay-ink: #eda285;
    --clay-soft: #2b1d16;
    --sand: #2e2a20;
    --gold: #c5a463;

    --link: var(--brand-ink);
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 22px 44px -28px rgba(0, 0, 0, .9);
  }
}

html[data-theme="light"] {
  --paper: #f6f1e8; --paper-2: #efe8da; --surface: #fffcf6;
  --ink: #17160f; --ink-2: #3b382e; --muted: #72695b;
  --line: #e0d5c2; --line-soft: #ebe3d4;
  --brand: #22412f; --brand-ink: #1a3527; --brand-soft: #e4eae0;
  --clay: #a8452c; --clay-ink: #8e3722; --clay-soft: #f4e3d8;
  --sand: #e8dcc2; --gold: #a9863f;
  --link: var(--brand);
  --shadow: 0 1px 2px rgba(23, 22, 15, .05), 0 18px 40px -26px rgba(23, 22, 15, .45);
  color-scheme: light;
}

html[data-theme="dark"] {
  --paper: #14130f; --paper-2: #1a1813; --surface: #1d1b16;
  --ink: #f1ebde; --ink-2: #d7cfc0; --muted: #9f9585;
  --line: #322e26; --line-soft: #27241d;
  --brand: #a8c8b1; --brand-ink: #c3dcc9; --brand-soft: #1e2a21;
  --clay: #e08a68; --clay-ink: #eda285; --clay-soft: #2b1d16;
  --sand: #2e2a20; --gold: #c5a463;
  --link: var(--brand-ink);
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 22px 44px -28px rgba(0, 0, 0, .9);
  color-scheme: dark;
}

/* --- base -------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, .965rem + .16vw, 1.0625rem);
  line-height: 1.68;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }
img { height: auto; display: block; }
picture { display: block; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--clay); }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 1px; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.018em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
@media (max-width: 520px) { .wrap { width: min(100% - 2rem, var(--wrap)); } }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 50; background: var(--surface); padding: .6rem 1rem; }

.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

.kicker {
  font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--brand); font-weight: 600; margin: 0 0 .9rem;
}
.kicker--muted { color: var(--muted); }

/* --- header ------------------------------------------------------------ */

.site-head {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  position: sticky; top: 0; z-index: 30;
}

.head-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: var(--head-h);
}

.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  text-decoration: none; color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-mark { width: 1.72rem; height: 1.72rem; flex: none; color: var(--brand); }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-lock { display: inline-flex; flex-direction: column; gap: .18rem; }
.brand-word {
  font-family: var(--serif); font-size: 1.3rem; font-weight: 600;
  letter-spacing: -.025em; line-height: 1; display: inline-flex; gap: .32rem; align-items: baseline;
}
.brand-by {
  font-size: .56rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); line-height: 1; font-weight: 500;
}
.brand-word .brand-thin { font-weight: 400; font-style: italic; color: var(--brand); letter-spacing: -.02em; }

.site-nav { display: flex; align-items: center; gap: clamp(.75rem, 2vw, 1.65rem); }
.site-nav a {
  color: var(--ink-2); text-decoration: none;
  font-size: .74rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  padding: .3rem 0; position: relative;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.1rem; height: 1px;
  background: var(--brand); transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease;
}
.site-nav a:hover { color: var(--brand); }
.site-nav a:hover::after { transform: scaleX(1); }

.theme-toggle {
  display: grid; place-items: center;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; cursor: pointer;
  color: var(--ink-2);
}
.theme-toggle:hover { border-color: var(--brand); color: var(--brand); }
.theme-icon {
  width: .85rem; height: .85rem; border-radius: 50%;
  background: currentColor;
  box-shadow: inset -.3em -.24em 0 0 var(--paper);
  transition: transform .25s ease;
}
html[data-theme="dark"] .theme-icon {
  background: transparent;
  box-shadow: inset 0 0 0 .16em currentColor;
}

@media (max-width: 700px) {
  .site-nav { gap: .85rem; }
  .site-nav a { font-size: .68rem; letter-spacing: .07em; }
  .site-nav a:nth-child(3) { display: none; }
  .brand-word { font-size: 1.16rem; }
}
@media (max-width: 420px) {
  .site-nav a:nth-child(4) { display: none; }
  .site-nav a:nth-child(5) { display: none; }
  .site-nav { gap: .7rem; }
  .brand-mark { width: 1.5rem; height: 1.5rem; }
  .brand-word { font-size: 1.08rem; }
  .brand-by { font-size: .5rem; letter-spacing: .14em; }
}

/* --- home hero --------------------------------------------------------- */

.hero { padding-block: clamp(2.6rem, 6vw, 4.6rem) clamp(2.4rem, 5vw, 4rem); }

.hero-grid { display: grid; gap: clamp(1.8rem, 4vw, 3.2rem); align-items: center; }

.hero h1 {
  font-size: clamp(2.35rem, 1.55rem + 3.4vw, 4.15rem);
  font-weight: 600; letter-spacing: -.035em; margin-bottom: 1.1rem; max-width: 30ch;
}
.hero h1 em { font-style: italic; font-weight: 400; color: var(--brand); }
.hero-lede {
  font-family: var(--serif); font-size: clamp(1.06rem, 1rem + .45vw, 1.3rem);
  color: var(--ink-2); line-height: 1.5; max-width: 34ch; margin-bottom: 1.6rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .72rem 1.3rem; border-radius: 999px;
  background: var(--brand); color: var(--paper); text-decoration: none;
  font-size: .84rem; font-weight: 500; letter-spacing: .02em;
  border: 1px solid var(--brand);
  transition: background .2s ease, transform .15s ease;
}
.btn:hover { background: var(--clay); border-color: var(--clay); color: #fffdf9; transform: translateY(-1px); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { background: transparent; color: var(--brand); border-color: var(--brand); }

.hero-plate { margin: 0; }
.hero-plate .plate-frame {
  position: relative; overflow: hidden; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: var(--radius);
  aspect-ratio: 4 / 5;
}
.hero-plate img { width: 100%; height: 100%; object-fit: cover; }
.hero-plate picture, .post-hero picture { height: 100%; }
.hero-plate figcaption {
  display: flex; justify-content: space-between; gap: 1rem;
  font-size: .72rem; letter-spacing: .06em; color: var(--muted);
  padding-top: .6rem; border-top: 1px solid var(--line-soft); margin-top: .7rem;
  text-transform: uppercase;
}

@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1.08fr .92fr; }
}

/* --- section furniture ------------------------------------------------ */

.section-head {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between;
  gap: 1rem; border-bottom: 1px solid var(--ink); padding-bottom: .7rem; margin-bottom: 1.8rem;
}
.section-head h2 { font-size: clamp(1.45rem, 1.15rem + 1vw, 2rem); margin: 0; letter-spacing: -.03em; }
.section-head .section-note { font-size: .78rem; color: var(--muted); letter-spacing: .04em; }

section.block { padding-block: clamp(2.2rem, 5vw, 3.6rem); }

/* --- featured ---------------------------------------------------------- */

.feature {
  display: grid; gap: 0; text-decoration: none; color: inherit;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: background .2s ease;
}
.feature:hover { color: inherit; background: var(--surface); }
.feature-art { position: relative; overflow: hidden; background: var(--paper-2); }
.feature-art img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; }
.feature-art picture { height: 100%; }
.feature-art .plate-num {
  position: absolute; left: 1rem; top: .9rem; z-index: 2;
  font-family: var(--serif); font-size: .8rem; letter-spacing: .1em;
  color: #fffdf9; background: rgba(23, 22, 15, .42); backdrop-filter: blur(4px);
  padding: .2rem .55rem; border-radius: 999px;
}
.feature-copy { padding: clamp(1.3rem, 3vw, 2.4rem) clamp(0, 2vw, 1.6rem) clamp(1.6rem, 3vw, 2.6rem); }
.feature-copy .kicker { margin-bottom: .7rem; }
.feature-copy h2 {
  font-size: clamp(1.55rem, 1.2rem + 1.6vw, 2.5rem); letter-spacing: -.032em;
  margin-bottom: .7rem; max-width: 22ch;
}
.feature-copy h2 a { text-decoration: none; color: inherit; }
.feature:hover h2 a { color: var(--brand); }
.feature-copy p { color: var(--ink-2); max-width: 46ch; margin-bottom: 1.2rem; }
.feature-meta {
  display: flex; flex-wrap: wrap; gap: .35rem .9rem;
  font-size: .76rem; color: var(--muted); letter-spacing: .04em;
}
.feature-more {
  margin-top: 1.3rem; font-size: .8rem; font-weight: 500;
  color: var(--brand); letter-spacing: .04em;
}
.feature-more::after { content: " \2192"; }

@media (min-width: 820px) {
  .feature { grid-template-columns: 1.15fr .85fr; align-items: stretch; }
  .feature-art img { aspect-ratio: auto; min-height: 22rem; }
  .feature-copy { display: flex; flex-direction: column; justify-content: center; padding-left: clamp(1.4rem, 3vw, 2.8rem); }
}

/* --- guide index (list, not cards) ------------------------------------ */

.guide-index { border-top: 1px solid var(--line); }
.guide-row {
  display: grid; grid-template-columns: 2.2rem 1fr; gap: .25rem .9rem;
  align-items: start; padding: 1.15rem 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
}
.guide-body { min-width: 0; }
.guide-row:hover { color: inherit; }
.guide-row:hover .guide-title { color: var(--brand); }
.guide-num { font-size: .72rem; color: var(--muted); letter-spacing: .1em; padding-top: .45rem; }
.guide-title {
  font-family: var(--serif); font-size: clamp(1.12rem, 1rem + .5vw, 1.42rem);
  font-weight: 600; letter-spacing: -.02em; line-height: 1.22; margin: 0 0 .35rem;
}
.guide-sum { font-size: .88rem; color: var(--ink-2); margin: 0; max-width: 56ch; }
.guide-meta {
  grid-column: 2; font-size: .7rem; color: var(--muted); letter-spacing: .07em;
  text-transform: uppercase; padding-top: .1rem; white-space: nowrap;
}
.guide-thumb { display: none; }

@media (min-width: 760px) {
  .guide-row { grid-template-columns: 2.4rem 1fr 10rem 6.5rem; align-items: start; padding: 1.3rem 0; }
  .guide-meta { grid-column: auto; text-align: right; padding-top: .55rem; }
  .guide-num { padding-top: .5rem; }
  .guide-thumb {
    display: block; width: 6.5rem; height: 4.3rem; overflow: hidden;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-2);
  }
  .guide-thumb img { width: 100%; height: 100%; object-fit: cover; }
.guide-thumb picture { height: 100%; }
}

.empty-note { color: var(--muted); font-style: italic; padding: 1.2rem 0; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  font: inherit; font-size: .72rem; font-weight: 500; letter-spacing: .06em;
  padding: .34rem .8rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2);
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* --- topics ------------------------------------------------------------ */

.topics { border-top: 1px solid var(--line); }
.topic-list { list-style: none; margin: 0; padding: 0; }
.topic-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .95rem 0; border-bottom: 1px solid var(--line-soft);
}
.topic-name { font-family: var(--serif); font-size: 1.18rem; letter-spacing: -.02em; }
.topic-count { color: var(--muted); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }

/* --- editorial standards --------------------------------------------- */

.eeat { border-top: 1px solid var(--line); }
.eeat-inner { display: grid; gap: 2rem; }
.eeat h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.15rem); letter-spacing: -.03em; max-width: 20ch; }
.eeat p { color: var(--ink-2); max-width: 46ch; }
.eeat-facts {
  list-style: none; margin: 0; padding: 0;
  border-top: 1px solid var(--line);
}
.eeat-facts li {
  display: grid; grid-template-columns: 1.5rem 1fr; gap: .1rem .7rem;
  padding: .85rem 0; border-bottom: 1px solid var(--line-soft);
  font-size: .9rem; color: var(--ink-2);
}
.eeat-facts .fact-num { font-size: .7rem; color: var(--brand); letter-spacing: .08em; padding-top: .3rem; }
.eeat-facts strong { color: var(--ink); display: block; font-weight: 600; }
.link-arrow { font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; }
.link-arrow::after { content: " \2192"; }

@media (min-width: 900px) {
  .eeat-inner { grid-template-columns: 1.25fr .75fr; align-items: start; gap: 4rem; }
}

/* --- post -------------------------------------------------------------- */

.post { padding-block: clamp(1.2rem, 3vw, 2rem) 4rem; }
.post-wrap { max-width: 62rem; }

.crumbs {
  font-size: .74rem; color: var(--muted); display: flex; gap: .5rem; flex-wrap: wrap;
  margin-bottom: 1.6rem; letter-spacing: .04em;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }

.post-head { max-width: 46rem; margin-bottom: 2rem; }
.post-kicker {
  font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--brand); font-weight: 600; margin-bottom: .85rem;
}
.post-head h1 {
  font-size: clamp(2.05rem, 1.45rem + 2.6vw, 3.35rem); letter-spacing: -.032em; margin-bottom: .85rem;
}
.post-standfirst {
  font-family: var(--serif); font-size: clamp(1.08rem, 1rem + .4vw, 1.28rem);
  color: var(--ink-2); line-height: 1.5; margin-bottom: 1.4rem;
}
.post-meta {
  display: flex; flex-wrap: wrap; gap: .3rem 1.2rem;
  font-size: .74rem; color: var(--muted); letter-spacing: .05em; text-transform: uppercase;
}
.post-meta span { display: inline-flex; gap: .35rem; }
.post-meta .byline { color: var(--ink-2); }

/* hero plate */
.post-hero { margin: 0 0 2.4rem; }
.post-hero .plate-frame {
  position: relative; overflow: hidden; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--paper-2);
  aspect-ratio: 3 / 2;
}
.post-hero img { width: 100%; height: 100%; object-fit: cover; }
.post-hero figcaption {
  font-size: .76rem; color: var(--muted); padding-top: .65rem; margin-top: .65rem;
  border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; gap: 1rem;
}
@media (max-width: 640px) { .post-hero { margin-inline: -.5rem; } }

/* TL;DR */
.tldr {
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  background: var(--surface);
  padding: 1.2rem 1.4rem 1.3rem; border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 2.6rem; max-width: var(--measure);
}
.tldr-title {
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 600; color: var(--brand); margin-bottom: .7rem;
}
.tldr ol { margin: 0; padding: 0; list-style: none; counter-reset: tldr; display: grid; gap: .6rem; }
.tldr li {
  counter-increment: tldr; font-size: .95rem; color: var(--ink);
  padding-left: 1.7rem; position: relative; line-height: 1.55;
}
.tldr li::before {
  content: counter(tldr); position: absolute; left: 0; top: .12rem;
  font-size: .68rem; font-weight: 600; color: var(--brand);
  border: 1px solid var(--line); border-radius: 50%;
  width: 1.2rem; height: 1.2rem; display: grid; place-items: center;
}

/* body + toc */
.post-body { display: grid; gap: 2rem; }
.post-body > * { min-width: 0; }

.toc { border-top: 1px solid var(--ink); padding-top: .8rem; font-size: .84rem; }
.toc-title {
  font-size: .66rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: .6rem;
}
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: .45rem; counter-reset: toc; }
.toc li { counter-increment: toc; display: grid; grid-template-columns: 1.1rem 1fr; gap: .35rem; }
.toc li::before { content: counter(toc, decimal-leading-zero); color: var(--muted); font-size: .7rem; padding-top: .2rem; }
.toc a { color: var(--ink-2); text-decoration: none; line-height: 1.35; display: block; }
.toc a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

@media (min-width: 1000px) {
  .post-body { grid-template-columns: 11.5rem minmax(0, 1fr); gap: 3rem; align-items: start; }
  .toc { position: sticky; top: 5.6rem; }
}

/* prose */
.prose { max-width: var(--measure); }
.prose h2 {
  font-size: clamp(1.42rem, 1.2rem + .8vw, 1.78rem);
  margin-top: 2.5em; margin-bottom: .6em; letter-spacing: -.025em;
  padding-top: 1.1rem; border-top: 1px solid var(--line);
}
.prose > h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.16rem; margin-top: 1.8em; margin-bottom: .45em; letter-spacing: -.015em; }
.prose p { color: var(--ink); }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.prose a:hover { text-decoration-color: currentColor; }
.prose ul, .prose ol { padding-left: 1.2rem; margin: 0 0 1.2em; display: grid; gap: .45rem; }
.prose li::marker { color: var(--brand); }
.prose li.nested { margin-left: 1.1rem; list-style: circle; font-size: .96rem; }
.prose strong { font-weight: 600; }
.prose blockquote {
  margin: 1.8em 0; padding: .2rem 0 .2rem 1.4rem; border-left: 2px solid var(--line);
  color: var(--ink-2); font-family: var(--serif); font-size: 1.14rem;
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.6em 0; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86em;
  background: var(--paper-2); padding: .12em .35em; border-radius: 2px;
}
.prose pre {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; overflow-x: auto; margin: 0 0 1.4em;
}
.prose pre code { background: none; padding: 0; }

/* figures in prose */
.figure {
  margin: 2.2em 0; max-width: var(--measure);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
}
.figure .figure-body { padding: clamp(1.1rem, 2.6vw, 1.7rem); }
.figure-head { margin-bottom: 1.2rem; }
.figure .figure-num {
  font-size: .66rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--brand); font-weight: 600; display: block; margin-bottom: .5rem;
}
.figure .figure-title { font-size: 1.22rem; letter-spacing: -.02em; margin: 0 0 .35rem; }
.figure .figure-deck { font-size: .88rem; color: var(--ink-2); margin: 0; max-width: 44ch; }
.figure--photo .fig-label {
  display: inline; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand); margin-right: .4rem;
}
.figure figcaption {
  font-size: .74rem; color: var(--muted); line-height: 1.5;
  padding: .7rem clamp(1.1rem, 2.6vw, 1.7rem) .9rem; border-top: 1px solid var(--line-soft);
}

.figure--photo { border: 0; background: none; overflow: visible; }
.figure--photo .plate-frame { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-2); aspect-ratio: 3 / 2; }
.figure--photo img { width: 100%; height: 100%; object-fit: cover; }
.figure--photo figcaption { border-top: 0; padding: .65rem 0 0; display: flex; justify-content: space-between; gap: 1rem; }

/* apple parts diagram */
.parts { display: grid; gap: 1.4rem; align-items: start; }
.parts-art { max-width: 16rem; margin-inline: auto; }
.parts-art svg { width: 100%; height: auto; display: block; }
.parts-caption {
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); text-align: center; margin: .2rem 0 0;
}
.parts-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.parts-list li {
  display: grid; grid-template-columns: .7rem 1fr; gap: .55rem .7rem;
  padding: .55rem 0; border-bottom: 1px solid var(--line-soft); align-items: start;
}
.parts-list li:last-child { border-bottom: 0; }
.parts-swatch { width: .6rem; height: .6rem; border-radius: 50%; margin-top: .45rem; border: 1px solid rgba(0,0,0,.14); }
.sw-flesh { background: #f6e6c8; }
.sw-skin { background: #b04a2f; }
.sw-core { background: #e2cfa5; }
.sw-seed { background: #4a3722; }
.sw-stem { background: #5d7148; }

/* inline figure colours (apple cross-section keeps its own palette in both themes) */
.apple-art .a-skin { fill: #b04a2f; }
.apple-art .a-skin-dark { fill: #8e3722; }
.apple-art .a-flesh { fill: #f7e9cb; }
.apple-art .a-flesh-shade { fill: #efdcb6; }
.apple-art .a-core { fill: #e6d3aa; }
.apple-art .a-seed { fill: #3f2f1c; }
.apple-art .a-stem { fill: #6b4a2a; }
.apple-art .a-leaf { fill: #5d7148; }
.apple-art .a-line { fill: none; stroke: #d8c39c; stroke-width: 1.2; }
.apple-art .a-shadow { fill: rgba(23, 22, 15, .10); }

.parts-name { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; font-size: .9rem; font-weight: 600; color: var(--ink); }
.parts-note { font-size: .8rem; color: var(--muted); line-height: 1.45; margin: .15rem 0 0; }
.badge {
  font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700;
  padding: .14rem .42rem; border-radius: 999px; border: 1px solid transparent;
}
.badge-safe { background: var(--brand-soft); color: var(--brand-ink); border-color: color-mix(in srgb, var(--brand) 28%, transparent); }
.badge-danger { background: var(--clay-soft); color: var(--clay-ink); border-color: color-mix(in srgb, var(--clay) 30%, transparent); }
.badge-caution { background: var(--sand); color: var(--ink-2); border-color: var(--line); }

@media (min-width: 620px) {
  .parts { grid-template-columns: 15rem 1fr; gap: 1.6rem; }
  .parts-art { max-width: none; }
}

/* weight cards */
.weights-grid { display: grid; gap: .9rem; grid-template-columns: 1fr; }
.weight-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.15rem 1.05rem; background: var(--paper);
  display: flex; flex-direction: column;
}
.weight-size {
  font-size: .62rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin: 0 0 .45rem;
}
.weight-main { display: flex; align-items: baseline; gap: .3rem; margin: 0; }
.weight-kg { font-family: var(--serif); font-size: 1.9rem; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.weight-unit { font-family: var(--serif); font-size: .95rem; color: var(--ink-2); }
.weight-lb { font-size: .74rem; color: var(--muted); margin: .2rem 0 .8rem; }
.weight-bar {
  position: relative; height: .3rem; background: var(--line-soft); border-radius: 999px; overflow: hidden; margin-bottom: .75rem;
}
.weight-bar span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--brand); border-radius: 999px; }
.weight-bar span::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 10%; background: var(--clay); opacity: .9; }
.weight-rows { display: grid; grid-template-columns: 1fr auto; gap: .15rem .6rem; margin: 0 0 .85rem; font-size: .82rem; }
.weight-rows dt { color: var(--muted); }
.weight-rows dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; color: var(--ink-2); }
.weight-serve { display: flex; align-items: flex-start; gap: .45rem; margin: auto 0 0; font-size: .8rem; color: var(--ink); font-weight: 500; line-height: 1.4; }
.weight-serve svg { width: .95rem; height: .95rem; flex: none; color: var(--clay); margin-top: .1rem; }

@media (min-width: 560px) {
  .weights-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 820px) {
  .weights-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
}

@media (min-width: 1180px) {
  /* figures may use the room between the text measure and the column edge */
  .post-body .prose .figure { width: calc(100% + 5rem); max-width: none; }
}

/* tables */
.table-wrap {
  margin: 1.6em 0 1.9em; overflow-x: auto; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 30rem; }
caption { text-align: left; padding: .8rem 1rem 0; font-size: .78rem; color: var(--muted); }
thead th {
  text-align: left; font-family: var(--sans); font-weight: 600; font-size: .68rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  background: var(--paper-2); padding: .7rem .85rem; border-bottom: 1px solid var(--line);
  vertical-align: bottom;
}
tbody td { padding: .72rem .85rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tbody td { font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
tbody td:first-child { font-weight: 500; color: var(--ink); }

@media (max-width: 560px) {
  table { min-width: 0; font-size: .8rem; }
  thead th { padding: .55rem .45rem; font-size: .6rem; letter-spacing: .06em; }
  tbody td { padding: .55rem .45rem; }
}

/* callouts */
.callout {
  border: 1px solid var(--line); border-left: 3px solid var(--brand);
  background: var(--brand-soft); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.2rem; margin: 1.8em 0;
}
.callout > :last-child { margin-bottom: 0; }
.callout-title { font-weight: 600; font-size: .88rem; letter-spacing: .02em; margin-bottom: .45rem; }
.callout-warn { border-left-color: var(--clay); background: var(--clay-soft); }

.callout-card {
  border: 1px dashed var(--line); border-left: 3px solid var(--brand);
  background: var(--surface);
}
.callout-card .callout-title { font-family: var(--serif); font-size: 1.02rem; letter-spacing: 0; }
.callout-card ul { padding-left: 1.1rem; }
.callout-card li { font-size: .9rem; }
.callout-card li::marker { content: "\2610  "; color: var(--muted); font-size: .85em; }

/* FAQ */
.post-faq { margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--ink); max-width: var(--measure); }
.post-faq h2 { font-size: clamp(1.35rem, 1.2rem + .7vw, 1.7rem); margin-bottom: 1rem; letter-spacing: -.025em; }
.post-faq details { border-bottom: 1px solid var(--line-soft); }
.post-faq summary {
  cursor: pointer; padding: .9rem 2rem .9rem 0; position: relative;
  font-family: var(--serif); font-size: 1.02rem; font-weight: 600; list-style: none; letter-spacing: -.01em;
}
.post-faq summary::-webkit-details-marker { display: none; }
.post-faq summary::after {
  content: "+"; position: absolute; right: .1rem; top: .78rem;
  font-family: var(--sans); font-weight: 400; font-size: 1.15rem; color: var(--brand);
}
.post-faq details[open] summary::after { content: "\2013"; }
.post-faq summary:hover { color: var(--brand); }
.post-faq .faq-q { display: inline; margin: 0; font-family: var(--serif); font-size: 1.02rem; font-weight: 600; line-height: 1.35; }
.faq-answer { padding: 0 0 1rem; color: var(--ink-2); font-size: .94rem; max-width: 38rem; }
.faq-answer > :last-child { margin-bottom: 0; }

/* sources + disclaimer */
.post-sources { margin-top: 2.8rem; padding-top: 1.3rem; border-top: 1px solid var(--line); max-width: var(--measure); }
.post-sources h2 { font-size: .95rem; letter-spacing: .02em; margin-bottom: .8rem; }
.post-sources ol { padding-left: 1.2rem; display: grid; gap: .5rem; font-size: .85rem; color: var(--ink-2); }
.post-sources li::marker { color: var(--muted); }
.source-note { font-size: .75rem; color: var(--muted); margin-top: .9rem; }

.post-disclaimer {
  margin-top: 2rem; padding: 1rem 1.2rem; border: 1px dashed var(--line);
  border-radius: var(--radius); font-size: .82rem; color: var(--muted); max-width: var(--measure);
}
.post-disclaimer strong { color: var(--ink-2); }
.post-disclaimer p { margin: 0; }

.post-foot {
  margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1.2rem; justify-content: space-between; align-items: center;
}
.tag-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag {
  font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  padding: .26rem .6rem; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); text-decoration: none;
}
.tag:hover { border-color: var(--brand); color: var(--brand); }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .74rem; color: var(--muted); }
.share a {
  text-decoration: none; color: var(--ink-2); border: 1px solid var(--line);
  padding: .3rem .7rem; border-radius: 999px; letter-spacing: .04em;
}
.share a:hover { color: var(--brand); border-color: var(--brand); }

/* --- static pages ------------------------------------------------------ */

.page-wrap { max-width: 46rem; padding-block: clamp(2rem, 4vw, 3.2rem) 4rem; }
.page-head { margin-bottom: 2rem; }
.page-head h1 { font-size: clamp(1.95rem, 1.5rem + 2vw, 2.9rem); letter-spacing: -.03em; }
.prose-wide { max-width: none; }
.notfound { min-height: 45vh; }
.notfound h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.2rem); }

/* --- contact form ------------------------------------------------------ */

.page-contact .page-wrap { max-width: 58rem; }

.contact-grid { display: grid; gap: 2.4rem; margin-top: 2rem; }
@media (min-width: 880px) {
  .contact-grid { grid-template-columns: 1fr .82fr; gap: 3.4rem; align-items: start; }
}

.form-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: clamp(1.2rem, 3vw, 1.9rem);
}
.form-card h2 { font-size: 1.3rem; margin-bottom: .4rem; letter-spacing: -.02em; }
.form-intro { font-size: .88rem; color: var(--muted); margin-bottom: 1.4rem; }
.field { margin-bottom: 1rem; }
.field label {
  display: block; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 600; color: var(--ink-2); margin-bottom: .35rem;
}
.field .hint { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); font-size: .74rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .62rem .75rem; transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent);
}
.field-row { display: grid; gap: 1rem; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }

.hp {
  position: absolute !important; left: -9999px !important; top: auto !important;
  width: 1px; height: 1px; overflow: hidden;
}
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.4rem; }
.form-foot .btn { border: 0; cursor: pointer; font-family: var(--sans); }
.form-note { font-size: .72rem; color: var(--muted); max-width: 24rem; margin: 0; }
.form-status {
  margin-top: 1rem; font-size: .85rem; padding: .7rem .9rem; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--paper-2); display: none;
}
.form-status.is-shown { display: block; }
.form-status.is-error { border-color: var(--clay); background: var(--clay-soft); color: var(--clay-ink); }
.form-status.is-ok { border-color: color-mix(in srgb, var(--brand) 45%, transparent); background: var(--brand-soft); color: var(--brand-ink); }

.contact-aside h2 { font-size: 1.15rem; letter-spacing: -.02em; }
.contact-aside p, .contact-aside li { font-size: .9rem; color: var(--ink-2); }
.contact-aside ul { padding-left: 1.1rem; display: grid; gap: .4rem; margin: 0 0 1.2rem; }
.aside-block { border-top: 1px solid var(--line); padding-top: 1.1rem; margin-top: 1.4rem; }

/* --- footer ------------------------------------------------------------ */

.site-foot {
  border-top: 1px solid var(--ink); background: var(--paper-2);
  padding-block: 2.6rem 2.4rem; margin-top: 3rem;
}
.foot-inner { display: grid; gap: 1.8rem; }
.foot-brand { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.foot-brand .brand-mark { width: 1.4rem; height: 1.4rem; }
.foot-brand strong { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; letter-spacing: -.02em; }
.foot-brand .brand-by { margin-left: .1rem; }
.foot-brand p { flex-basis: 100%; color: var(--muted); font-size: .86rem; max-width: 34rem; margin: .2rem 0 0; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: .8rem 1.1rem; font-size: .76rem; letter-spacing: .05em; text-transform: uppercase; }
.site-foot nav a { color: var(--ink-2); text-decoration: none; }
.site-foot nav a:hover { color: var(--brand); }
.foot-legal { font-size: .74rem; color: var(--muted); line-height: 1.6; max-width: 48rem; margin: 0; }
.foot-colophon { font-size: .7rem; color: var(--muted); letter-spacing: .04em; }

@media (min-width: 860px) {
  .foot-inner { grid-template-columns: 1fr auto; align-items: start; }
  .foot-legal, .foot-colophon { grid-column: 1 / -1; }
  .foot-legal { padding-top: 1.2rem; border-top: 1px solid var(--line); }
}

/* --- motion + print ---------------------------------------------------- */

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

@media print {
  .site-head, .site-foot, .toc, .theme-toggle, .hero-cta, .chips, .share { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .post-body { display: block; }
  .prose { max-width: none; }
  .figure { break-inside: avoid; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; }
}

/* --- figure: the 10% budget ------------------------------------------- */

.budget { display: grid; gap: .9rem; }
.budget-row {
  display: grid; grid-template-columns: 1fr; gap: .35rem;
  padding-bottom: .8rem; border-bottom: 1px solid var(--line-soft);
}
.budget-row:last-of-type { border-bottom: 0; }
.budget-label { font-size: .84rem; font-weight: 600; color: var(--ink); }
.budget-sub { font-weight: 400; color: var(--muted); font-size: .76rem; margin-left: .3rem; }
.budget-track { position: relative; height: .85rem; background: var(--line-soft); border-radius: 2px; overflow: hidden; }
.budget-fill { position: absolute; inset: 0 auto 0 0; background: var(--brand); border-radius: 2px; }
.budget-fill--apple { background: var(--clay); }
.budget-value { font-size: .78rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }

@media (min-width: 560px) {
  .budget-row { grid-template-columns: 13.5rem 1fr 4.2rem; align-items: center; gap: .8rem; }
  .budget-value { text-align: right; }
}

.budget-note { font-size: .86rem; color: var(--ink-2); margin: .3rem 0 0; max-width: 46ch; }

.wedges { display: flex; gap: .2rem; align-items: flex-end; flex-wrap: wrap; margin-top: .4rem; }
.wedge { position: relative; display: grid; place-items: center; width: 3.4rem; }
.wedge svg { width: 2rem; height: 2rem; color: var(--brand); }
.wedge--cut svg { color: var(--clay); }
.wedge em {
  font-style: normal; font-size: .62rem; color: var(--muted);
  font-variant-numeric: tabular-nums; margin-top: .15rem;
}
.budget-axis {
  display: flex; justify-content: space-between; gap: 1rem;
  font-size: .66rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 0; border-top: 1px solid var(--line-soft); padding-top: .5rem;
}

/* --- figure: four steps ------------------------------------------------ */

.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.1rem; grid-template-columns: 1fr 1fr;
  counter-reset: none;
}
.steps li { display: grid; gap: .2rem; align-content: start; }
.step-icon { display: block; width: 2.84rem; height: 2.84rem; color: var(--brand); margin-bottom: .35rem; }
.step-icon svg { width: 100%; height: 100%; }
.step-num {
  font-size: .6rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.steps .step-title { font-size: 1rem; margin: .1rem 0 .3rem; letter-spacing: -.01em; }
.prose .steps .step-note, .step-note { font-size: .84rem; color: var(--ink-2); margin: 0; line-height: 1.45; }

@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 1.3rem; }
  .steps li { border-top: 1px solid var(--line); padding-top: .8rem; }
}
