.tool-hero { padding: 2rem 0; background: linear-gradient(120deg, #f7faf9, #edf5f4); }
.tool-hero h1 { margin-top: .4rem; font-size: clamp(2rem, 5vw, 3.2rem); }
.tool-hero p { max-width: 760px; margin-bottom: 0; color: var(--muted); font-size: 1.05rem; }
.tool-content { max-width: 980px; }
.tool-panel { padding: clamp(1rem, 4vw, 2rem); border: 1px solid var(--line); border-radius: 20px; background: var(--white); box-shadow: var(--shadow); }
.tool-panel > h2 { font-size: 1.5rem; }
.tool-form { display: grid; gap: 1.25rem; }
.tool-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.question-group legend { width: 100%; margin-bottom: .65rem; color: var(--navy); font-weight: 750; font-size: 1.02rem; }
.question-hint { margin: -.25rem 0 .65rem; color: var(--muted); font-size: .92rem; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: .6rem; }
.choice-card { display: flex; min-height: 52px; align-items: center; gap: .65rem; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); cursor: pointer; font-weight: 600; line-height: 1.35; }
.choice-card:has(input:checked) { border-color: var(--blue); background: #edf7f7; box-shadow: 0 0 0 1px var(--blue); }
.choice-card input { flex: none; width: 19px; height: 19px; margin: 0; accent-color: var(--blue); }
.tool-form select, .tool-form input[type="number"] { min-height: 50px; }
.tool-actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.tool-error { padding: .75rem 1rem; border-left: 4px solid #b3483d; border-radius: 0 10px 10px 0; background: #fff2ef; color: #752a24; font-weight: 650; }
.tool-result { margin-top: 1.25rem; padding: clamp(1rem, 4vw, 1.5rem); border: 1px solid #c8dcda; border-radius: 18px; background: linear-gradient(145deg, #f4fbf9, #fff); box-shadow: 0 12px 30px rgba(16,43,63,.08); scroll-margin-top: 120px; }
.tool-result[hidden], .tool-error[hidden], [data-mode-panel][hidden] { display: none; }
.result-label { display: inline-flex; margin-bottom: .6rem; padding: .3rem .65rem; border: 1px solid #cbdedc; border-radius: 999px; color: var(--blue-dark); background: #eaf6f4; font-size: .82rem; font-weight: 800; }
.tool-result h2 { margin-bottom: .65rem; font-size: clamp(1.4rem, 4vw, 1.9rem); }
.tool-result p { max-width: 760px; color: #344f60; }
.result-links { display: flex; flex-wrap: wrap; gap: .55rem 1rem; margin: .8rem 0; }
.tool-disclaimer { margin: 1rem 0 0; color: var(--muted); font-size: .9rem; }
.tool-tip { margin-top: 1.25rem; padding: 1rem 1.2rem; border-left: 4px solid var(--blue); border-radius: 0 12px 12px 0; background: #eef7f8; }
.tool-tip p:last-child { margin-bottom: 0; }
.tool-callout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; padding: 1.2rem; border-radius: 16px; background: var(--navy); color: white; }
.tool-callout p { margin: .15rem 0; color: #d5e2e7; }
.tool-callout h2 { margin: 0; color: white; font-size: 1.2rem; }
.tool-callout .call-button { flex: none; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.tool-card { display: flex; min-height: 220px; flex-direction: column; align-items: flex-start; }
.tool-card .icon-tile { display: grid; width: 48px; height: 48px; place-items: center; }
.tool-card .icon-tile svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.tool-card h2, .tool-card h3 { font-size: 1.2rem; }
.tool-card p { flex: 1; }
.tool-card:hover { border-color: #b5d0d4; transform: translateY(-2px); box-shadow: var(--shadow); }
.tool-hub-link { margin: 1.25rem 0 0; }
.tool-note { padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--muted); }
.mode-options { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .6rem; margin-bottom: 1.2rem; }
.mode-options .choice-card { min-height: 62px; }
.numeric-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.result-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px,1fr)); gap: .7rem; margin: 1rem 0; }
.metric-card { min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: white; }
.metric-card span { display: block; color: var(--muted); font-size: .9rem; }
.metric-card strong { display: block; margin-top: .35rem; color: var(--navy); font-size: clamp(1.2rem, 4vw, 1.6rem); line-height: 1.2; overflow-wrap: anywhere; }
.tool-info-section { margin-top: 2rem; }
.tool-info-section h2 { font-size: 1.6rem; }
@media (max-width: 600px) {
  .tool-grid, .numeric-grid, .mode-options { grid-template-columns: 1fr; }
  .tool-card { min-height: 0; }
  .choice-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .tool-callout { align-items: stretch; }
  .tool-callout .call-button { width: 100%; }
  .tool-actions .button { flex: 1 1 100%; }
}
@media (max-width: 360px) { .choice-grid { grid-template-columns: 1fr; } }
