/* CalcKite — "kite day" theme: warm paper, sky blue, kite orange */
:root {
  --bg: #fbf7ef;
  --bg-2: #f4eee2;
  --card: #ffffff;
  --text: #14213d;
  --muted: #5d6579;
  --line: #ebe3d4;
  --accent: #2459e0;
  --accent-ink: #1c47b8;
  --accent-soft: #e6eeff;
  --kite: #ef8f22;
  --kite-soft: #fff1de;
  --sky-1: #cfe2ff;
  --sky-2: #eaf2ff;
  --good: #14935f;
  --c1: #2f6fed;
  --c2: #ef8f22;
  --c3: #17a673;
  --c4: #e0567a;
  --c5: #7a5af5;
  --cat-loans: #2f6fed;
  --cat-investing: #17a673;
  --cat-tax: #7a5af5;
  --cat-business: #0e9bb0;
  --cat-tech: #ef8f22;
  --cat-everyday: #e0567a;
  --radius: 16px;
  --shadow: 0 1px 0 rgba(20, 33, 61, .04), 0 6px 20px -8px rgba(20, 33, 61, .12);
  --shadow-lift: 0 2px 0 rgba(20, 33, 61, .04), 0 14px 30px -12px rgba(20, 33, 61, .22);
  --brand: #2f6fed;
  --brand-deep: #1b44b8;
  --brand-light: #4d8bff;
  --navy: #10204a;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1424;
    --bg-2: #131b2e;
    --card: #172036;
    --text: #eef1f7;
    --muted: #9ea7bd;
    --line: #26314a;
    --accent: #7ea3ff;
    --accent-ink: #a9c2ff;
    --accent-soft: #1d2a4a;
    --kite: #f5a94a;
    --kite-soft: #2e2416;
    --sky-1: #1a2950;
    --sky-2: #121b33;
    --c1: #7ea3ff;
    --c2: #f5a94a;
    --c3: #3cc78f;
    --c4: #f07a98;
    --c5: #a08bff;
    --cat-loans: #7ea3ff;
    --cat-investing: #3cc78f;
    --cat-tax: #a08bff;
    --cat-business: #3cc6d8;
    --cat-tech: #f5a94a;
    --cat-everyday: #f07a98;
    --brand: #2552c4;
    --brand-deep: #142f7a;
    --brand-light: #2f62d8;
    --navy: #0a1430;
    --shadow: 0 1px 0 rgba(0, 0, 0, .2);
    --shadow-lift: 0 10px 30px -12px rgba(0, 0, 0, .6);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .logo, .res-big .v { font-family: var(--font-display); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
select, input, button { font: inherit; color: inherit; }
::selection { background: var(--kite-soft); }

/* ---------- Header ---------- */
.top { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 23px; color: var(--text); letter-spacing: -.03em; white-space: nowrap; }
.logo svg { width: 36px; height: 36px; overflow: visible; }
.logo b { font-weight: 800; }
.logo span { color: var(--accent); }
.logo:hover { text-decoration: none; }
.nav { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.nav a { color: var(--muted); font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.deals-link { color: var(--kite); font-weight: 700; }
.country-pick { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 10px; font-size: 14px; max-width: 170px; cursor: pointer; }

/* Animated kite (logo + hero) */
.kite-sway { transform-box: view-box; transform-origin: 32px 26px; animation: sway 4.5s ease-in-out infinite; }
@keyframes sway {
  0%, 100% { transform: rotate(-5deg) translateY(0); }
  50% { transform: rotate(5deg) translateY(-2px); }
}
.logo:hover .kite-sway { animation-duration: 1.6s; }

/* ---------- Home hero ---------- */
.hero { position: relative; margin: 0 calc(50% - 50vw); padding: 0 calc(50vw - 50%); overflow: hidden; color: #fff;
  background: radial-gradient(900px 420px at 85% 10%, rgba(255, 196, 120, .28), transparent 60%),
    linear-gradient(160deg, var(--brand-deep) 0%, var(--brand) 55%, var(--brand-light) 100%); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 48px; background: var(--bg);
  clip-path: ellipse(70% 100% at 50% 100%); }
.hero .eyebrow { color: #fff; background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .28); }
.hero .eyebrow::first-letter { color: var(--kite); }
.hero .trust { color: rgba(255, 255, 255, .88); }
.hero .trust li::before { color: #ffc46b; }
.hero .search { border-color: transparent; color: #14213d; background: #fff; box-shadow: 0 14px 34px -14px rgba(8, 20, 60, .55); }
.hero .search:focus { border-color: var(--kite); }
.hero .search-wrap svg { color: #5d6579; }
.hero { isolation: isolate; }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 24px; align-items: center; padding: 56px 0 84px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--kite); background: var(--card); border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.02; margin: 16px 0 14px; letter-spacing: -.035em; font-weight: 800; }
.hero h1 em { font-style: normal; color: #ffc46b; position: relative; white-space: nowrap; }
.hero h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .22em; background: #ffc46b; opacity: .3; border-radius: 4px; z-index: -1; }
.hero p.sub { color: rgba(255, 255, 255, .86); margin: 0 0 24px; max-width: 540px; font-size: 18px; }
.search-wrap { position: relative; max-width: 560px; }
.search-wrap svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search { width: 100%; padding: 16px 20px 16px 50px; font-size: 17px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card);
  box-shadow: var(--shadow-lift); outline: none; transition: border-color .15s; }
.search:focus { border-color: var(--accent); }
.trust { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 18px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.trust li::before { content: "✓"; color: var(--good); font-weight: 800; margin-right: 6px; }
.scene { width: 100%; max-width: 460px; justify-self: end; }
.scene svg { width: 100%; height: auto; display: block; overflow: hidden; }
.cloud { animation: drift 38s linear infinite; }
.cloud.c2 { animation-duration: 52s; animation-delay: -20s; }
.cloud.c3 { animation-duration: 64s; animation-delay: -40s; }
@keyframes drift { from { transform: translateX(-130px); } to { transform: translateX(470px); } }
.float-sym { animation: rise 9s ease-in-out infinite; opacity: .55; }
.float-sym:nth-of-type(2) { animation-delay: -3s; } .float-sym:nth-of-type(3) { animation-delay: -6s; }
@keyframes rise { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.hero-kite { transform-box: fill-box; transform-origin: 50% 40%; animation: fly 6s ease-in-out infinite; }
@keyframes fly {
  0%, 100% { transform: rotate(-6deg) translate(0, 0); }
  33% { transform: rotate(4deg) translate(6px, -8px); }
  66% { transform: rotate(-2deg) translate(-4px, -3px); }
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 7px 14px; font-size: 14px; font-weight: 500; cursor: pointer; color: var(--muted); transition: all .15s; }
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); }

/* ---------- Category sections & tiles ---------- */
.cat { margin: 44px 0; }
.cat-head { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.cat-head h2 { font-size: 26px; margin: 0; letter-spacing: -.02em; }
.cat-head small { color: var(--muted); font-size: 14px; margin-left: auto; }
.cat-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; flex: none;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--card)); }
.cat-ico svg { width: 22px; height: 22px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tile { position: relative; display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px 16px 20px; color: var(--text); box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s, border-color .18s; overflow: hidden; }
.tile::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); opacity: .35; transition: opacity .18s; }
.tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--c) 40%, var(--line)); }
.tile:hover::before { opacity: 1; }
.tile b { display: block; font-size: 16px; font-weight: 700; }
.tile small { color: var(--muted); font-size: 13.5px; line-height: 1.4; display: block; margin-top: 3px; }
.tile .flag { float: right; font-size: 12px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; margin-left: 6px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; display: none; }
[data-cat="loans"] { --c: var(--cat-loans); } [data-cat="investing"] { --c: var(--cat-investing); } [data-cat="tax"] { --c: var(--cat-tax); }
[data-cat="business"] { --c: var(--cat-business); } [data-cat="tech"] { --c: var(--cat-tech); } [data-cat="everyday"] { --c: var(--cat-everyday); }

/* ---------- Calculator page ---------- */
.page-top { position: relative; margin: 0 calc(50% - 50vw) 24px; padding: 0 calc(50vw - 50%) 34px; color: #fff;
  background: radial-gradient(700px 300px at 90% 0%, rgba(255, 196, 120, .25), transparent 60%),
    linear-gradient(160deg, var(--brand-deep) 0%, var(--brand) 70%, var(--brand-light) 100%); }
.crumbs { font-size: 14px; color: var(--muted); padding: 20px 0 10px; }
.crumbs a { color: var(--muted); }
.page-top .crumbs, .page-top .crumbs a { color: rgba(255, 255, 255, .78); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--card)); padding: 4px 10px; border-radius: 999px; }
.page-top .pill { color: #1b2a55; background: #ffc46b; }
.pill svg { width: 15px; height: 15px; }
.page-h1 { font-size: clamp(30px, 4.4vw, 44px); line-height: 1.08; margin: 12px 0 10px; letter-spacing: -.03em; font-weight: 800; }
.lead { color: var(--muted); margin: 0 0 24px; max-width: 780px; font-size: 17px; }
.page-top .lead { color: rgba(255, 255, 255, .86); margin-bottom: 0; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--card);
  border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lift); overflow: hidden; }
.calc-in { padding: 22px; border-right: 1px solid var(--line); }
.calc-out { padding: 22px; background: linear-gradient(160deg, var(--accent-soft) 0%, var(--card) 60%); position: relative; }
.field { margin-bottom: 18px; }
.field label { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 600; font-size: 14.5px; margin-bottom: 6px; }
.field .hint { font-weight: 500; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.box { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); overflow: hidden; transition: border-color .15s, background .15s; }
.box:focus-within { border-color: var(--accent); background: var(--card); }
.box span { padding: 0 12px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.box input, .box select { border: 0; background: transparent; padding: 11px 12px; width: 100%; outline: none; min-width: 0; font-variant-numeric: tabular-nums; }
.box input[type=number] { -moz-appearance: textfield; }
.box input::-webkit-outer-spin-button, .box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=range] { width: 100%; margin: 10px 0 0; accent-color: var(--accent); cursor: pointer; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1.5px solid var(--line); background: var(--bg); border-radius: 10px; padding: 7px 12px; cursor: pointer; font-size: 14px; font-weight: 500; transition: all .15s; }
.seg button:hover { border-color: var(--muted); }
.seg button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.res-big { margin-bottom: 16px; }
.res-big .k { color: var(--muted); font-size: 14px; font-weight: 500; }
.res-big .v { font-size: clamp(30px, 4.2vw, 40px); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; word-break: break-word; font-variant-numeric: tabular-nums; }
.res-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px dashed var(--line); font-size: 15px; }
.res-row .k { color: var(--muted); }
.res-row .v { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.res-note { font-size: 13.5px; color: var(--muted); margin-top: 14px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.res-note.good { border-color: color-mix(in srgb, var(--good) 50%, var(--line)); color: var(--text); background: color-mix(in srgb, var(--good) 7%, var(--card)); }
.chart { margin: 18px 0 4px; }
.chart svg { display: block; width: 100%; height: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.tbl-wrap { margin-top: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tbl-wrap summary { padding: 14px 18px; cursor: pointer; font-weight: 700; }
.tbl-scroll { overflow-x: auto; max-height: 520px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 14px; text-align: right; border-top: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { position: sticky; top: 0; background: var(--card); color: var(--muted); font-weight: 600; }
tr:nth-child(even) td { background: color-mix(in srgb, var(--bg) 60%, var(--card)); }

/* ---------- Article ---------- */
.article { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 28px 20px; margin-top: 24px; }
.article h2 { font-size: 23px; margin: 24px 0 8px; letter-spacing: -.02em; }
.article h3 { font-size: 17px; margin: 18px 0 4px; }
.formula { background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--kite); border-radius: 10px; padding: 12px 16px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 14px; overflow-x: auto; white-space: pre-wrap; }
.side { position: sticky; top: 84px; display: grid; gap: 16px; }
.side-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.side-box h4 { margin: 0 0 8px; font-size: 16px; }
.side-box a { display: block; padding: 6px 0; font-size: 14.5px; border-top: 1px solid var(--line); color: var(--text); }
.side-box a:hover { color: var(--accent); text-decoration: none; }
.side-box a:first-of-type { border-top: 0; }

/* ---------- Ads ---------- */
.ad-slot { display: none; min-height: 100px; margin: 20px 0; text-align: center; }
.ads-on .ad-slot { display: block; }
.ad-slot.side-ad { min-height: 250px; margin: 0; }
.ad-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }

/* ---------- Sponsored offers & promo codes ---------- */
.offers { margin-top: 20px; }
.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.offer { display: flex; flex-direction: column; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.offer.featured { border: 2px solid var(--kite); background: linear-gradient(160deg, var(--kite-soft), var(--card) 55%); }
.offer-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.offer-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.offer-discount { background: var(--good); color: #fff; font-weight: 800; font-size: 13px; padding: 3px 10px; border-radius: 999px; }
.offer-body { display: flex; gap: 12px; align-items: flex-start; }
.offer-logo { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; background: #fff; flex: none; }
.offer-body b { font-size: 16px; line-height: 1.35; display: block; font-family: var(--font-display); }
.offer-body p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.offer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.offer-code { flex: 1 1 140px; display: flex; justify-content: space-between; align-items: center; gap: 8px; cursor: pointer;
  border: 2px dashed var(--kite); background: var(--kite-soft); border-radius: 10px; padding: 8px 12px; }
.offer-code span { font-family: ui-monospace, Consolas, monospace; font-weight: 800; letter-spacing: .06em; }
.offer-code em { font-style: normal; font-size: 12.5px; color: var(--kite); font-weight: 700; }
.offer-code.copied { border-style: solid; border-color: var(--good); }
.offer-code.copied em { color: var(--good); }
.offer-end { color: var(--muted); font-size: 12px; }
.offer-group { font-size: 22px; margin: 26px 0 10px; }
.offers-empty { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--muted); margin: 0; }
.aff-btn { flex: 1 1 120px; text-align: center; background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-weight: 700; white-space: nowrap; transition: transform .15s; }
.aff-btn:hover { text-decoration: none; transform: translateY(-1px); }

/* ---------- Footer & static pages ---------- */
.disclaimer { font-size: 13px; color: var(--muted); margin-top: 16px; }
.foot { margin-top: 72px; background: var(--navy); border-top: 4px solid var(--kite); padding: 44px 0 26px; font-size: 14.5px; color: rgba(255, 255, 255, .72); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.foot h5 { font-family: var(--font-display); font-size: 15px; color: #ffc46b; margin: 0 0 10px; letter-spacing: .01em; }
.foot a { display: block; color: rgba(255, 255, 255, .72); padding: 3px 0; }
.foot a:hover { color: #fff; }
.foot .logo { font-size: 22px; margin-bottom: 8px; color: #fff; }
.foot .logo span { color: #8fb3ff; }
.foot .logo svg { width: 32px; height: 32px; }
.foot p { margin: 0 0 12px; max-width: 300px; }
.foot .mail { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; padding: 6px 14px; }
.foot .mail:hover { background: rgba(255, 255, 255, .14); text-decoration: none; }
.foot .mail svg { width: 16px; height: 16px; color: #ffc46b; }
.foot-legal { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 28px; font-size: 13.5px; }
.foot-legal a { padding: 0; }
.offer-note { font-size: 12.5px; color: var(--muted); margin: 8px 2px 0; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; }
.legal { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 28px 24px; margin-top: 24px; }
.plain-hero { padding: 64px 0 32px; text-align: center; }
.plain-hero h1 { font-size: clamp(30px, 5vw, 48px); margin: 0 0 8px; }

@media (prefers-reduced-motion: reduce) {
  .kite-sway, .hero-kite, .cloud, .float-sym { animation: none; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 36px; }
  .scene { position: absolute; right: -40px; top: 6px; width: 200px; opacity: .55; pointer-events: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .calc { grid-template-columns: 1fr; }
  .calc-in { border-right: 0; border-bottom: 1px solid var(--line); }
  .nav a.hide-sm { display: none; }
  .article, .legal { padding: 6px 18px 16px; }
  .cat-head h2 { font-size: 22px; }
  .scene { width: 150px; right: -36px; top: 0; opacity: .4; }
}
