/* Lastenruoka.fi
   Warm cream base, one strong accent (tomato), pastel tones per topic.
   Fonts are self-hosted (OFL), no third-party requests. */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/fraunces-soft.woff2) format('woff2-variations');
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(/fonts/figtree.woff2) format('woff2-variations');
}

:root {
  --cream: #fff7ec;
  --cream-2: #fcefdc;
  --paper: #fff;
  --ink: #22304a;
  --ink-2: #56617a;
  --line: rgba(34, 48, 74, .12);

  --tomato: #e4573d;
  --tomato-600: #c2412a;
  --carrot: #f2913a;
  --butter: #ffd66b;
  --butter-soft: #ffe9a8;
  --pea: #6faf5b;
  --pea-600: #3f7a31;
  --pea-soft: #e0f0d6;
  --blueberry: #3b4e8c;

  --radius: 24px;
  --shadow-lift: 0 22px 40px -22px rgba(34, 48, 74, .38);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;

  interpolate-size: allow-keywords;
  color-scheme: light;
}

/* Topic tones: background, text, strong accent. */
.tone-0, .age-vauva   { --t-bg: #ffe2d8; --t-fg: #a3361f; --t-strong: #e4573d; }
.tone-1, .age-taapero { --t-bg: #e0f0d6; --t-fg: #3a702d; --t-strong: #6faf5b; }
.tone-2               { --t-bg: #fff0c2; --t-fg: #7d5806; --t-strong: #eeb127; }
.tone-3, .age-leikki  { --t-bg: #dcedf8; --t-fg: #235a80; --t-strong: #4c93c7; }
.tone-4               { --t-bg: #f8dfea; --t-fg: #8e2f5b; --t-strong: #d0628f; }
.tone-5               { --t-bg: #e8e3f7; --t-fg: #4f3f95; --t-strong: #8a78d0; }

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 100;
  font-weight: 620;
  line-height: 1.15;
  letter-spacing: -.015em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }

:focus-visible {
  outline: 3px solid var(--carrot);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 760px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px;
  transition: top .2s;
}
.skip:focus { top: 12px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Icon parts (the sprite is styled from here) */
.ic-main { fill: currentColor; }
.ic-leaf { fill: var(--pea); }
.ic-food { fill: var(--carrot); }
.ic-light { fill: #fff; opacity: .55; }
.ic-dark { fill: var(--ink); }
.ic-line { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; opacity: .55; }
.ic-line--light { stroke: #fff; opacity: .7; }
.ic-bold { fill: none; stroke: currentColor; stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.ic-bold--light { stroke: #fff; }
.ic-stroke { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.i {
  width: 1.1em; height: 1.1em;
  vertical-align: -.2em;
  margin-right: .35em;
  flex: none;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--cream);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px -20px rgba(34, 48, 74, .5);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 72px;
}

.logo {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
}
.logo-mark { width: 40px; height: 40px; transition: transform .6s var(--ease-spring); }
.logo:hover .logo-mark { transform: rotate(-18deg) scale(1.06); }
.lm-plate { fill: var(--paper); stroke: var(--line); stroke-width: 1.5; }
.lm-inner { fill: var(--butter-soft); }
.lm-pea { fill: var(--pea); }
.lm-berry { fill: var(--tomato); }
.lm-smile { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }

.logo-word {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 100;
  font-size: 1.4rem;
  font-weight: 560;
  letter-spacing: -.02em;
}
.logo-word b { color: var(--tomato); font-weight: 720; }
.logo-word i { font-style: normal; color: var(--ink-2); font-weight: 450; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: .98rem;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background-color .2s, color .2s;
}
.main-nav a:hover { background: var(--paper); }
.main-nav a { white-space: nowrap; }
.nav-short { display: none; }
.main-nav a[aria-current='page'] { background: var(--ink); color: var(--cream); }
.nav-search { display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0 !important; }
.nav-search svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

@media (max-width: 560px) {
  .logo-word { font-size: 1.15rem; }
  .logo-mark { width: 34px; height: 34px; }
  .main-nav a { padding: 8px 10px; font-size: .92rem; }
  .main-nav .nav-wide { display: none; }
  .nav-full { display: none; }
  .nav-short { display: inline; }
}
/* Room for the account button next to search on the narrowest phones. */
@media (max-width: 420px) {
  .header-inner { gap: 8px; }
  .main-nav { gap: 0; }
  .main-nav a { padding: 8px 7px; }
  .nav-search { width: 34px; height: 34px; }
  .logo-word i { display: none; }
  .logo { gap: 6px; }
  .logo-word { font-size: 1.05rem; }
  .logo-mark { width: 30px; height: 30px; }
}
@media (max-width: 349px) {
  .logo-word { display: none; }
}

/* ---------- Shared bits ---------- */

.eyebrow {
  display: inline-flex; align-items: center;
  margin: 0 0 18px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  background: var(--pea-soft);
  color: var(--pea-600);
  font-weight: 700;
  font-size: .88rem;
  letter-spacing: .01em;
}

.section { padding: 76px 0; }
.section-tight { padding: 36px 0 80px; }
.section-head { margin-bottom: 32px; max-width: 640px; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-bottom: 10px; }
.section-head p { color: var(--ink-2); font-size: 1.1rem; margin: 0; }
.section-head--row {
  max-width: none;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.sub-head { font-size: 1.5rem; margin: 8px 0 20px; }
.sub-head:not(:first-child) { margin-top: 56px; }

.link-more {
  display: inline-flex; align-items: center;
  font-weight: 700;
  color: var(--tomato-600);
  text-decoration: none;
}
.link-more .i { margin: 0 0 0 .3em; transition: transform .3s var(--ease-out); }
.link-more:hover .i { transform: translateX(4px); }

/* Search */
.search {
  display: flex; gap: 8px;
  max-width: 520px;
  padding: 6px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 5px 0 rgba(34, 48, 74, .06);
  transition: border-color .2s, box-shadow .2s;
}
.search:focus-within { border-color: var(--carrot); box-shadow: 0 5px 0 rgba(242, 145, 58, .22); }
.search input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: transparent;
  font: inherit; color: var(--ink);
  padding: 10px 8px 10px 18px;
}
.search input::placeholder { color: #8b93a6; }
.search button {
  border: 0; cursor: pointer;
  font: 700 1rem var(--font-body);
  color: #fff;
  background: var(--tomato);
  padding: 12px 24px;
  border-radius: 999px;
  transition: background-color .2s, transform .2s var(--ease-spring);
}
.search button:hover { background: var(--tomato-600); }
.search button:active { transform: scale(.95); }
.search--page { margin-top: 20px; }

/* Chips */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 9px;
  border-radius: 999px;
  background: var(--t-bg, var(--paper));
  color: var(--t-fg, var(--ink));
  font-weight: 650;
  font-size: .95rem;
  text-decoration: none;
  transition: transform .25s var(--ease-spring), background-color .2s;
}
.chip:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--t-bg) 70%, var(--t-strong)); }
.chip-icon { width: 24px; height: 24px; color: var(--t-strong); }
.chip-n {
  font-size: .8rem; font-weight: 700;
  background: var(--paper);
  padding: 1px 8px; border-radius: 999px;
}
.chip-age { padding-left: 14px; }

/* ---------- Hero ---------- */

.hero { padding: 40px 0 36px; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 32px;
}
.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 640;
  line-height: 1.02;
  letter-spacing: -.03em;
  margin-bottom: 22px;
}
.hero-em { position: relative; color: var(--tomato); white-space: nowrap; }
.hero-underline {
  position: absolute; left: -2%; bottom: -.12em;
  width: 104%; height: .32em;
  overflow: visible;
}
.hero-underline path {
  fill: none; stroke: var(--butter); stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: 240; stroke-dashoffset: 240;
  animation: draw 1.1s .6s var(--ease-out) forwards;
}
.hero-em { z-index: 0; }
.hero-underline { z-index: -1; }
.hero-lead { font-size: 1.2rem; color: var(--ink-2); max-width: 36ch; margin-bottom: 28px; }

.hero-trust {
  list-style: none; margin: 22px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  color: var(--ink-2); font-size: .95rem; font-weight: 600;
}
.hero-trust li { display: inline-flex; align-items: center; }
.hero-trust .i { color: var(--pea); }

.hero-copy > * { animation: rise .8s var(--ease-out) both; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; }
.hero-copy > :nth-child(5) { animation-delay: .32s; }

.hero-visual { position: relative; }
.hero-art { width: 100%; height: auto; overflow: visible; }

/* Hero illustration */
.ha-blob { fill: var(--butter-soft); transform-box: fill-box; transform-origin: center; animation: breathe 9s ease-in-out infinite; }
.ha-ring {
  fill: none; stroke: rgba(34, 48, 74, .16); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1 12;
  transform-box: fill-box; transform-origin: center; animation: spin 90s linear infinite;
}
.ha-crumbs circle, .ha-crumbs rect { fill: var(--tomato); opacity: .5; }
.ha-crumbs :nth-child(even) { fill: var(--pea); }
.ha-steam path {
  fill: none; stroke: rgba(34, 48, 74, .2); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 40 160; stroke-dashoffset: 170;
  animation: steam 3.6s ease-in-out infinite;
}
.ha-steam path:nth-child(2) { animation-delay: 1.1s; }
.ha-steam path:nth-child(3) { animation-delay: 2.1s; }
.ha-wood { fill: #e8b779; }
.ha-wood-dark { fill: #d59c58; }
.ha-spoon { transform-box: fill-box; transform-origin: 30% 95%; animation: stir 6s ease-in-out infinite; }
.ha-shadow { fill: rgba(34, 48, 74, .09); }
.ha-bowl-body { fill: var(--tomato); }
.ha-bowl-band { fill: #fff; opacity: .16; }
.ha-bowl-dots circle { fill: #fff; opacity: .85; }
.ha-bowl-foot { fill: var(--tomato-600); }
.ha-rim { fill: #f07b61; }
.ha-food { fill: #f6a24e; }
.ha-swirl { fill: none; stroke: #ffc583; stroke-width: 5; stroke-linecap: round; }
.ha-herb { fill: var(--pea); }
.ha-carrot { fill: #f28c28; }
.ha-carrot-line { fill: none; stroke: #d06b14; stroke-width: 3; stroke-linecap: round; }
.ha-leaf { fill: var(--pea); }
.ha-pod { fill: #7db36a; }
.ha-pod-edge { fill: none; stroke: #5b9748; stroke-width: 3; stroke-linecap: round; }
.ha-peas { fill: #b7de9d; }
.ha-berry { fill: var(--tomato); }
.ha-seeds ellipse { fill: #ffe08a; }
.ha-blue { fill: var(--blueberry); }
.ha-blue-crown { fill: none; stroke: #26356a; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.ha-banana { fill: var(--butter); }
.ha-banana-in { fill: #fff2c4; }
.ha-banana-seeds circle { fill: #8c6a3a; }
.ha-stem { fill: #9ccb7f; }
.ha-broc { fill: #5e9e4b; }
.ha-broc-hi { fill: var(--pea); }

.pop {
  transform-box: fill-box; transform-origin: center;
  animation: pop .9s var(--ease-spring) both;
  translate: calc(var(--mx, 0) * var(--d, 10) * 1px) calc(var(--my, 0) * var(--d, 10) * 1px);
  transition: translate 1s var(--ease-out);
}
.p1 { animation-delay: .25s; --d: 22; }
.p2 { animation-delay: .4s;  --d: 16; }
.p3 { animation-delay: .55s; --d: 26; }
.p4 { animation-delay: .7s;  --d: 12; }
.p5 { animation-delay: .85s; --d: 18; }
.p6 { animation-delay: 1s;   --d: 14; }

.bob { transform-box: fill-box; transform-origin: center; animation: bob 6s ease-in-out infinite; }
.b1 { --r: 6deg;  animation-duration: 6.4s; animation-delay: -1s; }
.b2 { --r: -5deg; animation-duration: 7.2s; animation-delay: -3s; }
.b3 { --r: 8deg;  animation-duration: 5.6s; animation-delay: -2s; }
.b4 { --r: -6deg; animation-duration: 6.8s; animation-delay: -4s; }
.b5 { --r: 12deg; animation-duration: 8s;   animation-delay: -.5s; }
.b6 { --r: -4deg; animation-duration: 7.6s; animation-delay: -2.5s; }

/* ---------- Marquee ---------- */

.marquee {
  overflow: hidden;
  background: var(--butter);
  transform: rotate(-1.2deg);
  margin: 12px -10px 0;
  padding: 14px 0;
  box-shadow: 0 6px 0 rgba(34, 48, 74, .06);
}
.marquee-track { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; }
.marquee-group span {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 100;
  font-size: 1.45rem; font-weight: 560;
  display: inline-flex; align-items: center; gap: 36px;
  padding-right: 36px;
  white-space: nowrap;
}
.marquee-group span::after {
  content: ''; width: 10px; height: 10px; border-radius: 50%;
  background: var(--tomato);
}
.marquee-group span:nth-child(3n+2)::after { background: var(--pea); }
.marquee-group span:nth-child(3n)::after { background: var(--blueberry); }

/* ---------- Age cards ---------- */

.ages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.age-card {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start;
  min-height: 230px;
  padding: 28px;
  border-radius: 28px;
  background: var(--t-bg);
  color: var(--t-fg);
  text-decoration: none;
  transition: transform .45s var(--ease-spring), box-shadow .3s;
}
.age-card::before {
  content: '';
  position: absolute; z-index: -1;
  width: 240px; height: 240px; right: -70px; bottom: -110px;
  border-radius: 50%;
  background: var(--t-strong); opacity: .18;
  transition: transform .6s var(--ease-out);
}
.age-card:hover { transform: translateY(-6px) rotate(-.6deg); box-shadow: var(--shadow-lift); }
.age-card:hover::before { transform: scale(1.35); }
.age-icon {
  position: absolute; right: 22px; top: 22px;
  width: 84px; height: 84px; color: var(--t-strong);
  transition: transform .6s var(--ease-spring);
}
.age-icon svg { width: 100%; height: 100%; }
.age-card:hover .age-icon { transform: rotate(-12deg) scale(1.08); }
.age-range {
  font-family: var(--font-display); font-variation-settings: 'SOFT' 100;
  font-size: 2.6rem; font-weight: 680; letter-spacing: -.03em; line-height: 1;
  margin-top: auto;
}
.age-label { font-size: 1.2rem; font-weight: 700; margin-top: 6px; color: var(--ink); }
.age-count { display: inline-flex; align-items: center; gap: 4px; margin-top: 14px; font-weight: 650; font-size: .95rem; }
.age-count .i { margin: 0; transition: transform .3s var(--ease-out); }
.age-card:hover .age-count .i { transform: translateX(5px); }
.ages--compact .age-card { min-height: 190px; }

/* ---------- Cards ---------- */

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

.card {
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); border-color: transparent; }
.card-media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--t-bg); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.card:hover .card-media img { transform: scale(1.05); }
.card-body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 18px 20px 20px; }
.card-cat { font-size: .82rem; font-weight: 750; color: var(--t-fg); letter-spacing: .02em; }
.card-title { font-size: 1.28rem; line-height: 1.22; }
.card-excerpt { font-size: .96rem; color: var(--ink-2); margin: 0; }
.card-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 10px;
  font-size: .88rem; font-weight: 600; color: var(--ink-2);
}
.card-go {
  display: grid; place-items: center;
  width: 36px; height: 36px; margin-left: auto;
  border-radius: 50%;
  background: var(--t-bg); color: var(--t-fg);
  transition: background-color .3s, color .3s;
}
.card-go .i { margin: 0; transition: transform .35s var(--ease-spring); }
.card:hover .card-go { background: var(--t-strong); color: #fff; }
.card:hover .card-go .i { transform: translateX(3px); }

.age-badge {
  position: absolute; left: 12px; top: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--paper); color: var(--ink);
  font-size: .8rem; font-weight: 750;
  padding: 4px 10px 4px 8px; border-radius: 999px;
  box-shadow: 0 4px 12px -6px rgba(34, 48, 74, .4);
}
.age-badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--t-strong); }

/* Illustrated stand-in when an article has no image */
.ph {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 2px 2px, color-mix(in srgb, var(--t-fg) 16%, transparent) 1.6px, transparent 0) 0 0 / 20px 20px,
    var(--t-bg);
}
.ph-icon { width: 36%; max-width: 130px; aspect-ratio: 1; color: var(--t-strong); transition: transform .6s var(--ease-spring); }
.card:hover .ph-icon { transform: rotate(-10deg) scale(1.08); }

/* Topics */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.topic {
  display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto;
  column-gap: 14px; align-items: center;
  padding: 18px; border-radius: 22px;
  background: var(--t-bg); color: var(--t-fg);
  text-decoration: none;
  transition: transform .35s var(--ease-spring);
}
.topic:hover { transform: translateY(-4px); }
.topic-icon { grid-row: span 2; width: 56px; height: 56px; color: var(--t-strong); transition: transform .5s var(--ease-spring); }
.topic:hover .topic-icon { transform: rotate(-12deg); }
.topic-name { font-weight: 750; color: var(--ink); line-height: 1.25; }
.topic-n { font-size: .88rem; font-weight: 600; }

/* ---------- Home sections ---------- */

.section-latest { padding-top: 40px; }
.section-topics { padding-top: 0; }
.section-trust { background: var(--paper); border-radius: 48px 48px 0 0; margin-top: 20px; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.trust-item h3 { font-size: 1.35rem; margin: 18px 0 8px; }
.trust-item p { color: var(--ink-2); }
.trust-icon {
  display: grid; place-items: center;
  width: 60px; height: 60px; border-radius: 20px;
  background: var(--t-bg); color: var(--t-fg);
  transform: rotate(-6deg);
}
.trust-icon svg { width: 30px; height: 30px; }
.trust-item:nth-child(2) .trust-icon { transform: rotate(5deg); }

.empty { text-align: center; padding: 56px 20px; color: var(--ink-2); }
.empty strong { color: var(--ink); font-family: var(--font-display); font-size: 1.4rem; font-weight: 620; }
.empty-icon { width: 96px; height: 96px; color: var(--tomato); margin-bottom: 12px; animation: bob 5s ease-in-out infinite; --r: -6deg; }

/* ---------- Page heads ---------- */

.page-head { padding: 48px 0 28px; }
.page-head h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); letter-spacing: -.03em; }
.page-lead { font-size: 1.18rem; color: var(--ink-2); max-width: 58ch; margin: 14px 0 0; }
.page-lead a { color: var(--tomato-600); }
.page-head[class*='tone-'], .page-head[class*='age-'] {
  background: var(--t-bg);
  border-radius: 0 0 48px 48px;
  padding: 56px 0 48px;
  margin-bottom: 28px;
  position: relative; overflow: hidden;
}
.page-head[class*='tone-'] .eyebrow, .page-head[class*='age-'] .eyebrow { background: var(--paper); color: var(--t-fg); }
.page-head .wrap { position: relative; }
.page-head-icon {
  position: absolute; right: 20px; top: -10px;
  width: 120px; height: 120px; color: var(--t-strong); opacity: .9;
  animation: bob 7s ease-in-out infinite; --r: 8deg;
}
.page-head-icon svg { width: 100%; height: 100%; }

.pager {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 48px; font-weight: 650; color: var(--ink-2);
}
.pager a {
  color: var(--ink); text-decoration: none;
  padding: 10px 18px; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--line);
}
.pager a:hover { border-color: var(--ink); }

.search-note { color: var(--ink-2); margin-bottom: 24px; }

/* ---------- Article ---------- */

.progress { position: fixed; top: 0; left: 0; right: 0; height: 5px; z-index: 60; pointer-events: none; opacity: 0; transition: opacity .3s; }
.progress.is-on { opacity: 1; }
.progress-bar {
  position: relative; height: 100%;
  background: var(--tomato);
  border-radius: 0 999px 999px 0;
  transform: translateX(calc((var(--p, 0) - 1) * 100%));
}
.progress-pea {
  position: absolute; right: -6px; top: -4px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--pea);
  box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .12), 0 2px 6px rgba(34, 48, 74, .3);
}

.article-head { max-width: 900px; padding-top: 28px; }
.article-head > * { animation: rise .7s var(--ease-out) both; }
.article-head > :nth-child(2) { animation-delay: .06s; }
.article-head > :nth-child(3) { animation-delay: .12s; }
.article-head > :nth-child(4) { animation-delay: .18s; }
.crumbs { font-size: .92rem; color: var(--ink-2); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 16px; }
.article-title { font-size: clamp(2.2rem, 4.6vw, 3.5rem); line-height: 1.06; letter-spacing: -.03em; }
.article-meta {
  display: flex; flex-wrap: wrap; gap: 6px 22px;
  color: var(--ink-2); font-weight: 600; font-size: .95rem;
  margin: 18px 0 0;
}
.article-meta span { display: inline-flex; align-items: center; gap: .3em; }
.article-meta .i { margin: 0; }

.article-hero {
  max-width: 1120px;
  margin: 32px auto 48px;
  animation: rise .9s .15s var(--ease-out) both;
}
.article-hero img, .article-hero .ph {
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: 600px;
  object-fit: cover;
  border-radius: 32px;
  background: var(--t-bg);
}
.article-hero .ph { aspect-ratio: 21 / 8; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; max-width: 1120px; padding-bottom: 40px; }
.article-main { max-width: 740px; width: 100%; margin: 0 auto; }

.toc {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px 20px;
  font-size: .95rem;
  max-width: 740px; width: 100%; margin: 0 auto;
}
.toc-title { font-weight: 800; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
  display: flex; gap: 10px;
  padding: 6px 0 6px 12px;
  border-left: 3px solid transparent;
  color: var(--ink-2); text-decoration: none; line-height: 1.35;
  transition: color .2s, border-color .2s;
}
.toc a::before { content: counter(toc, decimal-leading-zero); font-weight: 700; font-size: .8rem; color: var(--t-strong); padding-top: .1em; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--tomato); font-weight: 650; }

@media (min-width: 1000px) {
  .article-layout:has(> .toc) { grid-template-columns: 240px minmax(0, 1fr); gap: 56px; }
  .article-layout:has(> .toc) .article-main { margin: 0; }
  .toc { position: sticky; top: 96px; align-self: start; background: none; border: 0; padding: 0; }
}

/* Article body */
.prose { font-size: 1.12rem; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2rem); margin: 2em 0 .55em; }
.prose h3 { font-size: 1.32rem; margin: 1.7em 0 .5em; }
.prose h4 { font-size: 1.1rem; margin: 1.5em 0 .4em; font-family: var(--font-body); font-weight: 750; }
.prose a { color: var(--tomato-600); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover { color: var(--tomato); }
.prose strong { font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin: .35em 0; padding-left: .2em; }
.prose ul > li::marker { color: var(--pea); font-size: 1.2em; }
.prose ol > li::marker { color: var(--tomato); font-weight: 800; font-family: var(--font-display); }
.prose blockquote {
  margin: 1.6em 0; padding: 18px 22px;
  background: var(--butter-soft);
  border-radius: 18px;
  border-left: 5px solid var(--butter);
}
.prose blockquote p:last-child { margin: 0; }
.prose img { border-radius: 20px; margin: 1.5em 0; }
.prose hr { border: 0; height: 2px; background: var(--line); margin: 2.5em 0; }
.prose code { background: var(--cream-2); padding: .1em .35em; border-radius: 6px; font-size: .92em; }
.table-wrap { overflow-x: auto; margin: 1.5em 0; border-radius: 16px; border: 1px solid var(--line); background: var(--paper); }
.prose table { border-collapse: collapse; width: 100%; font-size: .98rem; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--t-bg); color: var(--t-fg); font-weight: 750; }
.prose tr:last-child td { border-bottom: 0; }

/* Ingredient lists become tappable checklists (site.js) */
.prose ul.checklist { list-style: none; padding: 0; }
.checklist li {
  position: relative;
  padding: 10px 14px 10px 48px;
  margin: 6px 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  user-select: none;
  transition: background-color .25s, color .25s, border-color .25s;
}
.checklist li::before {
  content: '';
  position: absolute; left: 14px; top: 50%;
  width: 22px; height: 22px; margin-top: -11px;
  border-radius: 8px;
  border: 2px solid var(--t-strong);
  transition: background-color .25s, transform .35s var(--ease-spring);
}
.checklist li::after {
  content: '';
  position: absolute; left: 21px; top: 50%;
  width: 7px; height: 12px; margin-top: -8px;
  border: solid #fff; border-width: 0 3px 3px 0;
  transform: rotate(45deg) scale(0);
  transition: transform .35s var(--ease-spring);
}
.checklist li[aria-checked='true'] { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--t-strong); background: var(--t-bg); border-color: transparent; }
.checklist li[aria-checked='true']::before { background: var(--t-strong); transform: scale(1.08); }
.checklist li[aria-checked='true']::after { transform: rotate(45deg) scale(1); }
.checklist-hint { font-size: .88rem; color: var(--ink-2); margin: -.4em 0 .8em; }

/* FAQ */
.faq { margin-top: 56px; }
.faq h2 { font-size: clamp(1.6rem, 3vw, 2rem); margin-bottom: 12px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0;
  font-family: var(--font-display); font-variation-settings: 'SOFT' 100;
  font-size: 1.2rem; font-weight: 600; line-height: 1.3;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-plus {
  position: relative; flex: none;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--t-bg);
  transition: background-color .3s, transform .4s var(--ease-spring);
}
.faq-plus::before, .faq-plus::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 14px; height: 2.5px; margin: -1.25px 0 0 -7px;
  background: var(--t-fg); border-radius: 2px;
  transition: transform .4s var(--ease-spring);
}
.faq-plus::after { transform: rotate(90deg); }
.faq-item[open] .faq-plus { background: var(--t-strong); transform: rotate(180deg); }
.faq-item[open] .faq-plus::before, .faq-item[open] .faq-plus::after { background: #fff; }
.faq-item[open] .faq-plus::after { transform: rotate(0deg); }
.faq-item::details-content {
  block-size: 0; overflow: hidden;
  transition: block-size .4s var(--ease-out), content-visibility .4s allow-discrete;
}
.faq-item[open]::details-content { block-size: auto; }
.faq-answer { padding: 0 0 18px; color: var(--ink-2); }
.faq-answer p { margin: 0; }

/* Safety box */
.safety {
  display: grid; grid-template-columns: 56px 1fr; gap: 18px;
  margin-top: 56px;
  padding: 26px;
  background: #fff4d3;
  border: 2px dashed #efc34e;
  border-radius: 26px;
}
.safety-icon {
  display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 18px;
  background: var(--butter); color: #6c4c05;
  transform: rotate(-6deg);
}
.safety-icon svg { width: 30px; height: 30px; }
.safety h2 { font-size: 1.3rem; margin: 4px 0 12px; }
.safety ul { list-style: none; margin: 0; padding: 0; }
.safety li { position: relative; padding-left: 26px; margin: 7px 0; }
.safety li::before {
  content: ''; position: absolute; left: 3px; top: .62em;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--carrot);
}

.section-related { background: var(--cream-2); border-radius: 48px 48px 0 0; }

/* About / 404 */
.notfound { text-align: center; }
.notfound .search { margin: 26px auto; }
.notfound .page-lead { margin: 14px auto 0; }
.notfound .grid { text-align: left; margin-bottom: 20px; }
.notfound h1 { font-size: clamp(2.3rem, 5vw, 3.4rem); }
.notfound-art { width: 140px; height: 140px; margin: 0 auto 18px; color: var(--tomato); }
.nf-bowl { width: 100%; height: 100%; animation: wobble 3.5s ease-in-out infinite; transform-origin: 50% 80%; }

/* ---------- Footer ---------- */

.site-footer { margin-top: 0; color: #f4ede2; }
.footer-wave { display: block; width: 100%; height: 44px; fill: var(--ink); margin-bottom: -1px; }
.footer-body { background: var(--ink); padding: 44px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.1fr 1fr 1.3fr; gap: 40px; }
.footer-logo { font-family: var(--font-display); font-variation-settings: 'SOFT' 100; font-size: 1.7rem; font-weight: 560; margin-bottom: 10px; }
.footer-logo b { color: #ff8e73; font-weight: 720; }
.footer-lead { color: rgba(244, 237, 226, .75); max-width: 34ch; }
.footer-nav { display: flex; flex-direction: column; gap: 8px; }
.footer-nav a { color: #f4ede2; text-decoration: none; font-weight: 600; width: fit-content; }
.footer-nav a span { color: rgba(244, 237, 226, .55); font-weight: 500; margin-left: 4px; }
.footer-nav a:hover { color: var(--butter); }
.footer-note { background: rgba(255, 255, 255, .06); border-radius: 18px; padding: 18px 20px; font-size: .95rem; color: rgba(244, 237, 226, .85); }
.footer-note p:last-child { margin: 0; }
.footer-small { color: var(--butter); font-weight: 700; font-size: .9rem; }
.footer-note a, .footer-legal a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.footer-note a:hover, .footer-legal a:hover { color: var(--butter); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  margin-top: 36px; padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .88rem; color: rgba(244, 237, 226, .55);
}

/* ---------- Cards: kind, freezer ---------- */

.card-kind { color: var(--ink-2); font-weight: 700; }
.card--recipe .card-kind { color: var(--t-fg); }
.card-meta { gap: 12px; }
.card-meta > span:not(.card-go) { display: inline-flex; align-items: center; }
.card-freeze {
  font-size: .78rem; font-weight: 750; letter-spacing: .01em;
  padding: 2px 9px; border-radius: 999px;
  background: #e3f0fa; color: #235a80;
}

/* ---------- Recipe list filters ---------- */

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 0 0 32px; }
.filter-group { gap: 8px; }
.filter-chip {
  padding: 7px 15px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  font-size: .92rem;
}
.filter-chip:hover { background: var(--paper); border-color: var(--ink); transform: none; }
.filter-chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.filter-chip.is-on::before { content: '✓'; font-weight: 800; margin-right: 2px; }
.filter-count { margin: 0 0 0 auto; color: var(--ink-2); font-weight: 600; font-size: .95rem; }
.filter-count a { color: var(--tomato-600); }
.filter-more summary { list-style: none; cursor: pointer; }
.filter-more summary::-webkit-details-marker { display: none; }
.filter-more summary::after {
  content: ''; width: 7px; height: 7px; margin: -3px 1px 0 2px;
  border: solid currentColor; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  transition: transform .3s var(--ease-spring);
}
.filter-more[open] { flex-basis: 100%; }
.filter-more[open] summary { border-color: var(--ink); }
.filter-more[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.filter-more > .chips { margin-top: 10px; }
.filter-picked {
  font-size: .8rem; font-weight: 700;
  background: var(--ink); color: var(--cream);
  padding: 0 7px; border-radius: 999px;
}
.filter-note { flex-basis: 100%; margin: -2px 0 0; color: var(--ink-2); font-size: .9rem; }
.filter-age { display: inline-flex; align-items: center; gap: 10px; margin: 0; }
.filter-age label { font-weight: 750; font-size: .95rem; }
.filter-age select {
  appearance: none;
  font: inherit; font-weight: 650; font-size: .92rem; color: var(--ink);
  padding: 7px 36px 7px 15px;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5' fill='none' stroke='%2322304a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 12px 8px;
  cursor: pointer;
}
.filter-age select:hover { border-color: var(--ink); }
.filter-age select:focus-visible { outline: 3px solid var(--carrot); outline-offset: 2px; }
.filter-age.is-on select { background-color: var(--ink); border-color: var(--ink); color: var(--cream); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5' fill='none' stroke='%23fff7ec' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.filter-age option { color: var(--ink); background: var(--paper); }
.filter-age-go { cursor: pointer; font: inherit; font-weight: 650; font-size: .92rem; color: var(--ink); }
.filter-age-go[hidden] { display: none; }
.filter-chip--topic { padding-left: 9px; }
.filter-chip--topic .chip-icon { width: 22px; height: 22px; }
.filter-chip--topic.is-on::before { content: none; }

/* ---------- Age shelf tabs ---------- */

.kind-tabs {
  display: inline-flex; gap: 4px;
  margin: 0 0 28px; padding: 4px;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px;
}
.kind-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  font-weight: 700; font-size: .95rem; color: var(--ink); text-decoration: none;
  transition: background-color .2s;
}
.kind-tab:hover { background: var(--cream); }
.kind-tab.is-on { background: var(--ink); color: var(--cream); }
.kind-tab-n { font-size: .8rem; padding: 1px 8px; border-radius: 999px; background: var(--cream-2); color: var(--ink-2); }
.kind-tab.is-on .kind-tab-n { background: rgba(255, 255, 255, .16); color: var(--cream); }

/* ---------- Age shelf: recipes by exact age ---------- */

.age-links { margin: 0 0 28px; }
.age-links-title { margin: 0 0 10px; font-weight: 700; font-size: .95rem; color: var(--ink-2); }

/* ---------- Admin preview bar ---------- */

.preview-bar { background: var(--ink); color: var(--cream); font-size: .95rem; }
.preview-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.preview-bar a { color: var(--butter); font-weight: 700; }

/* ---------- Recipe page ---------- */

.recipe-lead { font-size: 1.22rem; color: var(--ink-2); max-width: 52ch; margin: 16px 0 0; }
.recipe .article-hero { margin-bottom: 28px; }

.recipe-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px;
  max-width: 1080px; margin: 0 auto 44px;
}
.fact {
  margin: 0; padding: 16px 18px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 20px;
}
.fact dt { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--t-fg); }
.fact dd { margin: 4px 0 0; font-family: var(--font-display); font-variation-settings: 'SOFT' 100; font-size: 1.45rem; font-weight: 620; line-height: 1.2; }
.fact .fact-sub { font-family: var(--font-body); font-size: .86rem; font-weight: 600; color: var(--ink-2); margin-top: 2px; }

.recipe-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; max-width: 1120px; padding-bottom: 48px; }
@media (min-width: 900px) {
  .recipe-layout { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 56px; align-items: start; }
  .recipe-side { position: sticky; top: 92px; }
}

.ingredients {
  background: var(--t-bg);
  border-radius: 28px;
  padding: 24px 22px 22px;
}
.ingredients-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ingredients-head h2 { font-size: 1.7rem; }
.ingredients .checklist-hint { margin: 0 0 10px; }
.ingredients .checklist { list-style: none; margin: 0 0 6px; padding: 0; }
.ingredients .checklist li { background: rgba(255, 255, 255, .75); border-color: transparent; line-height: 1.4; }
.ingredients .checklist li[aria-checked='true'] { background: rgba(255, 255, 255, .35); }
.ingredients-group { font-family: var(--font-body); font-size: .82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--t-fg); margin: 18px 0 6px; }
.ing-qty { font-weight: 750; color: var(--ink); white-space: nowrap; }
.ing-note { color: var(--ink-2); }

.servings {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--paper); border-radius: 999px; padding: 4px;
  box-shadow: 0 3px 0 rgba(34, 48, 74, .06);
}
.servings[hidden] { display: none; }
.servings output { font-weight: 750; font-size: .95rem; padding: 0 6px; min-width: 7.5ch; text-align: center; }
.servings button {
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: var(--t-bg); color: var(--t-fg);
  font: 800 1.2rem/1 var(--font-body); cursor: pointer;
  transition: background-color .2s, color .2s, transform .25s var(--ease-spring);
}
.servings button:hover { background: var(--t-strong); color: #fff; }
.servings button:active { transform: scale(.9); }
.servings button:disabled { opacity: .35; cursor: default; }

.allergens { margin-top: 18px; padding-top: 16px; border-top: 1.5px dashed color-mix(in srgb, var(--t-fg) 30%, transparent); }
.allergens-title { display: block; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--t-fg); margin-bottom: 8px; }
.allergen-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.allergen-list li { background: var(--paper); color: var(--ink); font-weight: 700; font-size: .88rem; padding: 3px 12px; border-radius: 999px; }

.recipe-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.recipe-tools[hidden], .tool[hidden] { display: none; }
.tool {
  border: 1.5px solid color-mix(in srgb, var(--t-fg) 35%, transparent); background: transparent; color: var(--t-fg);
  font: 700 .9rem var(--font-body); padding: 8px 14px; border-radius: 999px; cursor: pointer;
  transition: background-color .2s, color .2s;
}
.tool:hover { background: var(--paper); }
.tool[aria-pressed='true'] { background: var(--t-strong); border-color: var(--t-strong); color: #fff; }

.recipe-main { max-width: 700px; }
.recipe-intro { margin-bottom: 36px; }
.recipe-h2 { font-size: clamp(1.6rem, 3vw, 2rem); margin: 0 0 16px; }
.recipe-main > section + section { margin-top: 44px; }
.recipe-sublead { color: var(--ink-2); margin: -8px 0 16px; }
.recipe-text { font-size: 1.1rem; line-height: 1.7; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.step:first-child { padding-top: 4px; }
.step:last-child { border-bottom: 0; }
.step p { margin: 0; font-size: 1.12rem; line-height: 1.7; padding-top: 6px; }
.step-n {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 16px;
  background: var(--t-strong); color: #fff;
  font-family: var(--font-display); font-variation-settings: 'SOFT' 100; font-weight: 700; font-size: 1.25rem;
  transform: rotate(-4deg);
}
.step:nth-child(even) .step-n { transform: rotate(3deg); }

.stages { display: grid; gap: 12px; }
.stage {
  display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: baseline;
  padding: 16px 18px; border-radius: 20px;
  background: var(--paper); border: 1px solid var(--line);
}
.stage-age {
  font-family: var(--font-display); font-variation-settings: 'SOFT' 100;
  font-weight: 680; font-size: 1.2rem; color: var(--t-fg);
}
.stage p { margin: 0; }

.safety .safety-specific { font-weight: 650; }
.recipe .safety { margin-top: 48px; }

.tested {
  display: flex; align-items: center; gap: 12px;
  margin: 28px 0 0; color: var(--ink-2); font-weight: 600; font-size: .98rem;
}
.tested-mark {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 14px;
  background: var(--pea-soft); color: var(--pea-600);
  transform: rotate(-6deg);
}
.tested-mark svg { width: 22px; height: 22px; }

@media (max-width: 560px) {
  .stage { grid-template-columns: 1fr; gap: 4px; }
  .step { grid-template-columns: 38px 1fr; gap: 12px; }
  .step-n { width: 38px; height: 38px; border-radius: 13px; font-size: 1.1rem; }
  .ingredients { border-radius: 22px; padding: 20px 16px 18px; }
  .filter-count { margin-left: 0; width: 100%; }
  .kind-tabs { display: flex; }
  .kind-tab { flex: 1; justify-content: center; gap: 6px; padding: 8px 6px; font-size: .9rem; }
}

/* ---------- Accounts (/tili) and saving recipes ---------- */

.nav-account.is-member { background: var(--butter-soft); }
.nav-account.is-member[aria-current='page'] { background: var(--ink); }

.save-form { margin: 20px 0 0; }
.save-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 2px solid var(--tomato); background: var(--paper); color: var(--tomato-600);
  font: 700 1rem var(--font-body); text-decoration: none;
  padding: 9px 18px 9px 14px; border-radius: 999px; cursor: pointer;
  transition: background-color .2s, color .2s, transform .2s var(--ease-spring);
}
.save-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linejoin: round; }
.save-btn:hover { background: #fff1ec; }
.save-btn:active { transform: scale(.95); }
.save-btn[aria-pressed='true'] { background: var(--tomato); color: #fff; }
.save-btn[aria-pressed='true'] svg { fill: currentColor; }

.account-card {
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 5vw, 40px); margin: 0 auto 24px; max-width: 520px;
  box-shadow: 0 5px 0 rgba(34, 48, 74, .05);
}
.account-card--danger { border-color: color-mix(in srgb, var(--tomato) 40%, transparent); }
.account-title { font-size: clamp(2rem, 5vw, 2.6rem); letter-spacing: -.02em; margin: 0 0 8px; }
.account-subtitle { font-size: 1.35rem; margin: 0 0 14px; }
.account-lead { color: var(--ink-2); margin: 0 0 22px; }
.account-form { display: grid; gap: 16px; }
.account-field { display: grid; gap: 6px; font-weight: 650; }
.account-field small { font-weight: 400; color: var(--ink-2); font-size: .88rem; }
.account-field input {
  font: inherit; font-weight: 400; color: var(--ink);
  padding: 12px 16px; border: 2px solid var(--line); border-radius: 14px; background: var(--cream);
  transition: border-color .2s, background-color .2s;
}
.account-field input:focus { outline: 0; border-color: var(--carrot); background: var(--paper); }
.account-check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.account-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--tomato); flex: none; }
.account-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.account-btn {
  display: inline-block; border: 0; cursor: pointer; text-align: center; text-decoration: none;
  font: 700 1.05rem var(--font-body); color: #fff; background: var(--tomato);
  padding: 13px 24px; border-radius: 999px;
  transition: background-color .2s, transform .2s var(--ease-spring);
}
.account-btn:hover { background: var(--tomato-600); }
.account-btn:active { transform: scale(.97); }
.account-btn--inline { margin-top: 8px; }
.account-btn--danger { background: var(--ink); }
.account-btn--danger:hover { background: #111a2c; }
.account-flash { background: var(--pea-soft); color: var(--pea-600); border-radius: 14px; padding: 12px 16px; font-weight: 600; margin: 0 0 18px; }
.account-flash--error { background: #ffe2d8; color: #a3361f; }
.account-alt { margin: 22px 0 0; }
.account-small { color: var(--ink-2); font-size: .9rem; margin: 14px 0 0; }
.account-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.account-head h1 { overflow-wrap: anywhere; }
.account-actions { display: flex; gap: 8px; align-items: center; }
.account-link {
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); text-decoration: none;
  font: 700 .95rem var(--font-body); padding: 8px 16px; border-radius: 999px; cursor: pointer;
}
.account-link:hover { border-color: var(--ink); }
.account-count {
  display: inline-grid; place-items: center; min-width: 1.8em; padding: 0 .5em; height: 1.8em;
  font: 700 .9rem var(--font-body); background: var(--butter-soft); border-radius: 999px; vertical-align: middle;
}
.page-head .eyebrow a { color: inherit; text-decoration: none; }

/* ---------- Ratings, "Tein tämän!" and comments ---------- */

.save-count { margin-left: 12px; color: var(--ink-2); font-weight: 600; font-size: .95rem; }
.rating-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 14px 0 0; color: var(--ink-2); }
.rating-summary a { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.rating-summary strong { color: var(--ink); }
.made-count::before { content: '✓ '; color: var(--pea-600); font-weight: 800; }

/* Five grey stars with a gold layer clipped to the average. */
.stars { position: relative; display: inline-block; font-size: 1.15rem; line-height: 1; letter-spacing: 2px; vertical-align: -1px; }
.stars::before { content: '★★★★★'; color: #d8d2c6; }
.stars::after { content: '★★★★★'; color: #eeb127; position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; }
.stars-0::after { width: 0%; }
.stars-1::after { width: 10%; }
.stars-2::after { width: 20%; }
.stars-3::after { width: 30%; }
.stars-4::after { width: 40%; }
.stars-5::after { width: 50%; }
.stars-6::after { width: 60%; }
.stars-7::after { width: 70%; }
.stars-8::after { width: 80%; }
.stars-9::after { width: 90%; }
.stars-10::after { width: 100%; }

.community { margin-top: 48px; padding-top: 36px; border-top: 2px dashed var(--line); }
.community-summary { color: var(--ink-2); margin: 0 0 18px; }
.community-summary .stars { margin-right: 6px; }
.community-summary strong { color: var(--ink); }
.community-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 8px; }
.community-small { font-size: .9rem; color: var(--ink-2); }
.community-login { background: var(--cream-2); border-radius: 16px; padding: 14px 18px; }
.made-btn {
  border: 2px solid var(--pea); background: var(--paper); color: var(--pea-600);
  font: 700 1rem var(--font-body); padding: 9px 18px; border-radius: 999px; cursor: pointer;
  transition: background-color .2s, color .2s, transform .2s var(--ease-spring);
}
.made-btn:hover { background: var(--pea-soft); }
.made-btn:active { transform: scale(.95); }
.made-btn[aria-pressed='true'] { background: var(--pea); color: #fff; }
.rate-form { display: flex; align-items: center; gap: 8px; }
.rate-label { font-weight: 650; }
.rate-stars { display: inline-flex; flex-direction: row-reverse; }
.rate-star {
  background: none; border: 0; cursor: pointer; padding: 2px 3px;
  font-size: 1.8rem; line-height: 1; color: #d8d2c6; transition: color .15s, transform .2s var(--ease-spring);
}
.rate-star.is-on { color: #eeb127; }
/* Row-reversed, so hovering a star lights it and the ones before it. */
.rate-stars:hover .rate-star { color: #d8d2c6; }
.rate-star:hover, .rate-star:hover ~ .rate-star, .rate-star:focus-visible, .rate-star:focus-visible ~ .rate-star { color: #eeb127 !important; }
.rate-star:active { transform: scale(.85); }
.linklike { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.comments { margin-top: 32px; }
.comments-title { font-size: 1.3rem; margin: 0 0 16px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 14px; }
.comment { background: var(--paper); border: 1.5px solid var(--line); border-radius: 18px; padding: 14px 18px; }
.comment.is-pending { border-style: dashed; background: var(--cream); }
.comment-meta { margin: 0 0 6px; font-size: .9rem; color: var(--ink-2); }
.comment-meta strong { color: var(--ink); }
.comment-pending { color: #7d5806; font-weight: 600; }
.comment-body { margin: 0 0 4px; white-space: pre-line; overflow-wrap: anywhere; }
.comment-form textarea {
  font: inherit; color: var(--ink); padding: 12px 16px; border: 2px solid var(--line); border-radius: 14px;
  background: var(--cream); resize: vertical; min-height: 110px; font-weight: 400;
}
.comment-form textarea:focus { outline: 0; border-color: var(--carrot); background: var(--paper); }

/* ---------- Lähetä resepti ---------- */

.account-card--wide { max-width: 720px; }
.account-field em { font-style: normal; font-weight: 400; color: var(--ink-2); }
.account-field textarea, .account-field select {
  font: inherit; font-weight: 400; color: var(--ink);
  padding: 12px 16px; border: 2px solid var(--line); border-radius: 14px; background: var(--cream);
}
.account-field textarea { resize: vertical; }
.account-field textarea:focus, .account-field select:focus { outline: 0; border-color: var(--carrot); background: var(--paper); }
.submit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.submit-grid--2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.submit-allergens { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.submit-allergens legend { font-weight: 650; margin-bottom: 8px; padding: 0; }
.submit-allergens .account-check { font-weight: 400; }
.submit-again { margin-left: 14px; }
.submit-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.submit-list li { background: var(--paper); border: 1.5px solid var(--line); border-radius: 16px; padding: 12px 16px; }
.submit-status { display: inline-block; font-size: .82rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--butter-soft); color: #7d5806; margin-left: 6px; }
.submit-status--accepted { background: var(--pea-soft); color: var(--pea-600); }
.submit-status--rejected { background: #ffe2d8; color: #a3361f; }
.recipe-credit { color: var(--ink-2); margin: 12px 0 0; }

@media print {
  .site-header, .site-footer, .progress, .preview-bar, .section-related, .recipe-tools, .save-form, .community, .rating-summary, .servings, .checklist-hint, .article-tags, .crumbs, .skip { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .article-hero img, .article-hero .ph { max-height: 240px; aspect-ratio: auto; }
  .recipe-layout { grid-template-columns: 1fr 1.6fr; gap: 24px; }
  .recipe-side { position: static; }
  .ingredients { background: none; border: 1px solid #ccc; }
  .checklist li { padding: 2px 0; background: none !important; border: 0; }
  .checklist li::before, .checklist li::after { display: none; }
  .step, .stage, .safety { break-inside: avoid; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ---------- Scroll reveal ---------- */

@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  [data-reveal]:not(.revealed) {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .7s var(--ease-out), transform .8s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 80ms);
  }
  [data-reveal].is-in:not(.revealed) { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 12px; }
  .hero-visual { max-width: 460px; margin: 0 auto; width: 100%; order: -1; }
  .hero { padding-top: 12px; }
  .ages, .trust-grid { grid-template-columns: 1fr; }
  .age-card { min-height: 170px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .page-head-icon { width: 80px; height: 80px; top: -24px; }
}

@media (max-width: 560px) {
  .section { padding: 56px 0; }
  .hero-visual { max-width: 340px; }
  .search button { padding: 12px 18px; }
  .safety { grid-template-columns: 1fr; }
  .article-hero img, .article-hero .ph { border-radius: 22px; }
  .page-head-icon { display: none; }
}

/* ---------- Keyframes ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.2) rotate(-20deg); } }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-12px) rotate(var(--r, 5deg)); }
}
@keyframes breathe { 50% { transform: scale(1.035) rotate(1.5deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes stir {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(6deg); }
}
@keyframes steam {
  0% { stroke-dashoffset: 170; opacity: 0; }
  30% { opacity: 1; }
  100% { stroke-dashoffset: -30; opacity: 0; }
}
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes wobble {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}

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