/* Recipe page: approved notebook mockup, with native document scrolling. */
.recipe-builder-layout{display:grid;grid-template-columns:228px minmax(0,1fr);gap:18px;align-items:start}
.recipe-library{padding:17px 14px}
.recipe-library>.toolbar{gap:8px;margin-bottom:8px}
.recipe-library>.toolbar h2{font:700 20px Georgia,serif;margin:0;white-space:nowrap}
.recipe-library #newRecipe{font-size:12px;padding:7px 9px;white-space:nowrap}
.recipe-library .recipe-list{display:block;max-height:none;overflow:visible}
.recipe-library .recipe-list[hidden]{display:none}
.recipe-library #toggleRecipeLibrary{border:0;background:transparent;padding:0;text-align:left;font:inherit;display:flex;align-items:center;gap:8px}
.recipe-library #toggleRecipeLibrary span{font:14px system-ui,sans-serif;color:var(--muted)}
#recipeBuilderStart{scroll-margin-top:16px}
.recipe-group{border-bottom:1px solid var(--line)}
.recipe-group:last-child{border-bottom:0}
.recipe-library .recipe-group>summary{display:flex;gap:9px;align-items:center;list-style:none;padding:17px 2px;min-height:48px}
.recipe-group>summary::-webkit-details-marker{display:none}
.recipe-group>summary::before{content:'▸';font-size:14px;width:12px;flex:none;color:var(--muted);transition:transform .18s ease}
.recipe-group[open]>summary::before{transform:rotate(90deg)}
.recipe-group-name{display:block;font-size:19px;font-weight:750;line-height:1.25;overflow-wrap:anywhere}
.recipe-group small{display:block;color:var(--muted);font-size:11px;font-weight:400;margin-top:5px}
.recipe-iterations{border-left:2px solid var(--line);margin:0 0 14px 12px;padding-left:12px;display:grid;gap:6px}
.recipe-iterations button{border:1px solid transparent!important;background:transparent!important;box-shadow:none!important;border-radius:8px;font-size:12px;padding:9px;text-align:left}
.recipe-iterations button.active{background:var(--sage)!important;border-color:var(--line)!important}
.recipe-iterations button small{margin-top:3px}
.recipe-workspace{padding:22px;min-width:0}
.recipe-editor-heading{display:flex;justify-content:space-between;align-items:start;gap:12px;margin-bottom:20px}
.recipe-editor-heading h2{font:700 29px/1.12 Georgia,serif;letter-spacing:-.025em;margin:6px 0 8px;overflow-wrap:anywhere}
.recipe-editor-heading>.pill{flex:none;margin-top:5px}
.recipe-iteration-subtitle{font-size:12px;color:var(--muted);margin:0}
.recipe-iteration-subtitle span{display:block;margin-top:7px}
.recipe-metadata{grid-template-columns:1fr 1fr;gap:12px}
.recipe-metadata .field{margin-bottom:0}
.recipe-notes{margin-top:13px;margin-bottom:0}
.recipe-notes textarea{min-height:70px}
.recipe-saved-notes{white-space:pre-wrap;font-size:13px;line-height:1.6}
.recipe-completion{display:grid;justify-items:center;gap:9px;padding:22px 0;border-bottom:1px solid var(--line)}
.recipe-complete-button{padding:14px 30px;min-height:54px;min-width:min(260px,100%);font-size:17px}
.recipe-completion small{font-size:11px;text-align:center;color:var(--muted)}
.recipe-completion-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.recipe-entry-tools{display:flex;flex-wrap:wrap;align-items:end;justify-content:space-between;gap:12px;margin:20px 0}
.recipe-entry-tools #weightEntry{min-width:0;max-width:240px}
.recipe-entry-tools #weightEntry select{margin-top:5px}
.recipe-workspace .jar-overview{display:grid;grid-template-columns:130px minmax(0,1fr);gap:23px;align-items:start;margin:0;padding:0;border:0;border-radius:0;background:transparent}
.recipe-workspace .jar-visual{position:sticky;top:18px;align-self:start;width:auto;min-width:0;padding:8px 0 14px;text-align:center}
.vessel-label{font-size:11px;font-weight:600;color:var(--muted);margin-bottom:14px}
.recipe-workspace .recipe-jar{position:relative;width:106px;height:244px;margin:0 auto 14px}
.recipe-workspace .jar-lid{position:absolute;left:0;right:0;top:0;margin:0;height:24px;border:0;border-radius:5px 5px 2px 2px;background:repeating-linear-gradient(90deg,var(--charcoal) 0 4px,#49443c 4px 5px);z-index:1}
.recipe-workspace .sauce-bottle .jar-lid{left:33px;right:auto;width:40px;height:28px}
.recipe-workspace .jar-glass{position:absolute;inset:19px 0 0;height:auto;padding:0;border:0;border-radius:0;background:var(--sage);display:flex;flex-direction:column;justify-content:flex-end;box-shadow:none;clip-path:polygon(5% 0,95% 0,100% 7%,100% 94%,94% 100%,6% 100%,0 94%,0 7%);overflow:hidden}
.recipe-workspace .sauce-bottle .jar-glass{inset:23px 0 0;clip-path:polygon(33% 0,67% 0,67% 17%,95% 29%,100% 36%,100% 94%,94% 100%,6% 100%,0 94%,0 36%,5% 29%,33% 17%)}
.recipe-workspace .jar-glass::after{content:'';position:absolute;inset:0;pointer-events:none;box-shadow:none;background:linear-gradient(90deg,transparent 3%,#ffffff40 9%,transparent 20%,transparent 78%,#25231f1f 100%)}
.recipe-workspace .jar-layer{min-height:0;flex-shrink:0;box-shadow:none;border:0;transition:height .24s ease}
.recipe-workspace .recipe-total{position:relative;overflow:visible;text-align:center;padding:12px 2px;margin:0;border:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);border-radius:0;background:transparent;font-weight:400}
.recipe-workspace .recipe-total>span{font-size:11px;color:var(--muted)}
.recipe-workspace .recipe-total strong{font-size:29px;line-height:1.3;font-weight:750;margin:0;font-variant-numeric:tabular-nums}
.recipe-workspace .recipe-total .completion-stamp,.recipe-workspace .recipe-total .allocation-status{position:static;display:block;border:0;background:transparent;color:inherit;font-size:11px;font-weight:600;padding:0;margin:4px 0 0;letter-spacing:0;animation:none;transform:none}
.recipe-category-legend{margin-top:13px;text-align:left;display:grid;gap:7px;font-size:11px;color:var(--muted)}
.recipe-category-legend>div{display:grid;grid-template-columns:7px minmax(0,1fr) auto;align-items:center;gap:5px}
.recipe-workspace .category-swatch{width:7px;height:7px;border-radius:50%;border:0;margin:0}
.category-legend-name{overflow-wrap:anywhere}
.category-legend-percent{font:inherit;font-variant-numeric:tabular-nums;white-space:nowrap}
.recipe-workspace .jar-key{min-width:0}
.recipe-workspace .quick-percentages{border:0;margin:0;padding:0}
.recipe-workspace .quick-percentages>h3{font:700 20px Georgia,serif;margin:5px 0 10px}
.recipe-workspace .quick-percent-row{display:block;padding:12px 0;margin:0;border:0;border-top:1px solid var(--line)}
.ingredient-row-heading{display:flex;align-items:center;gap:7px;min-height:32px}
.recipe-workspace .ingredient-row-heading label{margin:0;font-size:13px;font-weight:650;overflow-wrap:anywhere;min-width:0}
.recipe-workspace .ingredient-remove{padding:0;min-width:32px;min-height:32px;border:0;border-radius:50%;background:transparent;color:var(--muted);font-size:22px;font-weight:400;margin-left:auto;flex-shrink:0}
.recipe-workspace .ingredient-remove:hover{background:var(--sage);color:var(--bad)}
.ingredient-row-controls{display:grid;grid-template-columns:minmax(50px,1fr) 75px 14px;gap:7px;align-items:center;margin-top:1px}
.recipe-workspace .quick-slider{grid-column:auto;padding:0;margin:5px 0;accent-color:var(--accent)}
.recipe-workspace .ingredient-row-controls input[type=number]{padding:5px 6px;text-align:right;min-height:34px;font-variant-numeric:tabular-nums}
.ingredient-unit,.weight-derived{font-size:11px;color:var(--muted)}
.weight-derived{overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.recipe-workspace .ingredient-remainder{display:flex;gap:6px;font-weight:400;margin:1px 0 0;min-height:26px;color:var(--muted);font-size:11px;white-space:normal}
.ingredient-remainder input{accent-color:var(--accent2);width:16px;height:16px}
.recipe-guidance{font-size:11px;line-height:1.5;margin-top:15px}
.recipe-editor-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:20px;margin-top:20px}
.recipe-editor-footer #deleteRecipe{border:0;background:transparent;font-size:12px}
.recipe-editor-footer{justify-content:center}
.recipe-footer-actions{display:flex;justify-content:center;align-items:center;gap:12px;flex:1 0 100%;flex-wrap:wrap}
.recipe-footer-actions button{min-width:130px}
@media(max-width:1100px){.recipe-builder-layout{grid-template-columns:205px minmax(0,1fr);gap:14px}.recipe-workspace{padding:18px}.recipe-workspace .jar-overview{grid-template-columns:110px minmax(0,1fr);gap:17px}}
@media(max-width:800px){.recipe-builder-layout{grid-template-columns:185px minmax(0,1fr);gap:12px}.recipe-workspace{padding:17px}.recipe-workspace .jar-overview{grid-template-columns:100px minmax(0,1fr);gap:15px}.recipe-editor-heading{flex-wrap:wrap}}
@media(max-width:650px){
 .recipe-builder-layout{grid-template-columns:minmax(0,1fr);gap:15px}
 .recipe-library{padding:14px}.recipe-library .recipe-group>summary{padding:14px 0}
 .recipe-workspace{padding:16px 12px}.recipe-editor-heading{gap:8px}.recipe-editor-heading h2{font-size:27px}
 .recipe-metadata{grid-template-columns:1fr}.recipe-workspace .jar-overview{grid-template-columns:78px minmax(0,1fr);gap:14px}
 .recipe-workspace .jar-visual{top:12px}.recipe-workspace .recipe-jar{width:68px;height:174px}
 .recipe-workspace .jar-lid{height:20px}.recipe-workspace .sauce-bottle .jar-lid{left:22px;width:25px;height:20px}
 .recipe-workspace .jar-glass,.recipe-workspace .sauce-bottle .jar-glass{inset:17px 0 0}
 .vessel-label{font-size:10px;margin-bottom:10px}.recipe-workspace .recipe-total{padding:9px 0}
 .recipe-workspace .recipe-total strong{font-size:23px}.recipe-workspace .recipe-total>span{font-size:10px}
 .recipe-workspace .recipe-total .completion-stamp,.recipe-workspace .recipe-total .allocation-status{font-size:10px}
 .recipe-category-legend>div{grid-template-columns:7px minmax(0,1fr);row-gap:0}.category-legend-percent{grid-column:2}
 .recipe-entry-tools{align-items:stretch}.recipe-entry-tools #weightEntry{max-width:none;flex:1;min-width:145px}.recipe-entry-tools>button{align-self:end}
 .recipe-workspace .ingredient-row-heading{gap:5px}.recipe-workspace .ingredient-row-heading label{font-size:12px}
 .ingredient-row-controls{grid-template-columns:minmax(38px,1fr) 61px 12px;gap:4px}.recipe-workspace .quick-percentages>h3{font-size:19px}
 .recipe-workspace .ingredient-remainder{font-size:10px}
}
@media(pointer:coarse){.recipe-workspace .ingredient-remove{min-width:44px;min-height:44px}.recipe-workspace .ingredient-remainder{min-height:40px}}
@media(prefers-reduced-motion:reduce){.recipe-group>summary::before,.recipe-workspace .jar-layer{transition:none}}
/* Keep the essential vessel and total visible in a short landscape viewport. */
@media(max-height:650px){.recipe-workspace .jar-visual{position:sticky;top:12px;max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain}}

/* The narrow edge tab overlays the outer gutter; it never consumes slider width. */
.vessel-toggle{display:none}
@media(max-width:650px){
 .recipe-workspace .jar-overview:not(.vessel-open){grid-template-columns:minmax(0,1fr)}
 .recipe-workspace .jar-overview:not(.vessel-open)>.jar-visual{display:none}
 html body #jarOverview.vessel-in-view .vessel-toggle{display:grid;place-items:center;position:fixed;left:0;top:50%;transform:translateY(-50%);width:24px;height:132px;min-height:132px;padding:0;border:0;background:var(--forest);color:var(--on-forest,#fff);z-index:20;box-shadow:1px 2px 5px #29312920}
 html body .vessel-toggle span{display:block;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) rotate(-90deg);white-space:nowrap;font-size:13px;line-height:1}
 .vessel-toggle:focus-visible{outline:3px solid var(--crimson);outline-offset:2px}
}
@media print{html body .vessel-toggle{display:none!important}}
.percent-adjust[hidden]{display:none!important}
.percent-adjust{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin:8px 0 4px}
html body .recipe-workspace .percent-adjust button{width:32px;height:32px;min-width:32px;min-height:32px;padding:0;font-size:23px!important;line-height:1}
.percent-adjust span{font-size:12px;color:var(--muted,#5e665b)}
