/* Tools & Resources, Borrowing Power and ATO Refinance calculators on the dc
   design system. Form controls mirror the compare calculator (compare.css) and
   the lead landing pages (cl-landing.css). */
.tl-hero { padding: 72px 0 96px; border-top: none; }
.tl-hero .h-display { font-size: 46px; max-width: 720px; }
.tl-hero .lede { max-width: 640px; margin-top: 16px; }

/* Calculator card */
.tl-calc { margin-top: 40px; background: #fff; border: 1px solid var(--grey-300); border-radius: 20px; box-shadow: var(--shadow-z20); overflow: hidden; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.tl-form { background: var(--grey-100); border-right: 1px solid var(--grey-200); padding: 40px 44px 44px; }
.tl-form-h { font-size: 20px; font-weight: 700; color: var(--ink); }
.tl-form-p { font-size: 15px; line-height: 1.6; color: var(--text-secondary); margin-top: 8px; }
.tl-form form { margin-top: 24px; display: flex; flex-direction: column; gap: 22px; }
.tl-field { display: flex; flex-direction: column; gap: 8px; }
.tl-field label, .tl-label { font-size: 14px; font-weight: 600; color: var(--grey-700); }
.tl-field .box { display: flex; align-items: center; height: 56px; background: #fff; border: 1.5px solid var(--grey-300); border-radius: 12px; padding: 0 16px; gap: 6px; transition: border-color .15s, box-shadow .15s; }
.tl-field .box:focus-within { border-color: var(--brand-orange); box-shadow: 0 0 0 4px rgba(242,103,57,0.12); }
.tl-field .box .sym { font-size: 20px; font-weight: 600; color: var(--text-disabled); }
.tl-field .box input { border: none; outline: none; background: transparent; font-family: var(--font-sans); font-size: 22px; font-weight: 700; color: var(--ink); width: 100%; min-width: 0; font-variant-numeric: tabular-nums; }
.tl-field .box input::placeholder { color: var(--grey-400); font-weight: 600; }

/* Segmented purpose toggle */
.tl-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tl-seg label { cursor: pointer; }
.tl-seg input { position: absolute; opacity: 0; pointer-events: none; }
.tl-seg span { display: flex; align-items: center; justify-content: center; height: 48px; border: 1.5px solid var(--grey-300); border-radius: 10px; background: #fff; font-size: 14px; font-weight: 600; color: var(--grey-700); transition: border-color .15s, background .15s, color .15s; }
.tl-seg span:hover { border-color: var(--grey-400); }
.tl-seg input:checked + span { border-color: var(--brand-orange); background: rgba(242,103,57,0.08); color: var(--brand-orange-dark); }
.tl-seg input:focus-visible + span { box-shadow: 0 0 0 4px rgba(242,103,57,0.12); }

/* Range slider */
.tl-range-head { display: flex; justify-content: space-between; align-items: baseline; }
.tl-range-val { font-size: 15px; font-weight: 700; color: var(--brand-orange); font-variant-numeric: tabular-nums; }
.tl-range-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-disabled); margin-top: 2px; }
.tl-range { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 4px; background: var(--grey-300); outline: none; margin: 6px 0 0; }
.tl-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-orange); border: 2px solid #fff; cursor: pointer; box-shadow: 0 2px 6px rgba(7,13,37,0.25); }
.tl-range::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--brand-orange); border: 2px solid #fff; cursor: pointer; box-shadow: 0 2px 6px rgba(7,13,37,0.25); }
.tl-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(242,103,57,0.2); }
.tl-note { font-size: 12.5px; line-height: 1.55; color: var(--text-disabled); }

/* Results */
.tl-results { padding: 40px 44px 44px; display: flex; flex-direction: column; gap: 18px; }
.tl-stat { border: 1px solid var(--grey-300); border-radius: 14px; padding: 22px 24px; }
.tl-stat .k { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.tl-stat .v { font-size: 40px; line-height: 1.1; font-weight: 700; color: var(--ink); letter-spacing: -1px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.tl-stat .v.accent { color: var(--brand-orange); }
.tl-stat .v.good { color: var(--success-dark); }
.tl-stat .s { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }
.tl-stat.hi { background: var(--brand-sage-lighter); border-color: var(--brand-sage); }
.tl-rows { border: 1px solid var(--grey-300); border-radius: 14px; padding: 6px 24px; }
.tl-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--grey-500-12); font-size: 14.5px; }
.tl-row:last-child { border-bottom: none; }
.tl-row .l { color: var(--text-secondary); }
.tl-row .r { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.tl-row .r.good { color: var(--success-dark); }
.tl-sub-h { font-size: 15px; font-weight: 600; color: var(--ink); margin-top: 6px; }
.tl-chart { position: relative; height: 260px; }
.tl-cta { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; background: var(--grey-100); border: 1px solid var(--grey-200); border-radius: 14px; padding: 18px 22px; }
.tl-cta p { font-size: 15px; font-weight: 600; color: var(--ink); }
.tl-cta .btn { height: 46px; padding: 0 22px; border-radius: 10px; font-size: 14.5px; }

/* Rate comparison (ATO) */
.tl-rates { border: 1px solid var(--grey-300); border-radius: 14px; padding: 22px 24px; }
.tl-rates .t { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-disabled); }
.tl-rate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.tl-rate { background: var(--grey-100); border-radius: 12px; padding: 16px; text-align: center; }
.tl-rate .k { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.tl-rate .v { font-size: 32px; font-weight: 700; color: var(--ink); line-height: 1.1; margin-top: 6px; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.tl-rate .v.accent { color: var(--brand-orange); }
.tl-rate .n { font-size: 12px; color: var(--text-disabled); margin-top: 6px; }
.tl-diff { font-size: 15px; font-weight: 700; margin-top: 16px; }
.tl-footnote { font-size: 12.5px; line-height: 1.6; color: var(--text-secondary); margin-top: 10px; }

/* Resource cards (tools page) */
.tl-resources { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.tl-resource { display: flex; flex-direction: column; gap: 14px; background: #fff; border: 1px solid var(--grey-300); border-radius: 18px; padding: 30px; text-decoration: none; color: inherit; transition: box-shadow .2s, transform .2s, border-color .2s; }
.tl-resource:hover { box-shadow: var(--shadow-z20); transform: translateY(-3px); border-color: var(--brand-orange); }
.tl-resource .head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tl-resource .tile { width: 52px; height: 52px; }
.tl-resource .tile .iconify { font-size: 26px; }
.tl-resource h3 { font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.tl-resource p { font-size: 15px; line-height: 1.6; color: var(--text-secondary); flex: 1; }
.tl-resource .go { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--brand-orange); }
.tl-resource .go .iconify { transition: transform .2s; }
.tl-resource:hover .go .iconify { transform: translateX(4px); }

/* Why cards */
.tl-why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tl-why-card { background: #fff; border: 1px solid var(--grey-300); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.tl-why-card .tile { width: 48px; height: 48px; }
.tl-why-card .tile .iconify { font-size: 24px; }
.tl-why-card h3 { font-size: 18px; font-weight: 600; color: var(--ink); }
.tl-why-card p { font-size: 14.5px; line-height: 1.65; color: var(--text-secondary); }

/* FAQ open/closed state (kit only styles the chevron) */
.faq-a { display: none; }
.faq-item.open .faq-a { display: block; }

@media (max-width: 900px) {
  .tl-calc { grid-template-columns: 1fr; }
  .tl-form { border-right: none; border-bottom: 1px solid var(--grey-200); }
  .tl-resources, .tl-why { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .tl-hero .h-display { font-size: 34px; }
  .tl-form, .tl-results { padding: 28px 22px 32px; }
  .tl-rate-grid { grid-template-columns: 1fr; }
  .tl-stat .v { font-size: 32px; }
  .tl-cta { flex-direction: column; align-items: stretch; text-align: center; }
}
