/* SubitoChiaro — ricette: locally isolated QA preview only. */
.recipe-editorial-meta{font-size:.85rem;line-height:1.55;color:#536b7e;margin:0 0 18px}
.recipe-tool{max-width:none;display:block}
.recipe-tool .panel-head{display:flex;align-items:start;justify-content:space-between;gap:14px}
.recipe-tool .panel-head h2{margin:0 0 8px}
.recipe-tool .panel-head p{margin:0}
.recipe-tool .pictogram{font-size:2rem;line-height:1.4}
.recipe-tool .mini{background:#f1f8f7;border-left:4px solid #11736f;border-radius:8px;padding:12px 16px;margin:16px 0}
.recipe-tool .servings-fields{border:1px solid #91acbf;border-radius:12px;padding:12px 16px 15px;margin:16px 0;background:#f8fbfd}
.recipe-tool .servings-fields legend{font-weight:750;padding:0 8px}
.recipe-tool .servings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.recipe-tool .servings-grid label{display:grid;grid-template-columns:1fr 96px;grid-template-rows:auto auto;gap:4px 10px;align-items:center}
.recipe-tool .servings-grid label span{grid-row:1/3}
.recipe-tool .servings-grid input{grid-column:2;grid-row:1;width:100%;min-width:0}
.recipe-tool .servings-grid small{grid-column:2;grid-row:2;font-size:.76rem;color:#587087;font-weight:500}
.recipe-tool .recipe-scroll{max-width:100%;overflow-x:auto}
.recipe-tool table{border-collapse:collapse;width:100%;font-size:.89rem}
.recipe-tool .recipe-scroll:not(.details)>table{min-width:825px}
.recipe-tool th,.recipe-tool td{padding:10px 8px;border-bottom:1px solid #d8e3ea;text-align:left}
.recipe-tool th{font-weight:750;color:#163b65;background:#f5f9fb}
.recipe-tool td input,.recipe-tool td select{min-width:0;width:100%;padding:8px 9px;border:1.5px solid #647c92}
.recipe-tool input[aria-invalid=true]{border:2px solid #a12c3a;box-shadow:0 0 0 2px #f8dbe0}
.recipe-tool .recipe-actions{display:flex;gap:12px;flex-wrap:wrap;margin:12px 0 8px}
.recipe-tool button{font:inherit;font-weight:700;border:2px solid #126d69;border-radius:9px;background:#fff;color:#126d69;min-height:44px;padding:9px 15px;cursor:pointer}
.recipe-tool button.primary{background:#126d69;color:#fff}
.recipe-tool button.remove{min-width:44px;border-color:#647c92;color:#163b65}
.recipe-tool .messages:not(:empty){border-left:4px solid #9c2f34;background:#fff0f0;padding:10px 12px;margin:14px 0}
.recipe-tool .result-heading{font-size:1.35rem;margin:26px 0 12px}
.recipe-tool .result-heading:focus{outline:3px solid #d16d00;outline-offset:4px}
.recipe-tool .result-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.recipe-tool .metric{border:1px solid #d8e3ea;border-radius:14px;padding:16px;background:#f5fafb;display:flex;flex-direction:column;gap:5px}
.recipe-tool .metric .k{font-size:.87rem;font-weight:700}
.recipe-tool .metric strong{font-size:clamp(1.35rem,2.5vw,2rem);font-variant-numeric:tabular-nums}
.recipe-tool .metric small{font-size:.78rem;color:#587087;line-height:1.4}
.recipe-tool .details{margin-top:19px}
.recipe-tool .hint{margin-top:18px;border-radius:10px;background:#f1f6fa;padding:12px 15px}
.recipe-tool :is(input,select,button):focus-visible{outline:3px solid #d16d00;outline-offset:3px}
.recipe-tool [hidden]{display:none!important}
@media(max-width:1024px){
 .recipe-tool .recipe-scroll:not(.details)>table{min-width:0;display:block}
 .recipe-tool .recipe-scroll:not(.details)>table thead{display:none}
 .recipe-tool #ingredient-rows{display:block}
 .recipe-tool #ingredient-rows tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:15px 0;border-bottom:2px solid #d8e3ea}
 .recipe-tool #ingredient-rows td{display:flex;flex-direction:column;gap:3px;padding:0;border:0;min-width:0}
 .recipe-tool #ingredient-rows td:before{content:attr(data-label);font-size:.77rem;font-weight:750;color:#365e76}
 .recipe-tool #ingredient-rows td:first-child{grid-column:span 3}
 .recipe-tool #ingredient-rows td:last-child:before{display:none}
}
@media(max-width:680px){
 .recipe-tool .result-grid{grid-template-columns:1fr}
 .recipe-tool .servings-grid{gap:10px}
 .recipe-tool .servings-grid label{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto}
 .recipe-tool .servings-grid label span,.recipe-tool .servings-grid input,.recipe-tool .servings-grid small{grid-column:1;grid-row:auto}
 .recipe-tool #ingredient-rows tr{grid-template-columns:repeat(2,minmax(0,1fr))}
 .recipe-tool #ingredient-rows td:first-child{grid-column:span 2}
 .recipe-tool .panel-head .pictogram{display:none}
 .recipe-tool .recipe-actions{flex-direction:column;align-items:stretch}
 .recipe-tool .recipe-actions button{width:100%}
}

.recipe-tool .details:focus-visible{outline:3px solid #d16d00;outline-offset:3px}
/* Table details must remain legible without clipped headings on narrow mobile screens. */
@media(max-width:680px){
 .recipe-tool .details table{width:100%;min-width:0;table-layout:fixed}
 .recipe-tool .details th,.recipe-tool .details td{padding:9px 5px;overflow-wrap:anywhere;white-space:normal}
 .recipe-tool .details th:nth-child(1){width:34%}
 .recipe-tool .details th:nth-child(2){width:31%}
 .recipe-tool .details th:nth-child(3){width:35%}
}
