.hb-tfc {
    --hb-tfc-accent: #0d8ea0;
    --hb-tfc-navy: #102b46;
    --hb-tfc-ink: #23364a;
    --hb-tfc-muted: #617386;
    --hb-tfc-line: #dfe8ee;
    --hb-tfc-soft: #f4fafb;
    max-width: 1120px;
    margin: 32px auto;
    color: var(--hb-tfc-ink);
    font-family: inherit;
}

.hb-tfc *, .hb-tfc *::before, .hb-tfc *::after { box-sizing: border-box; }

.hb-tfc__hero {
    position: relative;
    overflow: hidden;
    padding: 42px clamp(24px, 5vw, 58px);
    border-radius: 26px 26px 0 0;
    color: #fff;
    background: linear-gradient(135deg, var(--hb-tfc-navy), var(--hb-tfc-accent));
}

.hb-tfc__hero::after {
    content: "";
    position: absolute;
    width: 270px;
    height: 270px;
    right: -90px;
    top: -105px;
    border: 42px solid rgba(255,255,255,.10);
    border-radius: 50%;
}

.hb-tfc__eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .16em;
    opacity: .82;
}

.hb-tfc__hero h2 { margin: 0 0 10px; color: #fff; font-size: clamp(30px, 4vw, 48px); line-height: 1.05; }
.hb-tfc__hero p { max-width: 760px; margin: 0; font-size: 18px; line-height: 1.6; opacity: .92; }

.hb-tfc__form, .hb-tfc__results {
    padding: clamp(20px, 4vw, 44px);
    border-right: 1px solid var(--hb-tfc-line);
    border-left: 1px solid var(--hb-tfc-line);
    background: #fff;
}

.hb-tfc__section { padding: 28px 0; border-bottom: 1px solid var(--hb-tfc-line); }
.hb-tfc__section:first-child { padding-top: 0; }

.hb-tfc__section-heading { display: flex; gap: 15px; align-items: flex-start; margin-bottom: 22px; }
.hb-tfc__section-heading > span {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #fff;
    border-radius: 13px;
    background: var(--hb-tfc-accent);
    font-weight: 800;
}
.hb-tfc__section-heading h3 { margin: 0 0 4px; color: var(--hb-tfc-navy); font-size: 22px; }
.hb-tfc__section-heading p { margin: 0; color: var(--hb-tfc-muted); }

.hb-tfc__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.hb-tfc__grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.hb-tfc label { display: block; font-weight: 700; color: var(--hb-tfc-navy); }
.hb-tfc label > span { display: block; margin-bottom: 8px; }
.hb-tfc label small { display: block; margin-top: 7px; color: var(--hb-tfc-muted); font-weight: 400; line-height: 1.4; }

.hb-tfc input, .hb-tfc select {
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 10px 13px;
    color: var(--hb-tfc-ink);
    border: 1px solid #cbd8e0;
    border-radius: 11px;
    background: #fff;
    box-shadow: none;
    font: inherit;
}

.hb-tfc input:focus, .hb-tfc select:focus {
    outline: 3px solid color-mix(in srgb, var(--hb-tfc-accent) 20%, transparent);
    border-color: var(--hb-tfc-accent);
}

.hb-tfc__suffix-field { position: relative; }
.hb-tfc__suffix-field input { padding-right: 60px; }
.hb-tfc__suffix-field b { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--hb-tfc-muted); font-size: 13px; }

.hb-tfc__actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 26px; }
.hb-tfc button { min-height: 48px; padding: 12px 22px; border: 0; border-radius: 12px; cursor: pointer; font: inherit; font-weight: 800; }
.hb-tfc__calculate, .hb-tfc__print { color: #fff; background: var(--hb-tfc-accent); box-shadow: 0 10px 24px rgba(13,142,160,.22); }
.hb-tfc__calculate:hover, .hb-tfc__print:hover { filter: brightness(.94); transform: translateY(-1px); }
.hb-tfc__reset { color: var(--hb-tfc-navy); background: #eaf1f4; }
.hb-tfc__error { margin-top: 18px; padding: 14px 16px; color: #7a1721; border: 1px solid #efb9bf; border-radius: 10px; background: #fff2f3; }

.hb-tfc__results { padding-top: 0; }
.hb-tfc__result-hero {
    padding: 28px;
    text-align: center;
    color: #fff;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--hb-tfc-accent), var(--hb-tfc-navy));
}
.hb-tfc__result-hero span { display: block; font-size: 12px; font-weight: 800; letter-spacing: .14em; opacity: .8; }
.hb-tfc__result-hero strong { display: block; margin: 8px 0; font-size: clamp(46px, 7vw, 76px); line-height: 1; }
.hb-tfc__result-hero p { max-width: 780px; margin: 0 auto; font-size: 17px; line-height: 1.5; }

.hb-tfc__cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 18px 0; }
.hb-tfc__cards article, .hb-tfc__panel {
    padding: 22px;
    border: 1px solid var(--hb-tfc-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(16,43,70,.06);
}
.hb-tfc__cards span { display: block; color: var(--hb-tfc-muted); font-weight: 700; }
.hb-tfc__cards strong { display: block; margin: 8px 0; color: var(--hb-tfc-navy); font-size: 30px; }
.hb-tfc__cards small { color: var(--hb-tfc-muted); line-height: 1.45; }

.hb-tfc__result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.hb-tfc__panel h3 { margin: 0 0 14px; color: var(--hb-tfc-navy); }
.hb-tfc__rows > div { display: flex; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--hb-tfc-line); }
.hb-tfc__rows > div:last-child { border-bottom: 0; }
.hb-tfc__rows span { color: var(--hb-tfc-muted); }
.hb-tfc__rows strong { text-align: right; color: var(--hb-tfc-navy); }
.hb-tfc__panel--warning { background: #fffaf0; }
.hb-tfc__panel--warning > p { color: #6b5014; line-height: 1.55; }

.hb-tfc__insight { margin-top: 18px; padding: 16px 18px; border-radius: 12px; font-weight: 800; }
.hb-tfc__insight.is-positive { color: #17623d; background: #eaf8f0; border: 1px solid #b9e2ca; }
.hb-tfc__insight.is-warning { color: #7a4511; background: #fff4e5; border: 1px solid #f1cea7; }

.hb-tfc__print-actions { margin-top: 22px; text-align: center; }
.hb-tfc__disclaimer {
    margin: 0;
    padding: 18px clamp(20px, 4vw, 44px);
    color: var(--hb-tfc-muted);
    border: 1px solid var(--hb-tfc-line);
    border-top: 0;
    border-radius: 0 0 26px 26px;
    background: var(--hb-tfc-soft);
    font-size: 13px;
    line-height: 1.5;
}

@media (max-width: 850px) {
    .hb-tfc__grid, .hb-tfc__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .hb-tfc { margin: 14px auto; }
    .hb-tfc__hero { border-radius: 18px 18px 0 0; }
    .hb-tfc__grid, .hb-tfc__grid--two, .hb-tfc__cards, .hb-tfc__result-grid { grid-template-columns: 1fr; }
    .hb-tfc__actions button { width: 100%; }
    .hb-tfc__rows > div { align-items: flex-start; }
    .hb-tfc__result-hero { padding: 24px 16px; }
    .hb-tfc__disclaimer { border-radius: 0 0 18px 18px; }
}

@media print {
    body * { visibility: hidden !important; }
    .hb-tfc, .hb-tfc * { visibility: visible !important; }
    .hb-tfc { position: absolute; inset: 0; max-width: none; margin: 0; }
    .hb-tfc__form, .hb-tfc__print-actions { display: none !important; }
    .hb-tfc__results { display: block !important; border: 0; padding: 0; }
    .hb-tfc__hero { border-radius: 0; }
    .hb-tfc__cards, .hb-tfc__result-grid { break-inside: avoid; }
}
