/* Uses the shared article colors and the existing calculator control vocabulary. */
.tool-card { margin: 0 0 2rem; padding: 1.5rem; border-radius: 16px; background: var(--lavender-soft); color: var(--ink); font: 1rem/1.5 system-ui, sans-serif; }
.tool-card [hidden] { display: none !important; }
.tool-privacy, .tool-nojs { padding: 1rem; background: #fff; border-radius: 12px; }
.tool-form { display: grid; gap: 1.25rem; }
.tool-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.tool-fieldset legend { font-size: 1.125rem; font-weight: 700; margin-bottom: 1rem; }
.tool-field { display: grid; gap: .4rem; margin-bottom: 1rem; min-width: 0; }
.tool-field label { font-weight: 650; }
.tool-form input, .tool-form select { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; min-height: 48px; border: 2px solid var(--line); border-radius: 12px; padding: .65rem; background: #fff; color: var(--ink); font: inherit; }
.tool-form select { text-overflow: ellipsis; }
.tool-form [aria-invalid="true"] { border-color: var(--burgundy); }
.tool-hint { color: var(--ink); font-size: .875rem; }
.tool-error { margin: 0; color: var(--burgundy); font-size: .875rem; font-weight: 600; }
.tool-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.tool-actions button { min-height: 48px; border: 2px solid var(--ink); padding: .7rem 1rem; border-radius: 100px; color: var(--ink); background: #fff; font: inherit; font-weight: 650; cursor: pointer; }
.tool-actions button[type="submit"] { background: var(--ink); color: #fff; }
.tool-form :is(input, select, button):focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
.tool-result { display: grid; gap: .85rem; margin-top: 1.5rem; padding: 1.25rem; border-radius: 12px; background: #fff; color: var(--ink); overflow-wrap: anywhere; }
.tool-result-line { display: block; }
.tool-result-line:first-child { font-weight: 750; }
@media (hover: hover) { .tool-actions button:hover { background: var(--violet); color: #fff; border-color: var(--violet); } }
@media (prefers-reduced-motion: no-preference) { .tool-actions button { transition: background-color .15s, color .15s; } }
@media (max-width: 380px) { .tool-card { padding: 1rem; } }
