/* ==========================================================================
   fareja.cash — Brazilian Mint & Deep Ink design system
   Self-hosted typography, architectural pine hero, tabular comparison sheet,
   real brand logo plates safe in light & dark mode, zero external CDNs.
   ========================================================================== */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/bricolage-grotesque-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/bricolage-grotesque-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/bricolage-grotesque-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/bricolage-grotesque-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;

  --paper: #f6f7f4;
  --surface: #ffffff;
  --well: #ecf0ec;
  --well-hover: #e2e8e2;

  --ink: #0f1a17;
  --ink-muted: #46544f;
  --ink-subtle: #5b6b65;

  --pine: #0a4d3c;
  --pine-deep: #07392c;
  --pine-fg: #f3f9f6;
  --pine-muted: #c2dad1;
  --pine-grid: rgba(255, 255, 255, .07);

  --cash: #007a52;
  --cash-hover: #006342;
  --cash-fg: #ffffff;
  --cash-soft: #e5f5ee;
  --cash-line: #a7dec6;
  --mint: #34d399;

  --gold: #9a6700;
  --gold-soft: #fef6df;
  --gold-line: #e9ce83;

  --warn: #8a5300;
  --warn-soft: #fef7dc;
  --warn-line: #e5c25c;

  --bank-fg: #31424a;
  --bank-soft: #edf2f4;
  --bank-line: #c7d4da;

  --rule: #d9e0dc;
  --rule-strong: #b8c4be;

  /* Brand logos always sit on a crisp white plate so dark marks never vanish in dark mode */
  --logo-bg: #ffffff;
  --logo-ring: rgba(15, 26, 23, .11);

  --r-sheet: 12px;
  --r-card: 10px;
  --r-control: 8px;
  --r-badge: 6px;
  --r-pill: 999px;

  --shadow-sheet: 0 18px 40px -24px rgba(7, 30, 22, .35);
  --shadow-pop: 0 14px 32px -10px rgba(15, 26, 23, .22);

  --font-display: 'Bricolage Grotesque', 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
  --font-sans: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --wrap: 1140px;
  --header-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0a100e;
    --surface: #111a17;
    --well: #17231f;
    --well-hover: #1e2d28;

    --ink: #eff4f1;
    --ink-muted: #a4b3ad;
    --ink-subtle: #899a93;

    --pine: #0f342a;
    --pine-deep: #0a261e;
    --pine-fg: #eff7f4;
    --pine-muted: #b6d1c6;
    --pine-grid: rgba(255, 255, 255, .05);

    --cash: #34d399;
    --cash-hover: #5eead4;
    --cash-fg: #042117;
    --cash-soft: #0e2b22;
    --cash-line: #1c5442;

    --gold: #f2c96b;
    --gold-soft: #28200d;
    --gold-line: #54421b;

    --warn: #fbbf24;
    --warn-soft: #281e09;
    --warn-line: #5c4612;

    --bank-fg: #c9d6dc;
    --bank-soft: #192428;
    --bank-line: #2e4047;

    --rule: #212e29;
    --rule-strong: #32443d;

    --logo-bg: #ffffff;
    --logo-ring: rgba(255, 255, 255, .14);

    --shadow-sheet: 0 18px 40px -24px rgba(0, 0, 0, .75);
    --shadow-pop: 0 16px 36px -10px rgba(0, 0, 0, .7);
  }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -.025em;
  font-weight: 700;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-control);
  padding: 10px 16px;
  font-weight: 600;
  z-index: 100;
}
.skip-link:focus { left: 20px; }

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.ext-ico { flex: none; display: inline-block; vertical-align: -1px; }

/* --- Header --------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.site-header > .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--header-h);
  padding-block: 10px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex: none;
}
.brand:hover { text-decoration: none; }
.brand-mark { display: block; flex: none; }

.wordmark {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
}
.wordmark b { font-weight: 700; color: var(--ink); }
.wordmark .tld { color: var(--cash); font-weight: 700; }

.header-search {
  position: relative;
  flex: 1 1 250px;
  min-width: 180px;
  max-width: 390px;
  display: flex;
}
.header-search .input { padding-right: 40px; }
.is-home .header-search { display: none; }

.search-submit {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: var(--r-badge);
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
}
.search-submit:hover { color: var(--ink); background: var(--well); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.site-nav a {
  font-size: .92rem;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 7px 12px;
  border-radius: var(--r-control);
  white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); background: var(--well); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--well); font-weight: 600; }

/* --- Instant Search Dropdown ---------------------------------------------- */
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 80;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}
.search-dropdown[hidden] { display: none; }

.search-option {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
}
.search-option:first-child { border-top: 0; }
.search-option:hover,
.search-option.is-active {
  background: var(--well);
  text-decoration: none;
}
.search-option-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.search-option-name {
  font-weight: 600;
  font-size: .92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-option-cat { font-size: .77rem; color: var(--ink-subtle); }
.search-option-rate {
  font-family: var(--font-display);
  font-size: .92rem;
  font-weight: 700;
  color: var(--cash);
  white-space: nowrap;
}

/* --- Form Controls & Buttons ---------------------------------------------- */
.input {
  width: 100%;
  font: inherit;
  font-size: .94rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-control);
  padding: 9px 14px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.input::placeholder { color: var(--ink-subtle); }
.input:focus {
  outline: none;
  border-color: var(--cash);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cash) 18%, transparent);
}
.input-lg { font-size: 1rem; padding: 13px 16px; }
.input-sm { font-size: .88rem; padding: 7px 11px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--r-control);
  padding: 10px 18px;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--cash); color: var(--cash-fg); }
.btn-primary:hover { background: var(--cash-hover); }

.btn-quiet {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--rule-strong);
}
.btn-quiet:hover { background: var(--well); border-color: var(--ink-subtle); }

.btn-sm { padding: 7px 13px; font-size: .85rem; }

/* --- Brand & Program Logo Plates ------------------------------------------ */
.brand-logo,
.program-logo {
  flex: none;
  display: grid;
  place-items: center;
  background: var(--logo-bg);
  border: 1px solid var(--logo-ring);
  border-radius: var(--r-control);
  overflow: hidden;
  padding: 4px;
}
.brand-logo img,
.program-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-logo-xxs { width: 18px; height: 18px; padding: 2px; border-radius: 5px; }
.brand-logo-xs  { width: 28px; height: 28px; padding: 3px; border-radius: var(--r-badge); }
.brand-logo-sm  { width: 34px; height: 34px; padding: 4px; }
.brand-logo-md  { width: 42px; height: 42px; padding: 5px; }
.brand-logo-lg  { width: 52px; height: 52px; padding: 6px; border-radius: var(--r-card); }

.program-logo-xs { width: 20px; height: 20px; padding: 2px; border-radius: 5px; }
.program-logo-sm { width: 32px; height: 32px; padding: 4px; }
.program-logo-md { width: 38px; height: 38px; padding: 5px; }

.program-initial {
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--r-control);
  background: color-mix(in srgb, var(--pc, var(--cash)) 14%, var(--well));
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--pc, var(--cash)) 35%, transparent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .84rem;
}

.monogram {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-control);
  background: color-mix(in srgb, var(--cat-color, var(--ink-muted)) 13%, var(--well));
  color: color-mix(in srgb, var(--cat-color, var(--ink-muted)) 76%, var(--ink));
  border: 1px solid color-mix(in srgb, var(--cat-color, var(--rule-strong)) 25%, transparent);
  font-family: var(--font-display);
  font-size: .84rem;
  font-weight: 700;
}
.monogram-xs { width: 28px; height: 28px; font-size: .7rem; border-radius: var(--r-badge); }
.monogram-sm { width: 34px; height: 34px; font-size: .76rem; }
.monogram-md { width: 42px; height: 42px; font-size: .84rem; }
.monogram-lg { width: 52px; height: 52px; font-size: 1rem; border-radius: var(--r-card); }

.monogram[data-cat="marketplaces"] { --cat-color: #2563eb; }
.monogram[data-cat="moda"]         { --cat-color: #db2777; }
.monogram[data-cat="eletronicos"]  { --cat-color: #4f46e5; }
.monogram[data-cat="casa"]         { --cat-color: #b45309; }
.monogram[data-cat="beleza"]       { --cat-color: #be185d; }
.monogram[data-cat="esporte"]      { --cat-color: #059669; }
.monogram[data-cat="farmacia"]     { --cat-color: #0d9488; }
.monogram[data-cat="viagens"]      { --cat-color: #0284c7; }
.monogram[data-cat="pets"]         { --cat-color: #9333ea; }
.monogram[data-cat="comida"]       { --cat-color: #dc2626; }
.monogram[data-cat="mobilidade"]   { --cat-color: #475569; }
.monogram[data-cat="cursos"]       { --cat-color: #7c3aed; }
.monogram[data-cat="suplementos"]  { --cat-color: #16a34a; }
.monogram[data-cat="infantil"]     { --cat-color: #ea580c; }

/* --- Hero Band (Full-bleed architectural Deep Pine) ----------------------- */
.hero-band {
  background-color: var(--pine);
  background-image: radial-gradient(var(--pine-grid) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  color: var(--pine-fg);
  border-bottom: 1px solid var(--pine-deep);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: 44px;
  align-items: center;
  padding-block: 44px 48px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .86rem;
  font-weight: 500;
  color: var(--pine-muted);
  margin-bottom: 12px;
}
.hero-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
}

.hero h1 {
  font-size: clamp(1.95rem, 4vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -.035em;
  color: #ffffff;
  margin-bottom: 14px;
}

.hero .lead {
  font-size: 1.03rem;
  color: var(--pine-muted);
  max-width: 46ch;
  margin-bottom: 24px;
}

.hero-search {
  position: relative;
  display: flex;
  gap: 8px;
  max-width: 510px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-card);
}
.hero-search .input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 10px 12px;
}
.hero-search .input::placeholder { color: var(--ink-subtle); }
.hero-search .input:focus { box-shadow: none; }

.hero-band .hero-search {
  color-scheme: light;
  background: #ffffff;
  border-color: transparent;
  box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .45);
}
.hero-band .hero-search .input { color: #0f1a17; }
.hero-band .hero-search .input::placeholder { color: #5b6b65; }
.hero-band .hero-search .btn-primary {
  background: #007a52;
  color: #ffffff;
  padding-inline: 20px;
}
.hero-band .hero-search .btn-primary:hover { background: #006342; }

.quick-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
}
.quick-pills-center { justify-content: center; margin-bottom: 20px; }
.quick-label { font-size: .82rem; color: var(--pine-muted); margin-right: 2px; }
.quick-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  font-weight: 500;
  color: #ffffff;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--r-pill);
  padding: 4px 11px 4px 6px;
  transition: background .12s ease, border-color .12s ease;
}
.quick-pill:hover {
  background: rgba(255, 255, 255, .20);
  border-color: rgba(255, 255, 255, .36);
  text-decoration: none;
}

.quick-pills-light .quick-pill {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--rule);
}
.quick-pills-light .quick-pill:hover {
  background: var(--cash-soft);
  border-color: var(--cash-line);
  color: var(--cash);
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: .88rem;
  color: var(--pine-muted);
}
.hero-facts b { color: #ffffff; font-weight: 600; }

/* --- Leaderboard Sheet (on dark hero) ------------------------------------- */
.panel {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: var(--r-sheet);
  box-shadow: var(--shadow-sheet);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--well);
  border-bottom: 1px solid var(--rule);
}
.panel-head h2 {
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--ink);
}
.panel-head .link { font-size: .84rem; font-weight: 600; color: var(--cash); }

.rank-list { display: flex; flex-direction: column; }

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  transition: background .12s ease;
}
.rank-item + .rank-item { border-top: 1px solid var(--rule); }
.rank-item:hover { background: var(--well); text-decoration: none; }
.rank-item.is-best { background: color-mix(in srgb, var(--cash) 4%, var(--surface)); }
.rank-item.is-best:hover { background: var(--well); }

.rank-n {
  flex: none;
  width: 20px;
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 700;
  color: var(--ink-subtle);
  text-align: center;
}
.rank-item.is-best .rank-n { color: var(--gold); }

.rank-body { flex: 1; min-width: 0; }
.rank-body .name {
  display: block;
  font-weight: 600;
  font-size: .94rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-body .via {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: .79rem;
  color: var(--ink-muted);
}
.rank-verified {
  color: var(--cash);
  font-weight: 600;
}

.rank-pct {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--cash);
  white-space: nowrap;
}

/* --- Page Structure & Navigation Chrome ----------------------------------- */
.section { padding-block: 40px; }
.section-tight { padding-block: 22px; }
.section-end { padding-bottom: 44px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.section-head h2 { font-size: 1.35rem; }
.section-sub { font-size: .88rem; color: var(--ink-muted); }
.section-head .link {
  font-size: .9rem;
  font-weight: 600;
  color: var(--cash);
  white-space: nowrap;
}

.heading-icon { display: inline-flex; align-items: center; gap: 9px; }
.heading-icon svg { color: var(--cash); flex: none; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: .84rem;
  color: var(--ink-subtle);
  padding-top: 22px;
}
.breadcrumb a { color: var(--ink-muted); }
.breadcrumb a:hover { color: var(--cash); }

.page-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-block: 16px 8px;
  flex-wrap: wrap;
}
.page-head h1 { font-size: clamp(1.55rem, 3.2vw, 2.15rem); }
.page-head .sub { color: var(--ink-muted); font-size: .95rem; margin-top: 4px; }
.page-head .push { margin-left: auto; }

.catalog-filter { min-width: 240px; flex: 0 1 300px; }
.catalog-group { scroll-margin-top: 76px; }

/* --- Sort Tabs ------------------------------------------------------------ */
.sort-tabs {
  display: inline-flex;
  padding: 3px;
  background: var(--well);
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
  gap: 2px;
}
.sort-tabs a {
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink-muted);
  padding: 5px 12px;
  border-radius: var(--r-badge);
}
.sort-tabs a:hover { color: var(--ink); text-decoration: none; }
.sort-tabs a[aria-current="true"] {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--rule);
}

/* --- Category Strip ------------------------------------------------------- */
.cat-strip-wrap {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding-block: 14px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .86rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
  padding: 6px 13px;
  white-space: nowrap;
  transition: border-color .12s ease, background .12s ease;
}
.chip:hover { text-decoration: none; border-color: var(--rule-strong); background: var(--well); }
.chip[aria-current="page"],
.chip.is-active {
  border-color: var(--cash);
  background: var(--cash-soft);
  color: var(--cash);
  font-weight: 600;
}
.chip svg { flex: none; color: var(--ink-muted); }
.chip[aria-current="page"] svg,
.chip.is-active svg { color: var(--cash); }
.chip-count { font-size: .76rem; color: var(--ink-subtle); }
.chip-btn { font-family: inherit; font-size: .78rem; padding: 4px 10px; cursor: pointer; }

/* --- Badges & Signup Bonus ------------------------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  font-weight: 600;
  border-radius: var(--r-badge);
  padding: 3px 8px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-best { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold); }
.badge-bank { background: var(--bank-soft); border-color: var(--bank-line); color: var(--bank-fg); }

.bonus {
  align-self: flex-start;
  font-size: .8rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--cash);
  background: var(--cash-soft);
  border: 1px solid var(--cash-line);
  border-radius: var(--r-control);
  padding: 6px 11px;
}

/* --- Provenance ----------------------------------------------------------- */
.provenance {
  display: inline-flex;
  align-items: flex-start;
  gap: 5px;
  font-size: .77rem;
  color: var(--ink-subtle);
  line-height: 1.35;
}
.provenance svg { flex: none; margin-top: 2px; }
.provenance-verified { color: var(--cash); font-weight: 600; }
.provenance-verified .src { color: var(--ink-muted); font-weight: 400; }
.provenance-stale { color: var(--warn); font-weight: 600; }
.provenance-stale .src { color: var(--ink-muted); font-weight: 400; }

/* --- Store Cards ---------------------------------------------------------- */
.card-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.store-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  padding: 16px;
  transition: border-color .12s ease, background .12s ease;
}
.store-card:hover {
  border-color: var(--cash-line);
  background: color-mix(in srgb, var(--cash) 2.5%, var(--surface));
}
.store-card .stretched-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 1;
}
.store-card .stretched-link:hover { text-decoration: none; }

.store-id { display: flex; align-items: center; gap: 11px; min-width: 0; }
.store-id .meta { min-width: 0; }
.store-id .name {
  display: block;
  font-weight: 600;
  font-size: .98rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.store-id .cat { display: block; font-size: .78rem; color: var(--ink-subtle); }

.rate-display { margin-top: auto; }
.rate-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rate-display .value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.05;
  color: var(--cash);
}
.rate-display .label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: var(--ink-muted);
  margin-top: 6px;
}

.card-trust {
  font-size: .71rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--r-badge);
  white-space: nowrap;
}
.card-trust.is-fresh { background: var(--cash-soft); color: var(--cash); }
.card-trust.is-stale { background: var(--warn-soft); color: var(--warn); }

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  font-size: .81rem;
}
.card-count { color: var(--ink-subtle); }
.card-cta { font-weight: 600; color: var(--ink-muted); }
.store-card:hover .card-cta { color: var(--cash); }

/* --- Unified Comparison Sheet (/loja/{slug}) ------------------------------ */
.compare-sheet {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-sheet);
  overflow: hidden;
}

.compare-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  background: var(--well);
  border-bottom: 1px solid var(--rule);
  padding: 14px 18px;
}

.compare-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.compare-summary p { font-size: .92rem; color: var(--ink-muted); }
.compare-summary b { color: var(--ink); font-weight: 600; }
.compare-spread {
  font-size: .8rem;
  color: var(--ink-muted);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-badge);
  padding: 3px 9px;
}

.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  padding: 5px 11px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-pill);
}
.filter-toggle input { accent-color: var(--cash); margin: 0; }

.calc-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.calc-box label { font-size: .82rem; font-weight: 600; color: var(--ink-muted); white-space: nowrap; }
.calc-controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.calc-controls .input-sm { width: 96px; }
.calc-presets { display: inline-flex; gap: 4px; }

.compare { display: flex; flex-direction: column; }

.compare-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px 16px;
  padding: 16px 18px;
  background: var(--surface);
  border-top: 1px solid var(--rule);
}
.compare-row[hidden] { display: none; }
.compare-row.is-first-visible { border-top: 0; }

.compare-row.is-best {
  background: color-mix(in srgb, var(--cash) 4.5%, var(--surface));
  position: relative;
}
.compare-row.is-best::before {
  content: "";
  position: absolute;
  inset-block: 0;
  left: 0;
  width: 4px;
  background: var(--cash);
}

.compare-rank {
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink-subtle);
  text-align: center;
}
.compare-row.is-best .compare-rank { color: var(--cash); }

.compare-program-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.compare-program { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.compare-program .name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-weight: 600;
  font-size: .98rem;
}
.compare-program .prog-title { font-weight: 600; color: var(--ink); }

.compare-meter {
  width: min(220px, 100%);
  height: 4px;
  border-radius: 99px;
  background: var(--well);
  overflow: hidden;
  margin-top: 2px;
}
.compare-meter > span {
  display: block;
  height: 100%;
  width: var(--w, 100%);
  border-radius: 99px;
  background: color-mix(in srgb, var(--pc, var(--ink-subtle)) 55%, var(--ink-subtle));
  opacity: .85;
}
.compare-row.is-best .compare-meter > span {
  background: var(--cash);
  opacity: 1;
}

.compare-rate {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 8.5ch;
}
.compare-pct {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.05;
  color: var(--cash);
  text-align: right;
  white-space: nowrap;
}
.compare-est {
  font-size: .78rem;
  color: var(--ink-muted);
  white-space: nowrap;
  margin-top: 3px;
}
.compare-row .btn { min-width: 152px; }

/* --- Editorial How-It-Works Strip (no boxy cards) ------------------------- */
.steps-band {
  background: var(--surface);
  border-block: 1px solid var(--rule);
  padding-block: 42px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  counter-reset: step;
}

.step {
  padding-right: 26px;
}
.step + .step {
  padding-left: 26px;
  border-left: 1px solid var(--rule);
}
.step-num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
  color: var(--cash);
  margin-bottom: 10px;
}
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { font-size: .9rem; color: var(--ink-muted); }

/* --- Program Cards -------------------------------------------------------- */
.program-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
}

.program-card {
  display: flex;
  flex-direction: column;
  gap: 11px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--pc, var(--cash));
  border-radius: var(--r-card);
  padding: 18px;
  transition: border-color .12s ease;
}
.program-card:hover { border-color: var(--rule-strong); border-top-color: var(--pc, var(--cash)); }

.program-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.program-card-id {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.program-card h3 { font-size: 1.04rem; }
.program-card p { font-size: .88rem; color: var(--ink-muted); flex: 1; }
.program-card .btn { margin-top: 4px; align-self: flex-start; }

/* --- Store Directory (/lojas) --------------------------------------------- */
.store-index {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.store-index li[hidden] { display: none; }

.store-index a {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
  padding: 9px 12px;
  transition: border-color .12s ease, background .12s ease;
}
.store-index a:hover { text-decoration: none; border-color: var(--cash-line); background: var(--well); }

.store-index .name {
  flex: 1;
  min-width: 0;
  font-size: .92rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.store-index .best { text-align: right; line-height: 1.25; }
.store-index .pct {
  display: block;
  font-family: var(--font-display);
  font-size: .96rem;
  font-weight: 700;
  color: var(--cash);
}
.store-index .via {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  font-size: .75rem;
  color: var(--ink-subtle);
}

/* --- Editorial Stat Strip (/como-verificamos) ----------------------------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-sheet);
  overflow: hidden;
}
.stat-cell {
  padding: 18px 20px;
}
.stat-cell + .stat-cell { border-left: 1px solid var(--rule); }
.stat-cell .v {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
}
.stat-cell .v small { font-size: .95rem; font-weight: 500; color: var(--ink-subtle); letter-spacing: 0; }
.stat-cell .k { display: block; font-size: .84rem; color: var(--ink-muted); margin-top: 5px; }

/* --- Prose (/como-verificamos) -------------------------------------------- */
.prose { max-width: 68ch; margin-inline: 0; }
.prose h2 { font-size: 1.25rem; margin-block: 34px 10px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--ink-muted); margin-bottom: 12px; }
.prose b { color: var(--ink); font-weight: 600; }
.prose .notice { margin-top: 28px; }

.state-list, .do-not { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.state-list li {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  padding: 14px 16px;
}
.state-list p { margin: 8px 0 0; font-size: .88rem; }

.do-not li {
  position: relative;
  padding-left: 20px;
  color: var(--ink-muted);
  font-size: .94rem;
}
.do-not li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cash);
}

/* --- Notice & Empty States ------------------------------------------------ */
.notice {
  display: flex;
  gap: 12px;
  background: var(--well);
  border: 1px solid var(--rule);
  border-radius: var(--r-sheet);
  padding: 15px 18px;
  font-size: .88rem;
  color: var(--ink-muted);
}
.notice-mt { margin-top: 16px; }
.notice svg { flex: none; margin-top: 2px; color: var(--cash); }
.notice b { color: var(--ink); font-weight: 600; }
.notice a { color: var(--cash); font-weight: 600; }

.empty {
  text-align: center;
  max-width: 48ch;
  margin-inline: auto;
  padding-block: 56px;
}
.empty h1, .empty h2 { font-size: 1.35rem; margin-bottom: 8px; }
.empty p { color: var(--ink-muted); margin-bottom: 20px; }
.empty .brand-mark { width: 48px; height: 48px; margin-inline: auto; margin-bottom: 14px; }

/* --- Footer --------------------------------------------------------------- */
.site-footer {
  margin-top: 56px;
  border-top: 1px solid var(--rule);
  background: var(--surface);
  padding-block: 40px 28px;
  font-size: .88rem;
}

.footer-cols {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}
.footer-cols p { color: var(--ink-muted); max-width: 42ch; margin-top: 10px; }
.footer-cols h4 {
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.footer-cols nav a { display: block; padding-block: 3px; color: var(--ink-muted); }
.footer-cols nav a:hover { color: var(--cash); }

.disclaimer {
  border-top: 1px solid var(--rule);
  padding-top: 18px;
  font-size: .8rem;
  color: var(--ink-subtle);
  line-height: 1.65;
  max-width: 82ch;
}
.disclaimer a { color: var(--ink-muted); text-decoration: underline; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 30px; padding-block: 34px 36px; }
  .steps { grid-template-columns: 1fr; gap: 20px; }
  .step { padding-right: 0; }
  .step + .step { padding-left: 0; padding-top: 20px; border-left: 0; border-top: 1px solid var(--rule); }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-cell:nth-child(3) { border-left: 0; border-top: 1px solid var(--rule); }
  .stat-cell:nth-child(4) { border-top: 1px solid var(--rule); }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-cols > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .site-header { position: static; }
  .site-header > .wrap { row-gap: 8px; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; }
  .site-nav { margin-left: auto; }
  .site-nav a { padding: 6px 8px; font-size: .85rem; }

  .hero-search { flex-direction: column; }
  .hero-search .btn { width: 100%; }
  .page-head .push { margin-left: 0; }
  .catalog-filter { flex-basis: 100%; }

  .cat-strip-wrap .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .cat-strip-wrap .chips::-webkit-scrollbar { display: none; }

  .compare-toolbar { flex-direction: column; align-items: stretch; }
  .compare-row { grid-template-columns: 20px minmax(0, 1fr) auto; }
  .compare-row .btn { grid-column: 2 / -1; justify-self: stretch; min-width: 0; }
  .stat-strip { grid-template-columns: 1fr; }
  .stat-cell + .stat-cell { border-left: 0; border-top: 1px solid var(--rule); }
  .footer-cols { grid-template-columns: 1fr; gap: 20px; }
}

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