/* Bloguu design system — Indigo & slate
   All colour, spacing and type decisions live here as custom properties.
   Never hardcode a colour anywhere else in the project. */

:root {
  /* Brand ramp */
  --c-primary: #312E81;
  --logo-bg: #312E81;
  --c-primary-mid: #4F46E5;
  --c-primary-light: #818CF8;
  --c-primary-tint: #EEF0FF;
  --c-accent: #F59E0B;
  --c-accent-tint: #FEF3C7;

  /* Surfaces */
  --bg-page: #F7F8FC;
  --bg-surface: #FFFFFF;
  --bg-sunken: #F1F2F9;

  /* Text */
  --text-strong: #1F2340;
  --text-body: #3F4460;
  --text-muted: #6B7086;
  --text-invert: #FFFFFF;
  --text-on-tint: #312E81;

  /* Lines */
  --line: #E2E4F0;
  --line-strong: #C9CCE0;

  /* Status */
  --c-error: #DC2626;
  --c-error-tint: #FEF2F2;
  --c-success: #059669;
  --c-success-tint: #ECFDF5;
  --c-warn: #B45309;
  --c-warn-tint: #FFFBEB;

  /* Chart series — used by canvas drawing in utils.js */
  --chart-1: #4F46E5;
  --chart-2: #F59E0B;
  --chart-3: #818CF8;
  --chart-4: #312E81;
  --chart-5: #059669;
  --chart-grid: #E2E4F0;

  /* Type */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* 8px spacing grid */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s6: 48px;
  --s8: 64px;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;

  --shadow-card: 0 1px 2px rgba(31, 35, 64, .06);
  --shadow-raise: 0 4px 16px rgba(31, 35, 64, .10);

  --maxw: 1200px;
}

body.dark {
  --logo-bg: #4F46E5;
  --bg-page: #12121C;
  --bg-surface: #1E1E2E;
  --bg-sunken: #171725;

  --text-strong: #F5F6FB;
  --text-body: #DCDEEA;
  --text-muted: #AEB2C8;
  --text-on-tint: #D4D7FF;

  --line: #34354D;
  --line-strong: #4B4D70;

  --c-primary: #A5B4FC;
  --c-primary-mid: #6366F1;
  --c-primary-light: #818CF8;
  --c-primary-tint: #23233C;
  --c-accent-tint: #33280F;

  --c-error: #F87171;
  --c-error-tint: #341A1A;
  --c-success: #34D399;
  --c-success-tint: #12301F;
  --c-warn: #FBBF24;
  --c-warn-tint: #33280F;

  --chart-1: #818CF8;
  --chart-2: #FBBF24;
  --chart-3: #A5B4FC;
  --chart-4: #6366F1;
  --chart-5: #34D399;
  --chart-grid: #2E2F45;

  --shadow-card: none;
  --shadow-raise: 0 4px 16px rgba(0, 0, 0, .4);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
/* The hidden attribute must always win, even over classes that set display. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-body);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { color: var(--text-strong); line-height: 1.3; margin: 0 0 var(--s2); font-weight: 600; }
h1 { font-size: 2.5rem; letter-spacing: -.02em; }
h2 { font-size: 2rem; letter-spacing: -.015em; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.125rem; }
p { margin: 0 0 var(--s2); }
a { color: var(--c-primary-mid); text-decoration: none; }
a:hover { text-decoration: underline; }
small, .small { font-size: .875rem; }

:focus-visible {
  outline: 3px solid var(--c-primary-mid);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--c-primary); color: var(--text-invert);
  padding: var(--s1) var(--s2); border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s3); }
.narrow { max-width: 780px; }

/* Header */
.site-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  display: flex; align-items: center; gap: var(--s3);
  min-height: 68px;
}
.logo {
  font-size: 1.375rem; font-weight: 700; letter-spacing: -.03em;
  color: var(--text-strong); text-decoration: none; flex-shrink: 0;
  line-height: 1.15;
}
.logo:hover { text-decoration: none; }
.logo small {
  display: block;
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  line-height: 1.2;
}
@media (max-width: 560px) { .logo small { display: none; } }
.logo span { color: var(--c-primary-mid); }

.main-nav { display: flex; gap: var(--s3); margin-left: auto; align-items: center; }
.main-nav a { color: var(--text-body); font-size: .9375rem; font-weight: 500; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--c-primary-mid); text-decoration: none; }

.header-tools { display: flex; gap: var(--s1); align-items: center; }

.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line);
  border-radius: var(--radius-sm); color: var(--text-body); cursor: pointer;
}
.icon-btn:hover { background: var(--bg-sunken); border-color: var(--line-strong); }
.icon-btn svg { width: 20px; height: 20px; }

.currency-select {
  height: 40px; padding: 0 var(--s2); font-family: inherit; font-size: .875rem;
  background: transparent; color: var(--text-body);
  border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
}

.nav-toggle { display: none; }

/* Breadcrumb */
.breadcrumb { font-size: .8125rem; color: var(--text-muted); padding: var(--s3) 0 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s1); margin: 0; padding: 0; }
.breadcrumb li::after { content: "/"; margin-left: var(--s1); color: var(--line-strong); }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { color: var(--text-muted); }

/* Hero */
.hero { padding: var(--s8) 0 var(--s6); text-align: center; }
.hero h1 { max-width: 18ch; margin-inline: auto; }
.hero p { max-width: 60ch; margin-inline: auto; color: var(--text-muted); font-size: 1.125rem; }
.hero-actions { display: flex; gap: var(--s2); justify-content: center; flex-wrap: wrap; margin-top: var(--s3); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s1);
  min-height: 48px; padding: 0 var(--s3);
  font-family: inherit; font-size: 1rem; font-weight: 600;
  border-radius: var(--radius-lg); border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: transform .12s ease, background-color .12s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--c-primary-mid); color: #FFFFFF; box-shadow: var(--shadow-card); }
.btn-primary:hover { background: var(--c-primary); transform: scale(1.02); }
.btn-secondary { background: var(--bg-surface); color: var(--text-strong); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--bg-sunken); transform: scale(1.02); }
.btn-ghost {
  background: transparent; color: var(--text-body); border-color: var(--line);
  min-height: 40px; padding: 0 var(--s2); font-size: .875rem; border-radius: var(--radius-sm);
}
.btn-ghost:hover { background: var(--bg-sunken); }
.btn-block { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .btn:hover { transform: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Section headings */
.section { padding: var(--s6) 0; }
.section-head { margin-bottom: var(--s4); }
.section-head h2 { margin-bottom: var(--s1); }
.section-head p { color: var(--text-muted); margin: 0; }

/* Card grid */
.grid { display: grid; gap: var(--s2); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.tool-card {
  display: flex; flex-direction: column; gap: var(--s1);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--c-primary-mid);
  border-radius: var(--radius);
  padding: var(--s3);
  color: inherit; text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: box-shadow .15s ease, border-color .15s ease;
}
.tool-card:hover { text-decoration: none; box-shadow: var(--shadow-raise); border-color: var(--line-strong); }
.tool-card .ico { color: var(--c-primary-mid); margin-bottom: var(--s1); }
.tool-card .ico svg { width: 28px; height: 28px; }
.tool-card h3 { font-size: 1.0625rem; margin: 0; }
.tool-card p { font-size: .875rem; color: var(--text-muted); margin: 0; }

.tool-card.featured { border-top-color: var(--c-accent); }
.tool-card.featured .ico { color: var(--c-accent); }

/* Trust strip */
.trust { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.trust div { text-align: center; }
.trust svg { width: 28px; height: 28px; color: var(--c-primary-mid); margin-bottom: var(--s1); }
.trust h3 { font-size: 1rem; margin-bottom: 4px; }
.trust p { font-size: .875rem; color: var(--text-muted); margin: 0; }

/* Ad slots — fixed reserved height prevents layout shift (CLS) */
.ad-slot {
  display: flex; align-items: center; justify-content: center;
  margin: var(--s4) auto; overflow: hidden;
  background: var(--bg-sunken); border-radius: var(--radius-sm);
}
.ad-slot::before {
  content: "Advertisement"; font-size: .6875rem; color: var(--text-muted); letter-spacing: .04em;
}
.ad-slot:has(ins)::before { content: none; }
.ad-leaderboard { width: 100%; max-width: 728px; min-height: 90px; }
.ad-rectangle { width: 100%; max-width: 336px; min-height: 280px; }
@media (max-width: 767px) {
  .ad-leaderboard { max-width: 320px; min-height: 100px; }
}

/* Article prose */
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.625rem; margin-top: var(--s6); }
.prose h3 { font-size: 1.25rem; margin-top: var(--s4); }
.prose ul, .prose ol { padding-left: var(--s3); margin: 0 0 var(--s2); }
.prose li { margin-bottom: var(--s1); }

/* FAQ */
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-surface); padding: var(--s2) var(--s3); margin-bottom: var(--s1);
}
.faq summary {
  cursor: pointer; font-weight: 600; color: var(--text-strong); list-style: none;
  display: flex; justify-content: space-between; gap: var(--s2); align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.25rem; color: var(--c-primary-mid); flex-shrink: 0; }
.faq details[open] summary::after { content: "\2212"; }
.faq details[open] summary { margin-bottom: var(--s1); }
.faq p:last-child { margin-bottom: 0; }

/* Related links */
.related { display: grid; gap: var(--s2); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Disclaimer callouts */
.callout {
  border-radius: var(--radius); border-radius: 0;
  padding: var(--s2) var(--s3); margin: var(--s3) 0;
  font-size: .9375rem;
}
.callout-warn { background: var(--c-warn-tint); border-left: 4px solid var(--c-warn); color: var(--text-body); }
.callout-info { background: var(--c-primary-tint); border-left: 4px solid var(--c-primary-mid); color: var(--text-body); }
.callout strong { color: var(--text-strong); }
.callout p:last-child { margin-bottom: 0; }

/* Footer */
.site-footer {
  background: var(--bg-surface); border-top: 1px solid var(--line);
  padding: var(--s6) 0 var(--s3); margin-top: var(--s8);
}
.footer-grid { display: grid; gap: var(--s4); grid-template-columns: 1.5fr repeat(4, 1fr); }
.footer-grid h4, .footer-grid .footer-h { font-size: .9375rem; margin-bottom: var(--s1); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-grid a { color: var(--text-muted); font-size: .875rem; }
.footer-grid a:hover { color: var(--c-primary-mid); }
.footer-tagline { color: var(--text-muted); font-size: .875rem; max-width: 34ch; }
.footer-bottom {
  border-top: 1px solid var(--line); margin-top: var(--s4); padding-top: var(--s3);
  display: flex; justify-content: space-between; gap: var(--s2); flex-wrap: wrap;
  font-size: .8125rem; color: var(--text-muted);
}

@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s3); }
}
@media (max-width: 767px) {
  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.5rem; }
  .hero { padding: var(--s4) 0 var(--s3); }
  .section { padding: var(--s4) 0; }
  .wrap { padding: 0 var(--s2); }
  .nav-toggle { display: grid; }
  .main-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-surface); border-bottom: 1px solid var(--line);
    padding: var(--s1) var(--s2) var(--s2);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: var(--s1) 0; }
}

/* Print */
@media print {
  .site-header, .site-footer, .ad-slot, .btn, .faq, .related, .more-calcs, .breadcrumb { display: none !important; }
  body { background: #fff; color: #000; }
  .wrap { max-width: none; padding: 0; }
}



/* Redesign layer */

.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark { width: 34px; height: 34px; flex-shrink: 0; }
.logo small {
  display: block; font-size: .5625rem; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted); margin-top: 2px; white-space: nowrap;
}
@media (max-width: 620px) { .logo small { display: none; } }

.main-nav { margin: 0 auto; gap: var(--s1); }
.main-nav a { padding: 8px 14px; border-radius: 999px; font-size: .9375rem; }
.main-nav a[aria-current="page"] { background: var(--c-primary-tint); color: var(--text-on-tint); }

.eyebrow {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  background: var(--c-primary-tint); color: var(--text-on-tint);
  font-size: .6875rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  margin-bottom: var(--s3);
}
.hero { padding: var(--s8) 0 var(--s6); background: var(--bg-sunken); }
.hero h1 { font-size: 3rem; max-width: 18ch; }
@media (max-width: 767px) { .hero h1 { font-size: 2rem; } }

.searchbar { display: flex; max-width: 620px; margin: var(--s3) auto 0; }
.searchbar .shell {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: var(--bg-surface); border: 1px solid var(--line);
  border-radius: 999px 0 0 999px; padding: 0 var(--s3); min-height: 52px; min-width: 0;
}
@media (max-width: 480px) {
  .searchbar .shell { padding: 0 var(--s2); }
  .searchbar button { padding: 0 var(--s2); }
}
.searchbar .shell:focus-within { border-color: var(--c-primary-mid); }
.searchbar .shell svg { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }
.searchbar input {
  flex: 1; border: 0; background: transparent; color: var(--text-strong);
  font-family: inherit; font-size: 1rem; min-width: 0;
}
.searchbar input:focus { outline: none; }
.searchbar button {
  border: 0; background: var(--c-primary-mid); color: #fff; cursor: pointer;
  font-family: inherit; font-size: .9375rem; font-weight: 600;
  padding: 0 var(--s4); border-radius: 0 999px 999px 0; min-height: 52px;
}
.searchbar button:hover { background: var(--c-primary); }
.search-results {
  max-width: 620px; margin: var(--s1) auto 0; text-align: left;
  background: var(--bg-surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.search-results:empty { display: none; border: 0; }
.search-results a { display: block; padding: 12px var(--s3); color: var(--text-strong); font-size: .9375rem; }
.search-results a:hover { background: var(--bg-sunken); text-decoration: none; }
.search-results a span { display: block; font-size: .8125rem; color: var(--text-muted); }

.trust-chips {
  display: flex; gap: var(--s3); justify-content: center; flex-wrap: wrap;
  margin-top: var(--s3); font-size: .875rem; color: var(--text-muted);
}
.trust-chips span { display: inline-flex; align-items: center; gap: 7px; }
.trust-chips svg { width: 16px; height: 16px; color: var(--c-primary-mid); }

.cat-tiles { display: grid; gap: var(--s2); grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.cat-tile {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: var(--s3) var(--s2); background: var(--bg-surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text-strong); font-size: .9375rem; font-weight: 500; text-align: center;
}
.cat-tile:hover { text-decoration: none; border-color: var(--c-primary-mid); }
.cat-tile i { display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 10px; background: var(--c-primary-tint); color: var(--c-primary-mid); }
.cat-tile svg { width: 20px; height: 20px; }

.grid { gap: var(--s2); grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.tool-card { position: relative; border-top-width: 1px; border-top-color: var(--line); gap: 6px; }
.tool-card .ico {
  display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: var(--s2);
  border-radius: 10px; background: var(--c-primary-tint); color: var(--c-primary-mid);
}
.tool-card .ico svg { width: 19px; height: 19px; }
.tool-card::after {
  content: ""; position: absolute; top: 26px; right: 22px; width: 15px; height: 15px;
  opacity: .35; background: var(--text-muted);
  -webkit-mask: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
  mask: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
  transition: transform .15s ease, opacity .15s ease;
}
.tool-card:hover::after { transform: translateX(3px); opacity: .9; background: var(--c-primary-mid); }
.tool-card.featured { border-top-color: var(--line); }
.tool-card.featured .ico { background: var(--c-accent-tint); color: var(--c-warn); }

.band { background: var(--bg-sunken); padding: var(--s6) 0; }
.band-surface { background: var(--bg-surface); padding: var(--s6) 0; }

.chips-filter { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: var(--s3); }
.chips-filter button {
  min-height: 40px; padding: 0 var(--s3); border-radius: 999px; cursor: pointer;
  background: var(--bg-surface); border: 1px solid var(--line);
  color: var(--text-body); font-family: inherit; font-size: .875rem; font-weight: 500;
}
.chips-filter button:hover { border-color: var(--c-primary-mid); }
.chips-filter button[aria-pressed="true"] {
  background: var(--c-primary-mid); border-color: var(--c-primary-mid); color: #fff;
}
.tool-card[hidden] { display: none; }

.steps-3 { display: grid; gap: var(--s2); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.step-box { background: var(--bg-sunken); border-radius: var(--radius); padding: var(--s3); }
.step-box .n {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: var(--c-primary-tint); color: var(--text-on-tint);
  font-size: .8125rem; font-weight: 600; margin-bottom: var(--s2);
}
.step-box h3 { font-size: 1rem; margin-bottom: 6px; }
.step-box p { font-size: .875rem; color: var(--text-muted); margin: 0; }

/* Native dropdown lists are drawn by the OS, so the page must declare its scheme. */
:root { color-scheme: light; }
body.dark { color-scheme: dark; }

.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;
}

/* Tablet widths: drop the logo tagline and tighten the menu so the header
   never pushes the page wider than the screen. */
@media (min-width: 768px) and (max-width: 1000px) {
  .logo small { display: none; }
  .main-nav { gap: 2px; }
  .main-nav a { padding: 8px 10px; }
}

/* ---------- Install app icon (header) ---------- */
.install-btn[hidden] { display: none; }
.install-btn:not([hidden]) { display: grid; place-items: center; }

/* Footer logo: mark + word, no gap inside the word. */
.site-footer .logo { display: inline-flex; align-items: center; gap: 8px; }
.site-footer .logo .logo-mark { width: 28px; height: 28px; }
.logo-text { display: block; }
.logo .logo-text { color: var(--c-primary); }
.logo .logo-text > span { color: var(--c-primary-mid); }
.logo .logo-text small { color: var(--text-muted); }
body.dark .logo .logo-text { color: var(--text-strong); }
body.dark .logo .logo-text > span { color: var(--c-primary); }

/* Small phones: room for logo, currency, install, theme and menu in one row. */
@media (max-width: 480px) {
  .header-inner { gap: 8px; }
  .header-tools { gap: 6px; }
  .header-tools .icon-btn { width: 36px; height: 36px; }
  .header-tools .icon-btn svg { width: 18px; height: 18px; }
  .currency-select { height: 36px; padding: 0 4px 0 8px; font-size: .8125rem; max-width: 104px; }
  .site-header .logo { font-size: 1.2rem; gap: 7px; }
  .site-header .logo-mark { width: 30px; height: 30px; }
}
@media (max-width: 370px) {
  .site-header .logo-text { display: none; }
}


/* ── October 2026 polish ────────────────────────────────────────────── */

/* Dark mode: native dropdown lists. Some browsers (Chrome on Windows) draw
   the option list with a white background but inherit the light text color,
   which made options nearly invisible. Give options explicit colors. */
html:has(body.dark) { color-scheme: dark; }
select option, select optgroup { background-color: var(--bg-surface); color: var(--text-strong); }
body.dark select option:checked { background-color: var(--c-primary-mid); color: #fff; }

/* Placeholders: readable in both themes without looking like real input. */
body.dark input::placeholder, body.dark textarea::placeholder { color: #8F93AD; opacity: 1; }

/* Empty ad slots stay out of sight until an AdSense unit is pasted in,
   so the site never shows grey "Advertisement" boxes with nothing in them. */
.ad-slot:empty { display: none !important; }

/* Centered section heads (replaces inline styles). */
.section-head.center { text-align: center; }

/* Category page hero */
.page-hero { padding: var(--s4) 0 var(--s3); text-align: center; }
.page-hero p { color: var(--text-muted); max-width: 60ch; margin-inline: auto; font-size: 1.0625rem; }
#filter-empty { text-align: center; color: var(--text-muted); margin-top: var(--s3); }

/* Homepage: every calculator once, grouped by category */
.cat-cards { display: grid; gap: var(--s3); grid-template-columns: repeat(3, 1fr); }
.cat-card {
  display: flex; flex-direction: column; gap: var(--s2);
  background: var(--bg-page); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--s3);
}
.cat-card-head { display: flex; gap: 14px; align-items: flex-start; }
.cat-ico {
  flex-shrink: 0; display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 12px; background: var(--c-primary-tint); color: var(--c-primary-mid);
}
.cat-ico svg { width: 22px; height: 22px; }
.cat-card h3 { font-size: 1.125rem; margin: 2px 0 4px; }
.cat-card h3 a { color: var(--text-strong); }
.cat-card-head p { font-size: .875rem; color: var(--text-muted); margin: 0; }
.cat-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cat-links a {
  display: block; padding: 8px 10px; border-radius: 8px;
  color: var(--text-body); font-size: .9375rem; font-weight: 500;
}
.cat-links a:hover { background: var(--c-primary-tint); color: var(--text-on-tint); text-decoration: none; }
.cat-more {
  margin-top: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: .875rem; font-weight: 600; color: var(--c-primary-mid);
}
body.dark .cat-more { color: var(--c-primary); }
.cat-more svg { width: 16px; height: 16px; transition: transform .15s ease; }
.cat-more:hover { text-decoration: none; }
.cat-more:hover svg { transform: translateX(3px); }
.cat-tiles-2 { max-width: 560px; margin: 0 auto; grid-template-columns: 1fr 1fr; }

@media (max-width: 1000px) {
  .cat-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .cat-cards { grid-template-columns: 1fr; }
  .cat-links { grid-template-columns: 1fr 1fr; }
  .cat-links a { padding: 8px 6px; font-size: .875rem; }
  /* Most-used cards: compact two-column tiles on phones instead of a long list. */
  .grid-popular { grid-template-columns: 1fr 1fr; gap: 10px; }
  .grid-popular .tool-card { padding: 14px; }
  .grid-popular .tool-card .ico { margin-bottom: 6px; width: 34px; height: 34px; }
  .grid-popular .tool-card h3 { font-size: .9375rem; }
  .grid-popular .tool-card p { display: none; }
  .grid-popular .tool-card::after { display: none; }
  .band, .band-surface { padding: var(--s4) 0; }
}

/* Tablet header: five menu items plus tools on one row. */
@media (min-width: 768px) and (max-width: 1000px) {
  .main-nav a { padding: 8px 8px; font-size: .875rem; }
}

/* Footer link to the full category list */
.footer-grid .footer-all { color: var(--c-primary-mid); font-weight: 500; }
body.dark .footer-grid .footer-all { color: var(--c-primary); }
