/* ---------- bundled fonts: fallback only, used when Google Fonts is unreachable. Distinct "... Local" names come after the Google families in the stacks; unicode-range = Google's latin + latin-ext + vietnamese subsets (no star or arrows), so symbols like the star never trigger a download ---------- */
@font-face { font-family: "Montserrat Local"; font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0000-02FF, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1D00-1DBF, U+1E00-1EFF, U+2000-206F, U+20A0-20C0, U+2113, U+2122, U+2212, U+2215, U+2C60-2C7F, U+A720-A7FF, U+FEFF, U+FFFD; src: url("../fonts/Montserrat-Regular.ttf") format("truetype"); }
@font-face { font-family: "Montserrat Local"; font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0000-02FF, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1D00-1DBF, U+1E00-1EFF, U+2000-206F, U+20A0-20C0, U+2113, U+2122, U+2212, U+2215, U+2C60-2C7F, U+A720-A7FF, U+FEFF, U+FFFD; src: url("../fonts/Montserrat-Medium.ttf") format("truetype"); }
@font-face { font-family: "Montserrat Local"; font-weight: 600; font-style: normal; font-display: swap; unicode-range: U+0000-02FF, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1D00-1DBF, U+1E00-1EFF, U+2000-206F, U+20A0-20C0, U+2113, U+2122, U+2212, U+2215, U+2C60-2C7F, U+A720-A7FF, U+FEFF, U+FFFD; src: url("../fonts/Montserrat-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Montserrat Local"; font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0000-02FF, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1D00-1DBF, U+1E00-1EFF, U+2000-206F, U+20A0-20C0, U+2113, U+2122, U+2212, U+2215, U+2C60-2C7F, U+A720-A7FF, U+FEFF, U+FFFD; src: url("../fonts/Montserrat-Bold.ttf") format("truetype"); }
@font-face { font-family: "Playfair Display Local"; font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0000-02FF, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1D00-1DBF, U+1E00-1EFF, U+2000-206F, U+20A0-20C0, U+2113, U+2122, U+2212, U+2215, U+2C60-2C7F, U+A720-A7FF, U+FEFF, U+FFFD; src: url("../fonts/PlayfairDisplay-Medium.ttf") format("truetype"); }
@font-face { font-family: "Playfair Display Local"; font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0000-02FF, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1D00-1DBF, U+1E00-1EFF, U+2000-206F, U+20A0-20C0, U+2113, U+2122, U+2212, U+2215, U+2C60-2C7F, U+A720-A7FF, U+FEFF, U+FFFD; src: url("../fonts/PlayfairDisplay-Bold.ttf") format("truetype"); }
/* ---------- base ---------- */
.site-footer, .card, .tile__link, .cut-panel, .drawer--right { --muted: var(--muted-on-cream); }
main [id] { scroll-margin-top: 72px; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.drawer-open { overflow: hidden; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--font-body); }
body > .site-footer { margin-top: auto; }
[hidden] { display: none !important; }
a { color: var(--brown); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brown-dark); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); }
h3 { font-size: 1.15rem; }
:focus-visible { outline: 2px solid var(--brown); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 1000; background: var(--paper); padding: 8px 12px; }
main { display: block; width: 100%; flex: 1 0 auto; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter) 64px; outline: none; transition: opacity .15s; }
main.tx-fade-out, main.tx-fade-in { opacity: 0; }
.eyebrow { font: 600 .75rem/1.4 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.section { padding: 40px 0; border-top: 1px solid var(--rule); }
.prose { max-width: 68ch; }
.prose p { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.page-head { padding: 32px 0 8px; }
.crumbs { font-size: .8rem; margin: 16px 0; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* ---------- buttons, chips, badges ---------- */
.btn { display: inline-block; padding: 12px 22px; background: var(--ink); color: var(--paper); font: 600 .8rem var(--font-body);
  letter-spacing: .12em; text-transform: uppercase; text-decoration: none; border-radius: var(--radius); border: 0; cursor: pointer; }
.btn:hover { background: var(--brown-dark); color: var(--paper); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--small { padding: 8px 14px; font-size: .7rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 8px 0 16px; }
.chip { display: inline-block; padding: 4px 12px; border: 1px solid var(--brown); border-radius: 999px; background: transparent;
  font: 600 .72rem/1.6 var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--brown); text-decoration: none; cursor: pointer; }
.chip:hover, .chip[aria-pressed="true"] { background: var(--brown); color: var(--cream); }
.badge { display: inline-block; padding: 0 8px; border-radius: 999px; border: 1px solid currentColor;
  font-weight: 700; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.badge--basic { color: var(--muted); }
.badge--involved { color: var(--brown); }
.badge--complex { color: var(--ink); }
a.vocab { color: inherit; text-decoration: underline dotted var(--brown); text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: help; }
a.chip.vocab { text-decoration: none; cursor: pointer; color: var(--brown); }
a.chip.vocab:hover { color: var(--cream); }

/* ---------- header & footer ---------- */
.site-header { position: sticky; top: 0; z-index: 600; display: flex; align-items: center; gap: 12px;
  padding: 10px var(--gutter); background: var(--header-bg); border-bottom: 1px solid var(--rule); }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 6px; background: var(--speckle-h) repeat-x; opacity: .35; pointer-events: none; }
.brand { margin-right: auto; font: 700 1.15rem var(--font-head); color: var(--ink); text-decoration: none; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); cursor: pointer; text-decoration: none; }
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.theme-toggle svg { display: none; }
:root:not([data-theme="light"]) .theme-toggle .i-sun, :root[data-theme="light"] .theme-toggle .i-moon { display: block; }
.header-link { font: 600 .75rem var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.site-footer { border-top: 1px solid var(--rule); background: var(--cream); padding: 24px var(--gutter) calc(24px + env(safe-area-inset-bottom));
  text-align: center; color: var(--muted); font-size: .8rem; }
.site-footer p { margin: 0 0 8px; }
.tx-toggle { background: none; border: 0; color: var(--brown); font: 600 .75rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; text-decoration: underline; }

/* ---------- home ---------- */
.hero { padding: 40px 0 8px; text-align: center; }
.lede { color: var(--muted); max-width: 44ch; margin: 0 auto; }
.cow-stage { position: relative; max-width: 980px; margin: 8px auto 0; }
/* Desktop: size the cow by viewport height so the whole animal (hooves, Shank, Ground) stays above the
   open cut panel at scroll 0. 960 / 668 is the cow.yaml viewbox aspect; 720px keeps the labels legible. */
@media (min-width: 768px) {
  .cow-stage { max-width: min(980px, max(720px, calc((100vh - 400px) * 960 / 668))); }
}
@media (min-width: 768px) and (max-height: 1000px) {
  main[data-page="home"] .hero { padding-top: 6px; }
  main[data-page="home"] .hero h1 { font-size: 2.4rem; margin-bottom: .25em; }
  main[data-page="home"] .hero .lede { max-width: none; }
  .cow--full .label--cut { font-size: 14px; }  /* the cow is drawn smaller here */
}
.zoom-out { position: absolute; top: 0; left: 0; padding: 8px 14px; }
.cut-list__group { margin-top: 24px; }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); list-style: none; padding: 0; margin: 0; }
.card { display: flex; flex-direction: column; gap: 4px; padding: 16px; height: 100%; background: var(--cream); border: 1px solid transparent;
  border-radius: var(--radius); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--brown); color: var(--ink); transform: translateY(-2px); }
.card__name { font: 700 1.1rem var(--font-head); }
.card__meta { font-size: .78rem; color: var(--muted); }

/* ---------- cow diagram ---------- */
.cow { display: block; width: 100%; height: auto; overflow: visible; -webkit-tap-highlight-color: transparent; }
/* Fills under the cuts, outline (.cow__outline: body edge, near legs, details) over them; see _cow.html. */
.cow__body, .cow__tail, .cow__leg { fill: var(--cow-body); }
.cow__tail { stroke: var(--cow-outline); stroke-width: 3; stroke-linejoin: round; } /* behind the body */
.cow__line, .cow__detail { fill: none; stroke: var(--cow-line); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cow__line { stroke: var(--cow-outline); } /* body and leg edges are the silhouette */
.cow__detail--eye, .cow__detail--nostril { fill: var(--cow-line); stroke-width: 1.5; }
.cut { fill: transparent; stroke: var(--cut-line); stroke-width: 1.5; cursor: pointer; transition: fill .18s var(--ease), stroke .18s; outline: none; }
.cut--solid { fill: var(--cow-body); stroke: var(--cow-outline); stroke-width: 3; }
.cut--empty { cursor: default; pointer-events: none; }
.cut[data-cut="oxtail"], .cow.has-hot .cut[data-cut="oxtail"]:not(.is-hot) { fill: transparent; stroke: transparent; stroke-width: 16; } /* wider tap target */
.cut:hover, .cut:focus-visible, .cut.is-hot, .cut.is-active { fill: var(--cut-hot-fill); stroke: var(--cut-hot-line); stroke-width: 3; }
.cow.has-hot .cut:not(.is-hot) { stroke: var(--cut-line); stroke-opacity: .5; }
.label { font: 600 13px var(--font-body); fill: var(--label-fill); stroke: var(--label-halo); stroke-width: 3px; paint-order: stroke; stroke-linejoin: round; pointer-events: none; }
.label--outside { fill: var(--ink); stroke: var(--paper); }
.label.is-hot { fill: var(--label-halo); stroke: var(--cut-hot-fill); }
.label--primal { display: none; font: 700 26px var(--font-head); }
.cow--thumb .cut:not([data-cut="oxtail"]):not(.cut--solid):not(.is-active) { stroke: var(--cut-line); stroke-opacity: .7; }
@media (max-width: 767px) {
  .cow--full { overflow: hidden; }
  .cow--full .label--cut { display: none; }
  .cow--full .label--primal { display: inline; }
  .cow--full.is-zoomed .label--primal { display: none; }
  .cow--full.is-zoomed .label--cut.is-shown { display: inline; }
}

/* ---------- bottom cut panel ---------- */
.cut-panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 700; max-height: 60vh; overflow: auto; background: var(--cream);
  border-top: 1px solid var(--rule); box-shadow: var(--shadow-up); transform: translateY(100%); transition: transform .28s var(--ease); }
.cut-panel.is-open { transform: none; }
.cut-panel__inner { display: grid; gap: 8px 32px; max-width: var(--maxw); margin: 0 auto; padding: 20px var(--gutter) calc(20px + env(safe-area-inset-bottom)); }
.cut-panel__inner h2 { margin-bottom: .25em; }
.cut-panel__inner .prose p { margin-bottom: .5em; }
.cut-panel__close { position: absolute; top: 6px; right: 10px; width: 36px; height: 36px; border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--ink); cursor: pointer; }
@media (min-width: 768px) { .cut-panel__inner { grid-template-columns: 1fr auto; align-items: end; } }
@media (max-width: 767px) {
  .cut-panel { max-height: 42vh; }
  .cut-panel__inner { gap: 10px; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); }
  .cut-panel__inner .eyebrow { margin-bottom: 2px; padding-right: 40px; font-size: .68rem; }
  .cut-panel__inner h2 { font-size: 1.3rem; margin-bottom: .2em; padding-right: 40px; }
  .cut-panel__inner .prose { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: .88rem; line-height: 1.45; }
  .cut-panel__inner .prose p { margin: 0; }
  .cut-panel__inner .chips { flex-wrap: nowrap; overflow-x: auto; gap: 6px; margin: 8px 0 0; padding-bottom: 2px; scrollbar-width: none; }
  .cut-panel__inner .chip { flex: none; padding: 2px 10px; font-size: .66rem; }
  .cut-panel__inner .btn { display: block; padding: 11px 16px; text-align: center; }
  .cut-panel__close { top: 4px; right: 6px; }
  .cow-stage:has(.cow.is-zoomed) { padding: 44px 0 42vh; }
  .zoom-out { padding: 7px 12px; font-size: .7rem; }
}

/* ---------- cut page ---------- */
.cut-hero { display: grid; gap: 24px; padding: 8px 0 32px; }
.cut-hero__cow { width: 100%; max-width: 300px; margin: 0 auto; }
@media (min-width: 768px) { .cut-hero { grid-template-columns: 300px 1fr; align-items: start; } }
.recipes__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; }
.filters { display: grid; gap: 8px; }
.filters__row { display: flex; flex-wrap: wrap; gap: 8px; }
.tiles { display: grid; gap: 16px; grid-template-columns: 1fr; list-style: none; padding: 0; margin: 20px 0 0; }
@media (min-width: 600px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile__link { display: flex; flex-direction: column; height: 100%; padding: 18px; background: var(--cream); border-top: 3px solid var(--ink);
  border-radius: var(--radius); color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.tile__link:hover { color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow); }
.tile__culture { margin: 0; font: 600 .7rem var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tile__title { margin: 6px 0 14px; font-size: 1.2rem; }
.tile__meta { margin: auto 0 0; font-size: .78rem; color: var(--muted); }

/* ---------- recipe page ---------- */
.recipe__head { padding-top: 8px; }
.meta-bar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 24px 0; background: var(--rule); border: 1px solid var(--rule); }
.meta-bar > div { padding: 10px 14px; background: var(--paper); }
.meta-bar dt { font: 600 .68rem var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.meta-bar dd { margin: 2px 0 0; font-weight: 600; }
.meta-bar > .meta-bar__action { grid-column: 1 / -1; padding: 8px 14px; }
.meta-bar__action dd { margin: 0; }
.meta-bar__action .btn { display: block; text-align: center; }
@media (min-width: 768px) { .meta-bar { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 768px) { .meta-bar__action dd { text-align: right; } .meta-bar__action .btn { display: inline-block; } }
.recipe__body h2 { margin-top: 1.6em; padding-bottom: .3em; border-bottom: 1px solid var(--rule); }
.recipe__body h3 { margin-top: 1.2em; font-size: 1rem; font-family: var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.recipe__body ol li { margin-bottom: .7em; padding-left: .2em; }
.recipe__body li::marker { color: var(--brown); font-weight: 700; }
.sources { margin-top: 32px; font-size: .9rem; }

/* ---------- glossary page ---------- */
.jump { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .85rem; }
.term-recipes { columns: 2 220px; padding-left: 1.2em; font-size: .9rem; }
details summary { cursor: pointer; color: var(--brown); font-weight: 600; }

/* ---------- lost cow: 404 and offline fallback (_lost.html) ---------- */
.lost { padding: 28px 0 8px; text-align: center; }
.lost__brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 18px;
  font: 700 1rem/1.2 var(--font-head); letter-spacing: .02em; color: var(--ink); }
.lost__mark { display: inline-flex; color: var(--ink); }
.lost__mark svg { width: 34px; height: auto; }
.lost__scene { position: relative; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); overflow: hidden; }
.lost__pasture { position: absolute; left: 0; bottom: -10px; width: 100%; height: 120px; pointer-events: none; }
.lost__pasture path { fill: none; stroke: var(--cow-outline); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke; }
.lost__fence, .lost__grass { opacity: .7; }
.lost__divider { position: relative; display: flex; align-items: flex-end; }
.lost__rule { flex: 1 1 0; height: 1px; margin-bottom: 1px; background: var(--rule); }
.lost__cow { flex: 0 0 auto; width: clamp(180px, 21vw, 270px); animation: lost-wander 2.4s cubic-bezier(.3, .55, .45, 1) both; }
.lost__cow svg { display: block; width: 100%; height: auto; overflow: visible; }
.lost__cow.is-walking .walker__leg { animation: cow-step .48s ease-in-out infinite; }
.lost__cow.is-walking .walker__leg--b { animation-delay: -.24s; }
.lost__cow.is-walking .walker__bob { animation: cow-bob .24s ease-in-out infinite alternate; }
/* Without JS the cow glides in and then grazes; with JS (initLost) it walks in (.is-walking), then grazes (.is-grazing). */
.lost__cow:not(.is-walking) .walker__bob { transform-box: view-box; transform-origin: 250px 600px;
  animation: cow-graze 5s ease-in-out 2.6s infinite; }
.lost__cow.is-grazing .walker__bob { animation-delay: .3s; }
@keyframes lost-wander { from { transform: translateX(-60vw); } to { transform: none; } }
@keyframes cow-graze { 0%, 45%, 100% { transform: rotate(0deg); } 55%, 90% { transform: rotate(5deg); } 72% { transform: rotate(4deg); } }
.lost__copy { padding-top: 22px; }
.lost h1 { margin-bottom: .3em; text-wrap: balance; }
.lost--offline h1 { font-size: clamp(1.9rem, 5vw, 2.75rem); }
.lost .lede { max-width: 50ch; text-wrap: balance; }
.lost__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 24px 0 0; }
.lost__find { max-width: 30rem; margin: 40px auto 0; text-align: left; }
.lost__find label { display: block; margin-bottom: 6px; font: 600 .75rem/1.4 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.lost__find input { width: 100%; padding: 11px 14px; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); font: inherit; }
.lost__find input:focus { border-color: var(--brown); outline: none; box-shadow: 0 0 0 1px var(--brown); }
.lost__results { list-style: none; margin: 6px 0 0; padding: 0; }
.lost__results:empty { display: none; }
.lost__results li { border-bottom: 1px solid var(--rule); }
.lost__results a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px; color: var(--ink); text-decoration: none; }
.lost__results a:hover, .lost__results a:focus-visible { color: var(--brown); }
.lost__results .muted { flex: none; font-size: .78rem; }
.lost__results .lost__none { padding: 9px 2px; color: var(--muted); }
.lost__picks { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--rule); text-align: left; }
.lost__picks-title { margin: 0; text-align: center; font-size: 1.3rem; }
.lost__picks .tiles { margin-top: 16px; }
@media (min-width: 900px) { .lost__picks .tiles { grid-template-columns: repeat(3, 1fr); } }
.lost__credit { margin: 40px 0 0; font: 600 .7rem/1.4 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* ---------- drawers ---------- */
.scrim { position: fixed; inset: 0; z-index: 790; background: var(--scrim); opacity: 0; transition: opacity .3s; }
.scrim.is-on { opacity: 1; }
.drawer.is-instant, .scrim.is-instant { transition: none; }
.drawer { position: fixed; top: 0; bottom: 0; z-index: 800; width: min(400px, 100vw); overflow-y: auto; overscroll-behavior: contain;
  padding: 12px var(--gutter) 32px; box-shadow: var(--shadow); visibility: hidden; transition: transform .3s var(--ease), visibility 0s linear .3s; }
.drawer.is-open { transform: none; visibility: visible; transition: transform .3s var(--ease); }
.drawer--left { left: 0; transform: translateX(-100%); background: var(--paper) var(--speckle-v) right 3px top / 6px 40px repeat-y; }
.drawer--right { right: 0; transform: translateX(100%); background: var(--cream) var(--speckle-v) left 3px top / 6px 40px repeat-y; }
@media (max-width: 599px) { .drawer { width: 100vw; } }
.drawer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.drawer__head .eyebrow { margin: 0; }
.drawer__close { width: 40px; height: 40px; border: 0; background: none; font-size: 1.8rem; line-height: 1; color: var(--ink); cursor: pointer; }
.drawer--right h2 { margin-top: 0; }

/* ---------- index ---------- */
.index__search input { width: 100%; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--rule); border-radius: var(--radius); font: inherit; background: var(--paper); }
.index__primal { margin-top: 16px; }
.index__cut-link { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--rule);
  font: 700 1.05rem var(--font-head); color: var(--ink); text-decoration: none; }
.index__cut-link:hover { color: var(--brown); }
.index ul { list-style: none; margin: 0; padding: 4px 0 12px; }
.index li a { display: block; padding: 5px 0 5px 12px; color: var(--ink); text-decoration: none; font-size: .9rem; }
.index li a:hover { color: var(--brown); }
.index li .muted { font-size: .75rem; }

/* ---------- offline page, progress, update toast ---------- */
.offline-page { max-width: 44rem; margin: 0 auto; }
.offline-page__status { font-weight: 600; margin: 20px 0 10px; }
.offline-page__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 16px 0; }
.offline-page__note { font-size: .85rem; }
.pamphlets-page__item { margin: 24px 0; }
.pamphlets-page__item h2 { margin-bottom: .1em; }
progress { display: block; width: 100%; height: 8px; accent-color: var(--brown); }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 950; max-width: calc(100vw - 32px);
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 20px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 600 .85rem var(--font-body);
  transform: translate(-50%, 16px); opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none; }
.toast[hidden] { display: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast__close { flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: inherit;
  font: 700 1.2rem/1 var(--font-body); cursor: pointer; }
.toast__close:hover, .toast__close:focus-visible { background: var(--paper); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* ---------- cow-walk transition ---------- */
html.tx-busy body { pointer-events: none; }
.tx-cow { position: fixed; top: 50%; left: 0; z-index: 902; display: none; width: clamp(140px, 22vw, 260px); pointer-events: none; will-change: transform; }
.tx-cow.is-walking { display: block; }
.tx-cow svg { display: block; width: 100%; height: auto; }
.tx-cow.is-reverse svg { transform: scaleX(-1); }
.walker .cow__tail { stroke: none; }
.cow__edge { fill: none; stroke: var(--cow-outline); stroke-width: 14; stroke-linejoin: round; } /* under the fills: the outer 7 (~2px) shows */
.walker .cow__detail { stroke-width: 7; }
.walker .cow__detail--eye, .walker .cow__detail--nostril { stroke-width: 1.5; }
.walker__leg { transform-box: view-box; } /* transform-origin (the hip / shoulder) is set inline from cow.yaml */
.tx-cow.is-walking .walker__leg { animation: cow-step .56s ease-in-out infinite; }
.tx-cow.is-walking .walker__leg--b { animation-delay: -.28s; }
.tx-cow.is-walking .walker__bob { animation: cow-bob .28s ease-in-out infinite alternate; }
@keyframes cow-step {
  0%   { transform: rotate(16deg); }
  25%  { transform: rotate(0deg) translateY(-1px); }
  50%  { transform: rotate(-16deg); }
  75%  { transform: rotate(0deg) translateY(-1px); }
  100% { transform: rotate(16deg); }
}
@keyframes cow-bob { from { transform: translateY(0); } to { transform: translateY(-8px); } }
.tx-layer { position: fixed; inset: 0; z-index: 900; overflow: hidden; background: var(--paper); pointer-events: none; }
.tx-layer__page { position: absolute; top: 0; left: 0; right: 0; }
.tx-edge { position: fixed; top: 0; bottom: 0; left: 0; z-index: 901; width: 36px; margin-left: -36px; pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, var(--edge-soft) 55%, var(--edge-paper) 80%, var(--edge-shade) 100%); }
.tx-edge.is-reverse { margin-left: 0;
  background: linear-gradient(270deg, transparent 0%, var(--edge-soft) 55%, var(--edge-paper) 80%, var(--edge-shade) 100%); }

@media (prefers-reduced-motion: reduce) {
  .drawer, .cut-panel, .scrim, .card, .tile__link, main { transition: none; }
  .lost__cow, .lost__cow .walker__leg, .lost__cow .walker__bob { animation: none !important; }
}

/* Print: clean light recipe page regardless of theme */
@page { margin: 16mm; }
@media print {
  :root, :root[data-theme="light"], :root[data-theme="dark"] { color-scheme: light; --paper: #fff; --ink: #1D1B1A; --cream: #fff; --rule: #D6CFC0; --muted: #4F4943; --brown: #483D31; }
  html, body { background: #fff; color: #1D1B1A; }
  body { min-height: 0; display: block; font-size: 11pt; }
  .site-header, .site-footer, .drawer, .scrim, .tx-cow, .tx-layer, .tx-edge, .skip, .crumbs, .cut-panel,
  .meta-bar__action, .filters, [data-tx-toggle], [data-theme-toggle], [data-toast] { display: none !important; }
  main, .recipe, .recipe__body { max-width: 100%; }
  .meta-bar { grid-template-columns: repeat(6, 1fr); }
  h2 { break-after: avoid; }
  li { break-inside: avoid; }
  a.vocab { text-decoration: none; color: inherit; }
  .badge { color: #1D1B1A; }
  .sources a::after { content: " (" attr(href) ")"; word-break: break-all; }
}
