/* ============================================================
   RYTVAE CALCULATORS — design system for calc pages and hubs.
   Loads after css/styles.css and reuses its tokens. Dark is the default;
   [data-theme="light"] uses the site's own light palette (.section--light values).
   ============================================================ */

/* ---------- 1. Theme tokens ---------- */
/* --help: small supporting text, kept at WCAG AA contrast on cards in both themes */
:root { --gold-ink: #c9a24b; --help: #a3a3ad; --ok: #3fb67a; --slate: #5c5c65; --grid: rgba(125,125,140,.18); --shadow-card: 0 18px 40px -18px rgba(0,0,0,.55); }
[data-theme="light"] {
  --help: #5f5f6a;
  --ink: #f7f6f3; --char: #eeece7; --graphite: #ffffff; --graphite-2: #e7e4dd; --line: #dcd8d0;
  --white: #14141a; --silver: #43434d; --muted: #5f5f6a; --faint: #74747e;
  --gold-ink: #a8822f; --ok: #1e8a52; --slate: #8a8a94;
  --grad-panel: linear-gradient(180deg, rgba(0,0,0,.025), rgba(0,0,0,0));
  --shadow: 0 22px 55px -26px rgba(20,20,26,.28); --shadow-card: 0 10px 30px -18px rgba(20,20,26,.30);
}
[data-theme="light"] body {
  background: radial-gradient(1100px 520px at 78% 4%, rgba(225,27,46,.05), transparent 62%), linear-gradient(180deg, #fbfaf8 0%, #f7f6f3 45%, #f1efeb 100%), #f7f6f3;
}
[data-theme="light"] body::before {
  background: repeating-linear-gradient(45deg, rgba(20,20,26,.016) 0 1px, transparent 1px 7px), repeating-linear-gradient(-45deg, rgba(20,20,26,.012) 0 1px, transparent 1px 7px);
}
[data-theme="light"] body::after { opacity: .04; }
/* Site chrome stays dark in both themes (logos are light artwork). */
[data-theme="light"] :is(.nav, .drawer, .page-hero, .footer, .mobile-cta, .loader, .to-top) {
  --ink: #17171e; --char: #20202a; --graphite: #292933; --graphite-2: #34343f; --line: #45454f;
  --white: #f6f6f8; --silver: #c7c7cf; --muted: #8d8d97; --faint: #5c5c65; --gold-ink: #c9a24b;
}
[data-theme="light"] .page-hero { background: radial-gradient(1100px 600px at 50% 0%, #2b2b3a 0%, transparent 70%), linear-gradient(180deg, #222230, #17171e); color: var(--silver); }
[data-theme="light"] .footer { border-top-color: var(--red); }

/* ---------- 2. Page frame ---------- */
.rc-main { padding: 1.4rem 0 clamp(3rem, 6vw, 5rem); position: relative; z-index: 1; }
.rc-main > .container > * + * { margin-top: 1.6rem; }
@media (max-width: 520px) { .container { width: calc(100% - 2rem); } }
.page-hero { overflow: visible; }
.page-hero .rc-hero-intro { max-width: 62ch; }
.rc-hero-tools { display: flex; justify-content: center; gap: .6rem; margin-top: 1.3rem; flex-wrap: wrap; }
.rc-theme {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; padding: .45rem .95rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--silver); font-weight: 600; font-size: .82rem; cursor: pointer;
}
.rc-theme:hover { border-color: var(--red); color: var(--white); }
.rc-theme i { color: var(--gold-ink); }
.rc-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- 3. Seven-item tab bar (scrolls inside itself on phones) ---------- */
.rc-tabbar { margin: 0 -1rem; padding: 0 1rem; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.rc-tabbar::-webkit-scrollbar { display: none; }
.rc-tabbar ul { display: flex; gap: .55rem; width: max-content; margin-inline: auto; padding-block: .2rem; }
.rc-tabbar a {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .55rem 1.1rem; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--line); color: var(--silver); font-weight: 600; font-size: .88rem; transition: .25s var(--ease);
}
.rc-tabbar a:hover { border-color: var(--red); color: var(--white); }
.rc-tabbar a[aria-current="page"] { background: var(--grad-red); color: #fff; border-color: transparent; }

/* ---------- 4. Quick calculator layout ---------- */
.rc-wrap { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 1.6rem; align-items: start; }
.rc-wrap > * { min-width: 0; }
@media (max-width: 900px) { .rc-wrap { grid-template-columns: 1fr; } }
.rc-panel, .rc-card { background: var(--graphite); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.45rem; box-shadow: var(--shadow-card); min-width: 0; }
.rc-inputs { position: sticky; top: 88px; }
@media (max-width: 900px) { .rc-inputs { position: static; } }
.rc-h { font-family: var(--f-display); font-size: 1.3rem; color: var(--white); font-weight: 600; margin-bottom: .9rem; line-height: 1.25; }
.rc-h--sm { font-size: 1.1rem; }
.rc-p { color: var(--muted); font-size: .92rem; line-height: 1.65; max-width: 70ch; }
.rc-p + .rc-p { margin-top: .8rem; }

/* fields */
.rc-field { margin-bottom: 1.3rem; border: 0; padding: 0; min-width: 0; }
.rc-field:last-child { margin-bottom: 0; }
.rc-field__top { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; margin-bottom: .45rem; }
.rc-field label, .rc-field legend { font-size: .88rem; font-weight: 600; color: var(--silver); line-height: 1.35; }
.rc-field legend { margin-bottom: .45rem; padding: 0; }
.rc-box { display: flex; align-items: center; background: var(--char); border: 1px solid var(--line); border-radius: var(--radius-sm); transition: border-color .2s, box-shadow .2s; }
.rc-box:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px rgba(225,27,46,.14); }
.rc-box input { border: 0; background: transparent; box-shadow: none !important; min-height: 44px; padding: .6rem .8rem; font-family: var(--f-data); font-weight: 600; font-size: 1rem; color: var(--white); width: 100%; min-width: 0; }
.rc-box .rc-affix { color: var(--muted); font-family: var(--f-data); font-weight: 600; padding: 0 .1rem 0 .8rem; flex: none; }
.rc-box .rc-affix--end { padding: 0 .8rem 0 .1rem; }
.rc-words { font-size: .78rem; color: var(--muted); margin-top: .35rem; font-family: var(--f-data); min-height: 1.1em; }
.rc-help { font-size: .76rem; color: var(--faint); margin-top: .35rem; line-height: 1.5; }
.rc-field select, .lc-select { min-height: 44px; background: var(--char); color: var(--white); border: 1px solid var(--line); }

/* sliders: tall hit area, thin track */
.rc-main input[type="range"] { height: 32px; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; margin-top: .25rem; cursor: pointer; }
.rc-help, .lc-note, .rc-words, .lc-words, .rc-sub, .rc-k, .lc-k, .lc-label { color: var(--help); }
.rc-main input[type="range"]::-webkit-slider-runnable-track { height: 5px; border-radius: 5px; background: var(--graphite-2); }
.rc-main input[type="range"]::-moz-range-track { height: 5px; border-radius: 5px; background: var(--graphite-2); }
.rc-main input[type="range"]::-webkit-slider-thumb { margin-top: -7.5px; width: 22px; height: 22px; }
.rc-main input[type="range"]:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 2px; }

/* segmented toggle (radio inputs) */
.rc-seg { display: inline-flex; flex-wrap: wrap; gap: .3rem; background: var(--char); border: 1px solid var(--line); border-radius: 999px; padding: .25rem; }
.rc-seg label { position: relative; display: inline-flex; align-items: center; min-height: 38px; padding: .4rem .9rem; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: .82rem; cursor: pointer; }
.rc-seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.rc-seg label:has(input:checked) { background: var(--white); color: var(--ink); }
.rc-seg label:has(input:focus-visible) { outline: 2px solid var(--red-bright); outline-offset: 2px; }

/* editable table input */
.rc-etable-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--char); }
.rc-etable { width: 100%; border-collapse: collapse; min-width: 300px; }
.rc-etable th { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); font-weight: 700; }
.rc-etable td { padding: .3rem .35rem; border-bottom: 1px solid var(--graphite-2); }
.rc-etable td.rc-n { width: 2rem; color: var(--faint); font-family: var(--f-data); font-size: .78rem; text-align: center; }
.rc-etable select { min-height: 40px; padding: .4rem .5rem; font-size: .88rem; background: var(--graphite); }
[data-theme="dark"] input[type="date"], [data-theme="dark"] select { color-scheme: dark; }
.rc-etable input { min-height: 40px; padding: .45rem .55rem; font-family: var(--f-data); font-size: .9rem; background: var(--graphite); }
.rc-etable .rc-x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); display: grid; place-items: center; }
.rc-etable .rc-x:hover { border-color: var(--red); color: var(--red); }
.rc-etable-tools { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .6rem; }

/* buttons in calc pages */
.rc-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .55rem 1rem; border-radius: 999px; border: 1px solid var(--line); color: var(--silver); font-weight: 600; font-size: .84rem; background: transparent; cursor: pointer; transition: .2s var(--ease); white-space: nowrap; }
.rc-btn:hover { border-color: var(--red); color: var(--white); }
.rc-btn--wa { background: #1faa55; border-color: #1faa55; color: #fff; }
.rc-btn--wa:hover { color: #fff; filter: brightness(1.08); }
.rc-btn.is-done { border-color: var(--ok); color: var(--ok); }
.rc-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 5. Results ---------- */
.rc-result { display: grid; gap: 1.1rem; }
.rc-primary { border-left: 3px solid var(--gold-ink); padding-left: 1rem; }
.rc-k { font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: .35rem; }
.rc-big { font-family: var(--f-data); font-weight: 700; font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.05; color: var(--gold-ink); letter-spacing: -.01em; overflow-wrap: anywhere; }
.rc-sub { font-size: .82rem; color: var(--muted); margin-top: .35rem; }
.rc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: .8rem; }
.rc-tile { background: var(--char); border-radius: 12px; padding: .85rem 1rem; min-width: 0; }
.rc-tile .rc-v { font-family: var(--f-data); font-weight: 700; font-size: 1.15rem; color: var(--white); overflow-wrap: anywhere; }
.rc-note { display: flex; gap: .7rem; align-items: flex-start; border: 1px solid var(--line); background: var(--char); border-radius: var(--radius-sm); padding: .8rem .95rem; color: var(--silver); font-size: .86rem; line-height: 1.55; }
.rc-note i { color: var(--gold-ink); margin-top: .2rem; }
.rc-error { border-color: rgba(225,27,46,.45); background: rgba(225,27,46,.07); color: var(--white); }
.rc-error i { color: var(--red); }
.rc-share { display: flex; flex-wrap: wrap; gap: .5rem; padding-top: .9rem; border-top: 1px dashed var(--line); }
.rc-chart { position: relative; height: 280px; }
.rc-chart--short { height: 240px; }
.rc-chart-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-size: .85rem; }

/* formula & working */
.rc-working { background: var(--graphite); border: 1px solid var(--line); border-radius: var(--radius); }
.rc-working > summary { cursor: pointer; list-style: none; padding: 1.05rem 1.35rem; font-weight: 700; color: var(--white); display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 44px; }
.rc-working > summary::-webkit-details-marker { display: none; }
.rc-working > summary::after { content: "+"; color: var(--red); font-family: var(--f-data); font-size: 1.25rem; }
.rc-working[open] > summary::after { content: "–"; }
.rc-working__body { padding: 0 1.35rem 1.35rem; }
.rc-formula { font-family: var(--f-data); color: var(--white); background: var(--char); border-radius: var(--radius-sm); padding: .9rem 1rem; line-height: 1.9; overflow-x: auto; font-size: .95rem; }
.rc-formula p + p { margin-top: .3rem; }
.rc-formula small { display: block; color: var(--muted); font-family: var(--f-body); font-size: .78rem; line-height: 1.5; margin-top: .4rem; }
.rc-steps { list-style: none; counter-reset: s; margin-top: 1rem; }
.rc-steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: .4rem .8rem; padding: .75rem 0; border-bottom: 1px dashed var(--line); }
.rc-steps li:last-child { border-bottom: 0; }
.rc-steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--char); border: 1px solid var(--line); font-family: var(--f-data); font-size: .75rem; font-weight: 700; color: var(--white); grid-row: span 2; }
.rc-steps .t { color: var(--silver); font-weight: 600; font-size: .88rem; }
.rc-steps .m { font-family: var(--f-data); font-size: .88rem; color: var(--muted); overflow-wrap: anywhere; }
.rc-steps .m b { color: var(--white); }

/* tables */
.rc-table-wrap { position: relative; overflow: auto; max-height: 520px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.rc-table { width: 100%; border-collapse: collapse; }
.rc-table th { position: sticky; top: 0; background: var(--char); font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: .65rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: right; }
.rc-table td { font-family: var(--f-data); font-size: .85rem; color: var(--silver); padding: .55rem .6rem; border-bottom: 1px solid var(--graphite-2); text-align: right; white-space: nowrap; }
.rc-table th:first-child, .rc-table td:first-child { text-align: left; }
.rc-table td.hi { color: var(--white); font-weight: 700; }
.rc-table td.int { color: var(--red); }
.rc-table td.neg { color: var(--red); }
.rc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.rc-head .rc-h { margin: 0; }
.rc-tools { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* rates note, disclaimer, how it works, related */
.rc-rates { font-size: .8rem; color: var(--muted); display: flex; gap: .55rem; align-items: flex-start; }
.rc-rates i { color: var(--gold-ink); margin-top: .2rem; }
.rc-rates a { color: var(--red); }
.rc-disclaimer { font-size: .8rem; color: var(--muted); line-height: 1.65; border-left: 3px solid var(--red); background: var(--char); padding: 1rem 1.15rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.rc-disclaimer strong { color: var(--white); }
.rc-how h2, .rc-faq h2, .rc-related h2 { font-family: var(--f-display); font-size: clamp(1.4rem, 3vw, 1.75rem); color: var(--white); margin-bottom: .9rem; }
.rc-faq details { background: var(--graphite); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 1.2rem; }
.rc-faq details + details { margin-top: .6rem; }
.rc-faq summary { cursor: pointer; list-style: none; padding: 1rem 0; min-height: 44px; font-weight: 700; color: var(--white); display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.rc-faq summary::-webkit-details-marker { display: none; }
.rc-faq summary::after { content: "+"; color: var(--red); font-family: var(--f-data); font-size: 1.2rem; }
.rc-faq details[open] summary::after { content: "–"; }
.rc-faq details p { color: var(--muted); font-size: .92rem; line-height: 1.7; padding-bottom: 1rem; }
.rc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; align-items: start; }
@media (max-width: 900px) { .rc-two { grid-template-columns: 1fr; } }

/* ---------- 6. Hub cards ---------- */
.rc-hub-tools { display: grid; gap: 1rem; justify-items: center; margin-top: 1.5rem; }
.rc-search { position: relative; width: min(560px, 100%); }
.rc-search i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.rc-search input { min-height: 50px; padding-left: 2.6rem; border-radius: 999px; font-size: 1rem; background: var(--graphite); }
.rc-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; }
.rc-chip { min-height: 40px; padding: .45rem .95rem; border-radius: 999px; border: 1px solid var(--line); color: var(--silver); font-weight: 600; font-size: .82rem; background: transparent; cursor: pointer; }
.rc-chip:hover { border-color: var(--red); color: var(--white); }
.rc-chip[aria-pressed="true"] { background: var(--grad-red); border-color: transparent; color: #fff; }
.rc-hubtabs { display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap; }
.rc-hubtab { min-height: 48px; padding: .6rem 1.4rem; border-radius: 999px; border: 1px solid var(--line); color: var(--silver); font-weight: 700; font-size: .95rem; background: transparent; cursor: pointer; display: inline-flex; align-items: center; gap: .5rem; }
.rc-hubtab[aria-selected="true"] { background: var(--white); color: var(--ink); border-color: transparent; }
.rc-section { scroll-margin-top: 100px; }
.rc-section + .rc-section { margin-top: 2.6rem; }
.rc-section__head { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.rc-section__head h2 { font-family: var(--f-display); font-size: clamp(1.35rem, 2.8vw, 1.7rem); color: var(--white); font-weight: 600; }
.rc-section__head h3 { font-family: var(--f-display); font-size: 1.25rem; color: var(--white); font-weight: 600; }
.rc-section__head .rc-count { font-family: var(--f-data); font-size: .76rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.rc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .9rem; }
.rc-ccard { position: relative; display: flex; gap: .9rem; align-items: flex-start; padding: 1.05rem 1.1rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--graphite); color: inherit; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; min-width: 0; }
a.rc-ccard:hover { transform: translateY(-3px); border-color: rgba(225,27,46,.55); box-shadow: var(--shadow-card); }
.rc-ccard__ico { flex: none; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: rgba(225,27,46,.12); color: var(--red); border: 1px solid rgba(225,27,46,.25); font-size: 1rem; }
.rc-ccard__body { min-width: 0; flex: 1; }
.rc-ccard h3 { font-family: var(--f-body); font-size: .98rem; font-weight: 700; color: var(--white); line-height: 1.3; }
.rc-ccard p { font-size: .84rem; color: var(--help); margin-top: .3rem; line-height: 1.5; }
.rc-badge { display: inline-block; margin-top: .55rem; font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: .28rem .55rem; border-radius: 999px; border: 1px solid var(--line); color: var(--help); background: var(--char); white-space: nowrap; }
.rc-badge--live { background: var(--grad-red); color: #fff; border-color: transparent; }
.rc-ccard--soon { opacity: .72; }
.rc-ccard--soon .rc-ccard__ico { background: var(--char); color: var(--muted); border-color: var(--line); }
.rc-flagships { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.1rem; }
.rc-flag { display: flex; flex-direction: column; gap: .6rem; padding: 1.4rem 1.4rem 1.5rem; border-radius: var(--radius); border: 1px solid var(--line); background: radial-gradient(420px 200px at 12% 0%, rgba(225,27,46,.10), transparent 70%), var(--graphite); transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.rc-flag:hover { transform: translateY(-4px); border-color: var(--red); box-shadow: var(--shadow-card); }
.rc-flag__kicker { font-family: var(--f-data); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--red); }
.rc-flag h3 { font-family: var(--f-display); font-size: 1.35rem; color: var(--white); font-weight: 600; }
.rc-flag p { color: var(--muted); font-size: .9rem; }
.rc-flag__go { margin-top: auto; font-weight: 700; font-size: .86rem; color: var(--red); display: inline-flex; align-items: center; gap: .45rem; }
.rc-empty { text-align: center; color: var(--muted); padding: 2rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius); }
.rc-hub-note { text-align: center; color: var(--faint); font-size: .82rem; max-width: 760px; margin-inline: auto; }
[hidden] { display: none !important; }

/* ---------- 7. Flagship components (lc-*, from css/loan-tools.css) ---------- */
.lc-wrap { display:grid; grid-template-columns:minmax(300px,370px) 1fr; gap:1.6rem; align-items:start; }
@media (max-width:900px){ .lc-wrap { grid-template-columns:1fr; } .lc-inputs { position:static !important; } }
.lc-wrap > div { min-width:0; }
.lc-inputs { background:var(--graphite); border:1px solid var(--line); border-radius:var(--radius); padding:1.5rem; position:sticky; top:88px; box-shadow:var(--shadow-card); }
.lc-card { background:var(--graphite); border:1px solid var(--line); border-radius:var(--radius); padding:1.4rem 1.45rem; min-width:0; }
.lc-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:.9rem; }
.lc-grid--2 { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:1.2rem; }
.lc-stack > * + * { margin-top:1.4rem; }
.lc-k { font-size:.72rem; font-weight:700; letter-spacing:.09em; text-transform:uppercase; color:var(--muted); margin-bottom:.45rem; }
.lc-v { font-family:var(--f-data); font-weight:700; font-size:1.4rem; color:var(--white); line-height:1.15; overflow-wrap:anywhere; }
.lc-v--red { color:var(--red); }
.lc-v--xl { font-size:clamp(1.9rem,4vw,2.6rem); color:var(--gold-ink); }
.lc-note { font-size:.76rem; color:var(--faint); margin-top:.35rem; line-height:1.5; }
.lc-p { color:var(--muted); font-size:.88rem; line-height:1.6; max-width:66ch; margin-bottom:1rem; }
.lc-h { font-family:var(--f-display); font-size:1.3rem; color:var(--white); font-weight:600; margin-bottom:.8rem; }
.lc-h--sm { font-size:1.1rem; }
.lc-head { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:.7rem; margin-bottom:1rem; }
.lc-head .lc-h { margin:0; }
@media (max-width:520px){
  .lc-grid { grid-template-columns:1fr 1fr; gap:.6rem; }
  .lc-grid > .lc-card { padding:1rem; }
  .lc-grid .lc-v { font-size:1.08rem; }
  .lc-inputs, .lc-card { padding:1.15rem; }
}
.lc-pill { white-space:nowrap; min-height:40px; padding:.5rem .95rem; border-radius:999px; border:1px solid var(--line); background:transparent; color:var(--silver); font-weight:600; font-size:.82rem; cursor:pointer; transition:.25s var(--ease); font-family:var(--f-body); }
.lc-pill:hover { border-color:var(--red); color:var(--white); }
.lc-pill.is-on { background:var(--grad-red); color:#fff; border-color:transparent; }
.lc-pill:disabled { opacity:.45; cursor:not-allowed; }
.lc-row { display:flex; flex-wrap:wrap; gap:.45rem; }
.lc-mini { display:inline-flex; gap:.3rem; background:var(--char); border:1px solid var(--line); border-radius:999px; padding:.25rem; flex-wrap:wrap; }
.lc-mini button { min-height:36px; padding:.4rem .8rem; border-radius:999px; border:0; background:transparent; color:var(--muted); font-weight:600; font-size:.78rem; cursor:pointer; font-family:var(--f-body); }
.lc-mini button.is-on { background:var(--white); color:var(--ink); }
.lc-input { width:100%; min-height:44px; padding:.6rem .8rem; border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--char); color:var(--white); font-family:var(--f-data); font-weight:600; font-size:.95rem; }
.lc-select { width:100%; padding:.6rem .75rem; border-radius:var(--radius-sm); font-size:.9rem; font-family:var(--f-body); font-weight:600; }
.lc-select--sm { width:auto; min-height:40px; padding:.45rem .7rem; border-radius:999px; font-size:.8rem; }
.lc-label { display:block; font-size:.8rem; color:var(--muted); margin-bottom:.3rem; }
.lc-label--strong { font-weight:600; color:var(--silver); font-size:.86rem; margin-bottom:.5rem; }
.lc-field { margin-bottom:1.35rem; }
.lc-field__top { display:flex; justify-content:space-between; align-items:flex-end; gap:.6rem; margin-bottom:.5rem; }
.lc-field__top label { font-size:.86rem; font-weight:600; color:var(--silver); line-height:1.35; }
.lc-field__top .val { font-family:var(--f-data); font-weight:700; color:var(--white); font-size:1rem; white-space:nowrap; }
.lc-words { font-size:.76rem; color:var(--muted); font-family:var(--f-data); margin-top:.3rem; }
.lc-2col { display:grid; grid-template-columns:1fr 1fr; gap:.5rem; }
.lc-adv { border-top:1px dashed var(--line); padding-top:1.1rem; }
.lc-tile { background:var(--char); border-radius:12px; padding:.9rem 1rem; min-width:0; }
.lc-tile .lc-v { font-size:1.05rem; }
.lc-table-wrap { overflow-x:auto; }
.lc-table { width:100%; border-collapse:collapse; }
.lc-table th { font-size:.7rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); padding:.6rem .5rem; border-bottom:1px solid var(--line); white-space:nowrap; text-align:right; }
.lc-table th:first-child, .lc-table td:first-child { text-align:left; }
.lc-table td { font-family:var(--f-data); font-size:.84rem; color:var(--silver); padding:.55rem .5rem; border-bottom:1px solid var(--graphite-2); text-align:right; white-space:nowrap; }
.lc-table td.k { font-family:var(--f-body); color:var(--silver); }
.lc-table td.hi, .lc-table th.hi { color:var(--white); font-weight:700; }
.lc-table td.int { color:var(--red); font-weight:600; }
.lc-table td.good { color:var(--white); font-weight:700; }
.lc-table tr.is-cur td { background:rgba(225,27,46,.07); }
.lc-table tr.is-best td { background:rgba(201,162,75,.14); }
.lc-table td.cell-cur { background:rgba(225,27,46,.12); color:var(--white); font-weight:700; box-shadow:inset 0 0 0 1px rgba(225,27,46,.45); }
.lc-table td.cell-na { color:var(--faint); }
.lc-table input.lc-cell { min-height:38px; width:100%; min-width:84px; padding:.4rem .5rem; text-align:right; font-family:var(--f-data); font-size:.86rem; background:var(--char); }
.lc-scroll { max-height:440px; overflow-y:auto; }
.lc-pager { display:flex; justify-content:space-between; align-items:center; gap:1rem; margin-top:1rem; flex-wrap:wrap; }
.lc-chart { position:relative; height:260px; }
.lc-chart--tall { height:300px; }
.lc-legend { display:flex; flex-wrap:wrap; gap:.9rem; font-size:.76rem; color:var(--muted); margin-top:.6rem; }
.lc-legend span { display:inline-flex; align-items:center; gap:.4rem; }
.lc-legend i { width:12px; height:12px; border-radius:3px; display:inline-block; }
.lc-alert { background:rgba(225,27,46,.08); border:1px solid rgba(225,27,46,.35); border-radius:var(--radius-sm); padding:.85rem .95rem; }
.lc-alert p { color:var(--red-bright); font-size:.8rem; font-weight:600; margin-bottom:.25rem; }
[data-theme="light"] .lc-alert p { color:#b3121f; }
.lc-alert p:last-child { margin-bottom:0; }
.lc-banner { display:flex; gap:.9rem; align-items:flex-start; border-radius:var(--radius); padding:1.1rem 1.2rem; border:1px solid var(--line); background:var(--char); }
.lc-banner > i { font-size:1.15rem; margin-top:.15rem; color:var(--muted); }
.lc-banner strong { display:block; color:var(--white); font-size:1rem; margin-bottom:.2rem; }
.lc-banner p { color:var(--muted); font-size:.86rem; line-height:1.55; margin:0; }
.lc-banner--good { border-color:rgba(201,162,75,.55); background:rgba(201,162,75,.10); }
.lc-banner--good > i { color:var(--gold-ink); }
.lc-banner--bad { border-color:rgba(225,27,46,.4); background:rgba(225,27,46,.06); }
.lc-banner--bad > i { color:var(--red); }
.lc-banner--info > i { color:var(--red); }
.lc-bar { display:flex; height:16px; border-radius:999px; overflow:hidden; background:var(--graphite-2); gap:2px; }
.lc-bar span { display:block; height:100%; }
.lc-bar .b-exist { background:var(--slate); }
.lc-bar .b-new { background:var(--red); }
.lc-bar .b-free { background:var(--gold); opacity:.55; }
.lc-steps { list-style:none; counter-reset:s; padding:0; margin:0; }
.lc-steps li { counter-increment:s; display:grid; grid-template-columns:34px 1fr auto; gap:.8rem; align-items:baseline; padding:.85rem 0; border-bottom:1px dashed var(--line); }
.lc-steps li:last-child { border-bottom:0; }
.lc-steps li::before { content:counter(s); width:26px; height:26px; border-radius:50%; display:grid; place-items:center; background:var(--char); border:1px solid var(--line); font-family:var(--f-data); font-size:.78rem; font-weight:700; color:var(--white); }
.lc-steps .t { color:var(--silver); font-size:.9rem; }
.lc-steps .t small { display:block; color:var(--faint); font-size:.76rem; margin-top:.2rem; }
.lc-steps .v { font-family:var(--f-data); font-weight:700; color:var(--white); white-space:nowrap; }
.lc-steps li.is-final .v { color:var(--red); font-size:1.15rem; }
@media (max-width:520px){ .lc-steps li { grid-template-columns:30px 1fr; } .lc-steps .v { grid-column:2; } }
.lc-edit { background:var(--char); border-radius:12px; padding:.8rem .85rem; }
.lc-edit__row { display:grid; grid-template-columns:110px minmax(120px,1fr) 150px 40px; gap:.6rem; align-items:end; }
.lc-edit__row + .lc-edit__row { margin-top:.7rem; padding-top:.7rem; border-top:1px dashed var(--line); }
.lc-edit__row .lc-input, .lc-edit__row .lc-select { padding:.55rem .65rem; font-size:.88rem; }
.lc-edit__x { width:40px; height:40px; border-radius:50%; border:1px solid var(--line); background:transparent; color:var(--muted); cursor:pointer; }
.lc-edit__x:hover { border-color:var(--red); color:var(--red); }
@media (max-width:560px){ .lc-edit__row { grid-template-columns:1fr 1fr; } }
/* Inside the narrow input panel, prepayment rows wrap onto two lines */
.lc-inputs .lc-edit__row { grid-template-columns:1fr 1fr; }
.lc-inputs .lc-edit__row .lc-edit__x { justify-self:end; }
/* Quick pages with wide table inputs: inputs on top, results below */
.rc-wrap--stack { grid-template-columns:1fr; }
.rc-wrap--stack .rc-inputs { position:static; }
.rc-wrap--stack .rc-etable input { min-width:90px; }
.lc-co { display:grid; grid-template-columns:1fr 78px 40px; gap:.5rem; align-items:end; }
.lc-co + .lc-co { margin-top:.6rem; }
.lc-tabs { margin-bottom:1.4rem; }

/* ---------- 8. Print ---------- */
.lc-report { display:none; }
.lc-report h2 { font-family:var(--f-display); font-size:1.5rem; color:#14141a; margin-bottom:.2rem; }
.lc-report h3 { font-family:var(--f-display); font-size:1.1rem; color:#14141a; margin:1.4rem 0 .5rem; }
.lc-report .rp-brand { font-family:var(--f-data); font-size:.72rem; letter-spacing:.2em; text-transform:uppercase; color:#e11b2e; margin-bottom:.8rem; }
.lc-report .rp-meta { font-size:.8rem; color:#6d6d78; margin-bottom:1rem; }
.lc-report table { width:100%; border-collapse:collapse; font-size:.78rem; }
.lc-report th, .lc-report td { border-bottom:1px solid #dcd8d0; padding:.35rem .4rem; text-align:right; color:#14141a; }
.lc-report th:first-child, .lc-report td:first-child { text-align:left; }
.lc-report th { font-size:.68rem; text-transform:uppercase; letter-spacing:.05em; color:#6d6d78; }
.lc-report .rp-legal { margin-top:1.4rem; font-size:.7rem; color:#6d6d78; line-height:1.55; }
.rc-print-head { display: none; }
@media print {
  :root, [data-theme] { --ink:#fff; --char:#f4f3f0; --graphite:#fff; --graphite-2:#e7e4dd; --line:#cfcac0; --white:#14141a; --silver:#33333b; --muted:#55555f; --faint:#6b6b75; --gold-ink:#7a5d1d; }
  body, [data-theme] body { background:#fff !important; color:#14141a; }
  body::before, body::after { display:none !important; }
  .loader, .nav, .drawer, .page-hero, .footer, .fab, .to-top, .mobile-cta, .cta-band, .rc-tabbar, .rc-noprint, .rc-related, .rc-how, .rc-faq, .rc-inputs .rc-help, .rc-share, input[type="range"] { display:none !important; }
  .rc-print-head { display:block; margin-bottom:1rem; }
  .rc-print-head p { font-family:var(--f-data); font-size:.72rem; letter-spacing:.2em; text-transform:uppercase; color:#e11b2e; }
  .rc-print-head h1 { font-family:var(--f-display); font-size:1.6rem; color:#14141a; }
  .rc-main { padding:0; }
  .rc-wrap { grid-template-columns:1fr 1.3fr; }
  .rc-panel, .rc-card, .rc-working { box-shadow:none; break-inside:avoid; }
  .rc-working > summary { display:none; }
  .rc-working .rc-working__body { display:block !important; }
  .rc-table-wrap { max-height:none; overflow:visible; }
  .rc-table th { position:static; }
  .rc-table tr { break-inside:avoid; }
  body.rc-flagship .rc-main > .container > *:not(.lc-report):not(.rc-disclaimer) { display:none !important; }
  .lc-report { display:block !important; }
}
