/* /assets/css/tokens.css */
/*
 * sourdoughy.com — design tokens
 * Single source of truth for color, type, spacing, motion.
 * Loaded BEFORE all other CSS so other stylesheets can consume `var(--*)`.
 *
 * Colour philosophy: warm off-white / warm dark ("artisanal", not sterile).
 * No pure #fff or #000. Slight amber tint throughout.
 */

/* ----- 1. Self-hosted typography ---------------------------------------- */

/* Body & UI: Inter, split into Latin / Latin Extended / Cyrillic so a page
   only downloads the scripts it uses. The Latin range also carries the
   arrows and symbols the site prints (← → ≈ ✓ ★ ☀ ₂); rebuild the subsets
   if new symbols show up. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/Inter-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2082, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+2248, U+2600, U+2605, U+2713, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/Inter-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/Inter-400-cyr.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/Inter-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2082, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+2248, U+2600, U+2605, U+2713, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/Inter-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/Inter-500-cyr.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/Inter-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2082, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+2248, U+2600, U+2605, U+2713, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/Inter-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/Inter-600-cyr.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/Inter-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2082, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+2248, U+2600, U+2605, U+2713, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/Inter-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/Inter-700-cyr.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Display serif: Fraunces (Latin) + Source Serif 4 (Cyrillic fallback). */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/Fraunces-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/Fraunces-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/Fraunces-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/Fraunces-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/Fraunces-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/Fraunces-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/Fraunces-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Cyrillic display fallback (since Fraunces lacks Cyrillic): Source Serif 4 */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/SourceSerif4-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/SourceSerif4-600-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/SourceSerif4-700-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Arial scaled to Inter's metrics, used until Inter arrives, so text doesn't
   reflow (and shift the layout) when the web font swaps in. */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial'), local('ArialMT'), local('Liberation Sans');
  size-adjust: 107.12%;
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0%;
}

/* Numeric / monospace: JetBrains Mono, split the same way as Inter. */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/JetBrainsMono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2082, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+2248, U+2600, U+2605, U+2713, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/JetBrainsMono-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/JetBrainsMono-400-cyr.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/JetBrainsMono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2082, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+2248, U+2600, U+2605, U+2713, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/JetBrainsMono-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/JetBrainsMono-500-cyr.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* ----- 2. Light theme tokens ------------------------------------------- */
:root,
[data-theme="light"] {
  /* Surfaces */
  --bg:                 #fbfaf7;   /* warm off-white page */
  --bg-veil:            #f4f1ec;   /* secondary surface tint */
  --surface:            #ffffff;   /* card */
  --surface-elev:       #ffffff;   /* card with shadow */
  --surface-tinted:     #fdf6ec;   /* recipe / accent surface */

  /* Ink */
  --ink:                #1a1714;
  --ink-muted:          #6b6660;
  --ink-soft:           #9c968e;
  --ink-inverse:        #fdfbf6;

  /* Accent (sourdough crust amber) */
  --accent:             #c8801f;
  --accent-strong:      #b06d18;
  --accent-soft:        rgba(200, 128, 31, 0.12);
  --accent-hover:       #b06d18;

  /* Status colours (muted, never neon) */
  --success:            #4a7a4a;
  --success-soft:       rgba(74, 122, 74, 0.12);
  --warning:            #c87f24;
  --error:              #b04a32;
  --error-soft:         rgba(176, 74, 50, 0.10);

  /* Hairlines & focus */
  --border:             rgba(20, 18, 15, 0.08);
  --border-strong:      rgba(20, 18, 15, 0.16);
  --focus-ring:         rgba(200, 128, 31, 0.45);
  --focus-halo:         rgba(200, 128, 31, 0.18);

  /* Shadows: layered, soft */
  --shadow-sm:  0 1px 2px rgba(20,18,15,0.04), 0 1px 3px rgba(20,18,15,0.06);
  --shadow-md:  0 2px 4px rgba(20,18,15,0.04), 0 6px 16px rgba(20,18,15,0.06);
  --shadow-lg:  0 4px 8px rgba(20,18,15,0.05), 0 16px 40px rgba(20,18,15,0.10);
  --shadow-xl:  0 6px 12px rgba(20,18,15,0.06), 0 28px 60px rgba(20,18,15,0.14);

  /* Glass header */
  --glass-bg:   rgba(255, 254, 249, 0.80);
  --glass-border: rgba(20,18,15,0.08);
}

/* ----- 3. Dark theme tokens -------------------------------------------- */
[data-theme="dark"] {
  --bg:                 #15130f;
  --bg-veil:            #1a1814;
  --surface:            #1e1b16;
  --surface-elev:       #25221c;
  --surface-tinted:     #211c14;

  --ink:                #f5f1ea;
  --ink-muted:          #b8b1a4;
  --ink-soft:           #847e72;
  --ink-inverse:        #1a1714;

  --accent:             #e89a44;       /* slightly brighter amber for dark */
  --accent-strong:      #f0a958;
  --accent-soft:        rgba(232, 154, 68, 0.16);
  --accent-hover:       #f0a958;

  --success:            #82b58c;
  --success-soft:       rgba(130, 181, 140, 0.14);
  --warning:            #e89a44;
  --error:              #e88366;
  --error-soft:         rgba(232, 131, 102, 0.14);

  --border:             rgba(245, 241, 234, 0.08);
  --border-strong:      rgba(245, 241, 234, 0.18);
  --focus-ring:         rgba(232, 154, 68, 0.55);
  --focus-halo:         rgba(232, 154, 68, 0.20);

  --shadow-sm:  0 1px 2px rgba(0,0,0,0.30), 0 1px 3px rgba(0,0,0,0.20);
  --shadow-md:  0 2px 4px rgba(0,0,0,0.30), 0 6px 16px rgba(0,0,0,0.30);
  --shadow-lg:  0 4px 8px rgba(0,0,0,0.40), 0 16px 40px rgba(0,0,0,0.40);
  --shadow-xl:  0 6px 12px rgba(0,0,0,0.40), 0 28px 60px rgba(0,0,0,0.50);

  --glass-bg:   rgba(21, 19, 15, 0.82);
  --glass-border: rgba(245,241,234,0.08);
}

/* Default to dark when user prefers it AND no explicit override */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:                 #15130f;
    --bg-veil:            #1a1814;
    --surface:            #1e1b16;
    --surface-elev:       #25221c;
    --surface-tinted:     #211c14;
    --ink:                #f5f1ea;
    --ink-muted:          #b8b1a4;
    --ink-soft:           #847e72;
    --ink-inverse:        #1a1714;
    --accent:             #e89a44;
    --accent-strong:      #f0a958;
    --accent-soft:        rgba(232, 154, 68, 0.16);
    --accent-hover:       #f0a958;
    --success:            #82b58c;
    --warning:            #e89a44;
    --error:              #e88366;
    --border:             rgba(245, 241, 234, 0.08);
    --border-strong:      rgba(245, 241, 234, 0.18);
    --focus-ring:         rgba(232, 154, 68, 0.55);
    --focus-halo:         rgba(232, 154, 68, 0.20);
    --shadow-sm:  0 1px 2px rgba(0,0,0,0.30), 0 1px 3px rgba(0,0,0,0.20);
    --shadow-md:  0 2px 4px rgba(0,0,0,0.30), 0 6px 16px rgba(0,0,0,0.30);
    --shadow-lg:  0 4px 8px rgba(0,0,0,0.40), 0 16px 40px rgba(0,0,0,0.40);
    --shadow-xl:  0 6px 12px rgba(0,0,0,0.40), 0 28px 60px rgba(0,0,0,0.50);
    --glass-bg:   rgba(21, 19, 15, 0.82);
    --glass-border: rgba(245,241,234,0.08);
  }
}

/* ----- 4. Type scale / spacing / radius / motion ----------------------- */
:root {
  /* Type families */
  --font-display: 'Fraunces', 'Source Serif 4', 'Literata', 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, 'Helvetica Neue', sans-serif;
  --font-mono:    'JetBrains Mono', 'IBM Plex Mono', SFMono-Regular, ui-monospace, Menlo, Consolas, monospace;

  /* Modular type scale (1.25 ratio, base 16) */
  --text-xs:   0.75rem;    /* 12 */
  --text-sm:   0.875rem;   /* 14 */
  --text-base: 1rem;       /* 16 */
  --text-md:   1.125rem;   /* 18 */
  --text-lg:   1.25rem;    /* 20 */
  --text-xl:   1.5rem;     /* 24 */
  --text-2xl:  1.875rem;   /* 30 */
  --text-3xl:  2.25rem;    /* 36 */
  --text-4xl:  3rem;       /* 48 */
  --text-5xl:  3.75rem;    /* 60 */

  /* Line heights */
  --lh-tight: 1.2;
  --lh-snug:  1.35;
  --lh-body:  1.6;
  --lh-loose: 1.75;

  /* Spacing scale (4-8-12-16-24-32-48-64-96-128) */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.5rem;
  --space-6:  2rem;
  --space-7:  3rem;
  --space-8:  4rem;
  --space-9:  6rem;
  --space-10: 8rem;

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius:    12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Motion */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:    150ms;
  --dur:         220ms;
  --dur-slow:    320ms;

  /* Layout */
  --header-h:    56px;
  --content-w:   42rem;     /* 672px reading width */
  --content-w-lg:64ch;
  --content-w-article: 68ch;
}

@media (max-width: 480px) {
  :root {
    --header-h: 52px;
  }
}

/* Smooth theme switch (no harsh flash) - everything that uses tokens transitions */
:root, html, body {
  transition: background-color var(--dur) var(--ease-in-out),
              color           var(--dur) var(--ease-in-out);
}
@media (prefers-reduced-motion: reduce) {
  :root, html, body { transition: none; }
}

/* Body baseline - applied site-wide */
html { color-scheme: light dark; }
[data-theme="dark"] { color-scheme: dark; }
[data-theme="light"] { color-scheme: light; }

/* /builder.css */
/* Recipe builder - full styles */
:root {
  --ink: #1a1a18;
  --ink-muted: #3d3b39;
  --ink-soft: #5c5a57;
  --paper: #faf9f6;
  --paper-elevated: #ffffff;
  --accent: #b85a34;
  --accent-soft: rgba(184, 90, 52, 0.14);
  --accent-hover: #9a4a28;
  --border: #e0ddd8;
  --success: #2d6a4f;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --ink: #f0efec;
    --ink-muted: #c4c2bd;
    --ink-soft: #a8a6a1;
    --paper: #121210;
    --paper-elevated: #1c1b19;
    --accent: #e07a54;
    --accent-soft: rgba(224, 122, 84, 0.2);
    --accent-hover: #f08e68;
    --border: #3a3836;
    --success: #4ade80;
    --shadow: 0 4px 24px rgba(0,0,0,0.35);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.45);
  }
}
[data-theme="dark"] {
  --ink: #f0efec;
  --ink-muted: #c4c2bd;
  --ink-soft: #a8a6a1;
  --paper: #121210;
  --paper-elevated: #1c1b19;
  --accent: #e07a54;
  --accent-soft: rgba(224, 122, 84, 0.2);
  --accent-hover: #f08e68;
  --border: #3a3836;
  --success: #4ade80;
  --shadow: 0 4px 24px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.45);
}
[data-theme="light"] {
  --ink: #1a1a18;
  --ink-muted: #3d3b39;
  --ink-soft: #5c5a57;
  --paper: #faf9f6;
  --paper-elevated: #ffffff;
  --accent: #b85a34;
  --accent-soft: rgba(184, 90, 52, 0.14);
  --accent-hover: #9a4a28;
  --border: #e0ddd8;
  --success: #2d6a4f;
}

.skip-link { position: absolute; top: -100px; left: 1rem; z-index: 10001; padding: 0.75rem 1.25rem; background: var(--accent); color: #fff; font-weight: 600; border-radius: 8px; text-decoration: none; transition: top 0.2s ease; }
.skip-link:focus { top: 1rem; outline: 2px solid var(--accent); outline-offset: 2px; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Instrument Sans', 'Outfit', -apple-system, sans-serif; background: var(--paper); color: var(--ink); font-size: 16px; line-height: 1.5; min-height: 100vh; min-height: 100dvh; -webkit-font-smoothing: antialiased; position: relative; overflow-x: hidden; }
body::before { content: ''; position: fixed; inset: 0; background: url('/images/hero-texture.webp') center/cover; opacity: 0.04; pointer-events: none; z-index: 0; }
[data-theme="dark"] body::before { opacity: 0.06; }
[data-theme="light"] body::before { opacity: 0.04; }

.builder-app { max-width: 480px; margin: 0 auto; padding: 1.25rem 1rem 4rem; min-height: 100vh; position: relative; }
@media (max-width: 480px) { .builder-app { padding: 0.875rem 0.875rem 3rem; } }
@media (min-width: 400px) { .builder-app { padding: 1.75rem 1.25rem 4rem; } }
.builder-app .app-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; flex-wrap: wrap; gap: 0.5rem; }
@media (max-width: 480px) { .builder-app .app-header { margin-bottom: 0.875rem; } }
.builder-app .logo { font-family: 'Literata', Georgia, serif; font-size: 1.25rem; font-weight: 600; color: var(--ink-muted); margin-bottom: 0; letter-spacing: -0.02em; }
.builder-app .logo a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem; }
.builder-app .logo .logo-img { height: 1.5em; width: auto; vertical-align: middle; }
.builder-app .logo a { transition: color 0.2s ease; }
.builder-app .logo a:hover { color: var(--accent); }
.builder-header-actions { display: flex; align-items: center; gap: 0.5rem; }
.builder-lang-select select { padding: 0.4rem 0.6rem; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 0.875rem; background: var(--paper-elevated); color: var(--ink); cursor: pointer; }
.builder-lang-select select:focus { outline: none; border-color: var(--accent); }
.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; }

.progress { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; justify-content: center; flex-wrap: wrap; }
@media (max-width: 480px) { .progress { margin-bottom: 0.75rem; } }
.progress-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border); transition: all 0.3s cubic-bezier(0.4,0,0.2,1); }
.progress-dot.active { background: var(--accent); transform: scale(1.35); box-shadow: 0 0 0 2px var(--accent-soft); animation: progressPulse 2s ease-in-out infinite; }
.progress-dot.done { background: var(--success); }
@keyframes progressPulse { 0%, 100% { box-shadow: 0 0 0 2px var(--accent-soft); } 50% { box-shadow: 0 0 0 4px var(--accent-soft), 0 0 12px rgba(184,90,52,0.3); } }
[data-theme="dark"] .progress-dot.active { animation: progressPulseDark 2s ease-in-out infinite; }
@keyframes progressPulseDark { 0%, 100% { box-shadow: 0 0 0 2px var(--accent-soft); } 50% { box-shadow: 0 0 0 4px var(--accent-soft), 0 0 12px rgba(224,122,84,0.25); } }
@media (prefers-reduced-motion: reduce) { .progress-dot.active { animation: none; } }

.step { display: none; }
.step.active { display: block; animation: stepFadeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
@keyframes stepFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .step.active { animation: none; } }
.step-title { font-family: 'Literata', Georgia, serif; font-size: 1.75rem; font-weight: 600; margin: 0 0 0.5rem; letter-spacing: -0.02em; line-height: 1.25; color: var(--ink); }
@media (max-width: 480px) { .step-title { font-size: 1.4375rem; margin-bottom: 0.35rem; } }
.step-desc { color: var(--ink-muted); font-size: 0.9375rem; margin: 0 0 1.5rem; font-weight: 400; line-height: 1.6; letter-spacing: 0.01em; }
@media (max-width: 480px) { .step-desc { margin-bottom: 1rem; } }

.options { display: flex; flex-direction: column; gap: 0.65rem; }
@media (max-width: 480px) { .options { gap: 0.5rem; } }
.option { animation: optionEnter 0.35s cubic-bezier(0.22, 1, 0.36, 1) both; }
.option:nth-child(1) { animation-delay: 0.03s; }
.option:nth-child(2) { animation-delay: 0.06s; }
.option:nth-child(3) { animation-delay: 0.09s; }
.option:nth-child(4) { animation-delay: 0.12s; }
.option:nth-child(5) { animation-delay: 0.15s; }
.option:nth-child(6) { animation-delay: 0.18s; }
@keyframes optionEnter { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .option { animation: none; } }
.option { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; background: var(--paper-elevated); border: 1px solid var(--border); border-radius: 14px; cursor: pointer; transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1); text-align: left; font-family: inherit; font-size: 1rem; min-height: 72px; }
.option:hover { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
[data-theme="dark"] .option:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.2); }
.option:active { transform: scale(0.995); }
.option.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.option-small:active { transform: scale(0.97); }
.option-icon { width: 40px; height: 40px; border-radius: 10px; background: rgba(0,0,0,0.04); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; font-weight: 600; flex-shrink: 0; color: var(--ink-muted); transition: all 0.25s ease; }
[data-theme="dark"] .option-icon { background: rgba(255,255,255,0.06); }
.option-icon svg { width: 20px; height: 20px; stroke-width: 1.5; }
.option:hover .option-icon { background: var(--accent-soft); color: var(--accent); }
.option.selected .option-icon { background: var(--accent); color: white; }
.option-label { font-weight: 600; color: var(--ink); letter-spacing: 0.01em; }
.option-meta { font-size: 0.8125rem; color: var(--ink-muted); margin-top: 0.2rem; line-height: 1.4; letter-spacing: 0.01em; }

.custom-row { display: flex; gap: 0.75rem; align-items: center; margin-top: 0.875rem; flex-wrap: wrap; }
.custom-row.custom-row-stacked { flex-direction: column; align-items: stretch; gap: 0.5rem; }
.custom-row.custom-row-stacked .custom-row-inner { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.custom-row input { flex: 1; min-width: 6rem; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: 10px; font-family: inherit; font-size: 1rem; background: var(--paper-elevated); color: var(--ink); }
.custom-row input::placeholder { color: var(--ink-muted); opacity: 0.7; }
.custom-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.custom-row .unit { color: var(--ink-muted); font-size: 0.875rem; font-weight: 500; flex-shrink: 0; }
.custom-input-label { font-size: 0.75rem; font-weight: 600; color: var(--ink-muted); letter-spacing: 0.08em; text-transform: uppercase; display: block; margin-bottom: 0.25rem; }
.custom-input-helper { font-size: 0.8125rem; color: var(--ink-muted); margin-top: 0.35rem; line-height: 1.4; }
.custom-input-warning { font-size: 0.8125rem; color: var(--ink-muted); margin-top: 0.35rem; line-height: 1.4; font-style: italic; }
.custom-input-error { font-size: 0.8125rem; color: #c53030; margin-top: 0.35rem; line-height: 1.4; }
[data-theme="dark"] .custom-input-error { color: #fc8181; }
.custom-freetext-wrap { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.step-continue-wrap { margin-top: 1.25rem; }
.step-continue-wrap .btn { width: 100%; min-height: 52px; }
.custom-freetext-wrap label { font-size: 0.75rem; font-weight: 600; color: var(--ink-muted); letter-spacing: 0.08em; text-transform: uppercase; display: block; margin-bottom: 0.35rem; }
.custom-freetext-wrap input[type="text"] { width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: 10px; font-family: inherit; font-size: 1rem; background: var(--paper-elevated); color: var(--ink); max-width: 100%; }
.custom-freetext-wrap input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }

.nav-row { display: flex; gap: 0.75rem; margin-top: 2rem; align-items: stretch; }
@media (max-width: 480px) { .nav-row { margin-top: 1.25rem; gap: 0.6rem; } }
.btn { flex: 1; padding: 1rem 1.5rem; min-height: 52px; border: none; border-radius: 12px; font-family: inherit; font-size: 0.9375rem; font-weight: 600; cursor: pointer; transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1); display: flex; align-items: center; justify-content: center; gap: 0.5rem; letter-spacing: 0.02em; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary { background: var(--paper-elevated); color: var(--ink); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.option:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.recipe-card { position: relative; background: var(--paper-elevated); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-lg); margin-bottom: 1.5rem; overflow: hidden; animation: recipeReveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
@media (max-width: 480px) { .recipe-card { padding: 1.125rem; margin-bottom: 1rem; } }
@media (max-width: 400px) { .recipe-card { padding: 1rem; } }
@keyframes recipeReveal { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .recipe-card { animation: none; } }
.recipe-card::before { content: ''; position: absolute; top: -25%; right: -20%; width: 60%; height: 150%; background: url('/images/bread.jpg') center/cover; opacity: 0.06; pointer-events: none; border-radius: 50%; filter: blur(1px); }
[data-theme="dark"] .recipe-card::before { opacity: 0.05; }
.recipe-header { position: relative; z-index: 1; margin-bottom: 1.25rem; }
@media (max-width: 480px) { .recipe-header { margin-bottom: 0.875rem; } }
.recipe-title { font-family: 'Literata', Georgia, serif; font-size: 1.3125rem; font-weight: 600; margin: 0; letter-spacing: -0.02em; line-height: 1.3; }
.recipe-meta { font-size: 0.875rem; color: var(--ink-muted); margin-top: 0.35rem; line-height: 1.45; letter-spacing: 0.01em; }
.recipe-stats { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
@media (max-width: 480px) { .recipe-stats { gap: 1rem; margin-bottom: 0.875rem; padding-bottom: 0.875rem; } }
.recipe-stat { font-size: 0.8125rem; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.recipe-stat strong { color: var(--accent); font-weight: 600; }
.recipe-topping-reminder,
.recipe-boiling-reminder { font-size: 0.8125rem; color: var(--ink-muted); margin: 0 0 1rem; line-height: 1.5; }
.ingredients-list { list-style: none; padding: 0; margin: 0 0 1.25rem; }
@media (max-width: 480px) { .ingredients-list { margin-bottom: 0.875rem; } .ingredients-list li { padding: 0.4rem 0; } }
.ingredients-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.5rem 1.5rem; align-items: baseline; padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.9375rem; }
.ingredients-list li:last-child { border-bottom: none; }
.ingredient-name { color: var(--ink-muted); font-weight: 500; font-size: 0.9rem; }
.ingredient-amount { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: 0.03em; text-align: right; }
.ingredient-pct { font-size: 0.8125rem; color: var(--ink-muted); font-variant-numeric: tabular-nums; text-align: right; min-width: 3ch; }
.ingredient-note { font-size: 0.75rem; font-weight: 400; color: var(--ink-muted); }
.fermentation-disclaimer { font-size: 0.8125rem; color: var(--ink-muted); margin-top: 0.5rem; font-style: italic; }
.fermentation-note { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 0.875rem 1rem; font-size: 0.875rem; color: var(--ink); margin-top: 0.75rem; line-height: 1.55; letter-spacing: 0.01em; }
.fermentation-note strong { color: var(--accent); }
.recipe-warning { border-radius: var(--radius-sm); padding: 0.75rem 1rem; font-size: 0.875rem; color: var(--ink); margin-top: 0.75rem; background: rgba(255, 180, 0, 0.15); }
[data-theme="dark"] .recipe-warning { background: rgba(255, 180, 0, 0.2); color: var(--ink); }

/* Adjust section - collapsible */
.recipe-adjust-btn { width: 100%; margin-top: 0.75rem; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: 10px; background: var(--paper); color: var(--ink); font-family: 'Instrument Sans', inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.5rem; transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1); }
.recipe-adjust-btn:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.recipe-adjust-btn svg { flex-shrink: 0; transition: transform 0.2s ease; }
.recipe-adjust-btn.panel-open svg { transform: rotate(180deg); }
.recipe-adjust-btn:active { transform: scale(0.99); }
.recipe-adjust-panel { display: none; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.recipe-adjust-panel.visible { display: block; animation: panelReveal 0.3s ease-out; }
@keyframes panelReveal { from { opacity: 0; } to { opacity: 1; } }
.adjust-intro { font-size: 0.8125rem; color: var(--ink-muted); margin: 0 0 0.75rem; line-height: 1.55; letter-spacing: 0.01em; }
.adjust-grid { display: grid; gap: 0.75rem; }
.options-two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: stretch; }
.options-two .option { display: flex; flex-direction: column; align-items: center; text-align: center; min-height: 8rem; padding: 1.25rem 1.5rem; border-radius: 14px; gap: 0.5rem; border: 1px solid var(--border); }
@media (max-width: 480px) { .options-two { gap: 0.65rem; } .options-two .option { min-height: 7rem; padding: 1rem 1.125rem; } }
.options-two .option-icon { width: 38px; height: 38px; font-size: 0.9rem; border-radius: 10px; flex-shrink: 0; }
.options-two .option > div { min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; justify-content: center; gap: 0.15rem; }
.options-two .option-label { display: block; font-size: 0.9375rem; font-weight: 600; line-height: 1.3; overflow-wrap: normal; word-break: normal; hyphens: none; letter-spacing: -0.01em; }
.options-two .option-meta { display: block; font-size: 0.8125rem; line-height: 1.4; margin-top: 0.2rem; overflow-wrap: normal; word-break: normal; hyphens: none; font-weight: 500; color: var(--ink-muted); }
@media (max-width: 400px) { .options-two .option { min-height: 6.5rem; padding: 1.125rem 1.5rem; } }
.quick-inputs { display: flex; flex-direction: column; gap: 1.5rem; }
@media (max-width: 480px) { .quick-inputs { gap: 1rem; } }
.quick-row { display: flex; flex-direction: column; gap: 0.5rem; align-items: stretch; }
.quick-row label { font-size: 0.75rem; font-weight: 600; color: var(--ink-muted); display: block; letter-spacing: 0.08em; text-transform: uppercase; }
.quick-row .input-with-unit { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.quick-row input[type="number"] { padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: 10px; font-size: 1rem; background: var(--paper-elevated); color: var(--ink); width: 6.5rem; min-width: 5rem; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.quick-row input:hover { border-color: var(--ink-soft); }
.quick-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.quick-row .unit { color: var(--ink-muted); font-size: 0.9375rem; font-weight: 500; }
.quick-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.quick-flour-options { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.quick-flour-options .option-small { min-width: 4.5rem; }
.option-small { padding: 0.5rem 0.875rem; font-size: 0.8125rem; font-weight: 600; min-height: 40px; min-width: 48px; border-radius: 8px; border: 1px solid var(--border); transition: all 0.2s ease; letter-spacing: 0.02em; }
.option-small:not(.selected) { color: var(--ink-muted); background: var(--paper-elevated); }
.option-small.selected { color: white; background: var(--accent); border-color: var(--accent); }
.quick-submit { margin-top: 0.5rem; width: 100%; min-height: 52px; }
.quick-row .input-with-unit input[type="number"] { width: 5.5rem; }
.quick-row .quick-presets .input-with-unit input[type="number"] { width: 4.5rem; min-width: 4rem; }

.adjust-tile { background: var(--paper); border: 1px solid var(--border); border-radius: 10px; padding: 0.875rem 1rem; }
[data-theme="dark"] .adjust-tile { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.08); }
.adjust-tile-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.4rem; gap: 0.5rem; }
.adjust-tile-label { font-size: 0.8125rem; font-weight: 600; color: var(--ink-muted); letter-spacing: 0.01em; }
.adjust-tile-val { font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); }
.adjust-tile input[type="range"] { width: 100%; height: 18px; -webkit-appearance: none; appearance: none; background: transparent; margin: 0.4rem 0; padding: 0; display: block; }
.adjust-tile input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); cursor: pointer; margin-top: -6px; transition: transform 0.15s ease; }
.adjust-tile input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.adjust-tile input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--border); }
.adjust-tile input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); cursor: pointer; border: none; transition: transform 0.15s ease; }
.adjust-tile input[type="range"]::-moz-range-thumb:hover { transform: scale(1.15); }
.adjust-tile input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--border); }
.adjust-tile-result { font-size: 0.8125rem; color: var(--ink-muted); font-variant-numeric: tabular-nums; margin-top: 0.25rem; }

.explain-toggle { width: 100%; padding: 0.6rem 0; border: none; background: none; font-family: inherit; font-size: 0.875rem; color: var(--accent); font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: space-between; text-align: left; margin-top: 0.5rem; }
.explain-toggle:hover { color: var(--accent-hover); }
.explain-toggle svg { flex-shrink: 0; transition: transform 0.2s ease; }
.explain-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.explain-content { overflow: hidden; max-height: 0; transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.explain-content-inner { padding: 0.75rem 0; font-size: 0.875rem; color: var(--ink-muted); line-height: 1.6; border-top: 1px solid var(--border); min-height: 2em; letter-spacing: 0.01em; }
.recipe-actions { display: flex; gap: 0.75rem; margin-top: 1.25rem; flex-wrap: wrap; }
.recipe-action-btn { flex: 1; min-width: 120px; padding: 0.875rem 1.25rem; font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.02em; }
.recipe-flour-mix-note { font-size: 0.8125rem; color: var(--ink-muted); margin: 0.5rem 0 0; padding: 0.5rem 0.75rem; background: var(--paper-elevated); border-radius: 8px; border: 1px solid var(--border); }
.recipe-salt-quick { margin-top: 1rem; }
.salt-quick-label { font-size: 0.8125rem; font-weight: 600; color: var(--ink-muted); display: block; margin-bottom: 0.5rem; }
.salt-quick-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.salt-quick-btn { flex-direction: column; align-items: center; gap: 0.15rem; }
.salt-quick-sublabel { font-size: 0.6875rem; font-weight: 500; opacity: 0.85; display: block; }
.adjust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; margin-top: 0.5rem; }

/* Bread calculator controls: chips, kitchen temperature, loaf count, flour picker */
.builder-app [hidden], .hero [hidden] { display: none !important; }
.chip-group { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.05rem; min-height: 40px; min-width: 44px; padding: 0.4rem 0.75rem; border: 1px solid var(--border); border-radius: 999px; background: var(--paper-elevated); color: var(--ink); font-family: inherit; font-size: 0.8125rem; font-weight: 600; line-height: 1.2; cursor: pointer; transition: border-color 0.2s ease, background 0.2s ease; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.chip:focus-visible, .temp-unit-btn:focus-visible, .stepper-btn:focus-visible, .adjust-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip-group-sm { margin-top: 0.5rem; }
.chip-group-sm .chip { min-height: 32px; padding: 0.25rem 0.6rem; font-size: 0.75rem; }
.chip-temp { border-radius: 12px; flex: 1 1 0; min-width: 4rem; }
.chip-top { font-size: 0.75rem; font-weight: 500; color: var(--ink-muted); }
.chip-sub { font-variant-numeric: tabular-nums; white-space: nowrap; }
.kitchen-row { margin: 0 0 1rem; }
.kitchen-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.4rem; }
.kitchen-label, .flour-row-label, .loaf-count-label, .adjust-sub-label { font-size: 0.75rem; font-weight: 600; color: var(--ink-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.adjust-sub-label { display: block; margin: 0.5rem 0 0.25rem; letter-spacing: 0.02em; text-transform: none; font-size: 0.75rem; }
.temp-unit-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; flex: none; }
.temp-unit-btn { min-width: 44px; min-height: 32px; padding: 0.2rem 0.5rem; border: 0; background: var(--paper-elevated); color: var(--ink-muted); font-family: inherit; font-size: 0.8125rem; font-weight: 600; cursor: pointer; }
.temp-unit-btn + .temp-unit-btn { border-left: 1px solid var(--border); }
.temp-unit-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--ink); }
.loaf-count { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin: 0 0 0.875rem; padding: 0.6rem 0.875rem; border: 1px solid var(--border); border-radius: 14px; background: var(--paper-elevated); }
.stepper { display: inline-flex; align-items: center; gap: 0.25rem; }
.stepper-btn { width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 50%; background: var(--paper); color: var(--ink); font-size: 1.25rem; line-height: 1; cursor: pointer; font-family: inherit; }
.stepper-btn:hover { border-color: var(--accent); color: var(--accent); }
.stepper output { min-width: 2ch; text-align: center; font-weight: 700; font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.option-hint { font-size: 0.8125rem; font-weight: 600; color: var(--ink); margin-top: 0.2rem; font-variant-numeric: tabular-nums; min-height: 1.15em; }
.option-icon-size::before { content: ''; display: block; border: 2px solid currentColor; }
.option-icon-round20::before { width: 18px; height: 18px; border-radius: 50%; }
.option-icon-round23::before { width: 24px; height: 24px; border-radius: 50%; }
.option-icon-oval::before { width: 26px; height: 16px; border-radius: 50%; }
.option-icon-tin::before { width: 26px; height: 15px; border-radius: 3px 3px 5px 5px; border-top-width: 1px; }
.flour-row { display: flex; flex-direction: column; gap: 0.4rem; margin: 0 0 0.875rem; }
.flour-names-hint, .quick-hint { margin: 0; font-size: 0.8125rem; color: var(--ink-muted); line-height: 1.45; }
.quick-hint:empty { display: none; }
.quick-flour .flour-row { margin-bottom: 0.25rem; }
.flour-picker > .options { margin-top: 0.25rem; }
.skip-to-results-row { margin-top: 1.25rem; text-align: center; }
.skip-to-results-meta { font-size: 0.85rem; color: var(--ink-muted); margin: 0.35rem 0 0; }
.starter-prep { margin: 0.75rem 0 0; padding: 0.75rem 1rem; border: 1px dashed var(--border); border-radius: var(--radius-sm); font-size: 0.875rem; line-height: 1.55; color: var(--ink); }
.adjust-tile-wide, .adjust-tile[data-ing="batch"] { grid-column: 1 / -1; }
.adjust-tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.adjust-select { width: 100%; min-height: 44px; padding: 0.4rem 0.6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--paper-elevated); color: var(--ink); font: inherit; font-size: 0.9375rem; }
.adjust-amount .input-with-unit { display: flex; align-items: center; gap: 0.4rem; }
.adjust-amount input { width: 6rem; min-height: 44px; padding: 0.4rem 0.6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--paper-elevated); color: var(--ink); font: inherit; }
.adjust-amount input[aria-invalid="true"], .custom-row input[aria-invalid="true"], .quick-row input[aria-invalid="true"] { border-color: #c53030; }
.adjust-tile .chip-group { margin-top: 0.25rem; }
@media (min-width: 420px) { .adjust-flour { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 0.5rem; grid-auto-flow: column; grid-template-rows: auto auto; } .adjust-flour .adjust-sub-label { margin-top: 0.25rem; } }
/* Accent text on tinted tiles needs the darker accent in light mode for 4.5:1. */
.builder-app .option:not(.selected) .option-icon, .builder-app .recipe-adjust-panel .adjust-tile-val { color: var(--accent-hover); }
.builder-app .option-small.selected { color: var(--ink); background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pro-mode-schedule-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }

/* Hero: compact so CTA is above fold */
.welcome-hero { position: relative; overflow: hidden; margin: -0.5rem -1rem 1rem -1rem; height: 80px; background: var(--border); }
@media (max-width: 480px) { .welcome-hero { margin: -0.5rem -0.875rem 0.75rem -0.875rem; height: 60px; } }
@media (min-width: 400px) { .welcome-hero { margin: -0.5rem -1.25rem 1.25rem -1.25rem; height: 120px; } }
@media (min-width: 500px) { .welcome-hero { height: 160px; } }
.welcome-hero img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; display: block; }
.welcome-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, transparent 35%, var(--paper) 95%); pointer-events: none; }
.welcome-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(184,90,52,0.03) 0%, transparent 50%); pointer-events: none; z-index: 1; }
/* Step 0: CTA sticky at bottom of viewport so always visible */
#step0 .step-title { margin-bottom: 0.25rem; font-size: 1.5rem; }
@media (min-width: 380px) { #step0 .step-title { font-size: 1.75rem; } }
#step0 .step-desc { margin-bottom: 0.6rem; font-size: 0.9rem; }
@media (max-width: 480px) { #step0 .step-desc { margin-bottom: 0.5rem; font-size: 0.875rem; } }
#step0quick .step-title { margin-bottom: 0.35rem; }
#step0quick .step-desc { margin-bottom: 1.25rem; }
#step0 .nav-row { margin-top: 0.75rem; position: sticky; bottom: var(--cookie-h, 0px); z-index: 1100; background: linear-gradient(to top, var(--paper) 80%, transparent); padding: 1rem 0 0.5rem; margin-left: -0.5rem; margin-right: -0.5rem; padding-left: 0.5rem; padding-right: 0.5rem; }
#step0 .btn-primary { position: relative; }

.start-over { text-align: center; margin-top: 2rem; }
.start-over .btn { max-width: 200px; }
.back-link { display: inline-flex; align-items: center; gap: 0.35rem; margin-bottom: 1.25rem; color: var(--ink-muted); font-size: 0.875rem; font-weight: 500; text-decoration: none; cursor: pointer; background: none; border: none; font-family: inherit; transition: color 0.2s ease; padding: 0.25rem 0; letter-spacing: 0.01em; }
.back-link:hover { color: var(--accent); }
.back-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.starter-link { display: inline-block; font-size: 0.875rem; color: var(--accent); font-weight: 500; text-decoration: none; transition: color 0.2s ease; }
.starter-link:hover { color: var(--accent-hover); }
.starter-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.starter-link-inline { margin-bottom: 0; margin-top: 0.35rem; font-size: 0.8125rem; }
.starter-link-landing { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.625rem 1rem; margin-top: 1.5rem; background: transparent; border: 1px solid var(--border); border-radius: 10px; font-size: 0.875rem; font-weight: 500; color: var(--ink-muted); transition: all 0.2s ease; letter-spacing: 0.01em; }
.starter-link-landing::after { content: '→'; font-size: 0.8em; opacity: 0.8; }
.starter-link-landing:hover { border-color: var(--accent); color: var(--accent); }
.starter-link-wrap { margin-top: 1.5rem; text-align: center; }
@media (max-width: 480px) { .starter-link-wrap { margin-top: 1rem; } }
.starter-link-below { margin: 0; }
.other-calculators-wrap { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
@media (max-width: 480px) { .other-calculators-wrap { margin-top: 1.25rem; padding-top: 1rem; } }
.other-calculators-heading { font-size: 0.9rem; font-weight: 600; color: var(--ink-muted); margin: 0 0 0.75rem; letter-spacing: 0.02em; }
.options-other { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.option-other { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 0.5rem; padding: 1rem 0.875rem; background: var(--paper-elevated); border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: all 0.2s ease; text-decoration: none; font-family: inherit; min-height: 100px; }
@media (max-width: 480px) { .options-other { gap: 0.5rem; } .option-other { min-height: 72px; padding: 0.75rem 0.5rem; gap: 0.35rem; } .option-other .option-icon { width: 32px; height: 32px; font-size: 0.9rem; } .option-other .option-label { font-size: 0.8125rem; } .option-other .option-meta { font-size: 0.6875rem; } }
.option-other:hover { border-color: var(--accent); background: var(--accent-soft); }
.option-other .option-icon { width: 36px; height: 36px; border-radius: 8px; background: rgba(0,0,0,0.04); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
[data-theme="dark"] .option-other .option-icon { background: rgba(255,255,255,0.06); }
.option-other:hover .option-icon { background: var(--accent-soft); }
.option-other > div { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.15rem; }
.option-other .option-label { font-size: 0.9rem; font-weight: 600; color: var(--ink); display: block; }
.option-other .option-meta { font-size: 0.75rem; color: var(--ink-muted); line-height: 1.3; }
@media (max-width: 480px) { .options-other { grid-template-columns: 1fr; } .option-other { min-height: 80px; } }
[data-theme="dark"] .starter-link-landing { border-color: var(--border); color: var(--ink-muted); }
[data-theme="dark"] .starter-link-landing:hover { color: var(--accent); }

/* Other calculator links - recipe step (avoid blue default on dark) */
.other-calc-links { color: var(--ink-muted); font-size: 0.875rem; line-height: 1.5; margin: 1rem 0; }
.other-calc-links a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.other-calc-links a:hover { color: var(--accent-hover); }
.other-calc-links a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* Fallback: any unstyled links in builder use accent (avoids blue default on dark) */
.builder-app a:not(.starter-link):not(.starter-link-landing):not(.option-other):not(.affiliate-card):not(.other-calc-links a):not(.cookie-consent a):not(.site-footer-links a) { color: var(--accent); }
.builder-app a:not(.starter-link):not(.starter-link-landing):not(.option-other):not(.affiliate-card):not(.other-calc-links a):not(.cookie-consent a):not(.site-footer-links a):hover { color: var(--accent-hover); }

.unit-toggle-wrap { display: flex; align-items: center; }
.unit-toggle { display: flex; align-items: center; padding: 0.35rem 0.6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--paper-elevated); color: var(--ink-muted); font-size: 0.8rem; font-weight: 600; cursor: pointer; gap: 0.25rem; font-family: inherit; }
.unit-toggle:hover { border-color: var(--accent); color: var(--accent); }
.unit-toggle .unit-active { color: var(--accent); font-weight: 700; }
.unit-toggle .unit-inactive { opacity: 0.55; font-weight: 500; }
.unit-toggle .unit-divider { color: var(--ink-soft, var(--ink-muted)); opacity: 0.5; margin: 0 0.05em; font-weight: 400; user-select: none; }
.unit-toggle[data-unit="oz"] .unit-active { color: var(--ink-muted); opacity: 0.55; font-weight: 500; }
.unit-toggle[data-unit="oz"] .unit-inactive { color: var(--accent); opacity: 1; font-weight: 700; }
.theme-toggle { width: 40px; height: 40px; border: none; border-radius: 12px; background: var(--paper-elevated); color: var(--ink-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; transition: all 0.25s ease; }
.theme-toggle:hover { background: var(--accent-soft); color: var(--accent); transform: scale(1.05); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fermentation-timer-section { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.timer-section-title { font-size: 1rem; font-weight: 600; margin: 0 0 0.5rem; color: var(--ink); }
.timer-tip { font-size: 0.8125rem; color: var(--ink-muted); margin: 0 0 0.75rem; line-height: 1.5; }
.timer-temp-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.timer-temp-btn { padding: 0.5rem 1rem; border: 1px solid var(--border); border-radius: 8px; background: var(--paper-elevated); color: var(--ink-muted); font-size: 0.875rem; font-weight: 500; cursor: pointer; font-family: inherit; transition: all 0.2s ease; }
.timer-temp-btn:hover { border-color: var(--accent); color: var(--accent); }
.timer-temp-btn.selected { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.timer-display-wrap { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 0.75rem 0; }
.timer-time { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); }
.timer-controls { display: flex; gap: 0.5rem; }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.8125rem; }

/* Bake scheduler */
.bake-plan { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.bake-plan-open { width: 100%; }
.bake-plan-body { margin-top: 1rem; }
.bake-plan-title { font-size: 1.05rem; font-weight: 600; margin: 0 0 0.5rem; color: var(--ink); }
.bake-plan-title:focus { outline: none; }
.bake-plan-intro, .bake-plan-note { font-size: 0.8125rem; color: var(--ink-muted); margin: 0 0 0.75rem; line-height: 1.5; }
.bake-plan-mode { display: flex; flex-wrap: wrap; gap: 0.5rem; border: 0; padding: 0; margin: 0 0 0.75rem; }
.bake-plan-mode label { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.85rem; border: 1px solid var(--border); border-radius: var(--radius-pill); font-size: 0.875rem; cursor: pointer; color: var(--ink); }
.bake-plan-mode label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.bake-plan-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem; margin-bottom: 0.75rem; }
@media (min-width: 560px) { .bake-plan-grid { grid-template-columns: 1fr 1fr; } }
.bake-plan-field { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.8125rem; color: var(--ink-muted); }
.bake-plan-field[hidden] { display: none; }
.bake-plan-field input, .bake-plan-field select { min-height: 44px; padding: 0.5rem 0.65rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem; }
.bake-plan-check { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.875rem; color: var(--ink); margin: 0 0 0.85rem; line-height: 1.4; }
.bake-plan-check[hidden] { display: none; }
.bake-plan-check input { width: 1.15rem; height: 1.15rem; margin-top: 0.1rem; accent-color: var(--accent); flex: none; }
.bake-plan-error { padding: 0.75rem; margin-bottom: 0.75rem; border-radius: var(--radius-sm); background: var(--error-soft); color: var(--ink); font-size: 0.875rem; }
.bake-plan-error p { margin: 0 0 0.5rem; }
.bake-plan-build { width: 100%; }
.bake-plan-ready { font-weight: 600; color: var(--ink); margin: 0 0 0.75rem; }
.bake-plan-steps { list-style: none; margin: 0 0 0.75rem; padding: 0; border-left: 2px solid var(--border); }
.bp-step { position: relative; padding: 0.6rem 0 0.6rem 1rem; }
.bp-step::before { content: ""; position: absolute; left: -7px; top: 1.05rem; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); }
.bp-step.is-current::before { background: var(--accent); border-color: var(--accent); }
.bp-step.is-done::before { background: var(--success); border-color: var(--success); }
.bp-row { display: flex; align-items: flex-start; gap: 0.55rem; }
.bp-check { flex: none; width: 1.25rem; height: 1.25rem; margin: 0.1rem 0 0; accent-color: var(--accent); }
.bp-title { font-weight: 600; font-size: 0.9375rem; line-height: 1.35; color: var(--ink); cursor: pointer; }
.bp-meta { margin: 0.15rem 0 0 1.8rem; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.bp-time { color: var(--ink-muted); }
.bp-count { color: var(--accent-strong); font-weight: 600; margin-left: 0.35rem; }
.bp-count:empty { display: none; }
.bp-note { margin: 0.25rem 0 0 1.8rem; font-size: 0.8125rem; line-height: 1.5; color: var(--ink-muted); }
.bp-step.is-done .bp-title { text-decoration: line-through; color: var(--ink-muted); }
.bp-step.is-done .bp-note { display: none; }
.bp-step.is-current { background: var(--surface-tinted); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.bp-delay { margin: 0.5rem 0 0 1.8rem; }
.bake-plan-done { padding: 0.75rem; border-radius: var(--radius-sm); background: var(--success-soft); color: var(--ink); font-size: 0.875rem; }
.bake-plan-done a { color: var(--ink); font-weight: 600; }
.bake-plan-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.bake-plan-actions .btn { min-height: 44px; }
.bake-plan-resume { position: fixed; left: 0.75rem; right: 0.75rem; bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px) + var(--cookie-h, 0px)); z-index: 80; display: flex; align-items: center; gap: 0.75rem; max-width: 34rem; margin: 0 auto; padding: 0.75rem 0.75rem 0.75rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-elev); box-shadow: var(--shadow-lg); color: var(--ink); }
.bake-plan-resume[hidden] { display: none; }
.bpr-text { flex: 1; min-width: 0; font-size: 0.8125rem; line-height: 1.35; }
.bpr-text strong { display: block; font-size: 0.875rem; }
.bpr-text span { color: var(--ink-muted); }
.bpr-open { flex: none; min-height: 40px; display: inline-flex; align-items: center; text-decoration: none; }
.bpr-close { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-muted); font-size: 1.4rem; cursor: pointer; }
.bpr-close:focus-visible, .bp-check:focus-visible, .bake-plan-mode input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.affiliate-section { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.affiliate-title { font-size: 0.9rem; font-weight: 600; margin: 0 0 0.75rem; color: var(--ink-muted); }
.affiliate-cards { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.affiliate-card { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.9rem; border: 1px solid var(--border); border-radius: 10px; background: var(--paper-elevated); color: var(--ink); text-decoration: none; font-size: 0.8125rem; transition: all 0.2s ease; flex: 1; min-width: 120px; }
@media (max-width: 420px) { .affiliate-cards { flex-direction: column; } .affiliate-card { min-width: 0; flex: none; } }
.affiliate-card:hover { border-color: var(--accent); color: var(--accent); }
.affiliate-icon { font-size: 1.25rem; font-weight: 400; }
.affiliate-desc { font-weight: 500; line-height: 1.3; }
.recipe-adjust-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.explain-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Footer */
.site-footer { margin-top: 2.5rem; padding: 1.5rem 1rem; border-top: 1px solid var(--border); text-align: center; max-width: 480px; margin-left: auto; margin-right: auto; }
.site-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem 1.25rem; margin-bottom: 0.75rem; }
.site-footer-links a { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; font-size: 0.9rem; }
.site-footer-links a:hover { color: var(--accent); }
.site-footer-copyright { font-size: 0.85rem; color: var(--ink-muted); }

/* Cookie consent - above thumb bar so it's visible when shown */
.cookie-consent { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1100; background: var(--paper); border-top: 2px solid var(--accent); box-shadow: 0 -8px 24px rgba(0,0,0,0.12); padding: 1rem 1.25rem; padding-bottom: max(1rem, env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform 0.35s ease; }
.cookie-consent.visible { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .cookie-consent { transition: none; } }
body.cookie-banner-visible .builder-app { padding-bottom: 11rem; }
.cookie-consent-inner { max-width: 680px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; justify-content: space-between; }
.cookie-consent p { margin: 0; font-size: 0.9rem; color: var(--ink); flex: 1; min-width: 200px; }
.cookie-consent a { color: #8a3d1f; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.cookie-consent a:hover { color: #6b2f18; }
[data-theme="dark"] .cookie-consent a { color: #e07a54; }
[data-theme="dark"] .cookie-consent a:hover { color: #f08e68; }
.cookie-consent-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cookie-btn { min-height: 44px; min-width: 5rem; padding: 0.5rem 1.125rem; border-radius: 8px; font-weight: 600; font-size: 0.875rem; cursor: pointer; border: none; transition: background 0.2s, color 0.2s; }
.cookie-btn-accept { background: var(--accent); color: #fff; }
.cookie-btn-accept:hover { background: var(--accent-hover); }
.cookie-btn-reject { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.cookie-btn-reject:hover { background: rgba(0,0,0,0.05); }
[data-theme="dark"] .cookie-btn-reject:hover { background: rgba(255,255,255,0.08); }

/* Glossary tooltips */
.glossary-term {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  margin-left: 0.2rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--paper-elevated);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
}
.glossary-term:hover { border-color: var(--accent); background: var(--accent-soft); }
.glossary-inline { margin: 0.75rem 0 0; font-size: 0.9rem; }
body.glossary-open { overflow: hidden; }
.glossary-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0,0,0,0.45);
}
.glossary-popover {
  position: fixed;
  z-index: 1210;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 400px);
  max-height: min(80vh, 420px);
  overflow: auto;
  padding: 1.25rem 1.25rem 1rem;
  background: var(--paper-elevated);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.glossary-popover[hidden] { display: none !important; }
.glossary-popover-title { margin: 0 1.75rem 0.5rem 0; font-size: 1.1rem; font-family: inherit; color: var(--ink); }
.glossary-popover-body { margin: 0 0 1rem; font-size: 0.95rem; line-height: 1.5; color: var(--ink-muted); }
.glossary-popover-link { display: inline-block; margin-top: 0.25rem; text-decoration: none; }
.glossary-popover-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
}
.glossary-popover-close:hover { background: var(--accent-soft); color: var(--ink); }

/* /css/site-layout.css */
/* Shared layout: header, footer, base variables - used on guide pages */
:root {
    --ink: #1c1a18;
    --ink-muted: #4a4846;
    --paper: #f6f4f0;
    --accent: #b85a34;
    --accent-hover: #9a4a28;
    --border: #e8e6e2;
}
[data-theme="dark"] {
    --ink: #f8f7f4;
    --ink-muted: #c8c6c2;
    --paper: #0f0f10;
    --accent: #e07a54;
    --accent-hover: #f08e68;
    --border: #2a2a2c;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 10001;
    padding: 0.75rem 1.25rem;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; outline: 2px solid var(--accent); outline-offset: 2px; }

.floating-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 254, 249, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(139, 90, 60, 0.12);
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, opacity 0.3s ease;
}
[data-theme="dark"] .floating-header {
    background: rgba(15, 15, 16, 0.8);
    border-bottom-color: rgba(255,255,255,0.08);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.floating-header.visible { transform: translateY(0); opacity: 1; }
.floating-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    max-width: 680px;
    margin: 0 auto;
    position: relative;
    min-height: 2.75rem;
}
.floating-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.floating-logo .logo-img { height: 1.45em; width: auto; vertical-align: middle; }
.floating-logo:hover { color: var(--accent); }
.header-spacer { width: 40px; flex-shrink: 0; }
.floating-header .burger-btn { flex-shrink: 0; }
.burger-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
}
.burger-btn:hover { background: rgba(196,92,56,0.08); }
.burger-line { width: 22px; height: 2px; background: var(--ink); border-radius: 1px; transition: all 0.2s; }
.burger-btn[aria-expanded="true"] .burger-line:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.burger-btn[aria-expanded="true"] .burger-line:nth-child(2) { opacity: 0; }
.burger-btn[aria-expanded="true"] .burger-line:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.burger-menu {
    display: none;
    flex-direction: column;
    padding: 0 1rem 1rem;
    border-top: 1px solid var(--border);
    max-width: 680px;
    margin: 0 auto;
}
.burger-menu.open { display: flex; }
.burger-menu .burger-link {
    padding: 0.75rem 0;
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
}
.burger-menu .burger-link:hover { color: var(--accent); }
.burger-section-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-muted);
    margin: 0.75rem 0 0.25rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}
.burger-section-label:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }

/* Site footer */
.site-footer {
    margin-top: 2.5rem;
    padding: 1.5rem 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
}
.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    margin-bottom: 0.75rem;
}
.site-footer-links a {
    color: var(--ink);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 3px;
    font-size: 0.9rem;
}
.site-footer-links a:hover { color: var(--accent); }
.site-footer-copyright {
    font-size: 0.85rem;
    color: var(--ink-muted);
}

/* Guide article images - fit text width, 16:9 */
.guide-article-img {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  margin: 0 0 1.25rem;
  display: block;
}

/* Last-updated meta line above H1 (Task 4) */
.guide-last-updated {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.guide-last-updated time { font-weight: 600; }
.guide-last-updated .guide-byline a { color: var(--ink-muted); text-decoration-color: var(--accent); }

/* Author card (replaces boilerplate "About the Author") */
.author-card {
  display: flex;
  gap: 0.85rem;
  margin: 2rem 0 1.5rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(184,90,52,0.04);
}
.author-card-photo {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(0,0,0,0.05);
}
.author-card-body { font-size: 0.9rem; }
.author-card-byline { margin: 0 0 0.25rem; color: var(--ink-muted); font-size: 0.85rem; }
.author-card-byline strong { color: var(--ink); font-weight: 600; }
.author-card-bio { margin: 0 0 0.25rem; color: var(--ink); }
.author-card-link a { font-weight: 600; color: var(--accent); text-decoration: none; }
.author-card-link a:hover { text-decoration: underline; }

/* Sticky table of contents (Task 4) */
.guide-toc {
  display: none;
  position: sticky;
  top: 5rem;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  padding: 1rem 1.1rem;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--paper);
  font-size: 0.88rem;
}
.guide-toc-title {
  margin: 0 0 0.5rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  color: var(--ink);
}
.guide-toc-list { list-style: none; padding: 0; margin: 0; }
.guide-toc-list li { margin: 0.2rem 0; }
.guide-toc-list .toc-sub { padding-left: 1rem; font-size: 0.84rem; }
.guide-toc a {
  color: var(--ink-muted);
  text-decoration: none;
  display: block;
  padding: 0.18rem 0.35rem;
  border-radius: 4px;
  border-left: 2px solid transparent;
}
.guide-toc a:hover { color: var(--accent); }
.guide-toc a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: rgba(184,90,52,0.06);
  font-weight: 600;
}
@media (min-width: 1024px) {
  body:has(.guide-toc) main { display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem; max-width: 980px; margin: 0 auto; }
  .guide-toc { display: block; }
}

/* /assets/css/ui.css */
/*
 * sourdoughy.com — UI polish layer.
 * Loads AFTER tokens.css and any legacy CSS so it can override stale values.
 *
 * Scope: site-wide refinement of header, buttons, inputs, calculator UI,
 * article reading, dark mode, mobile. References only var(--*) from tokens.css.
 */

/* ---------- 1. base typography ---------- */

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: "ss01", "cv11", "cv02";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6, .display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  color: var(--ink);
}
h1 { font-size: var(--text-3xl); letter-spacing: -0.025em; }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); letter-spacing: -0.015em; }
@media (min-width: 720px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
}
p, li, dd { line-height: var(--lh-body); color: var(--ink); }

/* numeric weights, recipe tables, code: monospace tabular */
.mono, .nums, code, kbd, samp,
.recipe-stats .stat-value,
.ingredients-list .ing-amount,
.hero-recipe-table td,
.recipe-card .recipe-stats {
  font-family: var(--font-mono);
  font-feature-settings: "tnum", "zero";
  font-variant-numeric: tabular-nums slashed-zero;
}

/* warm artisanal background veil (subtle paper texture) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px 600px at 20% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, var(--accent-soft), transparent 60%),
    var(--bg);
  opacity: 0.55;
  pointer-events: none;
  z-index: -1;
}
[data-theme="dark"] body::before { opacity: 0.45; }

/* ---------- 2. focus ring ---------- */

:where(button, [role="button"], input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--focus-halo);
}
:where(a):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ---------- 3. unified floating header ---------- */

.floating-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--glass-bg);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter:         saturate(160%) blur(18px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease-out),
              background var(--dur) var(--ease-in-out),
              border-color var(--dur) var(--ease-in-out);
}
.floating-header.is-scrolled { box-shadow: var(--shadow-md); }
.floating-header.visible { transform: translateY(0); opacity: 1; }
.floating-header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-3);
  height: var(--header-h);
  padding: 0 var(--space-4);
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}
.floating-header-left,
.floating-header-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.floating-header-right { justify-content: flex-end; }

.floating-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-md);
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  letter-spacing: -0.015em;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  transition: color var(--dur) var(--ease-out);
}
.floating-logo .logo-img { height: 22px; width: 22px; vertical-align: middle; border-radius: 6px; }
.floating-logo:hover { color: var(--accent); }

/* Replace old absolute centring */
.floating-header .header-spacer { display: none; }

/* Header action controls: unit toggle, lang, theme */
.hdr-control,
.hdr-control select,
.hdr-control button {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--ink);
}
.hdr-control { display: inline-flex; align-items: center; gap: var(--space-1); }
.hdr-control select,
.hdr-control .hdr-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  cursor: pointer;
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out);
}
.hdr-control select:hover,
.hdr-control .hdr-btn:hover {
  background: var(--accent-soft);
  border-color: var(--border-strong);
}
.hdr-control .hdr-btn[aria-pressed="true"],
.hdr-control .hdr-btn.active { color: var(--accent); border-color: var(--accent); }

/* g/oz segmented unit toggle (bread builder uses .unit-toggle id, others their own) */
.unit-toggle {
  display: inline-flex;
  background: var(--bg-veil);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-muted);
  height: 32px;
  align-items: center;
  gap: 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
}
.unit-toggle .unit-active,
.unit-toggle .unit-inactive {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  transition: color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}
.unit-toggle[data-unit="g"] .unit-active   { background: var(--accent); color: var(--ink-inverse); }
.unit-toggle[data-unit="g"] .unit-inactive { color: var(--ink-soft); }
.unit-toggle[data-unit="oz"] .unit-inactive{ background: var(--accent); color: var(--ink-inverse); }
.unit-toggle[data-unit="oz"] .unit-active  { color: var(--ink-soft); }

/* Theme toggle — animated sun ↔ moon */
.theme-toggle {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              transform var(--dur) var(--ease-out);
}
.theme-toggle:hover { background: var(--accent-soft); border-color: var(--border-strong); }
.theme-toggle:active { transform: scale(0.94); }

/* Burger button (matches the round visual idiom) */
.burger-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: transparent;
  cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
  padding: 0;
  transition: background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.burger-btn:hover { background: var(--accent-soft); border-color: var(--border-strong); }
.burger-line { width: 16px; height: 1.6px; background: var(--ink); border-radius: 1px; transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out); }
.burger-btn[aria-expanded="true"] .burger-line:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.burger-btn[aria-expanded="true"] .burger-line:nth-child(2) { opacity: 0; }
.burger-btn[aria-expanded="true"] .burger-line:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* Burger menu drawer */
.burger-menu {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: var(--space-4) var(--space-4) var(--space-5);
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  z-index: 999;
  /* multi-column on desktop */
}
.burger-menu.open { display: grid; gap: var(--space-3) var(--space-5); grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .burger-menu.open { grid-template-columns: repeat(3, 1fr); }
}
.burger-section-label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin: var(--space-2) 0 var(--space-1);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border);
}
.burger-section-label:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }
.burger-menu .burger-link {
  display: block;
  padding: 10px 8px;
  margin: 0 -8px;
  color: var(--ink);
  font-weight: 500;
  font-size: var(--text-sm);
  text-decoration: none;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  transition: background var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}
.burger-menu .burger-link:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-left-color: var(--accent);
}

/* When header is rendered, push content down so it isn't clipped */
body.has-floating-header { padding-top: var(--header-h); }

/* Anchor targets get scroll-margin so they aren't hidden behind sticky header */
:target { scroll-margin-top: calc(var(--header-h) + 16px); }
h1[id], h2[id], h3[id], h4[id], section[id], article[id], aside[id],
#main, #wizardStart, #recipeCard {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* ---------- 4. skip link ---------- */

.skip-link {
  position: fixed;
  top: -100px; left: var(--space-4);
  z-index: 10001;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--ink-inverse);
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: var(--radius-sm);
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  transition: top var(--dur) var(--ease-out);
}
.skip-link:focus { top: calc(var(--header-h) + 6px); }

/* ---------- 5. buttons ---------- */

.btn,
button.btn,
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 18px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out),
              background var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out);
  user-select: none;
  -webkit-user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: var(--ink-inverse);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: var(--shadow-md); }
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.btn-link, .btn-tertiary {
  background: transparent;
  color: var(--accent);
  padding: 6px 8px;
  min-height: 36px;
  text-decoration: none;
  border: none;
  font-weight: 600;
}
.btn-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.btn-sm { padding: 6px 12px; min-height: 32px; font-size: var(--text-xs); }

/* ---------- 6. forms & inputs ---------- */

input[type="text"],
input[type="number"],
input[type="email"],
input[type="search"],
textarea,
select {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 10px 14px;
  min-height: 44px;
  transition: border-color var(--dur) var(--ease-out),
              box-shadow    var(--dur) var(--ease-out),
              background    var(--dur) var(--ease-in-out);
}
input[type="number"] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus-halo);
}
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%;
  height: 6px;
  background: linear-gradient(to right, var(--accent) 0%, var(--accent) var(--val,50%), var(--border-strong) var(--val,50%), var(--border-strong) 100%);
  border: none;
  border-radius: 999px;
  outline: none;
  padding: 0;
  min-height: auto;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-sm), 0 0 0 0 var(--focus-halo);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.08); }
input[type="range"]:active::-webkit-slider-thumb,
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: var(--shadow-md), 0 0 0 6px var(--focus-halo); }

/* select chevron */
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239c968e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

/* ---------- 7. recipe / calculator output card ---------- */

.recipe-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-5) var(--space-5);
  margin-top: var(--space-4);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.recipe-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-strong) 100%);
}
.recipe-card .recipe-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  margin: 0 0 var(--space-1);
}
.recipe-card .recipe-meta {
  color: var(--ink-muted);
  font-size: var(--text-sm);
  margin: 0 0 var(--space-4);
}
.recipe-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
.ingredients-list { list-style: none; padding: 0; margin: 0 0 var(--space-4); border-top: 1px solid var(--border); }
.ingredients-list li {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--text-base);
}
.ingredients-list .ing-name { color: var(--ink); }
.ingredients-list .ing-amount {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.recipe-actions {
  display: flex; flex-wrap: wrap; gap: var(--space-2);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

/* ---------- 8. options (wizard cards) — refine without breaking layout ---------- */

.option {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--dur) var(--ease-out),
              background  var(--dur) var(--ease-out),
              box-shadow  var(--dur) var(--ease-out),
              transform   var(--dur-fast) var(--ease-out);
}
.option:hover { border-color: var(--accent); background: var(--accent-soft); box-shadow: var(--shadow-sm); }
.option.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.option-icon { color: var(--accent); }

/* Glossary popover refinements */
.glossary-popover {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  color: var(--ink);
}

/* ---------- 9. hero (homepage) ---------- */

.hero {
  padding: var(--space-7) var(--space-4) var(--space-6);
  max-width: 1100px;
  margin: 0 auto;
}
.hero-inner {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 880px) {
  .hero { padding: var(--space-8) var(--space-5) var(--space-7); }
  .hero-inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--space-7); }
}
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, var(--text-4xl));
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 var(--space-3);
  color: var(--ink);
}
.hero-sub {
  font-size: var(--text-md);
  color: var(--ink-muted);
  max-width: 36ch;
  margin: 0 0 var(--space-3);
}
.hero-explainer {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  max-width: 48ch;
  margin: 0 0 var(--space-5);
  line-height: var(--lh-loose);
}
.hero-cta-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.hero-cta {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  border: 1px solid transparent;
  transition: all var(--dur) var(--ease-out);
}
.hero-cta-primary { background: var(--accent); color: var(--ink-inverse); box-shadow: var(--shadow-md); }
.hero-cta-primary:hover { background: var(--accent-hover); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.hero-cta-link { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.hero-cta-link:hover { color: var(--accent); border-color: var(--accent); }

.hero-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
}
.hero-preview-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 0 0 var(--space-4);
  color: var(--ink);
}
.hero-preview-grid {
  display: grid; gap: var(--space-3);
  grid-template-columns: 1fr 1fr;
  margin-bottom: var(--space-3);
}
@media (max-width: 480px) { .hero-preview-grid { grid-template-columns: 1fr; } }
.hero-slider { display: flex; flex-direction: column; gap: 6px; }
.hero-slider-label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero-slider-label output {
  color: var(--accent);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.hero-recipe-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-3);
}
.hero-recipe-table th,
.hero-recipe-table td {
  padding: 10px 0;
  border-top: 1px solid var(--border);
  font-size: var(--text-sm);
  text-align: left;
}
.hero-recipe-table td {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--ink);
}
.hero-recipe-table th { color: var(--ink-muted); font-weight: 500; }
.hero-recipe-table tr:first-child th, .hero-recipe-table tr:first-child td { border-top: none; }
.hero-preview-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  font-size: var(--text-sm);
  font-weight: 600;
}
.hero-preview-deep { color: var(--accent); text-decoration: none; }
.hero-preview-deep:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero-preview-share { color: var(--ink-muted); text-decoration: none; }
.hero-preview-share:hover { color: var(--accent); }

/* Pro Mode panel */
.pro-mode-panel {
  margin: var(--space-6) auto 0;
  max-width: 1100px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
}
.pro-mode-title { font-family: var(--font-display); font-size: var(--text-2xl); margin: 0 0 var(--space-1); }
.pro-mode-sub { color: var(--ink-muted); margin: 0 0 var(--space-4); font-size: var(--text-sm); }
.pro-mode-form fieldset {
  border: none;
  padding: 0;
  margin: 0 0 var(--space-4);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-3);
}
.pro-mode-form legend {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: var(--space-2);
  grid-column: 1 / -1;
}
.pro-mode-form label { display: flex; flex-direction: column; gap: 4px; }
.pro-mode-form label > span { font-size: var(--text-xs); color: var(--ink-muted); font-weight: 500; }

/* ---------- 10. site footer ---------- */

.site-footer {
  margin-top: var(--space-7);
  padding: var(--space-6) var(--space-4);
  border-top: 1px solid var(--border);
  text-align: center;
  background: transparent;
}
.site-footer-links {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: var(--space-3) var(--space-5);
  margin-bottom: var(--space-3);
}
.site-footer-links a {
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
}
.site-footer-links a::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}
.site-footer-links a:hover { color: var(--accent); }
.site-footer-links a:hover::after { transform: scaleX(1); }
.site-footer-copyright { color: var(--ink-muted); font-size: var(--text-sm); }

/* ---------- 11. article reading view ---------- */

.guide-article, .guide-content, article.article-content {
  max-width: var(--content-w-article);
  margin: 0 auto;
  padding: var(--space-5) var(--space-4) var(--space-7);
  font-size: 1.0625rem;
  line-height: var(--lh-loose);
  color: var(--ink);
}
.guide-article h1, .guide-content h1, article.article-content h1 {
  font-size: clamp(1.875rem, 3.5vw, var(--text-4xl));
  margin: 0 0 var(--space-3);
  letter-spacing: -0.025em;
}
.guide-article h2, .guide-content h2, article.article-content h2 {
  margin-top: var(--space-7);
  margin-bottom: var(--space-3);
  border-top: 1px solid var(--border);
  padding-top: var(--space-5);
}
.guide-article h3, .guide-content h3, article.article-content h3 {
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
}
.guide-article p, .guide-content p, article.article-content p { margin: 0 0 var(--space-4); }

/* drop cap on first paragraph */
.guide-article > p:first-of-type::first-letter,
.guide-content > p:first-of-type::first-letter,
article.article-content > p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 3.6em;
  line-height: 0.85;
  float: left;
  padding: 6px 10px 0 0;
  color: var(--accent);
}

.guide-article blockquote, .guide-content blockquote, article.article-content blockquote {
  margin: var(--space-5) 0;
  padding: var(--space-2) var(--space-4);
  border-left: 3px solid var(--accent);
  background: var(--surface-tinted);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-style: italic;
  color: var(--ink);
}

/* recipe / schedule monospace blocks */
.guide-article pre, .guide-content pre, article.article-content pre,
.recipe-block, .schedule-block {
  background: var(--surface-tinted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  overflow-x: auto;
  line-height: var(--lh-snug);
  margin: var(--space-4) 0;
}

.guide-last-updated {
  margin: 0 0 var(--space-4);
  font-size: var(--text-sm);
  color: var(--ink-muted);
  font-family: var(--font-body);
}
.guide-last-updated time { font-weight: 600; color: var(--ink); }
.guide-last-updated .guide-byline a { color: var(--ink-muted); text-decoration: none; border-bottom: 1px solid var(--border-strong); }
.guide-last-updated .guide-byline a:hover { color: var(--accent); border-color: var(--accent); }

.author-card {
  display: flex;
  gap: var(--space-3);
  margin: var(--space-6) 0;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.author-card-photo {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--accent-soft);
}
.author-card-byline { margin: 0 0 6px; font-size: var(--text-sm); color: var(--ink-muted); }
.author-card-byline strong { color: var(--ink); font-weight: 600; }
.author-card-bio { margin: 0 0 6px; color: var(--ink); font-size: var(--text-sm); }
.author-card-link a { color: var(--accent); font-weight: 600; text-decoration: none; }
.author-card-link a:hover { text-decoration: underline; text-underline-offset: 4px; }

.guide-table-wrap { overflow-x: auto; margin: var(--space-4) 0; -webkit-overflow-scrolling: touch; }
.guide-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); min-width: 520px; }
.guide-table th, .guide-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.guide-table thead th { color: var(--ink); font-weight: 600; border-bottom-width: 2px; }
.guide-table tbody th { white-space: nowrap; color: var(--ink); font-weight: 600; }
.guide-table td { color: var(--ink); }
/* Phones: one card per row, each cell labelled with its column header
   (data-label, added in includes/article-render.php). */
@media (max-width: 480px) {
  .guide-table { min-width: 0; }
  .guide-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .guide-table, .guide-table tbody, .guide-table tr, .guide-table th, .guide-table td { display: block; width: 100%; }
  .guide-table tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .guide-table th, .guide-table td { border-bottom: 0; padding: 3px 0; }
  .guide-table tbody th { white-space: normal; }
  .guide-table [data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--ink-muted); }
}

.author-profile { display: flex; gap: var(--space-4); align-items: flex-start; margin-bottom: var(--space-5); }
.author-profile h1 { margin-top: 0; }
.author-profile-photo {
  width: 160px; height: 160px; flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  background: var(--border);
}
@media (max-width: 560px) {
  .author-profile { flex-direction: column; align-items: center; text-align: center; }
  .author-profile-photo { width: 120px; height: 120px; }
}

/* sticky table of contents */
.guide-toc {
  display: none;
  position: sticky;
  top: calc(var(--header-h) + 16px);
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: var(--text-sm);
  align-self: start;
}
.guide-toc-title {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 600;
  margin: 0 0 var(--space-2);
  color: var(--ink);
}
.guide-toc-list { list-style: none; padding: 0; margin: 0; }
.guide-toc-list li { margin: 2px 0; }
.guide-toc-list .toc-sub { padding-left: var(--space-3); font-size: var(--text-xs); }
.guide-toc a {
  display: block;
  padding: 6px 8px;
  border-radius: var(--radius-xs);
  border-left: 2px solid transparent;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color var(--dur) var(--ease-out),
              background var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}
.guide-toc a:hover { color: var(--accent); }
.guide-toc a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}
@media (min-width: 1024px) {
  body:has(.guide-toc) main,
  body.has-toc main {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: var(--space-6);
    max-width: 1080px;
    margin: 0 auto;
    padding-top: var(--space-4);
  }
  .guide-toc { display: block; }
}

/* ---------- 12. cookie banner refinement ---------- */

.cookie-consent {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  color: var(--ink);
  font-family: var(--font-body);
}
.cookie-consent-inner { padding: var(--space-4); }
.cookie-btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: var(--radius);
  padding: 10px 16px;
}
.cookie-btn-accept { background: var(--accent); color: var(--ink-inverse); border: 1px solid var(--accent); }
.cookie-btn-accept:hover { background: var(--accent-hover); }
.cookie-btn-reject { background: transparent; color: var(--ink); border: 1px solid var(--border-strong); }
.cookie-btn-reject:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* ---------- 13. accessibility & motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 14. dark mode finishing touches ---------- */

[data-theme="dark"] .recipe-card { box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(245,241,234,0.04); }
[data-theme="dark"] .hero-preview { box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(245,241,234,0.04); }
[data-theme="dark"] .floating-header { box-shadow: var(--shadow-sm), inset 0 -1px 0 rgba(245,241,234,0.04); }
[data-theme="dark"] .author-card { box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(245,241,234,0.04); }
[data-theme="dark"] body::before { opacity: 0.35; }

/* welcome-hero (homepage wizard image) — dim slightly in dark */
[data-theme="dark"] .welcome-hero img { filter: brightness(0.92) contrast(1.04); }

/* ensure recipe stats card surfaces look good */
.recipe-stats > div { background: var(--surface-tinted); border-radius: var(--radius-sm); padding: 12px; border: 1px solid var(--border); }
.recipe-stats .stat-label { font-size: var(--text-xs); color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.recipe-stats .stat-value { font-family: var(--font-mono); font-size: var(--text-md); font-weight: 600; color: var(--ink); margin-top: 4px; display: block; }

/* keep custom adjust panel polished */
.recipe-adjust-panel .adjust-tile { background: var(--surface-tinted); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.recipe-adjust-panel .adjust-tile-val { font-family: var(--font-mono); color: var(--accent); font-weight: 500; }

/* affiliate cards */
.affiliate-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-2); }
.affiliate-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: var(--space-3);
  background: var(--surface-tinted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  font-size: var(--text-xs);
  transition: all var(--dur) var(--ease-out);
}
.affiliate-card:hover { transform: translateY(-1px); border-color: var(--accent); box-shadow: var(--shadow-sm); color: var(--ink); }
.affiliate-icon { font-size: 1.6rem; }
.affiliate-desc { color: var(--ink-muted); }
.affiliate-card:hover .affiliate-desc { color: var(--ink); }

/* ---------- 15. scroll polish ---------- */
@media (min-width: 720px) {
  ::-webkit-scrollbar { width: 12px; height: 12px; }
  ::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; border: 3px solid var(--bg); }
  ::-webkit-scrollbar-thumb:hover { background: var(--accent); }
}

/* ---------- 16. mobile burger drawer override ---------- */
@media (max-width: 720px) {
  .burger-menu.open {
    grid-template-columns: 1fr;
    max-height: calc(100vh - var(--header-h));
    padding-bottom: var(--space-7);
  }
}

/* ---------- 17. homepage path-picker (replaces old wizard welcome) ---------- */
.step-pathpicker {
  padding-top: var(--space-3);
}
.step-title-compact {
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  font-size: clamp(1.125rem, 2.2vw, 1.375rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-2);
  color: var(--ink);
  line-height: 1.3;
}
.step-pathpicker .step-desc {
  font-size: var(--text-sm, 0.9375rem);
  color: var(--ink-muted);
  margin-bottom: var(--space-4);
}
.step-pathpicker .options-two .option {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 12px);
  padding: var(--space-4) var(--space-4);
  transition: border-color 0.18s var(--ease-out, ease), transform 0.18s var(--ease-out, ease), box-shadow 0.18s var(--ease-out, ease);
}
.step-pathpicker .options-two .option:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
}

/* ---------- 18. homepage "Other dough calculators" section ---------- */
.other-calculators-section {
  max-width: var(--content-w, 1080px);
  margin: var(--space-7, 56px) auto var(--space-5, 32px);
  padding: var(--space-6) clamp(16px, 4vw, 32px);
  border-top: 1px solid var(--border);
}
.other-calculators-heading-h2 {
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  font-size: clamp(1.25rem, 2.6vw, 1.625rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-align: center;
  margin: 0 0 var(--space-5);
}
.other-calculators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-3, 16px);
}
.other-calc-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2, 8px);
  padding: var(--space-4) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 16px);
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
  transition: transform 0.18s var(--ease-out, ease), border-color 0.18s var(--ease-out, ease), box-shadow 0.18s var(--ease-out, ease);
  min-height: 140px;
}
.other-calc-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md, 0 6px 18px -8px rgba(0,0,0,0.18));
  color: var(--ink);
}
.other-calc-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.other-calc-icon {
  font-size: 1.75rem;
  line-height: 1;
}
.other-calc-name {
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.other-calc-meta {
  font-size: var(--text-sm, 0.9rem);
  color: var(--ink-muted);
  line-height: 1.45;
}
[data-theme="dark"] .other-calc-card {
  background: var(--surface);
  box-shadow: none;
  border-color: var(--border);
}
[data-theme="dark"] .other-calc-card:hover {
  background: var(--surface-elev, var(--surface));
}

/* ---------- 19. unit-toggle divider polish ---------- */
.unit-toggle { gap: 0.05rem; }

/* ---------------------------------------------------------------------
   Calculator page heading.

   The pizza, focaccia and bagel pages drop straight into the step wizard,
   so they use this compact head instead of the full hero the bread
   calculator gets. Before this existed those three pages had no h1 at all
   and their first heading was an h2 from the wizard.

   Width matches .builder-app (760px) so the heading lines up with the
   wizard card beneath it.
   --------------------------------------------------------------------- */
.calc-head {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--space-5) var(--space-4) 0;
  text-align: center;
}
.calc-head h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-2);
  color: var(--ink);
}
.calc-head p {
  font-size: var(--text-md);
  line-height: var(--lh-loose);
  color: var(--ink-muted);
  margin: 0 auto;
  max-width: 34rem;
}
@media (max-width: 640px) {
  .calc-head { padding: var(--space-4) var(--space-4) 0; text-align: left; }
  .calc-head p { font-size: 1rem; }
}
/* Long compounds in these locales overflow the compact heading. */
html[lang="de"] .calc-head h1,
html[lang="ru"] .calc-head h1,
html[lang="bg"] .calc-head h1,
html[lang="ro"] .calc-head h1 { font-size: clamp(1.5rem, 2.9vw, 2.125rem); }

/* Guides hub */
.guides-jump { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-5); }
article.guide-wrap .guides-jump a { padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; font-size: var(--text-sm); text-decoration: none; color: var(--ink); }
article.guide-wrap .guides-jump a:hover { border-color: var(--accent); color: var(--accent); }
.guides-cat { scroll-margin-top: 88px; }
.guide-cards { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
@media (min-width: 640px) { .guide-cards { grid-template-columns: 1fr 1fr; } }
article.guide-wrap .guide-card a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); background: var(--paper); text-decoration: none; color: var(--ink); transition: border-color var(--dur) var(--ease-out); }
article.guide-wrap .guide-card a:hover, article.guide-wrap .guide-card a:focus-visible { border-color: var(--accent); }
.guide-card-title { font-family: var(--font-display); font-weight: 600; font-size: var(--text-md); }
article.guide-wrap .guide-card-desc { font-size: var(--text-sm); line-height: 1.5; color: var(--ink-muted); font-weight: 400; }

/* /assets/css/v3-cro.css */
/* ===========================================================================
 * sourdoughy.com — v3 CRO stylesheet
 * Loaded LAST. Adds the new unified header, mobile-first above-the-fold,
 * pro-mode toggle, wizard fork, "How it works" collapsible, premium
 * sliders + buttons, and dark-mode polish.
 *
 * Philosophy: mobile-first. Every block opens with a base mobile rule,
 * then layers on @media (min-width: 768px) for desktop refinements.
 * ========================================================================= */

/* ----- 0. Token fallbacks (in case tokens.css ever fails to load) -------- */
:root {
  --hdr-h-mobile: 56px;
  --hdr-h-desktop: 64px;
}

/* Override the legacy floating-header height variables so spacing stays
   consistent with the new header. */
:root.has-floating-header,
body.has-floating-header {
  --header-h: var(--hdr-h-mobile);
}
@media (min-width: 768px) {
  :root.has-floating-header,
  body.has-floating-header {
    --header-h: var(--hdr-h-desktop);
  }
}

/* ----- 1. Hide the legacy v1/v2 floating-header AND the bridge select --- */
/* The new header lives at #siteHdr. Anything emitted with id="floatingHeader"
   from old templates is hidden. */
header.floating-header { display: none !important; }

/* The compatibility selects (id="builderLang", id="pizzaBuilderLang", ...)
   stay in the DOM for JS but never render. */
#builderLang.sr-only,
#pizzaBuilderLang.sr-only,
#focacciaBuilderLang.sr-only,
#bagelBuilderLang.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

/* In case some page rendered a unit toggle outside our edits, hide it. */
.unit-toggle-wrap, .unit-toggle, .hdr-control.unit-toggle-wrap { display: none !important; }


/* ===========================================================================
 * 2. The new unified header (#siteHdr)
 * ========================================================================= */

.hdr {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--hdr-h-mobile);
  background: color-mix(in srgb, var(--surface, #fff) 90%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border, rgba(0,0,0,0.06));
  transition: box-shadow 200ms ease, border-color 200ms ease;
}
.hdr.is-scrolled {
  box-shadow: 0 1px 0 var(--border, rgba(0,0,0,0.06)), 0 8px 24px -16px rgba(0,0,0,0.18);
}
@media (min-width: 768px) {
  .hdr { height: var(--hdr-h-desktop); }
}

/* push body content below the fixed header */
body.has-floating-header { padding-top: var(--hdr-h-mobile); }
@media (min-width: 768px) {
  body.has-floating-header { padding-top: var(--hdr-h-desktop); }
}

.hdr-inner {
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
@media (min-width: 768px) {
  .hdr-inner { padding: 0 24px; gap: 16px; }
}

/* ----- 2a. Brand (logo + wordmark) ----- */
.hdr-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink, #1a1714);
  height: 44px;
  padding: 0 4px;
  border-radius: 8px;
  flex-shrink: 0;
  transition: opacity 160ms ease;
}
.hdr-brand:hover { opacity: 0.82; }
.hdr-logo { width: 22px; height: 22px; display: block; border-radius: 4px; }
@media (min-width: 768px) {
  .hdr-logo { width: 24px; height: 24px; }
}
.hdr-wordmark {
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1;
}
@media (min-width: 768px) {
  .hdr-wordmark { font-size: 20px; }
}

/* ----- 2b. Desktop horizontal nav (hidden on mobile) ----- */
.hdr-nav-desktop { display: none; }
@media (min-width: 900px) {
  .hdr-nav-desktop {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 auto 0 24px;
    flex: 1;
  }
  .hdr-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 14px;
    border-radius: 8px;
    color: var(--ink, #1a1714);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 160ms ease, background 160ms ease;
  }
  .hdr-link::after {
    content: '';
    position: absolute;
    left: 14px; right: 14px; bottom: 6px;
    height: 1.5px;
    background: var(--accent, #c8801f);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
  }
  .hdr-link:hover { color: var(--accent, #c8801f); }
  .hdr-link:hover::after { transform: scaleX(1); }
  .hdr-link:focus-visible {
    outline: 2px solid var(--accent, #c8801f);
    outline-offset: 2px;
  }
}

/* ----- 2c. Right-side actions ----- */
.hdr-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
@media (min-width: 768px) { .hdr-actions { gap: 6px; } }

/* Language pill */
.hdr-lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  min-width: 44px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: 999px;
  background: transparent;
  color: var(--ink, #1a1714);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 80ms ease;
}
.hdr-lang-pill:hover { background: var(--accent-soft, rgba(200,128,31,0.08)); border-color: var(--border-strong, rgba(0,0,0,0.14)); }
.hdr-lang-pill:active { transform: scale(0.97); }
.hdr-lang-pill .hdr-code { line-height: 1; }
.hdr-lang-pill .hdr-caret {
  margin-left: 1px;
  opacity: 0.55;
  transition: transform 200ms ease;
}
.hdr-lang-pill[aria-expanded="true"] .hdr-caret { transform: rotate(180deg); }
@media (min-width: 768px) {
  .hdr-lang-pill { height: 40px; padding: 0 10px 0 12px; font-size: 14px; }
}

/* Theme toggle */
.hdr-theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink, #1a1714);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 80ms ease;
}
.hdr-theme:hover { background: var(--accent-soft, rgba(200,128,31,0.08)); color: var(--accent, #c8801f); }
.hdr-theme:active { transform: scale(0.94); }
@media (min-width: 768px) { .hdr-theme { width: 40px; height: 40px; } }
.hdr-icon { display: block; transition: opacity 200ms ease, transform 200ms ease; }
.hdr-icon-sun  { display: none; }
.hdr-icon-moon { display: block; }
[data-theme="dark"] .hdr-icon-sun  { display: block; }
[data-theme="dark"] .hdr-icon-moon { display: none; }

/* Burger button */
.hdr-burger {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: background 160ms ease, transform 80ms ease;
}
.hdr-burger:hover { background: var(--accent-soft, rgba(200,128,31,0.08)); }
.hdr-burger:active { transform: scale(0.94); }
@media (min-width: 768px) { .hdr-burger { width: 40px; height: 40px; } }
.hdr-burger-line {
  display: block;
  width: 18px; height: 1.6px;
  background: var(--ink, #1a1714);
  border-radius: 1px;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), opacity 160ms ease;
}
.hdr-burger[aria-expanded="true"] .hdr-burger-line:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
.hdr-burger[aria-expanded="true"] .hdr-burger-line:nth-child(2) { opacity: 0; }
.hdr-burger[aria-expanded="true"] .hdr-burger-line:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

/* Focus rings on header buttons */
.hdr-lang-pill:focus-visible,
.hdr-theme:focus-visible,
.hdr-burger:focus-visible {
  outline: 2px solid var(--accent, #c8801f);
  outline-offset: 2px;
}

/* ----- 2d. Lang panel (popover/sheet) ----- */
.hdr-lang-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 8px;
  min-width: 220px;
  max-height: calc(100dvh - var(--hdr-h-mobile) - var(--cookie-h, 0px) - 32px);
  overflow-y: auto;
  padding: 6px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: 14px;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.18), 0 4px 12px -4px rgba(0,0,0,0.10);
  animation: hdrFadeIn 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
@media (min-width: 768px) {
  .hdr-lang-panel { right: 16px; }
}
@keyframes hdrFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hdr-lang-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink, #1a1714);
  font-size: 14.5px;
  line-height: 1.2;
  min-height: 44px;
  transition: background 140ms ease;
}
.hdr-lang-row .hdr-lang-name { font-weight: 500; }
.hdr-lang-row .hdr-lang-code {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-soft, #9c968e);
  text-transform: uppercase;
}
.hdr-lang-row:hover { background: var(--accent-soft, rgba(200,128,31,0.08)); }
.hdr-lang-row.is-current { background: var(--accent-soft, rgba(200,128,31,0.10)); color: var(--accent-strong, #b06d18); }
.hdr-lang-row:focus-visible { outline: 2px solid var(--accent, #c8801f); outline-offset: 2px; }

/* ----- 2e. Mobile burger drawer (sheet from right) ----- */
.hdr-drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(360px, 88vw);
  height: 100vh;
  height: 100dvh;
  background: var(--surface, #fff);
  border-left: 1px solid var(--border, rgba(0,0,0,0.06));
  transform: translateX(100%);
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 110;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}
.hdr-drawer.is-open { transform: translateX(0); }
.hdr-drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 105;
  background: rgba(0, 0, 0, 0);
  transition: background 260ms ease;
}
.hdr-drawer-scrim.is-open { background: rgba(0, 0, 0, 0.32); }
[data-theme="dark"] .hdr-drawer-scrim.is-open { background: rgba(0, 0, 0, 0.55); }

body.drawer-open { overflow: hidden; }

.hdr-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border, rgba(0,0,0,0.06));
  min-height: var(--hdr-h-mobile);
}
.hdr-drawer-title {
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink, #1a1714);
}
.hdr-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-muted, #6b6660);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}
.hdr-drawer-close:hover { background: var(--accent-soft, rgba(200,128,31,0.08)); color: var(--accent, #c8801f); }
.hdr-drawer-close:focus-visible { outline: 2px solid var(--accent, #c8801f); outline-offset: 2px; }

.hdr-drawer-nav { padding: 12px 8px 32px; flex: 1; }
.hdr-drawer-section { margin-bottom: 24px; }
.hdr-drawer-h {
  /* Was an <h3>; now a <span>, so the block display has to be explicit. */
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft, #9c968e);
  margin: 0 0 6px;
  padding: 0 12px;
}
.hdr-drawer-link {
  display: block;
  padding: 12px;
  border-radius: 10px;
  color: var(--ink, #1a1714);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  min-height: 44px;
  transition: background 140ms ease, color 140ms ease;
}
.hdr-drawer-link:hover { background: var(--accent-soft, rgba(200,128,31,0.08)); color: var(--accent, #c8801f); }
.hdr-drawer-link:focus-visible { outline: 2px solid var(--accent, #c8801f); outline-offset: -2px; }

/* Hide drawer entirely on wide screens — desktop nav is visible */
@media (min-width: 900px) {
  .hdr-burger { display: none; }
  .hdr-drawer, .hdr-drawer-scrim { display: none !important; }
}


/* ===========================================================================
 * 3. Hero v2 — mobile-first ATF rework
 *    The legacy hero (.hero) is kept but heavily restyled.
 * ========================================================================= */

.hero {
  max-width: 720px;
  margin: 16px auto 24px;
  padding: 0 16px;
  position: relative;
}
@media (min-width: 768px) {
  .hero { margin: 32px auto 40px; padding: 0 24px; max-width: 760px; }
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (min-width: 768px) {
  .hero-inner { gap: 24px; }
}

.hero-copy {
  text-align: left;
  max-width: 680px;
}

.hero-headline {
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  font-size: clamp(28px, 7vw, 44px);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.08;
  color: var(--ink, #1a1714);
  margin: 0 0 8px;
}
@media (min-width: 768px) {
  .hero-headline { font-size: clamp(36px, 4.6vw, 56px); margin-bottom: 12px; }
}

.hero-sub {
  font-size: 15px;
  color: var(--ink-muted, #6b6660);
  margin: 0;
  line-height: 1.5;
  font-weight: 400;
}
@media (min-width: 768px) {
  .hero-sub { font-size: 17px; }
}

/* The 3-paragraph baker's-percent explainer is moved into the
   How-it-works collapsible. Hide its legacy copy here. */
.hero-explainer { display: none !important; }

/* Live recipe preview — the engagement hook */
.hero-preview {
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(0,0,0,0.06));
  border-radius: 16px;
  padding: 18px 16px 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 16px -10px rgba(0,0,0,0.10);
}
@media (min-width: 768px) {
  .hero-preview { padding: 24px; border-radius: 20px; }
}
[data-theme="dark"] .hero-preview {
  background: var(--surface, #1e1b16);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 1px 2px rgba(0,0,0,0.4);
}

.hero-preview-title {
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft, #9c968e);
  margin: 0 0 10px;
}

/* Slider grid: 2 sliders on mobile (total + hyd), 4 on desktop */
.hero-preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
@media (min-width: 560px) {
  .hero-preview-grid { grid-template-columns: 1fr 1fr; gap: 16px 20px; }
}

.hero-slider {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hero-slider-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-muted, #6b6660);
  font-weight: 500;
}
.hero-slider-label output {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent, #c8801f);
}

/* Premium custom range slider */
.hero-slider input[type="range"],
.adjust-tile input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 32px;
  background: transparent;
  margin: 0;
  padding: 0;
  cursor: pointer;
  display: block;
}
.hero-slider input[type="range"]::-webkit-slider-runnable-track,
.adjust-tile input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--accent, #c8801f) 0%, var(--accent, #c8801f) var(--val, 50%), var(--border-strong, rgba(0,0,0,0.10)) var(--val, 50%), var(--border-strong, rgba(0,0,0,0.10)) 100%);
}
.hero-slider input[type="range"]::-moz-range-track,
.adjust-tile input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--border-strong, rgba(0,0,0,0.10));
}
.hero-slider input[type="range"]::-moz-range-progress,
.adjust-tile input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--accent, #c8801f);
}
.hero-slider input[type="range"]::-webkit-slider-thumb,
.adjust-tile input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px; height: 26px;
  margin-top: -10px;
  background: var(--surface, #fff);
  border: 1.5px solid var(--accent, #c8801f);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  cursor: grab;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.hero-slider input[type="range"]::-moz-range-thumb,
.adjust-tile input[type="range"]::-moz-range-thumb {
  width: 26px; height: 26px;
  background: var(--surface, #fff);
  border: 1.5px solid var(--accent, #c8801f);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  cursor: grab;
}
.hero-slider input[type="range"]:active::-webkit-slider-thumb,
.adjust-tile input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.08); cursor: grabbing; }
.hero-slider input[type="range"]:focus-visible,
.adjust-tile input[type="range"]:focus-visible {
  outline: none;
}
.hero-slider input[type="range"]:focus-visible::-webkit-slider-thumb,
.adjust-tile input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px var(--accent-soft, rgba(200,128,31,0.20)), 0 2px 6px rgba(0,0,0,0.12);
}
.hero-slider input[type="range"]:focus-visible::-moz-range-thumb,
.adjust-tile input[type="range"]:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 4px var(--accent-soft, rgba(200,128,31,0.20)), 0 2px 6px rgba(0,0,0,0.12);
}

/* Recipe table — premium typography */
.hero-recipe-table {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 14px;
}
.hero-recipe-table tr { border-top: 1px solid var(--border, rgba(0,0,0,0.06)); }
.hero-recipe-table tr:first-child { border-top: none; }
.hero-recipe-table th {
  text-align: left;
  padding: 11px 0;
  font-weight: 500;
  font-size: 14px;
  color: var(--ink, #1a1714);
}
.hero-recipe-table td {
  text-align: right;
  padding: 11px 0;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink, #1a1714);
  transition: color 200ms ease;
}
.hero-recipe-table td.is-flash { color: var(--accent, #c8801f); }
.hero-recipe-table td span { transition: color 200ms ease; }

/* Above-the-fold CTAs */
.hero-cta-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-top: 10px;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 50px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--accent, #c8801f);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 4px 12px -6px rgba(200,128,31,0.40);
  transition: background 160ms ease, transform 80ms ease, box-shadow 160ms ease;
}
.hero-cta:hover { background: var(--accent-strong, #b06d18); transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0,0,0,0.06), 0 6px 18px -6px rgba(200,128,31,0.50); }
.hero-cta:active { transform: translateY(0); }
.hero-cta:focus-visible { outline: 2px solid var(--accent, #c8801f); outline-offset: 3px; }
.hero-cta-link {
  background: transparent;
  color: var(--ink-muted, #6b6660);
  border: 1px solid var(--border, rgba(0,0,0,0.06));
  box-shadow: none;
  font-weight: 500;
  height: 44px;
}
.hero-cta-link:hover { background: var(--accent-soft, rgba(200,128,31,0.08)); color: var(--accent, #c8801f); border-color: var(--border-strong, rgba(0,0,0,0.10)); transform: none; box-shadow: none; }

/* Hero-preview footer (deep link + share) — hidden by default in v3,
   the primary CTA in .hero-cta-row is sufficient for ATF. The deep
   link still exists for keyboard nav. */
.hero-preview-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  margin-top: 4px;
}
.hero-preview-foot a {
  color: var(--ink-muted, #6b6660);
  text-decoration: none;
  font-weight: 500;
}
.hero-preview-foot a:hover { color: var(--accent, #c8801f); text-decoration: underline; }
.hero-preview-foot .hero-preview-deep { display: none; }
@media (min-width: 768px) { .hero-preview-foot .hero-preview-deep { display: inline-flex; } }

/* Pro mode panel — hidden by default, slides into view */
.pro-mode-panel {
  margin-top: 16px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(0,0,0,0.06));
  border-radius: 16px;
  padding: 18px 16px;
  display: none;
}
.pro-mode-panel:not([hidden]) { display: block; animation: proSlide 280ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes proSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
[data-theme="dark"] .pro-mode-panel {
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset;
}
.pro-mode-title {
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--ink, #1a1714);
}
.pro-mode-sub { font-size: 13px; color: var(--ink-muted, #6b6660); margin: 0 0 14px; }

.pro-mode-form {
  display: grid;
  gap: 14px;
}
.pro-mode-form fieldset {
  border: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}
.pro-mode-form legend {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft, #9c968e);
  margin-bottom: 4px;
}
.pro-mode-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--ink-muted, #6b6660);
}
.pro-mode-form input[type="number"] {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border, rgba(0,0,0,0.10));
  border-radius: 8px;
  background: var(--bg, #fbfaf7);
  color: var(--ink, #1a1714);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: border-color 160ms ease, background 160ms ease;
}
.pro-mode-form input[type="number"]:focus {
  outline: none;
  border-color: var(--accent, #c8801f);
  background: var(--surface, #fff);
  box-shadow: 0 0 0 3px var(--accent-soft, rgba(200,128,31,0.18));
}

.pro-mode-output {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  border-top: 1px solid var(--border, rgba(0,0,0,0.06));
}
.pro-mode-output tr { border-bottom: 1px solid var(--border, rgba(0,0,0,0.06)); }
.pro-mode-output th { text-align: left; padding: 10px 0; font-size: 13px; font-weight: 500; color: var(--ink-muted, #6b6660); }
.pro-mode-output td { text-align: right; padding: 10px 0; font-family: var(--font-mono, 'JetBrains Mono', monospace); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }

.pro-mode-exit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  background: none;
  border: none;
  color: var(--accent, #c8801f);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 4px;
}
.pro-mode-exit:hover { text-decoration: underline; }


/* ===========================================================================
 * 4. Wizard fork (step 1: I-know vs Help-me)
 * ========================================================================= */
.wizard-fork {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}
.wizard-fork-card {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: 14px;
  background: var(--surface, #fff);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink, #1a1714);
  transition: border-color 160ms ease, transform 100ms ease, box-shadow 160ms ease;
  width: 100%;
  min-height: 80px;
}
.wizard-fork-card:hover { border-color: var(--accent, #c8801f); transform: translateY(-1px); box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 6px 16px -8px rgba(200,128,31,0.20); }
.wizard-fork-card:focus-visible { outline: 2px solid var(--accent, #c8801f); outline-offset: 2px; }
.wizard-fork-icon {
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft, rgba(200,128,31,0.10));
  color: var(--accent, #c8801f);
  border-radius: 10px;
  font-size: 22px;
}
.wizard-fork-label {
  display: block;
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.wizard-fork-meta { display: block; font-size: 13.5px; color: var(--ink-muted, #6b6660); line-height: 1.4; }


/* ===========================================================================
 * 5. Starter pointer (contextual link inside wizard)
 * ========================================================================= */
.starter-pointer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 10px 14px;
  background: var(--accent-soft, rgba(200,128,31,0.08));
  color: var(--accent-strong, #b06d18);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 160ms ease;
}
.starter-pointer:hover { background: var(--accent-soft, rgba(200,128,31,0.16)); text-decoration: underline; }


/* ===========================================================================
 * 6. "Other dough calculators" row — now 4 cards including starter guide
 * ========================================================================= */
.other-calculators-section {
  max-width: 1080px;
  margin: 48px auto 32px;
  padding: 16px clamp(16px, 4vw, 32px) 0;
  border-top: 1px solid var(--border, rgba(0,0,0,0.06));
}
.other-calculators-heading-h2 {
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  font-size: clamp(20px, 3.4vw, 26px);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
  margin: 24px 0 20px;
  color: var(--ink, #1a1714);
}
.other-calculators-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 720px) {
  .other-calculators-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
}
.other-calc-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 14px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(0,0,0,0.06));
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink, #1a1714);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  min-height: 132px;
}
.other-calc-card:hover { border-color: var(--accent, #c8801f); transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0,0,0,0.05), 0 8px 24px -8px rgba(200,128,31,0.20); }
.other-calc-card.is-guide {
  background: transparent;
  border-style: dashed;
  border-color: var(--border-strong, rgba(0,0,0,0.12));
  box-shadow: none;
}
.other-calc-card.is-guide:hover { border-color: var(--accent, #c8801f); border-style: solid; background: var(--accent-soft, rgba(200,128,31,0.06)); }
.other-calc-icon { font-size: 22px; line-height: 1; }
.other-calc-name { font-family: var(--font-display, 'Fraunces', Georgia, serif); font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.other-calc-meta { font-size: 13px; color: var(--ink-muted, #6b6660); line-height: 1.4; }
[data-theme="dark"] .other-calc-card { box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset; }


/* ===========================================================================
 * 7. "How it works" collapsible explainer
 * ========================================================================= */
.how-it-works {
  max-width: 760px;
  margin: 32px auto;
  padding: 0 16px;
}
.how-it-works details {
  border: 1px solid var(--border, rgba(0,0,0,0.06));
  border-radius: 14px;
  background: var(--surface, #fff);
  overflow: hidden;
}
.how-it-works summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink, #1a1714);
  transition: background 140ms ease;
  min-height: 56px;
}
.how-it-works summary::-webkit-details-marker { display: none; }
.how-it-works summary::after {
  content: '';
  display: inline-block;
  width: 10px; height: 10px;
  border-right: 1.6px solid var(--ink-muted, #6b6660);
  border-bottom: 1.6px solid var(--ink-muted, #6b6660);
  transform: rotate(45deg);
  transition: transform 200ms ease;
}
.how-it-works details[open] summary::after { transform: rotate(-135deg); }
.how-it-works summary:hover { background: var(--accent-soft, rgba(200,128,31,0.06)); }
.how-it-works .hiw-body { padding: 0 18px 18px; color: var(--ink, #1a1714); font-size: 15px; line-height: 1.7; }
.how-it-works .hiw-body p { margin: 0 0 12px; }
.how-it-works .hiw-body p:last-child { margin-bottom: 0; }


/* ===========================================================================
 * 8. Path-picker (legacy "Or step through together" wizard step) —
 *    we still render the slim path picker as the wizard's step 0 inside
 *    builder.php; the v3 hero CTAs are the primary entry points.
 * ========================================================================= */

/* The wizard's step 0 visually merges with the rest of the wizard. */
.step-pathpicker { padding-top: 8px; }
.step-pathpicker .step-title-compact {
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: var(--ink, #1a1714);
  line-height: 1.3;
}
.step-pathpicker .step-desc { font-size: 14px; color: var(--ink-muted, #6b6660); margin-bottom: 14px; }
.step-pathpicker .options-two { display: grid; gap: 10px; }
@media (min-width: 560px) { .step-pathpicker .options-two { grid-template-columns: 1fr 1fr; gap: 12px; } }


/* ===========================================================================
 * 9. Recently-baked widget polish (kept hidden until populated)
 * ========================================================================= */
.recently-baked {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--border, rgba(0,0,0,0.06));
  border-radius: 14px;
  background: var(--surface, #fff);
}
.recently-baked-title { font-family: var(--font-display, 'Fraunces', Georgia, serif); font-size: 16px; font-weight: 600; margin: 0 0 8px; }
.recently-baked-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.recently-baked-foot { margin: 10px 0 0; font-size: 13px; }


/* ===========================================================================
 * 10. Cookie banner restyle — bottom sheet on mobile
 * ========================================================================= */
.cookie-consent {
  position: fixed !important;
  left: 12px !important;
  right: 12px !important;
  bottom: 12px !important;
  top: auto !important;
  z-index: 90 !important;
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.18);
  display: none;
}
.cookie-consent.visible { display: block; animation: cookieSlideIn 280ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes cookieSlideIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.cookie-consent-inner { display: grid; gap: 12px; }
.cookie-consent p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink, #1a1714); }
.cookie-consent a { color: var(--accent, #c8801f); }
.cookie-consent-btns { display: flex; gap: 8px; justify-content: flex-end; }
.cookie-btn { padding: 8px 14px; border-radius: 10px; font-family: inherit; font-size: 13px; font-weight: 600; border: 1px solid var(--border, rgba(0,0,0,0.08)); background: transparent; color: var(--ink, #1a1714); cursor: pointer; min-height: 36px; }
.cookie-btn-accept { background: var(--accent, #c8801f); color: #fff; border-color: var(--accent, #c8801f); }
.cookie-btn:hover { background: var(--accent-soft, rgba(200,128,31,0.10)); }
.cookie-btn-accept:hover { background: var(--accent-strong, #b06d18); border-color: var(--accent-strong, #b06d18); }


/* ===========================================================================
 * 11. Smooth theme-transition for color tokens on switch
 * ========================================================================= */
:root, body {
  transition: background-color 220ms ease, color 220ms ease;
}
@media (prefers-reduced-motion: reduce) {
  :root, body, .hdr-drawer, .hdr-drawer-scrim, .pro-mode-panel,
  .hero-cta, .hero-recipe-table td span, .other-calc-card,
  .wizard-fork-card { transition: none !important; animation: none !important; }
}


/* ---------- 12. bagel water-bath guidance card ---------- */
.bagel-water-bath-tip {
  margin: 18px 0;
  padding: 14px 16px;
  background: var(--accent-soft, rgba(200,128,31,0.06));
  border: 1px solid var(--accent-soft, rgba(200,128,31,0.20));
  border-radius: 12px;
}
.bagel-water-bath-tip .water-bath-title {
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--accent-strong, #b06d18);
}
.bagel-water-bath-tip .water-bath-text {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--ink, #1a1714);
  line-height: 1.5;
}
.bagel-water-bath-tip .water-bath-hint {
  margin: 0;
  color: var(--ink-muted, #6b6660);
}

/* /assets/css/v4-mobile.css */
/* ============================================================================
 * sourdoughy.com — v4 mobile density layer
 *
 * Applies LAST (after v3-cro.css). Targets the specific density / alignment
 * problems on 375–414 px viewports. Desktop styles are preserved by media
 * queries; mobile rules are unscoped (mobile-first).
 *
 * Spacing scale (mobile, used throughout):
 *   --gap-xs:  8px   --gap-sm: 12px   --gap-md: 16px   --gap-lg: 24px
 *   --gap-xl:  32px  --gap-2xl: 48px
 *
 * The legacy /assets/css/hero.css <link> is REMOVED from index.php — its
 * rules conflict with v3-cro.css and produced visible amber tints / extra
 * paddings inside the live recipe preview card on mobile.
 * ========================================================================== */

:root {
  --gap-xs:  8px;
  --gap-sm: 12px;
  --gap-md: 16px;
  --gap-lg: 24px;
  --gap-xl: 32px;
  --gap-2xl: 48px;
  --m-page-x: 16px;     /* mobile horizontal page padding */
  --m-card-pad: 20px;   /* mobile card internal padding */
}


/* ===========================================================================
 * 1. KILL LEGACY HERO.CSS REMNANTS (in case it's still cached)
 * ========================================================================= */

/* hero.css used .hero-preview { background: rgba(184,90,52,0.05) } and
   padding: 1.25rem — neutralise both at high specificity so cached visitors
   see the v3 surface immediately. */
section.hero .hero-preview {
  background: var(--surface) !important;
}


/* ===========================================================================
 * 2. HERO BLOCK — tight, edge-to-edge on mobile
 * ========================================================================= */

.hero {
  /* Mobile-first: card area = viewport - 32px (16px each side). */
  max-width: none;
  margin: var(--gap-md) auto var(--gap-lg);
  padding: 0 var(--m-page-x);
}
@media (min-width: 768px) {
  .hero {
    max-width: 760px;
    margin: var(--gap-xl) auto var(--gap-2xl);
    padding: 0 24px;
  }
}

.hero-inner {
  /* Stack copy → preview → CTA with a single rhythm value.
     align-items: stretch is critical: ui.css sets `align-items: start`
     which leaves preview/copy at their natural content width (~451px)
     instead of filling the hero column. */
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: var(--gap-md);            /* 16px */
}
@media (min-width: 768px) {
  .hero-inner { gap: var(--gap-lg); }   /* 24px */
}

/* Belt-and-braces: every direct child of .hero-inner spans the full
   column width regardless of legacy max-width / inline-block leftovers. */
.hero-inner > .hero-copy,
.hero-inner > .hero-preview,
.hero-inner > .hero-cta-row,
.hero-inner > .pro-mode-toggle-row,
.hero-inner > .pro-mode-panel {
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: var(--gap-xs);            /* headline → subhead = 8px */
}

.hero-headline {
  /* Spec: 28-32px on 375px, line-height 1.15, max 2 lines. */
  font-size: clamp(28px, 7.6vw, 32px);
  line-height: 1.12;
  letter-spacing: -0.022em;
  margin: 0;
}
@media (min-width: 768px) {
  .hero-headline {
    font-size: clamp(36px, 4.6vw, 52px);
    line-height: 1.08;
  }
}

.hero-sub {
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-muted, #6b6660);
  margin: 0;
}
@media (min-width: 768px) {
  .hero-sub { font-size: 17px; }
}


/* ===========================================================================
 * 3. LIVE PREVIEW CARD — single padding source, table goes 100%
 * ========================================================================= */

.hero-preview {
  /* Override v3-cro and ui.css. ONE padding source, ONE radius. */
  padding: var(--m-card-pad) !important;       /* 20px all sides */
  border-radius: 14px;
  margin: 0;                                   /* hero handles outer spacing */
  background: var(--surface);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  /* Reset any min-width / max-width leakage from desktop rules. */
  min-width: 0;
  max-width: none;
  width: auto;
  display: block;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 16px -10px rgba(0,0,0,0.10);
}
@media (min-width: 768px) {
  .hero-preview { padding: 24px !important; border-radius: 16px; }
}

.hero-preview-title {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft, var(--ink-muted));
  margin: 0 0 var(--gap-sm);
}

.hero-preview-grid {
  /* On mobile: stack the two visible sliders, tight gap. */
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-md);                /* 16px between sliders */
  margin: 0 0 var(--gap-md);
}
@media (min-width: 560px) {
  .hero-preview-grid { grid-template-columns: 1fr 1fr; gap: 16px 20px; }
}

.hero-slider { gap: 6px; }            /* label → track */
.hero-slider-label {
  font-size: 13px;
  text-transform: none;               /* override ui.css uppercase */
  letter-spacing: 0;
  color: var(--ink-muted);
  font-weight: 500;
}
.hero-slider-label output {
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--accent);
}


/* ----- Result table: 100 % of card content area, edge-to-edge labels ----- */

.hero-recipe-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;                           /* hero-preview-grid + table sit flush */
  table-layout: auto;
}
.hero-recipe-table tr {
  border-top: 1px solid var(--border, rgba(0,0,0,0.06));
}
.hero-recipe-table tr:first-child { border-top: none; }

.hero-recipe-table th,
.hero-recipe-table td {
  padding: 14px 0;
  border: 0;
  border-top: 1px solid var(--border, rgba(0,0,0,0.06));
  font-size: 15px;
  line-height: 1.2;
}
.hero-recipe-table tr:first-child th,
.hero-recipe-table tr:first-child td { border-top: 0; }

.hero-recipe-table th {
  text-align: left;
  font-weight: 500;
  color: var(--ink-muted, #6b6660);
  text-transform: none;
  letter-spacing: 0;
}
.hero-recipe-table td {
  text-align: right;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 17px;
  color: var(--ink, #1a1714);
  white-space: nowrap;
}
.hero-recipe-table td span { transition: color 200ms ease; }
.hero-recipe-table td.is-flash { color: var(--accent); }


/* ----- Hero preview footer: simpler on mobile (just the share link) ----- */

.hero-preview-foot {
  margin: var(--gap-md) 0 0;
  padding: 0;
  border-top: 0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
}
.hero-preview-foot .hero-preview-deep { display: none; }
@media (min-width: 768px) {
  .hero-preview-foot {
    justify-content: space-between;
    border-top: 1px solid var(--border, rgba(0,0,0,0.06));
    padding-top: 12px;
  }
  .hero-preview-foot .hero-preview-deep { display: inline-flex; }
}


/* ===========================================================================
 * 4. CTA ROW — full-width primary, tight rhythm
 * ========================================================================= */

.hero-cta-row {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);                   /* 12px between primary and pro link */
  margin: 0;
}
.hero-cta {
  width: 100%;
  min-height: 48px;
  height: 48px;
  padding: 0 20px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border-radius: 12px;
}
.hero-cta-link {
  height: 36px;
  min-height: 36px;
  font-size: 14px;
  font-weight: 500;
  background: transparent !important;
  border: 0 !important;
  color: var(--ink-muted) !important;
  box-shadow: none !important;
}
.hero-cta-link[aria-pressed="true"] {
  color: var(--accent) !important;
  font-weight: 600;
}


/* ===========================================================================
 * 5. PRO MODE PANEL — when shown, match card width / rhythm
 * ========================================================================= */

.pro-mode-panel {
  margin: var(--gap-md) 0 0;
  padding: var(--m-card-pad);
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.pro-mode-form { gap: var(--gap-sm); }
.pro-mode-form fieldset {
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-sm);
}
.pro-mode-form label { gap: 4px; font-size: 12px; }
.pro-mode-form input[type="number"] {
  height: 44px;
  font-size: 15px;
}


/* ===========================================================================
 * 6. WIZARD — same outer spacing as hero, no double constraint
 * ========================================================================= */

.builder-app {
  /* builder.css clamps to 480 px which leaves dead space on 414 px Pro Max.
     Lift the cap to 760 px so the wizard mirrors the hero card's width. */
  max-width: 760px !important;
  padding: var(--gap-md) var(--m-page-x) var(--gap-2xl) !important;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .builder-app {
    max-width: 760px !important;
    padding: var(--gap-lg) 24px var(--gap-2xl) !important;
  }
}

#wizardStart {
  display: block;
  scroll-margin-top: calc(var(--hdr-h-mobile, 56px) + 8px);
}

.step-pathpicker { padding: 0; }
.step-pathpicker .step-title-compact { margin-bottom: 6px; font-size: 18px; }
.step-pathpicker .step-desc { margin-bottom: var(--gap-sm); }

.wizard-fork { gap: 10px; margin: 0; }
.wizard-fork-card {
  padding: 16px;
  min-height: 76px;
  gap: 14px;
}
.wizard-fork-label { font-size: 16px; }
.wizard-fork-meta  { font-size: 13px; }


/* ===========================================================================
 * 7. SECTIONS — uniform gap between major mobile blocks
 * ========================================================================= */

.other-calculators-section {
  margin: var(--gap-2xl) auto var(--gap-xl);
  padding: 0 var(--m-page-x);
  border-top: 0;                                  /* drop the divider */
}
.other-calculators-heading-h2 {
  font-size: 22px;
  margin: 0 0 var(--gap-md);
  text-align: left;
}
@media (min-width: 768px) {
  .other-calculators-heading-h2 { text-align: center; font-size: 26px; }
}
.other-calculators-grid {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (min-width: 720px) {
  .other-calculators-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
}
.other-calc-card {
  padding: 14px 14px 16px;
  min-height: 116px;
  border-radius: 12px;
  gap: 4px;
}
.other-calc-icon { font-size: 24px; line-height: 1; margin-bottom: 4px; }
.other-calc-name { font-size: 15px; }
.other-calc-meta { font-size: 12.5px; }

.how-it-works {
  margin: 0 auto var(--gap-2xl);
  padding: 0 var(--m-page-x);
}
.how-it-works summary {
  padding: 14px 16px;
  font-size: 16px;
  min-height: 52px;
}
.how-it-works .hiw-body { padding: 0 16px 16px; font-size: 15px; line-height: 1.6; }


/* ===========================================================================
 * 8. RECENTLY BAKED — match outer spacing
 * ========================================================================= */

.recently-baked {
  margin: var(--gap-md) 0 0;
  padding: 14px 16px;
}


/* ===========================================================================
 * 9. CALCULATOR PAGES (pizza/focaccia/bagel) — tighten step rhythm
 *    (these use the .builder-app shell + .step cards from builder.css)
 * ========================================================================= */

.builder-app .step {
  padding: 0;
  margin: 0;
}
.builder-app .step-title {
  font-size: 22px;
  line-height: 1.25;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
@media (min-width: 768px) {
  .builder-app .step-title { font-size: 26px; }
}
.builder-app .step-desc {
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 var(--gap-md);
}

.builder-app .options { gap: 10px; }
.builder-app .option {
  min-height: 64px;
  padding: 14px 16px;
  border-radius: 12px;
}

/* "Other dough calculators" + "How it works" rendered after each calc page */
main#main > .other-calculators-section { margin-top: var(--gap-2xl); }
main#main > .how-it-works               { margin-top: 0; }


/* ===========================================================================
 * 10. RECIPE CARD on calculator results pages — reduce huge desktop padding
 * ========================================================================= */

.builder-app .recipe-card {
  padding: var(--m-card-pad) !important;
  border-radius: 14px;
}
.builder-app .recipe-stats { gap: 10px; margin-bottom: var(--gap-md); }
.builder-app .ingredients-list { margin: 0; padding: 0; }
.builder-app .ingredients-list li {
  padding: 12px 0;
  font-size: 15px;
  border-top: 1px solid var(--border);
}
.builder-app .ingredients-list li:first-child { border-top: 0; }


/* ===========================================================================
 * 11. AFFILIATE / "What you'll need" row — 2 col mobile, 4 col desktop
 * ========================================================================= */

.affiliate-cards {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (min-width: 720px) {
  .affiliate-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
}
.affiliate-card {
  padding: 14px;
  border-radius: 12px;
  min-height: 88px;
}


/* ===========================================================================
 * 12. LANGUAGE-SPECIFIC: longer headlines need a smaller font on mobile
 *    (German, Russian, Bulgarian, Romanian)
 * ========================================================================= */

@media (max-width: 480px) {
  html[lang="de"] .hero-headline,
  html[lang="ru"] .hero-headline,
  html[lang="bg"] .hero-headline,
  html[lang="ro"] .hero-headline { font-size: 26px; line-height: 1.15; }
}


/* ===========================================================================
 * 13. KILL EMPTY-SPACE ARTIFACTS LEFT BY OLD DESKTOP RULES
 * ========================================================================= */

/* Removed wrappers may still be in markup — collapse their spacing. */
.welcome-hero,
.starter-link-wrap.starter-link-landing,
.other-calculators-wrap { display: none !important; }

/* Old `.app-header` wrappers from pre-v3 calculator UIs — neutralise. */
.builder-app .app-header { display: none !important; }

/* The legacy hero.css may inject .pro-mode-panel{margin: 2rem auto 0; max-width: 1080px;}
   — reset to mobile-friendly defaults. */
.pro-mode-panel { max-width: none !important; }


/* ===========================================================================
 * 14. CARD UNIFORMITY — anything inside main shouldn't escape the page padding
 * ========================================================================= */

main#main > section,
main#main > .builder-app {
  box-sizing: border-box;
}

main#main img { max-width: 100%; height: auto; }


/* ===========================================================================
 * 15. DARK-MODE PARITY — borders need to be visible against surface
 * ========================================================================= */

[data-theme="dark"] .hero-preview,
[data-theme="dark"] .pro-mode-panel,
[data-theme="dark"] .other-calc-card,
[data-theme="dark"] .how-it-works details,
[data-theme="dark"] .wizard-fork-card,
[data-theme="dark"] .recently-baked {
  border-color: var(--border-strong, rgba(255,255,255,0.12));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
[data-theme="dark"] .hero-recipe-table tr,
[data-theme="dark"] .hero-recipe-table th,
[data-theme="dark"] .hero-recipe-table td {
  border-top-color: rgba(255,255,255,0.08);
}


/* ===========================================================================
 * 16. RESPECT prefers-reduced-motion
 * ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-recipe-table td span,
  .hero-cta,
  .other-calc-card,
  .wizard-fork-card { transition: none !important; }
}


/* ===========================================================================
 * 17. WIDTH / DENSITY PASS — full-width primary actions on mobile,
 *     consistent rhythm in tables, no orphaned wrap rows.
 *
 *     Loaded LAST so these rules win over builder.css / ui.css / v3-cro.css.
 *     Below 600px: stack action buttons vertically (iOS-style primary CTA).
 *     >= 600px:    return to inline rows.
 * ========================================================================= */

/* ----- 17a. Recipe action row (Save / Share / Export PDF) on step 7.
       The previous flex:1 + min-width:120 produced an asymmetric 2-1 wrap
       on every phone width, leaving the third button on a row of its own. */
.builder-app .recipe-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: var(--gap-md);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--border, rgba(0,0,0,0.06));
  flex-wrap: nowrap;
}
.builder-app .recipe-action-btn {
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 16px;
  font-size: 15px;
  border-radius: 12px;
}
@media (min-width: 600px) {
  .builder-app .recipe-actions { flex-direction: row; gap: 12px; }
  .builder-app .recipe-action-btn { flex: 1 1 0; }
}


/* ----- 17b. Custom row in wizard steps (Continue + number input).
       Stack the input on row 1 and the button full-width on row 2 so the
       Continue CTA never gets squeezed beside its number field. */
.builder-app .custom-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 12px;
  width: 100%;
}
.builder-app .custom-row > input[type="number"] {
  flex: 1 1 calc(100% - 40px);
  min-width: 0;
  width: auto;
  height: 48px;
  padding: 0 14px;
  font-size: 16px;        /* prevents iOS zoom on focus */
}
.builder-app .custom-row > .unit {
  flex: 0 0 auto;
  font-size: 14px;
  color: var(--ink-muted);
}
.builder-app .custom-row .btn {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  min-height: 48px;
}
@media (min-width: 600px) {
  .builder-app .custom-row > input[type="number"] {
    flex: 0 1 8rem;
  }
  .builder-app .custom-row .btn {
    flex: 1 1 auto;
    width: auto;
  }
}


/* ----- 17c. Quick-path form (step 0 quick).
       Left-rail label + right-rail control on phones; Continue full-width.
       Avoids the cramped wrap that happened when the unit + chips + custom
       number input all fought for space. */
.builder-app .quick-inputs { gap: var(--gap-md); }

.builder-app .quick-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}
.builder-app .quick-row > label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.builder-app .quick-row .input-with-unit {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.builder-app .quick-row .input-with-unit > input[type="number"] {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  font-size: 16px;
  border-radius: 10px;
}
.builder-app .quick-row .input-with-unit > .unit {
  flex: 0 0 auto;
  font-size: 14px;
  color: var(--ink-muted);
}

/* Flour preset row + hydration / salt preset row both wrap pills cleanly. */
.builder-app .quick-flour-options,
.builder-app .quick-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.builder-app .quick-flour-options .option-small,
.builder-app .quick-presets .option-small {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 13px;
}
.builder-app .quick-flour-options .option-small {
  flex-basis: calc(50% - 4px);     /* 2-up grid on phones */
}
@media (min-width: 420px) {
  .builder-app .quick-flour-options .option-small { flex-basis: calc(33.333% - 6px); }
}
@media (min-width: 600px) {
  .builder-app .quick-flour-options .option-small,
  .builder-app .quick-presets .option-small { flex: 0 1 auto; flex-basis: auto; }
}

/* The custom-number embedded inside .quick-presets gets its own line on
   phones so it doesn't fight the chip pills for width. */
.builder-app .quick-presets .input-with-unit {
  flex: 1 1 100%;
  margin-left: 0 !important;
  margin-top: 4px;
}
.builder-app .quick-presets .input-with-unit > input[type="number"] {
  width: auto !important;
  min-width: 0;
  flex: 1 1 auto;
}
@media (min-width: 600px) {
  .builder-app .quick-presets .input-with-unit { flex: 0 1 auto; margin-top: 0; }
  .builder-app .quick-presets .input-with-unit > input[type="number"] { flex: 0 1 5rem; }
}

.builder-app .quick-submit {
  width: 100%;
  min-height: 52px;
  margin-top: 4px;
  border-radius: 12px;
}


/* ----- 17d. Hero recipe table — first table on the site.
       Already width:100%. Add a touch of internal cell breathing room so
       labels and values don't kiss the card border on the largest viewport
       sizes; keep edge-to-edge feel by not adding outer padding.
       Also normalise borders so the first row never shows a stray top line. */
.hero-preview .hero-recipe-table {
  width: 100%;
  margin: var(--gap-sm) 0 0;
  border-collapse: collapse;
}
.hero-preview .hero-recipe-table tr {
  border-top: 1px solid var(--border, rgba(0,0,0,0.06));
}
.hero-preview .hero-recipe-table tr:first-child { border-top: 0; }
.hero-preview .hero-recipe-table th,
.hero-preview .hero-recipe-table td {
  padding: 13px 0;
  border: 0;
  font-size: 15px;
  line-height: 1.2;
}
.hero-preview .hero-recipe-table th {
  text-align: left;
  font-weight: 500;
  color: var(--ink-muted, #6b6660);
  text-transform: none;
  letter-spacing: 0;
  padding-right: 16px;            /* breathing room between label and value */
}
.hero-preview .hero-recipe-table td {
  text-align: right;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  color: var(--ink, #1a1714);
  white-space: nowrap;
  padding-left: 0;
}


/* ----- 17e. Pro-mode output table — match the hero rhythm so both tables
       inside the same card feel like one design family. */
.pro-mode-panel .pro-mode-output {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--gap-sm);
}
.pro-mode-panel .pro-mode-output tr {
  border-top: 1px solid var(--border, rgba(0,0,0,0.06));
}
.pro-mode-panel .pro-mode-output tr:first-child { border-top: 0; }
.pro-mode-panel .pro-mode-output th,
.pro-mode-panel .pro-mode-output td {
  padding: 12px 0;
  border-bottom: 0;
  font-size: 14px;
  line-height: 1.2;
}
.pro-mode-panel .pro-mode-output th {
  text-align: left;
  font-weight: 500;
  color: var(--ink-muted, #6b6660);
  padding-right: 16px;
}
.pro-mode-panel .pro-mode-output td {
  text-align: right;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}


/* ----- 17f. Cookie-consent buttons — 50/50 stretched on mobile so neither
       Accept nor Reject feels orphaned, never wrapping awkwardly. */
.cookie-consent .cookie-consent-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
.cookie-consent .cookie-consent-inner > p { margin: 0; }
.cookie-consent .cookie-consent-btns {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
}
.cookie-consent .cookie-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
}
/* Phones: the box and the inner wrapper both had padding, which made the
   banner cover about a third of the screen. */
@media (max-width: 599px) {
  .cookie-consent { padding: 12px 14px; }
  .cookie-consent .cookie-consent-inner { padding: 0; gap: 10px; }
  .cookie-consent .cookie-consent-inner > p { font-size: 13px; line-height: 1.45; }
}
@media (min-width: 600px) {
  .cookie-consent .cookie-consent-inner {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }
  .cookie-consent .cookie-consent-btns { width: auto; flex: 0 0 auto; }
  .cookie-consent .cookie-btn { flex: 0 0 auto; min-width: 96px; }
}


/* ----- 17g. Timer controls (Pause / Reset on step 7) — 50/50 row that
       always uses the full available width on phones. */
.builder-app .timer-display-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  padding: 12px 0 0;
}
.builder-app .timer-time {
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  text-align: center;
}
.builder-app .timer-controls {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
}
.builder-app .timer-controls .btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 10px;
}
@media (min-width: 600px) {
  .builder-app .timer-display-wrap { flex-direction: row; align-items: center; gap: 16px; padding: 16px 0 0; }
  .builder-app .timer-time { text-align: left; flex: 0 0 auto; }
  .builder-app .timer-controls { width: auto; flex: 0 0 auto; }
  .builder-app .timer-controls .btn { flex: 0 0 auto; min-width: 96px; }
}


/* ----- 17h. Start-over button — full-width on mobile (no orphan max-200px),
       comfortably bounded on tablet/desktop. */
.builder-app .start-over { text-align: center; margin-top: var(--gap-lg); }
.builder-app .start-over .btn {
  width: 100%;
  max-width: none;
  min-height: 48px;
  border-radius: 12px;
}
@media (min-width: 600px) {
  .builder-app .start-over .btn { width: auto; max-width: 240px; padding: 12px 28px; }
}


/* ----- 17i. Glossary popover — Read full guide CTA goes full-width inside
       the modal so the tap target is dominant on phones. */
.glossary-popover .glossary-popover-link {
  display: block;
  width: 100%;
  text-align: center;
  min-height: 44px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}


/* ----- 17j. Step navigation (back-link + sticky CTA on step 0) — collapse
       any leftover horizontal padding that left a sliver of empty space on
       the right edge of the wizard card on phones. */
.builder-app .nav-row {
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}
.builder-app .nav-row .btn {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  min-height: 48px;
}


/* ----- 17k. Flour preset row inside the regular guided flow (.options).
       Already vertical and full-width via builder.css, but we lock the
       option to fill the card width on phones (some translations cause an
       unexpected width contraction). */
.builder-app .options .option {
  width: 100%;
  min-width: 0;
}


/* ----- 17l. Recipe-card padding parity at very narrow widths (320–360px)
       so the inner grid rows always have at least 16px breathing room. */
@media (max-width: 360px) {
  .builder-app .recipe-card { padding: 16px !important; }
  .hero-preview { padding: 16px !important; }
}


/* ===========================================================================
 * 18. HERO RECIPE GRID — 2×2 INGREDIENT-CARD GRID
 *
 *     The hero recipe summary is rendered as a <dl class="hero-recipe-grid">
 *     of 4 .recipe-stat blocks. Pure CSS grid (no <table> quirks).
 *
 *     2-column on every viewport so the card always feels filled instead
 *     of "split half-half with a visual hole in the middle".
 * ========================================================================= */

.hero-preview .hero-recipe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: 100%;
  margin: var(--gap-sm) 0 0;
  padding: 0;
}

.hero-preview .recipe-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  margin: 0;
  border-top: 1px solid var(--border, rgba(0,0,0,0.06));
  min-width: 0;
}
/* Top row (first two stats) sits flush with the title above — no top border. */
.hero-preview .recipe-stat:nth-child(-n+2) { border-top: 0; padding-top: 6px; }

/* Right column has a left padding so the two columns visually separate. */
.hero-preview .recipe-stat:nth-child(2n)   { padding-left: 16px; }
.hero-preview .recipe-stat:nth-child(2n+1) { padding-right: 16px; }

.hero-preview .recipe-stat-label {
  display: block;
  margin: 0;
  padding: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted, #6b6660);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-preview .recipe-stat-value {
  display: block;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  line-height: 1.15;
  color: var(--ink, #1a1714);
  white-space: nowrap;
}
.hero-preview .recipe-stat-value.is-flash { color: var(--accent); }
.hero-preview .recipe-stat-value span { transition: color 200ms ease; }

@media (min-width: 768px) {
  .hero-preview .recipe-stat { padding-top: 14px; padding-bottom: 14px; }
  .hero-preview .recipe-stat:nth-child(-n+2) { padding-top: 8px; }
  .hero-preview .recipe-stat-value { font-size: 20px; }
}

/* Hide the OLD .hero-recipe-table rules in case any legacy markup ever shows
   up cached. Belt-and-suspenders. */
.hero-preview table.hero-recipe-table { display: none !important; }


/* ===========================================================================
 * 19. PRO-MODE SCHEDULE INFO BLOCK
 *
 *     The previous Fermentation fieldset had 5 inputs (Temp, Bulk, Cold,
 *     Autolyse, Folds) that did not feed into the calculator math at all.
 *     They've been replaced with a static info card showing the typical
 *     suggested values. This is a read-only reference — not editable.
 * ========================================================================= */

.pro-mode-panel .pro-mode-schedule {
  margin: var(--gap-md) 0 0;
  padding: 16px;
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: 12px;
  background: var(--accent-soft, rgba(200,128,31,0.06));
}
[data-theme="dark"] .pro-mode-panel .pro-mode-schedule {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.08);
}

.pro-mode-panel .pro-mode-schedule-title {
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted, #6b6660);
  margin: 0 0 12px;
}

.pro-mode-panel .pro-mode-schedule-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}
@media (min-width: 480px) {
  .pro-mode-panel .pro-mode-schedule-list { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 720px) {
  .pro-mode-panel .pro-mode-schedule-list { grid-template-columns: repeat(5, 1fr); }
}

.pro-mode-panel .pro-mode-schedule-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pro-mode-panel .pro-mode-schedule-list .schedule-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted, #6b6660);
  line-height: 1.2;
}
.pro-mode-panel .pro-mode-schedule-list .schedule-val {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink, #1a1714);
  line-height: 1.15;
}

.pro-mode-panel .pro-mode-schedule-note {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.4;
}
.pro-mode-panel .pro-mode-schedule-note a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.pro-mode-panel .pro-mode-schedule-note a:hover { text-decoration: underline; }


/* ===========================================================================
 * 20. KILL EMPTY SPACE BELOW THE WIZARD
 *
 *     The previous attempt used `.builder-app + .other-calculators-section`
 *     but builder.php emits a <script>BUILDER_T</script> directly after
 *     </div.builder-app>, breaking the adjacent sibling combinator.
 *
 *     New approach (no sibling combinator, no fragile chain):
 *       1. Universally tighten .builder-app bottom padding — the wizard
 *          steps already have generous internal padding from the recipe
 *          card and the .start-over button so 16-24 px outer is enough.
 *       2. Universally pull .other-calculators-section closer to whatever
 *          is above it.
 *       3. EXTRA tightening when step 0 is the active step (path picker)
 *          via `main:has(#step0.active)` (matches in all browsers that
 *          support :has, which is every major engine since 2023).
 *
 *     Result on the homepage at step 0:
 *       wizard-fork bottom → 12 px → builder-app end
 *                        → 16 px (section margin)
 *                        = ~28 px to "Other dough calculators" heading.
 * ========================================================================= */

/* 1. Always tighten the wizard's bottom padding AND kill the legacy
       `min-height: 100vh` from builder.css that was forcing the wizard
       container to fill the entire viewport — pushing every section
       below it (Other dough calculators, How it works, Footer) hundreds
       of pixels down on the home page where the wizard is short. */
.builder-app {
  min-height: 0 !important;
  padding-bottom: var(--gap-md) !important;        /* 16 px */
}
@media (min-width: 768px) {
  .builder-app { padding-bottom: var(--gap-lg) !important; }   /* 24 px */
}

/* 2. Always pull the other-calculators section closer. */
main#main > .other-calculators-section {
  margin-top: var(--gap-lg) !important;            /* 24 px */
  margin-bottom: var(--gap-lg);
}
@media (min-width: 768px) {
  main#main > .other-calculators-section {
    margin-top: var(--gap-xl) !important;          /* 32 px */
  }
}

/* 3. Even tighter when on the path picker (step 0) — pure info screen,
       no input required, so the "next action" should feel close. */
main#main:has(.builder-app .step.step-pathpicker.active) {
  /* belt-and-suspenders: tighten on the parent too */
}
main#main:has(#step0.active) > .other-calculators-section {
  margin-top: var(--gap-md) !important;            /* 16 px */
}
@media (min-width: 768px) {
  main#main:has(#step0.active) > .other-calculators-section {
    margin-top: var(--gap-lg) !important;          /* 24 px */
  }
}

/* Keep the wizard fork itself compact: no surplus margin beneath. */
.builder-app .step.step-pathpicker { padding-bottom: 0; margin-bottom: 0; }
.builder-app .wizard-fork { margin-bottom: 0; }


/* ===========================================================================
 * 21. PAGE-LEVEL RHYTHM — close the gap between the "Other calculators"
 *     section and the "How it works" details, plus tighten the very bottom
 *     of the page on phones so the cookie banner and footer don't sit in
 *     a sea of empty space.
 * ========================================================================= */

main#main > .how-it-works { margin-top: 0; margin-bottom: var(--gap-lg); }

/* Text on accent-coloured buttons: white on the light theme's terracotta
   (4.6:1; the off-white was 4.46:1), dark ink on the dark theme's amber
   (white there was 2.3:1). */
html body :is(.btn-primary, .hero-cta-primary, .cookie-btn-accept),
html body :is(.btn-primary, .hero-cta-primary, .cookie-btn-accept):hover { color: #fff; }
html[data-theme="dark"] body :is(.btn-primary, .hero-cta-primary, .cookie-btn-accept),
html[data-theme="dark"] body :is(.btn-primary, .hero-cta-primary, .cookie-btn-accept):hover { color: #1a1714; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) body :is(.btn-primary, .hero-cta-primary, .cookie-btn-accept),
  html:not([data-theme="light"]) body :is(.btn-primary, .hero-cta-primary, .cookie-btn-accept):hover { color: #1a1714; }
}

/* Inline SVG icons (includes/icons.php) in the calculator cards. */
.other-calc-icon { color: var(--accent); }
.other-calc-icon svg { display: block; width: 26px; height: 26px; }
.wizard-fork-icon svg { display: block; width: 22px; height: 22px; }

/* The cookie card is fixed, so page content and the other fixed cards
   need the same amount of room or they sit on top of it. --cookie-h is
   set in includes/consent.php while the banner is open. */
body.cookie-banner-visible { padding-bottom: var(--cookie-h, 0px); }

