/* Blend Bench lab prototype. Builds on /herb-guides/assets/herb.css tokens.
   Accent (terracotta) marks actions only; amber is decoration only. */

.bb-badge{flex:none;display:inline-flex;align-items:center;padding:5px 10px;border-radius:999px;border:1px solid var(--line-2);font:700 11px/1 var(--body);letter-spacing:.12em;text-transform:uppercase;color:var(--amber)}

/* Hero */
.bb-hero{padding:clamp(24px,4vw,48px) 0 clamp(18px,2.6vw,28px);display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);grid-template-areas:"eye presets" "h1 presets" "lede presets";column-gap:clamp(24px,4vw,56px);align-items:start}
.bb-hero>.eyebrow{grid-area:eye}
.bb-hero>.bb-h1{grid-area:h1}
.bb-hero>.bb-lede{grid-area:lede;margin-bottom:0}
.bb-hero>.bb-presets{grid-area:presets;align-self:end}
.bb-h1{font:500 clamp(34px,4.6vw,56px)/1.02 var(--display);letter-spacing:-.03em;margin:0 0 14px;max-width:15em;text-wrap:balance}
.bb-h1 em{font-style:italic;font-weight:400;color:var(--amber)}
.bb-lede{font-size:clamp(16.5px,1.7vw,19px);line-height:1.55;color:var(--ink-2);max-width:40rem;margin:0 0 24px;text-wrap:pretty}
.bb-lede b{color:var(--ink)}
.bb-presets{display:grid;gap:10px}
.bb-presets-lbl{font:700 11.5px/1 var(--body);letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.bb-preset-row{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
.bb-preset{display:flex;align-items:center;gap:14px;min-width:0;text-align:left;padding:12px 14px;border-radius:var(--r-sm);border:1px solid var(--line-2);background:var(--bg-2);cursor:pointer;transition:border-color .2s,transform .2s var(--ease),background .2s}
.bb-preset:hover{border-color:var(--amber);transform:translateY(-2px);background:var(--surface)}
.bb-preset-imgs{flex:none;display:flex}
.bb-preset-imgs img{width:46px;height:46px;object-fit:contain;background:var(--photo);border-radius:10px;border:2px solid var(--bg-2);margin-left:-14px;box-shadow:var(--shadow-sm)}
.bb-preset-imgs img:first-child{margin-left:0}
.bb-preset-tx{display:flex;flex-direction:column;gap:3px;min-width:0}
.bb-preset-tx b{font:600 16.5px/1.2 var(--display)}
.bb-preset-tx span{font-size:13px;line-height:1.35;color:var(--ink-2)}
.bb-preset-tx em{font-style:normal;font-size:11.5px;line-height:1.35;color:var(--muted)}
@media (max-width:1040px){
  .bb-hero{grid-template-columns:minmax(0,1fr);grid-template-areas:"eye" "h1" "lede" "presets"}
  .bb-hero>.bb-lede{margin-bottom:22px}
  .bb-preset-row{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:860px){.bb-preset-row{grid-template-columns:1fr}.bb-preset{padding:10px 12px}}

/* Bench layout */
.bb-bench{display:grid;gap:18px;padding-bottom:clamp(40px,6vw,72px);
  grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);
  grid-template-areas:"shelf pot" "flavour pot";grid-template-rows:auto 1fr;align-items:start}
.bb-shelf-wrap{grid-area:shelf;min-width:0}
.bb-pot-col{grid-area:pot;display:flex;flex-direction:column;gap:14px;min-width:0;position:sticky;top:calc(var(--top) + 12px)}
.bb-flavour{grid-area:flavour}
.bb-pot-col .bb-pot{max-height:min(330px,40vh)}
@media (max-width:1040px){
  .bb-bench{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);grid-template-areas:"shelf shelf" "stage mix" "flavour flavour";grid-template-rows:none}
  .bb-pot-col{display:contents}
  .bb-stage{grid-area:stage}
  .bb-mix{grid-area:mix}
  .bb-pot-col .bb-pot{max-height:420px}
}
@media (max-width:700px){
  .bb-bench{grid-template-columns:minmax(0,1fr);grid-template-areas:"stage" "shelf" "mix" "flavour";gap:16px}
}

/* Shelf */
.bb-shelf-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:6px 18px;margin-bottom:12px}
.bb-shelf-head .lbl{margin:0}
.bb-hint{margin:0;font-size:13px;line-height:1.45;color:var(--muted)}
.bb-shelf{list-style:none;margin:0;padding:18px 18px 4px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));column-gap:12px;row-gap:16px;
  border:1px solid var(--line);border-radius:var(--r);background:linear-gradient(180deg,var(--bg-2),var(--surface))}
@media (max-width:1040px){.bb-shelf{grid-template-columns:repeat(auto-fill,minmax(112px,1fr))}}
@media (max-width:700px){
  .bb-shelf{grid-template-columns:none;grid-auto-flow:column;grid-template-rows:auto auto;grid-auto-columns:94px;overflow-x:auto;overscroll-behavior-x:contain;
    scroll-snap-type:x proximity;padding:14px 16px 6px;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
  .bb-jar-li{scroll-snap-align:start}
}
.bb-jar-li{position:relative;padding-bottom:12px;min-width:0}
.bb-jar-li::after{content:"";position:absolute;left:-7px;right:-7px;bottom:0;height:8px;border-radius:2px;background:linear-gradient(180deg,#6a4f37,#3b2b1e);box-shadow:0 7px 10px -5px rgba(0,0,0,.7)}
.bb-jar{position:relative;display:flex;flex-direction:column;align-items:center;width:100%;padding:0 0 4px;border:0;background:transparent;text-align:center;cursor:grab;
  touch-action:manipulation;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
.bb-jar-lid{position:relative;z-index:1;width:58%;height:11px;margin-bottom:-3px;border-radius:6px 6px 3px 3px;background:linear-gradient(180deg,#4a3a2c,#2a2019);border:1px solid var(--line-2);transition:transform .3s var(--ease)}
.bb-jar-glass{display:block;width:100%;aspect-ratio:4/3;padding:6px;background:var(--photo);border-radius:14px 14px 18px 18px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.06),var(--shadow-sm);transition:transform .3s var(--ease),box-shadow .3s}
.bb-jar-glass img{width:100%;height:100%;object-fit:contain;pointer-events:none}
.bb-jar-label{display:flex;flex-direction:column;gap:1px;margin-top:8px;min-width:0;width:100%}
.bb-jar-label b{font:600 14px/1.2 var(--display);overflow-wrap:anywhere}
.bb-jar-label i{font-style:normal;font-size:11px;line-height:1.3;color:var(--muted);letter-spacing:.04em}
.bb-jar-dots{display:flex;gap:4px;margin-top:6px}
.bb-jar-dots i{width:7px;height:7px;border-radius:50%;border:1px solid var(--line-2);transition:background .25s,border-color .25s,transform .25s var(--ease)}
.bb-jar-dots i.on{background:var(--herb);border-color:var(--herb);transform:scale(1.15)}
.bb-jar:hover .bb-jar-glass{transform:translateY(-4px)}
.bb-jar:hover .bb-jar-lid{transform:translateY(-6px) rotate(-4deg)}
.bb-jar.is-in .bb-jar-glass{box-shadow:0 0 0 2px var(--herb),var(--shadow-sm)}
.bb-jar.is-locked .bb-jar-glass img{filter:grayscale(1);opacity:.45}
.bb-jar.is-locked .bb-jar-label,.bb-jar.is-locked .bb-jar-lid{opacity:.5}
.bb-jar.is-locked:hover .bb-jar-glass,.bb-jar.is-locked:hover .bb-jar-lid{transform:none}
.bb-jar.is-lifted{opacity:.35}
.bb-jar.is-bump .bb-jar-glass{animation:bb-bump .42s var(--ease)}
@keyframes bb-bump{0%,100%{transform:none}25%{transform:translateX(-5px)}50%{transform:translateX(4px)}75%{transform:translateX(-2px)}}
.bb-jar:focus-visible{outline:none}
.bb-jar:focus-visible .bb-jar-glass{box-shadow:0 0 0 3px var(--accent),var(--shadow-sm)}

/* Drag ghost */
.bb-ghost{position:fixed;left:0;top:0;z-index:100;width:88px;aspect-ratio:4/3;padding:5px;background:var(--photo);border-radius:14px;box-shadow:0 0 0 2px var(--herb),0 24px 40px -12px rgba(0,0,0,.8);pointer-events:none;will-change:transform}
.bb-ghost img{width:100%;height:100%;object-fit:contain}
body.bb-dragging,body.bb-dragging *{cursor:grabbing!important;-webkit-user-select:none;user-select:none}

/* Pot stage */
.bb-stage{position:relative;min-width:0;padding:16px 12px 10px;border:1px solid var(--line);border-radius:var(--r);
  background:radial-gradient(ellipse at 50% 88%,var(--surface-2),var(--bg-2) 72%);transition:border-color .25s,box-shadow .25s}
.bb-stage::after{content:"";position:absolute;left:0;right:0;bottom:0;height:46px;border-radius:0 0 var(--r) var(--r);background:linear-gradient(180deg,rgba(106,79,55,.0),rgba(106,79,55,.22));pointer-events:none}
.bb-stage.is-over{border-color:var(--amber);box-shadow:0 0 0 4px var(--amber-soft)}
.bb-pot{display:block;width:100%;height:auto;max-height:420px;overflow:visible}
.bb-stage.is-plop .bb-pot{animation:bb-plop .45s var(--ease)}
@keyframes bb-plop{0%,100%{transform:none}35%{transform:translateY(2px) scaleY(.995)}}
.bb-canvas{position:absolute;inset:0;pointer-events:none}
.bb-glass-stroke{stroke:rgba(243,234,219,.3)}
.bb-glass-body{stroke:rgba(243,234,219,.42);stroke-width:3}
.bb-glass-rim{stroke:rgba(243,234,219,.42);stroke-width:2.5}
.bb-lid{transform-origin:250px 86px;transition:transform .55s var(--ease)}
.bb-lid.open{transform:translate(46px,-30px) rotate(18deg)}
.bb-lid-dome{fill:rgba(243,234,219,.09);stroke:rgba(243,234,219,.42);stroke-width:2.5}
.bb-lid-knob{fill:var(--amber);opacity:.9}
.bb-liquid{transform:translateY(345px);transition:transform 2.8s cubic-bezier(.3,.6,.2,1)}
.bb-liquid.on{transform:translateY(148px)}
#liquid-fill{opacity:.82;transition:fill 1.8s linear}
.bb-empty-text{fill:var(--muted);font:600 15px var(--body);letter-spacing:.02em;transition:opacity .3s}
.bb-timer{position:absolute;left:16px;top:14px;font:500 34px/1 var(--display);font-variant-numeric:tabular-nums;color:var(--ink)}
.bb-timer small{display:block;margin-top:4px;font:700 10.5px/1.3 var(--body);letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.bb-pot-note{position:relative;z-index:1;margin:4px 0 0;text-align:center;font-size:11.5px;line-height:1.4;color:var(--muted)}

/* Mix card */
.bb-mix,.bb-flavour{min-width:0;padding:20px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface)}
.bb-mix-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.bb-mix-head .lbl{margin:0}
.bb-count{font:600 13px/1 var(--body);color:var(--muted)}
.bb-mix-list{list-style:none;margin:14px 0 0;padding:0;display:grid;gap:10px}
.bb-mix-empty{padding:14px;border:1px dashed var(--line-2);border-radius:var(--r-sm);font-size:14px;color:var(--muted);text-align:center}
.bb-mix-row{display:grid;grid-template-columns:12px minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px 10px 10px 12px;border-radius:var(--r-sm);background:var(--bg-2);border:1px solid var(--line)}
.bb-swatch{display:inline-block;flex:none;width:12px;height:12px;border-radius:50%;background:var(--herb);box-shadow:0 0 0 3px color-mix(in srgb,var(--herb) 22%,transparent)}
.bb-mix-name{min-width:0;display:flex;flex-direction:column;gap:2px}
.bb-mix-name b{font:600 15px/1.25 var(--display)}
.bb-mix-name span{font-size:12.5px;line-height:1.4;color:var(--muted)}
.bb-stepper{display:inline-flex;align-items:center;gap:6px}
.bb-stepper output{min-width:1.6ch;text-align:center;font:500 20px/1 var(--display);font-variant-numeric:tabular-nums}
.bb-step{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;border:1px solid var(--line-2);background:transparent;cursor:pointer;transition:background .2s,border-color .2s}
.bb-step:hover{background:var(--surface-2);border-color:var(--ink-2)}
.bb-step svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.bb-step[aria-disabled="true"]{opacity:.35;cursor:not-allowed}
.bb-tip{margin:14px 0 0;padding:11px 14px;border-left:3px solid var(--amber);border-radius:0 12px 12px 0;background:var(--amber-soft);font-size:14px;line-height:1.5;color:var(--ink-2)}
.bb-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.bb-actions .btn-accent{flex:1 1 100%}
.bb-actions .btn-sm{flex:1 1 0}
.btn[aria-disabled="true"]{opacity:.5;cursor:not-allowed;transform:none}

/* Flavour chart */
.bb-flavour .lbl{margin:0 0 6px}
.bb-flavour-head{margin:0 0 14px;font:500 20px/1.25 var(--display);color:var(--ink);text-wrap:balance}
.bb-bars{list-style:none;margin:0 0 14px;padding:0;display:grid;gap:9px}
.bb-bars li{display:grid;grid-template-columns:62px minmax(0,1fr) 22px;gap:10px;align-items:center;font-size:13.5px;transition:opacity .3s}
.bb-bars li.is-zero{opacity:.5}
.bb-bar-lbl{color:var(--ink-2);font-weight:600}
.bb-bar-track{display:flex;height:12px;border-radius:6px;background:var(--line);overflow:hidden}
.bb-bar-track i{flex:none;height:100%;transition:width .5s var(--ease)}
.bb-bar-track i+i{box-shadow:inset 2px 0 0 var(--surface)}
.bb-bars b{text-align:right;font-variant-numeric:tabular-nums}
.bb-flavour .small{margin:0}

/* Section heads */
.bb-explain,.bb-shop{padding:clamp(44px,7vw,88px) 0;border-top:1px solid var(--line);scroll-margin-top:calc(var(--top) + 8px)}
.bb-explain:focus{outline:none}
.bb-sec-head{max-width:44rem;margin-bottom:24px}
.bb-h2{font:500 clamp(30px,4.2vw,46px)/1.05 var(--display);letter-spacing:-.025em;margin:0 0 10px}
.bb-h3{font:500 clamp(22px,2.6vw,28px)/1.15 var(--display);margin:0 0 6px}
.bb-sub{margin:0;font-size:16.5px;line-height:1.55;color:var(--ink-2)}

/* Explain cards */
.bb-explain-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.bb-explain-body:empty{display:none}
.bb-card{position:relative;min-width:0;padding:24px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface);animation:bb-rise .5s var(--ease) both}
.bb-card:nth-child(2){animation-delay:.08s}.bb-card:nth-child(3){animation-delay:.16s}.bb-card:nth-child(4){animation-delay:.24s}.bb-card:nth-child(5){animation-delay:.32s}
@keyframes bb-rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
.bb-card-wide{grid-column:1/-1}
.bb-card h3{font:500 24px/1.2 var(--display);margin:0 0 12px}
.bb-card p{margin:0 0 12px;font-size:15.5px;line-height:1.6;color:var(--ink-2)}
.bb-card p:last-child{margin-bottom:0}
.bb-card p b{color:var(--ink)}
.bb-step-no{display:grid;place-items:center;width:32px;height:32px;margin-bottom:12px;border-radius:50%;background:var(--amber);color:#1a110b;font:800 14px/1 var(--body)}
.bb-ratio{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;font:500 clamp(19px,2.4vw,24px)/1.25 var(--display);color:var(--ink)!important}
.bb-ratio>span:not(.sr){padding:6px 12px 6px 10px;border-radius:10px;background:var(--bg-2);border-left:4px solid var(--herb)}
.bb-ratio b{font-weight:600}
.bb-ratio em{font-style:normal;color:var(--muted)}
.bb-prop{display:flex;height:34px;margin:4px 0 12px;border-radius:10px;overflow:hidden;background:var(--line)}
.bb-prop i{flex:none;display:grid;place-items:center;overflow:hidden;white-space:nowrap;transition:width .5s var(--ease)}
.bb-prop i+i{box-shadow:inset 2px 0 0 var(--surface)}
.bb-prop span{font:800 12px/1 var(--body);color:#1a110b}
.bb-legend,.bb-amounts,.bb-cost{list-style:none;margin:0 0 12px;padding:0;display:grid;gap:8px}
.bb-legend li,.bb-cost li{display:flex;align-items:baseline;gap:10px;font-size:14.5px;line-height:1.5;color:var(--ink-2)}
.bb-legend .bb-swatch,.bb-cost .bb-swatch{transform:translateY(1px)}
.bb-cost b{color:var(--ink)}
.bb-brew-nums{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 14px}
.bb-brew-nums div{padding:14px;border-radius:14px;background:var(--bg-2);border:1px solid var(--line)}
.bb-brew-nums b{display:block;font:500 clamp(22px,3vw,30px)/1 var(--display);margin-bottom:6px}
.bb-brew-nums span{font-size:13px;line-height:1.35;color:var(--muted)}
.bb-cups{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin:6px 0 14px;padding:12px 14px;border-radius:14px;border:1px solid var(--line);background:var(--bg-2)}
.bb-cups>span:first-child{font:700 12px/1 var(--body);letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.bb-cups-total{font-size:14.5px;color:var(--ink-2)}
.bb-amounts li{display:grid;grid-template-columns:12px minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px 12px;border-radius:12px;background:var(--bg-2);font-size:15px}
.bb-amounts b{font-weight:600;text-transform:capitalize}
.bb-amounts li>span:last-child{font-variant-numeric:tabular-nums;color:var(--ink)}
.bb-notes{margin:12px 0 0;padding-left:1.15em;display:grid;gap:8px;font-size:15px;line-height:1.55;color:var(--ink-2)}
.bb-notes li::marker{color:var(--amber)}
.bb-prec{list-style:none;margin:0;padding:0;display:grid;gap:16px}
.bb-prec>li>b{font:600 17px/1.3 var(--display)}
.bb-prec blockquote{margin:8px 0 0;padding:12px 16px;border-left:3px solid var(--amber);border-radius:0 12px 12px 0;background:var(--bg-2);font-size:14.5px;line-height:1.6;color:var(--ink-2)}
.bb-prec p{margin:8px 0 0!important}
@media (max-width:760px){.bb-explain-body{grid-template-columns:minmax(0,1fr)}.bb-card{padding:20px}}
@media (max-width:420px){.bb-brew-nums{gap:6px}.bb-brew-nums div{padding:10px}}

/* Shop */
.bb-shop-list,.bb-ready-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:16px}
.bb-shop-empty{grid-column:1/-1;padding:22px;border:1px dashed var(--line-2);border-radius:var(--r-sm);color:var(--muted);text-align:center}
.bb-shop-card,.bb-ready-card{display:flex;flex-direction:column;min-width:0;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--surface);overflow:hidden}
.bb-shop-card{border-top:3px solid var(--herb)}
.bb-shop-img{display:block;background:var(--photo)}
.bb-shop-img img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:contain}
.bb-shop-body{display:flex;flex-direction:column;gap:6px;padding:14px 16px 16px;flex:1;min-width:0}
.bb-shop-body b{font:600 18px/1.25 var(--display)}
.bb-shop-price{font:600 13px/1.35 var(--body);color:var(--ink-2)}
.bb-shop-parts{font-size:13px;color:var(--muted)}
.bb-shop-line{font-size:14px;line-height:1.45;color:var(--ink-2)}
.bb-stock{font-size:12.5px;line-height:1.4;color:var(--amber)}
.bb-shop-body .btn{margin-top:auto;align-self:stretch;white-space:normal;text-align:center;padding:0 14px}
.bb-shop-body .btn:first-of-type{margin-top:8px}
.bb-ready{margin-top:36px}
.bb-ready .bb-sub{margin-bottom:16px}
@media (max-width:560px){
  .bb-shop-card,.bb-ready-card{flex-direction:row;align-items:stretch}
  .bb-shop-img{flex:none;width:108px;display:grid;place-items:center}
  .bb-shop-img img{aspect-ratio:1/1}
  .bb-shop-body{padding:12px 14px 14px}
}

/* Toast */
.bb-toast{position:fixed;left:50%;bottom:calc(18px + env(safe-area-inset-bottom));z-index:120;max-width:calc(100% - 32px);width:max-content;padding:12px 18px;border-radius:14px;
  background:var(--surface-2);border:1px solid var(--line-2);box-shadow:var(--shadow);font:600 14px/1.4 var(--body);color:var(--ink);
  transform:translate(-50%,16px);opacity:0;pointer-events:none;transition:opacity .25s,transform .25s var(--ease)}
.bb-toast.on{opacity:1;transform:translate(-50%,0)}
.bb-toast:empty{display:none}

@media (max-width:420px){
  .bb-mix,.bb-flavour{padding:16px}
  .bb-mix-row{gap:10px;padding:10px}
  .bb-step{width:34px;height:34px}
}
