/* bananababe — site styles */
:root {
  --bg: #fffbf2;
  --bg-soft: #fbf3e2;
  --card: #ffffff;
  --text: #2b2118;
  --muted: #76675a;
  --border: #eee2cb;
  --accent: #f2c230;
  --accent-ink: #7a5000;
  --accent-soft: #fdf0c4;
  --link: #8a4b12;
  --ok: #3f7d3a;
  --shadow: 0 1px 2px rgba(60, 40, 10, .06), 0 6px 20px rgba(60, 40, 10, .06);
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #1b1713;
  --bg-soft: #221d18;
  --card: #262019;
  --text: #f1e9dc;
  --muted: #b3a491;
  --border: #3a3128;
  --accent: #f2c230;
  --accent-ink: #f6d36a;
  --accent-soft: #3a3020;
  --link: #f0c36b;
  --ok: #8fd18a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1713; --bg-soft: #221d18; --card: #262019; --text: #f1e9dc; --muted: #b3a491;
    --border: #3a3128; --accent-ink: #f6d36a; --accent-soft: #3a3020; --link: #f0c36b; --ok: #8fd18a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.65 var(--sans); overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(30px, 5vw, 44px); letter-spacing: -.01em; }
h2 { font-size: clamp(23px, 3.4vw, 30px); }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.header-in { display: flex; align-items: center; gap: 18px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); font-family: var(--serif); font-size: 22px; font-weight: 600; }
.brand .logo { width: 30px; height: 30px; }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--text); padding: 6px 11px; border-radius: 999px; font-size: 15.5px; }
.nav a:hover { background: var(--bg-soft); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.tools { display: flex; gap: 4px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid transparent; background: none; border-radius: 999px; cursor: pointer; color: var(--text); }
.icon-btn:hover { background: var(--bg-soft); border-color: var(--border); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}
.hsearch { display: flex; gap: 8px; padding-bottom: 14px; }
.hsearch input { flex: 1; }
@media (max-width: 640px) {
  .nav { order: 3; width: 100%; margin: 0 0 10px; justify-content: flex-start; overflow-x: auto; }
  .tools { margin-left: auto; }
}

/* inputs & buttons */
input[type="search"], input[type="number"] {
  border: 1px solid var(--border); background: var(--card); border-radius: 10px; padding: 9px 12px; min-width: 0;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--accent); background: var(--accent);
  color: #2b2118; padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: 15px; cursor: pointer;
  text-decoration: none; transition: transform .08s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-small { padding: 6px 12px; font-size: 14px; }
.linkish { background: none; border: 0; color: var(--link); text-decoration: underline; cursor: pointer; padding: 4px; font-size: 14.5px; }

/* home */
.hero { padding: 54px 0 34px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 36px; align-items: center; }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-art { border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; padding-top: 30px; } }
.section { padding: 26px 0 30px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.scale { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 14px 0 6px; }
.scale span { height: 14px; border-radius: 999px; }
.scale-labels { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.notes-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.notes-list li { border-bottom: 1px solid var(--border); padding-bottom: 14px; }
.notes-list a { font-family: var(--serif); font-size: 20px; text-decoration: none; }
.notes-list p { color: var(--muted); margin: 4px 0 0; font-size: 15.5px; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s ease; }
.card:hover { transform: translateY(-2px); }
.card-link { color: inherit; text-decoration: none; display: block; height: 100%; }
.card-img svg { width: 100%; height: auto; }
.card-body { padding: 16px 18px 18px; }
.card-body h3 { margin-bottom: 6px; }
.card-body p { color: var(--muted); font-size: 15.5px; margin-bottom: 10px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.meta span, .badge { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; color: var(--muted); }
.badge-diet { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }

/* recipe list */
.list-tools { display: flex; flex-direction: column; gap: 14px; margin: 18px 0 22px; }
.list-search { display: flex; gap: 10px; }
.list-search input { flex: 1; font-size: 17px; padding: 11px 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--border); background: var(--card); border-radius: 999px; padding: 6px 13px; cursor: pointer; font-size: 14.5px; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.count { color: var(--muted); font-size: 15px; margin: 0; }
.empty { text-align: center; padding: 40px 10px; color: var(--muted); }

/* post */
.crumbs { font-size: 14px; color: var(--muted); padding-top: 26px; }
.crumbs a { color: var(--muted); }
.post-head { padding: 14px 0 6px; }
.post-meta { color: var(--muted); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags a { font-size: 13.5px; text-decoration: none; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; color: var(--muted); }
.post-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.hero-illus { margin: 18px 0 26px; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.prose { font-size: 18px; }
.prose h2 { margin-top: 1.4em; }
.prose li { margin-bottom: .4em; }
.callout { background: var(--accent-soft); border-radius: 12px; padding: 14px 18px; margin: 18px 0; }

/* recipe card */
.recipe-card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); padding: 26px; margin: 34px 0; scroll-margin-top: 84px; }
.rc-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.facts { display: flex; flex-wrap: wrap; gap: 12px 20px; margin: 0; }
.facts div { text-align: center; }
.facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; white-space: nowrap; }
.rc-controls { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; padding: 14px 0 18px; border-bottom: 1px dashed var(--border); }
.servings { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.servings input { width: 64px; text-align: center; padding: 6px; }
.step-btn { width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-soft); cursor: pointer; font-size: 18px; line-height: 1; }
.step-btn:hover { border-color: var(--accent); }
.units { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.units button { border: 0; background: transparent; padding: 6px 13px; cursor: pointer; font-size: 14px; }
.units button[aria-pressed="true"] { background: var(--accent); color: #2b2118; font-weight: 600; }
.rc-cols { display: grid; grid-template-columns: .9fr 1.1fr; gap: 30px; padding-top: 18px; }
@media (max-width: 760px) { .rc-cols { grid-template-columns: 1fr; } .recipe-card { padding: 20px; scroll-margin-top: 122px; } }
.ing-group h4 { margin: 14px 0 4px; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ing-list, .steps { list-style: none; padding: 0; margin: 0; }
.ing-list li { border-bottom: 1px solid var(--border); }
.ing-list label, .steps label { display: flex; gap: 10px; align-items: flex-start; padding: 8px 2px; cursor: pointer; }
.ing-list input, .steps input { margin-top: 6px; accent-color: #c99511; width: 17px; height: 17px; flex: none; }
.ing-list .q { font-weight: 650; white-space: nowrap; }
.ing-list .note { color: var(--muted); font-size: 15px; }
.done > label { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.steps { counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding-left: 38px; margin-bottom: 8px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 8px; width: 26px; height: 26px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.steps label { padding-top: 7px; }
.timer-btn { margin: 0 0 8px 27px; }
.rc-mini { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.rc-notes { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border); }
.rc-notes ul { padding-left: 20px; margin: 0; }
.related { padding: 10px 0 20px; }
.prevnext { display: flex; justify-content: space-between; gap: 12px; padding: 22px 0 46px; border-top: 1px solid var(--border); margin-top: 24px; flex-wrap: wrap; }
.prevnext a { text-decoration: none; max-width: 46%; }
.prevnext small { display: block; color: var(--muted); }

/* timer bar */
.timerbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 40; display: flex; align-items: center; gap: 10px; background: var(--text); color: var(--bg); padding: 10px 12px 10px 18px; border-radius: 999px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); max-width: calc(100% - 24px); flex-wrap: wrap; justify-content: center; }
.timerbar .tb-time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 18px; }
.timerbar .btn-ghost { color: var(--bg); border-color: color-mix(in srgb, var(--bg) 35%, transparent); }
.timerbar.finished { background: #c0392b; color: #fff; }

/* misc */
.toast { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 20px); opacity: 0; background: var(--text); color: var(--bg); padding: 9px 16px; border-radius: 999px; font-size: 15px; transition: all .2s ease; z-index: 60; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.to-top { position: fixed; right: 16px; bottom: 16px; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); box-shadow: var(--shadow); cursor: pointer; font-size: 20px; z-index: 30; }
.site-footer { border-top: 1px solid var(--border); margin-top: 30px; padding: 24px 0 34px; color: var(--muted); font-size: 14.5px; }
.footer-in { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-in p { margin: 0; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--muted); }
details.faq { border-bottom: 1px solid var(--border); padding: 12px 0; }
details.faq summary { cursor: pointer; font-weight: 600; font-family: var(--serif); font-size: 19px; }
details.faq p { margin: 10px 0 0; }

/* ripeness tool */
.ripe { display: grid; grid-template-columns: 220px 1fr; gap: 26px; align-items: center; margin: 22px 0; }
@media (max-width: 640px) { .ripe { grid-template-columns: 1fr; } }
.ripe input[type="range"] { width: 100%; accent-color: #c99511; }
.ripe-stage { font-family: var(--serif); font-size: 24px; margin: 6px 0; }
.ripe-uses a { margin-right: 10px; }

.notfound { text-align: center; padding-top: 70px; padding-bottom: 40px; }
.notfound .list-search { max-width: 520px; margin: 20px auto; }

@media print {
  .site-header, .site-footer, .to-top, .timerbar, .post-actions, .hero-illus, .prose, .related, .prevnext,
  .crumbs, .rc-controls .units, .rc-mini, .timer-btn, .tags, .step-btn, [data-sv-reset] { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .recipe-card { box-shadow: none; border: 0; padding: 0; margin: 0; }
  .servings input { border: 0; width: 3em; }
  .ing-list input, .steps input { display: none; }
  .done > label { text-decoration: none; color: #000; }
}

/* when a timer is running, lift the back-to-top button above it */
.timerbar:not([hidden]) ~ .to-top { bottom: 84px; }
.scale-hint { font-size: 14.5px; color: var(--muted); margin: 10px 0 0; }
.timerbar .tb-label { font-weight: 600; }
