/* TeensFeeds. Mobile first. */
/* Fonts are served from this site so no visitor data goes to a font provider. */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 600 800; font-display: swap; src: url(fonts/bricolage-grotesque.woff2) format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/dm-sans.woff2) format('woff2'); }
:root {
  --bg: #faf6ef; --surface: #ffffff; --surface-2: #f3ede2; --line: #e5dccd;
  --ink: #1f1a17; --ink-2: #5e554d; --ink-3: #9a9087;
  --accent: #e2502a; --accent-dark: #c23f1d; --accent-soft: #fce6dd;
  --green: #2f7d57; --green-soft: #e0f0e6; --yellow: #f3b33d; --yellow-soft: #fdf1d3;
  --fig-wood: #c9a77c; --fig-carrot: #f08a3c; --fig-steel: #b3bcc5; --fig-skin: #e8b894; --fig-skin-2: #d6a07a;
  --fig-onion: #f6e7cb; --fig-salt: #efe9df; --fig-fat: #f3b33d; --fig-acid: #c9dc5a; --fig-veg: #74c279;
  --radius: 16px; --shadow: 0 1px 2px rgba(31, 26, 23, .06), 0 8px 24px rgba(31, 26, 23, .06);
  --display: 'Bricolage Grotesque', 'DM Sans', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171412; --surface: #211d1a; --surface-2: #2b2622; --line: #3a332d;
    --ink: #f4eee6; --ink-2: #b9afa4; --ink-3: #7f766d;
    --accent: #ff6b3d; --accent-dark: #ff8259; --accent-soft: #3a2018;
    --green: #5cc08a; --green-soft: #1b2e24; --yellow: #f3b33d; --yellow-soft: #3a2f14;
    --fig-wood: #8a6f4d; --fig-steel: #8f99a3; --fig-onion: #d9c9a8; --fig-salt: #d9d2c6;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--body); padding-bottom: 68px; }
body.noscroll { overflow: hidden; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 6vw, 3rem); font-weight: 800; }
h2 { font-size: 1.45rem; font-weight: 800; margin-top: 2em; }
h3 { font-size: 1.12rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--accent-dark); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
code { background: var(--surface-2); padding: .1em .4em; border-radius: 6px; font-size: .92em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 18px; }
main.wrap { padding-top: 20px; padding-bottom: 48px; min-height: 60vh; }
main.narrow { max-width: 780px; }
.small { font-size: .875rem; color: var(--ink-2); }
.center { text-align: center; }
.boot { padding: 30vh 20px; text-align: center; color: var(--ink-2); }
.ic { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; vertical-align: -.18em; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row-end { justify-content: flex-end; margin-top: 24px; }
.eyebrow { font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-dark); margin-bottom: .6em; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; background: var(--accent); color: #fff; border: 2px solid var(--accent); border-radius: 999px; padding: 10px 20px; font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.2; text-align: center; transition: transform .1s, background .15s; }
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.btn small { flex-basis: 100%; font-weight: 500; font-size: .75rem; opacity: .9; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-sm { padding: 7px 14px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-done, .btn-done:hover { background: var(--green); border-color: var(--green); }
.badge { font: 700 .68rem/1 var(--body); letter-spacing: .06em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; white-space: nowrap; }
.badge-core { background: var(--green-soft); color: var(--green); }
.badge-complete { background: var(--yellow-soft); color: #9a6a05; }
@media (prefers-color-scheme: dark) { .badge-complete { color: var(--yellow); } }

/* header and nav */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 1.2rem var(--display); color: var(--ink); text-decoration: none; margin-right: auto; }
.logo-ic { width: 32px; height: 32px; color: var(--accent); }
.nav { display: none; gap: 4px; }
.nav a, .tabbar a { color: var(--ink-2); text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 999px; font-size: .95rem; position: relative; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.on { background: var(--ink); color: var(--bg); }
.nav i, .tabbar i { font-style: normal; background: var(--accent); color: #fff; font-size: .7rem; border-radius: 999px; padding: 1px 6px; margin-left: 5px; }
.pill { text-decoration: none; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around; background: var(--surface); border-top: 1px solid var(--line); padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); }
.tabbar a { font-size: .8rem; padding: 8px 8px; text-align: center; }
.tabbar a.on { color: var(--accent-dark); background: var(--accent-soft); }
@media (min-width: 820px) { .nav { display: flex; } .tabbar { display: none; } body { padding-bottom: 0; } }
.foot { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--ink-2); }
.foot p { margin-bottom: .6em; max-width: 80ch; }

/* grids and cards */
.grid { display: grid; gap: 16px; }
.g2, .g3, .g4 { grid-template-columns: 1fr; }
.g4 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(2, 1fr); } .g4 { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 960px) { .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.ph { background: linear-gradient(135deg, hsl(var(--h) 70% 62%), hsl(calc(var(--h) + 40) 75% 52%)); }
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .82rem; color: var(--ink-2); }
.meta span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.meta-lg { font-size: 1rem; gap: 8px 20px; margin: 14px 0; }
.meta-lg b { color: var(--ink); }
.meta .ic { color: var(--accent); }

.rcard-img { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); }
.rcard-photo { width: 100%; height: 100%; object-fit: cover; }
.rcard-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.rcard h3 { font-size: 1rem; margin: 0; flex: 1; }
.rcard-lock, .rcard-done, .rcard-free { position: absolute; top: 8px; right: 8px; background: rgba(20, 16, 14, .72); color: #fff; border-radius: 999px; padding: 6px; display: flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 700; }
.rcard-done { background: var(--green); padding: 4px 10px; left: 8px; right: auto; }
.rcard-free { background: var(--accent); padding: 4px 10px; left: 8px; right: auto; }

.mgrid { margin-top: 24px; }
.mcard-img { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); }
.mcard-photo { width: 100%; height: 100%; object-fit: cover; }
.mcard-img .modnum { position: absolute; left: 12px; bottom: -18px; }
.mcard-body { padding: 26px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.mcard-body h3 { font-size: 1.25rem; font-weight: 800; margin: 8px 0 4px; }
.mcard-body p { margin: 0 0 6px; color: var(--ink-2); }
.mcard-top { display: flex; justify-content: space-between; align-items: center; color: var(--ink-3); }
.mcard-locked .mcard-photo { filter: grayscale(.6); opacity: .8; }
.modnum { width: 40px; height: 40px; border-radius: 12px; background: var(--ink); color: var(--bg); font: 800 1.1rem var(--display); display: grid; place-items: center; flex: none; }
.pcard { padding: 18px; }
.pcard h3 { font-weight: 800; font-size: 1.15rem; }
.pcard p { color: var(--ink-2); margin-bottom: .5em; }
.bar { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 12px 0 8px; }
.bar i { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width .4s; }
.bar-sm { height: 6px; margin: auto 0 0; }

/* landing */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); }
.hero-in { display: grid; gap: 28px; padding-top: 36px; padding-bottom: 36px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 8vw, 4.2rem); line-height: 1; }
.hero .lead { font-size: 1.2rem; margin-bottom: 1.4em; }
.hero-art { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero-art img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; }
.hero-art img:nth-child(even) { transform: translateY(18px); }
@media (min-width: 900px) { .hero-art { gap: 14px; } .hero-art img { border-radius: 22px; } .hero-art img:nth-child(even) { transform: translateY(28px); } }
.hero-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 0; margin: 26px 0 0; color: var(--ink-2); }
.hero-stats b { font: 800 1.5rem var(--display); color: var(--ink); margin-right: 4px; }
@media (min-width: 900px) { .hero-in { grid-template-columns: 1.1fr 1fr; padding-top: 64px; padding-bottom: 64px; } }
.sec { padding-top: 56px; scroll-margin-top: 70px; }
.sec.narrow { max-width: 780px; }
.sec-title { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 24px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.more { font-weight: 700; text-decoration: none; white-space: nowrap; }
.feats > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.feats h3 { font-weight: 800; }
.feats p { margin: 0; color: var(--ink-2); }
.band { background: var(--ink); color: var(--bg); margin-top: 56px; padding: 44px 0; }
.band h2 { margin-top: 0; font-size: clamp(1.6rem, 4vw, 2.2rem); }
.band .eyebrow { color: var(--yellow); }
.band p { color: color-mix(in srgb, var(--bg) 78%, transparent); }
.band h3 { font-weight: 800; }
.band .btn-ghost { color: var(--bg); border-color: color-mix(in srgb, var(--bg) 35%, transparent); }
.band .btn-ghost:hover { background: color-mix(in srgb, var(--bg) 12%, transparent); }
.sample { display: grid; gap: 20px; align-items: center; }
@media (min-width: 820px) { .sample { grid-template-columns: 1fr auto; } }
.mods { display: grid; gap: 8px; }
.modrow { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--ink); }
.modrow:hover { border-color: var(--ink-3); }
.modrow-t b { display: block; font: 800 1.1rem var(--display); }
.modrow-t small { color: var(--ink-2); font-size: .9rem; display: block; line-height: 1.4; }
.modrow-c { grid-column: 2; font-size: .82rem; color: var(--ink-2); }
.modrow .badge { grid-column: 3; grid-row: 1; }
@media (min-width: 760px) { .modrow { grid-template-columns: auto 1fr auto auto; } .modrow-c { grid-column: 3; } .modrow .badge { grid-column: 4; } }
.prices { max-width: 860px; margin: 0 auto; align-items: start; }
.price { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 28px 24px; position: relative; }
.price-top { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.price h3 { font-size: 1.3rem; font-weight: 800; margin: 0; }
.price-n { font: 800 3.2rem/1.1 var(--display); margin: 6px 0 10px; }
.price-n small { font: 600 .9rem var(--body); color: var(--ink-2); margin-left: 6px; }
.price ul { list-style: none; padding: 0; margin: 16px 0 22px; }
.price li { padding: 7px 0 7px 28px; border-top: 1px solid var(--line); position: relative; }
.price li::before { content: ''; position: absolute; left: 4px; top: 15px; width: 11px; height: 6px; border-left: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(-45deg); }
.flag { position: absolute; top: -13px; right: 20px; background: var(--accent); color: #fff; font-weight: 700; font-size: .78rem; padding: 4px 12px; border-radius: 999px; }
.howbuy { max-width: 860px; margin: 20px auto 0; background: var(--yellow-soft); border-radius: 24px; padding: 24px; text-align: center; }
.howbuy h3 { font-size: 1.3rem; font-weight: 800; }
.howbuy p { max-width: 56ch; margin-left: auto; margin-right: auto; }
.box .howbuy { text-align: left; padding: 0; margin: 0 0 14px; background: none; }
.box .howbuy h3 { display: none; }
.parents { display: grid; gap: 20px; }
.faq { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; font-size: 1.4rem; line-height: 1; color: var(--accent); }
.faq[open] summary::after { content: '−'; }
.faq summary::-webkit-details-marker { display: none; }
.faq p { color: var(--ink-2); }
.cta-inline { background: var(--surface-2); border-radius: var(--radius); padding: 18px 20px; display: flex; gap: 14px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-top: 32px; }
.cta-inline p { margin: 0; font-weight: 600; }

/* course pages */
.pagehead { margin: 8px 0 20px; }
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .92rem; margin-bottom: 10px; }
.crumb:hover { color: var(--ink); }
.dash { display: grid; gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 24px; }
.dash h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); }
.dash-side { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
@media (min-width: 900px) { .dash { grid-template-columns: 1.3fr 1fr; padding: 32px; } }
.quick { background: var(--surface-2); border-radius: 14px; padding: 14px; text-decoration: none; color: var(--ink); display: block; border: 1px solid transparent; }
.quick:hover { border-color: var(--ink-3); }
.quick b { display: block; font: 800 1.02rem var(--display); }
.quick span { font-size: .84rem; color: var(--ink-2); }
.lrows { display: grid; gap: 6px; }
.lrow { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.lrow:hover { border-color: var(--ink-3); }
.lrow-n { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; font-size: .9rem; flex: none; }
.lrow-n.done { background: var(--green); color: #fff; }
.lrow-t { flex: 1; font-weight: 600; }
.lrow-m { color: var(--ink-2); font-size: .85rem; white-space: nowrap; }
.free { font-style: normal; font-size: .72rem; font-weight: 700; background: var(--accent-soft); color: var(--accent-dark); padding: 3px 8px; border-radius: 999px; margin-left: 6px; white-space: nowrap; }
.locked { text-align: center; background: var(--surface); border: 1px dashed var(--ink-3); border-radius: 24px; padding: 32px 22px; margin: 20px 0 28px; }
.locked h2 { margin-top: 0; }
.locked .row { justify-content: center; margin: 18px 0 12px; }
.locked-ic { width: 56px; height: 56px; border-radius: 50%; background: var(--yellow-soft); color: #9a6a05; display: grid; place-items: center; margin: 0 auto 14px; font-size: 1.5rem; }
.unlock { text-align: center; padding: 40px 0; }
.unlock form { display: flex; flex-direction: column; gap: 12px; max-width: 420px; margin: 24px auto 10px; }
.unlock input { text-align: center; font: 700 1.3rem ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; padding: 16px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); text-transform: uppercase; }
.unlock input:focus { outline: none; border-color: var(--accent); }
.err { color: var(--accent-dark); font-weight: 600; min-height: 1.6em; }

/* prose */
.prose { font-size: 1.06rem; }
.prose h2 { font-size: 1.5rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.15rem; font-weight: 800; margin-top: 1.5em; }
.prose ul, .prose ol, .box ul { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li, .box li { margin-bottom: .45em; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.xref { font-weight: 700; }
.table-wrap { overflow-x: auto; margin: 0 0 1.3em; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
tr:last-child td { border-bottom: 0; }
.callout { border-radius: 14px; padding: 14px 16px; margin: 0 0 1.3em; border-left: 5px solid; }
.callout p { margin: 0; }
.callout-label { display: block; font: 800 .78rem var(--body); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.callout-safety { background: var(--accent-soft); border-color: var(--accent); }
.callout-safety .callout-label { color: var(--accent-dark); }
.callout-tip { background: var(--green-soft); border-color: var(--green); }
.callout-tip .callout-label { color: var(--green); }
.callout-money { background: var(--yellow-soft); border-color: var(--yellow); }
.callout-money .callout-label { color: #9a6a05; }
@media (prefers-color-scheme: dark) { .callout-money .callout-label, .locked-ic { color: var(--yellow); } }
.fig { margin: 0 0 1.4em; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 12px 12px; }
.fig svg { width: 100%; height: auto; display: block; font-family: var(--body); }
.fig figcaption { font-size: .88rem; color: var(--ink-2); text-align: center; margin-top: 8px; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 20px 0; }
.box h2 { margin: 0 0 .5em; font-size: 1.15rem; }
.box p:last-child, .box ul:last-child { margin-bottom: 0; }
.box-key { background: var(--green-soft); border-color: transparent; }
.box-do { background: var(--yellow-soft); border-color: transparent; }
.quiz h2 { margin-top: 1.6em; }
.quiz-q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.quiz-opts { display: grid; gap: 8px; }
.quiz-opts button { text-align: left; background: var(--surface-2); border: 2px solid transparent; border-radius: 12px; padding: 11px 14px; cursor: pointer; font-weight: 500; }
.quiz-opts button:hover:not(:disabled) { border-color: var(--ink-3); }
.quiz-opts button.right { background: var(--green-soft); border-color: var(--green); color: var(--ink); font-weight: 700; }
.quiz-opts button.wrong { background: var(--accent-soft); border-color: var(--accent); }
.quiz-why { margin: 12px 0 0; font-size: .95rem; color: var(--ink-2); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; }
.pager a { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: .92rem; line-height: 1.3; }
.pager small { display: block; color: var(--ink-2); font-weight: 500; }
.pager-next { justify-content: flex-end; text-align: right; }
.lesson .btn-block { margin-top: 24px; }

/* recipes */
.filters { display: grid; gap: 10px; margin-bottom: 14px; }
.filters input[type=search] { width: 100%; padding: 12px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; font-size: .86rem; font-weight: 600; cursor: pointer; text-decoration: none; color: var(--ink); }
.chip:hover { border-color: var(--ink-3); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.sort { font-size: .88rem; color: var(--ink-2); font-weight: 600; }
.sort select { margin-left: 6px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.rhero { border-radius: 24px; overflow: hidden; margin-bottom: 20px; background: var(--surface-2); }
.rhero-photo { width: 100%; aspect-ratio: 16 / 9; max-height: 440px; object-fit: cover; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--surface-2); border-radius: 999px; padding: 4px 11px; font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.rcols { display: grid; gap: 24px; margin-top: 24px; }
@media (min-width: 880px) { .rcols { grid-template-columns: 340px 1fr; gap: 36px; align-items: start; } .ings { position: sticky; top: 76px; } }
.ings { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.ings-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.ings-head h2 { margin: 0; }
.stepper { display: flex; align-items: center; gap: 8px; font-size: .9rem; white-space: nowrap; }
.stepper button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); font-size: 1.2rem; font-weight: 700; cursor: pointer; line-height: 1; }
.stepper button:hover { border-color: var(--ink-3); }
.ing-list { list-style: none; padding: 0; margin: 0 0 16px; }
.ing-list li { border-bottom: 1px solid var(--line); }
.ing-list li:last-child { border-bottom: 0; }
.ing-list label { display: flex; gap: 12px; padding: 9px 0; cursor: pointer; align-items: flex-start; }
.ing-list input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--green); flex: none; }
.ing-list input:checked + span { color: var(--ink-3); text-decoration: line-through; }
.ing-list small { display: block; color: var(--ink-3); font-size: .78rem; }
.ing-h { font: 700 .78rem var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-dark); padding: 14px 0 4px; border-bottom: 0 !important; }
.allergens { margin: 14px 0 0; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.06rem; }
.steps li::before { content: counter(step); width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; font: 800 1.1rem var(--display); display: grid; place-items: center; }
.steps li:last-child { border-bottom: 0; }
.tbtn { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; background: var(--yellow-soft); border: 1px solid var(--yellow); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: .88rem; cursor: pointer; }
.notes-grid { margin-top: 12px; }
.notes-grid .box { margin: 8px 0; }
.skills h2, .mynotes h2 { font-size: 1.15rem; }
.mynotes textarea { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--surface); resize: vertical; }
.credit { margin-top: 28px; color: var(--ink-3); }
.credits { font-size: .9rem; columns: 2; padding-left: 1.2em; }

/* plans and list */
.timeline { list-style: none; padding: 0; margin: 0 0 1em; border-left: 3px solid var(--line); margin-left: 8px; }
.timeline li { position: relative; padding: 0 0 18px 22px; display: grid; gap: 2px; }
.timeline li::before { content: ''; position: absolute; left: -9px; top: 5px; width: 15px; height: 15px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); }
.timeline b { font: 800 1.05rem var(--display); color: var(--accent-dark); }
.days { display: grid; gap: 8px; }
.day { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; text-decoration: none; color: var(--ink); }
.day:hover { border-color: var(--ink-3); }
.day-photo { width: 76px; height: 76px; border-radius: 12px; object-fit: cover; flex: none; }
.day small { display: block; font-weight: 700; color: var(--accent-dark); text-transform: uppercase; font-size: .74rem; letter-spacing: .06em; }
.day b { display: block; font: 800 1.08rem var(--display); }
.day em { font-style: normal; color: var(--ink-2); font-size: .9rem; }
.plan-btn { margin: 8px 0; }
.list-recipes ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.list-recipes li { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 8px 8px 14px; }
.list-recipes a { flex: 1; font-weight: 600; text-decoration: none; color: var(--ink); }
.list-recipes span { font-size: .85rem; color: var(--ink-2); }
.list-recipes button { background: none; border: 0; cursor: pointer; padding: 6px; color: var(--ink-2); border-radius: 50%; }
.list-recipes button:hover { background: var(--surface-2); }
.aisle h2 { font-size: 1.1rem; margin: 1.6em 0 .2em; }

/* certificate */
.certform { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin: 12px 0 20px; }
.certform label { font-weight: 600; font-size: .9rem; display: grid; gap: 4px; flex: 1; min-width: 200px; }
.certform input { padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cert { background: #fffdf8; color: #1f1a17; border-radius: 12px; padding: 12px; box-shadow: var(--shadow); }
.cert-in { border: 3px double #c9a77c; border-radius: 6px; padding: 36px 24px; text-align: center; }
.cert-brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.2rem var(--display); }
.cert-brand .logo-ic { color: #e2502a; }
.cert-kicker { font: 800 clamp(1.8rem, 7vw, 3rem)/1.1 var(--display); margin: 18px 0; color: #c23f1d; }
.cert-name { font: 800 clamp(1.6rem, 6vw, 2.4rem)/1.2 var(--display); border-bottom: 2px solid #1f1a17; display: inline-block; padding: 0 24px 6px; margin: 6px 0 18px; }
.cert-date { color: #5e554d; margin: 18px 0 0; }

/* timers, cook mode, toast */
#timer-dock { position: fixed; right: 12px; bottom: 80px; z-index: 40; display: grid; gap: 8px; }
@media (min-width: 820px) { #timer-dock { bottom: 16px; } }
.timer { background: var(--ink); color: var(--bg); border-radius: 16px; padding: 10px 10px 10px 16px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow); min-width: 190px; }
.timer div { flex: 1; }
.timer b { display: block; font: 800 1.5rem/1 var(--display); font-variant-numeric: tabular-nums; }
.timer span { font-size: .74rem; opacity: .75; }
.timer button { background: rgba(127, 127, 127, .3); border: 0; color: inherit; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; display: grid; place-items: center; }
.timer-done { background: var(--accent); color: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.04); } }
.cook { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; flex-direction: column; }
.cook header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 700; }
.cook header button { background: var(--surface-2); border: 0; border-radius: 50%; width: 40px; height: 40px; cursor: pointer; display: grid; place-items: center; }
.cook-body { flex: 1; overflow: auto; padding: 28px 22px; max-width: 760px; width: 100%; margin: 0 auto; }
.cook-n { font-weight: 700; color: var(--accent-dark); text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; }
.cook-t { font: 600 clamp(1.4rem, 5vw, 2.1rem)/1.35 var(--display); }
.cook-ing { margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.cook-ing summary { font-weight: 700; cursor: pointer; }
.cook-ing ul { list-style: none; padding: 0; margin: 10px 0 0; }
.cook-ing li { padding: 4px 0; }
.cook footer { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); max-width: 760px; width: 100%; margin: 0 auto; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: .92rem; opacity: 0; transition: all .25s; z-index: 60; pointer-events: none; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

@media print {
  .top, .tabbar, .foot, #timer-dock, .no-print, .crumb, .rhero, .cta-inline, .mynotes, .row-end, .skills, .pager, .quiz, .tbtn, .stepper button, .btn { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; padding: 0; }
  main.wrap { padding: 0; max-width: none; }
  .box, .ings, .table-wrap, .fig { border-color: #bbb; break-inside: avoid; }
  .rcols { grid-template-columns: 34% 1fr; gap: 20px; }
  .ings { position: static; }
  h1 { font-size: 22pt; }
  a { color: inherit; text-decoration: none; }
  .cert { box-shadow: none; }
}

/* second pass: look inside, how it works, saved recipes, tickable steps, own list items */
.inside { display: grid; gap: 20px; align-items: center; }
.inside .fig { margin: 0; }
@media (min-width: 900px) { .inside { grid-template-columns: 1.15fr 1fr; gap: 40px; } }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 34px; color: var(--ink-2); }
.ticks li b { color: var(--ink); }
.ticks li::before { content: ''; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--green-soft); }
.ticks li::after { content: ''; position: absolute; left: 6px; top: 9px; width: 9px; height: 5px; border-left: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(-45deg); }
.how { list-style: none; counter-reset: how; padding: 0; margin: 0 auto 24px; max-width: 860px; display: grid; gap: 10px; }
.how li { counter-increment: how; display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.how li::before { content: counter(how); grid-row: span 2; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--bg); font: 800 1rem var(--display); display: grid; place-items: center; }
.how b { font: 800 1.02rem var(--display); }
.how span { font-size: .88rem; color: var(--ink-2); }
@media (min-width: 720px) { .how { grid-template-columns: repeat(3, 1fr); } }
main:focus { outline: none; }
.sec-head h2 { margin-bottom: .6em; }
.rcard-saved { position: absolute; bottom: 8px; right: 8px; background: rgba(20, 16, 14, .72); color: #ff8a7a; border-radius: 999px; padding: 6px; display: flex; }
.btn-saved, .btn-saved:hover { color: var(--accent-dark); border-color: var(--accent); background: var(--accent-soft); }
.chip .ic { width: .95em; height: .95em; }
.btn-next { margin-top: 10px; }
.hint { margin: -4px 0 4px; }
.steps li { cursor: pointer; border-radius: 12px; transition: opacity .15s; }
.steps li.done > div { opacity: .45; text-decoration: line-through; }
.steps li.done::before { background: var(--green); content: '✓'; }
.steps li .tbtn { text-decoration: none; }
.list-add { display: flex; gap: 8px; margin: 0 0 16px; }
.list-add input { flex: 1; min-width: 0; padding: 11px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.ing-list li { display: flex; align-items: center; }
.ing-list li label { flex: 1; }
.li-x { background: none; border: 0; cursor: pointer; padding: 8px; color: var(--ink-3); border-radius: 50%; display: flex; }
.li-x:hover { background: var(--surface-2); color: var(--ink); }
.prose h2, .prose h3 { scroll-margin-top: 76px; }
@media print { .list-add, .hint, .li-x { display: none !important; } .steps li.done > div { opacity: 1; text-decoration: none; } }

/* third pass: Complete-only tools, paywall, locked diagrams */
.modal-back { position: fixed; inset: 0; z-index: 55; background: rgba(20, 16, 14, .6); display: grid; place-items: center; padding: 16px; overflow: auto; }
.modal { position: relative; background: var(--bg); border-radius: 24px; padding: 28px 24px 24px; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow: auto; text-align: center; box-shadow: var(--shadow); }
.modal h2 { margin: 0 0 .5em; font-size: 1.4rem; }
.modal .ticks { text-align: left; margin: 0 0 18px; gap: 9px; }
.modal .row { justify-content: center; }
.modal .howbuy { text-align: left; background: var(--yellow-soft); border-radius: 16px; padding: 14px 16px; margin: 0 0 16px; }
.modal .howbuy h3 { font-size: 1rem; margin-bottom: .3em; }
.modal .howbuy p { margin: 0; font-size: .95rem; }
.modal-close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface-2); cursor: pointer; display: grid; place-items: center; }
.modal-pick { text-align: left; max-width: 560px; }
.modal-pick input { width: 100%; padding: 12px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); margin-bottom: 12px; }
.pick-list { display: grid; gap: 6px; }
.pick-list .day { width: 100%; text-align: left; cursor: pointer; font: inherit; }
.fig-locked { position: relative; overflow: hidden; }
.fig-ghost { filter: blur(9px); opacity: .5; }
.fig-ghost svg { width: 100%; height: auto; display: block; }
.fig-unlock { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: var(--bg); border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 700; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.fig-unlock:hover { background: var(--accent); color: #fff; }
.pgroups { margin: 18px 0 8px; display: grid; gap: 14px; }
.pgroup h3 { font: 700 .78rem var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 8px; }
.fcard { display: flex; flex-direction: column; }
.fcard .rcard { flex: 1; }
.missing { margin: 6px 2px 0; color: var(--accent-dark); font-weight: 600; }
.day-set { display: grid; grid-template-columns: auto 1fr auto auto; }
.day-set a { color: inherit; text-decoration: none; }
.day-empty { width: 100%; text-align: left; cursor: pointer; font: inherit; border-style: dashed; background: transparent; }
.day-plus { width: 76px; height: 76px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-size: 2rem; color: var(--ink-3); flex: none; }
.plan-total { display: flex; gap: 14px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.plan-total b { display: block; font: 800 1.15rem var(--display); }
.plan-total span { color: var(--ink-2); }
@media (max-width: 520px) { .day-set { grid-template-columns: auto 1fr auto; } .day-set .stepper { grid-column: 2 / 4; justify-self: start; } .day-set .li-x { grid-column: 3; grid-row: 1; } .day-set .day-photo, .day-plus { width: 60px; height: 60px; } }
.levels { margin-bottom: 8px; }
.level { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.level.earned { border: 2px solid var(--green); }
.level-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; color: var(--ink-3); }
.level-head div { flex: 1; color: var(--ink); }
.level-head h3 { margin: 0; font-weight: 800; font-size: 1.2rem; }
.level-head p { margin: 0; }
.medal { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 800 1.2rem var(--display); color: #1f1a17; }
.level-bronze .medal { background: #d9925b; } .level-silver .medal { background: #c3c9cf; } .level-gold .medal { background: #f3b33d; }
.needs { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; font-size: .95rem; color: var(--ink-2); }
.needs li { display: flex; gap: 8px; align-items: center; }
.needs li i { width: 1.1em; height: 1.1em; border: 2px solid var(--line); border-radius: 50%; flex: none; }
.needs li.ok { color: var(--ink); font-weight: 600; } .needs li.ok .ic { color: var(--green); }
.chals { display: grid; gap: 6px; margin-bottom: 18px; }
.chal { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.chal p { margin: 4px 0 0; }
.chal-tick { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface-2); cursor: pointer; flex: none; display: grid; place-items: center; color: #fff; padding: 0; }
.chal.done .chal-tick { background: var(--green); border-color: var(--green); }
.cert-level { font: 800 1.2rem var(--display); letter-spacing: .12em; text-transform: uppercase; margin: -8px 0 16px; }
.cert-bronze { color: #b06a34; } .cert-silver { color: #6d7781; } .cert-gold { color: #b98209; }
.cb-cover { text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 40px 20px; margin: 8px 0 20px; }
.cb-cover h1 { font-size: clamp(2.4rem, 9vw, 4rem); margin: 16px 0 8px; color: var(--accent-dark); }
.cb-toc { columns: 2; column-gap: 28px; font-size: .95rem; }
.cb-toc section { break-inside: avoid; margin-bottom: 16px; }
.cb-toc h3 { font-weight: 800; margin-bottom: .3em; }
.cb-toc ol { margin: 0; padding-left: 1.3em; color: var(--ink-2); }
.cb-body { display: none; }
.cook header button { background: var(--surface-2); border: 0; border-radius: 50%; width: 40px; height: 40px; cursor: pointer; display: grid; place-items: center; }
.cook header button.on { background: var(--accent); color: #fff; }
@media print {
  .cb-body { display: block; }
  .cb-toc { columns: 3; font-size: 9pt; }
  .cb-cover { border: 0; padding: 120px 0 60px; break-after: page; }
  .cb-mod { break-before: page; font-size: 20pt; border-bottom: 2px solid #000; padding-bottom: 6px; }
  .cb-recipe { break-inside: avoid; padding: 10px 0 14px; border-bottom: 1px solid #ccc; }
  .cb-recipe h3 { font-size: 14pt; font-weight: 800; margin-bottom: 2px; }
  .cb-meta { font-size: 9pt; color: #444; margin-bottom: 4px; }
  .cb-cols { display: grid; grid-template-columns: 32% 1fr; gap: 16px; font-size: 9.5pt; }
  .cb-cols ul { list-style: none; padding: 0; margin: 0; } .cb-cols ol { margin: 0; padding-left: 1.2em; }
  .cb-cols .ing-h { padding: 6px 0 0; }
  .modal-back, .fig-unlock { display: none !important; }
}
