/* ==========================================================================
   أرقامي — Design System
   RTL-first, light + dark, no viewport-based font scaling.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  --font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-display: "Rubik", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;

  /* Neutrals */
  --paper: #ffffff;
  --paper-2: #f5f7f6;
  --paper-3: #eceff0;
  --line: #e3e7e8;
  --line-2: #cfd6d7;
  --ink: #0c1a1f;
  --ink-2: #45585f;
  --ink-3: #6d8087;
  --ink-4: #93a3a8;

  /* Brand: deep teal-green */
  --brand: #0f7a6c;
  --brand-strong: #0b5f54;
  --brand-deep: #083f39;
  --brand-soft: #e6f4f1;
  --brand-soft-2: #d3ebe6;
  --on-brand: #ffffff;

  /* Accent: amber */
  --accent: #a9691a;
  --accent-strong: #8a5412;
  --accent-soft: #fdf3e3;
  --accent-line: #f0dcbc;

  /* Semantic */
  --good: #10714a;
  --good-soft: #e6f4ec;
  --warn: #9a5b06;
  --warn-soft: #fdf1df;
  --bad: #a8232b;
  --bad-soft: #fdecec;

  /* Category accents */
  --cat-money: #0f7a6c;
  --cat-money-soft: #e6f4f1;
  --cat-finance: #2f5fa8;
  --cat-finance-soft: #e8effa;
  --cat-faith: #a9691a;
  --cat-faith-soft: #fdf3e3;
  --cat-health: #a8384a;
  --cat-health-soft: #fcecef;
  --cat-daily: #4a5f66;
  --cat-daily-soft: #eef1f2;

  /* Dark band (hero / footer) */
  --band: #0a1f24;
  --band-2: #0d2930;
  --band-line: #1d3f47;
  --band-ink: #eaf2f1;
  --band-ink-2: #9fb6b8;
  --band-brand: #4fd1bd;

  --shadow-xs: 0 1px 2px rgba(12, 26, 31, .06);
  --shadow-sm: 0 1px 3px rgba(12, 26, 31, .07), 0 1px 2px rgba(12, 26, 31, .04);
  --shadow-md: 0 4px 12px rgba(12, 26, 31, .07), 0 2px 4px rgba(12, 26, 31, .04);
  --shadow-lg: 0 12px 32px rgba(12, 26, 31, .10), 0 4px 10px rgba(12, 26, 31, .05);

  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 10px;
  --r-full: 999px;

  --header-h: 62px;
  --container: 1160px;
  --narrow: 760px;

  --ease: cubic-bezier(.2, .7, .3, 1);
}

[data-theme="dark"] {
  color-scheme: dark;

  --paper: #0d1a1e;
  --paper-2: #111f24;
  --paper-3: #16262c;
  --line: #223a41;
  --line-2: #2e4b53;
  --ink: #eef4f4;
  --ink-2: #b3c4c6;
  --ink-3: #8ba0a3;
  --ink-4: #6d8386;

  --brand: #34b8a5;
  --brand-strong: #2aa392;
  --brand-deep: #0b3d38;
  --brand-soft: #123330;
  --brand-soft-2: #16403b;
  --on-brand: #04191a;

  --accent: #e0a458;
  --accent-strong: #eab878;
  --accent-soft: #2b2114;
  --accent-line: #3d2f1c;

  --good: #4cc38a;
  --good-soft: #122c22;
  --warn: #e0a458;
  --warn-soft: #2b2114;
  --bad: #f2838a;
  --bad-soft: #2e1719;

  --cat-money: #34b8a5;
  --cat-money-soft: #123330;
  --cat-finance: #7aa5e2;
  --cat-finance-soft: #17253c;
  --cat-faith: #e0a458;
  --cat-faith-soft: #2b2114;
  --cat-health: #e5909d;
  --cat-health-soft: #331a20;
  --cat-daily: #9fb6b8;
  --cat-daily-soft: #1a262b;

  --band: #0a171b;
  --band-2: #0e2126;
  --band-line: #1e3a41;
  --band-ink: #eaf2f1;
  --band-ink-2: #9fb6b8;
  --band-brand: #4fd1bd;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .45);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .45);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: 1.3;
  margin: 0;
  font-weight: 600;
  letter-spacing: 0;
  text-wrap: balance;
}

p { margin: 0; }

img, svg, video { display: block; max-width: 100%; }

a {
  color: var(--brand);
  text-decoration: none;
  transition: color .15s var(--ease), opacity .15s var(--ease);
}
a:hover { color: var(--brand-strong); }

button, input, select, textarea { font: inherit; color: inherit; }

ul, ol { margin: 0; padding: 0; }

table { border-collapse: collapse; width: 100%; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 32px 0;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

::selection { background: var(--brand-soft-2); color: var(--ink); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.container-narrow {
  width: 100%;
  max-width: var(--narrow);
  margin-inline: auto;
  padding-inline: 20px;
}

.section { padding-block: 64px; }
.section-sm { padding-block: 40px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.section-head p {
  color: var(--ink-2);
  font-size: .95rem;
  margin-top: 6px;
  max-width: 60ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--brand);
  text-transform: none;
  margin-bottom: 10px;
}

.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  top: 8px;
  z-index: 200;
  background: var(--brand);
  color: var(--on-brand);
  padding: 10px 16px;
  border-radius: var(--r-sm);
  font-weight: 600;
}
.skip-link:focus { inset-inline-start: 16px; color: var(--on-brand); }

/* ---------- Icons ---------- */
.ico {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.ico-sm { width: 16px; height: 16px; }
.ico-lg { width: 24px; height: 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.16rem;
  flex: 0 0 auto;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: var(--r-md);
  background: var(--brand);
  color: var(--on-brand);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.brand-mark svg { width: 18px; height: 18px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline-start: 14px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: .93rem;
  font-weight: 500;
  white-space: nowrap;
}
.nav-link:hover { background: var(--paper-2); color: var(--ink); }
.nav-link[aria-current="page"] { color: var(--brand); font-weight: 600; }

.header-actions {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding-inline: 10px 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--r-sm);
  color: var(--ink-3);
  font-size: .88rem;
  cursor: pointer;
  min-width: 168px;
}
.search-trigger:hover { border-color: var(--line-2); color: var(--ink-2); }
.search-trigger kbd {
  margin-inline-start: auto;
  font-family: var(--font-body);
  font-size: .7rem;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink-4);
  border-radius: var(--r-xs);
  padding: 1px 5px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-2);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--line-2); color: var(--ink); }

/* مفتاح الوضع الليلي: يعرض شمسًا في النهاري وقمرًا في الليلي */
.theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun { display: none; }
[data-theme="dark"] .theme-icon-moon { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-icon-moon { display: block; }
}

.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding-inline: 18px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), transform .08s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-strong); color: var(--on-brand); }

.btn-ghost {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--line-2); background: var(--paper-2); color: var(--ink); }

.btn-quiet {
  background: transparent;
  color: var(--ink-2);
  padding-inline: 12px;
}
.btn-quiet:hover { background: var(--paper-2); color: var(--ink); }

.btn-dark { background: var(--band); color: var(--band-ink); }
.btn-dark:hover { background: var(--band-2); color: var(--band-ink); }

.btn-sm { height: 34px; padding-inline: 12px; font-size: .86rem; }
.btn-lg { height: 48px; padding-inline: 24px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--band);
  color: var(--band-ink);
  overflow: hidden;
  border-bottom: 1px solid var(--band-line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to inline-start, rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .75), transparent 78%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .75), transparent 78%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  padding-block: 68px 60px;
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.25;
  max-width: 22ch;
}

.hero-lede {
  margin-top: 16px;
  font-size: 1.06rem;
  color: var(--band-ink-2);
  max-width: 62ch;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--band-line);
  background: rgba(255, 255, 255, .04);
  border-radius: var(--r-full);
  font-size: .82rem;
  font-weight: 600;
  color: var(--band-brand);
  margin-bottom: 18px;
}

.hero-search {
  margin-top: 26px;
  max-width: 560px;
}

.hero-search .search-trigger {
  width: 100%;
  height: 52px;
  min-width: 0;
  background: rgba(255, 255, 255, .06);
  border-color: var(--band-line);
  color: var(--band-ink-2);
  font-size: 1rem;
  padding-inline: 16px 12px;
}
.hero-search .search-trigger:hover { background: rgba(255, 255, 255, .1); color: var(--band-ink); border-color: #2b5560; }
.hero-search .search-trigger kbd {
  background: rgba(255, 255, 255, .07);
  border-color: var(--band-line);
  color: var(--band-ink-2);
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding-inline: 13px;
  border-radius: var(--r-full);
  border: 1px solid var(--band-line);
  background: rgba(255, 255, 255, .04);
  color: var(--band-ink);
  font-size: .87rem;
  font-weight: 500;
}
.chip:hover { background: rgba(255, 255, 255, .1); color: #fff; border-color: #2b5560; }
.chip .ico { width: 15px; height: 15px; color: var(--band-brand); }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--band-line);
}
.hero-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.hero-stat span { font-size: .84rem; color: var(--band-ink-2); }

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
}

.card-pad { padding: 22px; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 14px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease);
}
.tool-card:hover {
  color: var(--ink);
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tool-card-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-strong);
}
.tool-card-icon .ico { width: 20px; height: 20px; }

.tool-card h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
}

.tool-card p {
  font-size: .875rem;
  color: var(--ink-2);
  line-height: 1.6;
  flex: 1;
}

.tool-card-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--brand);
  margin-top: 2px;
}

/* ---------- Calculator shell ---------- */
.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  align-items: start;
}

.calc-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.calc-form { padding: 22px; }

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }

.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}

.field-help {
  font-size: .8rem;
  color: var(--ink-3);
  margin-top: 6px;
  line-height: 1.5;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input {
  width: 100%;
  height: 46px;
  padding-inline: 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
  -moz-appearance: textfield;
}
.input::-webkit-outer-spin-button,
.input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input:hover { border-color: var(--ink-4); }
.input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.input.is-error { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }

.input-suffix {
  position: absolute;
  inset-inline-end: 13px;
  font-size: .85rem;
  color: var(--ink-3);
  pointer-events: none;
  background: var(--paper);
  padding-inline: 4px;
}
.input.has-suffix { padding-inline-end: 58px; }

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

.segment {
  flex: 1;
  position: relative;
}
.segment input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.segment span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  border-radius: var(--r-xs);
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink-2);
  text-align: center;
  padding-inline: 6px;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.segment:hover span { color: var(--ink); }
.segment input:checked + span {
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}
.segment input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--paper-2);
  cursor: pointer;
}
.check-row:hover { border-color: var(--line-2); }
.check-row input {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--brand);
  flex: 0 0 auto;
  cursor: pointer;
}
.check-row span { font-size: .875rem; color: var(--ink-2); line-height: 1.5; }

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.field[hidden] { display: none; }

.select {
  width: 100%;
  height: 46px;
  padding-inline: 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--paper);
  color: var(--ink);
  font-size: .95rem;
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(0% + 18px) 50%, calc(0% + 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-inline-start: 34px;
}
.select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* ---------- Results ---------- */
.calc-results {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  padding: 22px;
}

.result-primary {
  background: var(--brand-deep);
  color: #fff;
  border-radius: var(--r-md);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}

.result-primary-label {
  font-size: .87rem;
  color: rgba(255, 255, 255, .72);
  font-weight: 500;
}

.result-primary-value {
  font-family: var(--font-display);
  font-size: 2.35rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.result-primary-value .unit { font-size: 1rem; font-weight: 500; color: rgba(255, 255, 255, .8); }
.result-primary-sub {
  margin-top: 8px;
  font-size: .875rem;
  color: rgba(255, 255, 255, .8);
  line-height: 1.6;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 13px 14px;
}
.stat-label { font-size: .8rem; color: var(--ink-3); }
.stat-value {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 600;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.stat-value .unit { font-size: .78rem; font-weight: 500; color: var(--ink-3); margin-inline-start: 4px; }
.stat.is-good .stat-value { color: var(--good); }
.stat.is-warn .stat-value { color: var(--warn); }
.stat.is-bad .stat-value { color: var(--bad); }

.breakdown { margin-top: 14px; }
.breakdown-title {
  font-size: .84rem;
  font-weight: 700;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.breakdown-list { display: grid; gap: 1px; }
.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: .9rem;
}
.breakdown-row .k { color: var(--ink-2); }
.breakdown-row .v {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.breakdown-row.is-total { background: var(--paper-3); border-color: var(--line-2); }
.breakdown-row.is-total .v { font-size: 1rem; }
.breakdown-row .hint { display: block; font-size: .78rem; color: var(--ink-3); font-weight: 400; }

.bars { display: grid; gap: 10px; margin-top: 14px; }
.bar-row { font-size: .85rem; }
.bar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
  color: var(--ink-2);
}
.bar-head .v { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.bar-track {
  height: 8px;
  background: var(--paper-3);
  border-radius: var(--r-full);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: var(--r-full);
  background: var(--brand);
  transition: width .35s var(--ease);
}
.bar-fill.is-accent { background: var(--accent); }
.bar-fill.is-line { background: var(--ink-4); }

.result-notes {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}
.note {
  display: flex;
  gap: 9px;
  font-size: .84rem;
  color: var(--ink-2);
  line-height: 1.6;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 11px 13px;
}
.note .ico { width: 16px; height: 16px; margin-top: 3px; color: var(--ink-4); }
.note.is-warn { background: var(--warn-soft); border-color: var(--accent-line); color: var(--warn); }
.note.is-warn .ico { color: var(--warn); }
.note.is-good { background: var(--good-soft); color: var(--good); }
.note.is-good .ico { color: var(--good); }

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

/* ---------- Pro card / ads ---------- */
.pro-card {
  background: linear-gradient(160deg, var(--band-2), var(--band));
  border: 1px solid var(--band-line);
  border-radius: var(--r-md);
  padding: 20px;
  color: var(--band-ink);
}
.pro-card h3 { font-size: 1.02rem; color: #fff; }
.pro-card p { font-size: .87rem; color: var(--band-ink-2); margin-top: 8px; line-height: 1.6; }
.pro-card ul { list-style: none; display: grid; gap: 8px; margin: 14px 0 16px; }
.pro-card li {
  display: flex;
  gap: 8px;
  font-size: .86rem;
  color: var(--band-ink);
  align-items: flex-start;
}
.pro-card li .ico { width: 15px; height: 15px; margin-top: 4px; color: var(--band-brand); }

.ad-slot {
  display: none;
  min-height: 0;
}
.ad-slot.is-live {
  display: block;
  min-height: 100px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper-2);
  overflow: hidden;
}
.ad-slot-label {
  display: block;
  font-size: .68rem;
  color: var(--ink-4);
  text-align: center;
  padding-bottom: 4px;
}

.sidebar {
  display: grid;
  gap: 14px;
  position: sticky;
  top: calc(var(--header-h) + 18px);
}

.side-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
}
.side-card h3 {
  font-size: .93rem;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.side-links { display: grid; gap: 2px; }
.side-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 8px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: .88rem;
}
.side-link:hover { background: var(--paper-2); color: var(--ink); }
.side-link .ico { width: 17px; height: 17px; color: var(--brand); }

/* ---------- Page head ---------- */
.page-head {
  padding-block: 26px 22px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .84rem;
  color: var(--ink-3);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--ink-3); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { color: var(--ink-4); display: inline-flex; }
.breadcrumb .sep .ico { width: 14px; height: 14px; }

.page-head h1 {
  font-size: 1.85rem;
  font-weight: 700;
  max-width: 32ch;
}

.page-lede {
  margin-top: 10px;
  font-size: 1rem;
  color: var(--ink-2);
  max-width: 74ch;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 14px;
  font-size: .82rem;
  color: var(--ink-3);
}
.meta-row .meta-item { display: inline-flex; align-items: center; gap: 6px; }
.meta-row .ico { width: 15px; height: 15px; }
.meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-4); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding-inline: 9px;
  border-radius: var(--r-xs);
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: .76rem;
  font-weight: 600;
}

/* ---------- Prose ---------- */
.prose { max-width: 74ch; }
.prose h2 {
  font-size: 1.28rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 12px;
}
.prose h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 26px;
  margin-bottom: 9px;
}
.prose p { margin-bottom: 14px; color: var(--ink-2); }
.prose ul, .prose ol { margin-bottom: 14px; padding-inline-start: 22px; }
.prose li { margin-bottom: 8px; color: var(--ink-2); }
.prose ul li { list-style: disc; }
.prose ol li { list-style: decimal; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose code {
  background: var(--paper-3);
  padding: 2px 6px;
  border-radius: var(--r-xs);
  font-size: .88em;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}

.prose .table-wrap { overflow-x: auto; margin-bottom: 18px; }
.prose table {
  font-size: .9rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.prose th, .prose td {
  border-bottom: 1px solid var(--line);
  padding: 11px 14px;
  text-align: start;
}
.prose th { background: var(--paper-2); font-weight: 600; font-size: .85rem; color: var(--ink); }
.prose td { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.prose tr:last-child td { border-bottom: 0; }

.callout {
  display: flex;
  gap: 12px;
  padding: 15px 17px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  margin: 18px 0;
}
.callout .ico { color: var(--accent); flex: 0 0 auto; margin-top: 3px; }
.callout p { margin: 0; font-size: .9rem; color: var(--accent-strong); }
.callout.is-info { background: var(--brand-soft); border-color: var(--brand-soft-2); }
.callout.is-info .ico { color: var(--brand); }
.callout.is-info p { color: var(--brand-strong); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 8px; max-width: 74ch; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--paper);
  overflow: hidden;
}
.faq-item[open] { border-color: var(--line-2); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  font-weight: 600;
  font-size: .96rem;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .ico {
  color: var(--ink-4);
  transition: transform .2s var(--ease);
  flex: 0 0 auto;
}
.faq-item[open] summary .ico { transform: rotate(180deg); }
.faq-body {
  padding: 0 18px 17px;
  color: var(--ink-2);
  font-size: .93rem;
  line-height: 1.75;
}

.sources { display: grid; gap: 8px; margin-top: 12px; }
.source-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .87rem;
  color: var(--ink-2);
}
.source-link:hover { color: var(--brand); }
.source-link .ico { width: 15px; height: 15px; color: var(--ink-4); }

/* ---------- Value props ---------- */
.props {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.prop { display: flex; flex-direction: column; gap: 10px; }
.prop-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-strong);
}
.prop h3 { font-size: 1rem; font-weight: 600; }
.prop p { font-size: .89rem; color: var(--ink-2); line-height: 1.65; }

/* ---------- Articles ---------- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.article-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
  overflow: hidden;
  color: var(--ink);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease);
}
.article-card:hover {
  color: var(--ink);
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.article-cover {
  aspect-ratio: 16 / 9;
  background: var(--band);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.article-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to inline-start, rgba(255, 255, 255, .07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 30px 30px;
}
.article-cover .ico { width: 34px; height: 34px; color: var(--band-brand); position: relative; }
.article-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.article-body h3 { font-size: 1rem; line-height: 1.5; }
.article-body p { font-size: .87rem; color: var(--ink-2); line-height: 1.65; flex: 1; }
.article-meta { font-size: .78rem; color: var(--ink-3); display: flex; gap: 12px; align-items: center; }

/* ---------- Pricing ---------- */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 16px;
  align-items: start;
}
.plan {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.plan.is-featured {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  position: relative;
}
.plan-badge {
  position: absolute;
  top: -11px;
  inset-inline-start: 22px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: .74rem;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: var(--r-full);
}
.plan h3 { font-size: 1.1rem; }
.plan-desc { font-size: .88rem; color: var(--ink-2); min-height: 42px; }
.plan-price {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.plan-price .per { font-size: .84rem; font-weight: 500; color: var(--ink-3); font-family: var(--font-body); }
.plan ul { list-style: none; display: grid; gap: 9px; }
.plan li { display: flex; gap: 9px; font-size: .89rem; color: var(--ink-2); align-items: flex-start; }
.plan li .ico { width: 16px; height: 16px; margin-top: 4px; color: var(--good); flex: 0 0 auto; }
.plan li.is-off { color: var(--ink-4); }
.plan li.is-off .ico { color: var(--ink-4); }

.compare-wrap { overflow-x: auto; margin-top: 40px; }
.compare {
  font-size: .9rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  min-width: 620px;
}
.compare th, .compare td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  text-align: start;
}
.compare thead th { background: var(--paper-2); font-weight: 600; }
.compare td:not(:first-child) { text-align: center; }
.compare thead th:not(:first-child) { text-align: center; }
.compare tbody tr:last-child td { border-bottom: 0; }
.compare .yes { color: var(--good); display: inline-flex; }
.compare .no { color: var(--ink-4); display: inline-flex; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--band);
  color: var(--band-ink-2);
  margin-top: 72px;
  border-top: 1px solid var(--band-line);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 34px;
  padding-block: 48px 36px;
}

.footer-brand .brand { color: #fff; font-size: 1.1rem; margin-bottom: 12px; }
.footer-brand p { font-size: .87rem; line-height: 1.7; max-width: 38ch; }
.footer-brand .brand-mark { background: var(--brand); }

.footer-col h4 {
  font-size: .84rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; display: grid; gap: 9px; }
.footer-col a { color: var(--band-ink-2); font-size: .87rem; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-block: 18px 28px;
  border-top: 1px solid var(--band-line);
  font-size: .82rem;
}
.footer-bottom-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-bottom a { color: var(--band-ink-2); }
.footer-bottom a:hover { color: #fff; }

/* ---------- Search dialog ---------- */
.dialog {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: none;
  padding: 12vh 16px 16px;
  background: rgba(8, 26, 31, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.dialog[open] { display: block; }

.dialog-panel {
  max-width: 620px;
  margin-inline: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-height: 76vh;
  display: flex;
  flex-direction: column;
}

.dialog-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.dialog-input-row .ico { color: var(--ink-4); }
.dialog-input {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 1rem;
  outline: none;
  color: var(--ink);
}
.dialog-input::placeholder { color: var(--ink-4); }

.dialog-results { overflow-y: auto; padding: 8px; }
.dialog-empty { padding: 26px 16px; text-align: center; color: var(--ink-3); font-size: .9rem; }

.dialog-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: var(--r-sm);
  color: var(--ink);
  cursor: pointer;
}
.dialog-item:hover, .dialog-item.is-active { background: var(--paper-2); color: var(--ink); }
.dialog-item.is-active { box-shadow: inset 0 0 0 1px var(--line-2); }
.dialog-item-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r-xs);
  background: var(--brand-soft);
  color: var(--brand-strong);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.dialog-item-icon .ico { width: 17px; height: 17px; }
.dialog-item-text { min-width: 0; }
.dialog-item-text strong { display: block; font-size: .9rem; font-weight: 600; }
.dialog-item-text span { font-size: .79rem; color: var(--ink-3); }
.dialog-foot {
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  font-size: .75rem;
  color: var(--ink-3);
  display: flex;
  gap: 14px;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 22px;
  inset-inline-start: 50%;
  transform: translateX(50%) translateY(12px);
  background: var(--ink);
  color: var(--paper);
  padding: 11px 18px;
  border-radius: var(--r-full);
  font-size: .87rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  z-index: 200;
  box-shadow: var(--shadow-lg);
}
.toast.is-visible { opacity: 1; transform: translateX(50%) translateY(0); }

/* ---------- Utility ---------- */
.stack-sm > * + * { margin-top: 10px; }
.stack > * + * { margin-top: 18px; }
.stack-lg > * + * { margin-top: 30px; }
.muted { color: var(--ink-2); }
.muted-2 { color: var(--ink-3); }
.small { font-size: .875rem; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 14px; }
.mt-4 { margin-top: 20px; }
.mt-6 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.nowrap { white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.divider { height: 1px; background: var(--line); border: 0; margin-block: 40px; }

.band-section {
  background: var(--paper-2);
  border-block: 1px solid var(--line);
}

.cta-band {
  background: var(--brand-deep);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.cta-band h2 { font-size: 1.4rem; color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .78); margin-top: 8px; font-size: .95rem; max-width: 56ch; }
.cta-band .btn-primary { background: #fff; color: var(--brand-deep); }
.cta-band .btn-primary:hover { background: rgba(255, 255, 255, .88); color: var(--brand-deep); }
.cta-band .btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, .3);
  color: #fff;
}
.cta-band .btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .5); color: #fff; }

/* ---------- Result tables ---------- */
.result-table { margin-top: 14px; }
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--paper);
}
.mini-table {
  width: 100%;
  min-width: 320px;
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
}
.mini-table th, .mini-table td {
  padding: 8px 11px;
  text-align: start;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.mini-table thead th {
  background: var(--paper-2);
  font-weight: 600;
  font-size: .78rem;
  color: var(--ink-2);
}
.mini-table tbody tr:last-child td { border-bottom: 0; }
.mini-table td.k { font-weight: 600; color: var(--ink); }
.mini-table tbody tr:hover td { background: var(--paper-2); }

/* ---------- Saved calculations ---------- */
.saved-list { display: grid; gap: 10px; }
.saved-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
}
.saved-main { display: grid; gap: 4px; flex: 1; min-width: 200px; }
.saved-title { font-weight: 600; font-size: .97rem; }
.saved-summary { font-size: .87rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.saved-date { font-size: .75rem; color: var(--ink-3); }
.saved-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.empty-state {
  display: grid;
  gap: 8px;
  text-align: center;
  padding: 46px 22px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-md);
  background: var(--paper-2);
  color: var(--ink-2);
}

/* ---------- Result feedback ---------- */
.feedback {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
}
.feedback-q { font-size: .9rem; font-weight: 600; }
.feedback-actions { display: flex; gap: 8px; }
.feedback-thanks { font-size: .9rem; color: var(--good); }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  inset-inline-end: 20px;
  bottom: 20px;
  z-index: 80;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: var(--r-full);
  background: var(--paper);
  color: var(--ink-2);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { color: var(--brand); border-color: var(--brand); }

/* ---------- Category accents ---------- */
.tool-card[data-cat="money"] { --cat: var(--cat-money); --cat-soft: var(--cat-money-soft); }
.tool-card[data-cat="finance"] { --cat: var(--cat-finance); --cat-soft: var(--cat-finance-soft); }
.tool-card[data-cat="faith"] { --cat: var(--cat-faith); --cat-soft: var(--cat-faith-soft); }
.tool-card[data-cat="health"] { --cat: var(--cat-health); --cat-soft: var(--cat-health-soft); }
.tool-card[data-cat="daily"] { --cat: var(--cat-daily); --cat-soft: var(--cat-daily-soft); }
.tool-card .tool-card-icon { background: var(--cat-soft, var(--brand-soft)); color: var(--cat, var(--brand-strong)); }
.tool-card .tool-card-foot { color: var(--cat, var(--brand)); }

/* ---------- Print-only header ---------- */
.print-head { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .calc-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; }
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-grid; }
  .search-trigger { min-width: 0; width: 36px; padding: 0; justify-content: center; }
  .search-trigger span, .search-trigger kbd { display: none; }

  .hero-inner { padding-block: 44px 40px; }
  .hero h1 { font-size: 1.78rem; max-width: none; }
  .hero-lede { font-size: 1rem; }
  .hero-stats { gap: 20px; }
  .hero-stat strong { font-size: 1.15rem; }

  .section { padding-block: 46px; }
  .page-head h1 { font-size: 1.45rem; }

  .cta-band { padding: 28px 22px; }
  .cta-band h2 { font-size: 1.2rem; }

  .mobile-nav {
    display: block;
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 12px 16px 18px;
    z-index: 89;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .mobile-nav[hidden] { display: none; }
  .mobile-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 10px;
    border-radius: var(--r-sm);
    color: var(--ink);
    font-size: .95rem;
  }
  .mobile-nav a:hover { background: var(--paper-2); }
  .mobile-nav .mnav-sep { height: 1px; background: var(--line); margin-block: 8px; }
}

@media (min-width: 821px) {
  .mobile-nav { display: none; }
}

@media (max-width: 620px) {
  .field-row { grid-template-columns: 1fr; }
  .result-primary-value { font-size: 1.9rem; }
  .calc-form, .calc-results { padding: 18px; }
  .tool-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 26px; padding-block: 36px 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .plans { grid-template-columns: 1fr; }
  .hero-chips .chip:nth-child(n+4) { display: none; }
}

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .site-header, .site-footer, .sidebar, .ad-slot, .result-actions,
  .hero, .breadcrumb, .cta-band, .toast, .dialog, .pro-card,
  .feedback, .back-to-top, .search-trigger, .icon-btn { display: none !important; }
  .print-head {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 18px;
    border-bottom: 2px solid #0f7a6c;
    font-size: 10pt;
    color: #444;
  }
  .print-head strong { font-size: 13pt; color: #0f7a6c; }
  .calc-layout { grid-template-columns: 1fr; }
  .calc-panel, .result-primary { box-shadow: none; }
  body { font-size: 12pt; }
  .page-head { background: #fff; border-bottom: 1px solid #ccc; }
  a { color: inherit; text-decoration: none; }
  .prose h2 { page-break-after: avoid; }
}
