/* ==========================================================
   BakeCostCalc — Artisan Bakehouse Editorial
   Mobile-first · light · warm paper + espresso + terracotta
   ========================================================== */

/* ---------------------------------------------------------
   0. Reset + Tokens
--------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* surfaces */
  --paper:      #F7F1E3;     /* cream base */
  --paper-2:    #F1E8D3;     /* richer cream (alternating sections) */
  --paper-3:    #EADFC4;     /* deeper cream (cards hover) */
  --paper-soft: #FBF6E9;     /* ultra-light */
  --ink:        #1A120B;     /* near-black espresso — main text */
  --ink-2:      #2E2215;     /* softer text */
  --ink-muted:  #6D5A47;     /* muted text */
  --ink-faint:  #A6927A;     /* hints / footers */
  --rule:       rgba(26,18,11,0.10);
  --rule-soft:  rgba(26,18,11,0.06);
  --rule-bold:  rgba(26,18,11,0.22);

  /* accents */
  --clay:       #B8462A;     /* primary terracotta */
  --clay-deep:  #8E2F1A;
  --clay-soft:  #D9785B;
  --clay-ghost: rgba(184,70,42,0.10);

  --butter:     #E8B84A;     /* secondary — butter highlight */
  --butter-deep:#BD8F24;

  --forest:     #3D5A3B;     /* success */
  --forest-soft:rgba(61,90,59,0.12);

  --error:      #B02E2E;
  --error-soft: rgba(176,46,46,0.10);

  /* back-compat vars used by blog and legacy */
  --bg:         var(--paper);
  --surface:    var(--paper);
  --surface2:   var(--paper-2);
  --surface3:   var(--paper-3);
  --text:       var(--ink);
  --text-sub:   var(--ink-2);
  --text-muted: var(--ink-muted);
  --accent:     var(--clay);
  --accent2:    var(--clay-deep);
  --accent-s:   var(--clay);
  --accent-glow:rgba(184,70,42,0.14);
  --border:     var(--rule);
  --border-bright: var(--rule-bold);
  --success:    var(--forest);

  /* typography */
  --serif:      'Fraunces', 'Georgia', 'Times New Roman', serif;
  --sans:       'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono:       'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* shape */
  --radius:     18px;
  --radius-sm:  10px;
  --radius-xs:  6px;

  /* shadow — paper-like, not glow */
  --shadow-sm:  0 1px 0 rgba(26,18,11,0.06), 0 1px 2px rgba(26,18,11,0.04);
  --shadow:     0 1px 0 rgba(26,18,11,0.05), 0 12px 28px -18px rgba(26,18,11,0.35);
  --shadow-lg:  0 1px 0 rgba(26,18,11,0.05), 0 24px 60px -24px rgba(26,18,11,0.35);
  --glow:       0 0 0 rgba(0,0,0,0);

  --trans:      .22s cubic-bezier(.2,.6,.2,1);
  --trans-slow: .4s cubic-bezier(.2,.6,.2,1);
  --ease-soft:  cubic-bezier(.2,.6,.2,1);

  /* layout */
  --header-h:   64px;
  --page-pad:   clamp(1rem, 4vw, 2.25rem);
  --max-w:      1100px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: var(--sans);
}

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  font-feature-settings: "ss01", "ss02", "cv11";
  font-variant-ligatures: common-ligatures;
}

/* Paper grain — SVG noise texture everywhere */
.paper-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .55;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.15  0 0 0 0 0.08  0 0 0 0 0.02  0 0 0 0.08 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

/* Subtle warm vignette so edges aren't stark */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 8% 0%,   rgba(232,184,74,.10) 0%, transparent 55%),
    radial-gradient(ellipse 70% 60% at 100% 100%, rgba(184,70,42,.08) 0%, transparent 60%);
}

body > * { position: relative; z-index: 1; }

a { color: var(--clay); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; }

::selection { background: var(--butter); color: var(--ink); }

/* Accessibility helpers */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--ink);
  color: var(--paper);
  padding: .65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  z-index: 500;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; outline: 2px solid var(--butter); outline-offset: 3px; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------------------------------------------------------
   1. Typography system
--------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 500;
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: -.02em;
  font-weight: 500;
}

h1 {
  font-size: clamp(2.35rem, 8.5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -.035em;
  font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 450;
}

h2 { font-size: clamp(1.75rem, 5.5vw, 2.9rem); letter-spacing: -.028em; }
h3 { font-size: clamp(1.05rem, 2.8vw, 1.2rem); letter-spacing: -.015em; font-weight: 600; }

h1 em, h2 em, h3 em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 400;
  color: var(--clay);
}

.handwritten {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 400;
  color: var(--clay);
  position: relative;
  padding: 0 .06em;
}
.handwritten::after {
  content: '';
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: -.04em;
  height: .35em;
  background: radial-gradient(ellipse at 50% 50%, rgba(184,70,42,.18) 0%, transparent 72%);
  z-index: -1;
  transform: skewX(-6deg);
}

.highlight {
  display: inline-block;
  color: var(--ink);
  position: relative;
  padding: 0 .08em;
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 70, "wght" 400;
}
.highlight::before {
  content: '';
  position: absolute;
  left: -.06em;
  right: -.06em;
  top: 14%;
  bottom: 10%;
  background: var(--butter);
  z-index: -1;
  transform: skewX(-4deg) rotate(-.8deg);
  border-radius: 4px 7px 5px 8px;
  opacity: .7;
}

p {
  font-size: 1rem;
  color: var(--ink-2);
  line-height: 1.7;
}

small { font-size: .82em; color: var(--ink-muted); }
strong { font-weight: 600; color: var(--ink); }
code {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: .1em .4em;
  border-radius: var(--radius-xs);
  color: var(--clay-deep);
}

/* ---------------------------------------------------------
   2. Header / Nav
--------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247,241,227,.88);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--rule-soft);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--page-pad);
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--ink);
  font-family: var(--serif);
  font-variation-settings: "opsz" 36, "SOFT" 60, "wght" 600;
  font-size: 1.15rem;
  letter-spacing: -.02em;
  text-decoration: none;
}
.nav-logo:hover { text-decoration: none; color: var(--ink); }

.nav-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(155deg, var(--butter) 0%, var(--clay-soft) 100%);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(26,18,11,.12), 0 2px 0 rgba(26,18,11,.08);
  margin-right: 0;
  font-size: 1rem;
  flex-shrink: 0;
}
.nav-logo-word {
  background: none;
  -webkit-text-fill-color: initial;
  color: var(--ink);
}

.nav-links {
  display: none;
  gap: 1.75rem;
  margin-left: auto;
  margin-right: 1rem;
}
.nav-link {
  font-size: .9rem;
  color: var(--ink-2);
  font-weight: 500;
  position: relative;
  padding: .25rem 0;
  transition: color var(--trans);
}
.nav-link:hover { color: var(--ink); text-decoration: none; }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 1.5px;
  background: var(--clay);
  transition: right .3s ease;
}
.nav-link:hover::after { right: 0; }

.nav-cta {
  margin-left: auto;
  background: var(--ink);
  color: var(--paper);
  padding: .55rem 1.1rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .01em;
  transition: transform var(--trans), background var(--trans);
  border: 1px solid var(--ink);
}
.nav-cta:hover {
  background: var(--clay);
  border-color: var(--clay);
  color: var(--paper);
  transform: translateY(-1px);
  text-decoration: none;
}

@media (min-width: 720px) {
  .nav-links { display: inline-flex; }
  .nav-cta { margin-left: 0; }
}

/* ---------------------------------------------------------
   3. Sections — rule + kicker + titles (editorial)
--------------------------------------------------------- */
section {
  padding: clamp(3rem, 9vw, 6rem) var(--page-pad);
  position: relative;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
}
.container--narrow { max-width: 780px; }

.section-rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.15rem;
}
.section-kicker {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
  flex-shrink: 0;
}
.section-rule-line {
  display: block;
  height: 1px;
  flex: 1;
  background: var(--rule);
  position: relative;
}
.section-rule-line::after {
  content: '';
  position: absolute;
  right: 0; top: -3px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--clay);
}

.section-title {
  margin-bottom: .9rem;
  max-width: 18ch;
}
.section-lede {
  max-width: 58ch;
  color: var(--ink-2);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

/* Alternating section backgrounds */
#why, #pricing { background: var(--paper-2); }
#why::before, #pricing::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--rule);
}
#why::after, #pricing::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: var(--rule);
}

/* ---------------------------------------------------------
   4. Hero
--------------------------------------------------------- */
#hero {
  padding-top: clamp(2.5rem, 7vw, 4.5rem);
  padding-bottom: clamp(2.5rem, 7vw, 5rem);
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3rem);
  align-items: center;
}

.hero-text > * { animation: fadeUp .55s var(--ease-soft) both; }
.hero-text .eyebrow     { animation-delay: .05s; }
.hero-text h1           { animation-delay: .14s; }
.hero-text .subtitle    { animation-delay: .22s; }
.hero-text .format-pills{ animation-delay: .3s; }
.hero-text .hero-ctas   { animation-delay: .36s; }
.hero-text .social-proof{ animation-delay: .44s; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "opsz" 36, "SOFT" 100, "wght" 400;
  font-size: .95rem;
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
  padding: 0;
  border: none;
  background: none;
}
.eyebrow-rule {
  display: inline-block;
  width: 24px;
  height: 1.5px;
  background: var(--clay);
  flex-shrink: 0;
}

#hero h1 {
  margin-bottom: 1.2rem;
}

.subtitle {
  font-family: var(--sans);
  font-size: 1.05rem;
  color: var(--ink-2);
  max-width: 52ch;
  margin: 0 0 1.6rem;
  line-height: 1.7;
}
.subtitle strong { color: var(--ink); font-weight: 600; }

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.hero-note {
  font-size: .82rem;
  color: var(--ink-muted);
}

.social-proof {
  margin-top: 1.15rem;
  font-size: .88rem;
  color: var(--ink-muted);
  padding-left: 1rem;
  border-left: 2px solid var(--clay);
}
.social-proof strong { color: var(--ink); font-weight: 600; }

/* Hero scroll hint */
.hero-scroll {
  display: none;
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.hero-scroll-line {
  width: 1px;
  height: 28px;
  background: linear-gradient(to bottom, var(--ink-faint) 0%, transparent 100%);
  animation: scroll-line 2s ease-in-out infinite;
}
@keyframes scroll-line {
  0%,100% { transform: scaleY(1); opacity: 1; }
  50%      { transform: scaleY(.5); opacity: .5; }
}

/* ---------------------------------------------------------
   5. Demo card (hero) — artisan cost sheet
--------------------------------------------------------- */
.hero-demo { width: 100%; }

.demo-card {
  background: var(--paper-soft);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: rotate(.6deg);
  animation: fadeUp .65s var(--ease-soft) .38s both;
  max-width: 420px;
  margin: 0 auto;
}

.demo-head {
  padding: 1.35rem 1.5rem 1.1rem;
  border-bottom: 1px dashed var(--rule-bold);
  background: var(--paper-2);
  position: relative;
}
.demo-head::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--clay), var(--butter));
}

.demo-head-label {
  display: block;
  font-family: var(--sans);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: .5rem;
}

.demo-head-title {
  font-family: var(--serif);
  font-variation-settings: "opsz" 72, "SOFT" 100, "wght" 500;
  font-size: 1.5rem;
  letter-spacing: -.025em;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 .35rem;
}

.demo-head-meta {
  display: block;
  font-family: var(--sans);
  font-size: .75rem;
  color: var(--ink-muted);
}

.demo-ings {
  padding: .85rem 1.5rem .7rem;
}

.demo-ings-header {
  display: grid;
  grid-template-columns: 1fr 3.5rem 3.5rem;
  font-family: var(--sans);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-bottom: .45rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: .1rem;
}
.demo-ings-header span:not(:first-child) { text-align: right; }

.demo-row {
  display: grid;
  grid-template-columns: 1fr 3.5rem 3.5rem;
  align-items: baseline;
  padding: .3rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.demo-row:last-child { border-bottom: none; }

.demo-ing-name {
  font-size: .84rem;
  color: var(--ink-2);
  font-family: var(--sans);
}
.demo-ing-qty {
  text-align: right;
  font-size: .76rem;
  color: var(--ink-muted);
  font-family: var(--mono);
  letter-spacing: -.01em;
}
.demo-ing-cost {
  text-align: right;
  font-size: .84rem;
  font-family: var(--mono);
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -.01em;
}

.demo-result {
  padding: .85rem 1.5rem 1rem;
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
}

.demo-result-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  padding: .2rem 0;
}

.demo-result-label {
  font-size: .8rem;
  color: var(--ink-muted);
  font-family: var(--sans);
}
.demo-result-val {
  font-family: var(--mono);
  font-size: .9rem;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -.01em;
}

.demo-result-featured {
  margin-top: .45rem;
  padding-top: .45rem;
  border-top: 1px dashed var(--rule-bold);
}
.demo-result-featured .demo-result-label {
  font-weight: 600;
  color: var(--ink);
  font-size: .88rem;
}
.demo-result-price {
  font-family: var(--serif);
  font-variation-settings: "opsz" 72, "SOFT" 60, "wght" 600;
  font-size: 1.45rem;
  letter-spacing: -.025em;
  color: var(--clay-deep);
  line-height: 1;
}

.demo-cursor {
  color: var(--clay);
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.demo-footer {
  border-top: 1px dashed var(--rule-bold);
  padding: .65rem 1.5rem;
  font-size: .72rem;
  color: var(--ink-muted);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  background: var(--paper-2);
}
.demo-signature {
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "opsz" 36, "SOFT" 100, "wght" 500;
  color: var(--clay);
  font-size: 1rem;
  letter-spacing: -.01em;
}

/* ---------------------------------------------------------
   6. Buttons
--------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .72rem 1.3rem;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--trans);
  line-height: 1;
  letter-spacing: .005em;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { text-decoration: none; }

.btn-lg { font-size: 1rem; padding: .95rem 1.75rem; }
.btn-sm { font-size: .8rem; padding: .45rem .9rem; }

.btn-arrow {
  display: inline-block;
  transition: transform .25s var(--ease-soft);
}
.btn:hover .btn-arrow { transform: translateX(3px); }

.btn-primary {
  background: var(--ink);
  color: var(--paper-soft);
  border-color: var(--ink);
  box-shadow: 0 1px 0 rgba(255,255,255,.1) inset, 0 4px 14px -6px rgba(26,18,11,.55);
}
.btn-primary:hover {
  background: var(--clay);
  border-color: var(--clay);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 8px 22px -10px rgba(184,70,42,.65);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-muted);
}
.btn-ghost:hover {
  background: var(--paper-3);
  color: var(--ink);
  border-color: var(--rule);
}

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ---------------------------------------------------------
   7. Tool section — calculator
--------------------------------------------------------- */
#tool {
  padding-top: clamp(2rem, 6vw, 4rem);
  padding-bottom: clamp(3rem, 8vw, 5rem);
}

.tool-card {
  background: var(--paper-soft);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 3.5vw, 2rem);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--clay) 0%, var(--butter) 50%, var(--forest) 100%);
}
/* printer tape edge */
.tool-card::after {
  content: '';
  position: absolute;
  top: 4px; left: 0; right: 0;
  height: 8px;
  background: radial-gradient(circle at 6px 50%, var(--paper) 0 4px, transparent 5px);
  background-size: 12px 100%;
}

/* Banners */
.checkout-banner {
  display: none;
  padding: .85rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  margin-bottom: 1.25rem;
  align-items: center;
  gap: .55rem;
  line-height: 1.5;
}
.checkout-banner.visible { display: flex; }
/* daily-limit-banner toggles via `hidden` attribute, not `.visible` class */
#daily-limit-banner:not([hidden]) { display: flex; }
.banner-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  font-weight: 700;
  flex-shrink: 0;
  font-size: .85rem;
}
.checkout-banner--success {
  background: var(--forest-soft);
  border: 1px solid rgba(61,90,59,.25);
  color: var(--forest);
}
.checkout-banner--success .banner-icon {
  background: var(--forest);
  color: var(--paper-soft);
}
.checkout-banner--neutral {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  color: var(--ink-muted);
}
.checkout-banner--limit {
  background: rgba(232,184,74,.18);
  border: 1px solid rgba(189,143,36,.35);
  color: var(--ink);
  flex-wrap: wrap;
}
.checkout-banner--limit .banner-icon {
  background: var(--butter);
  color: var(--ink);
}

/* Recipe form */
.recipe-form {
  padding: .25rem 0 0;
  border: 0;
  margin: 0;
}

.recipe-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
  margin-bottom: 1.4rem;
  border: 0;
  padding: 0;
}
@media (min-width: 640px) {
  .recipe-meta {
    grid-template-columns: 1.6fr 1fr 1.3fr 1fr;
    gap: 1rem;
  }
  .field--wide { grid-column: auto; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.field--wide { grid-column: 1 / -1; }
@media (min-width: 640px) { .field--wide { grid-column: auto; } }

.field-label {
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-muted);
}
.field-label small { font-weight: 500; color: var(--ink-faint); text-transform: none; letter-spacing: .03em; }

.field input,
.ingredient-row input {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-xs);
  padding: .7rem .85rem;
  font-size: .95rem;
  color: var(--ink);
  font-family: var(--sans);
  width: 100%;
  transition: all var(--trans);
  -webkit-appearance: none;
  appearance: none;
}
.field input:hover,
.ingredient-row input:hover { border-color: var(--rule-bold); }
.field input:focus,
.ingredient-row input:focus {
  outline: none;
  border-color: var(--clay);
  background: var(--paper-soft);
  box-shadow: 0 0 0 3px rgba(184,70,42,.12);
}
.field input::placeholder,
.ingredient-row input::placeholder { color: var(--ink-faint); }

/* Ingredients block */
.ingredients-block {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 1rem 1rem .85rem;
  margin-bottom: 1.4rem;
}
.ingredients-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .75rem;
}
.ingredients-subtle {
  font-size: .78rem;
  color: var(--ink-muted);
  font-family: var(--mono);
}

.ingredients-table-wrap {
  overflow-x: auto;
  margin: 0 -.5rem;
  padding: 0 .5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: var(--clay) var(--paper-2);
  scrollbar-width: thin;
}
.ingredients-table-wrap::-webkit-scrollbar { height: 6px; }
.ingredients-table-wrap::-webkit-scrollbar-track { background: var(--paper-2); border-radius: 3px; }
.ingredients-table-wrap::-webkit-scrollbar-thumb { background: var(--rule-bold); border-radius: 3px; }

.ingredients-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 .4rem;
  min-width: 560px;
}
.ingredients-table thead th {
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-faint);
  text-align: left;
  padding: 0 .55rem .4rem;
  white-space: nowrap;
  border-bottom: 1px solid var(--rule);
}
.ingredients-table .th-name      { width: 28%; }
.ingredients-table .th-unit      { width: 12%; }
.ingredients-table .th-cost      { width: 18%; }
.ingredients-table .th-qty       { width: 18%; }
.ingredients-table .th-row-cost  { width: 16%; text-align: right; padding-right: .9rem; }
.ingredients-table .th-actions   { width: 8%; }

.ingredient-row td {
  padding: 0 .35rem;
  vertical-align: middle;
  background: transparent;
}
.ingredient-row input {
  padding: .55rem .7rem;
  font-size: .9rem;
  border-radius: var(--radius-xs);
}
.ingredient-row .i-line {
  text-align: right;
  font-family: var(--mono);
  color: var(--ink);
  font-size: .88rem;
  padding-right: .9rem;
  font-weight: 500;
  letter-spacing: -.01em;
}

.row-del {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink-muted);
  border-radius: var(--radius-xs);
  width: 32px; height: 32px;
  cursor: pointer;
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--trans);
  font-family: var(--sans);
}
.row-del:hover:not(:disabled) {
  border-color: var(--error);
  color: var(--error);
  background: var(--error-soft);
}

.ingredients-actions {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
  margin-top: .9rem;
}

.calc-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .85rem;
  padding-top: .25rem;
}
@media (min-width: 520px) {
  .calc-actions {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }
}
.calc-actions .btn { align-self: stretch; }
@media (min-width: 520px) {
  .calc-actions .btn { align-self: auto; }
}

.calc-note {
  font-size: .85rem;
  color: var(--ink-muted);
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
@media (min-width: 520px) { .calc-note { text-align: left; } }

/* Error banner */
.error-banner {
  display: none;
  margin-top: 1rem;
  padding: .85rem 1rem;
  background: var(--error-soft);
  border: 1px solid rgba(176,46,46,.3);
  border-radius: var(--radius-sm);
  color: var(--error);
  font-size: .9rem;
  line-height: 1.45;
  gap: .55rem;
  align-items: flex-start;
}
.error-banner.visible { display: flex; }
.error-banner .banner-icon {
  background: var(--error);
  color: var(--paper);
  width: 22px; height: 22px;
}

/* ---------------------------------------------------------
   8. Results
--------------------------------------------------------- */
.results-section {
  display: none;
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px dashed var(--rule-bold);
  animation: fadeUp .4s var(--ease-soft);
}
.results-section.visible { display: block; }

.results-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.15rem;
}
.results-header-line {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.results-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: .85rem;
  margin-bottom: 1.75rem;
}
@media (min-width: 640px) {
  .results-summary { grid-template-columns: repeat(2, 1fr); }
  .results-summary .featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 2rem;
  }
}

.summary-stat {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.1rem;
  position: relative;
  overflow: hidden;
}
.summary-stat.featured {
  background: linear-gradient(155deg, var(--butter) 0%, var(--clay-soft) 130%);
  border-color: var(--clay);
  color: var(--ink);
  box-shadow: 0 4px 14px -6px rgba(184,70,42,.4);
}
.summary-stat.featured::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.05  0 0 0 0 0  0 0 0 0.15 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: .4;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.summary-stat.featured > * { position: relative; z-index: 1; }

.summary-label {
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-muted);
  margin-bottom: .45rem;
}
.summary-stat.featured .summary-label { color: var(--ink); opacity: .75; }

.summary-value {
  font-family: var(--serif);
  font-variation-settings: "opsz" 144, "SOFT" 60, "wght" 500;
  font-size: clamp(1.6rem, 4.5vw, 2rem);
  letter-spacing: -.025em;
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.summary-stat.featured .summary-value { color: var(--ink); }

.summary-sub {
  font-size: .78rem;
  color: var(--ink-muted);
  margin-top: .4rem;
  font-family: var(--mono);
}
.summary-stat.featured .summary-sub { color: var(--ink); opacity: .7; }

.results-breakdown { margin-bottom: 1.5rem; }
.results-breakdown h3 {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 .85rem;
  color: var(--ink);
  letter-spacing: -.01em;
}

.breakdown-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
  background: var(--paper);
}

.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.breakdown-table th,
.breakdown-table td {
  padding: .7rem .85rem;
  border-bottom: 1px solid var(--rule-soft);
  text-align: left;
}
.breakdown-table thead th {
  background: var(--paper-2);
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--rule);
}
.breakdown-table tbody tr:last-child td { border-bottom: 0; }
.breakdown-table tbody tr:hover td { background: var(--paper-2); }
.breakdown-table .num {
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.breakdown-table .muted { color: var(--ink-muted); font-size: .85rem; }

.results-actions {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1rem;
  position: relative;
}
.copy-feedback {
  font-size: .85rem;
  color: var(--forest);
  opacity: 0;
  transition: opacity .3s ease;
  align-self: center;
  font-weight: 600;
}
.copy-feedback.show { opacity: 1; }

.results-hint {
  margin-top: 1rem;
  font-size: .88rem;
  color: var(--ink-muted);
  font-style: italic;
  font-family: var(--serif);
  font-variation-settings: "opsz" 14, "SOFT" 100, "wght" 400;
}

.tool-trust {
  text-align: center;
  font-size: .82rem;
  color: var(--ink-muted);
  margin-top: 1.3rem;
  letter-spacing: .01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------
   9. Gate Modal
--------------------------------------------------------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,18,11,.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  overflow-y: auto;
}
.modal-overlay.visible { display: flex; animation: modal-fade .3s ease; }

@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
    padding: 1rem;
  }
}

.modal {
  background: var(--paper-soft);
  border: 1px solid var(--rule);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 2rem 1.25rem 1.5rem;
  max-width: 540px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  animation: slide-up .35s var(--ease-soft);
  max-height: 92vh;
  overflow-y: auto;
}
@media (min-width: 640px) {
  .modal {
    padding: 2.5rem 2.25rem 2rem;
    border-radius: var(--radius);
  }
}
.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--clay), var(--butter), var(--forest));
}

.modal-icon {
  width: 58px; height: 58px;
  border-radius: 16px;
  background: var(--butter);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  margin: 0 auto 1rem;
  box-shadow: 0 2px 0 rgba(26,18,11,.15);
}

.modal h2 {
  font-size: 1.55rem;
  margin-bottom: .5rem;
  text-align: center;
  letter-spacing: -.025em;
}
.modal p {
  color: var(--ink-muted);
  font-size: .95rem;
  margin-bottom: 1.75rem;
  text-align: center;
  line-height: 1.6;
  max-width: 44ch;
  margin-left: auto;
  margin-right: auto;
}

.plan-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: .85rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 540px) {
  .plan-cards { grid-template-columns: 1fr 1fr; }
}

.plan-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 1.4rem 1.15rem;
  text-align: left;
  transition: all var(--trans);
  position: relative;
}
.plan-card:hover {
  border-color: var(--rule-bold);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.plan-card .plan-name {
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-bottom: .45rem;
}
.plan-card .plan-price {
  font-family: var(--serif);
  font-variation-settings: "opsz" 144, "SOFT" 60, "wght" 500;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -.03em;
  margin-bottom: .25rem;
  color: var(--ink);
}
.plan-price-sm {
  font-family: var(--sans);
  font-size: .85rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0;
}
.plan-card .plan-desc {
  font-size: .8rem;
  color: var(--ink-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.plan-card .btn {
  width: 100%;
  justify-content: center;
  font-size: .85rem;
  padding: .7rem 1rem;
}

.plan-card.featured {
  border-color: var(--clay);
  background: linear-gradient(155deg, var(--paper-soft) 0%, rgba(232,184,74,.25) 100%);
  box-shadow: 0 0 0 3px rgba(184,70,42,.12);
}

.plan-badge {
  display: inline-block;
  background: var(--clay);
  color: var(--paper-soft);
  font-family: var(--sans);
  font-size: .6rem;
  font-weight: 700;
  padding: .22rem .7rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-bottom: .65rem;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: .5rem 0 1.15rem;
  font-size: .85rem;
  color: var(--ink-2);
  text-align: left;
}
.plan-features li {
  padding: .22rem 0 .22rem 1.3rem;
  position: relative;
  line-height: 1.45;
}
.plan-features li::before {
  content: '';
  position: absolute;
  left: 0; top: .55rem;
  width: 8px; height: 2px;
  background: var(--clay);
}

.key-entry {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--rule-bold);
}
.key-entry-label {
  display: block;
  font-size: .82rem;
  color: var(--ink-muted);
  margin-bottom: .55rem;
  font-weight: 500;
}
.key-entry-row {
  display: flex;
  gap: .5rem;
  flex-direction: column;
}
@media (min-width: 420px) {
  .key-entry-row { flex-direction: row; }
}
.key-entry-row input {
  flex: 1;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-xs);
  padding: .65rem .85rem;
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--ink);
  width: 100%;
}
.key-entry-row input:focus {
  outline: none;
  border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(184,70,42,.12);
}
.key-entry-feedback {
  margin-top: .65rem;
  font-size: .82rem;
  line-height: 1.4;
}

.modal-dismiss {
  font-size: .85rem;
  color: var(--ink-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: .5rem 0;
  font-family: inherit;
  transition: color var(--trans);
  display: block;
  margin: 1.1rem auto 0;
}
.modal-dismiss:hover { color: var(--ink); }

.modal-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 50%;
  font-size: .9rem;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color var(--trans), border-color var(--trans);
  line-height: 1;
  z-index: 10;
}
.modal-close:hover { color: var(--ink); border-color: var(--ink-muted); }

/* ---------------------------------------------------------
   10. How steps
--------------------------------------------------------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 1rem 0 0;
  padding: 0;
  counter-reset: step-count;
}
@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}
.step {
  position: relative;
  padding: 1.5rem 1.25rem 1.35rem;
  background: var(--paper-soft);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  transition: transform var(--trans), border-color var(--trans);
}
.step:hover {
  transform: translateY(-3px);
  border-color: var(--clay);
  box-shadow: var(--shadow);
}
.step-num {
  font-family: var(--serif);
  font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 300;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--clay);
  letter-spacing: -.04em;
  margin-bottom: .75rem;
  font-style: italic;
}
.step-body h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: .4rem;
  color: var(--ink);
}
.step-body p {
  font-size: .92rem;
  color: var(--ink-2);
  line-height: 1.65;
}

/* ---------------------------------------------------------
   11. Why cards
--------------------------------------------------------- */
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .9rem;
  margin-top: 1rem;
}
@media (min-width: 560px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
}

.why-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 1.6rem 1.25rem 1.35rem;
  transition: all var(--trans);
  position: relative;
  overflow: hidden;
}
.why-card:hover {
  border-color: var(--clay);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.why-card:hover .why-icon-wrap {
  background: var(--clay);
  color: var(--paper);
  border-color: var(--clay);
}
.why-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: var(--paper-soft);
  border: 1px solid var(--rule);
  color: var(--clay);
  transition: all var(--trans);
}
.why-card h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: .4rem;
  color: var(--ink);
}
.why-card p {
  font-size: .9rem;
  color: var(--ink-2);
  line-height: 1.6;
}

/* ---------------------------------------------------------
   12. Comparison table
--------------------------------------------------------- */
.comparison-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
  background: var(--paper-soft);
  margin-top: 1rem;
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  min-width: 540px;
}
.comparison-table th,
.comparison-table td {
  padding: .85rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--rule-soft);
  font-family: var(--sans);
}
.comparison-table thead th {
  background: var(--paper-2);
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--rule);
}
.comparison-table .th-featured {
  color: var(--clay);
  background: rgba(184,70,42,.06);
}
.comparison-table th[scope="row"] {
  text-align: left;
  color: var(--ink-2);
  font-weight: 500;
  font-size: .88rem;
  background: transparent;
  text-transform: none;
  letter-spacing: 0;
}
.comparison-table tbody tr:last-child td,
.comparison-table tbody tr:last-child th { border-bottom: 0; }
.comparison-table tbody tr:hover { background: var(--paper); }
.comparison-table td.yes {
  color: var(--forest);
  font-weight: 700;
  font-size: 1rem;
}
.comparison-table td.no {
  color: var(--ink-faint);
}
.comparison-table td small { color: var(--ink-faint); font-size: .78em; }

/* Legacy compare table (blog compat) */
.compare-table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--rule); }
.compare-table { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--paper-soft); }
.compare-table th, .compare-table td { padding: .85rem 1rem; text-align: left; border-bottom: 1px solid var(--rule-soft); }
.compare-table thead th { background: var(--paper-2); font-weight: 700; color: var(--ink); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
.compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table td.yes { color: var(--forest); font-weight: 700; }
.compare-table td.no  { color: var(--ink-faint); }
.compare-tag { display: inline-block; font-size: .7rem; font-weight: 600; padding: .1em .5em; border-radius: 999px; background: var(--paper-2); color: var(--ink-muted); margin-left: .35rem; }
.compare-tag.accent { background: var(--clay-ghost); color: var(--clay); }

/* ---------------------------------------------------------
   13. Pricing
--------------------------------------------------------- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 920px;
  margin: 1rem auto 0;
}
@media (min-width: 640px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px) { .pricing-grid { grid-template-columns: repeat(3, 1fr); } }

.pricing-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 2rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  transition: all var(--trans);
  position: relative;
}
.pricing-card:hover {
  border-color: var(--rule-bold);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.pricing-card--featured {
  border-color: var(--clay);
  background: linear-gradient(170deg, var(--paper-soft) 0%, rgba(232,184,74,.22) 100%);
  box-shadow: 0 0 0 3px rgba(184,70,42,.1), var(--shadow);
  transform: scale(1);
}
@media (min-width: 920px) {
  .pricing-card--featured { transform: scale(1.035); }
  .pricing-card--featured:hover { transform: scale(1.035) translateY(-4px); }
}
.pricing-card--featured::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--clay), var(--butter));
}

.pricing-tier {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--ink-muted);
  margin-bottom: .75rem;
}
.pricing-card--featured .pricing-tier { color: var(--clay); }

.pricing-price {
  font-family: var(--serif);
  font-variation-settings: "opsz" 144, "SOFT" 60, "wght" 500;
  font-size: 2.9rem;
  letter-spacing: -.035em;
  line-height: 1;
  margin-bottom: .3rem;
  color: var(--ink);
}
.pricing-mo {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0;
}
.pricing-cycle {
  font-size: .8rem;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}
.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  margin-bottom: 1.75rem;
  flex: 1;
}
.pricing-features li {
  font-size: .9rem;
  color: var(--ink-2);
  padding-left: 1.55rem;
  position: relative;
  line-height: 1.4;
}
.pricing-features li::before {
  content: '';
  position: absolute;
  left: 0; top: .55rem;
  width: 12px; height: 2px;
  background: var(--clay);
}
.pricing-features li small { color: var(--ink-faint); }

.pricing-card .btn {
  width: 100%;
  justify-content: center;
}
.pricing-note {
  text-align: center;
  font-size: .8rem;
  color: var(--ink-muted);
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}

/* ---------------------------------------------------------
   14. FAQ
--------------------------------------------------------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: 1rem;
}
details {
  background: var(--paper-soft);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all var(--trans);
}
details:hover { border-color: var(--rule-bold); }
details[open] {
  border-color: var(--clay);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
summary {
  padding: 1.1rem 1.25rem;
  font-family: var(--serif);
  font-variation-settings: "opsz" 36, "SOFT" 100, "wght" 500;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--ink);
  user-select: none;
  line-height: 1.35;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '';
  width: 12px;
  height: 12px;
  border-right: 1.5px solid var(--clay);
  border-bottom: 1.5px solid var(--clay);
  transform: rotate(45deg);
  margin-right: 4px;
  margin-top: -4px;
  flex-shrink: 0;
  transition: transform var(--trans);
}
details[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 4px;
}
.faq-answer {
  padding: 0 1.25rem 1.25rem;
  font-size: .92rem;
  color: var(--ink-2);
  line-height: 1.7;
}
.faq-answer code {
  background: var(--paper-2);
  color: var(--clay-deep);
}

/* ---------------------------------------------------------
   15. Final CTA
--------------------------------------------------------- */
#final-cta {
  background: var(--paper-2);
  padding-top: clamp(3rem, 8vw, 5rem);
  padding-bottom: clamp(4rem, 10vw, 7rem);
  border-top: 1px solid var(--rule);
}
.final-card {
  background: var(--paper-soft);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(2rem, 6vw, 3.5rem) clamp(1.25rem, 4vw, 2.5rem);
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.final-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  background: linear-gradient(155deg, transparent 70%, rgba(232,184,74,.35) 100%);
  pointer-events: none;
}
.final-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px; height: 76px;
  border-radius: 20px;
  background: linear-gradient(155deg, var(--butter), var(--clay-soft));
  color: var(--ink);
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 0 rgba(26,18,11,.1);
  position: relative;
  z-index: 1;
}
.final-card h2 {
  font-size: clamp(1.65rem, 5vw, 2.4rem);
  max-width: 20ch;
  margin: 0 auto 1rem;
  position: relative;
}
.final-card p {
  color: var(--ink-muted);
  margin-bottom: 1.75rem;
  position: relative;
}
.final-card .btn { position: relative; z-index: 1; }
.final-note {
  margin-top: 1.25rem;
  font-size: .8rem;
  color: var(--ink-faint);
}

/* ---------------------------------------------------------
   16. Footer
--------------------------------------------------------- */
footer {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(2.5rem, 6vw, 4rem) var(--page-pad) 1.5rem;
  border-top: 4px solid var(--clay);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.25rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(247,241,227,.08);
}
@media (min-width: 640px) {
  .footer-inner { grid-template-columns: 1.4fr 2fr; }
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
footer .nav-logo { color: var(--paper); }
footer .nav-logo:hover { color: var(--paper); }
footer .nav-logo-word { color: var(--paper); }
.footer-tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: .95rem;
  color: var(--ink-faint);
  max-width: 28ch;
  line-height: 1.5;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 480px) { .footer-cols { grid-template-columns: 1fr 1fr; } }

.footer-col h4 {
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--ink-faint);
  margin-bottom: .85rem;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.footer-col a {
  color: var(--paper-soft);
  font-size: .9rem;
  transition: color var(--trans);
}
.footer-col a:hover { color: var(--butter); text-decoration: none; }

.footer-bottom {
  max-width: var(--max-w);
  margin: 1.5rem auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: .8rem;
  color: var(--ink-faint);
  align-items: center;
}
.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a { color: var(--ink-faint); transition: color var(--trans); font-size: .82rem; }
.footer-links a:hover { color: var(--butter); text-decoration: none; }

/* ---------------------------------------------------------
   17. Nudge toast
--------------------------------------------------------- */
#nudge-toast {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  left: 1rem;
  z-index: 160;
  max-width: 380px;
  margin: 0 auto;
  background: var(--ink);
  color: var(--paper-soft);
  border: 1px solid rgba(247,241,227,.1);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px -12px rgba(26,18,11,.6);
  padding: 1rem 1.1rem;
  transform: translateY(calc(100% + 4rem));
  opacity: 0;
  transition: transform .45s cubic-bezier(.34,1.3,.64,1), opacity .35s ease;
  pointer-events: none;
}
@media (min-width: 640px) {
  #nudge-toast {
    left: auto;
    margin: 0;
  }
}
#nudge-toast.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
#nudge-toast::before {
  content: '';
  position: absolute;
  top: 0; left: 20px; right: 20px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--clay), var(--butter), transparent);
}

.nudge-inner {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.nudge-msg {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .88rem;
  color: var(--paper-soft);
  line-height: 1.4;
}
.nudge-msg strong { color: var(--butter); font-weight: 600; }
.nudge-emoji { font-size: 1.05rem; flex-shrink: 0; }
.nudge-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.nudge-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .85rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--trans);
  text-decoration: none;
}
.nudge-btn:hover { text-decoration: none; transform: translateY(-1px); }
.nudge-btn-primary {
  background: var(--butter);
  color: var(--ink);
}
.nudge-btn-primary:hover { background: var(--paper-soft); }
.nudge-btn-secondary {
  background: transparent;
  color: var(--paper-soft);
  border: 1px solid rgba(247,241,227,.22);
}
.nudge-btn-secondary:hover { background: rgba(247,241,227,.08); color: var(--paper-soft); }
.nudge-dismiss {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--ink-faint);
  font-size: 1rem;
  cursor: pointer;
  padding: .2rem .4rem;
  border-radius: 6px;
  transition: color var(--trans);
}
.nudge-dismiss:hover { color: var(--paper); }

/* ---------------------------------------------------------
   18. Sticky bottom bar
--------------------------------------------------------- */
#bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  z-index: 150;
  background: rgba(26,18,11,.94);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-top: 1px solid rgba(247,241,227,.1);
  box-shadow: 0 -6px 22px -8px rgba(26,18,11,.6);
  transform: translateY(110%);
  transition: transform .5s cubic-bezier(.34,1.3,.64,1);
  padding: env(safe-area-inset-bottom, 0) 0 0;
}
#bottom-bar.bb-visible { transform: translateY(0); }
#bottom-bar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--clay), var(--butter), var(--clay));
  background-size: 200% 100%;
  animation: bb-slide 3.5s linear infinite;
}
@keyframes bb-slide {
  0%   { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

.bb-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: .75rem 1rem;
  max-width: var(--max-w);
  margin: 0 auto;
  flex-wrap: wrap;
  color: var(--paper-soft);
}
.bb-copy {
  font-size: .85rem;
  color: var(--paper-soft);
  opacity: .9;
  display: none;
  flex-shrink: 1;
}
.bb-copy strong { color: var(--butter); font-weight: 600; }
.bb-note {
  font-size: .75rem;
  color: var(--ink-faint);
  display: none;
}
.bb-cta {
  flex: 1;
  justify-content: center;
  background: var(--butter);
  color: var(--ink);
  border-color: var(--butter);
  min-width: 220px;
  max-width: 100%;
  box-shadow: 0 2px 0 rgba(26,18,11,.22);
}
.bb-cta:hover {
  background: var(--paper-soft);
  border-color: var(--paper-soft);
  color: var(--ink);
}

@media (min-width: 720px) {
  .bb-copy { display: inline; }
  .bb-note { display: inline; }
  .bb-cta  { flex: none; }
  .bb-inner { gap: 1.1rem; padding: .85rem 1.25rem; }
}

/* ---------------------------------------------------------
   19. Animations
--------------------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes float-card {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-9px); }
}
@keyframes row-enter {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes faq-open {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes value-pop {
  0%   { transform: scale(1); }
  42%  { transform: scale(1.04); color: var(--clay); }
  100% { transform: scale(1); }
}

/* ── Scroll-reveal system (JS-driven via IntersectionObserver) ── */
@media (prefers-reduced-motion: no-preference) {
  .will-reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .65s var(--ease-soft), transform .65s var(--ease-soft);
  }
  .will-reveal.is-revealed {
    opacity: 1;
    transform: translateY(0);
  }
  /* stagger delays for sibling groups */
  .reveal-group .will-reveal:nth-child(2) { transition-delay: .09s; }
  .reveal-group .will-reveal:nth-child(3) { transition-delay: .18s; }
  .reveal-group .will-reveal:nth-child(4) { transition-delay: .27s; }
  .reveal-group .will-reveal:nth-child(5) { transition-delay: .34s; }
  .reveal-group .will-reveal:nth-child(6) { transition-delay: .40s; }

  /* ingredient row entrance */
  .ingredient-row.row-new {
    animation: row-enter .28s var(--ease-soft) both;
  }

  /* FAQ answer fade-in when opened */
  details[open] .faq-answer {
    animation: faq-open .22s var(--ease-soft) both;
  }

  /* result value emphasis on each calculation */
  .summary-value.value-pop {
    animation: value-pop .45s var(--ease-soft) both;
  }

  /* demo card looping float — desktop only */
  .demo-card.is-floating {
    animation: float-card 5.5s ease-in-out infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------
   20. Responsive refinements (mobile-first already)
--------------------------------------------------------- */
@media (min-width: 860px) {
  .hero-inner {
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(2rem, 5vw, 4rem);
  }
  .hero-demo { justify-self: end; }
  .demo-card { margin: 0; }
  .hero-scroll { display: flex; }
}

@media (max-width: 480px) {
  .hero-scroll { display: none; }
  .demo-card { transform: rotate(.3deg); max-width: 100%; }
  h1 em, .handwritten { display: inline-block; }
  #hero { padding-top: 2rem; }
  .format-pills { gap: .4rem; }
  .format-pill { font-size: .7rem; padding: .25rem .65rem; }
  .hero-ctas .btn { width: 100%; }
  .hero-note { text-align: center; width: 100%; }

  /* Demo card on small screens */
  .demo-head { padding: 1.1rem 1.15rem .9rem; }
  .demo-head-title { font-size: 1.25rem; }
  .demo-ings { padding: .7rem 1.15rem .55rem; }
  .demo-result { padding: .7rem 1.15rem .85rem; }
  .demo-footer { padding: .55rem 1.15rem; }

  /* Better touch targets */
  .row-del {
    width: 40px;
    height: 40px;
  }

  /* Results action buttons: 2-column grid on mobile */
  .results-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
  }
  .results-actions .btn {
    width: 100%;
    justify-content: center;
    font-size: .82rem;
    padding: .75rem .6rem;
  }
  .results-actions .btn-ghost,
  .results-actions #copy-link-btn {
    grid-column: 1 / -1;
  }
  .copy-feedback {
    grid-column: 1 / -1;
    text-align: center;
  }

  /* Calc button full-width on mobile */
  #calculate-btn { width: 100%; }

  /* Fewer padding on tool card */
  .tool-card { padding: 1rem; }
}

@media (max-width: 360px) {
  :root { --page-pad: .9rem; }
  .nav-logo-word { display: none; }
  .nav-cta { padding: .45rem .9rem; font-size: .78rem; }
  h1 { font-size: 2.1rem; }
}

/* ---------------------------------------------------------
   21. Blog page shims (legacy class support)
--------------------------------------------------------- */
.blog-wrap {
  max-width: 760px;
  margin: clamp(4rem, 10vw, 6rem) auto clamp(3rem, 8vw, 4rem);
  padding: 0 var(--page-pad);
  line-height: 1.75;
  color: var(--ink-2);
}
.blog-wrap h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -.025em;
  margin-bottom: .5rem;
  color: var(--ink);
}
.blog-wrap h2 {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 4vw, 1.75rem);
  margin: 2.5rem 0 .85rem;
  color: var(--ink);
}
.blog-wrap h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin: 1.75rem 0 .5rem;
  color: var(--ink);
}
.blog-wrap p {
  font-size: 1.02rem;
  color: var(--ink-2);
  margin-bottom: 1rem;
}
.blog-wrap .meta {
  color: var(--ink-muted);
  font-size: .9rem;
  margin-bottom: 2rem;
  font-family: var(--sans);
  letter-spacing: .02em;
}
.blog-wrap a { color: var(--clay); }
.blog-wrap ul, .blog-wrap ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}
.blog-wrap li { margin-bottom: .35rem; }
.blog-wrap code {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: .1em .4em;
  border-radius: var(--radius-xs);
  color: var(--clay-deep);
}
.blog-wrap blockquote {
  border-left: 3px solid var(--clay);
  padding: .5rem 0 .5rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--ink-muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .85rem;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
  transition: color var(--trans);
}
.back-link:hover { color: var(--clay); text-decoration: none; }

.blog-cta {
  margin: 2.5rem 0;
  padding: 1.75rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  text-align: center;
}

.blog-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.blog-list li {
  padding: 1.25rem 1.35rem;
  background: var(--paper-soft);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  transition: all var(--trans);
}
.blog-list li:hover { border-color: var(--clay); transform: translateY(-2px); box-shadow: var(--shadow); }
.blog-list a { color: var(--ink); font-weight: 600; font-family: var(--serif); font-size: 1.1rem; }
.blog-list a:hover { color: var(--clay); }

/* ---------------------------------------------------------
   22. Legacy class shims (kept for app.js states)
--------------------------------------------------------- */
.bg-blobs { display: none; } /* retired */
.blob { display: none; }

/* ---------------------------------------------------------
   23. Mobile hamburger menu
--------------------------------------------------------- */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 4px;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: var(--radius-xs);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--trans);
}
.nav-hamburger:hover { border-color: var(--rule-bold); }
@media (min-width: 720px) {
  .nav-hamburger { display: none; }
}

.ham-line {
  display: block;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transform-origin: center;
  transition: transform .25s var(--ease-soft), opacity .2s ease;
}
.nav-hamburger.is-open .ham-line:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.is-open .ham-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.is-open .ham-line:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 99;
  background: rgba(247,241,227,.97);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 8px 24px -8px rgba(26,18,11,.18);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: transform .28s var(--ease-soft), opacity .22s ease, visibility 0s .28s;
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: transform .28s var(--ease-soft), opacity .22s ease, visibility 0s 0s;
}
@media (min-width: 720px) {
  .mobile-menu { display: none !important; }
}

.mobile-menu-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.25rem var(--page-pad) 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.mobile-nav-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--ink);
  color: var(--paper-soft);
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .65rem;
  transition: background var(--trans);
  text-decoration: none;
}
.mobile-nav-cta:hover { background: var(--clay); text-decoration: none; color: var(--paper-soft); }

.mobile-nav-links {
  display: flex;
  flex-direction: column;
}
.mobile-nav-link {
  padding: .8rem .25rem;
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink-2);
  border-bottom: 1px solid var(--rule-soft);
  transition: color var(--trans);
  text-decoration: none;
}
.mobile-nav-link:hover { color: var(--clay); text-decoration: none; }
.mobile-nav-links a:last-child { border-bottom: none; }

.mobile-menu-note {
  margin-top: 1rem;
  font-size: .78rem;
  color: var(--ink-faint);
  text-align: center;
  font-family: var(--mono);
}

/* ---------------------------------------------------------
   24. Margin bar (results price card)
--------------------------------------------------------- */
.margin-bar {
  min-width: 180px;
  flex: 1;
}
@media (max-width: 639px) {
  .margin-bar { margin-top: 1rem; }
}

.margin-bar-track {
  width: 100%;
  height: 8px;
  background: var(--forest-soft);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: .4rem;
  position: relative;
}
.margin-bar-cost {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--ink-faint);
  border-radius: 999px 0 0 999px;
  width: 35%;
  transition: width .6s cubic-bezier(.2,.6,.2,1);
}
.margin-bar-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: .66rem;
  color: var(--ink);
  opacity: .65;
  letter-spacing: .02em;
}

/* ---------------------------------------------------------
   25. Footer trust strip + operator info
--------------------------------------------------------- */
.footer-trust-strip {
  background: rgba(26,18,11,.96);
  border-bottom: 1px solid rgba(247,241,227,.06);
  padding: .75rem var(--page-pad);
}
.footer-trust-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem .9rem;
  justify-content: center;
}
.ft-item {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 500;
  color: var(--ink-faint);
  letter-spacing: .01em;
}
.ft-sep {
  color: rgba(247,241,227,.18);
  font-size: .8rem;
}

.footer-operator {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.footer-operator p {
  font-size: .78rem;
  color: rgba(247,241,227,.35);
  line-height: 1.5;
}
.footer-operator p strong { color: rgba(247,241,227,.55); font-weight: 600; }
.footer-support-link {
  font-size: .78rem;
  color: var(--butter);
  opacity: .8;
  transition: opacity var(--trans);
}
.footer-support-link:hover { opacity: 1; text-decoration: none; }

.footer-pay-methods {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.footer-pay-label {
  font-family: var(--sans);
  font-size: .64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--ink-faint);
}
.footer-pay-cards {
  font-size: .78rem;
  color: rgba(247,241,227,.35);
  font-family: var(--mono);
  letter-spacing: .02em;
}

/* ---------------------------------------------------------
   26. Ingredient row — save-to-library button
--------------------------------------------------------- */
.row-actions {
  display: flex;
  align-items: center;
  gap: .3rem;
}

.row-save {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink-muted);
  border-radius: var(--radius-xs);
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: .85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--trans);
  flex-shrink: 0;
}
.row-save:hover:not(:disabled) {
  border-color: var(--butter-deep);
  background: rgba(232,184,74,.15);
}
.row-save:disabled { opacity: .45; cursor: not-allowed; }

@media (max-width: 480px) {
  .row-save { width: 40px; height: 40px; }
}

/* ---------------------------------------------------------
   27. Presets modal list
--------------------------------------------------------- */
.presets-list-wrap {
  min-height: 80px;
  margin: .25rem 0 1rem;
}

.presets-loading {
  font-size: .9rem;
  color: var(--ink-muted);
  text-align: center;
  padding: 1.5rem 0;
}

.presets-empty {
  text-align: center;
  padding: 1.5rem 0;
}
.presets-empty p {
  font-size: .9rem;
  color: var(--ink-muted);
  margin-bottom: .35rem;
}

.presets-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  max-height: 300px;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--clay) var(--paper-2);
}
.presets-list::-webkit-scrollbar { width: 5px; }
.presets-list::-webkit-scrollbar-track { background: var(--paper-2); border-radius: 3px; }
.presets-list::-webkit-scrollbar-thumb { background: var(--rule-bold); border-radius: 3px; }

.preset-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem .9rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-xs);
  transition: border-color var(--trans);
}
.preset-item:has(.preset-cb:checked) {
  border-color: var(--clay);
  background: var(--clay-ghost);
}

.preset-check-label {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex: 1;
  cursor: pointer;
  min-width: 0;
}
.preset-check-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--clay);
  flex-shrink: 0;
  cursor: pointer;
}
.preset-name {
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preset-meta {
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--ink-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.preset-del {
  background: transparent;
  border: none;
  color: var(--ink-faint);
  font-size: .85rem;
  cursor: pointer;
  padding: .2rem .4rem;
  border-radius: var(--radius-xs);
  transition: color var(--trans);
  flex-shrink: 0;
  line-height: 1;
}
.preset-del:hover { color: var(--error); }

.presets-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: .75rem;
  border-top: 1px solid var(--rule-soft);
}

.presets-sel-count {
  font-size: .82rem;
  color: var(--ink-muted);
  font-family: var(--mono);
}

/* ---------------------------------------------------------
   28. Key recovery section (inside gate modal)
--------------------------------------------------------- */
.recover-section {
  margin-top: .85rem;
}

.recover-toggle {
  background: none;
  border: none;
  padding: 0;
  font-size: .82rem;
  color: var(--ink-faint);
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--trans);
}
.recover-toggle:hover { color: var(--ink-muted); }

.recover-form {
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px dashed var(--rule-bold);
}

/* 29. Blog pages */
.blog-wrap {
  max-width: 760px;
  margin: 7rem auto 5rem;
  padding: 0 1.5rem;
  line-height: 1.75;
}
.blog-wrap h1 { font-size: 2.05rem; line-height: 1.2; margin-bottom: .4rem; }
.blog-wrap .meta { color: var(--text-muted); font-size: .85rem; margin-bottom: 2rem; display: block; }
.blog-wrap h2 { font-size: 1.3rem; margin-top: 2.2rem; margin-bottom: .5rem; color: var(--butter-deep); }
.blog-wrap h3 { font-size: 1.05rem; margin-top: 1.5rem; margin-bottom: .3rem; }
.blog-wrap p  { margin-bottom: .9rem; }
.blog-wrap ul, .blog-wrap ol { padding-left: 1.4rem; margin-bottom: .9rem; }
.blog-wrap li { margin-bottom: .35rem; }
.blog-wrap code {
  background: var(--paper-2);
  padding: .1rem .4rem;
  border-radius: 4px;
  font-size: .85em;
  font-family: 'JetBrains Mono', monospace;
}
.blog-wrap table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; }
.blog-wrap th, .blog-wrap td {
  padding: .55rem .75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: .9rem;
}
.blog-wrap th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.blog-cta {
  background: var(--clay-ghost);
  border: 1px solid rgba(184,70,42,.3);
  padding: 1.25rem 1.5rem;
  border-radius: 10px;
  margin: 2rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.blog-cta strong { display: block; font-size: 1.05rem; margin-bottom: .2rem; }
.blog-cta small  { color: var(--text-muted); font-size: .82rem; }
.blog-list { list-style: none; padding: 0; }
.blog-list li { padding: .9rem 0; border-bottom: 1px solid var(--border); }
.blog-list a { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 1.05rem; }
.blog-list a:hover { text-decoration: underline; }
.blog-list span { display: block; color: var(--text-muted); font-size: .85rem; margin-top: .15rem; }
.back-link { display: inline-block; margin-bottom: 1.5rem; color: var(--text-muted); text-decoration: none; font-size: .9rem; }
.back-link:hover { color: var(--accent); }

/* 30. Inline license panel */
.license-panel {
  margin: 1rem 0 .5rem;
  padding: .75rem 1rem;
  border: 1px dashed var(--rule-bold);
  border-radius: 8px;
  font-size: .85rem;
}
.lp-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text-muted);
  font-size: .85rem;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.lp-toggle:hover { color: var(--ink-body); }
.lp-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .6rem;
  flex-wrap: wrap;
}
.lp-row input {
  flex: 1;
  min-width: 220px;
  font-size: .82rem;
  padding: .4rem .7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-body);
  font-family: 'JetBrains Mono', monospace;
}
.lp-row input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.lp-feedback {
  margin: .4rem 0 0;
  font-size: .82rem;
}
#lp-active {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .3rem;
}
.lp-badge {
  font-size: .85rem;
  color: var(--success);
  font-weight: 600;
}
.lp-remove {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text-muted);
  font-size: .8rem;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.lp-remove:hover { color: var(--error); }

/* ---------------------------------------------------------
   31. Feedback section
--------------------------------------------------------- */
#feedback {
  padding: clamp(3rem, 8vw, 5.5rem) 0;
}

.feedback-card {
  background: var(--paper-soft);
  border: 1px solid var(--rule-bold);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 6vw, 2.5rem) clamp(1.25rem, 5vw, 2rem);
  text-align: center;
  max-width: 520px;
  margin: 2rem auto 0;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.feedback-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--clay), var(--butter), var(--clay-soft));
}

.feedback-subtitle {
  color: var(--ink-muted);
  font-size: clamp(.85rem, 2.5vw, .95rem);
  line-height: 1.55;
  margin-bottom: 1.75rem;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

.fb-stars {
  display: flex;
  gap: clamp(.25rem, 2vw, .65rem);
  justify-content: center;
  margin-bottom: .6rem;
}

.fb-star {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-faint);
  padding: .2rem;
  border-radius: 6px;
  transition: color .16s ease, transform .18s var(--ease-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-width: 44px;
  min-height: 44px;
  flex-shrink: 0;
}
.fb-star:hover,
.fb-star.hover  { color: var(--butter-deep); transform: scale(1.12); }
.fb-star.active { color: var(--butter); }
.fb-star.pop    { animation: fb-star-pop .32s var(--ease-soft); }

@keyframes fb-star-pop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.38) rotate(-6deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.fb-hint {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: var(--ink-faint);
  letter-spacing: .02em;
  padding: 0 .3rem;
  margin-top: .15rem;
}

.fb-comment-wrap {
  margin-top: 1.4rem;
  text-align: left;
  animation: fadeUp .3s var(--ease-soft);
}

.fb-rating-label {
  font-family: var(--serif);
  font-style: italic;
  color: var(--clay);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: .85rem;
  text-align: center;
  font-variation-settings: "opsz" 20, "SOFT" 60;
}

.fb-comment {
  width: 100%;
  padding: .75rem 1rem;
  border: 1px solid var(--rule-bold);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: .9rem;
  resize: vertical;
  min-height: 84px;
  transition: border-color var(--trans);
  margin-bottom: 1rem;
  display: block;
}
.fb-comment:focus {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
  border-color: transparent;
}
.fb-comment::placeholder { color: var(--ink-faint); }

.fb-thanks {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  padding: .75rem 0 .25rem;
  animation: fadeUp .3s var(--ease-soft);
}
.fb-thanks-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--forest-soft);
  color: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fb-thanks-text {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.fb-thanks-text strong {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  font-variation-settings: "opsz" 20, "SOFT" 50;
  display: block;
}
.fb-thanks-text span {
  font-size: .85rem;
  color: var(--ink-muted);
}

/* ---------------------------------------------------------
   32. Save / Bookmark widget
--------------------------------------------------------- */
.save-widget {
  position: fixed;
  right: 1rem;
  bottom: 1.25rem;
  z-index: 130;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .45rem;
  transition: bottom .3s var(--ease-soft);
}

.save-widget-btn {
  display: flex;
  align-items: center;
  gap: .42rem;
  padding: .5rem .9rem .5rem .72rem;
  background: var(--ink);
  color: var(--paper-soft);
  border: 1px solid rgba(247,241,227,.12);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 4px 16px -4px rgba(26,18,11,.5);
  transition: background var(--trans), transform var(--trans), box-shadow var(--trans);
  white-space: nowrap;
}
.save-widget-btn:hover {
  background: var(--clay);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px -6px rgba(184,70,42,.45);
}
.save-widget-btn.saved   { background: var(--forest); }
.save-widget-btn svg     { flex-shrink: 0; transition: transform .2s ease; }
.save-widget-btn:hover svg { transform: rotate(-8deg) scale(1.1); }

.save-tip {
  background: var(--ink-2);
  color: var(--paper-soft);
  border: 1px solid rgba(247,241,227,.08);
  border-radius: var(--radius-sm);
  padding: .55rem .85rem;
  font-size: .76rem;
  line-height: 1.5;
  box-shadow: 0 4px 14px -4px rgba(26,18,11,.4);
  text-align: center;
  max-width: 200px;
  position: relative;
  animation: fb-tip-in .25s var(--ease-soft);
}
.save-tip::after {
  content: '';
  position: absolute;
  bottom: -5px;
  right: 20px;
  width: 10px;
  height: 5px;
  background: var(--ink-2);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.save-tip kbd {
  display: inline-block;
  background: rgba(247,241,227,.15);
  border: 1px solid rgba(247,241,227,.25);
  border-radius: 3px;
  padding: .05rem .35rem;
  font-family: var(--mono);
  font-size: .7rem;
  line-height: 1.6;
}

@keyframes fb-tip-in {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.save-tip-desktop { display: inline; }
.save-tip-mobile  { display: none; }

@media (hover: none) and (pointer: coarse) {
  .save-tip-desktop { display: none; }
  .save-tip-mobile  { display: inline; }
}

@media (min-width: 640px) {
  .save-widget {
    bottom: 2rem;
    right: 1.5rem;
  }
}

/* When bottom bar is visible, nudge save widget up */
.save-widget.above-bb {
  bottom: calc(4rem + 1rem);
}
