/* ============================================================
   YOU BREW KOMBUCHA — site stylesheet
   One file, no build step. Edit tokens below to re-theme.
   ============================================================ */

:root {
  /* Brand color tokens (sampled from the YBK banner + book) */
  --coral: #E25A2F;
  --coral-dark: #BE4520;
  --coral-deep: #9E3717;
  --coral-soft: #FBEADF;
  --coral-wash: #FDF3EC;
  --cream: #FDF9F3;
  --paper: #FFFFFF;
  /* DARK TREATMENT — V2 ships the "charcoal espresso" alternative for side-by-side review.
     To revert to the V1 dark brown, swap these two values back:
     V1 --ink: #33281F;  V1 --ink-soft: #71614F; */
  --ink: #2C2925;
  --ink-soft: #6E6459;
  --honey: #E8B62E;
  --honey-soft: #FBF3DC;
  --sage: #6F8F6B;
  --sage-soft: #EDF3EA;
  --line: #EFE2D3;

  --font-display: "Fraunces", Georgia, serif;
  --font-script: "Caveat", "Bradley Hand", cursive;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(51, 40, 31, .06), 0 10px 30px -18px rgba(51, 40, 31, .25);
  --shadow-lift: 0 2px 4px rgba(51, 40, 31, .07), 0 18px 44px -20px rgba(51, 40, 31, .33);
  --wrap: 1104px;
  --prose: 46rem;
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--coral-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--coral); }
:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; text-wrap: balance; }
p, li, .dek { text-wrap: pretty; } /* avoids single-word orphan lines where supported */
h1 { font-size: clamp(2.1rem, 5.4vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.15rem); margin-top: 0; }
h3 { font-size: 1.22rem; line-height: 1.3; }
p { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.35em; margin: 0 0 1.2em; }
li { margin-bottom: .45em; }
strong { font-weight: 650; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.prose { max-width: var(--prose); }
.center { text-align: center; }

/* Script accent — the handwritten YBK flourish */
.script {
  font-family: var(--font-script);
  font-weight: 600;
  font-size: 1.7em;
  line-height: 1;
  color: var(--coral);
  display: block;
  margin-bottom: .3rem;
}
.script.on-dark { color: #FFD9C7; }

/* Bubbles motif (echoes the channel banner) */
.bubbles { position: relative; isolation: isolate; }
.bubbles::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; pointer-events: none;
  background-image:
    radial-gradient(circle 3px at 12% 22%, rgba(255,255,255,.5) 98%, transparent),
    radial-gradient(circle 5px at 27% 74%, rgba(255,255,255,.32) 98%, transparent),
    radial-gradient(circle 2px at 38% 38%, rgba(255,255,255,.45) 98%, transparent),
    radial-gradient(circle 7px at 51% 15%, rgba(255,255,255,.22) 98%, transparent),
    radial-gradient(circle 3px at 63% 62%, rgba(255,255,255,.4) 98%, transparent),
    radial-gradient(circle 5px at 74% 30%, rgba(255,255,255,.3) 98%, transparent),
    radial-gradient(circle 2px at 83% 80%, rgba(255,255,255,.45) 98%, transparent),
    radial-gradient(circle 6px at 93% 48%, rgba(255,255,255,.25) 98%, transparent),
    radial-gradient(circle 4px at 8% 88%, rgba(255,255,255,.3) 98%, transparent),
    radial-gradient(circle 2px at 45% 90%, rgba(255,255,255,.4) 98%, transparent);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253, 249, 243, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  display: flex; align-items: center; gap: 1rem;
  min-height: 64px;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; margin-right: auto; }
.brand-logo { height: 40px; width: auto; display: block; }
@media (max-width: 480px) { .brand-logo { height: 32px; } }
.site-nav { display: flex; align-items: center; gap: .25rem; }
.site-nav a {
  text-decoration: none; color: var(--ink); font-weight: 550; font-size: .97rem;
  padding: .5rem .78rem; border-radius: 999px;
}
.site-nav a:hover { background: var(--coral-soft); color: var(--coral-deep); }
.site-nav a[aria-current="page"] { background: var(--coral-soft); color: var(--coral-deep); }
.btn-yt {
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--ink); color: #fff !important; border-radius: 999px;
  padding: .5rem .95rem !important; font-weight: 600;
}
.btn-yt:hover { background: #000; }
.btn-yt svg { width: 17px; height: 17px; fill: #fff; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 10px;
  padding: .45rem .6rem; cursor: pointer; color: var(--ink);
}
.nav-toggle svg { width: 22px; height: 22px; display: block; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: .15rem;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: .8rem clamp(1.1rem, 4vw, 2rem) 1.1rem;
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .8rem .9rem; font-size: 1.05rem; }
  .btn-yt { justify-content: center; margin-top: .35rem; }
}

/* ---------- Hero (home) ---------- */
.hero {
  background: linear-gradient(160deg, var(--coral) 0%, #D94F26 60%, var(--coral-dark) 100%);
  color: #fff; overflow: hidden;
}
.hero .wrap {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center; padding-block: clamp(2.8rem, 7vw, 5.5rem);
}
.hero h1 { color: #fff; margin: 0 0 .55em; }
.hero .lede { font-size: clamp(1.06rem, 2vw, 1.2rem); color: #FFE7DB; max-width: 34em; }
.hero .script { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.hero-photo { position: relative; }
.hero-photo img {
  border-radius: 24px; box-shadow: 0 24px 60px -22px rgba(0,0,0,.5);
  transform: rotate(1.5deg);
  border: 6px solid rgba(255,255,255,.9);
}
.hero-photo figcaption {
  position: absolute; bottom: -14px; left: 18px;
  font-family: var(--font-script); font-size: 1.45rem; color: #fff;
  background: var(--ink); padding: .1rem .9rem .2rem; border-radius: 999px; transform: rotate(-2deg);
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-photo { max-width: 440px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 650; font-size: 1rem; text-decoration: none;
  border-radius: 999px; padding: .78rem 1.5rem; border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--coral); color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.12); }
.btn-primary:hover { background: var(--coral-dark); color: #fff; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #000; color: #fff; }
.btn-light { background: #fff; color: var(--coral-deep); }
.btn-light:hover { color: var(--coral); }
.btn-ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn-outline { border-color: var(--coral); color: var(--coral-dark); }
.btn-outline:hover { background: var(--coral-soft); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(2.6rem, 6.5vw, 4.8rem); }
.section-tight { padding-block: clamp(1.8rem, 4vw, 3rem); }
.section-cream { background: var(--cream); }
.section-white { background: var(--paper); border-block: 1px solid var(--line); }
.section-coral-wash { background: var(--coral-wash); border-block: 1px solid var(--line); }
.kicker { margin-bottom: 2rem; max-width: 46em; }
.kicker p { color: var(--ink-soft); max-width: 40em; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 940px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.3rem; position: relative;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
a.card { text-decoration: none; color: inherit; transition: transform .18s ease, box-shadow .18s ease; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); color: inherit; }
.card h3 { margin-bottom: .35rem; }
.card p { color: var(--ink-soft); font-size: .97rem; margin-bottom: 0; }
.card .go { margin-top: auto; padding-top: .9rem; font-weight: 650; color: var(--coral-dark); font-size: .95rem; }
a.card:hover .go { color: var(--coral); }
.card-num {
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  background: var(--coral); color: #fff; width: 2rem; height: 2rem; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: .8rem;
}
.card-emoji { font-size: 1.7rem; line-height: 1; margin-bottom: .7rem; }
.card-emoji svg { width: 30px; height: 30px; color: var(--honey); display: block; }
.card-img { margin: -1.4rem -1.4rem 1rem; }
.card-img img { border-radius: var(--radius) var(--radius) 0 0; aspect-ratio: 16/9; object-fit: cover; }

.badge {
  display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; border-radius: 999px; padding: .18rem .6rem;
  background: var(--coral-soft); color: var(--coral-deep); margin-bottom: .6rem;
  align-self: flex-start;
}
.badge.video { background: var(--honey-soft); color: #8a6a12; }
.badge.gv { background: linear-gradient(105deg, var(--coral-soft) 35%, var(--honey-soft)); color: var(--coral-deep); }
.badge.tool { background: var(--sage-soft); color: #44603F; }

/* ---------- Guide pages ---------- */
.page-head { padding-block: clamp(2.2rem, 5vw, 3.6rem) 0; }
.breadcrumb { font-size: .92rem; margin-bottom: 1.1rem; color: var(--ink-soft); }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--coral-dark); }
.breadcrumb span { color: var(--line); padding-inline: .4rem; }
.dek { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--ink-soft); max-width: 38em; margin-top: .2rem; }
.meta-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.2rem 0 0; padding: 0; list-style: none; }
.meta-chips li {
  font-size: .85rem; font-weight: 600; color: var(--ink-soft);
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px;
  padding: .3rem .8rem; margin: 0;
}

/* At-a-glance card */
.glance {
  background: var(--coral-wash); border: 1px solid #F4D9C8; border-radius: var(--radius);
  padding: 1.5rem 1.6rem 1.4rem; margin: 2rem 0;
}
.glance .script { font-size: 1.9rem; }
.glance ul { margin: .6rem 0 0; padding-left: 1.2em; }
.glance li { margin-bottom: .35em; }
.glance .toc { columns: 2; column-gap: 2rem; list-style: none; padding: 0; margin-top: .8rem; }
.glance .toc li { break-inside: avoid; border-bottom: 1px dashed #F0D4C1; padding: .35rem 0; }
.glance .toc a { text-decoration: none; font-weight: 600; }
@media (max-width: 620px) { .glance .toc { columns: 1; } }

/* Video facade — loads the real YouTube player only on click */
.video {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius);
  overflow: hidden; background: var(--ink); margin: 1.6rem 0 .5rem;
  box-shadow: var(--shadow-lift);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-btn {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; padding: 0; cursor: pointer; display: block;
  background-size: cover; background-position: center;
}
.video-btn::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(rgba(20,10,5,.05), rgba(20,10,5,.35));
}
.video-btn::after {
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 74px; height: 74px; border-radius: 999px; background: var(--coral);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5.5v13l11-6.5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 55% center; background-size: 34px;
  transition: transform .15s ease;
}
.video-btn:hover::after { transform: translate(-50%, -50%) scale(1.07); }
.video-btn .label {
  position: absolute; left: 14px; bottom: 12px; color: #fff; font-weight: 600; font-size: .92rem;
  background: rgba(20, 10, 5, .55); border-radius: 999px; padding: .3rem .85rem;
}
.video-note { font-size: .88rem; color: var(--ink-soft); margin-bottom: 2rem; }
.video-note a { color: var(--ink-soft); }

/* Callouts */
.callout {
  border-radius: var(--radius-sm); padding: 1.05rem 1.2rem; margin: 1.4rem 0;
  border: 1px solid; font-size: .99rem;
}
.callout p:last-child { margin-bottom: 0; }
.callout .co-title { display: block; font-weight: 750; margin-bottom: .2rem; }
.callout-tip { background: var(--sage-soft); border-color: #D8E5D4; }
.callout-tip .co-title { color: #44603F; }
.callout-warn { background: var(--honey-soft); border-color: #F0E0AE; }
.callout-warn .co-title { color: #8A6A12; }
.callout-real { background: var(--coral-wash); border-color: #F4D9C8; }
.callout-real .co-title { color: var(--coral-deep); }

/* Recipe / data tables */
.table-wrap { overflow-x: auto; margin: 1.4rem 0; }
table.nice { border-collapse: collapse; width: 100%; background: var(--paper); border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); font-size: .98rem; }
table.nice th { background: var(--coral); color: #fff; text-align: left; padding: .7rem .95rem; font-weight: 650; }
table.nice td { padding: .68rem .95rem; border-top: 1px solid var(--line); vertical-align: top; }
table.nice tr:nth-child(even) td { background: var(--cream); }

/* Steps */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 1.6rem 0; }
.steps > li {
  counter-increment: step; position: relative;
  padding: 0 0 1.6rem 3.4rem; margin: 0;
}
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: -.15rem;
  width: 2.35rem; height: 2.35rem; border-radius: 999px;
  background: var(--coral); color: #fff; font-family: var(--font-display); font-weight: 600;
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.steps > li::after {
  content: ""; position: absolute; left: 1.12rem; top: 2.5rem; bottom: .3rem;
  width: 2px; background: var(--line);
}
.steps > li:last-child::after { display: none; }
.steps h3 { margin-bottom: .3rem; }
.steps p:last-child { margin-bottom: 0; }

/* FAQ accordions */
details.qa {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0; margin-bottom: .7rem; box-shadow: var(--shadow);
}
details.qa summary {
  cursor: pointer; font-weight: 650; padding: 1rem 3rem 1rem 1.2rem; list-style: none; position: relative;
  font-size: 1.03rem;
}
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after {
  content: "+"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%);
  font-family: var(--font-display); font-size: 1.5rem; color: var(--coral); line-height: 1;
}
details.qa[open] summary::after { content: "–"; }
details.qa .a { padding: 0 1.2rem 1.2rem; color: var(--ink-soft); }
details.qa .a p:last-child { margin-bottom: 0; }

/* Related links */
.related { margin-top: 3rem; }
.related h2 { font-size: 1.5rem; }
.related-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; list-style: none; padding: 0; }
@media (max-width: 620px) { .related-list { grid-template-columns: 1fr; } }
.related-list a {
  display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .85rem 1.05rem; text-decoration: none; font-weight: 600; color: var(--ink);
  transition: border-color .15s ease, transform .15s ease;
}
.related-list a:hover { border-color: var(--coral); transform: translateX(3px); color: var(--coral-deep); }
.related-list .tag { display: block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--coral); margin-bottom: .1rem; }

/* Panic strip (home + troubleshooting) */
.panic { background: var(--ink); color: #FCEFE4; }
/* Dark-surface companions to --ink. V1 (brown) values: card bg #40342A, border #55463A, p #CBB9A6 */
.panic a.card { background: #3B3731; border-color: #4F4A42; color: #FCEFE4; }
.panic a.card p { color: #C7BFB4; }
.panic a.card .go { color: var(--honey); }
.panic h2 { color: #fff; }
.panic .script { color: var(--honey); }

/* Filter chips + search (library, flavors) */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.4rem 0 1.8rem; }
.chip {
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink-soft);
  font-weight: 600; font-size: .92rem; border-radius: 999px; padding: .45rem 1rem; cursor: pointer;
  transition: all .12s ease;
}
.chip:hover { border-color: var(--coral); color: var(--coral-dark); }
.chip.active { background: var(--coral); border-color: var(--coral); color: #fff; }
.search-input {
  width: 100%; max-width: 30rem; font: inherit; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px;
  padding: .8rem 1.3rem;
}
.search-input:focus { border-color: var(--coral); outline: none; }
.count-note { color: var(--ink-soft); font-size: .92rem; margin: .4rem 0 1.2rem; }

/* Flavor cards */
.flavor-card .pair { font-family: var(--font-display); font-size: 1.28rem; font-weight: 600; margin-bottom: .3rem; }
.flavor-card .tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .9rem; }
.flavor-card .tags span {
  font-size: .76rem; font-weight: 700; background: var(--cream); border: 1px solid var(--line);
  color: var(--ink-soft); padding: .12rem .55rem; border-radius: 999px;
}
.fizz { color: var(--coral); font-size: .85rem; font-weight: 700; letter-spacing: .12em; }

/* Big CTA band */
.cta-band { background: linear-gradient(150deg, var(--coral), var(--coral-dark)); color: #fff; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #FFE3D5; max-width: 36em; }

/* Book */
.book-flex { display: grid; grid-template-columns: 300px 1fr; gap: 2.4rem; align-items: center; }
@media (max-width: 720px) { .book-flex { grid-template-columns: 1fr; } }
.book-flex img { border-radius: var(--radius); box-shadow: var(--shadow-lift); }

/* ---------- Footer ---------- */
/* Dark-surface companions to --ink. V1 (brown) values: text #D9C9B8, border #4A3D31, muted #A8937D */
.site-footer { background: var(--ink); color: #D6CFC6; font-size: .95rem; margin-top: 0; }
.site-footer .top {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 2rem;
  padding-block: 3rem 2.2rem;
}
@media (max-width: 860px) { .site-footer .top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer .top { grid-template-columns: 1fr; } }
.site-footer img.f-logo { height: 52px; width: auto; margin-bottom: 1rem; }
.site-footer .f-blurb { max-width: 30em; text-wrap: balance; }
.site-footer h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .09em; margin: 0 0 .8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: #D6CFC6; text-decoration: none; }
.site-footer a:hover { color: var(--honey); }
.site-footer .bottom {
  border-top: 1px solid #46413A; padding-block: 1.2rem;
  display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; align-items: center;
  font-size: .85rem; color: #A69D91;
}
/* Keep the bubble motif out of the footer's text columns: dots live in the top
   padding strip only, so they can never sit behind copy (Ryan's K4 note). */
.site-footer.bubbles::before {
  opacity: .45;
  background-image:
    radial-gradient(circle 4px at 8% 4%, rgba(255,255,255,.35) 98%, transparent),
    radial-gradient(circle 2px at 21% 7%, rgba(255,255,255,.45) 98%, transparent),
    radial-gradient(circle 6px at 37% 3%, rgba(255,255,255,.22) 98%, transparent),
    radial-gradient(circle 3px at 52% 6%, rgba(255,255,255,.4) 98%, transparent),
    radial-gradient(circle 5px at 68% 4%, rgba(255,255,255,.28) 98%, transparent),
    radial-gradient(circle 2px at 81% 7%, rgba(255,255,255,.45) 98%, transparent),
    radial-gradient(circle 7px at 94% 3%, rgba(255,255,255,.2) 98%, transparent);
}
.site-footer .script { font-size: 1.5rem; color: var(--honey); }

/* ---------- Brew log print sheet ---------- */
.log-sheet { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; }
.log-brand { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 3px solid var(--coral); padding-bottom: .7rem; margin-bottom: 1rem; }
.log-brand img { height: 34px; width: auto; }
.log-brand .log-brand-note { font-family: var(--font-script); font-weight: 600; font-size: 1.25rem; color: var(--coral); white-space: nowrap; }
.log-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2rem; }
@media (max-width: 620px) { .log-grid { grid-template-columns: 1fr; } }
.log-field { border-bottom: 1.5px solid var(--ink); padding: 1.1rem 0 .25rem; font-size: .93rem; font-weight: 600; color: var(--ink-soft); }
.log-field.tall { padding-top: 3rem; }
.log-notes { border: 1.5px solid var(--ink); border-radius: var(--radius-sm); min-height: 10rem; margin-top: 1.2rem; padding: .6rem .8rem; font-size: .93rem; font-weight: 600; color: var(--ink-soft); }
.log-notes.short { min-height: 6.5rem; }
.log-row { display: flex; gap: .6rem; align-items: center; margin-top: .8rem; font-size: .95rem; flex-wrap: wrap; }
.log-box { width: 1.05rem; height: 1.05rem; border: 1.5px solid var(--ink); border-radius: 4px; display: inline-block; flex: none; }
.log-foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 1.1rem; font-size: .85rem; color: var(--ink-soft); }
.log-foot .script { font-size: 1.35rem; margin: 0; display: inline; }

@media print {
  @page { size: letter; margin: 11mm 13mm; }
  .site-header, .site-footer, .no-print, .breadcrumb { display: none !important; }
  body { background: #fff; font-size: 12px; }
  .wrap { padding-inline: 0; max-width: none; }
  .section, .section-tight, .page-head { padding: 0 !important; }
  .prose { max-width: none !important; }
  a { text-decoration: none; color: inherit; }
  /* Brew log: exactly one branded sheet per phase */
  .log-sheet {
    border: none; border-radius: 0; padding: 0; margin: 0 !important; box-shadow: none;
    break-after: page; page-break-after: always;
    /* Pin each sheet to exactly one printed page: fixed height + flex fill */
    height: 9.3in; overflow: hidden; box-sizing: border-box;
    display: flex; flex-direction: column;
  }
  .log-sheet:last-of-type { break-after: auto; page-break-after: auto; }
  .log-sheet .log-notes { flex: 1 1 auto; min-height: 4rem; }
  .log-sheet .log-notes.short { flex: 0 0 auto; min-height: 5.5rem; }
  .log-sheet .log-foot { flex: 0 0 auto; }
  .log-brand { border-bottom-color: var(--coral); }
  .log-brand .log-brand-note, .log-foot .script { color: var(--coral); print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .log-sheet .log-field { padding-top: 1.3rem; }
  .log-sheet h2 { font-size: 1.7rem; }
  .log-foot { margin-top: 1.2rem; }
}

/* ---------- Site-wide search (overlay; built by site.js) ---------- */
.search-toggle {
  display: inline-flex; align-items: center; gap: .45rem;
  background: none; border: 1.5px solid var(--line); border-radius: 999px;
  padding: .45rem .9rem; cursor: pointer; color: var(--ink);
  font: inherit; font-weight: 600; font-size: .95rem;
}
.search-toggle:hover { border-color: var(--coral); color: var(--coral-dark); }
.search-toggle svg { width: 16px; height: 16px; }
@media (max-width: 860px) {
  .site-header .search-toggle { margin-left: auto; margin-right: .6rem; }
  .brand { margin-right: 0; flex: 1; }
}
@media (max-width: 480px) {
  .search-toggle .search-toggle-txt { display: none; }
  .search-toggle { padding: .45rem .62rem; }
}
.search-overlay {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(30, 26, 22, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  overflow-y: auto; padding: clamp(.8rem, 3vw, 2rem);
}
.search-overlay.open { display: block; }
.search-panel {
  max-width: 42rem; margin: clamp(2rem, 9vh, 6rem) auto 3rem;
  background: var(--cream); border-radius: var(--radius); box-shadow: var(--shadow-lift);
  padding: 1.2rem 1.2rem 1rem;
}
.search-panel .search-input { max-width: none; background: var(--paper); }
.search-panel-top { display: flex; gap: .6rem; align-items: center; }
.search-panel-top .search-input { flex: 1; }
.search-close {
  background: none; border: none; cursor: pointer; color: var(--ink-soft);
  font-size: 1.7rem; line-height: 1; padding: .3rem .5rem; border-radius: 8px;
}
.search-close:hover { color: var(--coral-dark); }
.search-hint { font-size: .85rem; color: var(--ink-soft); margin: .6rem .2rem 0; }
.search-results { margin-top: 1rem; max-height: min(58vh, 34rem); overflow-y: auto; padding-right: .2rem; }
.search-group { margin-bottom: 1.1rem; }
.search-group > a.search-page {
  display: block; text-decoration: none; font-family: var(--font-display); font-weight: 600;
  font-size: 1.08rem; color: var(--ink); margin-bottom: .35rem;
}
.search-group > a.search-page:hover { color: var(--coral-dark); }
.search-hit {
  display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .6rem .85rem; margin-bottom: .45rem; text-decoration: none; color: var(--ink);
}
.search-hit:hover { border-color: var(--coral); color: var(--ink); }
.search-hit .h { font-weight: 650; font-size: .97rem; color: var(--coral-deep); }
.search-hit .s { display: block; font-size: .88rem; color: var(--ink-soft); margin-top: .1rem; }
.search-hit .s mark { background: var(--honey-soft); color: inherit; border-radius: 3px; padding: 0 .1em; }
.search-empty { color: var(--ink-soft); font-size: .95rem; padding: .4rem .2rem; }
/* An input-look button that opens the overlay (home, troubleshooting) */
.search-fauxbox {
  display: flex; align-items: center; gap: .6rem; width: 100%; max-width: 30rem;
  font: inherit; color: var(--ink-soft); text-align: left; cursor: text;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px;
  padding: .8rem 1.3rem;
}
.search-fauxbox:hover { border-color: var(--coral); }
.search-fauxbox svg { width: 17px; height: 17px; flex: none; color: var(--coral); }

/* Button rows that must never collide (book section, hero, brew log) */
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }

/* Two-column feature split that stacks on phones */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3rem; align-items: center; }
.split.even { grid-template-columns: 1fr 1fr; }
@media (max-width: 820px) { .split, .split.even { grid-template-columns: 1fr; gap: 1.8rem; } }

/* Utility */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0; }
.small { font-size: .9rem; color: var(--ink-soft); }
.img-rounded { border-radius: var(--radius); box-shadow: var(--shadow-lift); }
.anchor-offset { scroll-margin-top: 90px; }
h2[id], h3[id], section[id], div[id] { scroll-margin-top: 90px; }
