/* Uses the same site tokens and control vocabulary as the calorie calculator. */
.tool-card { margin: 0 0 32px; padding: 24px; border-radius: 16px; background: var(--lavender-soft); color: var(--ink); font-size: 16px; line-height: 1.5; }
.tool-card [hidden] { display: none !important; }
.tool-privacy, .tool-nojs { margin: 0 0 20px; font-size: 15px; }
.tool-form { display: grid; gap: 20px; }
.tool-fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
.tool-fieldset legend { font-weight: 750; font-size: 20px; margin-bottom: 12px; }
.tool-field { display: grid; gap: 6px; margin-bottom: 16px; min-width: 0; }
.tool-field label { font-weight: 650; }
.tool-field input, .tool-field select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 48px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 12px; background: white; color: var(--ink); font: inherit; }
.tool-field input[aria-invalid="true"], .tool-field select[aria-invalid="true"] { border-color: var(--burgundy); }
.tool-hint { font-size: 14px; color: var(--ink); }
.tool-error { color: var(--burgundy); font-weight: 650; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tool-actions button { min-height: 48px; padding: 10px 18px; border: 2px solid var(--ink); border-radius: 100px; background: transparent; color: var(--ink); font: inherit; font-weight: 650; cursor: pointer; }
.tool-actions button[type="submit"] { color: white; background: var(--ink); }
.tool-form :is(input, select, button):focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
.tool-result { display: block; margin-top: 24px; padding: 20px; border-radius: 12px; background: white; color: var(--ink); overflow-wrap: anywhere; }
.tool-result-line { margin: 0 0 12px; }
.tool-result-line:last-child { margin-bottom: 0; }
@media (hover: hover) { .tool-actions button:hover { background: var(--violet); color: white; border-color: var(--violet); } }
@media (prefers-reduced-motion: no-preference) { .tool-actions button { transition: background-color .2s, color .2s; } }
@media (min-width: 640px) { .tool-fieldset { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); column-gap: 20px; } .tool-fieldset > .tool-hint { grid-column: 1 / -1; } }
@media (max-width: 380px) { .tool-card { padding: 16px; } .tool-result { padding: 14px; } }
