/* Paycheck Math design system. Deep navy ink, electric indigo → blue → cyan accents, emerald for
   take-home, warm tones for taxes. The result panel keeps the pay-stub ledger (numbered lines,
   dotted leaders, double rule above the total) inside a premium card. Motion respects
   prefers-reduced-motion; content is never hidden when JavaScript is missing. */
:root {
  --paper: #ffffff;
  --bg: #f6f7fb;
  --ink: #0b1533;
  --ink-2: #434d70;
  --ink-3: #66708f;
  --brand: #4f46e5;
  --brand-2: #2563eb;
  --brand-3: #06b6d4;
  --brand-deep: #312e81;
  --blue: #2f4fe0;
  --blue-deep: #1e2a78;
  --blue-ink: #3730a3;
  --grad: linear-gradient(120deg, #4f46e5 0%, #2563eb 48%, #06b6d4 100%);
  --grad-soft: linear-gradient(120deg, rgba(79, 70, 229, .10), rgba(37, 99, 235, .07) 50%, rgba(6, 182, 212, .10));
  --net: #059669;
  --net-2: #10b981;
  --wash: #eef0fd;
  --stub: #fbfcff;
  --line: #e3e7f2;
  --line-2: #cbd3e6;
  --warn: #8a4b06;
  --warn-bg: #fff6e8;
  --s0: #10b981; --s1: #f97316; --s2: #f59e0b; --s3: #ef4444; --s4: #8b5cf6; --s5: #ec4899;
  --radius: 14px;
  --radius-s: 10px;
  --shadow-1: 0 1px 2px rgba(11, 21, 51, .05), 0 1px 1px rgba(11, 21, 51, .03);
  --shadow-2: 0 1px 2px rgba(11, 21, 51, .04), 0 8px 24px -6px rgba(11, 21, 51, .10);
  --shadow-3: 0 2px 6px rgba(11, 21, 51, .05), 0 24px 48px -16px rgba(30, 42, 120, .22);
  --ring: 0 0 0 4px rgba(79, 70, 229, .16);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Inter", Tahoma, Arial, sans-serif;
  --wrap: 1200px;
  --gutter: 24px;
  --head-h: 68px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 16px); overflow-x: clip; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.62 var(--font); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; min-width: 0; }
html[lang^="ar"] body { font-family: var(--font-ar); line-height: 1.8; font-feature-settings: normal; }
html[lang^="de"] h1, html[lang^="de"] h2, html[lang^="de"] h3 { hyphens: auto; -webkit-hyphens: auto; }
a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .15s; }
a:hover { color: var(--brand-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid rgba(79, 70, 229, .5); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(79, 70, 229, .18); }
img, svg { max-width: 100%; height: auto; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--brand); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { inset-inline-start: 8px; color: #fff; }
.num, .amt, output, .data td, .stub-sub dd, .stat b { font-variant-numeric: tabular-nums lining-nums; }
html[lang^="ar"] .amt, html[lang^="ar"] output, html[lang^="ar"] .stub-sub dd, html[lang^="ar"] .data td { unicode-bidi: plaintext; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.ico { width: 22px; height: 22px; flex: none; }
.cc { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--wash); color: var(--blue-ink); font: 700 .72rem/1 var(--font); letter-spacing: .04em; flex: none; }
.cc-ar { font-family: var(--font-ar); font-size: .85rem; }

/* ---------- header */
.site-head { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
/* the blur lives on a pseudo-element so fixed-position menus inside the header are positioned against the viewport */
.site-head::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); }
.site-head.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -18px rgba(11, 21, 51, .35); }
.head-row { display: flex; align-items: center; gap: 20px; min-height: var(--head-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--font); flex: none; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 4px 10px rgba(79, 70, 229, .28)); transition: transform .3s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.05); }
.brand-word { font-weight: 800; font-size: 1.18rem; letter-spacing: -0.025em; white-space: nowrap; }
.brand-word b { font-weight: 800; margin-inline-start: .22em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[dir="rtl"] .brand-word { direction: ltr; }
.nav-main { display: flex; gap: 2px; margin-inline-start: auto; align-items: center; }
.nav-main a { position: relative; color: var(--ink-2); text-decoration: none; font-size: .95rem; font-weight: 550; padding: 9px 12px; border-radius: 10px; transition: color .15s, background-color .15s; white-space: nowrap; }
.nav-main a:hover { color: var(--ink); background: var(--wash); }
.nav-main a[aria-current="page"] { color: var(--brand); }
.nav-main a[aria-current="page"]::after { content: ""; position: absolute; inset-inline: 12px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--grad); }
.head-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.country-pick, .menu-m { position: relative; }
.country-pick summary, .menu-m summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px 0 8px; border: 1px solid var(--line); background: #fff; border-radius: 12px; font-size: .92rem; font-weight: 600; color: var(--ink); transition: border-color .15s, box-shadow .15s; user-select: none; }
.country-pick summary::-webkit-details-marker, .menu-m summary::-webkit-details-marker { display: none; }
.country-pick summary::after { content: ""; width: 7px; height: 7px; border: solid var(--ink-3); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.country-pick[open] summary::after { transform: rotate(-135deg) translate(-2px, 0); }
.country-pick summary:hover, .menu-m summary:hover { border-color: var(--line-2); box-shadow: var(--shadow-1); }
.country-pick[open] summary { border-color: var(--brand); box-shadow: var(--ring); }
.cp-label { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.country-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 10px); background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px; width: min(600px, calc(100vw - 32px)); z-index: 60;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 10px; box-shadow: var(--shadow-3); animation: pop .22s var(--ease); max-height: min(70vh, 560px); overflow-y: auto; overscroll-behavior: contain; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.country-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); font-size: .93rem; font-weight: 550; min-height: 44px; }
.country-menu a small { margin-inline-start: auto; color: var(--ink-3); font-size: .8rem; font-weight: 400; white-space: nowrap; }
.country-menu a:hover, .country-menu a[aria-current] { background: var(--wash); }
.country-menu a[lang="ar"] { font-family: var(--font-ar); }
.digits-toggle { background: #fff; border: 1px solid var(--line); color: var(--ink-2); border-radius: 12px; height: 42px; padding: 0 12px; font: 500 .85rem var(--font-ar); cursor: pointer; white-space: nowrap; transition: all .15s; }
.digits-toggle[aria-pressed="true"] { background: var(--grad); color: #fff; border-color: transparent; }
.menu-m { display: none; }
.menu-m summary { width: 44px; padding: 0; justify-content: center; }
.burger { display: grid; gap: 4px; width: 18px; }
.burger i { display: block; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .25s var(--ease), opacity .2s; }
.menu-m[open] .burger i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-m[open] .burger i:nth-child(2) { opacity: 0; }
.menu-m[open] .burger i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.menu-sheet { position: fixed; inset-inline: 0; top: var(--head-h); bottom: 0; background: rgba(255, 255, 255, .98); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); padding: 12px var(--gutter) 32px; overflow-y: auto; overscroll-behavior: contain; z-index: 60; border-top: 1px solid var(--line); animation: sheet .28s var(--ease); }
@keyframes sheet { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.menu-links { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.menu-links a { display: flex; align-items: center; min-height: 52px; padding: 0 14px; border-radius: 12px; font-size: 1.12rem; font-weight: 650; color: var(--ink); text-decoration: none; }
.menu-links a:hover, .menu-links a[aria-current="page"] { background: var(--wash); color: var(--brand); }
.menu-h { margin: 18px 14px 8px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.menu-countries { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.menu-countries a { display: flex; align-items: center; min-height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 550; font-size: .95rem; }
.menu-countries a[lang="ar"] { font-family: var(--font-ar); }
.digits-toggle-m { display: none; }
html.menu-open { overflow: hidden; }

/* ---------- page heading */
.crumbs { font-size: .86rem; color: var(--ink-3); margin: 20px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px; position: relative; z-index: 1; }
.crumbs li { min-width: 0; }
.crumbs li:not(:last-child)::after { content: "›"; margin-inline-start: 6px; color: var(--line-2); }
html[dir="rtl"] .crumbs li:not(:last-child)::after { content: "‹"; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }
.page-head { position: relative; padding: 12px 0 30px; isolation: isolate; }
.page-head::before { content: ""; position: absolute; z-index: -1; top: -120px; bottom: 0; left: 50%; width: 100vw; margin-left: -50vw; background:
  radial-gradient(600px 220px at 12% 30%, rgba(79, 70, 229, .10), transparent 70%),
  radial-gradient(520px 240px at 88% 10%, rgba(6, 182, 212, .10), transparent 70%),
  linear-gradient(180deg, #f5f6ff 0%, rgba(255, 255, 255, 0) 100%); pointer-events: none; }
h1 { font-size: clamp(1.9rem, 1.15rem + 2.8vw, 3rem); line-height: 1.08; letter-spacing: -0.035em; font-weight: 800; margin: 8px 0 12px; max-width: 24ch; text-wrap: balance; overflow-wrap: break-word; }
html[lang^="ar"] h1 { letter-spacing: 0; line-height: 1.35; }
h2, h3 { text-wrap: balance; overflow-wrap: break-word; }
.lede { font-size: 1.14rem; color: var(--ink-2); max-width: 66ch; margin: 0; }
.lede strong, .lede b { color: var(--ink); }
.verified { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-size: .88rem; font-weight: 550; color: var(--net); background: rgba(16, 185, 129, .08); border: 1px solid rgba(16, 185, 129, .25); padding: 6px 14px 6px 8px; border-radius: 999px; max-width: 100%; }
.verified svg { width: 18px; height: 18px; flex: none; color: var(--net-2); }
.badge-beta { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--warn); background: var(--warn-bg); border: 1px solid #f1d6a8; padding: 2px 9px; border-radius: 999px; vertical-align: middle; margin-inline-start: 8px; letter-spacing: 0; }

/* ---------- calculator */
.calc { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; align-items: start; margin-bottom: 56px; }
.calc-form { border: 1px solid var(--line); border-radius: 20px; padding: 24px; background: #fff; box-shadow: var(--shadow-2); position: relative; }
.calc-form .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: end; }
.calc-form .fields > .field-seg, .calc-form .fields > .field-checks, .calc-form .fields > .field-check { align-self: start; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-seg, .field-checks, .field-check, .field[data-wide] { grid-column: 1 / -1; }
.field > label, .field > legend, fieldset.field legend { font-size: .88rem; font-weight: 650; color: var(--ink); padding: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
input[type=text], input[type=number], input[type=date], select {
  width: 100%; height: 50px; border: 1.5px solid var(--line); border-radius: 12px; background: #fbfcfe; color: var(--ink);
  font: 550 1.04rem var(--font); padding: 0 14px; font-variant-numeric: tabular-nums; appearance: none; -webkit-appearance: none; transition: border-color .15s, box-shadow .15s, background-color .15s; min-width: 0; }
html[lang^="ar"] input, html[lang^="ar"] select { font-family: var(--font-ar); }
select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-end: 38px; text-overflow: ellipsis; }
html[dir="rtl"] select { background-position: 20px 22px, 15px 22px; }
input[type=date] { padding-inline-end: 10px; }
input:hover, select:hover { border-color: var(--line-2); background-color: #fff; }
input:focus, select:focus { outline: none; border-color: var(--brand); background-color: #fff; box-shadow: var(--ring); }
.input-money { position: relative; display: flex; align-items: center; }
.input-money .sym { position: absolute; inset-inline-start: 14px; color: var(--ink-3); font-weight: 650; pointer-events: none; font-size: .95rem; }
.input-money.input-pre input { padding-inline-start: 32px; }
.input-money.input-post .sym { inset-inline-start: auto; inset-inline-end: 14px; }
.input-money.input-post input { padding-inline-end: 58px; }
.input-num { position: relative; }
.input-num.has-suffix input { padding-inline-end: 36px; }
.input-num .suffix { position: absolute; inset-inline-end: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 650; pointer-events: none; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }
.seg { display: flex; border: 1.5px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; background: #f3f5fb; }
.seg-opt { flex: 1; position: relative; min-width: 0; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; }
.seg-opt span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 40px; padding: 6px 10px; border-radius: 10px; font-size: .93rem; font-weight: 600; color: var(--ink-2); cursor: pointer; line-height: 1.25; transition: background-color .2s, color .2s, box-shadow .2s; }
.seg-opt span:hover { color: var(--ink); }
.seg-opt input:checked + span { background: #fff; color: var(--brand); box-shadow: 0 1px 2px rgba(11, 21, 51, .08), 0 4px 12px -4px rgba(79, 70, 229, .35); }
.seg-opt input:focus-visible + span { outline: 3px solid rgba(79, 70, 229, .45); outline-offset: 1px; }
.field-check label, .field-checks label { display: flex; align-items: center; gap: 10px; font-size: .96rem; cursor: pointer; padding: 6px 0; min-height: 36px; }
.field-checks { display: flex; flex-wrap: wrap; gap: 2px 18px; }
.field-checks legend { width: 100%; margin-bottom: 4px; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--brand); margin: 0; flex: none; }
.adv-toggle { grid-column: 1 / -1; justify-self: start; background: none; border: 0; color: var(--brand); font: 650 .93rem var(--font); padding: 8px 0; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; }
html[lang^="ar"] .adv-toggle { font-family: var(--font-ar); }
.adv-toggle::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--wash); font-size: 1rem; line-height: 1; transition: transform .25s var(--ease); }
.adv-toggle[aria-expanded="true"]::before { content: "−"; transform: rotate(180deg); }
.js .field-adv { display: none; }
.js .show-adv .field-adv { display: flex; animation: fadeUp .3s var(--ease) both; }
.js .show-adv .field-adv.field-checks { display: flex; }
.js [data-hidden] { display: none !important; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.form-actions { margin-top: 18px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 12px; border: 0; background: var(--grad); background-size: 140% 100%; color: #fff;
  font: 650 1rem var(--font); cursor: pointer; text-decoration: none; box-shadow: 0 8px 20px -8px rgba(79, 70, 229, .6), inset 0 1px 0 rgba(255, 255, 255, .2); transition: transform .2s var(--ease), box-shadow .2s, background-position .4s; }
html[lang^="ar"] .btn { font-family: var(--font-ar); }
.btn:hover { color: #fff; transform: translateY(-1px); background-position: 100% 0; box-shadow: 0 14px 28px -10px rgba(79, 70, 229, .65), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn:active { transform: translateY(0); }
.btn .ico { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.btn:hover .ico { transform: translateX(3px); }
html[dir="rtl"] .btn .ico { transform: scaleX(-1); }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 1.04rem; border-radius: 14px; }
.btn-quiet, .btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); box-shadow: var(--shadow-1); }
.btn-quiet:hover, .btn-ghost:hover { background: #fff; color: var(--brand); border-color: var(--line-2); box-shadow: var(--shadow-2); }
.js .btn-nojs { display: none; }
html:not(.js) [data-print] { display: none; }
.copy-link, .print-btn { font-size: .88rem; min-height: 40px; padding: 0 14px; border-radius: 10px; }

/* ---------- the pay stub (result card) */
.stub { background: #fff; border: 1px solid var(--line); border-radius: 22px; position: relative; padding: 0 0 20px; box-shadow: var(--shadow-3); overflow: clip; }
.stub::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--grad); }
.stub-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 26px 16px; border-bottom: 1.5px dashed var(--line-2); position: relative; flex-wrap: wrap; }
.stub-head::before, .stub-head::after { content: ""; position: absolute; bottom: -10px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); }
.stub-head::before { inset-inline-start: -10px; clip-path: inset(0 0 0 50%); }
.stub-head::after { inset-inline-end: -10px; clip-path: inset(0 50% 0 0); }
html[dir="rtl"] .stub-head::before { clip-path: inset(0 50% 0 0); }
html[dir="rtl"] .stub-head::after { clip-path: inset(0 0 0 50%); }
.stub-title { font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin: 0; display: inline-flex; align-items: center; gap: 8px; }
html[lang^="ar"] .stub-title { letter-spacing: 0; font-size: .95rem; text-transform: none; }
.stub-title::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--net-2); box-shadow: 0 0 0 4px rgba(16, 185, 129, .15); }
.periods { display: flex; gap: 2px; background: #f1f3fa; border-radius: 12px; padding: 3px; flex-wrap: wrap; }
.periods button { border: 0; background: none; min-height: 34px; padding: 0 12px; border-radius: 9px; font: 600 .85rem var(--font); color: var(--ink-2); cursor: pointer; transition: background-color .2s, color .2s, box-shadow .2s; }
html[lang^="ar"] .periods button { font-family: var(--font-ar); }
.periods button:hover { color: var(--ink); }
.periods button[aria-pressed="true"] { background: #fff; color: var(--brand); box-shadow: 0 1px 2px rgba(11, 21, 51, .08), 0 4px 10px -4px rgba(79, 70, 229, .35); }
.stub-body { padding: 22px 26px 0; }
.stub-body[aria-busy="true"] { cursor: progress; }
.stub-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.stub-top-main { min-width: 0; flex: 1; }
.stub-big { display: flex; flex-direction: column; gap: 4px; }
.stub-big-label { font-size: .95rem; color: var(--ink-2); font-weight: 600; }
.stub-big-value { font-size: clamp(2.3rem, 1.5rem + 2.8vw, 3.4rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.04em; color: var(--blue-deep); background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; overflow-wrap: anywhere; padding-bottom: 2px; }
html[lang^="ar"] .stub-big-value { letter-spacing: 0; }
.stub-sub { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 14px 0 0; }
.stub-sub div { display: flex; flex-direction: column; min-width: 0; }
.stub-sub dt { font-size: .8rem; color: var(--ink-3); font-weight: 500; }
.stub-sub dd { margin: 0; font-weight: 750; font-size: 1.08rem; }
.donut { width: 132px; height: 132px; flex: none; transform: rotate(0); }
.donut-ring { fill: none; stroke: #eef1f8; stroke-width: 5.4; }
.donut-seg { fill: none; stroke-width: 5.4; stroke: var(--s1); transition: stroke-dasharray .7s var(--ease), stroke-dashoffset .7s var(--ease); }
.donut-seg.shade-0 { stroke: var(--s0); } .donut-seg.shade-1 { stroke: var(--s1); } .donut-seg.shade-2 { stroke: var(--s2); }
.donut-seg.shade-3 { stroke: var(--s3); } .donut-seg.shade-4 { stroke: var(--s4); } .donut-seg.shade-5 { stroke: var(--s5); }
.donut-pct { font: 800 7.2px var(--font); fill: var(--ink); text-anchor: middle; dominant-baseline: central; letter-spacing: -0.02em; }
html[lang^="ar"] .donut-pct { font-family: var(--font-ar); }
.stub-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; margin: 22px 0 10px; background: #eef1f8; gap: 3px; }
.stub-bar span { display: block; min-width: 3px; border-radius: 999px; transition: width .7s var(--ease); }
.stub-legend { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .84rem; color: var(--ink-2); }
.stub-legend li { display: inline-flex; align-items: center; gap: 7px; }
.stub-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.stub-legend b { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.shade-0 { background: var(--s0); } .shade-1 { background: var(--s1); } .shade-2 { background: var(--s2); }
.shade-3 { background: var(--s3); } .shade-4 { background: var(--s4); } .shade-5 { background: var(--s5); }
.anim-in .stub-bar span { animation: barIn 1s var(--ease) both; transform-origin: left center; }
html[dir="rtl"] .anim-in .stub-bar span { transform-origin: right center; }
.anim-in .stub-bar span:nth-child(2) { animation-delay: .08s; } .anim-in .stub-bar span:nth-child(3) { animation-delay: .16s; }
.anim-in .stub-bar span:nth-child(4) { animation-delay: .24s; } .anim-in .stub-bar span:nth-child(n+5) { animation-delay: .32s; }
@keyframes barIn { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.anim-in .donut-seg { animation: donutIn 1.1s var(--ease) both; }
.anim-in .donut { animation: spinIn 1.1s var(--ease) both; }
@keyframes donutIn { from { stroke-dasharray: 0 100; } }
@keyframes spinIn { from { transform: rotate(-90deg) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.anim-in .stub-lines tr { animation: fadeUp .5s var(--ease) both; }
.anim-in .stub-lines tr:nth-child(2) { animation-delay: .05s; } .anim-in .stub-lines tr:nth-child(3) { animation-delay: .1s; }
.anim-in .stub-lines tr:nth-child(4) { animation-delay: .15s; } .anim-in .stub-lines tr:nth-child(5) { animation-delay: .2s; }
.anim-in .stub-lines tr:nth-child(n+6) { animation-delay: .25s; }
.stub-lines { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: .98rem; }
.stub-lines th { text-align: start; font-weight: 500; padding: 9px 0; white-space: nowrap; width: 1%; overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; }
.stub-lines td { padding: 9px 0; vertical-align: baseline; }
.stub-lines .ln { width: 2.4em; padding-inline-end: 10px; color: var(--ink-3); font-size: .78rem; font-variant-numeric: tabular-nums; }
.stub-lines .lead { width: 99%; position: relative; }
.stub-lines .lead::after { content: ""; position: absolute; inset-inline: 8px; bottom: 12px; border-bottom: 1.5px dotted var(--line-2); }
.stub-lines .amt { text-align: end; white-space: nowrap; font-weight: 650; }
.stub-lines tr.k-minus .amt { color: #c2410c; font-weight: 600; }
.stub-lines tr.k-plus .amt { color: var(--ink); }
.stub-lines tr.k-gross th, .stub-lines tr.k-gross .amt { font-weight: 750; }
.stub-lines tr.k-total td, .stub-lines tr.k-total th { border-top: 3px double var(--ink); padding-top: 12px; font-weight: 800; }
.stub-lines tr.k-total .amt { color: var(--net); font-size: 1.12rem; }
.stub-note { font-size: .88rem; color: var(--ink-2); background: #f7f8fd; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 16px 0 0; }
.stub-sched { margin-top: 16px; }
.stub-sched summary { cursor: pointer; color: var(--brand); font-weight: 650; font-size: .93rem; min-height: 40px; display: flex; align-items: center; }
.stub-sched .tbl-wrap { margin-top: 8px; }
.stub-foot { padding: 16px 26px 0; display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; font-size: .84rem; color: var(--ink-3); }
.stub-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stub-foot > a { color: var(--ink-3); }
.calc > .stub { position: sticky; top: calc(var(--head-h) + 16px); }

/* mobile result bar */
.mbar { position: fixed; z-index: 45; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); display: none; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 18px; border: 0; border-radius: 18px;
  background: rgba(11, 21, 51, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; box-shadow: 0 18px 40px -12px rgba(11, 21, 51, .55); font: inherit; text-align: start; cursor: pointer;
  transform: translateY(140%); transition: transform .35s var(--ease); }
.mbar.on { transform: none; }
html.menu-open .mbar { transform: translateY(140%); }
.mbar-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.mbar-label { font-size: .78rem; color: #b8c2e6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mbar-value { font-size: 1.28rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
html[lang^="ar"] .mbar-value { letter-spacing: 0; }
.mbar-go { width: 40px; height: 40px; border-radius: 12px; background: var(--grad); flex: none; position: relative; }
.mbar-go::after { content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; border: solid #fff; border-width: 2px 2px 0 0; transform: translate(-50%, -25%) rotate(-45deg); }

/* ---------- content */
.content { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.content-main > section { margin: 0 0 52px; }
.content-main h2 { font-size: clamp(1.35rem, 1.1rem + .9vw, 1.65rem); line-height: 1.22; letter-spacing: -0.025em; margin: 0 0 16px; font-weight: 800; position: relative; padding-top: 14px; }
.content-main h2::before { content: ""; position: absolute; top: 0; inset-inline-start: 0; width: 36px; height: 4px; border-radius: 4px; background: var(--grad); }
html[lang^="ar"] .content-main h2 { letter-spacing: 0; }
.content-main h3 { font-size: 1.12rem; margin: 24px 0 8px; letter-spacing: -0.01em; }
.content-main p, .content-main li { max-width: 72ch; }
.content-main ul:not([class]), .content-main ol:not([class]) { padding-inline-start: 1.2em; }
.content-main ul:not([class]) li::marker { color: var(--brand); }
.prose p { margin: 0 0 14px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding-inline-start: 48px; margin-bottom: 16px; min-height: 30px; }
.steps li::before { content: counter(s); position: absolute; inset-inline-start: 0; top: -1px; width: 30px; height: 30px; border-radius: 10px; background: var(--grad); color: #fff; font-weight: 750; font-size: .85rem; display: grid; place-items: center; font-variant-numeric: tabular-nums; box-shadow: 0 6px 14px -6px rgba(79, 70, 229, .55); }
.formula { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .9rem; background: #0b1533; color: #dbe4ff; border-radius: 12px; padding: 14px 16px; overflow-x: auto; direction: ltr; text-align: left; line-height: 1.6; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background:
  linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0)), linear-gradient(to left, #fff 30%, rgba(255, 255, 255, 0)) 100% 0,
  radial-gradient(farthest-side at 0 50%, rgba(11, 21, 51, .14), transparent), radial-gradient(farthest-side at 100% 50%, rgba(11, 21, 51, .14), transparent) 100% 0;
  background-repeat: no-repeat; background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%; background-attachment: local, local, scroll, scroll; box-shadow: var(--shadow-1); -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data caption { text-align: start; padding: 12px 16px; font-weight: 650; color: var(--ink-2); font-size: .9rem; caption-side: top; }
table.data th, table.data td { padding: 11px 16px; text-align: end; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th:first-child, table.data td:first-child { text-align: start; }
table.data thead th { background: #f4f6fc; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); position: sticky; top: 0; z-index: 1; }
html[lang^="ar"] table.data thead th { text-transform: none; letter-spacing: 0; font-size: .88rem; }
table.data tbody tr:nth-child(even) td { background: rgba(244, 246, 252, .55); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background-color .15s; }
table.data tbody tr:hover td { background: #f0f2ff; }
table.data tr.is-current td { background: var(--wash); font-weight: 700; }
table.data td a { font-weight: 650; text-decoration: none; }
table.data td a:hover { text-decoration: underline; }
.src { font-size: .86rem; color: var(--ink-3); margin-top: 12px; }
.src a { word-break: break-word; }
.faq details { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.faq details:hover { border-color: var(--line-2); }
.faq details[open] { border-color: rgba(79, 70, 229, .35); box-shadow: var(--shadow-2); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 52px 16px 18px; font-weight: 650; position: relative; min-height: 52px; }
html[dir="rtl"] .faq summary { padding: 16px 18px 16px 52px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; inset-inline-end: 18px; top: 22px; width: 9px; height: 9px; border: solid var(--brand); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg); top: 26px; }
.faq .ans { padding: 0 18px 16px; color: var(--ink-2); max-width: 72ch; }
.faq .ans > :first-child { margin-top: 0; }
.content-main .related ul { padding: 0; }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.related a { display: block; height: 100%; padding: 14px 16px; text-decoration: none; font-weight: 650; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; color: var(--ink); }
.related a:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: rgba(79, 70, 229, .35); color: var(--brand); }
.related a small { display: block; font-weight: 400; color: var(--ink-3); font-size: .86rem; margin-top: 2px; }
.aside { position: sticky; top: calc(var(--head-h) + 16px); display: flex; flex-direction: column; gap: 18px; }
.aside-box { border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; font-size: .93rem; background: #fff; box-shadow: var(--shadow-1); }
.aside-box h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 0 0 8px; }
html[lang^="ar"] .aside-box h2 { text-transform: none; letter-spacing: 0; font-size: .95rem; }
.aside-box ul { list-style: none; padding: 0; margin: 0; }
.aside-box li { border-top: 1px solid var(--line); }
.aside-box li:first-child { border-top: 0; }
.aside-box a { display: block; padding: 8px 0; text-decoration: none; color: var(--ink-2); font-weight: 550; transition: color .15s, padding .2s var(--ease); }
.aside-box a:hover { color: var(--brand); padding-inline-start: 4px; }
.aside-box a[aria-current="page"] { color: var(--brand); font-weight: 700; }
.reviewer { font-size: .9rem; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 18px; margin-top: 8px; }
.disclaimer { font-size: .86rem; color: var(--ink-3); }
.ad-slot { display: none; }
.ads-on .ad-slot { display: block; min-height: 280px; background: #fafbff; border: 1px dashed var(--line); border-radius: 12px; margin: 20px 0; }
.note-box { background: var(--warn-bg); border: 1px solid #f1d6a8; color: #5c3404; padding: 12px 16px; border-radius: 12px; font-size: .93rem; max-width: 72ch; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0 0 16px; background: #fff; box-shadow: var(--shadow-1); }
.kv div { padding: 14px 16px; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: -1px -1px 0 0; }
.kv dt { font-size: .82rem; color: var(--ink-3); }
.kv dd { margin: 2px 0 0; font-weight: 800; font-size: 1.22rem; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.pill-links { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.pill-links a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .92rem; font-weight: 550; font-variant-numeric: tabular-nums; background: #fff; transition: all .15s; }
.pill-links a:hover { border-color: var(--brand); color: var(--brand); box-shadow: var(--ring); }
.pill-links a[aria-current="page"] { background: var(--grad); color: #fff; border-color: transparent; }

/* ---------- reveal on scroll (only when JS + IntersectionObserver are present) */
.reveal-ready .reveal { transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.reveal-ready .reveal:not(.in) { opacity: 0; transform: translateY(22px); }

/* ---------- home */
.hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 64px 0 72px; }
.hero-bg { position: absolute; z-index: -1; top: calc(var(--head-h) * -1); bottom: 0; left: 50%; width: 100vw; margin-left: -50vw; overflow: hidden; pointer-events: none;
  background: linear-gradient(180deg, #f3f4ff 0%, #f7fbff 60%, #fff 100%); }
.blob { position: absolute; border-radius: 50%; filter: blur(64px); opacity: .55; will-change: transform; }
.b1 { width: 520px; height: 520px; background: #818cf8; top: -160px; left: -120px; animation: drift1 22s ease-in-out infinite alternate; }
.b2 { width: 460px; height: 460px; background: #22d3ee; top: 40px; right: -140px; opacity: .45; animation: drift2 26s ease-in-out infinite alternate; }
.b3 { width: 380px; height: 380px; background: #f0abfc; bottom: -180px; left: 38%; opacity: .35; animation: drift3 30s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(160px, 90px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-150px, 120px) scale(.9); } }
@keyframes drift3 { to { transform: translate(-120px, -90px) scale(1.2); } }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(79, 70, 229, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(79, 70, 229, .07) 1px, transparent 1px); background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 20%, transparent 75%); }
.hero-copy { min-width: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 6px 14px 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, .75); border: 1px solid rgba(79, 70, 229, .18); font-size: .86rem; font-weight: 600; color: var(--blue-ink); box-shadow: var(--shadow-1); max-width: 100%; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--net-2); position: relative; flex: none; }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--net-2); animation: ping 1.8s ease-out infinite; }
@keyframes ping { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.8); opacity: 0; } }
.hero h1 { font-size: clamp(2.4rem, 1.2rem + 4.4vw, 4.1rem); max-width: 15ch; letter-spacing: -0.045em; line-height: 1.02; margin: 0 0 18px; }
html[lang^="ar"] .hero h1 { letter-spacing: 0; }
.hero .lede { font-size: 1.16rem; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 0; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 26px 0 0; padding: 0; list-style: none; font-size: .92rem; color: var(--ink-2); font-weight: 500; }
.hero-proof li { display: inline-flex; align-items: center; gap: 8px; }
.hero-proof svg { width: 18px; height: 18px; color: var(--net-2); }
.quick { position: relative; border-radius: 24px; padding: 26px; min-width: 0; }
.glass { background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); border: 1px solid rgba(255, 255, 255, .8); box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 30px 60px -20px rgba(30, 42, 120, .35), 0 0 0 1px rgba(79, 70, 229, .08); }
@media (prefers-reduced-motion: no-preference) { .quick { animation: floatIn .9s var(--ease) both .1s; } }
@keyframes floatIn { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
.quick-head { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; }
.quick-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 5px rgba(79, 70, 229, .12); flex: none; }
.quick h2 { font-size: 1.05rem; margin: 0; letter-spacing: -0.01em; }
.quick .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick .fields .field:first-of-type { grid-column: 1 / -1; }
.quick input, .quick select { background-color: rgba(255, 255, 255, .9); }
.quick-result { margin-top: 18px; padding-top: 16px; border-top: 1.5px dashed var(--line-2); }
.quick-result .stub-big-value { font-size: clamp(2.2rem, 1.6rem + 2vw, 2.9rem); }
.quick-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-weight: 650; font-size: .95rem; text-decoration: none; }
.quick-more .ico { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.quick-more:hover .ico { transform: translateX(3px); }
html[dir="rtl"] .quick-more .ico { transform: scaleX(-1); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: -28px 0 72px; position: relative; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; box-shadow: var(--shadow-2); min-width: 0; }
.stat b { display: block; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--ink-3); font-size: .88rem; }
.block { margin: 0 0 80px; }
.block-head { max-width: 760px; margin-bottom: 26px; }
.block-head h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); letter-spacing: -0.035em; line-height: 1.12; margin: 0 0 10px; font-weight: 800; }
.block-head p { color: var(--ink-2); margin: 0; }
.block-head .kicker { color: var(--brand); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 8px; }
.tool-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tool-card { position: relative; display: flex; flex-direction: column; gap: 14px; height: 100%; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; text-decoration: none; color: var(--ink); overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; }
.tool-card::before { content: ""; position: absolute; inset: 0; background: var(--grad-soft); opacity: 0; transition: opacity .25s; }
.tool-card:hover { color: var(--ink); transform: translateY(-4px); box-shadow: var(--shadow-3); border-color: rgba(79, 70, 229, .3); }
.tool-card:hover::before { opacity: 1; }
.tool-card > * { position: relative; }
.tool-ico { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--grad); color: #fff; box-shadow: 0 10px 20px -10px rgba(79, 70, 229, .7); flex: none; }
.tool-ico .ico { width: 24px; height: 24px; }
.tool-txt strong { display: block; font-size: 1.04rem; letter-spacing: -0.01em; }
.tool-txt small { display: block; color: var(--ink-3); font-size: .88rem; margin-top: 4px; line-height: 1.45; }
.tool-card .cc { position: absolute; top: 18px; inset-inline-end: 18px; }
.country-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.country-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; background: #fff; transition: box-shadow .25s, border-color .25s; min-width: 0; }
.country-card:hover { box-shadow: var(--shadow-2); border-color: var(--line-2); }
.country-card h3 { margin: 0 0 10px; font-size: 1.08rem; }
.country-card h3 a { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.country-card h3 a:hover { color: var(--brand); }
.country-card h3 small { display: block; font-weight: 500; color: var(--ink-3); font-size: .82rem; margin: 4px 0 0 40px; }
html[dir="rtl"] .country-card h3 small { margin: 4px 40px 0 0; }
.country-card h3 small[lang="ar"] { font-family: var(--font-ar); }
.country-card ul { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.country-card li a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 11px; border-radius: 999px; background: #f4f6fc; color: var(--ink-2); text-decoration: none; font-size: .86rem; font-weight: 550; transition: background-color .15s, color .15s; }
.country-card li a:hover { background: var(--wash); color: var(--brand); }
.country-card .ar-link { font-family: var(--font-ar); }
.country-all { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: .9rem; text-decoration: none; }
.country-all .ico { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.country-all:hover .ico { transform: translateX(3px); }
.feature-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feature { border-radius: 18px; padding: 24px; background: linear-gradient(180deg, #f7f8ff, #fff); border: 1px solid var(--line); min-width: 0; }
.feature .ico { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: #fff; color: var(--brand); box-shadow: var(--shadow-2); }
.feature h3 { margin: 16px 0 8px; font-size: 1.1rem; letter-spacing: -0.01em; }
.feature p { margin: 0; color: var(--ink-2); font-size: .97rem; }
.trust-links { margin: 20px 0 0; color: var(--ink-2); }

/* ---------- market and list pages */
.dir { margin: 8px 0 52px; }
.dir h2 { font-size: clamp(1.35rem, 1.1rem + .9vw, 1.65rem); margin: 0 0 6px; letter-spacing: -0.025em; font-weight: 800; }
.dir > p { color: var(--ink-2); margin: 0 0 18px; }
.tool-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tool-list a { display: flex; gap: 14px; align-items: flex-start; height: 100%; padding: 16px; text-decoration: none; font-weight: 700; font-size: 1rem; color: var(--ink); border: 1px solid var(--line); border-radius: 16px; background: #fff; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; letter-spacing: -0.01em; }
.tool-list a:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: rgba(79, 70, 229, .3); color: var(--brand); }
.tool-list .tool-ico { width: 40px; height: 40px; border-radius: 12px; }
.tool-list .tool-ico .ico { width: 21px; height: 21px; }
.tool-list .tool-txt { min-width: 0; }
.tool-list a small { display: block; color: var(--ink-3); font-weight: 400; font-size: .86rem; margin-top: 3px; letter-spacing: 0; line-height: 1.45; }
.region-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.region-grid a { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; background: #fff; transition: border-color .15s, box-shadow .15s, color .15s; }
.region-grid a:hover { border-color: var(--brand); color: var(--brand); box-shadow: var(--ring); }
.region-grid a span { color: var(--net); font-size: .86rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.static-page { max-width: 780px; padding-bottom: 48px; }
.static-page h2 { font-size: 1.35rem; margin: 36px 0 10px; letter-spacing: -0.02em; }
.static-page pre { background: #0b1533; color: #dbe4ff; border-radius: 12px; padding: 14px 16px; overflow-x: auto; font-size: .86rem; }
.static-page code { font-size: .9em; }
.static-page a, .static-page li, .static-page p, .src a { overflow-wrap: anywhere; }
.static-page table { display: block; overflow-x: auto; max-width: 100%; }
.static-page :not(pre) > code { background: var(--wash); padding: 1px 6px; border-radius: 6px; }

/* ---------- footer */
.site-foot { position: relative; background: radial-gradient(800px 300px at 15% 0%, rgba(79, 70, 229, .35), transparent 70%), radial-gradient(700px 300px at 90% 100%, rgba(6, 182, 212, .2), transparent 70%), #0b1533;
  color: #c3cbe8; margin-top: 64px; padding: 56px 0 32px; font-size: .92rem; }
.site-foot::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--grad); }
.site-foot a { color: #e8ecff; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); gap: 32px; }
.foot-grid h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: #8e9bd0; margin: 0 0 12px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { padding: 4px 0; }
.foot-brand p { color: #a9b4dc; max-width: 36ch; margin: 14px 0 0; }
.brand-foot { color: #fff; }
.brand-foot:hover { color: #fff; text-decoration: none !important; }
.foot-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px !important; }
.foot-badges li { padding: 4px 10px !important; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); font-size: .8rem; color: #dbe2ff; }
.foot-legal { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: #8e9bd0; font-size: .84rem; }
.foot-machine { display: inline-flex; gap: 16px; }

/* ---------- embed */
.embed-body { padding: 12px; background: transparent; }
.embed-body .calc { margin: 0; }
.embed-body .calc > .stub { position: relative; top: auto; }
.powered { font-size: .85rem; color: var(--ink-3); margin-top: 10px; text-align: end; }

/* ---------- tax-return estimators: interview sections + form-line statement */
.calc-return { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); }
.calc-return .calc-form { padding: 8px 24px 20px; }
.fsec { border-bottom: 1px solid var(--line); }
.fsec:last-of-type { border-bottom: 0; }
.fsec > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 16px 0; cursor: pointer; min-height: 56px; }
.fsec > summary::-webkit-details-marker { display: none; }
.fsec > summary::after { content: ""; margin-inline-start: auto; width: 9px; height: 9px; border-inline-end: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .25s var(--ease); flex: none; }
.fsec[open] > summary::after { transform: rotate(-135deg); }
.fsec-n { flex: none; width: 30px; height: 30px; border-radius: 10px; background: var(--wash); color: var(--brand); display: inline-grid; place-items: center; font-size: .84rem; font-weight: 800; font-variant-numeric: tabular-nums; transition: background .2s, color .2s; }
.fsec[open] .fsec-n { background: var(--grad); color: #fff; box-shadow: 0 6px 14px -6px rgba(79, 70, 229, .6); }
.fsec-t { display: flex; flex-direction: column; font-weight: 700; font-size: 1rem; line-height: 1.3; min-width: 0; }
.fsec-t small { font-weight: 500; font-size: .84rem; color: var(--ink-3); }
.fsec > .fields { padding: 2px 0 20px; }
.calc-return > .stub { max-height: calc(100vh - var(--head-h) - 32px); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.calc-return .stub-lines th { white-space: normal; width: auto; padding-inline-end: 8px; }
.calc-return .stub-lines .lead { width: 28px; min-width: 16px; }
.calc-return .stub-lines .ln { white-space: nowrap; }
.stub-lines tr.k-head th { padding: 20px 0 6px; font-size: .76rem; font-weight: 800; color: var(--brand); letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--line); width: auto; white-space: normal; }
html[lang^="ar"] .stub-lines tr.k-head th { text-transform: none; letter-spacing: 0; font-size: .9rem; }
.stub-lines tr.k-head:first-child th { padding-top: 4px; }
.stub-lines tr.k-sub th, .stub-lines tr.k-sub .amt { font-weight: 750; }
.stub-lines tr.k-info th, .stub-lines tr.k-info .amt { color: var(--ink-3); font-weight: 400; font-size: .92rem; }
.stub-lines tr.k-total + tr.k-head th { padding-top: 28px; }

/* ---------- responsive */
@media (max-width: 1080px) {
  .tool-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .country-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  :root { --head-h: 62px; }
  .nav-main { display: none; }
  .menu-m { display: block; }
  .head-tools { margin-inline-start: auto; }
  .calc, .content, .hero, .calc-return { grid-template-columns: minmax(0, 1fr); }
  .calc > .stub, .calc-return > .stub { position: relative; top: auto; max-height: none; overflow: clip; }
  .aside { position: static; }
  .hero { padding: 40px 0 56px; gap: 32px; }
  .hero h1 { max-width: 18ch; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: -16px; }
  .tool-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-cards { grid-template-columns: minmax(0, 1fr); }
  .mbar { display: flex; }
  .embed-body .mbar { display: none; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --head-h: 60px; }
  body { font-size: 1rem; }
  .head-row { gap: 10px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-word { font-size: 1.06rem; }
  .cp-label { display: none; }
  .country-pick summary { padding: 0 10px 0 6px; gap: 6px; }
  .head-tools > .digits-toggle { display: none; }
  .digits-toggle-m { display: inline-flex; align-items: center; margin: 4px 14px 0; }
  .country-menu { position: fixed; inset-inline: 12px; top: calc(var(--head-h) + 6px); width: auto; grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: clamp(1.75rem, 1.1rem + 4vw, 2.3rem); }
  .page-head { padding-bottom: 22px; }
  .lede { font-size: 1.04rem; }
  .calc { gap: 18px; margin-bottom: 40px; }
  .calc-form { padding: 18px; border-radius: 18px; }
  .calc-return .calc-form { padding: 4px 16px 16px; }
  .calc-form .fields, .quick .fields { grid-template-columns: minmax(0, 1fr); }
  .stub { border-radius: 20px; }
  .stub-head, .stub-body, .stub-foot { padding-inline: 18px; }
  .stub-top { gap: 12px; }
  .donut { width: 92px; height: 92px; }
  .stub-lines th { white-space: normal; width: auto; }
  .stub-lines .lead { width: 18px; min-width: 18px; }
  .stub-lines .lead::after { inset-inline: 4px; }
  .periods { width: 100%; }
  .periods button { flex: 1; padding: 0 6px; }
  .related ul, .tool-list, .tool-cards, .country-cards { grid-template-columns: minmax(0, 1fr); }
  .tool-card { flex-direction: row; align-items: center; padding: 16px; gap: 14px; }
  .tool-card .cc { position: static; margin-inline-start: auto; align-self: center; }
  .tool-ico { width: 42px; height: 42px; }
  .hero { padding: 28px 0 48px; }
  .hero h1 { font-size: clamp(2.1rem, 1.2rem + 6vw, 2.8rem); }
  .hero-cta .btn { flex: 1 1 100%; }
  .quick { padding: 18px; border-radius: 20px; }
  .blob { filter: blur(48px); }
  .b1 { width: 320px; height: 320px; } .b2 { width: 280px; height: 280px; } .b3 { width: 240px; height: 240px; }
  .stats { gap: 10px; margin: -12px 0 56px; }
  .stat { padding: 14px 16px; border-radius: 16px; }
  .block { margin-bottom: 60px; }
  .region-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
  .foot-legal { flex-direction: column; }
  .content-main > section { margin-bottom: 44px; }
  table.data th, table.data td { padding: 10px 12px; }
  .ads-on .ad-slot.sticky-m { position: fixed; bottom: 0; left: 0; right: 0; min-height: 60px; margin: 0; z-index: 30; border-radius: 0; }
  body.view-calc .site-foot { padding-bottom: 100px; }
}
@media (max-width: 520px) {
  .stub-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 14px; }
  .stub-top-main { display: contents; }
  .stub-big { grid-column: 1 / -1; }
  .stub-sub { grid-column: 1; grid-row: 2; }
  .donut { grid-column: 2; grid-row: 2; width: 96px; height: 96px; margin-top: 8px; }
  .stub-lines { font-size: .94rem; }
  .stub-lines .amt { padding-inline-start: 6px; }
}
@media (max-width: 380px) {
  .brand-word { font-size: .98rem; }
  .brand-word b { margin-inline-start: .18em; }
  .head-row { gap: 8px; }
  .country-pick summary { height: 40px; }
  .menu-m summary { width: 40px; height: 40px; }
  .donut { width: 80px; height: 80px; }
  .stub-lines { font-size: .9rem; }
  .stub-sub { gap: 8px 18px; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .menu-countries { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .blob { animation: none !important; }
}

/* ---------- print: a clean payslip */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #000; font-size: 11pt; }
  body::before { content: "Paycheck Math · paycheck-math.com"; display: block; font-weight: 800; font-size: 12pt; margin-bottom: 8pt; color: #312e81; }
  .site-head, .site-foot, .calc-form, .aside, .ad-slot, .related, .periods, .stub-actions, .mbar, .skip, .crumbs, .content-main > section:not(#faq), .faq, .stub-foot > a, .hero-bg { display: none !important; }
  .page-head::before { display: none; }
  .page-head { padding: 0 0 8pt; }
  h1 { font-size: 18pt; max-width: none; }
  .calc, .calc-return { display: block; margin: 0 0 12pt; }
  .stub, .calc > .stub, .calc-return > .stub { position: relative; top: auto; box-shadow: none; border: 1.5pt solid #000; border-radius: 6pt; max-height: none; overflow: visible; break-inside: avoid; }
  .stub::before { background: #000; }
  .stub-big-value { -webkit-text-fill-color: #000; color: #000; background: none; }
  .stub-lines tr.k-total .amt, .stub-lines tr.k-minus .amt { color: #000; }
  .stub-head::before, .stub-head::after { display: none; }
  .reveal-ready .reveal, .reveal { opacity: 1 !important; transform: none !important; }
  .content { display: block; }
  .reviewer, .disclaimer { font-size: 9pt; }
  a { color: #000; text-decoration: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
