/* Tool UI: one quiet type, spacing and component system; no calculation changes. */
@media screen {
 body.studio[data-style]{--ink:#26382e;--muted:#66746a;--green:#44694f;--ui-line:#dce3dd;--ui-radius:6px;font-family:Arial,system-ui,sans-serif;background:#f6f7f3}
 body.studio[data-style] h1,body.studio[data-style] h2,body.studio[data-style] h3{font-family:Arial,system-ui,sans-serif!important;letter-spacing:0;font-weight:600}
 body.studio[data-style] .header .brand{font-family:Arial,system-ui,sans-serif!important;font-size:18px!important;font-weight:600;letter-spacing:0;color:var(--muted)}
 body.studio[data-style] .header .brand img{width:26px!important;height:26px}
 body.studio[data-style] .card{border-color:var(--ui-line);border-radius:12px;background:#fff}
 body.studio[data-style] input,body.studio[data-style] select,body.studio[data-style] textarea{border:1px solid #bdc9c0;border-radius:var(--ui-radius);background:#fff;color:var(--ink);box-shadow:none}
 body.studio[data-style] button{border-radius:var(--ui-radius);font-weight:500}
 body.studio[data-style] button.solid{background:var(--green);border-color:var(--green);color:#fff}
 body.studio[data-style] .site-menu>summary svg{display:block;flex:none}
}
@media screen and (max-width:700px), screen and (max-width:950px) and (max-height:500px) and (pointer:coarse){
 body.studio[data-style]{font-size:14px;line-height:1.5}
 body.studio[data-style] .header{height:auto;min-height:0;padding:4px 12px;align-items:center;background:transparent;border-bottom:0}
 body.studio[data-style] .header .brand{font-size:14px!important;gap:8px;line-height:1.25}
 body.studio[data-style] .header .brand img{width:24px!important;height:24px;opacity:.9}
 body.studio[data-style] .site-menu>summary{width:44px;height:44px;padding:0;color:var(--muted);border-radius:6px;list-style:none}
 body.studio[data-style] .site-menu>summary::-webkit-details-marker{display:none}
 body.studio[data-style] .site-menu[open]>summary{background:#e6ede5;color:var(--ink)}
 body.studio[data-style] .site-menu nav{border-color:var(--ui-line);border-radius:8px;box-shadow:0 4px 14px #26382e12}
 body.studio[data-style] main.wrap{width:calc(100% - 24px)}
 body.studio[data-style] .tool-nav{gap:20px;margin:0 0 8px;border-bottom:1px solid var(--ui-line);padding:0;background:transparent}
 body.studio[data-style] .tool-nav a{border:0;border-radius:0;padding:0 0 8px;min-height:44px;font-size:13px;font-weight:500;background:transparent;color:var(--muted);gap:6px}
 body.studio[data-style] .tool-nav a[aria-current="page"]{color:var(--ink);box-shadow:inset 0 -2px var(--green);background:transparent}
 body.studio[data-style] #library-count{font-size:11px;font-weight:500;line-height:1.4;min-width:0;padding:2px 5px;border-radius:4px;background:#e6ede5;color:var(--ink)}
 body.studio[data-style] details.notice{border:0;border-radius:0;background:transparent;padding:0;margin:0 0 8px;color:var(--muted)}
 body.studio[data-style] .notice summary{min-height:36px;font-size:12px;font-weight:400}
 body.studio[data-style] .notice p{font-size:12px;line-height:1.5;color:var(--muted)}
 body.studio[data-style] .studio-grid{margin:0;gap:16px}
 body.studio[data-style] .editor,body.studio[data-style] .results{padding:12px;border-radius:12px;border:1px solid var(--ui-line)}
 body.studio[data-style] #inputs-title,body.studio[data-style] #results-title{font-size:17px!important;line-height:1.3;margin:0 0 8px}
 body.studio[data-style] .editor>.pair{gap:12px;margin-bottom:0}
 body.studio[data-style] .editor label{font-size:12px;font-weight:500;line-height:1.4;color:var(--muted);margin:0 0 4px}
 body.studio[data-style] .editor input,body.studio[data-style] .editor select{font-size:16px;line-height:1.25;min-height:44px;padding:8px;border-radius:6px}
 body.studio[data-style] .oil-row{margin:0;padding:6px 0;gap:4px 8px;grid-template-columns:minmax(0,1fr) 76px 44px;border:0;border-bottom:1px solid #edf0ec;border-radius:0;background:transparent}
 body.studio[data-style] .oil-row label{font-size:12px;font-weight:400;color:var(--muted);margin:0 0 4px}
 body.studio[data-style] .oil-row .oil-value input{font-variant-numeric:tabular-nums;font-weight:500}
 body.studio[data-style] .oil-row button{border:0;background:transparent;color:#7c8980;min-width:44px;min-height:44px;box-shadow:none}
 body.studio[data-style] .card p.sap-note{font-size:11px;line-height:1.4;color:var(--muted);margin:2px 0 0}
 body.studio[data-style] #add{width:100%;margin-top:12px;min-height:44px;border:1px dashed #bdc9c0;background:#f8faf7;font-size:13px;font-weight:500}
 body.studio[data-style] #sum{margin:8px 0 16px;font-size:12px}
 body.studio[data-style] .editor h3{font-size:15px;line-height:1.4;margin:24px 0 12px}
 body.studio[data-style] .editor>details{margin:16px 0}
 body.studio[data-style] .editor summary{font-size:13px;font-weight:500;min-height:44px}
 body.studio[data-style] .editor p.help{font-size:12px;line-height:1.5;margin:6px 0 16px}
 body.studio[data-style] .save-actions{gap:8px}
 body.studio[data-style] .save-actions button{font-size:13px;min-height:44px;padding:8px;border-radius:6px}
 body.studio[data-style] #recipe-status{font-size:12px;font-weight:500;color:var(--muted)}
 body.studio[data-style] .results .metric strong{font-size:25px;font-weight:600;letter-spacing:-.3px;font-variant-numeric:tabular-nums}
 body.studio[data-style] .results .metric span{font-size:13px}
 body.studio[data-style] .results .metric{padding:12px 0}
 body.studio[data-style] .mobile-dock{padding:8px 12px;background:#fff;border-top:1px solid var(--ui-line);gap:8px;box-shadow:none}
 body.studio[data-style] #mobile-summary{font-size:12px;font-weight:500;line-height:1.4;font-variant-numeric:tabular-nums}
 body.studio[data-style] #mobile-results{font-size:12px;font-weight:500}
 body.studio[data-style] #mobile-weigh{font-size:13px;min-height:44px;padding:8px 12px;background:#eef3ed;border-color:#dce6dc}
 body.studio[data-style] #library-view h2{font-size:19px;font-weight:600;margin:16px 0 8px}
 body.studio[data-style] .recipe-card{padding:16px;margin:12px 0;border-radius:10px;border-color:var(--ui-line)}
 body.studio[data-style] .recipe-card h3{font-size:16px;font-weight:600;line-height:1.4;margin:4px 0 8px}
 body.studio[data-style] .recipe-card p{font-size:12px;line-height:1.5;color:var(--muted);margin:4px 0}
 body.studio[data-style] dialog{border-radius:12px;border-color:var(--ui-line);background:#fff}
 body.studio[data-style] #save-title,body.studio[data-style] #history-title,body.studio[data-style] #weigh-title{font-size:19px;line-height:1.3;font-weight:600}
 body.studio[data-style] dialog .actions button{font-size:13px;font-weight:500}
 body.studio[data-style] #save-form>.actions{background:#fff}
 body.studio[data-style] #save-fields{padding:3px}
}
@media screen and (max-width:700px), screen and (max-width:950px) and (max-height:500px) and (pointer:coarse){
 body.studio[data-style] .oil-row .oil-value label{white-space:nowrap;font-size:11px}
 body.studio[data-style] #errors{font-size:12px;line-height:1.4}
 body.studio[data-style] #errors ul{margin:4px 0 8px;padding-left:18px}
 body.studio[data-style] #errors li a{display:inline;border:0;padding:0;background:transparent;min-height:0}
 body.studio[data-style] #message{font-size:12px;line-height:1.4}
}

@media screen and (max-width:700px), screen and (max-width:950px) and (max-height:500px) and (pointer:coarse){
 body.studio[data-style] dialog{padding:16px}
 body.studio[data-style] dialog h2{font-size:18px!important;line-height:1.3;margin:0 0 12px}
 body.studio[data-style] dialog p{font-size:13px;line-height:1.45;margin:8px 0}
 body.studio[data-style] dialog button{font-size:13px;min-height:44px;padding:8px}
 body.studio[data-style] .guard-actions{gap:8px}
 body.studio[data-style] .empty-library{padding:16px;border:1px solid var(--ui-line);border-radius:12px;text-align:left;background:#fff}
 body.studio[data-style] .empty-library h3{font-size:17px!important;line-height:1.3;margin:0 0 8px}
 body.studio[data-style] .empty-library p{font-size:13px;line-height:1.5;margin:8px 0}
}

@media screen and (max-width:700px), screen and (max-width:950px) and (max-height:500px) and (pointer:coarse){body.studio[data-style] .oil-row .oil-value input.long-value{font-size:13px}}

@media screen{body.studio[data-style] #message:not(.error):not(:empty){position:fixed;z-index:80;top:12px;right:12px;max-width:min(640px,calc(100% - 24px));margin:0;padding:8px 12px;background:#26382e;color:#fff;border-radius:6px;box-shadow:0 2px 8px #26382e20;pointer-events:none;font-size:12px;line-height:1.4}}
@media screen and (max-width:700px), screen and (max-width:950px) and (max-height:500px) and (pointer:coarse){body.studio[data-style] #message:not(.error):not(:empty){top:8px;left:12px;right:12px}}

@media screen{body.studio[data-style] #message:not(.error):not(:empty){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}

@media screen and (min-width:701px) and (max-width:950px) and (max-height:500px) and (pointer:coarse){body.studio[data-style] .studio-grid{grid-template-columns:1fr}body.studio[data-style] .results{position:static}body.studio[data-style] .tool-nav .jump-results{display:none}body.studio[data-style] .oil-row .oil-choice,body.studio[data-style] .oil-row .oil-value{grid-column:auto}body.studio[data-style] .header nav{width:auto}body.studio[data-style] #recipe-list{grid-template-columns:1fr}body.studio[data-style] #weigh-dialog{max-height:calc(var(--sdb-viewport-height,100vh) - 24px);overflow:auto}}

/* Shared input controls and secondary navigation, across phone and desktop. */
@media screen {
 body.studio[data-style] .choice-segments{display:flex;gap:2px;padding:3px;border:1px solid var(--ui-line,#d7dfd9);border-radius:8px;background:#edf1ec;min-width:0}
 body.studio[data-style] .choice-segments button{flex:1;min-width:0;min-height:38px;margin:0;padding:6px 8px;border:0;border-radius:5px;background:transparent;color:var(--muted,#657168);font-size:13px;font-weight:500;box-shadow:none;line-height:1.2}
 body.studio[data-style] .choice-segments button[aria-pressed="true"]{background:#fff;color:var(--ink,#26382e);box-shadow:0 1px 3px #26382e20}
 body.studio[data-style] .choice-segments button:focus-visible{outline:2px solid var(--green,#486b52);outline-offset:1px}
 body.studio[data-style] .tool-nav{padding-inline:8px;column-gap:16px;box-sizing:border-box}
 body.studio[data-style] .tool-nav .jump-results{padding:8px 12px;margin-left:auto;white-space:nowrap;flex-shrink:0;border:0;background:transparent;box-shadow:none}
 body.studio[data-style] .oil-row button[data-remove]{border:0;background:transparent;box-shadow:none;color:#67776c;font-size:22px;line-height:1;min-width:44px;min-height:44px;height:44px;padding:0;display:flex;align-items:center;justify-content:center;align-self:end;border-radius:6px}
 body.studio[data-style] .oil-row button[data-remove]:disabled{opacity:.3;cursor:default}
 body.studio[data-style] .oil-row button[data-remove]:not(:disabled):hover,body.studio[data-style] .oil-row button[data-remove]:not(:disabled):active{background:#f7eae7;color:#9b4038}
}

@media screen {
 body.studio[data-style] .oil-row .oil-value input,body.studio[data-style] .oil-row .oil-choice select{height:44px;min-height:44px;box-sizing:border-box}
 body.studio[data-style] .oil-row button[data-remove]:not(:disabled){color:#a34b43;background:#faeeeb}
 body.studio[data-style] .oil-row button[data-remove]:disabled{background:transparent}
 body.studio[data-style] .oil-row button[data-remove]:not(:disabled):hover,body.studio[data-style] .oil-row button[data-remove]:not(:disabled):active{color:#88362f;background:#f3dcd6}
}
