/*
| Calculators (Step 52) - hub + calculator pages. Everything is namespaced .cl- ; loaded only by calculators.php.
| Colours follow the site: navy #0b1b2e, gold #dbaa3e / #a67815, Georgia headings.
*/
.cl-wrap { max-width: 1160px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); box-sizing: border-box; }

/* ---------- title band ---------- */
.cl-hero { padding: clamp(40px, 5.5vw, 64px) 0 clamp(32px, 4vw, 46px); color: #fff; background: radial-gradient(90% 140% at 12% 0%, rgba(219, 170, 62, .16), transparent 60%), linear-gradient(135deg, #0b1b2e, #12324f); }
.cl-hero-sm { padding: clamp(24px, 3.4vw, 40px) 0 clamp(28px, 3.6vw, 40px); }
.cl-eyebrow { margin: 0 0 12px; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #dbaa3e; }
body .cl-hero h1 { margin: 0 0 12px; max-width: 860px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(28px, 4.2vw, 44px) !important; line-height: 1.18; color: #fff; }
.cl-sub { margin: 0; max-width: 720px; font-size: clamp(15px, 1.6vw, 17.5px); line-height: 1.65; color: #b9c7d5; }
.cl-badge { display: inline-block; margin: 18px 0 0; padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: #f0d28a; background: rgba(219, 170, 62, .14); }
.cl-crumbs { margin: 0 0 18px; font-size: 13.5px; color: #93a6b8; }
.cl-crumbs a { color: #f0d28a; text-decoration: none; }
.cl-crumbs a:hover { text-decoration: underline; }
.cl-crumbs span { margin: 0 7px; }

/* ---------- hub ---------- */
.cl-hub { padding-top: clamp(26px, 3.6vw, 44px); padding-bottom: clamp(30px, 4vw, 56px); }
body .cl-group { margin: 34px 0 16px; font-family: Georgia, serif; font-size: 24px !important; color: #0b1b2e; }
.cl-group:first-child { margin-top: 0; }
.cl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.cl-card { display: flex; flex-direction: column; padding: 22px 22px 20px; border: 1px solid #e0e6ec; border-radius: 18px; background: #fff; text-decoration: none; color: inherit; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.cl-card:hover { transform: translateY(-3px); border-color: #dbaa3e; box-shadow: 0 16px 36px rgba(11, 27, 46, .12); }
.cl-icon { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; border-radius: 14px; font-size: 24px; background: linear-gradient(135deg, #0b1b2e, #12324f); box-shadow: inset 0 0 0 1px rgba(219, 170, 62, .5); }
body .cl-card h3 { margin: 0 0 6px; font-family: Georgia, serif; font-size: 19px !important; line-height: 1.3; color: #0b1b2e; }
.cl-card p { margin: 0 0 16px; font-size: 14.5px; line-height: 1.6; color: #55677a; }
.cl-open { margin-top: auto; font-size: 14px; font-weight: 800; color: #a67815; }
.cl-open::after { content: " →"; }

/* ---------- calculator: form + result ---------- */
.cl-page { padding-top: clamp(24px, 3.4vw, 40px); padding-bottom: clamp(30px, 4vw, 56px); }
.cl-app { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: start; }
.cl-form, .cl-result { padding: clamp(20px, 2.6vw, 30px); border: 1px solid #e0e6ec; border-radius: 20px; background: #fff; box-shadow: 0 10px 30px rgba(11, 27, 46, .06); min-width: 0; }
body .cl-form h2, body .cl-result h2 { margin: 0 0 6px; font-family: Georgia, serif; font-size: 22px !important; color: #0b1b2e; }
.cl-hint { margin: 0 0 18px; font-size: 13px; color: #7b8b9a; }
.cl-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.cl-field { display: block; min-width: 0; font-size: 13.5px; font-weight: 700; color: #33475c; }
.cl-field[hidden] { display: none; }
.cl-field span { display: block; margin-bottom: 6px; line-height: 1.35; }
.cl-field em { font-style: normal; font-weight: 500; color: #8a98a7; }
.cl-field input, .cl-field select { display: block; width: 100%; height: 46px; padding: 0 12px; box-sizing: border-box; border: 1px solid #c9d4de; border-radius: 10px; font: inherit; font-size: 16px; font-weight: 600; color: #0b1b2e; background: #fff; }
.cl-field input:focus, .cl-field select:focus { outline: 2px solid #dbaa3e; outline-offset: 1px; border-color: #dbaa3e; }
.cl-field input[aria-invalid="true"] { border-color: #c0392b; background: #fff6f5; }
.cl-field small { display: block; margin-top: 5px; font-size: 12px; font-weight: 500; line-height: 1.4; color: #8a98a7; }
.cl-custom { margin-top: 14px; }
.cl-adv { margin-top: 18px; padding: 12px 14px; border: 1px solid #e0e6ec; border-radius: 12px; background: #f7f9fb; }
.cl-adv summary { cursor: pointer; font-size: 14px; font-weight: 800; color: #0b1b2e; }
.cl-adv .cl-fields { margin-top: 14px; }
.cl-reset { margin-top: 20px; height: 42px; padding: 0 20px; border: 1px solid #c9d4de; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 700; color: #33475c; background: #fff; cursor: pointer; }
.cl-reset:hover { border-color: #dbaa3e; color: #7a560a; }

.cl-result { position: sticky; top: 96px; }
.cl-big { margin: 14px 0 12px; padding: 18px 20px; border-radius: 16px; color: #fff; background: radial-gradient(120% 100% at 100% 0%, rgba(219, 170, 62, .25), transparent 60%), linear-gradient(150deg, #0b1b2e, #12324f); }
.cl-big small { display: block; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #f0d28a; }
.cl-bigv { margin-top: 6px; font: 700 clamp(30px, 4.6vw, 42px)/1.15 Georgia, serif; overflow-wrap: anywhere; }
.cl-bigv.cl-pos { color: #6fdc9e; }
.cl-bigv.cl-neg { color: #ff9a92; }
.cl-row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 11px 2px; border-bottom: 1px solid #edf1f4; font-size: 14.5px; color: #4b5c6d; }
.cl-row b { font-size: 16.5px; color: #0b1b2e; text-align: right; overflow-wrap: anywhere; }
.cl-row b.cl-pos, .cl-textrow p.cl-pos { color: #148a4c; }
.cl-row b.cl-neg, .cl-textrow p.cl-neg { color: #c0392b; }
.cl-strong { padding: 14px 2px; font-weight: 700; }
.cl-strong b { font-size: 20px; }
.cl-textrow { padding: 12px 2px 4px; }
.cl-textrow small { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #7b8b9a; }
.cl-textrow p { margin: 0; font-size: 14.5px; line-height: 1.55; color: #33475c; }
.cl-msg { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.55; color: #7a4a0a; background: #fff6e4; border: 1px solid #ecd9a3; }
.cl-msg[hidden] { display: none; }
.cl-chart { margin-top: 16px; }
.cl-chart svg { display: block; width: 100%; height: auto; }
.cl-legend { margin: 8px 0 0; font-size: 12.5px; color: #6b7b8c; }
.cl-dot { display: inline-block; width: 10px; height: 10px; margin: 0 6px 0 12px; border-radius: 3px; vertical-align: -1px; }
.cl-dot.inv { background: #12324f; margin-left: 0; }
.cl-dot.ret { background: #dbaa3e; }
.cl-break { margin-top: 16px; padding: 12px 14px; border: 1px solid #e0e6ec; border-radius: 12px; background: #f7f9fb; }
.cl-break summary { cursor: pointer; font-size: 14px; font-weight: 800; color: #0b1b2e; }
.cl-break table { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 13.5px; }
.cl-break td { padding: 7px 2px; border-bottom: 1px solid #e6ebf0; color: #4b5c6d; }
.cl-break td:last-child { text-align: right; white-space: nowrap; font-weight: 700; color: #0b1b2e; }
.cl-break tr.cl-total td { border-bottom: 0; padding-top: 10px; font-weight: 800; color: #0b1b2e; }

/* ---------- a calculator added in the admin: its code runs in a sandboxed frame ---------- */
.cl-frame-card { border: 1px solid #e0e6ec; border-radius: 20px; background: #fff; box-shadow: 0 10px 30px rgba(11, 27, 46, .06); overflow: hidden; }
.cl-frame { display: block; width: 100%; height: 640px; min-height: 260px; border: 0; background: transparent; }
.cl-frame-card .cl-msg { margin: 16px; }
.cl-frame-link { margin: 10px 4px 0; text-align: right; font-size: 13px; }
.cl-frame-link a { color: #7a560a; font-weight: 700; text-decoration: none; }
.cl-frame-link a:hover { text-decoration: underline; }
.cl-icon { align-self: flex-start; min-width: 48px; width: auto; max-width: 100%; padding: 0 10px; box-sizing: border-box; font-size: 22px; font-weight: 800; color: #f0d28a; white-space: nowrap; overflow: hidden; }
.cl-rich p { margin: 0 0 16px; }
.cl-rich ul, .cl-rich ol { margin: 0 0 16px; padding-left: 24px; font-size: 16.5px; line-height: 1.75; color: #33475c; }
.cl-rich li { margin: 0 0 6px; }
body .cl-content .cl-rich h2[id] { margin: 26px 0 8px; font-size: 21px !important; }
body .cl-content .cl-rich h3 { margin: 24px 0 8px; font-family: Georgia, serif; font-size: 20px !important; color: #0b1b2e; }
.cl-rich a { color: #7a560a; font-weight: 700; }
.cl-rich blockquote { margin: 0 0 16px; padding: 4px 0 4px 16px; border-left: 3px solid #dbaa3e; color: #4b5c6d; }
.cl-rich .bl-note { margin: 0 0 16px; padding: 14px 18px; border: 1px solid #ecd9a3; border-left: 4px solid #d6a348; border-radius: 12px; background: #fff8e6; font-size: 15px; line-height: 1.65; color: #5a4310; }
.cl-rich .bl-table { margin: 0 0 16px; overflow-x: auto; }
.cl-rich table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.cl-rich th, .cl-rich td { padding: 9px 10px; border-bottom: 1px solid #e6ebf0; text-align: left; }
.cl-rich figure { margin: 0 0 16px; }
.cl-rich img { max-width: 100%; height: auto; border-radius: 12px; }
.cl-rich hr { margin: 22px 0; border: 0; border-top: 1px solid #e0e6ec; }

/* ---------- text below the calculator ---------- */
.cl-content { max-width: 820px; margin: clamp(30px, 4vw, 48px) auto 0; }
body .cl-content h2, body .cl-hub h2.cl-faq-h, body .cl-faq h2, body .cl-more h2 { margin: 34px 0 12px; font-family: Georgia, serif; font-size: clamp(22px, 2.6vw, 27px) !important; color: #0b1b2e; }
.cl-how p { margin: 0; font-size: 16.5px; line-height: 1.75; color: #33475c; }
.cl-faq-item { margin: 0 0 10px; border: 1px solid #e0e6ec; border-radius: 14px; background: #fff; }
.cl-faq-item summary { cursor: pointer; padding: 15px 18px; font-size: 15.5px; font-weight: 800; color: #0b1b2e; }
.cl-faq-item p { margin: 0; padding: 0 18px 16px; font-size: 15px; line-height: 1.7; color: #4b5c6d; }
.cl-more .cl-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.cl-hub .cl-faq { max-width: 820px; margin: 44px auto 0; }
.cl-cta { margin: 40px 0 0; padding: clamp(22px, 3vw, 32px); display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: #fff; border-radius: 20px; background: linear-gradient(135deg, #0b1b2e, #12324f); }
body .cl-cta h2 { margin: 0 0 6px !important; font-family: Georgia, serif; font-size: clamp(20px, 2.4vw, 25px) !important; color: #fff; }
.cl-cta p { margin: 0; max-width: 520px; font-size: 15px; line-height: 1.6; color: #b9c7d5; }
.cl-cta-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.cl-btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; border-radius: 12px; font-size: 14.5px; font-weight: 800; text-decoration: none; }
.cl-btn.gold { color: #1b2736 !important; background: linear-gradient(135deg, #f5dc97, #d5a13a); box-shadow: 0 8px 20px rgba(213, 161, 58, .28); }
.cl-btn.ghost { color: #fff !important; border: 1px solid rgba(255, 255, 255, .3); }
.cl-note { margin: 26px 0 0; padding: 14px 18px; border: 1px solid #ecd9a3; border-left: 4px solid #d6a348; border-radius: 12px; background: #fff8e6; font-size: 13.5px; line-height: 1.65; color: #5a4310; }
.cl-hub .cl-note, .cl-hub .cl-cta { max-width: 820px; margin-left: auto; margin-right: auto; }

.cl-card:focus-visible, .cl-btn:focus-visible, .cl-reset:focus-visible, .cl-faq-item summary:focus-visible, .cl-adv summary:focus-visible, .cl-break summary:focus-visible { outline: 2px solid #dbaa3e; outline-offset: 3px; }

@media (max-width: 900px) {
  .cl-app { grid-template-columns: 1fr; }
  .cl-result { position: static; }
}
@media (max-width: 520px) {
  .cl-fields { grid-template-columns: 1fr; }
  .cl-grid { grid-template-columns: 1fr; }
  .cl-cta { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .cl-card { transition: none; } .cl-card:hover { transform: none; } }
@media print { .cl-reset, .cl-cta, .cl-more { display: none !important; } .cl-app { display: block; } .cl-result { position: static; box-shadow: none; } .cl-hero { color: #000; background: none; } body .cl-hero h1 { color: #000; } }
