:root {
    --tk-teal: #20b2aa;
    --tk-teal-dark: #086460;
    --tk-gold: #e0b94f;
    --tk-lime: #a5c436;
    --tk-ink: #263333;
    --tk-muted: #607070;
    --tk-border: #dce9e7;
    --tk-soft: #f3fbfa;
}

* { box-sizing: border-box; }

body.tool-page {
    margin: 0;
    min-height: 100vh;
    padding: 128px 18px 0;
    font-family: Helvetica, Arial, sans-serif;
    color: var(--tk-ink);
    background: url('/html/Images/background.jpg') top center / auto repeat-y;
}

.tool-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    min-height: 100px;
    padding: 12px clamp(16px, 4vw, 54px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: #fff;
    box-shadow: 0 1px 8px rgba(0,0,0,.06);
}

.brand { color: var(--tk-teal); text-decoration: none; }
.brand-name { display: block; font-size: clamp(27px, 3vw, 38px); font-weight: 700; }
.brand-line { display: block; margin-top: 3px; font-size: clamp(12px, 1.4vw, 17px); }
.highlight {
    background: linear-gradient(180deg,#fff6b7 0%,#f7d774 25%,#e0b94f 50%,#c9971a 75%,#fff2a6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tool-nav { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.tool-nav a { padding: 9px 11px; color: var(--tk-teal-dark); text-decoration: none; font-weight: 600; font-size: 14px; }
.tool-nav a:hover, .tool-nav a:focus-visible { text-decoration: underline; }
.tool-nav .nav-cta { border-radius: 22px; color: #fff; background: var(--tk-teal); padding-inline: 17px; }

.tool-shell { width: min(1040px, 100%); margin: 0 auto; }
.tool-hero, .tool-card, .result-card, .content-card, .privacy-strip {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,.09);
}
.tool-hero { padding: clamp(25px, 5vw, 48px); text-align: center; border-top: 5px solid var(--tk-teal); }
.eyebrow { color: var(--tk-teal-dark); font-size: 13px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.tool-hero h1 { margin: 10px auto 14px; max-width: 760px; color: var(--tk-teal); font-size: clamp(31px, 5vw, 50px); line-height: 1.08; }
.tool-hero p { max-width: 760px; margin: 0 auto; color: var(--tk-muted); line-height: 1.65; font-size: 17px; }
.privacy-pill { display: inline-flex; align-items: center; gap: 7px; margin-top: 18px; padding: 8px 13px; border-radius: 999px; background: var(--tk-soft); color: var(--tk-teal-dark); font-size: 13px; font-weight: 700; }

.tool-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(290px, .75fr); gap: 20px; align-items: start; margin-top: 20px; }
.tool-card, .result-card, .content-card { padding: clamp(20px, 4vw, 32px); }
.tool-card h2, .result-card h2, .content-card h2 { color: var(--tk-teal); margin: 0 0 17px; }
.section-intro { color: var(--tk-muted); line-height: 1.55; margin: -8px 0 22px; }
.form-section { padding: 22px 0; border-top: 1px solid var(--tk-border); }
.form-section:first-of-type { padding-top: 0; border-top: 0; }
.form-section h3 { margin: 0 0 15px; font-size: 18px; color: var(--tk-ink); }
.field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label, .switch-label { font-size: 14px; font-weight: 700; color: #405050; }
.money-wrap { position: relative; }
.money-wrap span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--tk-muted); font-weight: 700; }
.field input[type="number"], .field select {
    width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #b9cecb; border-radius: 8px; background: #fff; color: var(--tk-ink); font-size: 16px;
}
.money-wrap input[type="number"] { padding-left: 29px; }
.field input:focus, .field select:focus { outline: 3px solid rgba(32,178,170,.18); border-color: var(--tk-teal); }
.hint { color: var(--tk-muted); font-size: 12px; line-height: 1.4; }
.check-row { display: flex; align-items: flex-start; gap: 10px; margin: 11px 0; line-height: 1.45; }
.check-row input { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; accent-color: var(--tk-teal); }
.primary-button, .secondary-button {
    display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 20px; border-radius: 8px; font-size: 16px; font-weight: 800; cursor: pointer; text-decoration: none;
}
.primary-button { border: 0; background: var(--tk-teal); color: #fff; }
.primary-button:hover { background: #17958e; }
.secondary-button { border: 1px solid var(--tk-teal); background: #fff; color: var(--tk-teal-dark); }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.button-row .primary-button { flex: 1; }

.result-card { position: sticky; top: 120px; border-top: 5px solid var(--tk-gold); }
.result-placeholder { color: var(--tk-muted); line-height: 1.6; }
.result-number { margin: 5px 0 3px; color: var(--tk-teal-dark); font-size: clamp(35px,5vw,52px); font-weight: 800; }
.result-caption { color: var(--tk-muted); font-size: 13px; }
.result-list { margin: 21px 0; padding: 0; list-style: none; border-top: 1px solid var(--tk-border); }
.result-list li { display: flex; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid var(--tk-border); font-size: 14px; }
.result-list strong { text-align: right; }
.result-note { padding: 13px; border-radius: 8px; background: #fff8df; color: #665510; font-size: 13px; line-height: 1.5; }
.result-card[aria-hidden="true"] { display: none; }

.content-card { margin-top: 20px; }
.content-card p, .content-card li { color: #506060; line-height: 1.65; }
.content-card a { color: var(--tk-teal-dark); }
.faq details { padding: 15px 0; border-top: 1px solid var(--tk-border); }
.faq summary { cursor: pointer; color: var(--tk-ink); font-weight: 800; }
.faq details p { margin-bottom: 0; }
.cross-link { border-left: 5px solid var(--tk-lime); }

.checklist-progress { margin: 0 0 22px; }
.progress-meta { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 7px; font-size: 14px; font-weight: 800; }
.progress-track { height: 12px; overflow: hidden; border-radius: 99px; background: #e8efee; }
.progress-bar { width: 0; height: 100%; background: linear-gradient(90deg,var(--tk-teal),var(--tk-lime)); transition: width .25s ease; }
.check-category { margin-top: 16px; border: 1px solid var(--tk-border); border-radius: 10px; overflow: hidden; }
.check-category h3 { margin: 0; padding: 14px 16px; color: var(--tk-teal-dark); background: var(--tk-soft); font-size: 17px; }
.check-item { display: grid; grid-template-columns: 23px 1fr; gap: 10px; padding: 13px 16px; border-top: 1px solid var(--tk-border); cursor: pointer; }
.check-item input { width: 19px; height: 19px; accent-color: var(--tk-teal); }
.check-item strong { display: block; font-size: 14px; }
.check-item small { display: block; margin-top: 4px; color: var(--tk-muted); line-height: 1.4; }
.score-ring { width: 150px; height: 150px; margin: 10px auto 18px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--tk-teal) 0%, #e7efee 0); position: relative; }
.score-ring::before { content: ''; position: absolute; inset: 13px; border-radius: 50%; background: #fff; }
.score-value { position: relative; z-index: 1; text-align: center; color: var(--tk-teal-dark); font-size: 31px; font-weight: 800; }
.score-value small { display: block; font-size: 12px; color: var(--tk-muted); }
.next-steps { padding-left: 19px; }
.next-steps li { margin: 9px 0; }

.privacy-strip { margin-top: 20px; padding: 17px 22px; color: var(--tk-teal-dark); font-size: 14px; line-height: 1.55; text-align: center; }
.site-footer { margin-top: 42px; padding: 28px 20px; text-align: center; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { color: #667777; font-size: 14px; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.copyright { color: #889696; font-size: 12px; }
.hidden { display: none !important; }

@media (max-width: 800px) {
    body.tool-page { padding-top: 154px; }
    .tool-header { min-height: 132px; flex-direction: column; justify-content: center; gap: 7px; }
    .brand { text-align: center; }
    .brand-line { display: none; }
    .tool-nav { justify-content: center; }
    .tool-nav a { padding: 7px 8px; font-size: 13px; }
    .tool-grid { grid-template-columns: 1fr; }
    .result-card { position: static; }
}

@media (max-width: 520px) {
    body.tool-page { padding-inline: 10px; }
    .field-grid { grid-template-columns: 1fr; }
    .tool-nav a:first-child { display: none; }
    .tool-hero, .tool-card, .result-card, .content-card { padding: 20px 16px; }
    .result-list li { flex-direction: column; gap: 4px; }
    .result-list strong { text-align: left; }
}

@media print {
    body.tool-page { padding: 0; background: #fff; }
    .tool-header, .tool-hero, .no-print, .site-footer, .privacy-strip, .cross-link { display: none !important; }
    .tool-grid { display: block; margin: 0; }
    .tool-card, .result-card { box-shadow: none; border: 0; padding: 0; }
    .result-card { margin-top: 25px; }
    .check-category { break-inside: avoid; }
    .check-item small { color: #444; }
}
