/* Pages from tools2.py: food transition calculator, grams in a cup, same dog different food.
   Linked only from those pages, after style.css; uses its colour tokens. */
.t2tool{max-width:720px;margin-bottom:8px}
.t2tool .field.wide{flex:1 1 100%}
.t2tool .field.wide input{width:100%}
.t2tool input[type=number]{width:150px}
.t2tool .t2h{font-weight:900;font-stretch:80%;font-size:22px;line-height:1.1;margin:18px 0 10px}
.t2pair{display:flex;gap:6px}
.t2pair input{width:130px}
.t2pair select{min-width:96px}
.t2out{margin-top:14px}
.t2out p{margin:0 0 10px}
.t2out .tablewrap{margin:14px 0 10px;box-shadow:4px 4px 0 var(--ink)}
.t2warn{border-left:6px solid var(--warn);padding:4px 0 4px 12px}
.t2plan{min-width:0}
.t2plan tbody th small{display:block;font-weight:500;color:var(--muted);font-size:12px}
.t2plan td:last-child,.t2plan th:last-child{text-align:right}
.t2eq{align-items:end;flex-wrap:nowrap}
.t2eq input{width:140px}
.t2is{font-weight:900;font-size:26px;padding-bottom:8px}
.t2quick{min-width:0}
.t2quick td{white-space:nowrap}
.t2filter{margin:10px 0 0;max-width:420px}
.t2filter input{width:100%}
.t2sort thead th button{font:inherit;font-weight:800;color:inherit;background:none;border:0;padding:0;cursor:pointer;text-align:left;text-decoration:underline dotted;text-underline-offset:4px}
.t2sort thead th[aria-sort="ascending"] button::after{content:" ↑"}
.t2sort thead th[aria-sort="descending"] button::after{content:" ↓"}
.t2sort tbody th{white-space:normal;min-width:180px}
.t2list{padding-left:22px;max-width:68ch}
.t2list li{margin-bottom:8px}

/* charts drawn in tools2.py (viewBox 360 wide, so text stays readable on a phone) */
.t2chartwrap{border:3px solid var(--ink);border-radius:22px;background:var(--paper);box-shadow:6px 6px 0 var(--ink);padding:14px 10px;margin:18px 0 10px;max-width:720px}
.t2svg{display:block;width:100%;max-width:640px;height:auto;margin:0 auto;font-family:Archivo,system-ui,sans-serif;font-variant-numeric:tabular-nums}
.t2svg .bar{fill:var(--kibble);stroke:var(--ink);stroke-width:2}
.t2svg .bar.hi{fill:var(--sun)}
.t2svg .ax{stroke:var(--ink);stroke-width:2}
.t2svg .n{font-size:13px;font-weight:800;fill:var(--ink);text-anchor:middle}
.t2svg .tl{font-size:12px;fill:var(--muted);text-anchor:middle}
.t2svg .gh{font-size:14px;font-weight:900;fill:var(--ink)}
.t2svg .lab{font-size:11.5px;fill:var(--ink)}
.t2svg .val{font-size:12px;font-weight:800;fill:var(--ink)}

.t2stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0;max-width:720px}
.t2stats div{border:3px solid var(--ink);border-radius:18px;background:var(--paper);padding:12px 14px;box-shadow:4px 4px 0 var(--ink)}
.t2stats div:nth-child(2){background:var(--sun)}
.t2stats b{display:block;font-weight:900;font-stretch:80%;font-size:clamp(30px,6vw,44px);line-height:1}
.t2stats span{display:block;font-size:14px;color:var(--muted);margin-top:6px;line-height:1.3}

@media (max-width:600px){
  .t2tool input[type=number]{width:100%}
  .t2tool .row > .field{flex:1 1 140px}
  .t2pair input{width:100%;min-width:0}
  .t2eq .field{flex:1 1 0}
  .t2eq input{width:100%}
  .t2plan th,.t2plan td{padding:8px 9px;font-size:14px}
  .t2sort{min-width:0}
  .t2sort th,.t2sort td{padding:8px 9px;font-size:14px}
  .t2sort tbody th{min-width:140px}
  .t2stats{gap:8px}
  .t2stats div{padding:10px}
  .t2stats span{font-size:12.5px}
}
