:root {
    --ink: #1d2027;
    --muted: #6f7480;
    --line: #d9dde3;
    --panel: #f3f3f4;
    --paper: #ffffff;
    --accent: #c8ff00;
    --accent-2: #0f766e;
    --danger: #b42318;
    --shadow: 0 18px 45px rgba(29, 32, 39, 0.08);
    --icon-stroke: #8b919b;
}

.calculator-shell--single {
    display: block;
}

.calculator-shell--single .calc-card--form {
    max-width: 900px;
    margin: 0 auto;
}

.calc-card--time {
    max-width: 900px;
}

.time-tool {
    display: grid;
    gap: 24px;
    color: var(--text);
}

.time-tool button,
.time-tool select,
.time-tool input {
    font: inherit;
}

.time-tool input,
.time-tool select {
    border: 1px solid var(--line);
    background: #fff;
    min-height: 38px;
    padding: 8px 10px;
}

.time-tool__hint {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.time-timer__controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 22px;
}

.time-dial {
    display: grid;
    justify-items: center;
    gap: 10px;
}

.time-dial > span,
.time-summary__label {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}

.time-dial strong {
    width: 104px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--accent) calc(var(--time-progress, 0) * 1%), #eef1f5 0);
    color: var(--accent);
    font-size: 28px;
    font-weight: 700;
}

.time-dial > div {
    display: flex;
    gap: 8px;
    align-items: center;
}

.time-icon-button,
.time-action {
    border: 1px solid var(--line);
    background: #fff;
    min-width: 42px;
    min-height: 38px;
    cursor: pointer;
}

.time-action {
    padding: 9px 18px;
    border-radius: 4px;
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.time-action--muted {
    background: #746c98;
    border-color: #746c98;
}

.time-timer__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.time-ring {
    width: 172px;
    aspect-ratio: 1;
    border: 7px solid var(--accent);
    border-radius: 50%;
    display: grid;
    place-items: center;
    justify-self: center;
    color: var(--accent);
    font-size: 34px;
    font-weight: 700;
}

.time-repeat {
    text-align: center;
    color: var(--muted);
}

.time-stopwatch__stage {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fafc, #f1fff4);
}

.time-stopwatch__display {
    padding: 22px 18px;
    border-radius: 8px;
    background: #1f2933;
    color: #fff;
    font-family: "Courier New", monospace;
    font-size: 48px;
    text-align: center;
}

.time-summary {
    display: grid;
    gap: 14px;
}

.time-summary > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.time-summary span,
.time-laps {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fff;
}

.time-summary strong {
    display: block;
    margin-top: 8px;
    font-weight: 700;
}

.time-keypad {
    display: grid;
    gap: 14px;
    max-width: 340px;
    margin: 0 auto;
}

.time-keypad > output {
    border: 1px solid var(--line);
    min-height: 42px;
    padding: 8px 10px;
    text-align: right;
    font-family: "Courier New", monospace;
    font-size: 22px;
}

.time-keypad__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.time-keypad__grid button {
    min-height: 42px;
    border: 1px solid var(--line);
    background: #f7f9fb;
    cursor: pointer;
}

.time-keypad__grid button:nth-child(4n),
.time-keypad__grid button[data-key="="],
.time-keypad__grid button[data-key="C"],
.time-keypad__grid button[data-key="AC"] {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.time-live-clock {
    display: grid;
    gap: 18px;
    text-align: center;
}

.time-live-clock__date {
    font-size: 42px;
}

.time-live-clock__time,
.time-live-clock__unix {
    font-size: 112px;
    line-height: 1;
    font-weight: 700;
}

.time-format-list {
    display: grid;
    gap: 8px;
    text-align: left;
}

.time-format-list output {
    border: 1px solid var(--line);
    min-height: 34px;
    padding: 7px 10px;
    background: #fff;
}

.time-zone-card,
.time-city-diff {
    display: grid;
    gap: 18px;
}

.time-zone-search,
.time-city-search {
    width: 100%;
}

.time-zone-list {
    display: grid;
    gap: 6px;
}

.time-zone-row,
.time-city-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 16px;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.time-city-row {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.time-city-row.is-selected {
    background: #f5f8fb;
}

.time-city-diff {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.time-city-diff > output {
    align-self: center;
    justify-self: center;
    font-size: 42px;
    font-weight: 700;
}

.time-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
}

.time-pair__city {
    border: 1px solid var(--line);
    padding: 14px;
    background: #fff;
}

.time-pair__diff {
    text-align: center;
    font-size: 42px;
}

@media (max-width: 760px) {
    .time-timer__controls,
    .time-summary > div,
    .time-city-diff,
    .time-pair {
        grid-template-columns: 1fr;
    }

    .time-live-clock__date {
        font-size: 28px;
    }

    .time-live-clock__time,
    .time-live-clock__unix {
        font-size: 52px;
    }

    .time-stopwatch__display {
        font-size: 34px;
    }
}

.radio-diagram {
    grid-column: 1 / -1;
    margin: 10px auto 4px;
    width: min(100%, 760px);
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--paper) 94%, #58b7f5 6%);
}

.radio-diagram svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.radio-diagram text {
    fill: var(--ink);
    font-size: 16px;
    font-weight: 700;
}

.radio-diagram .boom,
.radio-diagram .horizon,
.radio-diagram .dim {
    fill: none;
    stroke: #6d7886;
    stroke-width: 2;
    marker-start: url(#radio-arrow);
    marker-end: url(#radio-arrow);
}

.radio-diagram .boom,
.radio-diagram .horizon {
    marker-start: none;
    marker-end: none;
}

.radio-diagram .element,
.radio-diagram .loop,
.radio-diagram .mast,
.radio-diagram .tower,
.radio-diagram .target,
.radio-diagram .obstacle {
    fill: none;
    stroke: #243447;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.radio-diagram .active,
.radio-diagram .pin-a {
    stroke: #58b7f5;
}

.radio-diagram .reflector,
.radio-diagram .secondary,
.radio-diagram .pin-b {
    stroke: #ff9800;
}

.radio-diagram .director,
.radio-diagram .feed,
.radio-diagram .pin {
    stroke: #7a5cff;
}

.radio-diagram .pin {
    fill: #7a5cff;
}

.radio-diagram .radio-wave,
.radio-diagram .beam,
.radio-diagram .arc {
    fill: none;
    stroke: #58b7f5;
    stroke-width: 3;
    stroke-linecap: round;
}

.radio-diagram .beam {
    stroke: #9b4d4d;
}

.radio-diagram .dashed,
.radio-diagram .grid {
    stroke-dasharray: 8 8;
}

.radio-diagram .earth {
    fill: none;
    stroke: #8ba48a;
    stroke-width: 14;
    stroke-linecap: round;
}

.radio-diagram .fresnel {
    fill: rgba(88, 183, 245, 0.24);
    stroke: #58b7f5;
    stroke-width: 3;
}

.radio-map {
    width: 100%;
    min-height: 330px;
    margin: 20px 0 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #eef3f7;
}

.radio-map__fallback,
.radio-map__fallback svg {
    width: 100%;
    height: 330px;
}

.radio-map__fallback rect {
    fill: #eef3f7;
}

.radio-map__fallback .grid {
    fill: none;
    stroke: #d1dbe3;
    stroke-width: 1;
}

.radio-map__fallback .route {
    fill: none;
    stroke: #ff9800;
    stroke-width: 4;
}

.radio-map__fallback .pin {
    stroke: #243447;
    stroke-width: 3;
}

.radio-map__fallback .pin-a {
    fill: #58b7f5;
}

.radio-map__fallback .pin-b {
    fill: #ff9800;
}

.radio-map__fallback text {
    fill: #243447;
    font-size: 18px;
    font-weight: 800;
}

.radio-map__fallback .distance {
    fill: #ff9800;
}

.calc-card--aquarium {
    max-width: 860px;
}

.field--aquarium-shapes {
    margin: 0;
    padding: 0;
    border: 0;
}

.field--aquarium-shapes legend {
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: center;
}

.aquarium-shape-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 10px;
    padding: 16px;
    border: 1px solid rgba(72, 172, 221, 0.22);
    border-radius: 20px;
    background:
        radial-gradient(circle at 100% 100%, rgba(170, 255, 0, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(72, 172, 221, 0.12), rgba(255, 255, 255, 0.72));
}

.aquarium-shape-card {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 124px;
    justify-items: center;
    align-content: center;
    gap: 8px;
    padding: 12px 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
    color: var(--ink);
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.aquarium-shape-card:hover {
    transform: translateY(-1px);
    border-color: rgba(72, 172, 221, 0.65);
    box-shadow: 0 12px 24px rgba(31, 35, 44, 0.08);
}

.aquarium-shape-card input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.aquarium-shape-card__icon {
    display: block;
    width: 64px;
    height: 44px;
}

.aquarium-shape-card svg {
    width: 100%;
    height: 100%;
}

.aquarium-shape-card svg * {
    fill: rgba(72, 172, 221, 0.22);
    stroke: #2f9bd2;
    stroke-width: 3;
    stroke-linejoin: round;
}

.aquarium-shape-card__title {
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.18;
    text-align: center;
    overflow-wrap: anywhere;
    word-break: normal;
}

.aquarium-shape-card:has(input:checked) {
    border-color: #2f9bd2;
    box-shadow: 0 0 0 2px rgba(72, 172, 221, 0.18);
}

:root[data-theme="dark"] .aquarium-shape-grid {
    background:
        radial-gradient(circle at 100% 100%, rgba(170, 255, 0, 0.1), transparent 34%),
        linear-gradient(135deg, rgba(72, 172, 221, 0.12), rgba(18, 23, 31, 0.78));
    border-color: rgba(176, 202, 218, 0.18);
}

:root[data-theme="dark"] .aquarium-shape-card {
    background: var(--surface);
}

:root[data-theme="dark"] .aquarium-shape-card:hover,
:root[data-theme="dark"] .aquarium-shape-card:has(input:checked) {
    border-color: rgba(170, 255, 0, 0.75);
}

:root[data-theme="dark"] .aquarium-shape-card svg * {
    fill: rgba(170, 255, 0, 0.12);
    stroke: #aaff00;
}

@media (max-width: 720px) {
    .aquarium-shape-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 12px;
    }

    .aquarium-shape-card {
        min-height: 112px;
    }
}

.nutrition-info-table {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 0 0 28px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper);
}

.nutrition-info-table section {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(183, 255, 0, 0.12), transparent);
}

.nutrition-info-table section:last-child {
    border-right: 0;
}

.nutrition-info-table strong {
    font-size: 16px;
    color: var(--ink);
}

.nutrition-info-table span {
    font-size: 13px;
    line-height: 1.45;
    color: var(--muted);
}

.nutrition-compat-table {
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 0 30px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper);
    overflow-x: auto;
}

.nutrition-compat-table__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
}

.nutrition-compat-table__legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nutrition-compat-table i {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 5px;
}

.nutrition-compat-table__grid {
    display: grid;
    gap: 4px;
    min-width: 760px;
}

.nutrition-compat-table__row {
    display: grid;
    grid-template-columns: 28px minmax(170px, 1fr) auto;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.nutrition-compat-table__row div {
    display: grid;
    grid-template-columns: repeat(17, 18px);
    gap: 3px;
}

.nutrition-compat-table .is-good,
.nutrition-compat-table__legend .is-good {
    background: #128a26;
}

.nutrition-compat-table .is-ok,
.nutrition-compat-table__legend .is-ok {
    background: #f1d92b;
}

.nutrition-compat-table .is-bad,
.nutrition-compat-table__legend .is-bad {
    background: #e63224;
}

.egg-timer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 30px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(40, 179, 224, 0.12), rgba(183, 255, 0, 0.12));
}

.egg-timer-grid legend {
    grid-column: 1 / -1;
    margin: 0 0 4px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.egg-card {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 14px 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--paper);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.egg-card:has(input:checked) {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(183, 255, 0, 0.28);
}

.egg-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.egg-card__picture {
    position: relative;
    display: block;
    width: 84px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 52%, #fff 0 58%, #eef3f8 59% 100%);
    border: 1px solid rgba(13, 31, 44, 0.12);
    box-shadow: inset 0 -8px 16px rgba(13, 31, 44, 0.08);
}

.egg-card__picture span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 36px;
    height: 36px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle at 42% 34%, #ffd65a 0 25%, #ff9d0a 70%);
    box-shadow: 0 3px 8px rgba(255, 157, 10, 0.28);
}

.egg-card--3 .egg-card__picture span { width: 44px; height: 28px; filter: blur(0.4px); }
.egg-card--5 .egg-card__picture span { width: 42px; height: 34px; }
.egg-card--6 .egg-card__picture span { width: 38px; height: 36px; }
.egg-card--7 .egg-card__picture span { width: 34px; height: 34px; }
.egg-card--8 .egg-card__picture span { width: 30px; height: 30px; }
.egg-card--9 .egg-card__picture span { width: 26px; height: 26px; background: #f39a0c; }

.egg-card strong {
    font-size: 15px;
    line-height: 1.25;
}

.egg-card em {
    font-style: normal;
    font-size: 12px;
    line-height: 1.35;
    color: var(--muted);
}

.nutrition-products {
    display: grid;
    gap: 10px;
    margin: 0 0 30px;
}

.nutrition-products__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-radius: 16px;
    background: var(--soft);
}

.nutrition-products__summary span {
    color: var(--muted);
    font-weight: 700;
}

.nutrition-products__summary strong {
    font-size: 28px;
    color: var(--accent-strong, var(--ink));
}

.nutrition-products__search {
    width: 100%;
    min-height: 48px;
    border-radius: 14px;
    padding: 0 16px;
}

.nutrition-products__group {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
    overflow: hidden;
}

.nutrition-products__group[open] {
    box-shadow: 0 16px 38px rgba(13, 31, 44, 0.08);
}

.nutrition-products__group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    cursor: pointer;
    font-weight: 800;
}

.nutrition-products__group summary strong {
    min-width: 84px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

.nutrition-products__rows {
    border-top: 1px solid var(--line);
}

.nutrition-food-row {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) 86px 86px 20px 74px;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--line);
}

.nutrition-food-row:last-child {
    border-bottom: 0;
}

.nutrition-food-row small,
.nutrition-food-row em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.nutrition-food-row input[type="text"] {
    min-height: 38px;
    padding: 0 10px;
    border-radius: 10px;
    text-align: right;
}

.nutrition-food-row b {
    text-align: right;
    white-space: nowrap;
}

:root[data-theme="dark"] .nutrition-info-table,
:root[data-theme="dark"] .nutrition-compat-table,
:root[data-theme="dark"] .egg-card,
:root[data-theme="dark"] .nutrition-products__group {
    background: #111821;
    border-color: rgba(229, 236, 243, 0.16);
}

:root[data-theme="dark"] .nutrition-products__summary,
:root[data-theme="dark"] .nutrition-products__group summary strong {
    background: rgba(229, 236, 243, 0.08);
}

:root[data-theme="dark"] .egg-card__picture {
    border-color: rgba(229, 236, 243, 0.18);
}

@media (max-width: 760px) {
    .nutrition-info-table {
        grid-template-columns: 1fr;
    }

    .nutrition-info-table section {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .nutrition-info-table section:last-child {
        border-bottom: 0;
    }

    .egg-timer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 14px;
    }

    .nutrition-products__summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .nutrition-food-row {
        grid-template-columns: minmax(0, 1fr) 72px 18px 70px;
        gap: 8px;
    }

    .nutrition-food-row small {
        grid-column: 1 / -1;
        order: 2;
    }

    .nutrition-food-row input[type="text"] {
        order: 3;
    }

    .nutrition-food-row em {
        order: 4;
    }

    .nutrition-food-row b {
        order: 5;
    }
}

@media (max-width: 460px) {
    .egg-timer-grid {
        grid-template-columns: 1fr;
    }
}

:root[data-theme="dark"] {
    --ink: #f5f7fb;
    --muted: #b8c0cc;
    --line: #394150;
    --panel: #171b22;
    --paper: #0f1218;
    --accent: #b6ff00;
    --accent-2: #74e3d8;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
    --icon-stroke: #d3d8e0;
}

:root[data-theme="dark"] .footer-brand .brand-copy strong {
    color: var(--ink);
}

:root[data-theme="dark"] .category-card:hover {
    background: var(--panel);
}

:root[data-theme="dark"] .category-card::before,
:root[data-theme="dark"] .category-card::after,
:root[data-theme="dark"] .themed-panel::before,
:root[data-theme="dark"] .themed-panel::after {
    opacity: 0 !important;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "Manrope", "Arial", sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.site-header,
.footer-inner,
.breadcrumbs,
.hero,
.page-heading,
.category-grid,
.subcategory-panel,
.calculator-list,
.calculator-hero,
.calculator-shell,
.seo-section {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

.site-header {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-header:has(.header-search) {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(360px, 520px) minmax(220px, 1fr);
}

.site-header:has(.header-search) .brand {
    justify-self: start;
}

.site-header:has(.header-search) .header-search {
    justify-self: center;
    width: 100%;
}

.site-header:has(.header-search) .header-tools {
    justify-self: end;
    margin-left: 0;
}

.header-tools {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.tool-button,
.language-menu button {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 22px;
    color: var(--ink);
    background: var(--paper);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.tool-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 48px;
    padding: 0 14px;
}

.language-switcher {
    position: relative;
}

.language-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 40;
    display: grid;
    gap: 6px;
    min-width: 260px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.language-menu[hidden] {
    display: none !important;
}

.language-menu strong {
    padding: 4px 8px 8px;
    font-size: 15px;
}

.language-menu button {
    position: relative;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) 18px;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    gap: 10px;
    padding: 0 15px;
    text-align: left;
}

.language-menu button span:nth-child(2) {
    min-width: 0;
}

.language-flag {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 16px;
    overflow: hidden;
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px rgba(29, 32, 39, 0.18);
}

.language-flag--ru {
    background: linear-gradient(180deg, #fff 0 33.33%, #1f57b8 33.33% 66.66%, #d52b1e 66.66% 100%);
}

.language-flag--gb {
    background: #012169;
}

.language-flag--gb::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(32deg, transparent 0 42%, #fff 42% 48%, #c8102e 48% 53%, #fff 53% 59%, transparent 59%),
        linear-gradient(148deg, transparent 0 42%, #fff 42% 48%, #c8102e 48% 53%, #fff 53% 59%, transparent 59%),
        linear-gradient(90deg, transparent 0 38%, #fff 38% 45%, #c8102e 45% 55%, #fff 55% 62%, transparent 62%),
        linear-gradient(0deg, transparent 0 35%, #fff 35% 43%, #c8102e 43% 57%, #fff 57% 65%, transparent 65%);
}

.language-menu button.is-active::after {
    content: "✓";
    justify-self: end;
    color: var(--accent-2);
}

.theme-toggle__sun,
.theme-toggle__moon {
    font-size: 17px;
}

.site-menu-wrapper {
    position: relative;
}

.burger-button {
    width: 48px;
    padding: 0;
    flex-direction: column;
    gap: 5px;
}

.burger-button span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
}

.burger-button[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger-button[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.burger-button[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.site-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 45;
    display: grid;
    gap: 6px;
    width: min(320px, calc(100vw - 32px));
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.site-menu[hidden] {
    display: none !important;
}

.site-menu a {
    display: block;
    padding: 12px 14px;
    border-radius: 8px;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.25;
    font-weight: 800;
    transition: background-color 160ms ease, color 160ms ease;
}

.site-menu a:hover,
.site-menu a:focus-visible {
    background: var(--accent);
    color: #161a21;
}

:root[data-theme="dark"] .theme-toggle__sun {
    opacity: 0.35;
}

:root[data-theme="light"] .theme-toggle__moon {
    opacity: 0.35;
}

.brand {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    font-weight: 800;
    min-width: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: #ffffff;
    background: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(29, 32, 39, 0.08);
    flex: 0 0 auto;
}

.brand-mark > span {
    display: none;
}

.brand-icon {
    display: block;
    width: 31px;
    height: 31px;
    fill: currentColor;
}

.brand-icon__screen {
    fill: var(--accent);
}

.brand-icon circle {
    fill: var(--accent);
}

.brand-mark:not(:has(.brand-icon))::before {
    content: "";
    display: block;
    width: 31px;
    height: 31px;
    background: #ffffff;
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14 11a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v26a3 3 0 0 1-3 3H17a3 3 0 0 1-3-3V11Zm5 4v5h10v-5H19Zm0 10a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm5 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm5 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm-10 7a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm5 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm5 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14 11a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v26a3 3 0 0 1-3 3H17a3 3 0 0 1-3-3V11Zm5 4v5h10v-5H19Zm0 10a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm5 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm5 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm-10 7a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm5 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm5 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.brand-copy {
    display: block;
    min-width: 0;
}

.brand-domain {
    display: inline-flex;
    align-items: baseline;
    font-size: 31px;
    line-height: 1;
    letter-spacing: 0;
    font-weight: 900;
    white-space: nowrap;
}

.brand-domain__name {
    color: var(--ink);
}

.brand-domain__zone {
    color: #a7adb7;
    font-weight: 500;
}

.brand:not(:has(.brand-domain)) .brand-copy {
    display: block;
}

.brand:not(:has(.brand-domain)) .brand-copy strong {
    display: inline-flex;
    align-items: baseline;
    color: var(--ink);
    font-size: 31px;
    line-height: 1;
    letter-spacing: 0;
    font-weight: 900;
    white-space: nowrap;
}

.brand:not(:has(.brand-domain)) .brand-copy strong::after {
    content: ".RU";
    color: #a7adb7;
    font-weight: 500;
}

.brand:not(:has(.brand-domain)) .brand-copy small {
    display: none;
}

:root[data-theme="dark"] .brand-domain__zone {
    color: #818b9a;
}

:root[data-theme="dark"] .brand:not(:has(.brand-domain)) .brand-copy strong::after {
    color: #818b9a;
}

.header-search {
    display: grid;
    grid-template-columns: minmax(180px, 360px) auto;
    align-items: center;
    gap: 8px;
    flex: 1 1 460px;
    max-width: 520px;
}

.header-search__box {
    min-width: 0;
}

.header-search input {
    min-height: 42px;
    border-radius: 22px;
    padding: 0 16px;
    font-size: 16px;
    font-weight: 700;
}

.header-search input::placeholder {
    color: #aeb4bd;
    opacity: 1;
    font: inherit;
}

.header-search input:focus::placeholder {
    color: transparent;
}

.header-search button {
    min-width: 76px;
    min-height: 42px;
    border: 0;
    border-radius: 22px;
    color: var(--paper);
    background: var(--ink);
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.header-search .search-results {
    top: calc(100% + 6px);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 44px;
    padding: 34px 0;
}

.footer-brand {
    align-self: start;
    color: #2b2e34;
}

.footer-brand .brand-mark {
    width: 62px;
    height: 62px;
}

.footer-brand .brand-icon {
    width: 37px;
    height: 37px;
}

.footer-brand .brand-domain {
    font-size: 38px;
}

.footer-column {
    display: grid;
    align-content: start;
    gap: 16px;
}

.footer-column h2 {
    margin: 0 0 6px;
    font-size: 22px;
    line-height: 1.2;
}

.footer-column a {
    font-size: 18px;
    line-height: 1.35;
}

.footer-column a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumbs a::after {
    content: "/";
    margin-left: 8px;
    color: #b2b6be;
}

.hero,
.page-heading,
.calculator-hero {
    padding: 54px 0 34px;
    text-align: center;
}

.hero h1,
.page-heading h1,
.calculator-hero h1 {
    max-width: 920px;
    margin: 0 auto;
    font-size: clamp(44px, 7vw, 88px);
    line-height: 1.08;
    font-weight: 800;
}

.hero h1 span,
.calculator-hero h1 span {
    padding: 0.08em 0.16em 0.12em;
    background: var(--accent);
    border-radius: 8px;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.calculator-hero h1 span {
    display: table;
    margin: 0.22em auto 0;
}

.calculator-hero h1 {
    font-size: clamp(44px, 7vw, 72px);
    overflow-wrap: normal;
    word-break: normal;
}

.calculator-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 0 18px;
}

.calculator-tags a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--accent-2);
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    font-size: 14px;
    font-weight: 800;
}

.calculator-usage {
    max-width: 760px;
    margin: 16px auto 0;
    color: var(--muted);
    font-weight: 700;
}

.field-help {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    margin-left: 6px;
    border: 1px solid var(--muted);
    border-radius: 50%;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: help;
}

.field-help-popover {
    position: fixed;
    z-index: 100;
    max-width: min(300px, calc(100vw - 32px));
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: var(--paper);
    box-shadow: var(--shadow);
    font-size: 14px;
    line-height: 1.45;
}

.share-block,
.embed-section {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

.share-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
}

.share-block span {
    color: var(--muted);
    font-weight: 800;
}

.share-block a {
    display: inline-grid;
    place-items: center;
    min-width: 46px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 22px;
    font-weight: 900;
    transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.share-block a:hover,
.share-block a:focus-visible {
    border-color: var(--ink);
    color: #161a21;
    background: var(--accent);
    transform: translateY(-2px);
}

.embed-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin-top: 24px;
}

.cookie-notice {
    position: fixed;
    right: 15px;
    bottom: 18px;
    z-index: 90;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    max-width: 340px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.cookie-notice[hidden] {
    display: none !important;
}

.cookie-notice span {
    font-size: 14px;
    line-height: 1.3;
}

.cookie-notice button,
.cookie-notice a {
    font-weight: 900;
}

.cookie-notice button {
    min-height: 38px;
    padding: 0 18px;
    border: 0;
    border-radius: 20px;
    color: var(--paper);
    background: var(--ink);
    cursor: pointer;
}

.quick-calculator {
    display: grid;
    gap: 10px;
    width: min(920px, 100%);
    margin: 26px auto 0;
}

.hero--catalog .quick-calculator {
    display: none;
}

.quick-calculator--wide {
    padding: 22px;
    border-radius: 28px;
    background: #1d2027;
    box-shadow: 0 24px 70px rgba(29, 32, 39, 0.22);
}

.quick-calculator__display {
    display: grid;
    gap: 8px;
    min-height: 118px;
    padding: 18px 22px;
    border-radius: 20px;
    color: #f9fbff;
    background: #101319;
    text-align: right;
}

.quick-calculator__display span {
    min-height: 24px;
    color: #aeb6c5;
    font-weight: 800;
}

.quick-calculator__display output {
    justify-content: end;
    min-height: auto;
    padding: 0;
    border: 0;
    color: #f9fbff;
    background: transparent;
    font-size: clamp(34px, 7vw, 72px);
    line-height: 1;
}

.quick-calculator__keys {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 8px;
}

.quick-calculator input,
.quick-calculator select,
.quick-calculator output {
    min-height: 56px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    font-weight: 800;
}

.quick-calculator button {
    min-height: 56px;
    border: 0;
    border-radius: 28px;
    color: #f9fbff;
    background: #2b303a;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.quick-calculator__keys button:nth-child(6),
.quick-calculator__keys button:nth-child(10),
.quick-calculator__keys button:nth-child(20),
.quick-calculator__keys button:nth-child(30),
.quick-calculator__keys button:nth-child(40),
.quick-calculator__keys button:last-child {
    background: var(--accent);
    color: #161a21;
}

.quick-calculator output {
    display: grid;
    place-items: center;
    overflow: hidden;
}

.quick-calculator__display output {
    place-items: end;
    color: #f9fbff;
    background: transparent;
}

.page-heading h1 {
    font-size: clamp(38px, 6vw, 72px);
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--accent-2);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 13px;
}

.lead {
    max-width: 780px;
    margin: 24px auto 0;
    font-size: clamp(18px, 2vw, 23px);
    line-height: 1.45;
    font-weight: 700;
}

.search-form {
    display: grid;
    grid-template-columns: minmax(260px, 720px) auto;
    align-items: end;
    justify-content: center;
    gap: 12px;
    margin: 30px auto 0;
}

.search-box {
    position: relative;
}

.search-box__label {
    display: block;
    margin-bottom: 8px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
}

.hero--catalog .search-box__label {
    display: none !important;
}

.search-form input {
    min-height: 58px;
}

.search-form input::placeholder {
    color: #aeb4bd;
}

.search-form input:focus::placeholder {
    color: transparent;
}

.search-form button {
    min-width: 124px;
    min-height: 58px;
    border: 0;
    border-radius: 30px;
    color: var(--paper);
    background: var(--ink);
    font: inherit;
    font-weight: 800;
    text-transform: capitalize;
    cursor: pointer;
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 15;
    max-height: 330px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 18px 45px rgba(29, 32, 39, 0.14);
    text-align: left;
}

.search-result {
    display: grid;
    gap: 4px;
    padding: 14px 18px;
    border-bottom: 1px solid #eef0f3;
}

.search-result:last-child {
    border-bottom: 0;
}

.search-result strong {
    font-size: 16px;
}

.search-result small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.search-result[href]:hover {
    background: #f6f8f0;
}

.search-result--disabled {
    color: var(--ink);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 18px;
}

.category-card,
.subcategory-panel,
.calculator-list,
.calc-card,
.seo-section {
    border-radius: 8px;
    background: var(--panel);
}

.category-card {
    position: relative;
    overflow: hidden;
    padding: 28px;
    transition: background-color 220ms ease, transform 220ms ease;
}

.category-card::before,
.category-card::after {
    content: "";
    position: absolute;
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
}

.category-card::before,
.themed-panel::before {
    width: 250px;
    height: 180px;
    right: 22px;
    top: 18px;
    opacity: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.category-card::after,
.themed-panel::after {
    inset: 0;
    opacity: 0;
    background:
        radial-gradient(circle at 82% 20%, rgba(200, 255, 0, 0.18), transparent 24%),
        linear-gradient(135deg, rgba(255,255,255,0.3), transparent 54%);
}

.category-card:hover {
    background: #f1fae7;
    transform: translateY(-2px);
}

.category-card:hover::before,
.category-card:hover::after,
.themed-panel:hover::before,
.themed-panel:hover::after {
    opacity: 1;
    transform: scale(1.05);
}

.category-card > *,
.themed-panel > * {
    position: relative;
    z-index: 1;
}

.themed-panel {
    position: relative;
    overflow: hidden;
}

.themed-panel::before,
.themed-panel::after {
    content: "";
    position: absolute;
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
}

[data-theme="ucheba-i-nauka"]::before {
    background-image: url("data:image/svg+xml,%3Csvg width='420' height='310' viewBox='0 0 420 310' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23d8ec76' stroke-width='24' stroke-linecap='round' opacity='.95'%3E%3Cpath d='M88 78h96M136 30v96M248 78h92M86 218h100M254 174l72 72M326 174l-72 72'/%3E%3C/g%3E%3C/svg%3E");
}

[data-theme="krasota-i-zdorove"]::before {
    background-image: url("data:image/svg+xml,%3Csvg width='420' height='310' viewBox='0 0 420 310' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23d8ec76' stroke-width='22' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M182 92c-18-36-84-24-84 27 0 58 84 98 84 98s84-40 84-98c0-51-66-63-84-27Z'/%3E%3Cpath d='M304 84c32 28 42 74 24 114M82 212c40 22 89 24 132 4' opacity='.72'/%3E%3C/g%3E%3C/svg%3E");
}

[data-theme="kompyuternaya-tehnika"]::before {
    background-image: url("data:image/svg+xml,%3Csvg width='420' height='310' viewBox='0 0 420 310' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23d8ec76' stroke-width='18' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='120' y='78' width='170' height='130' rx='22'/%3E%3Cpath d='M96 112h24M96 154h24M96 196h24M290 112h34M290 154h34M290 196h34M154 52v26M204 52v26M254 52v26M154 208v36M204 208v36M254 208v36'/%3E%3Cpath d='M164 122h82M164 162h48' opacity='.7'/%3E%3C/g%3E%3C/svg%3E");
}

[data-theme="transport"]::before {
    background-image: url("data:image/svg+xml,%3Csvg width='420' height='310' viewBox='0 0 420 310' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23d8ec76' stroke-width='19' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M88 178h24l30-58h130l38 58h28'/%3E%3Cpath d='M144 120l20-42h86l24 42M148 178h126'/%3E%3Ccircle cx='138' cy='202' r='31'/%3E%3Ccircle cx='292' cy='202' r='31'/%3E%3Cpath d='M330 102h46M350 78v48' opacity='.7'/%3E%3C/g%3E%3C/svg%3E");
}

[data-theme="stroitelstvo"]::before {
    background-image: url("data:image/svg+xml,%3Csvg width='420' height='310' viewBox='0 0 420 310' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23d8ec76' stroke-width='18' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M92 214h236M128 214V108h162v106M112 108h196M156 108V72h108v36M158 150h36M224 150h36M158 190h36M224 190h36'/%3E%3Cpath d='M316 64l40 40M356 64l-40 40' opacity='.7'/%3E%3C/g%3E%3C/svg%3E");
}

[data-theme="byt"]::before {
    background-image: url("data:image/svg+xml,%3Csvg width='420' height='310' viewBox='0 0 420 310' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23d8ec76' stroke-width='18' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M98 166l108-86 108 86M130 154v94h152v-94M176 248v-58h60v58'/%3E%3Cpath d='M314 76v48M290 100h48M92 82h54M119 55v54' opacity='.75'/%3E%3C/g%3E%3C/svg%3E");
}

[data-theme="konvertery"]::before {
    background-image: url("data:image/svg+xml,%3Csvg width='420' height='310' viewBox='0 0 420 310' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23d8ec76' stroke-width='18' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M104 108h176M238 66l48 42-48 42M316 202H140M182 160l-48 42 48 42'/%3E%3Cpath d='M112 64h52M138 38v52M262 222h72M298 186v72' opacity='.72'/%3E%3C/g%3E%3C/svg%3E");
}

.category-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.category-card__head strong {
    display: block;
    font-size: 26px;
    line-height: 1.16;
}

.category-card__head small,
.subcategory-tile small,
.calculator-row small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.category-card p {
    min-height: 64px;
    margin: 22px 0;
    color: var(--muted);
    line-height: 1.55;
}

.arrow {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--paper);
}

.subcategory-list,
.subcategory-tiles,
.calculator-grid {
    display: grid;
    gap: 10px;
}

.subcategory-list a,
.subcategory-tile,
.calculator-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--paper);
    transition: border-color 160ms ease, transform 160ms ease;
}

.subcategory-list a:hover,
.subcategory-tile:hover,
.calculator-row:hover {
    border-color: var(--ink);
    transform: translateY(-1px);
}

.subcategory-list em,
.calculator-row em {
    margin-left: auto;
    color: var(--muted);
    font-style: normal;
    font-weight: 800;
    font-size: 13px;
    white-space: nowrap;
}

.calc-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--icon-stroke);
    font-weight: 800;
    font-size: 15px;
}

.calc-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.subcategory-panel,
.calculator-list {
    padding: 28px;
    margin-top: 22px;
}

.section-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.section-title h2,
.calc-card h2,
.seo-section h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
}

.section-title span {
    color: var(--muted);
    font-weight: 800;
}

.subcategory-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.calculator-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.calculator-row {
    min-height: 76px;
}

.calculator-grid .calculator-row {
    min-height: 156px;
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
}

.calculator-grid .calculator-row em {
    margin-top: auto;
    margin-left: 0;
}

.calculator-grid--single {
    margin-top: 12px;
    grid-template-columns: minmax(0, 1fr);
}

.calculator-request-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    min-height: 156px;
    padding: 18px;
    border: 1px solid rgba(200, 255, 0, 0.65);
    border-radius: 8px;
    color: var(--ink);
    background: linear-gradient(135deg, rgba(200, 255, 0, 0.2), var(--paper) 62%);
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: border-color 160ms ease, transform 160ms ease;
}

.calculator-request-card:hover {
    border-color: var(--ink);
    transform: translateY(-1px);
}

.request-card__icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
}

.request-card__icon::before {
    content: "";
    width: 16px;
    height: 18px;
    border: 2px solid var(--icon-stroke);
    border-bottom: 0;
    border-radius: 12px 12px 6px 6px;
}

.request-card__icon::after {
    content: "";
    position: absolute;
    bottom: 10px;
    width: 14px;
    height: 7px;
    border-top: 2px solid var(--icon-stroke);
    border-bottom: 2px solid var(--icon-stroke);
}

.request-card__copy {
    display: grid;
    gap: 8px;
}

.request-card__copy strong {
    font-size: 20px;
}

.request-card__copy small {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.45;
}

.request-card__action {
    grid-column: 2;
    align-self: end;
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.empty-state {
    padding: 26px;
    border-radius: 8px;
    color: var(--muted);
    background: var(--paper);
}

.calculator-shell {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 0.92fr);
    gap: 20px;
    align-items: start;
}

.calculator-shell > * {
    min-width: 0;
}

.calc-card {
    min-width: 0;
    max-width: 100%;
    padding: 34px;
    box-shadow: var(--shadow);
}

.calc-card__head {
    margin-bottom: 28px;
}

.calc-card__head p {
    margin: 16px 0 0;
    font-size: 18px;
    line-height: 1.5;
}

.fields-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 18px;
}

.field {
    display: grid;
    gap: 10px;
}

.field--wide,
.field--mode,
.field--full {
    margin-bottom: 18px;
}

.field--full {
    grid-column: 1 / -1;
    max-width: 460px;
}

.field--segmented.field--full {
    width: 100%;
    max-width: none;
}

.calc-card--vehicle-codes .fields-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 100%;
}

.calc-card--vehicle-codes .field,
.calc-card--vehicle-codes .field--full {
    max-width: none;
}

.calc-card--vehicle-codes .segmented-field {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.calculator-illustration {
    width: min(880px, calc(100% - 32px));
    margin: 8px auto 28px;
}

.calculator-illustration img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid rgba(199, 204, 211, 0.72);
    border-radius: 8px;
    box-shadow: var(--shadow);
    background: var(--paper);
}

.calc-card--electrical,
.calc-card--finishing,
.calc-card--construction {
    max-width: 860px;
}

.calc-card--electrical .fields-grid,
.calc-card--finishing .fields-grid,
.calc-card--construction .fields-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.calc-card--finishing,
.calc-card--construction {
    max-width: 900px;
}

.calc-card--electrical .field--segmented,
.calc-card--finishing .field--segmented,
.calc-card--construction .field--segmented {
    margin-bottom: 4px;
}

.calc-card--electrical .field--segmented .segmented-field,
.calc-card--finishing .field--segmented .segmented-field,
.calc-card--construction .field--segmented .segmented-field {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 4px;
    padding: 4px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--panel) 82%, var(--paper) 18%);
}

.calc-card--electrical .field--segmented .segmented-field span,
.calc-card--finishing .field--segmented .segmented-field span,
.calc-card--construction .field--segmented .segmented-field span {
    min-height: 44px;
    border-radius: 6px;
}

.calc-card--electrical .field--segmented .segmented-field input:checked + span,
.calc-card--finishing .field--segmented .segmented-field input:checked + span,
.calc-card--construction .field--segmented .segmented-field input:checked + span {
    box-shadow: 0 8px 24px rgba(29, 32, 39, 0.08);
}

.calc-card--laundry-weight .fields-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    max-width: 520px;
    margin-inline: auto;
}

.calc-card--laundry-weight .field {
    grid-template-columns: minmax(150px, 1fr) minmax(120px, 176px);
    align-items: center;
    gap: 14px 24px;
}

.calc-card--laundry-weight .field > span {
    text-align: right;
}

.calc-card--laundry-weight .field input {
    min-height: 42px;
    border-radius: 0;
    padding: 0 12px;
    font-weight: 400;
}

.calc-card--transport-tax .field--full,
form[data-history-key="calculator-history-616"] .field--full {
    max-width: none;
}

@media (min-width: 721px) {
    .calc-card--transport-tax .field:not(.field--single-check),
    form[data-history-key="calculator-history-616"] .field:not(.field--single-check) {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        gap: 10px;
    }

    .calc-card--transport-tax .field:not(.field--single-check) > span:first-child,
    form[data-history-key="calculator-history-616"] .field:not(.field--single-check) > span:first-child {
        align-items: flex-start;
    }
}

.field--mode {
    max-width: 440px;
    margin-inline: auto;
}

.field span {
    font-size: 18px;
    font-weight: 800;
}

.field--checkboxes {
    grid-column: 1 / -1;
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    border: 0;
}

.field--radio {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    border: 0;
}

.field--checkboxes legend,
.field--radio legend {
    display: block;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 800;
}

.radio-list {
    display: grid;
    gap: 8px;
}

.radio-list label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--ink);
    font-size: 17px;
    line-height: 1.35;
    cursor: pointer;
}

.radio-list input {
    flex: 0 0 auto;
    width: 16px;
    min-height: 16px;
    height: 16px;
    margin: 4px 0 0;
    padding: 0;
    accent-color: var(--accent);
}

.field--radio + .field {
    align-self: end;
}

.result-source {
    white-space: pre-line;
}

.field--segmented {
    display: grid;
    gap: 12px;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}

.calculator-shell [hidden] {
    display: none !important;
}

.field--segmented legend {
    font-size: 18px;
    font-weight: 800;
}

.sport-activity-table {
    display: grid;
    gap: 18px;
    margin-bottom: 24px;
}

.sport-activity-weight {
    display: grid;
    grid-template-columns: minmax(110px, max-content) minmax(120px, 180px);
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 800;
}

.sport-activity-table__grid {
    display: grid;
    grid-template-columns: 44px minmax(150px, 1fr) minmax(210px, 1.4fr) 92px 92px 36px;
    overflow-x: auto;
    border: 1px solid var(--line);
    background: var(--paper);
}

.sport-activity-table__head {
    min-width: 0;
    padding: 10px 8px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

.sport-activity-row {
    display: contents;
}

.sport-activity-row > * {
    min-width: 0;
    min-height: 42px;
    border: 0;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: #fff;
}

.sport-activity-row__index,
.sport-activity-row output {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-weight: 800;
}

.sport-activity-row select,
.sport-activity-row input {
    width: 100%;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
}

.sport-activity-row__remove {
    color: var(--muted);
    font-size: 18px;
    cursor: pointer;
}

.sport-activity-add {
    justify-self: start;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 720px) {
    .sport-activity-weight {
        grid-template-columns: minmax(0, 1fr);
        justify-content: stretch;
    }

    .sport-activity-table__grid {
        display: grid;
        gap: 12px;
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .sport-activity-table__head {
        display: none;
    }

    .sport-activity-row {
        display: grid;
        grid-template-columns: 32px minmax(0, 1fr) 36px;
        gap: 8px;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--paper);
    }

    .sport-activity-row > * {
        min-height: 42px;
        border: 1px solid var(--line);
        border-radius: 4px;
    }

    .sport-activity-row__index {
        grid-row: span 3;
    }

    .sport-activity-row select,
    .sport-activity-row input,
    .sport-activity-row output {
        grid-column: 2;
    }

    .sport-activity-row__remove {
        grid-column: 3;
        grid-row: 1;
    }

    .sport-activity-add {
        justify-self: stretch;
    }
}

.segmented-field {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid #c7ccd3;
    background: #eef0f3;
}

.segmented-field label {
    position: relative;
    min-height: 48px;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.segmented-field input {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 0;
    opacity: 0;
    cursor: pointer;
}

.segmented-field span {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 0 14px;
    font-size: 16px;
    font-weight: 800;
    text-align: center;
}

.segmented-field input:checked + span {
    background: var(--paper);
}

:root[data-theme="dark"] .segmented-field {
    border-color: var(--line);
    background: #242b35;
}

:root[data-theme="dark"] .segmented-field span {
    color: var(--ink);
}

:root[data-theme="dark"] .segmented-field input:checked + span {
    background: var(--paper);
    color: var(--ink);
}

:root[data-theme="dark"] .calculator-illustration img {
    border-color: var(--line);
}

.field--single-check {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 42px;
}

.field--single-check input {
    width: 16px;
    min-height: 16px;
    height: 16px;
    padding: 0;
    accent-color: var(--accent);
}

.field--single-check span {
    font-size: 16px;
    font-weight: 700;
}

.field-with-unit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.field-with-unit input {
    width: 100%;
    min-height: 60px;
    border-radius: 30px;
    padding: 0 26px;
    font-weight: 700;
}

.field-with-unit select {
    width: 100%;
    min-height: 60px;
}

.field-with-unit em {
    min-width: 40px;
    color: var(--muted);
    font-style: normal;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.transport-route-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: end;
}

.transport-route-grid--swap {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.swap-button {
    width: 44px;
    height: 44px;
    margin-bottom: 5px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.swap-button:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.transport-form .field {
    position: relative;
}

.autocomplete-panel {
    position: absolute;
    z-index: 20;
    inset: calc(100% + 6px) 0 auto;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.autocomplete-option {
    width: 100%;
    display: grid;
    gap: 4px;
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px 14px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.autocomplete-option:last-child {
    border-bottom: 0;
}

.autocomplete-option:hover,
.autocomplete-option.is-active {
    background: var(--accent-soft);
}

.autocomplete-option small {
    color: var(--muted);
    font-size: 13px;
}

.std-blocks {
    display: grid;
    gap: 28px;
}

.std-block {
    display: grid;
    gap: 18px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.std-block h3 {
    margin: 0;
    font-size: 24px;
    line-height: 1.25;
}

.time-parts {
    display: grid;
    grid-template-columns: repeat(3, minmax(112px, 1fr));
    gap: 10px;
}

.time-parts label {
    display: grid;
    gap: 5px;
}

.time-parts small {
    color: var(--muted);
    font-size: 12px;
}

.time-parts input {
    width: 100%;
    min-height: 60px;
    border-radius: 0;
    padding: 0 12px;
}

.calc-actions--inline {
    margin-top: 0;
}

:root[data-theme="dark"] .autocomplete-panel,
:root[data-theme="dark"] .std-block {
    background: var(--panel);
}

.spoke-form {
    display: grid;
    gap: 18px;
}

.spoke-form hr {
    width: 100%;
    height: 1px;
    margin: 0;
    border: 0;
    background: #c7ccd3;
}

.spoke-measure-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

.spoke-measure {
    display: grid;
    gap: 10px;
    justify-items: center;
    text-align: center;
}

.spoke-measure img {
    display: block;
    max-width: min(100%, 360px);
    max-height: 150px;
    object-fit: contain;
    border: 1px solid #1f232c;
    background: #fff;
}

.spoke-measure--single img {
    max-width: min(100%, 360px);
}

.spoke-measure label,
.spoke-small-fields label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.35;
}

.spoke-measure span,
.spoke-small-fields span,
.spoke-exact span {
    font-weight: 500;
}

.spoke-measure input,
.spoke-small-fields input,
.spoke-small-fields select {
    width: 62px;
    min-height: 44px;
    border-radius: 0;
    padding: 0 10px;
    font-size: 16px;
    font-weight: 400;
}

.spoke-small-fields {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.spoke-exact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
    cursor: pointer;
}

.spoke-exact input {
    width: 16px;
    min-height: 16px;
    height: 16px;
    padding: 0;
    accent-color: var(--accent);
}

.checkbox-pill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
    gap: 10px;
}

.checkbox-pill-grid label {
    position: relative;
    display: grid;
    min-height: 48px;
    place-items: center;
    border: 1px solid #c7ccd3;
    border-radius: 24px;
    background: var(--paper);
    color: var(--ink);
    font-weight: 800;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.checkbox-pill-grid input {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.checkbox-pill-grid label:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent);
}

.checkbox-pill-grid label:has(input:focus-visible) {
    outline: 3px solid rgba(15, 118, 110, 0.28);
    outline-offset: 3px;
}

.field i {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 1px solid var(--muted);
    border-radius: 50%;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

input,
select {
    width: 100%;
    min-height: 60px;
    border: 1px solid #c7ccd3;
    border-radius: 30px;
    padding: 0 26px;
    color: var(--ink);
    background: var(--paper);
    font: inherit;
    font-weight: 700;
    outline: none;
}

select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 56px;
    background-color: var(--paper);
    background-image:
        linear-gradient(45deg, transparent 50%, var(--ink) 50%),
        linear-gradient(135deg, var(--ink) 50%, transparent 50%);
    background-position:
        calc(100% - 29px) calc(50% - 2px),
        calc(100% - 23px) calc(50% - 2px);
    background-repeat: no-repeat;
    background-size: 6px 6px, 6px 6px;
}

.field select {
    height: 60px;
}

input:focus,
select:focus,
.primary-button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.28);
    outline-offset: 3px;
}

input.input-invalid,
select.input-invalid,
textarea.input-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.14);
}

.percent-sentence {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 74px;
    margin: 26px 0;
}

.percent-field input {
    width: 158px;
    min-height: 50px;
    border-radius: 0;
    padding: 0 12px;
    font-weight: 400;
}

.sentence-break {
    display: none;
}

.sentence-text {
    font-size: 20px;
}

.percent-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 34px;
    margin-top: 34px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.percent-options .check-field {
    justify-content: flex-start;
}

.calculator-figure {
    margin: 28px 0 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.calculator-figure svg {
    display: block;
    width: 100%;
    height: auto;
}

.calculator-figure text {
    fill: var(--muted);
    font-size: 18px;
    font-weight: 800;
}

.calculator-figure figcaption {
    margin-top: 14px;
    color: var(--muted);
    line-height: 1.45;
}

.percent-options label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.percent-options select {
    width: auto;
    min-height: 34px;
    border-radius: 0;
    padding: 0 36px 0 12px;
    background-position:
        calc(100% - 19px) calc(50% - 2px),
        calc(100% - 13px) calc(50% - 2px);
    font-weight: 400;
}

.percent-options input[type="checkbox"] {
    width: auto;
    min-height: 0;
}

.check-field {
    justify-content: flex-start !important;
}

.primary-button {
    min-width: 180px;
    min-height: 60px;
    margin-top: 28px;
    border: 0;
    border-radius: 30px;
    color: var(--paper);
    background: var(--ink);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.secondary-button {
    min-width: 160px;
    min-height: 60px;
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 0 26px;
    color: var(--ink);
    background: var(--paper);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.secondary-button:hover {
    border-color: var(--ink);
}

.calc-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    margin-top: 28px;
}

.calc-actions .primary-button {
    margin-top: 0;
}

.error-link {
    border: 0;
    padding: 0;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

.form-message {
    margin-top: 20px;
    padding: 14px 18px;
    border-radius: 8px;
    color: var(--danger);
    background: #fff3f0;
    font-weight: 800;
}

.calc-card--result {
    position: sticky;
    top: 20px;
}

.result-panel {
    margin-top: 26px;
}

.history-item {
    display: grid;
    gap: 10px;
    padding: 2px 0 24px;
    border-bottom: 1px solid var(--line);
}

.history-item + .history-item {
    padding-top: 24px;
}

.history-item--previous {
    color: #b8bdc5;
}

.history-item h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0;
}

.history-item p {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.45;
}

.result-rows {
    display: grid;
    gap: 12px;
}

.result-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    gap: 18px;
    align-items: baseline;
    font-size: 18px;
    line-height: 1.35;
}

.result-row strong {
    font-size: 26px;
    line-height: 1.1;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    text-align: right;
    justify-self: end;
}

.result-row .result-value--compact {
    font-size: 21px;
}

.result-row .result-value--tiny {
    font-size: 17px;
}

.formula-line {
    font-size: 22px;
    font-style: italic;
}

.calculation-history:empty {
    display: none;
}

.calculation-history {
    margin-top: 24px;
}

.history-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-top: 22px;
    border: 0;
    padding: 0;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

.history-toggle[hidden] {
    display: none;
}

.history-toggle__arrow {
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 160ms ease;
}

.history-toggle.is-open .history-toggle__arrow {
    transform: translateY(2px) rotate(225deg);
}

.history-title {
    margin: 0 0 12px;
    font-size: 22px;
    line-height: 1.2;
}

.result-links {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.text-action {
    width: fit-content;
    border: 0;
    padding: 0;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-weight: 800;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

.text-action:hover {
    color: var(--ink);
}

.result-number {
    margin: 30px 0;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1;
    font-weight: 800;
}

.result-empty {
    margin-top: 28px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.5;
    font-weight: 700;
}

.calculator-tip {
    width: min(100% - 40px, 1180px);
    margin: 0 auto 20px;
    padding: 24px 30px;
    border-left: 5px solid var(--accent);
    border-radius: 8px;
    background: #fff8e7;
}

.calculator-tip h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.calculator-tip p {
    margin: 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.6;
}

:root[data-theme="dark"] .calculator-tip {
    background: #223018;
    color: var(--ink);
}

:root[data-theme="dark"] .calculator-tip p {
    color: var(--ink);
}

.inline-formula {
    color: var(--ink);
    font-weight: 800;
}

.calc-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 0 0 26px;
    border-bottom: 1px solid var(--line);
}

.calc-tab {
    min-height: 54px;
    margin: 0 8px -1px 0;
    border: 1px solid var(--line);
    border-bottom-color: var(--line);
    border-radius: 8px 8px 0 0;
    padding: 0 22px;
    color: var(--muted);
    background: var(--paper);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.calc-tab.is-active {
    border-bottom-color: var(--paper);
    color: var(--ink);
}

.astro-tab-panel {
    display: grid;
    gap: 18px;
}

.astro-tab-panel[hidden],
[data-distance-method-field][hidden] {
    display: none !important;
}

.astro-fields {
    display: grid;
    gap: 16px;
}

.astro-field {
    display: grid;
    grid-template-columns: 70px minmax(180px, 260px) minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.astro-field b {
    font-weight: 800;
}

.astro-field span {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.4;
}

.astro-field input,
.astro-field select {
    min-height: 50px;
    border-radius: 0;
    padding: 0 14px;
    font-weight: 400;
}

.astro-field.is-computed input {
    background: #f3f5f7;
    color: var(--muted);
}

.calc-note {
    margin-top: 20px;
    padding: 14px 18px;
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    background: #fff8e7;
    color: var(--muted);
    line-height: 1.5;
}

:root[data-theme="dark"] .calc-note,
:root[data-theme="dark"] .feedback-status {
    background: #223018;
    color: var(--ink);
}

:root[data-theme="dark"] .search-results,
:root[data-theme="dark"] .search-result,
:root[data-theme="dark"] .examples-box,
:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .field-help-popover,
:root[data-theme="dark"] .calculator-request-card {
    background: var(--panel);
    color: var(--ink);
}

.examples-box {
    display: grid;
    gap: 14px;
    margin-top: 10px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.examples-box h3,
.astro-group-title {
    margin: 0;
    font-size: 17px;
    line-height: 1.3;
}

.astro-group-title {
    padding-top: 8px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    text-transform: uppercase;
}

.example-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.example-actions button {
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 18px;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.example-actions button:hover {
    border-color: var(--accent);
}

.radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 22px;
}

.radio-row label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.radio-row input[type="radio"] {
    width: auto;
    min-height: 0;
}

.inline-inputs {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 10px;
}

.result-details {
    display: grid;
    gap: 18px;
    margin: 0;
}

.result-details div {
    display: grid;
    gap: 6px;
}

.result-details dt {
    color: var(--muted);
    font-weight: 800;
}

.result-details dd {
    margin: 0;
    font-size: 18px;
    line-height: 1.45;
}

.seo-section {
    margin-top: 20px;
    padding: 34px;
    background: var(--paper);
    border: 1px solid var(--line);
}

.seo-section h2 + p {
    margin-top: 14px;
}

.seo-section p {
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.65;
}

.hub-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 16px 0 30px;
}

.hub-link-grid a {
    display: grid;
    gap: 6px;
    min-height: 118px;
    padding: 18px;
    color: var(--text);
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.hub-link-grid a:hover {
    border-color: var(--accent);
}

.hub-link-grid strong {
    font-size: 16px;
    line-height: 1.35;
}

.hub-link-grid span {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.hub-faq {
    display: grid;
    gap: 10px;
    margin: 16px 0 30px;
}

.hub-faq details {
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.hub-faq summary {
    cursor: pointer;
    color: var(--text);
    font-weight: 800;
}

.hub-faq p,
.ymyl-note p {
    margin: 12px 0 0;
    font-size: 16px;
}

.ymyl-note {
    margin-top: 8px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.static-page {
    max-width: 980px;
}

.static-page h2 {
    margin-top: 30px;
}

.static-page h2:first-child {
    margin-top: 0;
}

.manual-section {
    background: var(--paper);
    border-color: var(--line);
}

.modal[hidden] {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 20px;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(29, 32, 39, 0.62);
}

.modal__panel {
    position: relative;
    width: min(620px, 100%);
    max-height: calc(100dvh - 24px);
    overflow: auto;
    padding: 24px;
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
}

.modal__panel h2 {
    margin: 0 46px 14px 0;
    font-size: clamp(25px, 4vw, 30px);
    line-height: 1.16;
}

.modal__intro {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.4;
}

.modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: var(--panel);
    font-size: 26px;
    cursor: pointer;
}

.feedback-form,
.feedback-form label {
    display: grid;
    gap: 10px;
}

.feedback-form {
    gap: 12px;
}

.feedback-form input,
.feedback-form textarea {
    border-radius: 0;
    font-weight: 400;
}

.feedback-form textarea {
    min-height: 96px;
    padding: 14px;
    resize: vertical;
}

.spam-hidden {
    position: absolute;
    left: -10000px;
}

.captcha-row {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 16px;
    align-items: center;
}

.captcha-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 76px;
    border: 2px solid var(--ink);
    font-size: 30px;
    font-weight: 800;
}

.captcha-copy {
    display: grid;
    gap: 8px;
}

.feedback-status {
    margin: 0;
    padding: 12px 14px;
    border-radius: 8px;
    background: #eef8e6;
    color: var(--accent-2);
    font-weight: 800;
}

.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 60;
    max-width: min(420px, calc(100% - 32px));
    padding: 16px 20px;
    border-radius: 8px;
    color: var(--paper);
    background: var(--ink);
    box-shadow: 0 18px 45px rgba(29, 32, 39, 0.22);
    font-weight: 800;
}

.toast[hidden] {
    display: none;
}

.related-section {
    width: min(1180px, calc(100% - 32px));
    margin: 20px auto 44px;
    padding: 28px;
    border-radius: 8px;
    background: var(--panel);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.finance-loan-page {
    --finance-accent: var(--accent);
    --finance-accent-2: #ff6b00;
    --finance-soft: color-mix(in srgb, var(--accent) 14%, var(--paper) 86%);
    --finance-ink-soft: var(--ink);
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 28px;
}

.finance-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.8fr);
    gap: 28px;
    align-items: center;
    margin: 18px 0 26px;
}

.finance-hero__copy {
    min-width: 0;
}

.finance-hero h1 {
    margin: 18px 0 0;
    font-size: clamp(36px, 5.4vw, 72px);
    line-height: 0.98;
    overflow-wrap: anywhere;
}

.finance-hero .lead {
    max-width: 620px;
    margin: 20px 0 0;
    color: var(--muted);
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.45;
}

.finance-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.finance-hero__badges span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 14px;
    color: var(--finance-ink-soft);
    background: var(--paper);
    font-size: 14px;
    font-weight: 800;
}

.finance-hero__badges span::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-right: 9px;
    border-radius: 50%;
    background: var(--finance-accent);
}

.finance-hero__art {
    min-width: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--paper) 84%, var(--finance-soft) 16%), var(--paper));
}

.finance-hero__art svg {
    display: block;
    width: 100%;
    height: auto;
}

.finance-art__paper,
.finance-art__calc {
    fill: var(--paper);
    stroke: var(--line);
    stroke-width: 2;
}

.finance-art__calc {
    fill: #20242d;
}

.finance-art__screen {
    fill: var(--accent);
}

.finance-art__key {
    fill: #f5f7fa;
    opacity: 0.88;
}

.finance-art__paper-line {
    fill: #dce3ea;
}

.finance-art__coin {
    fill: var(--finance-accent-2);
    opacity: 0.9;
}

.finance-art__coin--two {
    fill: #f7c85c;
}

.finance-art__percent {
    fill: var(--finance-accent);
}

.finance-art__percent + text,
.finance-hero__art text {
    fill: #fff;
    font-size: 56px;
    font-weight: 900;
}

.finance-workspace {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.15fr);
    gap: 20px;
    align-items: start;
}

.finance-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 26px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.finance-card h2 {
    margin: 0;
    font-size: clamp(22px, 2.6vw, 30px);
    line-height: 1.15;
}

.finance-card__head {
    margin-bottom: 20px;
}

.finance-card__head p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.finance-loan-form {
    display: grid;
    gap: 22px;
}

.finance-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--line);
    background: var(--panel);
}

.finance-tab {
    min-height: 46px;
    border: 0;
    border-radius: 0;
    padding: 0 12px;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.finance-tab.is-active {
    color: var(--ink);
    background: var(--paper);
}

.finance-tab-panel {
    display: grid;
    gap: 16px;
}

.finance-tab-panel[hidden] {
    display: none !important;
}

.finance-field {
    display: grid;
    gap: 10px;
}

.finance-field > span,
.finance-switch span {
    font-size: 16px;
    font-weight: 800;
}

.finance-field input:not([type="range"]),
.finance-field select {
    min-height: 50px;
    border-radius: 0;
    padding: 0 14px;
    font-weight: 500;
}

.finance-field select {
    padding-right: 52px;
}

.finance-field input[type="range"] {
    width: 100%;
    min-height: 24px;
    height: 24px;
    border: 0;
    border-radius: 0;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    accent-color: var(--accent);
    background: transparent;
}

.finance-field input[type="range"]::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 28%, var(--line) 72%);
}

.finance-field input[type="range"]::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    margin-top: -6px;
    border: 2px solid var(--paper);
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 2px 8px rgba(29, 32, 39, 0.18);
    -webkit-appearance: none;
}

.finance-field input[type="range"]::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 28%, var(--line) 72%);
}

.finance-field input[type="range"]::-moz-range-progress {
    height: 8px;
    border-radius: 999px;
    background: var(--accent);
}

.finance-field input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 2px solid var(--paper);
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 2px 8px rgba(29, 32, 39, 0.18);
}

.finance-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: -8px;
}

.finance-chips button {
    min-height: 30px;
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 0 12px;
    color: var(--muted);
    background: var(--paper);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.finance-chips button:hover,
.finance-chips button:focus-visible {
    border-color: var(--accent);
    color: var(--ink);
}

.finance-microcopy,
.finance-note {
    margin: -6px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.finance-term-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 128px;
    gap: 10px;
    align-items: start;
}

.finance-generic-fields {
    display: grid;
    gap: 18px;
}

.finance-generic-fields .finance-field--full,
.finance-generic-fields .finance-switch {
    grid-column: 1 / -1;
}

.finance-field--segmented {
    display: grid;
    gap: 10px;
    border: 0;
    padding: 0;
    margin: 0;
}

.finance-field--segmented legend {
    color: var(--ink);
    font-weight: 900;
}

.finance-tabs--radio {
    margin: 0;
}

.finance-tabs--radio .finance-tab {
    display: grid;
    place-items: center;
    cursor: pointer;
}

.finance-tabs--radio .finance-tab:has(input:checked) {
    border-color: var(--accent);
    background: var(--paper);
    box-shadow: inset 0 -3px 0 var(--accent);
}

.finance-tabs--radio input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.finance-field-unit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.finance-field-unit em {
    color: var(--muted);
    font-style: normal;
    font-weight: 800;
    white-space: nowrap;
}

.finance-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    cursor: pointer;
}

.finance-switch input {
    width: 42px;
    min-height: 24px;
    height: 24px;
    border-radius: 999px;
    padding: 0;
    accent-color: var(--accent);
}

.finance-advanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: color-mix(in srgb, var(--panel) 70%, var(--paper) 30%);
}

.finance-advanced .finance-field {
    align-content: start;
}

.finance-advanced .finance-field > span {
    min-height: 50px;
}

.finance-advanced[hidden] {
    display: none !important;
}

.finance-submit {
    justify-self: center;
    width: 100%;
    min-width: 0;
    min-height: 60px;
    margin-top: 0;
    border-radius: 30px;
    background: var(--ink);
}

.finance-result-card {
    position: sticky;
    top: 20px;
}

.finance-result-main {
    display: grid;
    gap: 8px;
    margin-top: 20px;
    border-radius: 8px;
    padding: 24px;
    color: var(--finance-ink-soft);
    background: #fff8e7;
    text-align: center;
}

.finance-result-main span {
    color: var(--muted);
    font-weight: 800;
}

.finance-result-main strong {
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1;
    overflow-wrap: anywhere;
}

.finance-result-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.finance-result-tiles div {
    min-width: 0;
    display: grid;
    gap: 10px;
    min-height: 106px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.finance-result-tiles span {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.3;
    font-weight: 800;
}

.finance-result-tiles strong {
    align-self: end;
    font-size: clamp(18px, 2.1vw, 24px);
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.finance-result-tiles em {
    color: var(--ink);
    font-style: normal;
    font-weight: 900;
}

.finance-result-note {
    margin-top: 18px;
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    padding: 14px 16px;
    color: var(--muted);
    background: #fff8e7;
    line-height: 1.45;
}

.finance-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.finance-detail-grid:empty {
    display: none;
}

.finance-chart-card,
.finance-table-card {
    grid-column: span 1;
}

.finance-table-card,
.finance-whatif-card {
    grid-column: 1 / -1;
}

.finance-chart {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 18px;
}

.finance-chart__grid {
    fill: none;
    stroke: var(--line);
    stroke-width: 1;
}

.finance-chart__axis {
    fill: none;
    stroke: var(--muted);
    stroke-width: 1.5;
}

.finance-chart__axis-title {
    fill: var(--ink);
    font-size: 13px;
    font-weight: 900;
}

.finance-chart__tick {
    fill: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.finance-chart__line {
    fill: none;
    stroke: var(--finance-accent);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.finance-chart__dot {
    fill: var(--finance-accent-2);
    stroke: var(--paper);
    stroke-width: 2;
}

.finance-chart-card p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.finance-donut-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 24px;
    align-items: center;
    margin-top: 24px;
}

.finance-donut {
    width: 210px;
    justify-self: center;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 6px;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, var(--paper) 0 52%, transparent 53%),
        conic-gradient(var(--finance-accent) 0 var(--principal-share), var(--finance-accent-2) var(--principal-share) 100%);
    text-align: center;
}

.finance-donut span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.finance-donut strong {
    max-width: 130px;
    overflow-wrap: anywhere;
    font-size: 18px;
    line-height: 1.12;
}

.finance-donut-legend {
    display: grid;
    gap: 18px;
}

.finance-donut-legend span {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    color: var(--muted);
    line-height: 1.35;
}

.finance-donut-legend i {
    width: 14px;
    height: 14px;
    margin-top: 3px;
    border-radius: 4px;
    background: var(--finance-accent);
}

.finance-donut-legend span + span i {
    background: var(--finance-accent-2);
}

.finance-donut-legend strong {
    grid-column: 2;
    display: block;
    margin-top: 4px;
    color: var(--ink);
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    font-size: clamp(14px, 1.3vw, 16px);
}

.finance-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.finance-payment-table {
    display: grid;
    grid-template-columns: 52px repeat(5, minmax(120px, 1fr));
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.finance-payment-table > div {
    min-width: 0;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 12px;
    font-size: 14px;
    line-height: 1.35;
    white-space: nowrap;
}

.finance-payment-table > div:nth-child(6n) {
    border-right: 0;
}

.finance-payment-table__head {
    color: var(--muted);
    background: var(--panel);
    font-weight: 900;
}

.finance-analysis-list,
.finance-compare {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.finance-analysis-list div,
.finance-compare div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}

.finance-analysis-list span,
.finance-compare span,
.finance-whatif-grid span {
    color: var(--muted);
    font-weight: 800;
}

.finance-analysis-list strong,
.finance-compare strong {
    text-align: right;
}

.finance-whatif-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.finance-whatif-grid div {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.finance-whatif-grid strong {
    font-size: 20px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.finance-whatif-grid small {
    color: var(--muted);
    line-height: 1.4;
}

:root[data-theme="dark"] .finance-hero__art,
:root[data-theme="dark"] .finance-hero__badges span,
:root[data-theme="dark"] .finance-card,
:root[data-theme="dark"] .finance-chips button {
    background: var(--panel);
}

:root[data-theme="dark"] .finance-result-main,
:root[data-theme="dark"] .finance-result-note {
    background: #183022;
    color: var(--ink);
}

:root[data-theme="dark"] .finance-donut {
    background:
        radial-gradient(circle at center, var(--panel) 0 52%, transparent 53%),
        conic-gradient(var(--finance-accent) 0 var(--principal-share), var(--finance-accent-2) var(--principal-share) 100%);
}

@media (max-width: 980px) {
    .finance-hero,
    .finance-workspace,
    .finance-detail-grid {
        grid-template-columns: 1fr;
    }

    .finance-hero__art {
        max-width: 620px;
        justify-self: center;
    }

    .finance-result-card {
        position: static;
    }
}

@media (max-width: 720px) {
    .finance-loan-page {
        width: min(100% - 24px, 1180px);
    }

    .finance-hero {
        margin-top: 10px;
    }

    .finance-card {
        padding: 18px;
    }

    .finance-hero h1 {
        font-size: clamp(31px, 10vw, 46px);
    }

    .finance-tabs,
    .finance-term-grid,
    .finance-result-tiles,
    .finance-donut-layout,
    .finance-advanced,
    .finance-whatif-grid {
        grid-template-columns: 1fr;
    }

    .finance-tab {
        min-height: 44px;
    }

    .finance-field input:not([type="range"]),
    .finance-field select {
        min-height: 46px;
    }

    .finance-submit {
        width: 100%;
    }

    .finance-result-main {
        padding: 20px 16px;
    }

    .finance-result-tiles div {
        min-height: 88px;
    }

    .finance-donut {
        width: min(210px, 100%);
        justify-self: center;
    }

    .finance-analysis-list div,
    .finance-compare div {
        display: grid;
    }

    .finance-analysis-list strong,
    .finance-compare strong {
        text-align: left;
    }
}

.calculator-shell--single {
    grid-template-columns: 1fr;
}

.lead--inside {
    margin-left: 0;
    margin-right: 0;
    font-weight: 600;
}

.not-found {
    width: min(900px, calc(100% - 32px));
    margin: 48px auto 70px;
    text-align: center;
}

.not-found__animation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    font-size: clamp(72px, 14vw, 150px);
    line-height: 1;
    font-weight: 800;
}

.not-found__zero {
    display: grid;
    place-items: center;
    width: 0.92em;
    height: 0.92em;
    border-radius: 50%;
    background: var(--accent);
    animation: not-found-pulse 1.8s ease-in-out infinite;
}

.not-found h1 {
    margin: 22px auto 0;
    font-size: clamp(34px, 6vw, 68px);
    line-height: 1.08;
}

.not-found p {
    max-width: 640px;
    margin: 18px auto 0;
    color: var(--muted);
    font-size: 20px;
    line-height: 1.45;
}

.not-found .primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 210px;
    min-height: 58px;
    margin-top: 28px;
    padding: 0 34px;
    text-decoration: none;
    line-height: 1.2;
}

@keyframes not-found-pulse {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(8deg); }
}

.admin-page {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 20px;
    width: calc(100% - 40px);
    margin: 34px auto 60px;
}

.admin-sidebar,
.admin-content {
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.admin-sidebar {
    align-self: start;
    padding: 28px;
}

.admin-sidebar h1 {
    margin: 0 0 22px;
    font-size: 34px;
    line-height: 1.1;
}

.admin-nav-link {
    display: block;
    padding: 14px 16px;
    border-radius: 8px;
    color: var(--muted);
    background: var(--paper);
    font-weight: 800;
}

.admin-nav {
    display: grid;
    gap: 10px;
}

.admin-logout {
    margin-top: 18px;
    border: 0;
    padding: 0;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

.admin-nav-link--active {
    color: var(--ink);
    box-shadow: inset 4px 0 0 var(--accent);
}

.admin-content {
    min-width: 0;
    padding: 28px;
}

.admin-content__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.admin-content__head h2 {
    margin: 0;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.1;
}

.admin-content__head span {
    color: var(--muted);
    font-weight: 800;
}

.admin-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    background: var(--paper);
}

.admin-table {
    width: 100%;
    min-width: 1080px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.admin-table tr:last-child td {
    border-bottom: 0;
}

.admin-table__link {
    color: var(--accent-2);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.status-button {
    min-height: 40px;
    border: 0;
    border-radius: 22px;
    padding: 0 18px;
    color: var(--paper);
    background: var(--ink);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.status-button--secondary {
    color: var(--ink);
    background: var(--accent);
}

.status-button:disabled {
    opacity: 0.45;
    cursor: default;
}

.admin-filter,
.admin-create-form {
    display: grid;
    gap: 12px;
    align-items: end;
    margin-bottom: 18px;
}

.admin-filter {
    grid-template-columns: minmax(260px, 1fr) auto;
}

.admin-create-form {
    grid-template-columns: minmax(200px, 1fr) minmax(200px, 1fr) auto;
}

.admin-filter input {
    min-height: 60px;
    border-radius: 30px;
    padding: 0 26px;
}

.admin-filter .status-button {
    min-height: 60px;
    border-radius: 30px;
    padding: 0 28px;
}

.admin-filter label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 800;
}

.admin-reset {
    align-self: center;
    color: var(--muted);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.admin-create-form input,
.admin-table input {
    min-height: 44px;
    border-radius: 8px;
    padding: 0 12px;
}

.admin-table input[type="checkbox"] {
    width: 18px;
    min-height: 18px;
    padding: 0;
}

.admin-table__check {
    width: 46px;
    text-align: center !important;
}

.admin-table--calculators th:nth-child(2) {
    min-width: 260px;
}

.admin-table--calculators th:nth-child(3) {
    min-width: 170px;
}

.admin-table--calculators th:nth-child(5) {
    min-width: 160px;
}

.admin-table--calculators th:nth-child(6) {
    min-width: 130px;
}

.admin-bulk-actions,
.admin-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
}

.admin-bulk-actions span {
    color: var(--muted);
    font-weight: 800;
}

.admin-pagination {
    margin-top: 18px;
}

.admin-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    border-radius: 8px;
    padding: 0 12px;
    background: var(--panel);
    color: var(--muted);
    font-weight: 800;
}

.admin-pagination a.is-active {
    color: var(--ink);
    background: var(--accent);
}

.toggle-button {
    min-width: 76px;
    min-height: 38px;
    border: 0;
    border-radius: 999px;
    color: var(--paper);
    background: var(--muted);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.toggle-button.is-on {
    color: var(--ink);
    background: var(--accent);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.stat-card,
.stats-panel {
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 12px 32px rgba(29, 32, 39, 0.05);
}

.stat-card {
    display: grid;
    gap: 12px;
    min-height: 142px;
    padding: 22px;
}

.stat-card span {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.25;
    font-weight: 800;
}

.stat-card strong {
    align-self: end;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1;
}

.stat-card--accent {
    background: var(--accent);
}

.stat-card--accent span {
    color: var(--ink);
}

.stats-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.stats-columns--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-panel {
    min-width: 0;
    padding: 22px;
}

.stats-panel h3 {
    margin: 0 0 18px;
    font-size: 22px;
    line-height: 1.2;
}

.mini-chart {
    display: flex;
    align-items: end;
    gap: 4px;
    height: 180px;
    padding: 14px;
    border-radius: 8px;
    background: var(--panel);
}

.mini-chart span {
    flex: 1 1 0;
    min-width: 3px;
    border-radius: 999px 999px 0 0;
    background: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(29, 32, 39, 0.08);
}

.mini-chart--week span {
    background: #0f766e;
}

.line-chart {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.75), transparent),
        var(--panel);
}

.line-chart svg {
    width: 100%;
    min-height: 220px;
    overflow: visible;
}

.line-chart__band {
    fill: rgba(200, 255, 0, 0.06);
}

.line-chart__band:nth-of-type(2n) {
    fill: rgba(15, 118, 110, 0.055);
}

.line-chart__grid {
    stroke: rgba(105, 114, 130, 0.22);
    stroke-width: 1;
}

.line-chart__line {
    fill: none;
    stroke: #0f766e;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.line-chart__point {
    fill: var(--accent);
    stroke: var(--ink);
    stroke-width: 3;
}

.line-chart__axis {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.top-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.top-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.top-list li:last-child {
    border-bottom: 0;
}

.top-list a {
    color: var(--accent-2);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.top-list strong {
    font-size: 22px;
}

.stats-empty {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.login-page {
    display: grid;
    place-items: center;
    width: min(100%, calc(100% - 32px));
    min-height: 58vh;
    margin: 40px auto;
}

.login-card {
    display: grid;
    gap: 18px;
    width: min(460px, 100%);
    padding: 34px;
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.login-card h1 {
    margin: 0;
    font-size: 40px;
}

.login-card label {
    display: grid;
    gap: 8px;
    font-weight: 800;
}

@media (max-width: 900px) {
    .category-grid,
    .calculator-shell,
    .fields-grid,
    .subcategory-tiles,
    .calculator-grid,
    .admin-page {
        grid-template-columns: 1fr;
    }

    .calc-card--result {
        position: static;
    }

    .section-title {
        align-items: start;
        flex-direction: column;
    }

    .site-header {
        flex-wrap: wrap;
        padding-bottom: 14px;
    }

    .site-header:has(.header-search) {
        grid-template-columns: auto auto;
    }

    .site-header:has(.header-search) .header-search {
        grid-column: 1 / -1;
    }

    .header-search {
        flex-basis: 100%;
        max-width: none;
    }

    .header-tools {
        margin-left: 0;
    }

    .stats-grid,
    .stats-columns,
    .stats-columns--three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .header-search,
    .cookie-notice {
        display: none !important;
    }

    .category-card::before,
    .category-card::after,
    .themed-panel::before,
    .themed-panel::after {
        display: none;
    }

    .footer-inner,
    .search-form,
    .quick-calculator,
    .embed-section,
    .transport-route-grid,
    .transport-route-grid--swap,
    .percent-options,
    .captcha-row,
    .admin-filter,
    .admin-create-form,
    .related-grid,
    .spoke-measure-grid,
    .stats-grid,
    .stats-columns,
    .stats-columns--three {
        grid-template-columns: 1fr;
    }

    .search-box__label {
        text-align: left;
    }

    .quick-calculator {
        grid-template-columns: 1fr;
    }

    .quick-calculator__keys {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .quick-calculator--wide {
        padding: 14px;
    }

    .calculator-request-card {
        grid-template-columns: 1fr;
    }

    .request-card__action {
        grid-column: 1;
    }

    .embed-section {
        align-items: start;
    }

    .transport-route-grid--swap .swap-button {
        order: 2;
        margin: 0;
    }

    .time-parts {
        grid-template-columns: 1fr;
    }

    .calc-card--laundry-weight .field {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .calc-card--laundry-weight .field > span {
        text-align: left;
    }
}

@media (max-width: 560px) {
    .brand {
        gap: 8px;
    }

    .brand-mark {
        width: 42px;
        height: 42px;
    }

    .brand-icon {
        width: 25px;
        height: 25px;
    }

    .brand-domain {
        font-size: 24px;
    }

    .footer-brand .brand-mark {
        width: 52px;
        height: 52px;
    }

    .footer-brand .brand-icon {
        width: 31px;
        height: 31px;
    }

    .footer-brand .brand-domain {
        font-size: 32px;
    }

    .site-header,
    .footer-inner,
    .breadcrumbs,
    .hero,
    .page-heading,
    .category-grid,
    .subcategory-panel,
    .calculator-list,
    .calculator-hero,
    .calculator-shell,
    .seo-section {
        width: min(100% - 20px, 1180px);
    }

    .hero,
    .page-heading,
    .calculator-hero {
        padding-top: 32px;
        text-align: left;
    }

    .lead {
        margin-left: 0;
        margin-right: 0;
    }

    .category-card,
    .subcategory-panel,
    .calculator-list,
    .calc-card,
    .calculator-tip,
    .seo-section {
        padding: 20px;
    }

    .category-card__head strong {
        font-size: 22px;
    }

    .site-header {
        align-items: flex-start;
        padding-top: 12px;
    }

    .calculator-tags {
        justify-content: flex-start;
    }

    .header-search {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .header-search input,
    .header-search button {
        min-height: 40px;
    }

    .percent-sentence {
        justify-content: flex-start;
        align-items: center;
        gap: 14px;
    }

    .percent-field input {
        width: min(198px, 100%);
    }

    .sentence-break {
        display: block;
        flex-basis: 100%;
        height: 0;
    }

    .calc-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .calc-actions .primary-button {
        width: 100%;
        max-width: none;
        min-width: 0;
        padding-inline: 24px;
        align-self: flex-start;
    }

    .calc-actions .secondary-button {
        width: 100%;
    }

    .spoke-small-fields {
        justify-content: flex-start;
    }

    .spoke-small-fields label,
    .spoke-measure label {
        justify-content: flex-start;
        width: 100%;
        text-align: left;
    }

    .astro-field {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 10px 14px;
    }

    .astro-field span:not(.inline-inputs) {
        grid-column: 2;
    }

    .inline-inputs {
        grid-template-columns: minmax(0, 1fr);
    }

    .calc-tab {
        flex: 1 1 100%;
        margin-right: 0;
        border-radius: 8px;
    }

    .result-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

@media (max-width: 420px) {
    .site-header {
        gap: 8px;
        align-items: center;
    }

    .brand {
        gap: 7px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
    }

    .brand-icon,
    .brand-mark:not(:has(.brand-icon))::before {
        width: 20px;
        height: 20px;
    }

    .brand-domain,
    .brand:not(:has(.brand-domain)) .brand-copy strong {
        font-size: 20px;
    }

    .header-tools {
        gap: 6px;
    }

    .tool-button {
        min-width: 38px;
        min-height: 38px;
        padding: 0 8px;
    }

    .language-button {
        font-size: 14px;
    }

    .theme-toggle__sun,
    .theme-toggle__moon {
        font-size: 15px;
    }

    .burger-button {
        width: 38px;
        padding: 0;
    }

    .burger-button span {
        width: 16px;
    }
}

/* ===== Калькуляторы раздела Дом: лампы и солнечная система ===== */

.calculator-shell--wide {
    grid-template-columns: minmax(0, 1fr);
}

.field-hint {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
    font-weight: 400;
}

/* --- Сравнение ламп: матрица --- */
.lamp-matrix-wrap {
    margin-top: 8px;
    overflow-x: auto;
}

.lamp-matrix {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 520px;
}

.lamp-matrix th,
.lamp-matrix td {
    padding: 10px;
    border-bottom: 1px solid var(--line);
    text-align: center;
    vertical-align: middle;
}

.lamp-matrix thead th {
    font-weight: 800;
    font-size: 15px;
    border-bottom: 2px solid var(--line);
}

.lamp-matrix tbody th[scope="row"] {
    text-align: left;
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
}

.lamp-matrix .lamp-col {
    border-top: 3px solid var(--line);
}

.lamp-matrix .lamp-col--led { border-top-color: #2bb673; }
.lamp-matrix .lamp-col--kll { border-top-color: #3a86ff; }
.lamp-matrix .lamp-col--halogen { border-top-color: #f4a261; }
.lamp-matrix .lamp-col--incand { border-top-color: #8b919b; }

.lamp-matrix input {
    min-height: 44px;
    border-radius: 12px;
    padding: 0 10px;
    text-align: center;
    font-weight: 600;
}

/* --- Солнечная система: таблицы потребителей --- */
.solar-block {
    margin-top: 8px;
    margin-bottom: 26px;
}

.solar-block__title {
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent);
    font-size: 18px;
    font-weight: 800;
}

.solar-table-wrap {
    overflow-x: auto;
}

.solar-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 720px;
}

.solar-table thead th {
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    text-align: left;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.solar-cell {
    padding: 6px 8px 6px 0;
    vertical-align: middle;
}

.solar-cell input,
.solar-cell select {
    min-height: 44px;
    border-radius: 12px;
    padding: 0 12px;
    font-weight: 600;
}

.solar-cell select {
    padding-right: 30px;
    background-position: calc(100% - 14px) calc(50% - 2px), calc(100% - 9px) calc(50% - 2px);
}

.solar-cell--wh {
    font-weight: 800;
    color: var(--ink);
    white-space: nowrap;
    text-align: right;
    padding-right: 6px;
}

.solar-cell--remove {
    padding-right: 4px;
}

.solar-remove {
    width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--paper);
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.solar-remove:hover {
    color: var(--danger);
    border-color: var(--danger);
}

.solar-total-row td {
    padding: 10px;
    font-weight: 800;
    border-top: 1px solid var(--line);
    text-align: right;
}

.solar-total-row td:first-child {
    text-align: right;
    color: var(--muted);
    font-weight: 700;
}

.solar-total-row--comp td {
    color: var(--accent-strong, #2bb673);
}

.solar-add {
    margin-top: 12px;
    padding: 10px 18px;
    min-height: 44px;
    width: auto;
    border: 1px dashed var(--line);
    border-radius: 14px;
    background: transparent;
    color: var(--ink);
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.solar-add:hover {
    border-color: var(--accent);
    color: var(--accent-strong, #2bb673);
}

@media (max-width: 720px) {
    .solar-table {
        min-width: 0;
    }

    .solar-table thead {
        display: none;
    }

    .solar-table,
    .solar-table tbody,
    .solar-table tfoot,
    .solar-table tr,
    .solar-table td {
        display: block;
        width: 100%;
    }

    .solar-row {
        border: 1px solid var(--line);
        border-radius: 16px;
        padding: 10px 14px 14px;
        margin-bottom: 14px;
        position: relative;
    }

    .solar-cell {
        display: grid;
        grid-template-columns: minmax(110px, 0.9fr) minmax(0, 1.4fr);
        align-items: center;
        gap: 10px;
        padding: 6px 0;
    }

    .solar-cell::before {
        content: attr(data-label);
        font-size: 13px;
        font-weight: 700;
        color: var(--muted);
    }

    .solar-cell--remove {
        position: absolute;
        top: 8px;
        right: 8px;
        padding: 0;
        display: block;
    }

    .solar-cell--remove::before {
        content: none;
    }

    .solar-cell--wh {
        text-align: left;
        border-top: 1px dashed var(--line);
        padding-top: 10px;
        margin-top: 4px;
    }

    .solar-total-row td {
        text-align: left;
        display: flex;
        justify-content: space-between;
        gap: 12px;
    }

    .solar-total-row td:first-child {
        text-align: left;
    }
}
