/* 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/sourdough-hero.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; }

/* 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: 0; 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); }
.unit-toggle .unit-inactive { opacity: 0.6; }
.unit-toggle[data-unit="oz"] .unit-active { color: var(--ink-muted); opacity: 0.6; }
.unit-toggle[data-unit="oz"] .unit-inactive { color: var(--accent); opacity: 1; }
.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; }
.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 { padding: 0.5rem 1rem; 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); }
