/* TVL Money calculators: hub page, calculator pages and the widget itself.
   Loaded only on tools pages. Reuses the tokens defined in styles.css. */

.tools-page,
.calc-page {
    background:
        radial-gradient(circle at 10% 12%, rgba(8, 122, 91, 0.05), transparent 26rem),
        var(--canvas);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.calc-icon { width: 22px; height: 22px; }
.calc-icon--sm { width: 15px; height: 15px; }

/* ------------------------------------------------------------------ hero */

.tools-hero,
.calc-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(circle at 82% 24%, rgba(216, 255, 99, 0.13), transparent 24rem),
        linear-gradient(135deg, #06181e 0%, #0a292f 58%, #0b3a37 100%);
    color: #fff;
}

.tools-hero::after,
.calc-hero::after {
    position: absolute;
    z-index: -1;
    width: 640px;
    height: 640px;
    right: -300px;
    bottom: -460px;
    border: 1px solid rgba(216, 255, 99, 0.13);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.tools-crumb { padding-top: 30px; }
.tools-crumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: rgba(255, 255, 255, 0.55);
    font-size: 11px;
    letter-spacing: 0.04em;
}
.tools-crumb li + li::before { margin-right: 8px; content: "/"; opacity: 0.5; }
.tools-crumb a { color: rgba(255, 255, 255, 0.8); transition: color 160ms ease; }
.tools-crumb a:hover { color: var(--lime); }

.tools-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(290px, 0.6fr);
    align-items: end;
    gap: clamp(40px, 6vw, 90px);
    padding: 46px 0 74px;
}

.tools-hero h1,
.calc-hero h1 {
    max-width: 15ch;
    margin: 18px 0 20px;
    font-family: var(--font-display);
    font-size: clamp(44px, 6vw, 78px);
    font-weight: 700;
    line-height: 0.93;
    letter-spacing: -0.06em;
    text-wrap: balance;
}

.tools-hero__lead,
.calc-hero__lead {
    max-width: 62ch;
    margin: 0;
    color: #c4d3d0;
    font-size: clamp(14px, 1.4vw, 17px);
    line-height: 1.72;
}

.tools-search {
    position: relative;
    max-width: 520px;
    margin-top: 30px;
}
.tools-search__icon {
    position: absolute;
    top: 50%;
    left: 20px;
    display: flex;
    color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%);
    pointer-events: none;
}
.tools-search input {
    width: 100%;
    padding: 17px 20px 17px 52px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    font-size: 15px;
    transition: border-color 180ms ease, background 180ms ease;
}
.tools-search input::placeholder { color: rgba(255, 255, 255, 0.45); }
.tools-search input:focus {
    outline: none;
    border-color: var(--lime);
    background: rgba(255, 255, 255, 0.12);
}
.tools-search input::-webkit-search-cancel-button { filter: invert(1); opacity: 0.6; }

.tools-hero__panel {
    padding: 28px;
    border: 1px solid rgba(216, 255, 99, 0.22);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
}
.tools-stat-list { margin: 0; }
.tools-stat-list > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.tools-stat-list > div:last-child { border-bottom: 0; }
.tools-stat-list dt { color: #a9b7b5; font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; }
.tools-stat-list dd { margin: 0; color: var(--lime); font-weight: 700; font-variant-numeric: tabular-nums; }
.tools-hero__note { margin: 18px 0 0; color: #9fb0ad; font-size: 12px; line-height: 1.65; }

/* --------------------------------------------------------------- filters */

.tools-filter {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: rgba(245, 243, 237, 0.92);
    backdrop-filter: blur(12px);
}
.tools-filter__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
}
.tools-filter__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    padding: 9px 17px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.chip:hover { border-color: var(--emerald); color: var(--emerald); }
.chip.is-active { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip:focus-visible { outline: 2px solid var(--emerald); outline-offset: 2px; }
.tools-filter__count {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* --------------------------------------------------------------- sections */

.tools-section, .calc-section { padding: clamp(48px, 7vw, 86px) 0; }
.tools-section--paper, .calc-section--paper { background: var(--canvas-2); }
.tools-catalogue { padding: clamp(40px, 6vw, 70px) 0; }

.tools-group { margin-bottom: clamp(40px, 6vw, 72px); }
.tools-group:last-of-type { margin-bottom: 0; }
.tools-group__head { max-width: 760px; margin-bottom: 26px; }
.tools-group__head h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: clamp(28px, 3.4vw, 40px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.04em;
}
.tools-group__count {
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--emerald);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.tools-group__head p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

/* ----------------------------------------------------------------- cards */

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tool-card {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--paper);
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.tool-card:hover {
    transform: translateY(-4px);
    border-color: rgba(8, 122, 91, 0.45);
    box-shadow: var(--shadow-sm);
}
.tool-card:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; }

.tool-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 18px;
    border-radius: 13px;
    background: rgba(8, 122, 91, 0.1);
    color: var(--emerald);
    transition: background 200ms ease, color 200ms ease;
}
.tool-card:hover .tool-card__icon { background: var(--emerald); color: var(--lime); }

.tool-card__title {
    margin: 0 0 9px;
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.025em;
}
.tool-card__text { flex: 1; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.tool-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 20px;
    color: var(--emerald);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.tool-card__cta .calc-icon { transition: transform 200ms ease; }
.tool-card:hover .tool-card__cta .calc-icon { transform: translateX(4px); }

.tools-grid--compact .tool-card { padding: 20px; }
.tools-grid--compact .tool-card__title { font-size: 18px; }

.tools-empty {
    padding: 46px 0;
    color: var(--muted);
    font-size: 15px;
    text-align: center;
}

/* ------------------------------------------------------------------ rail */

.tools-rail {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
}
.rail-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper);
    transition: transform 180ms ease, border-color 180ms ease;
}
.rail-card:hover { transform: translateY(-3px); border-color: var(--emerald); }
.rail-card__icon { color: var(--emerald); margin-bottom: 8px; }
.rail-card__name { font-weight: 700; font-size: 14px; }
.rail-card__tag { color: var(--muted); font-size: 11.5px; line-height: 1.5; }

/* --------------------------------------------------------------- widget */

.calc-widget { padding: clamp(34px, 5vw, 60px) 0; }

.calc-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 22px;
    align-items: start;
}

.calc-inputs {
    padding: clamp(22px, 3vw, 34px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--paper);
    box-shadow: var(--shadow-sm);
}
.calc-inputs__head { margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.calc-inputs__label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--emerald);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.field + .field { margin-top: 22px; }
.field__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}
.field__top label { font-size: 13.5px; font-weight: 600; }
.field__hint { color: var(--muted); font-size: 11px; }

.field__control { position: relative; display: flex; }
.field__control--numeric { align-items: stretch; }
.field__affix {
    display: flex;
    align-items: center;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-right: 0;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    background: var(--canvas-2);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.field input[type="number"],
.field input[type="text"],
.field input[type="month"],
.field select,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper);
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field__control--numeric input[type="number"] { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.field textarea { font-weight: 500; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--emerald);
    box-shadow: 0 0 0 3px rgba(8, 122, 91, 0.14);
}
.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.field input[type="number"] { -moz-appearance: textfield; }

.field__range {
    width: 100%;
    height: 4px;
    margin-top: 14px;
    padding: 0;
    border-radius: 999px;
    background: linear-gradient(to right, var(--emerald), rgba(8, 122, 91, 0.18));
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}
.field__range::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    border: 3px solid var(--paper);
    border-radius: 50%;
    background: var(--ink);
    box-shadow: 0 2px 8px rgba(7, 26, 32, 0.3);
    -webkit-appearance: none;
    appearance: none;
    cursor: grab;
}
.field__range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 3px solid var(--paper);
    border-radius: 50%;
    background: var(--ink);
    box-shadow: 0 2px 8px rgba(7, 26, 32, 0.3);
    cursor: grab;
}

/* --------------------------------------------------------------- results */

.calc-output {
    position: sticky;
    top: 84px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 78% 8%, rgba(216, 255, 99, 0.14), transparent 18rem),
        linear-gradient(150deg, #06181e 0%, #0a292f 62%, #0b3a37 100%);
    color: #fff;
    box-shadow: var(--shadow-md);
}
.calc-output__primary { padding: clamp(24px, 3vw, 34px); }
.calc-output__label {
    margin: 0 0 6px;
    color: #9fb0ad;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.calc-output__value {
    margin: 0;
    color: var(--lime);
    font-family: var(--font-display);
    font-size: clamp(38px, 5.2vw, 58px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.045em;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.calc-chart {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 28px 0 4px;
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.donut { flex: 0 0 128px; width: 128px; }
.donut svg { width: 100%; height: auto; }
.donut__seg { fill: none; stroke-width: 22; transition: stroke-dasharray 420ms cubic-bezier(0.4, 0, 0.2, 1); }

.calc-legend { flex: 1; margin: 0; padding: 0; list-style: none; }
.calc-legend li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    font-size: 12.5px;
}
.legend__dot { flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%; }
.legend__label { flex: 1; color: #c4d3d0; }
.legend__value { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }

.calc-output__list { margin: 22px 0 0; }
.calc-output__list > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.calc-output__list > div:last-child { border-bottom: 0; }
.calc-output__list dt { color: #a9b7b5; font-size: 12.5px; }
.calc-output__list dd {
    margin: 0;
    font-weight: 700;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.calc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 clamp(24px, 3vw, 34px) clamp(24px, 3vw, 34px);
}
.calc-actions .button { font-size: 11px; }
.calc-actions .button--ghost { border-color: rgba(255, 255, 255, 0.28); color: #fff; }
.calc-actions .button--ghost:hover { border-color: var(--lime); color: var(--lime); }
.calc-actions [data-calc-share].is-copied { background: var(--lime); color: var(--ink); }

/* -------------------------------------------------------------- schedule */

.calc-schedule {
    margin-top: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--paper);
}
.calc-schedule summary {
    padding: 18px 22px;
    list-style: none;
    color: var(--emerald);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.calc-schedule summary::-webkit-details-marker { display: none; }
.calc-schedule summary::after { float: right; content: "+"; }
.calc-schedule[open] summary::after { content: "\2212"; }
.calc-schedule__scroll { max-height: 460px; overflow: auto; border-top: 1px solid var(--line); }
.calc-schedule table { width: 100%; border-collapse: collapse; font-size: 13px; }
.calc-schedule th, .calc-schedule td {
    padding: 11px 22px;
    border-bottom: 1px solid var(--line);
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}
.calc-schedule thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--canvas-2);
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.calc-schedule th:first-child, .calc-schedule td:first-child { text-align: left; }
.calc-schedule tbody tr:hover { background: rgba(8, 122, 91, 0.045); }

/* --------------------------------------------------------------- content */

.calc-prose { max-width: 780px; }
.calc-prose h2, .calc-formula h2, .calc-howto h2 {
    margin: 0 0 18px;
    font-family: var(--font-display);
    font-size: clamp(27px, 3.2vw, 38px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.04em;
}
.calc-lead { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.78; }
.calc-note {
    margin: 22px 0 0;
    padding: 15px 18px;
    border-left: 3px solid var(--gold);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: rgba(217, 182, 111, 0.1);
    font-size: 13px;
    line-height: 1.65;
}

.calc-split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: clamp(32px, 5vw, 66px);
    align-items: start;
}
.calc-formula h2, .calc-howto h2 { margin-top: 14px; }
.calc-formula__expression {
    margin: 0 0 22px;
    padding: 18px 20px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: var(--lime);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13.5px;
    line-height: 1.6;
}
.calc-legend-list { margin: 0 0 20px; }
.calc-legend-list > div {
    display: grid;
    grid-template-columns: minmax(72px, auto) 1fr;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}
.calc-legend-list dt { color: var(--emerald); font-weight: 700; font-size: 13px; }
.calc-legend-list dd { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.calc-formula__note { margin: 0; color: var(--muted); font-size: 13px; font-style: italic; line-height: 1.7; }

.calc-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.calc-steps li {
    position: relative;
    padding: 0 0 20px 46px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    counter-increment: step;
}
.calc-steps li::before {
    position: absolute;
    top: -2px;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--emerald);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    content: counter(step);
}
.calc-steps li:last-child { padding-bottom: 0; }

.choose-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 28px;
}
.choose-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--paper);
}
.choose-card h3 {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}
.choose-card p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.72; }
.choose-card a { color: var(--emerald); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.choose-card a:hover { color: var(--ink); }

/* -------------------------------------------------------------------- faq */

.tools-faq { max-width: 860px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
    position: relative;
    padding: 22px 45px 22px 0;
    list-style: none;
    font-family: var(--font-display);
    font-size: clamp(18px, 2.1vw, 23px);
    font-weight: 700;
    line-height: 1.25;
    cursor: pointer;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; }
.faq-list summary::after {
    position: absolute;
    top: 22px;
    right: 8px;
    color: var(--emerald);
    font-family: var(--font-sans);
    content: "+";
}
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list details p { max-width: 72ch; margin: -4px 0 24px; color: var(--muted); font-size: 14px; line-height: 1.75; }

.calc-all-link { color: var(--emerald); font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.tools-disclaimer {
    max-width: 860px;
    margin: 34px 0 0;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.5);
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.72;
}
.tools-disclaimer strong { color: var(--ink); }

/* --------------------------------------------------------------- receipts */

.calc-receipts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 16px;
    margin-top: 22px;
}
.receipt {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper);
}
.receipt__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--line);
}
.receipt__head h4 { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.receipt__head span { color: var(--emerald); font-size: 11px; font-weight: 700; }
.receipt__body { margin: 0 0 14px; font-size: 13px; line-height: 1.7; }
.receipt__meta { margin: 0; }
.receipt__meta > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 12px; }
.receipt__meta dt { color: var(--muted); }
.receipt__meta dd { margin: 0; font-weight: 600; }
.receipt__sign { margin-top: 22px; padding-top: 8px; border-top: 1px solid var(--line); }
.receipt__sign span { color: var(--muted); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 1000px) {
    .calc-shell { grid-template-columns: minmax(0, 1fr); }
    .calc-output { position: static; }
    .tools-hero__grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
    .tools-hero__panel { max-width: 460px; }
}

@media (max-width: 640px) {
    .tools-hero__grid { padding: 34px 0 52px; }
    .tools-filter__inner { flex-direction: column; align-items: flex-start; gap: 10px; }
    .tools-filter__chips { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
    .chip { white-space: nowrap; }
    .calc-chart { flex-direction: column; align-items: flex-start; gap: 14px; }
    .donut { flex-basis: auto; width: 108px; }
    .calc-legend { width: 100%; }
    .calc-schedule th, .calc-schedule td { padding: 10px 14px; }
    .tools-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .tool-card, .rail-card, .donut__seg, .tool-card__cta .calc-icon { transition: none; }
}

/* ---------------------------------------------------------------- print */

@media print {
    .tools-filter, .calc-actions, .site-header, .site-footer, .tools-search { display: none !important; }
    .calc-output { background: none !important; color: #000 !important; box-shadow: none; }
    .calc-output__value { color: #000 !important; }
    .calc-output__list dt, .legend__label { color: #333 !important; }
    .calc-hero, .tools-hero { background: none !important; color: #000 !important; }
    .calc-hero__lead, .tools-hero__lead { color: #333 !important; }
    .calc-schedule__scroll { max-height: none; overflow: visible; }
    .calc-schedule[open] summary { display: none; }
    .receipt { break-inside: avoid; page-break-inside: avoid; }
}
