/* AKJ PaisaGyan - playful skin for every calculator page and the /calculators listing.
   Per calculator the PHP sets --cs-a / --cs-b (two colours) and --cs-ar (the first as "r,g,b") from config/calculator-art.php.
   Everything below only changes colour, shape, shadow and motion: no layout rules for the calculators themselves, so every calculator keeps working.
   Surfaces use Bootstrap theme variables, so light / dark / sepia / ocean follow. All motion is off under prefers-reduced-motion. */
@keyframes cs-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes cs-pop { 0% { transform: scale(1); } 35% { transform: scale(1.09); } 100% { transform: scale(1); } }
@keyframes cs-float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-12px) rotate(4deg); } }
@keyframes cs-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes cs-grad { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes cs-shine { to { transform: translateX(260%) skewX(-18deg); } }
@keyframes cs-spin { to { transform: rotate(360deg); } }
@keyframes cs-burst { 0% { opacity: 0; transform: translate(0, 0) scale(.5); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(var(--r)); } }
@keyframes cs-bubble { 0% { opacity: 0; transform: scale(.7) translateY(8px); } 100% { opacity: 1; transform: none; } }

/* ---------- hero ---------- */
html .cs-hero.faq-hero-section { position: relative; overflow: hidden; isolation: isolate; padding: 18px 0 58px !important; color: #fff;
    background: linear-gradient(120deg, var(--cs-ha, var(--cs-a, #4f46e5)), var(--cs-hb, var(--cs-b, #db2777)), var(--cs-ha, var(--cs-a, #4f46e5))) !important; }
.cs-hero .container { position: relative; z-index: 2; }
.cs-orb { position: absolute; z-index: 0; border-radius: 50%; pointer-events: none; background: radial-gradient(circle at 40% 40%, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0) 70%); }
.cs-orb1 { width: 320px; height: 320px; right: -90px; top: -120px; animation: cs-bob 9s ease-in-out infinite; } .cs-orb2 { width: 240px; height: 240px; left: -70px; bottom: -110px; animation: cs-bob 11s -3s ease-in-out infinite; }
.cs-hero-grid { display: grid; gap: 18px; align-items: center; }
@media (min-width: 860px) { .cs-hero-grid { grid-template-columns: 1.15fr 1fr; gap: 30px; } }
.cs-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 6px; border-radius: 999px; font-size: .78rem; font-weight: 800; background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .4); backdrop-filter: blur(4px); }
.cs-chip-e { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255, 255, 255, .85); font-size: 1rem; }
html .cs-hero.faq-hero-section h1 { font-size: clamp(1.5rem, 3.4vw, 2.3rem) !important; font-weight: 800; margin: 10px 0 6px !important; color: #fff !important; text-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
html .cs-hero.faq-hero-section .cs-sub { font-size: 1rem !important; color: rgba(255, 255, 255, .92) !important; max-width: 640px; margin: 0 0 12px !important; }
.cs-hero .breadcrumb { --bs-breadcrumb-divider-color: rgba(255, 255, 255, .55); }
.cs-hero .breadcrumb a { color: rgba(255, 255, 255, .85) !important; }
.cs-tip { display: flex; align-items: flex-start; gap: 10px; max-width: 600px; margin-top: 6px; }
.cs-mascot { flex: 0 0 auto; display: inline-flex; width: 46px; height: 46px; align-items: center; justify-content: center; border-radius: 50%; font-size: 1.6rem; background: linear-gradient(135deg, #fde68a, #fbcfe8); border: 2px solid #fff; overflow: hidden; box-shadow: 0 6px 14px rgba(0, 0, 0, .22); animation: cs-bob 2.6s ease-in-out infinite; }
.cs-mascot img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.cs-bubble { position: relative; padding: 9px 14px; border-radius: 4px 18px 18px 18px; background: #fff; color: #1f2937; font-size: .9rem; font-weight: 600; box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .5); animation: cs-bubble .6s .35s both; }
.cs-bubble b { display: block; font-size: .7rem; letter-spacing: .03em; color: var(--cs-a, #4f46e5); }
.cs-hero-art { position: relative; min-height: 150px; border-radius: 26px; }
.cs-art-img { display: block; width: 100%; height: auto; max-height: 300px; object-fit: cover; border-radius: 26px; border: 3px solid rgba(255, 255, 255, .6); box-shadow: 0 24px 40px -24px rgba(0, 0, 0, .6); animation: cs-float 7s ease-in-out infinite; }
.cs-art-fb { position: relative; height: 190px; border-radius: 26px; background: rgba(255, 255, 255, .16); border: 2px dashed rgba(255, 255, 255, .5); overflow: hidden; }
.cs-art-fb::before { content: ""; position: absolute; width: 150px; height: 150px; left: 50%; top: 50%; margin: -75px 0 0 -75px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 70%); animation: cs-bob 5s ease-in-out infinite; }
.cs-fe { position: absolute; font-size: 3.4rem; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .25)); animation: cs-float 5s ease-in-out infinite; }
.cs-fe1 { left: 12%; top: 22%; } .cs-fe2 { left: 40%; top: 36%; font-size: 4.4rem; animation-delay: -1.6s; } .cs-fe3 { right: 10%; top: 18%; animation-delay: -3.2s; }
.cs-coin { position: absolute; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fef08a, #f59e0b); border: 2px solid #d97706; box-shadow: 0 3px 6px rgba(0, 0, 0, .25); animation: cs-float 4s ease-in-out infinite; } .cs-coin:nth-of-type(4) { left: 6%; bottom: 14%; animation-delay: -.8s; } .cs-coin:nth-of-type(5) { right: 24%; bottom: 10%; animation-delay: -2s; } .cs-coin:nth-of-type(6) { left: 58%; top: 8%; animation-delay: -2.8s; }
.cs-wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 38px; z-index: 1; display: block; } .cs-wave path { fill: var(--cs-bg, #fff); }

/* ---------- page body ---------- */
.calc-skin { --bs-primary: var(--cs-a, #4f46e5); --bs-primary-rgb: var(--cs-ar, 79, 70, 229); --bs-link-color: var(--cs-a, #4f46e5); --bs-link-color-rgb: var(--cs-ar, 79, 70, 229); }
.calc-skin .card { border-radius: 22px; border: 1px solid var(--cs-line) !important; box-shadow: 0 16px 30px -24px rgba(0, 0, 0, .55) !important; animation: cs-in .55s both; }
.calc-skin .row > [class*="col"] > .card, .calc-skin > .card { border-top: 5px solid var(--cs-a) !important; }
.calc-skin .row > [class*="col"]:nth-child(2) > .card { animation-delay: .08s; } .calc-skin .row > [class*="col"]:nth-child(3) > .card { animation-delay: .16s; }
.calc-skin .card .card { border-radius: 16px; box-shadow: none !important; animation: none; }
.calc-skin .card h5.fw-700, .calc-skin .card h4.fw-700, .calc-skin .card h3.fw-700 { display: flex; align-items: center; gap: 10px; }
.calc-skin .card h5.fw-700::before, .calc-skin .card h4.fw-700::before, .calc-skin .card h3.fw-700::before { content: ""; flex: 0 0 auto; width: 8px; height: 24px; border-radius: 6px; background: linear-gradient(var(--cs-a), var(--cs-b)); }
.calc-skin .form-control, .calc-skin .form-select { border: 2px solid var(--cs-line); border-radius: 14px; font-weight: 600; transition: border-color .2s, box-shadow .2s; }
.calc-skin .form-control:focus, .calc-skin .form-select:focus { border-color: var(--cs-a); box-shadow: 0 0 0 4px rgba(var(--cs-ar), .18); }
.calc-skin .input-group > .form-control, .calc-skin .input-group > .form-select { border-radius: 14px; } .calc-skin .input-group > :not(:first-child):not(.dropdown-menu) { border-top-left-radius: 0; border-bottom-left-radius: 0; } .calc-skin .input-group > :not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.calc-skin .form-label { font-weight: 700; }
.calc-skin .form-check-input:checked { background-color: var(--cs-a); border-color: var(--cs-a); }
.calc-skin .form-check-input:focus { box-shadow: 0 0 0 4px rgba(var(--cs-ar), .18); border-color: var(--cs-a); }

/* sliders: coloured fill (--rng set by calc-skin.js), big round thumb */
.calc-skin .form-range { height: 28px; background: transparent; }
.calc-skin .form-range::-webkit-slider-runnable-track { height: 10px; border-radius: 10px; background: linear-gradient(90deg, var(--cs-a), var(--cs-b)) 0 / var(--rng, 50%) 100% no-repeat, var(--cs-soft); }
.calc-skin .form-range::-moz-range-track { height: 10px; border-radius: 10px; background: var(--cs-soft); }
.calc-skin .form-range::-moz-range-progress { height: 10px; border-radius: 10px; background: linear-gradient(90deg, var(--cs-a), var(--cs-b)); }
.calc-skin .form-range::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -8px; border-radius: 50%; background: #fff; border: 5px solid var(--cs-a); box-shadow: 0 6px 12px rgba(0, 0, 0, .28); transition: transform .15s; }
.calc-skin .form-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 5px solid var(--cs-a); box-shadow: 0 6px 12px rgba(0, 0, 0, .28); }
.calc-skin .form-range:hover::-webkit-slider-thumb, .calc-skin .form-range:active::-webkit-slider-thumb { transform: scale(1.18); }
.calc-skin .form-range:focus { box-shadow: none; } .calc-skin .form-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(var(--cs-ar), .3); }

/* buttons */
.calc-skin .btn { border-radius: 999px; font-weight: 700; transition: transform .2s, box-shadow .2s; }
.calc-skin .btn:hover { transform: translateY(-2px); } .calc-skin .btn:active { transform: scale(.97); }
.calc-skin .btn-primary { position: relative; overflow: hidden; border: 0; background: linear-gradient(120deg, var(--cs-a), var(--cs-b)); box-shadow: 0 12px 22px -12px var(--cs-a); }
.calc-skin .btn-primary::after { content: ""; position: absolute; top: 0; left: -60%; width: 35%; height: 100%; background: rgba(255, 255, 255, .35); transform: skewX(-18deg); animation: cs-shine 3.6s infinite; pointer-events: none; }
.calc-skin .btn-outline-primary { color: var(--cs-a); border: 2px solid var(--cs-a); background: transparent; } .calc-skin .btn-outline-primary:hover { color: #fff; background: linear-gradient(120deg, var(--cs-a), var(--cs-b)); border-color: transparent; }
.calc-skin .btn:focus-visible, .calc-skin a:focus-visible, .calc-skin summary:focus-visible { outline: 3px solid var(--cs-a); outline-offset: 2px; }
.calc-skin .btn-sm { border-radius: 999px; }

/* numbers, tables, tabs, bars */
.calc-skin .display-4.text-primary, .calc-skin .display-5.text-primary, .calc-skin .display-6.text-primary { background: linear-gradient(120deg, var(--cs-a), var(--cs-b)); -webkit-background-clip: text; background-clip: text; color: transparent !important; -webkit-text-fill-color: transparent; }
.cs-pop { animation: cs-pop .55s ease; }
.calc-skin .table { --bs-table-bg: transparent; } .calc-skin .table thead th, .calc-skin .table > thead > tr > th { background: rgba(var(--cs-ar), .12); border-bottom: 2px solid rgba(var(--cs-ar), .35); }
.calc-skin .table-responsive { border-radius: 16px; } .calc-skin .table tbody tr { transition: background .15s; } .calc-skin .table tbody tr:hover { background: rgba(var(--cs-ar), .07); }
.calc-skin .nav-tabs { border-bottom: 0; gap: 6px; flex-wrap: wrap; } .calc-skin .nav-tabs .nav-link, .calc-skin .nav-pills .nav-link { border-radius: 999px; border: 2px solid var(--cs-line); font-weight: 700; color: var(--cs-text); }
.calc-skin .nav-tabs .nav-link.active, .calc-skin .nav-pills .nav-link.active { color: #fff; border-color: transparent; background: linear-gradient(120deg, var(--cs-a), var(--cs-b)); }
.calc-skin .progress { height: 12px; border-radius: 10px; } .calc-skin .progress-bar { background: linear-gradient(90deg, var(--cs-a), var(--cs-b)); }
.calc-skin .badge.bg-primary { background: linear-gradient(120deg, var(--cs-a), var(--cs-b)) !important; }
.calc-skin .accordion-item { border-radius: 16px !important; overflow: hidden; margin-bottom: 8px; border: 1px solid var(--cs-line); }
.calc-skin .accordion-button:not(.collapsed) { color: var(--cs-a); background: rgba(var(--cs-ar), .1); box-shadow: none; }
.calc-skin .alert { border-radius: 18px; }
.calc-skin .calc-toolbar { padding: 8px 10px; border-radius: 18px; background: rgba(var(--cs-ar), .08); border: 1px dashed rgba(var(--cs-ar), .4); }
.calc-skin .calc-disclaimer { padding: 6px 12px; border-left: 4px solid var(--cs-a); border-radius: 0 10px 10px 0; background: rgba(var(--cs-ar), .05); }
.calc-skin #calc-history { margin-top: 6px; }

/* the "all calculators" strip at the foot of every calculator page */
.calc-skin .calc-circle-tile { transition: transform .25s; } .calc-skin .calc-circle-tile:hover { transform: translateY(-5px) rotate(-1deg); }
.calc-skin .calc-icon-circle { animation: cs-bob 4s ease-in-out infinite; }

/* result burst (coins when a result changes) */
.cs-burst { position: fixed; z-index: 1086; pointer-events: none; font-size: 18px; animation: cs-burst .95s ease-out forwards; }

/* ---------- /calculators listing ---------- */
.cs-index .cs-hero-grid { padding-bottom: 6px; }
.cs-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; } .cs-stats span { padding: 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 800; background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .4); }
.cs-search { max-width: 540px; } .cs-search .form-control { border: 0; border-radius: 999px 0 0 999px !important; padding-left: 20px; } .cs-search .btn { border-radius: 0 999px 999px 0 !important; font-weight: 800; color: #1f2937; background: #fde047; border: 0; } .cs-search .btn::after { display: none; }
.cs-catnav { position: sticky; top: 0; z-index: 20; padding: 10px 0; margin: -6px 0 18px; background: linear-gradient(var(--cs-bg) 75%, transparent); }
.cs-catbtn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 2px solid var(--cs-line); background: var(--cs-card); color: var(--cs-text); font-weight: 800; font-size: .85rem; cursor: pointer; transition: transform .2s, border-color .2s, background .2s; }
.cs-catbtn:hover { transform: translateY(-2px); border-color: var(--cc); } .cs-catbtn[aria-pressed="true"] { color: #fff; border-color: transparent; background: var(--cc); }
.cs-catbtn i { color: var(--cc); } .cs-catbtn[aria-pressed="true"] i { color: #fff; } .cs-catbtn small { opacity: .75; font-weight: 700; }
.cs-group { margin-bottom: 38px; } .cs-group[hidden], .cs-card-col[hidden] { display: none !important; }
.cs-ghead { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; animation: cs-in .5s both; }
.cs-gico { display: inline-flex; flex: 0 0 auto; width: 52px; height: 52px; align-items: center; justify-content: center; border-radius: 18px; font-size: 1.5rem; color: #fff; background: linear-gradient(135deg, var(--cc), color-mix(in srgb, var(--cc) 55%, #ec4899)); box-shadow: 0 12px 20px -12px var(--cc); animation: cs-bob 4s ease-in-out infinite; }
.cs-ghead h2 { margin: 0; font-size: 1.35rem; font-weight: 800; } .cs-ghead p { margin: 0; font-size: .85rem; color: var(--cs-muted); } .cs-gcount { margin-left: auto; padding: 3px 12px; border-radius: 999px; font-size: .78rem; font-weight: 800; color: var(--cc); background: color-mix(in srgb, var(--cc) 14%, transparent); }
.cs-ccard { position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 22px; text-decoration: none; color: var(--cs-text); background: var(--cs-card); border: 1px solid var(--cs-line); box-shadow: 0 14px 26px -22px rgba(0, 0, 0, .6); transition: transform .3s cubic-bezier(.3, 1.4, .5, 1), box-shadow .3s; animation: cs-in .5s both; animation-delay: calc(var(--i, 0) * 45ms); }
.cs-ccard:hover, .cs-ccard:focus-visible { transform: translateY(-8px) rotate(-.6deg); box-shadow: 0 26px 38px -22px var(--cs-a); color: var(--cs-text); outline: none; }
.cs-ccard:focus-visible { outline: 3px solid var(--cs-a); outline-offset: 2px; }
.cs-cart { position: relative; height: 118px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: linear-gradient(120deg, var(--cs-a), var(--cs-b)); }
.cs-cart img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; } .cs-ccard:hover .cs-cart img { transform: scale(1.08); }
.cs-cart .cs-ce { position: relative; font-size: 2.1rem; margin: 0 6px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .25)); animation: cs-float 4.5s ease-in-out infinite; } .cs-cart .cs-ce:nth-child(2) { font-size: 2.8rem; animation-delay: -1.5s; } .cs-cart .cs-ce:nth-child(3) { animation-delay: -3s; }
.cs-cbody { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; flex: 1; } .cs-cname { font-weight: 800; line-height: 1.3; } .cs-ctag { font-size: .8rem; color: var(--cs-muted); }
.cs-cgo { margin-top: auto; padding-top: 8px; font-size: .8rem; font-weight: 800; color: var(--cs-a); display: inline-flex; align-items: center; gap: 4px; } .cs-cgo i { transition: transform .25s; } .cs-ccard:hover .cs-cgo i { transform: translateX(6px); }
.cs-empty { text-align: center; padding: 36px 10px; color: var(--cs-muted); } .cs-empty span { display: block; font-size: 3rem; animation: cs-bob 2s ease-in-out infinite; }
.cs-live { max-width: 540px; margin-top: 10px; } .cs-live .form-control { border-radius: 999px; border: 0; padding-left: 18px; }

@media (max-width: 575px) { html .cs-hero.faq-hero-section { padding-bottom: 50px !important; } .cs-art-fb { height: 150px; } .cs-fe { font-size: 2.6rem; } .cs-fe2 { font-size: 3.4rem; } .calc-skin .card { border-radius: 18px; } .cs-cart { height: 100px; } }
@media print { .cs-hero-art, .cs-tip, .cs-orb, .cs-wave, .cs-burst { display: none !important; } html .cs-hero.faq-hero-section { background: none !important; padding: 0 !important; animation: none; } .calc-skin .card { animation: none; box-shadow: none !important; } }
@media (prefers-reduced-motion: reduce) { .cs-hero, .cs-hero *, .calc-skin .card, .calc-skin .btn-primary::after, .calc-skin .calc-icon-circle, .cs-ccard, .cs-ccard *, .cs-ghead, .cs-ghead *, .cs-pop, .cs-burst { animation: none !important; } .cs-burst { display: none; } .calc-skin .btn, .cs-ccard, .cs-catbtn { transition: none; } }

/* ================= v2: compact hero, direction feedback, chart life, formula box ================= */
@keyframes cs-delta { 0% { opacity: 0; transform: translateY(6px) scale(.8); } 15% { opacity: 1; transform: translateY(0) scale(1.08); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-26px) scale(1); } }
@keyframes cs-glow-up { 0% { filter: drop-shadow(0 0 0 rgba(34, 197, 94, 0)); } 25% { filter: drop-shadow(0 0 12px rgba(34, 197, 94, .85)); } 100% { filter: drop-shadow(0 0 0 rgba(34, 197, 94, 0)); } }
@keyframes cs-glow-down { 0% { filter: drop-shadow(0 0 0 rgba(239, 68, 68, 0)); transform: translateY(0); } 20% { transform: translateY(3px); } 25% { filter: drop-shadow(0 0 12px rgba(239, 68, 68, .85)); } 100% { filter: drop-shadow(0 0 0 rgba(239, 68, 68, 0)); transform: none; } }
@keyframes cs-chart-pulse { 0% { transform: scale(1); filter: none; } 35% { transform: scale(1.018); filter: drop-shadow(0 8px 14px rgba(var(--cs-ar, 79, 70, 229), .35)); } 100% { transform: scale(1); filter: none; } }
@keyframes cs-chart-reveal { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }

/* compact hero on calculator pages (the /calculators listing keeps the big one) */
html .cs-hero.faq-hero-section:not(.cs-index) { padding: 8px 0 30px !important; }
.cs-hero:not(.cs-index) nav.mb-2 { margin-bottom: 2px !important; }
.cs-hero:not(.cs-index) .cs-hero-grid { gap: 8px; }
@media (min-width: 860px) { .cs-hero:not(.cs-index) .cs-hero-grid { grid-template-columns: 1fr 230px; gap: 20px; } }
@media (max-width: 859px) { .cs-hero:not(.cs-index) .cs-hero-art { display: none; } }
html .cs-hero.faq-hero-section:not(.cs-index) h1 { font-size: clamp(1.2rem, 2.4vw, 1.65rem) !important; margin: 6px 0 4px !important; }
html .cs-hero.faq-hero-section:not(.cs-index) .cs-sub { font-size: .9rem !important; margin: 0 0 8px !important; }
.cs-hero:not(.cs-index) .cs-chip { font-size: .72rem; padding: 3px 12px 3px 4px; } .cs-hero:not(.cs-index) .cs-chip-e { width: 22px; height: 22px; font-size: .85rem; }
.cs-hero:not(.cs-index) .cs-tip { margin-top: 2px; gap: 8px; } .cs-hero:not(.cs-index) .cs-mascot { width: 34px; height: 34px; font-size: 1.2rem; border-width: 2px; }
.cs-hero:not(.cs-index) .cs-bubble { padding: 5px 12px; font-size: .8rem; font-weight: 600; border-radius: 4px 14px 14px 14px; } .cs-hero:not(.cs-index) .cs-bubble b { font-size: .64rem; }
.cs-hero:not(.cs-index) .cs-art-img { max-height: 112px; border-radius: 18px; border-width: 2px; margin-left: auto; width: auto; max-width: 100%; }
.cs-hero:not(.cs-index) .cs-art-fb { height: 104px; border-radius: 18px; } .cs-hero:not(.cs-index) .cs-art-fb::before { width: 90px; height: 90px; margin: -45px 0 0 -45px; }
.cs-hero:not(.cs-index) .cs-fe { font-size: 2.1rem; } .cs-hero:not(.cs-index) .cs-fe2 { font-size: 2.8rem; } .cs-hero:not(.cs-index) .cs-coin { width: 12px; height: 12px; }
.cs-hero:not(.cs-index) .cs-wave { height: 22px; }
.cs-hero:not(.cs-index) .cs-orb1 { width: 200px; height: 200px; top: -90px; } .cs-hero:not(.cs-index) .cs-orb2 { width: 150px; height: 150px; bottom: -80px; }

/* "your recent calculations": now a card above the all-calculators strip */
.cs-history { margin-top: 1.5rem; padding: 12px 16px; border-radius: 20px; background: linear-gradient(135deg, rgba(var(--cs-ar, 79, 70, 229), .09), rgba(236, 72, 153, .08)); border: 1px dashed rgba(var(--cs-ar, 79, 70, 229), .4); }
.cs-history:empty { display: none; }
.cs-history > div:first-child { color: var(--cs-text) !important; font-weight: 800; font-size: .9rem !important; margin-bottom: .5rem !important; }
.cs-history > div:first-child::before { content: "🕘 "; }
.cs-history .btn-outline-light { color: var(--cs-text); background: var(--cs-card); border: 2px solid rgba(var(--cs-ar, 79, 70, 229), .35); border-radius: 999px; font-weight: 700; font-size: .8rem; transition: transform .2s, background .2s, color .2s; }
.cs-history .btn-outline-light:hover { color: #fff; border-color: transparent; background: linear-gradient(120deg, var(--cs-a, #4f46e5), var(--cs-b, #db2777)); transform: translateY(-2px); }

/* direction feedback on inputs and results (arrow + colour only say "went up" / "went down", not "good" / "bad") */
.calc-skin .form-range.cs-up::-webkit-slider-thumb { border-color: #22c55e; transform: scale(1.25); } .calc-skin .form-range.cs-down::-webkit-slider-thumb { border-color: #ef4444; transform: scale(1.25); }
.calc-skin .form-range.cs-up::-moz-range-thumb { border-color: #22c55e; } .calc-skin .form-range.cs-down::-moz-range-thumb { border-color: #ef4444; }
.calc-skin .form-control.cs-up, .calc-skin .form-select.cs-up { border-color: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .2); } .calc-skin .form-control.cs-down, .calc-skin .form-select.cs-down { border-color: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, .2); }
.cs-rbub { position: fixed; z-index: 1085; pointer-events: none; transform: translate(-50%, 0); padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 800; color: #fff; white-space: nowrap; background: var(--cs-a, #4f46e5); box-shadow: 0 8px 16px -6px rgba(0, 0, 0, .5); animation: cs-bubble .25s backwards; transition: opacity .3s; }
.cs-rbub::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: inherit; }
.cs-rbub.up { background: #16a34a; } .cs-rbub.down { background: #dc2626; } .cs-rbub.out { opacity: 0; }
.cs-delta { position: fixed; z-index: 1086; pointer-events: none; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 800; color: #fff; animation: cs-delta 1.6s ease-out forwards; box-shadow: 0 8px 16px -8px rgba(0, 0, 0, .5); }
.cs-delta.up { background: #16a34a; } .cs-delta.down { background: #dc2626; }
.cs-glow-up { animation: cs-glow-up .9s ease-out; } .cs-glow-down { animation: cs-glow-down .9s ease-out; }

/* charts: rise in when scrolled to, pulse when an input changes, lift on hover */
.calc-skin canvas { border-radius: 14px; transition: transform .3s, filter .3s; }
.calc-skin canvas:hover { filter: drop-shadow(0 12px 16px rgba(var(--cs-ar, 79, 70, 229), .28)); }
.calc-skin canvas.cs-pre { opacity: 0; transform: translateY(18px) scale(.94); }
.calc-skin canvas.cs-reveal { animation: cs-chart-reveal .7s cubic-bezier(.2, 1.2, .4, 1) both; }
.calc-skin canvas.cs-chart-pulse { animation: cs-chart-pulse .7s ease; }

/* "How this is calculated" box: soft blue-purple gradient */
html body .calc-trust { position: relative; overflow: hidden; border: 1px solid rgba(99, 102, 241, .35); border-radius: 20px; padding: 1rem 1.25rem; color: #1e1b4b;
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 45%, #f3e8ff 100%); box-shadow: 0 16px 30px -24px rgba(79, 70, 229, .7); }
html body .calc-trust::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: linear-gradient(#2563eb, #9333ea); }
html body .calc-trust h4 { color: #4338ca; } html body .calc-trust a { color: #4f46e5; } html body .calc-trust-meta { border-top-color: rgba(99, 102, 241, .4); }
html[data-theme="dark"] body .calc-trust, html[data-theme="ocean"] body .calc-trust { color: #e0e7ff; border-color: rgba(129, 140, 248, .45); background: linear-gradient(135deg, #1e3a8a 0%, #312e81 50%, #581c87 100%); }
html[data-theme="dark"] body .calc-trust h4, html[data-theme="ocean"] body .calc-trust h4 { color: #c7d2fe; } html[data-theme="dark"] body .calc-trust a, html[data-theme="ocean"] body .calc-trust a { color: #93c5fd; }
@media print { html body .calc-trust { background: #fff !important; color: #000 !important; } html body .calc-trust::before { display: none; } .cs-rbub, .cs-delta { display: none !important; } .calc-skin canvas.cs-pre { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .calc-skin canvas, .calc-skin canvas.cs-reveal, .calc-skin canvas.cs-chart-pulse, .cs-glow-up, .cs-glow-down, .cs-delta, .cs-rbub { animation: none !important; transition: none !important; } .calc-skin canvas.cs-pre { opacity: 1; transform: none; } }

/* page colours per site theme (the site's themes do not drive Bootstrap's own colour variables, so the skin carries its own) */
html { --cs-bg: #ffffff; --cs-card: #ffffff; --cs-text: #212529; --cs-muted: #6c757d; --cs-line: #dee2e6; --cs-soft: #e9ecef; }
html[data-theme="dark"] { --cs-bg: #0f1117; --cs-card: #1a1f2e; --cs-text: #e2e8f0; --cs-muted: #94a3b8; --cs-line: #2d3748; --cs-soft: #263043; }
html[data-theme="sepia"] { --cs-bg: #f5efe6; --cs-card: #fdf8f0; --cs-text: #3d2b1f; --cs-muted: #7a6350; --cs-line: #e0cdb3; --cs-soft: #eadcc6; }
html[data-theme="ocean"] { --cs-bg: #0b1929; --cs-card: #0f2035; --cs-text: #cdd9e5; --cs-muted: #8aa0b8; --cs-line: #1e3a5f; --cs-soft: #17304d; }
html[data-theme="sage"] { --cs-bg: #f0f4f1; --cs-card: #f8fbf8; --cs-text: #1c2b1e; --cs-muted: #5b7060; --cs-line: #c8ddc9; --cs-soft: #dce8dd; }
/* ---------- colours follow the site theme (Light / Dark / Sepia / Ocean / Sage): one accent pair each, no per-calculator colours ---------- */
html { --cs-a: #4f46e5; --cs-b: #c026d3; --cs-ar: 79, 70, 229; }
html[data-theme="dark"] { --cs-a: #8b5cf6; --cs-b: #ec4899; --cs-ar: 139, 92, 246; }
html[data-theme="sepia"] { --cs-a: #b45309; --cs-b: #be123c; --cs-ar: 180, 83, 9; }
html[data-theme="ocean"] { --cs-a: #0284c7; --cs-b: #0d9488; --cs-ar: 2, 132, 199; }
html[data-theme="sage"] { --cs-a: #0f766e; --cs-b: #0369a1; --cs-ar: 15, 118, 110; }
/* listing: the cards take turns in four other palettes so the grid stays colourful (the first card of every five uses the theme accent) */
.cs-card-col:nth-child(5n+2) .cs-ccard { --cs-a: #8b5cf6; --cs-b: #ec4899; } .cs-card-col:nth-child(5n+3) .cs-ccard { --cs-a: #d97706; --cs-b: #e11d48; }
.cs-card-col:nth-child(5n+4) .cs-ccard { --cs-a: #0284c7; --cs-b: #0d9488; } .cs-card-col:nth-child(5n+5) .cs-ccard { --cs-a: #6366f1; --cs-b: #c026d3; }

/* dark and ocean: a deeper, calmer hero and a dark speech bubble (the bright accent stays for buttons and numbers) */
html[data-theme="dark"] { --cs-ha: #3b2a8c; --cs-hb: #7a1d55; }
html[data-theme="ocean"] { --cs-ha: #0b4f7a; --cs-hb: #0b5e5a; }
html[data-theme="dark"] .cs-bubble, html[data-theme="ocean"] .cs-bubble { background: rgba(15, 23, 42, .82); color: #e2e8f0; border: 1px solid rgba(255, 255, 255, .18); }
html[data-theme="dark"] .cs-bubble b, html[data-theme="ocean"] .cs-bubble b { color: #c4b5fd; }
html[data-theme="dark"] .cs-hero.faq-hero-section, html[data-theme="ocean"] .cs-hero.faq-hero-section { box-shadow: inset 0 -30px 40px -30px rgba(0, 0, 0, .45); }
html[data-theme="dark"] .cs-art-fb, html[data-theme="ocean"] .cs-art-fb { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .3); }

/* straight bottom edge instead of the wave (no wave, so no page-colour seam in any theme) */
.cs-wave { display: none !important; }
html .cs-hero.faq-hero-section:not(.cs-index) { padding-bottom: 14px !important; }
html .cs-hero.faq-hero-section.cs-index { padding-bottom: 26px !important; }
@media (max-width: 575px) { html .cs-hero.faq-hero-section.cs-index { padding-bottom: 20px !important; } }

/* listing cards show a single icon */
.cs-cart .cs-ce.one { font-size: 3.2rem; margin: 0; animation: cs-float 4.5s ease-in-out infinite; }

/* regular-calculator button in the listing hero */
.cs-stats .cs-calc-btn { padding: 4px 14px; border-radius: 999px; font-size: .8rem; font-weight: 800; color: #1f2937; background: #fde047; border: 0; box-shadow: 0 8px 16px -8px rgba(0, 0, 0, .5); transition: transform .2s; } .cs-stats .cs-calc-btn:hover { transform: translateY(-2px) rotate(-2deg); color: #1f2937; background: #fef08a; }
