.zayman-calculators {
    --calc-ink: #233651;
    --calc-muted: #5f6f84;
    --calc-blue: #3f6ecb;
    --calc-line: #e1e8f3;
    width: 100%;
    max-width: 1180px;
    margin-inline: auto;
    display: grid;
    gap: 32px;
    color: var(--calc-ink);
    font-size: 16px;
    line-height: 1.6;
}
.zayman-calculators *, .zayman-calculators *::before, .zayman-calculators *::after { box-sizing: border-box; }
.zayman-calculators [hidden] { display: none; }
.zayman-calculators h1 { max-width: 900px; margin: 0 0 16px; color: var(--calc-ink); font-size: clamp(32px, 3.4vw, 44px); font-weight: 750; line-height: 1.13; letter-spacing: -0.035em; text-wrap: balance; }
.zayman-calculators h2 { margin: 0 0 16px; color: var(--calc-ink); font-size: 26px; font-weight: 750; line-height: 1.25; }
.zayman-calculators p { margin: 0 0 16px; }
.zayman-calculators p:last-child { margin-bottom: 0; }
.zayman-calculators__lead { max-width: 760px; color: var(--calc-muted); font-size: 18px; }
.zayman-calculators a, .zayman-calculators a:hover { text-decoration: none; }
.zayman-calculators a:focus-visible, .zayman-calculators button:focus-visible, .zayman-calculators summary:focus-visible { outline: 3px solid #1d50ae; outline-offset: 4px; }
.zayman-calculators__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.zayman-calculators__grid li { min-width: 0; }
.zayman-calculators .zayman-calculators__tile { display: flex; flex-direction: column; height: 100%; min-height: 216px; padding: 24px; border: 1px solid var(--calc-line); border-radius: 18px; background: #fff; color: var(--calc-ink); box-shadow: 0 4px 14px rgba(28, 51, 87, 0.025); transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.zayman-calculators .zayman-calculators__tile:hover { transform: translateY(-2px); border-color: #9fb9e7; box-shadow: 0 8px 24px rgba(38, 69, 119, 0.07); }
.zayman-calculators__tile-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; color: #8394af; }
.zayman-calculators__icon { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 13px; background: #edf3fd; color: var(--calc-blue); }
.zayman-calculators__tile-title { margin-bottom: 8px; font-size: 22px; font-weight: 750; line-height: 1.25; }
.zayman-calculators__tile-description { color: var(--calc-muted); font-size: 16px; line-height: 1.5; }
.zayman-calculators__note { padding: clamp(24px, 3.4vw, 36px); border: 1px solid var(--calc-line); border-radius: 24px; background: linear-gradient(145deg, #fff, #f8faff); box-shadow: 0 10px 34px rgba(31, 61, 114, 0.08); }
.zayman-calculators__note p { max-width: 900px; }
.zayman-calculators__links { display: flex; flex-wrap: wrap; gap: 16px 28px; }
.zayman-calculators__links a { color: #3159aa; font-weight: 650; }
.zayman-calculators__sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.zayman-loan__workspace { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 24px; }
.zayman-loan__form, .zayman-loan__result { min-width: 0; border-radius: 22px; padding: 28px; }
.zayman-loan__form { border: 1px solid var(--calc-line); background: #fff; }
.zayman-loan__form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.zayman-loan__field { display: flex; flex-direction: column; min-width: 0; gap: 7px; margin-top: 20px; }
.zayman-loan__field label { font-weight: 650; font-size: 16px; }
.zayman-loan__field input, .zayman-loan__field select { width: 100%; min-width: 0; min-height: 50px; border: 1px solid #b7c6db; border-radius: 10px; padding: 10px 12px; background: #fff; color: var(--calc-ink); font: inherit; font-size: 18px; }
.zayman-loan__field select { font-size: 16px; }
.zayman-loan__field input:focus, .zayman-loan__field select:focus { border-color: #3159aa; outline: 3px solid #dce8fd; outline-offset: 1px; }
.zayman-loan__field [aria-invalid="true"] { border-color: #ac2d3b; }
.zayman-loan__hint { color: var(--calc-muted); font-size: 14px; line-height: 1.45; }
.zayman-loan__error { color: #a02635; font-size: 14px; line-height: 1.45; }
.zayman-loan__rate-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.zayman-loan__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.zayman-loan__actions button { min-height: 48px; border: 1px solid #3159aa; border-radius: 10px; padding: 11px 24px; background: #3159aa; color: #fff; font: inherit; font-size: 16px; font-weight: 650; cursor: pointer; }
.zayman-loan__actions button:hover { background: #244b98; }
.zayman-loan__actions .zayman-loan__reset { background: #fff; border-color: var(--calc-line); color: #3159aa; }
.zayman-loan__actions .zayman-loan__reset:hover { background: #f1f5fd; }
.zayman-loan__result { border: 1px solid #ccdbf3; background: linear-gradient(135deg, #ecf3ff, #f4f8ff); }
.zayman-loan__result h2 { font-size: 24px; margin-bottom: 12px; }
.zayman-loan__number { color: #254e98; font-size: clamp(32px, 3.2vw, 42px); font-weight: 750; line-height: 1.15; letter-spacing: -0.035em; overflow-wrap: anywhere; }
.zayman-loan .zayman-loan__result-caption { margin: 16px 0 24px; color: var(--calc-muted); font-size: 16px; }
.zayman-loan__bar { display: flex; height: 10px; border-radius: 10px; overflow: hidden; background: #789ce0; }
.zayman-loan__bar span { width: 80.6452%; background: #3159aa; }
.zayman-loan__result dl { margin: 20px 0 24px; }
.zayman-loan__result dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; }
.zayman-loan__result dt { font-weight: 400; }
.zayman-loan__result dd { margin: 0; font-weight: 650; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.zayman-loan__result .zayman-loan__total { border-top: 1px solid #c4d4ed; margin-top: 8px; padding-top: 18px; }
.zayman-loan__total dt, .zayman-loan__total dd { font-weight: 750; }
.zayman-loan__result-note { color: var(--calc-muted); font-size: 14px; line-height: 1.5; }
.zayman-loan__formula { padding: 16px; border-radius: 12px; background: #e9eff9; font-weight: 650; }
.zayman-loan__faq details:last-child { border-bottom: 0; padding-bottom: 0; }
.zayman-loan__faq details { border-bottom: 1px solid var(--calc-line); padding: 18px 0; }
.zayman-loan__faq summary { cursor: pointer; font-weight: 650; font-size: 18px; }
.zayman-loan__faq details p { max-width: 900px; margin: 16px 0 0; color: var(--calc-muted); }
.zayman-loan__workspace { padding: 28px; border: 1px solid var(--calc-line); border-radius: 24px; background: #fff; box-shadow: 0 10px 34px rgba(31, 61, 114, 0.06); }
.zayman-loan__workspace > .zayman-loan__form { padding: 0; border: 0; border-radius: 0; }
.zayman-loan__workspace > .zayman-loan__result { padding: 24px; }
@media (max-width: 900px) {
    .zayman-calculators__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .zayman-loan__workspace { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .zayman-loan__workspace { padding: 20px; border-radius: 20px; }
    .zayman-loan__workspace > .zayman-loan__result { padding: 18px; }

    .zayman-calculators { gap: 24px; }
    .zayman-calculators h1 { font-size: 30px; }
    .zayman-calculators h2 { font-size: 24px; }
    .zayman-calculators__lead { font-size: 16px; }
    .zayman-calculators__grid { grid-template-columns: minmax(0, 1fr); }
    .zayman-calculators .zayman-calculators__tile { min-height: 0; padding: 22px; }
    .zayman-calculators__note, .zayman-loan__form, .zayman-loan__result { padding: 20px; border-radius: 18px; }
    .zayman-loan__rate-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .zayman-loan__number { font-size: 36px; }
    .zayman-loan__result dl > div { flex-wrap: wrap; }
    .zayman-loan__result dd { margin-left: auto; }
    .zayman-loan__actions button { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .zayman-calculators .zayman-calculators__tile { transition: none; transform: none; } }

/* Short feedback for controls and newly displayed results; respect reduced motion. */
.zayman-calculators :is(button, input, select, summary) { transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.zayman-loan__bar span, .zayman-credit__bar span { transition: width 220ms ease; }
.zayman-credit__results:not([hidden]) > .zayman-credit__summary,
.zayman-vat__result:not([hidden]), .zayman-loan__breakdown:not([hidden]),
.zayman-loan__faq details[open] > p { animation: zayman-calculator-reveal 180ms ease-out; }
@keyframes zayman-calculator-reveal { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
    .zayman-calculators *, .zayman-calculators *::before, .zayman-calculators *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
