/* ═══════════════════════════════════════════════════════════
   INVERBOOKS — v3 "AURORA" (oct 2026)
   Capa de redisseny sobre style.css: titulars sans moderns, vidre,
   aurora animada, targetes arrodonides amb focus de llum, aparicions
   en fer scroll. Per tornar al disseny anterior: treure el <link> a v2.css
   i l'import de fx.js a app.js.
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg:        #05070e;
  --bg-2:      #0a0e1a;
  --surface:   #0f1424;
  --surface-2: #151b2e;
  --line:      rgba(255,255,255,.07);
  --line-2:    rgba(255,255,255,.13);

  --glass:     rgba(255,255,255,.028);
  --glass-2:   rgba(255,255,255,.05);
  --stroke:    rgba(255,255,255,.08);
  --stroke-2:  rgba(255,255,255,.16);

  --violet: #7d7bff;
  --teal:   #35c8c0;
  --spot:   rgba(233,201,137,.10);

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;
  --ease-out:  cubic-bezier(.16,1,.3,1);
}
html.theme-light {
  /* Mode dia més suau (l'Òscar 05/10: "massa blanc, massa llum"): crema/pedra càlid en lloc de blanc */
  --bg:        #ebe6da;
  --bg-2:      #e2dccd;
  --surface:   #f4f0e6;
  --surface-2: #ece6d8;
  --line:      #d3ccb9;
  --line-2:    #bdb49c;
  --text-2:    #443f33;
  --glass:   rgba(246,242,233,.78);
  --glass-2: rgba(248,245,238,.92);
  --stroke:  rgba(20,24,40,.09);
  --stroke-2: rgba(20,24,40,.18);
  --line:    rgba(20,24,40,.09);
  --line-2:  rgba(20,24,40,.16);
  --spot:    rgba(138,105,19,.08);
}

/* ─── Fons: aurora en moviment (nomes transform → barat per a la GPU) ─── */
body::before {
  inset: -30vmax;
  background:
    radial-gradient(38vmax 30vmax at 72% 18%, rgba(212,173,106,.16), transparent 62%),
    radial-gradient(34vmax 28vmax at 18% 30%, rgba(125,123,255,.13), transparent 64%),
    radial-gradient(30vmax 26vmax at 55% 78%, rgba(53,200,192,.08), transparent 66%);

  animation: ib-aurora 26s ease-in-out infinite alternate;
}
@keyframes ib-aurora {
  0%   { transform: translate3d(0,0,0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(-4vmax,3vmax,0) rotate(8deg) scale(1.08); }
  100% { transform: translate3d(3vmax,-2vmax,0) rotate(-6deg) scale(1.02); }
}
html.theme-light body::before { opacity: .55; }

/* ─── Tipografia ─── */
h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.04;
}
h1 { font-size: clamp(2.7rem, 6.4vw, 5.4rem); }
h2 { font-size: clamp(2rem, 4vw, 3.3rem); }
h3 { font-size: 1.35rem; letter-spacing: -0.02em; }
h1 em, h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding-right: .06em;
  font-variant-numeric: lining-nums;
  background: linear-gradient(100deg, var(--gold-2), var(--gold) 45%, #f6dfae 70%, var(--gold));
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: ib-sheen 7s ease-in-out infinite;
}
@keyframes ib-sheen { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.hero h1, .page-header h1 {
  background: linear-gradient(180deg, var(--text) 30%, color-mix(in srgb, var(--text) 62%, transparent));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero h1 em, .page-header h1 em { -webkit-text-fill-color: transparent; }

.lead, .hero-lead, .page-header p {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--text-2);
}
.hero-lead { font-size: clamp(1.08rem, 1.6vw, 1.28rem); line-height: 1.6; }
.lead { font-size: 1.12rem; line-height: 1.6; }
.page-header p { font-size: 1.12rem; line-height: 1.6; }

/* Kicker → etiqueta amb punt de llum */
.kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .68rem; letter-spacing: .2em;
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--gold-line);
  background: linear-gradient(180deg, var(--gold-soft), transparent);
  border-radius: 999px;
}
.kicker::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 0 3px var(--gold-soft), 0 0 12px var(--gold);
}
.hero-eyebrow .line { display: none; }
.hero-side > .kicker, .hero-videos .kicker { border: 0; background: none; padding: 0; }
.hero-side > .kicker::before { display: none; }

/* ─── Navegacio flotant de vidre ─── */
.ib-nav {
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.ib-nav.fx-scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
.ib-brand { font-family: var(--sans); font-weight: 650; letter-spacing: -0.03em; font-size: 1.3rem; }
.ib-mark {
  border-radius: 11px; font-family: var(--sans); font-weight: 700; font-size: .9rem;
  background: linear-gradient(140deg, var(--gold-2), var(--gold) 55%, var(--gold-3));
  color: var(--bg); border: 0;
  box-shadow: 0 6px 20px var(--gold-glow), inset 0 1px 0 rgba(255,255,255,.35);
}
.ib-nav-links a { border-radius: 999px; padding: 8px 15px; }
.ib-nav-links a:hover { background: var(--glass-2); }
.ib-nav-links a.active { background: var(--gold-soft); color: var(--gold-2); }
.theme-toggle { border-radius: 11px; border-color: var(--stroke); }
.ib-dropdown {
  border-radius: var(--radius); border-color: var(--stroke);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.ib-dropdown a, .ib-dropdown button { border-radius: 10px; }

/* ─── Botons ─── */
.ib-btn {
  border-radius: 12px;
  border-color: var(--stroke-2);
  background: var(--glass);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-weight: 550;
}
.ib-btn:hover { border-color: var(--gold-line); background: var(--gold-soft); color: var(--gold-2); transform: translateY(-2px); }
.ib-btn-primary {
  border: 0;
  background: linear-gradient(135deg, #f3d9a2, var(--gold-2) 30%, var(--gold) 70%, var(--gold-3));
  color: #1a1408;
  box-shadow: 0 10px 30px -8px var(--gold-glow), 0 0 0 1px rgba(255,255,255,.12) inset, 0 1px 0 rgba(255,255,255,.4) inset;
}
.ib-btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease-out);
}
.ib-btn-primary:hover { color: #1a1408; background: linear-gradient(135deg, #f7e2b3, var(--gold-2) 35%, var(--gold) 75%); box-shadow: 0 16px 40px -8px rgba(212,173,106,.55), 0 1px 0 rgba(255,255,255,.45) inset; }
.ib-btn-primary:hover::after { transform: translateX(120%); }
.ib-btn-lg { padding: 16px 30px; border-radius: 14px; font-size: 1rem; }

/* ─── Superficies de vidre amb focus de llum (fx.js posa --mx/--my) ─── */
.hero-side, .feat, .aff-card, .fiscal-card, .price-card, .rank-row,
.calc-form, .calc-results, .auth-card, .banner-cta, .hero-videos, .fx-card {
  background:
    radial-gradient(520px circle at var(--mx, 50%) var(--my, -30%), var(--spot), transparent 42%),
    linear-gradient(180deg, var(--glass-2), var(--glass));
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 24px 60px -30px rgba(0,0,0,.6);
  transition: border-color .35s var(--ease), transform .35s var(--ease-out), box-shadow .35s var(--ease);
}
.feat:hover, .aff-card:hover, .fiscal-card:hover, .price-card:hover, .rank-row:hover, .fx-card:hover {
  border-color: var(--gold-line);
  transform: translateY(-4px);
  box-shadow: 0 1px 0 rgba(255,255,255,.07) inset, 0 30px 70px -28px rgba(0,0,0,.7), 0 0 0 1px var(--gold-soft);
}
.hero-side::before { display: none; }

/* Graelles: de "taula amb linies" a targetes separades */
.grid, .aff-grid, .calc-wrap, .fiscal-grid, .pricing-grid { gap: 18px; background: transparent; overflow: visible; border-radius: 0; }
.rank-list { display: grid; gap: 14px; }
.rank-row:first-child { border-top: 1px solid var(--stroke); }
.fiscal-card .kicker { display: inline-flex; }
.feat, .aff-card { min-height: 0; }
.feat:hover, .aff-card:hover, .fiscal-card:hover, .price-card:hover, .rank-row:hover { background:
    radial-gradient(520px circle at var(--mx, 50%) var(--my, -30%), var(--spot), transparent 42%),
    linear-gradient(180deg, var(--glass-2), var(--glass)); }
.feat::before { display: none; }
.feat h3, .aff-card-name, .banner-cta h3, .calc-form h2, .auth-head h1, .chat-head h2,
.chat-welcome h3, .chat-locked h2, .price-name, .rank-info h3, .fiscal-card h3 {
  font-family: var(--sans); font-weight: 650; letter-spacing: -0.03em;
}
.feat h3 { font-size: 1.55rem; }
.feat-num {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 13px;
  background: linear-gradient(140deg, var(--gold-soft), transparent);
  border: 1px solid var(--gold-line);
  letter-spacing: 0; font-size: .8rem;
}
.feat-link { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: .95rem; font-weight: 600; }
.feat-link:hover { letter-spacing: 0; }
.aff-card-bonus { font-family: var(--sans); font-style: normal; font-weight: 500; border-color: var(--stroke); }
.aff-card-tag { letter-spacing: .12em; }

/* Numeros grans amb degradat */
.hero-stat-num, .calc-summary-amount, .price-amount, .tool-big {
  font-family: var(--sans) !important;
  font-weight: 700 !important;
  letter-spacing: -0.04em !important;
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 70%, var(--gold-3));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-stat-num.text { background: linear-gradient(180deg, var(--text), var(--text-2)); -webkit-background-clip: text; background-clip: text; }
.hero-stats { border-top-color: var(--stroke); }
.hero-stat-lab { letter-spacing: .12em; }

/* ─── Seccions amb mes aire i divisoria de llum ─── */
.hero { padding-top: clamp(72px, 11vw, 140px); padding-bottom: clamp(64px, 9vw, 120px); border-bottom: 0; overflow: visible; }
.hero::after { display: none; }
.hero::before, .page-header::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 20%, transparent 75%);
  opacity: .55;
}
.section { padding: clamp(80px, 10vw, 136px) 32px; border-bottom: 0; }
.section + .section::before, .hero + .section::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(720px, 80%); height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-line), transparent);
}
.section-header { margin-bottom: 56px; }
.page-header { border-bottom: 0; padding-top: clamp(72px, 10vw, 128px); }
.page-header::after { width: 1000px; height: 420px; background: radial-gradient(ellipse at center, rgba(212,173,106,.14), transparent 62%); }

/* Banner de crida final */
.banner-cta {
  border-color: var(--gold-line);
  background:
    radial-gradient(600px circle at var(--mx, 20%) var(--my, 0%), rgba(212,173,106,.16), transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(125,123,255,.10), transparent 55%),
    linear-gradient(180deg, var(--glass-2), var(--glass));
}

/* ─── Formularis ─── */
.field label { letter-spacing: .1em; }
.field input, .field select, .chat-input-shell {
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-color: var(--stroke);
}
.field input:focus, .field select:focus { box-shadow: 0 0 0 4px var(--gold-soft), 0 0 24px -6px var(--gold-glow); }
.calc-tabs { border-bottom: 0; gap: 6px; flex-wrap: wrap; }
.calc-tab { border-radius: 999px; border: 1px solid transparent; }
.calc-tab.active { border-color: var(--gold-line); background: var(--gold-soft); }
.calc-table tbody tr:hover td { background: var(--glass-2); }
.calc-cta, .calc-summary, .calc-detail-tile, .market-strip span, .rank-tag { border-radius: 14px; }

/* ─── Peu ─── */
.ib-foot { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--bg-2) 90%, transparent)); border-top: 1px solid var(--line); padding-top: 72px; }
.ib-foot::before { width: min(720px, 80%); opacity: .7; }
.ib-foot-links { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: .9rem; }

/* ─── Bombolles, avisos, cookies ─── */
.cookie-bar, .ib-toast { border-radius: var(--radius); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }

/* ─── Aparicio en fer scroll (nomes si fx.js ha arrencat) ─── */
html.fx-on .fx-reveal {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: calc(var(--fx-i, 0) * 70ms);
}
html.fx-on .fx-reveal.fx-in { opacity: 1; transform: none; }

/* Mobil: sense desenfocament de vidre (car per a la GPU en fer scroll) */
@media (max-width: 768px) {
  .hero-side, .feat, .aff-card, .fiscal-card, .price-card, .rank-row, .calc-form, .calc-results,
  .auth-card, .banner-cta, .hero-videos, .fx-card, .ib-btn, .start-btn, .tool-out {
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  body::before { animation-duration: 40s; }
}
@media (max-width: 600px) {
  .section { padding: 72px 20px; }
  .feat, .aff-card { padding: 28px 24px; }
  h1 { font-size: clamp(2.4rem, 11vw, 3.2rem); }
}
@media (prefers-reduced-motion: reduce) {
  body::before, h1 em, h2 em { animation: none; }
  html.fx-on .fx-reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .ib-btn-primary::after { display: none; }
}

/* ═══ ASSISTENT IA ═══ */
.chat-page {
  margin: 20px auto 24px;
  height: calc(100vh - 81px - 44px);
  height: calc(100dvh - 81px - 44px);
  border: 1px solid var(--stroke);
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(700px circle at var(--mx, 50%) var(--my, 0%), rgba(212,173,106,.06), transparent 45%),
    linear-gradient(180deg, var(--glass-2), color-mix(in srgb, var(--bg) 60%, transparent));
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 40px 100px -40px rgba(0,0,0,.8), 0 1px 0 rgba(255,255,255,.06) inset;
}
.chat-head { background: none; border-bottom-color: var(--stroke); padding: 18px 24px; }
.chat-head h2 { font-size: 1.15rem; }
.chat-head .kicker { padding: 0; border: 0; background: none; margin-bottom: 2px; }
.chat-head .kicker::before { width: 6px; height: 6px; background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.15), 0 0 10px #4ade80; }
.chat-head-icon, .chat-welcome-mark, .chat-msg.assistant .chat-avatar {
  border: 0; color: #1a1408; font-family: var(--sans); font-weight: 700;
  background: conic-gradient(from 200deg, var(--gold-2), #f6dfae, var(--gold), var(--violet), var(--gold-2));
  box-shadow: 0 8px 26px -6px var(--gold-glow), inset 0 1px 0 rgba(255,255,255,.4);
}
.chat-head-icon { border-radius: 14px; }
.chat-credits { font-family: var(--sans); text-transform: none; letter-spacing: 0; background: var(--glass-2); border-color: var(--stroke); }
.chat-credits b { font-weight: 700; }
.chat-body { padding: 28px clamp(16px, 4vw, 36px); scroll-behavior: smooth; }
.chat-welcome-mark {
  width: 76px; height: 76px; border-radius: 50%; font-size: 1.3rem;
  animation: ib-orb 4.5s ease-in-out infinite;
}
@keyframes ib-orb {
  0%,100% { transform: translateY(0) scale(1); box-shadow: 0 10px 40px -8px var(--gold-glow), 0 0 0 8px var(--gold-soft); }
  50%     { transform: translateY(-6px) scale(1.04); box-shadow: 0 18px 50px -8px rgba(212,173,106,.45), 0 0 0 14px rgba(212,173,106,.05); }
}
.chat-welcome h3 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
.chat-welcome p { font-family: var(--sans); font-style: normal; }
.chat-suggest { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; text-align: left; }
.chat-suggest button {
  border-radius: 16px; padding: 14px 16px; line-height: 1.4; text-align: left;
  background: var(--glass-2); border-color: var(--stroke);
}
.chat-suggest button:hover { transform: translateY(-2px); border-color: var(--gold-line); color: var(--text); }
.chat-msg { animation: ib-msg .45s var(--ease-out) both; }
@keyframes ib-msg { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.chat-avatar { border-radius: 50%; }
.chat-msg.user .chat-avatar { background: var(--glass-2); border-color: var(--stroke); }
.chat-bubble { border-radius: 20px; padding: 14px 18px; }
.chat-msg.assistant .chat-bubble { background: var(--glass-2); border-color: var(--stroke); border-top-left-radius: 6px; }
.chat-msg.user .chat-bubble {
  background: linear-gradient(135deg, rgba(233,201,137,.20), rgba(212,173,106,.08));
  border-color: var(--gold-line); border-top-right-radius: 6px;
}
.chat-bubble strong { color: var(--gold-2); font-weight: 650; }
.chat-bubble ul, .chat-bubble ol { padding-left: 20px; margin: 8px 0; }
.chat-bubble li::marker { color: var(--gold); }
.chat-aff { border-radius: 14px; background: color-mix(in srgb, var(--bg) 60%, transparent); }
.chat-aff-icon { border-radius: 11px; }
.chat-input-wrap { background: none; border-top-color: var(--stroke); padding: 16px clamp(14px, 3vw, 24px) 18px; }
.chat-input-shell { border-radius: 20px; padding: 8px 8px 8px 18px; background: color-mix(in srgb, var(--bg) 70%, transparent); }
.chat-input-shell:focus-within { border-color: var(--gold-line); box-shadow: 0 0 0 4px var(--gold-soft), 0 10px 40px -10px var(--gold-glow); }
.chat-send { border-radius: 50%; }
.chat-hint { opacity: .8; }
.chat-locked {
  max-width: 560px; margin: clamp(48px, 10vh, 110px) auto; padding: clamp(32px, 6vw, 56px);
  border: 1px solid var(--stroke); border-radius: 28px; text-align: center;
  background: radial-gradient(600px circle at 50% 0%, rgba(212,173,106,.12), transparent 55%), linear-gradient(180deg, var(--glass-2), var(--glass));
  box-shadow: 0 40px 100px -40px rgba(0,0,0,.8);
}
.chat-locked .auth-mark { border-radius: 50%; border: 0; color: #1a1408; background: conic-gradient(from 200deg, var(--gold-2), #f6dfae, var(--gold), var(--violet), var(--gold-2)); animation: ib-orb 4.5s ease-in-out infinite; }
.auth-mark { border-radius: 16px; }
@media (max-width: 768px) {
  .chat-page { margin: 0; border-radius: 0; border-left: 0; border-right: 0; height: calc(100dvh - 61px); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .chat-welcome-mark, .chat-locked .auth-mark, .chat-msg { animation: none; }
}

/* Restes de la lletra serif antiga → sans moderna (la serif queda nomes per a <em> dels titulars) */
.auth-head p, .auth-mark, .calc-cta-text strong, .calc-detail-val, .calc-empty p, .calc-empty-icon,
.chat-aff-name, .chat-head-icon, .rank-num, .aff-card-bonus {
  font-family: var(--sans);
  font-style: normal;
  letter-spacing: -0.02em;
}
.calc-cta-text strong { font-weight: 650; font-size: 1.15rem; }
.calc-empty p { font-weight: 400; letter-spacing: 0; }
.rank-num, .calc-detail-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.calc-cta { border-radius: 18px; }

/* Logo oficial (monograma IB daurat) a la capcalera */
.ib-mark-img {
  width: 38px; height: 38px; border-radius: 11px; display: block;
  box-shadow: 0 0 0 1px var(--gold-line), 0 6px 20px var(--gold-glow);
  transition: box-shadow .25s var(--ease), transform .25s var(--ease-out);
}
.ib-brand:hover .ib-mark-img { box-shadow: 0 0 0 1px var(--gold-2), 0 8px 26px rgba(212,173,106,.4); transform: translateY(-1px); }

/* ═══ ARTICLES (/aprende/) ═══ */
.article { max-width: 760px; margin: 0 auto; padding: 8px 24px 110px; font-size: 1.1rem; line-height: 1.78; }
.article p, .article li { color: var(--text-2); }
.article p { margin: 0 0 1.15em; }
.article strong { color: var(--text); }
.article h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 2.1em 0 .7em; }
.article ul, .article ol { margin: 0 0 1.3em 1.3em; }
.article li { margin-bottom: .55em; padding-left: .2em; }
.article li::marker { color: var(--gold); }
.article a:not(.article-cta) { text-decoration: underline; text-underline-offset: 3px; }
.article .formula { font-family: var(--sans); font-weight: 700; font-size: 1.3rem; color: var(--gold-2); text-align: center;
  padding: 22px; border: 1px solid var(--gold-line); border-radius: 18px; background: var(--gold-soft); }
.article table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 0 1.4em; font-size: .98rem;
  border: 1px solid var(--stroke); border-radius: 16px; overflow: hidden; }
.article th, .article td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--stroke); }
.article th { color: var(--text); background: var(--glass-2); font-weight: 650; }
.article tr:last-child td { border-bottom: 0; }
.article td { color: var(--text-2); font-variant-numeric: tabular-nums; }
.article-cta, .article-card { display: flex; flex-direction: column; gap: 6px; padding: 24px 26px; margin: 2em 0; text-decoration: none; color: inherit; }
.article-cta { border-color: var(--gold-line); }
.article-cta strong, .article-card strong { font-size: 1.2rem; color: var(--text); letter-spacing: -.01em; }
.article-cta span:last-child, .article-card span:last-child { color: var(--text-2); font-size: .98rem; line-height: 1.55; }
.article-cta-k { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.article-cta:hover, .article-card:hover { color: inherit; text-decoration: none; }
.faq details { border: 1px solid var(--stroke); border-radius: 14px; padding: 4px 18px; margin-bottom: 10px; background: var(--glass); }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 650; color: var(--text); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--gold); font-weight: 700; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 0 0 14px; }
.article-nota { font-size: .85rem !important; color: var(--text-3) !important; margin-top: 2.2em !important; }
.article-mes { font-size: .95rem; color: var(--text-2); border-top: 1px solid var(--stroke); padding-top: 18px; }
.article-grid { max-width: 1080px; margin: 0 auto; padding: 0 24px 120px; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.article-grid .article-card { margin: 0; }

/* ═══ RENDIMENT (04/10/2026): la web anava "a pocs FPS" ═══
   El més car era el desenfocament (backdrop-filter) de les targetes sobre el fons animat:
   el navegador el recalculava a cada fotograma en fer scroll. Fora a tot arreu excepte la
   barra de navegació. També fora el gra amb mix-blend-mode i l'animació infinita dels titulars. */
.hero-side, .feat, .aff-card, .fiscal-card, .price-card, .rank-row, .calc-form, .calc-results,
.auth-card, .banner-cta, .hero-videos, .fx-card, .ib-btn, .start-btn, .tool-out, .chat-page,
.chat-locked, .cookie-bar, .ib-toast {
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
body::after { display: none !important; }
h1 em, h2 em { animation-iteration-count: 2; }
body::before { animation-duration: 45s; }
@media (max-width: 900px), (pointer: coarse) {
  body::before { animation: none; }            /* mòbils: fons estàtic, scroll sense feina extra */
}
.feat, .aff-card, .fiscal-card, .price-card, .rank-row, .fx-card, .start-btn { will-change: auto; }


/* ═══ Menú mòbil (06/10): panell, cascada, X animada; només transform/opacity (60 fps) ═══ */
.ib-nav-desc { display: none; }
.ib-nav-fons { display: none; }
@media (max-width: 880px) {
  .ib-nav-links {
    display: flex !important; flex-direction: column; gap: 2px;
    position: absolute; top: 100%; left: 10px; right: 10px;
    padding: 10px; border-radius: 22px;
    background: var(--surface); border: 1px solid var(--line); box-shadow: 0 30px 60px -20px rgba(0,0,0,.55);
    opacity: 0; transform: translateY(-10px) scale(.98); transform-origin: top center; pointer-events: none; visibility: hidden;
    transition: opacity .22s cubic-bezier(.16,1,.3,1), transform .28s cubic-bezier(.16,1,.3,1), visibility 0s linear .28s;
    max-height: calc(100dvh - 90px); overflow-y: auto;
  }
  .ib-nav-links.open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; animation: none; }
  .ib-nav-links a {
    display: flex; flex-direction: column; gap: 3px;
    padding: 14px 16px 14px 20px; border-radius: 14px; font-size: 1.08rem; font-weight: 600; color: var(--text);
    position: relative; opacity: 0; transform: translateY(-6px);
    transition: opacity .2s ease-out, transform .26s cubic-bezier(.16,1,.3,1), background .15s;
  }
  .ib-nav-links.open a { opacity: 1; transform: none; }
  .ib-nav-links.open a:nth-child(2) { transition-delay: .03s; }
  .ib-nav-links.open a:nth-child(3) { transition-delay: .06s; }
  .ib-nav-links.open a:nth-child(4) { transition-delay: .09s; }
  .ib-nav-links.open a:nth-child(5) { transition-delay: .12s; }
  .ib-nav-links.open a:nth-child(6) { transition-delay: .15s; }
  .ib-nav-links a:active { background: var(--surface-2, rgba(255,255,255,.05)); }
  .ib-nav-links a.active::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 16px; width: 3px; border-radius: 3px; background: var(--gold); }
  .ib-nav-desc { display: block; font-size: .84rem; font-weight: 400; color: var(--text-2); }
  .ib-nav-fons {
    display: block; position: fixed; inset: 0; z-index: 40; background: rgba(5,7,14,.55);
    opacity: 0; pointer-events: none; transition: opacity .22s ease-out;
  }
  html.theme-light .ib-nav-fons { background: rgba(40,34,20,.25); }
  .ib-nav-fons.open { opacity: 1; pointer-events: auto; }
  html.ib-menu-obert, html.ib-menu-obert body { overflow: hidden; }
  .ib-nav { z-index: 50; }
  .ib-burger { position: relative; width: 40px; height: 40px; align-items: center; justify-content: center; }
  .ib-burger span { position: absolute; transition: transform .26s cubic-bezier(.16,1,.3,1), opacity .15s; }
  .ib-burger span:nth-child(1) { transform: translateY(-6px); }
  .ib-burger span:nth-child(3) { transform: translateY(6px); }
  .ib-burger.open span:nth-child(1) { transform: rotate(45deg); }
  .ib-burger.open span:nth-child(2) { opacity: 0; }
  .ib-burger.open span:nth-child(3) { transform: rotate(-45deg); }
}
@media (max-width: 880px) and (prefers-reduced-motion: reduce) {
  .ib-nav-links, .ib-nav-links a, .ib-burger span, .ib-nav-fons { transition: none !important; }
}


/* ═══ Qualitat (auditoria Web Interface Guidelines de Vercel, 06/10) ═══ */
html { color-scheme: dark; }
html.theme-light { color-scheme: light; }
a, button, input, select, textarea, label { touch-action: manipulation; }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
:is(a, button, summary, [tabindex]):focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.ib-skip { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 10px;
  background: var(--gold); color: #120d03; font-weight: 700; transition: top .15s ease-out; }
.ib-skip:focus { top: 12px; }
[id] { scroll-margin-top: 90px; }


/* ═══ Portada: mini calculadora en viu en lloc de la targeta de xifres (06/10, skill frontend-design) ═══ */
.hero-demo { display: flex; flex-direction: column; gap: 14px; }
.demo-titol { font-size: 1.32rem; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; margin: 0; color: var(--text); }
.demo-sub { margin: -6px 0 2px; color: var(--text-2); font-size: .95rem; }
.demo-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-chip {
  display: inline-flex; align-items: baseline; gap: 7px; cursor: pointer;
  padding: 9px 13px; border-radius: 12px; font: inherit; font-size: .93rem; font-weight: 600;
  color: var(--text-2); background: transparent; border: 1px solid var(--line-2, var(--line));
  transition: background-color .18s ease-out, border-color .18s ease-out, color .18s ease-out, transform .12s ease-out;
}
.demo-chip span { font-weight: 500; font-size: .84rem; opacity: .75; font-variant-numeric: tabular-nums; }
.demo-chip:hover { color: var(--text); border-color: var(--gold-line, var(--gold)); }
.demo-chip:active { transform: scale(.97); }
.demo-chip[aria-pressed="true"] { color: var(--text); border-color: var(--gold); background: var(--gold-soft, rgba(212,173,106,.12)); }
.demo-total { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 12px; margin-top: 6px;
  padding: 16px 18px; border-radius: 16px; border: 1px solid var(--gold-line, rgba(212,173,106,.35));
  background: radial-gradient(420px circle at 85% 0%, var(--gold-glow, rgba(212,173,106,.18)), transparent 60%); }
.demo-eti { color: var(--text-2); font-size: .95rem; }
.demo-total strong { justify-self: end; font-size: 2.6rem; line-height: 1; letter-spacing: -0.02em; color: var(--gold); font-variant-numeric: tabular-nums; }
.demo-mes { grid-column: 1 / -1; justify-self: end; color: var(--text-2); font-size: .88rem; font-variant-numeric: tabular-nums; }
.demo-cta { align-self: flex-start; }
.demo-nota { margin: 0; color: var(--text-3, var(--text-2)); font-size: .8rem; }

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

/* 09/10 nit — RENDIMENT: menú sense vidre glaçat (backdrop-filter sobre el fons animat es recalculava a cada fotograma) */
.ib-nav { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: color-mix(in srgb, var(--bg) 93%, transparent) !important; }
.ib-nav.fx-scrolled { background: color-mix(in srgb, var(--bg) 97%, transparent) !important; }
.ib-dropdown, .cookie-bar, .ib-toast { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.ib-dropdown { background: color-mix(in srgb, var(--surface) 97%, transparent) !important; }

/* 10/10: diàleg de consentiment previ al pagament (Lemon Squeezy) */
.ib-consent { max-width: 460px; width: calc(100% - 32px); border: 1px solid var(--stroke); border-radius: 18px; background: var(--surface); color: var(--text); padding: 24px; }
.ib-consent::backdrop { background: rgba(0,0,0,.6); }
.ib-consent h3 { margin: 0 0 10px; font-size: 1.15rem; }
.ib-consent p { margin: 0 0 14px; color: var(--text-2); font-size: .92rem; line-height: 1.5; }
.ib-consent-check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; line-height: 1.45; margin-bottom: 18px; cursor: pointer; }
.ib-consent-check input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--gold); }
.ib-consent-acc { display: flex; gap: 10px; justify-content: flex-end; }
.ib-consent button[disabled] { opacity: .45; cursor: not-allowed; }

/* 11/10: el menú el posa el JS. Fins que hi és, se'n reserva l'alçada exacta perquè la pàgina no salti (CLS). */
html:not(.ib-nav-on) body { padding-top: 71.52px; }
@media (max-width: 880px) { html:not(.ib-nav-on) body { padding-top: 69px; } }
@media (max-width: 560px) { html:not(.ib-nav-on) body { padding-top: 65px; } }

/* ═══ 11/10 (peticions de Qualitat): text secundari ≥ 12 px i àrees tàctils ≥ 44 px ═══
   El text petit (etiquetes en majúscules, 10,6-11,5 px) passa a 12 px. Les àrees tàctils creixen sense canviar
   l'aspecte: els enllaços sense fons amb farciment + marge negatiu; els botons amb fons, amb una zona invisible. */
.kicker, .aff-card-tag, .rank-tag, .calc-detail-lab, .calc-table th, .ib-foot-disclaimer strong, .field label { font-size: 12px; }
.article-cta-k { font-size: 12px; }
@media (max-width: 600px) { .calc-tab { font-size: 12px; } }

@media (max-width: 700px) {   /* a l'escriptori ja fan > 44 px */
  .ib-foot-links a { display: inline-block; padding-block: 10.5px; margin-block: -10.5px; }
  .ib-foot-links { row-gap: 22px; }   /* sense solapar les zones de dues files */
}
.feat-link { display: inline-block; padding-block: 10px; margin-block: -10px; }
.theme-toggle, .ib-burger, .ib-nav-start, .subs-del { position: relative; }
.theme-toggle::before, .ib-burger::before, .ib-nav-start::before, .subs-del::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: 44px; transform: translate(-50%, -50%); }
.calc-form .ib-btn-sm { min-height: 44px; }
.ib-nav-start { overflow: visible; }            /* els botons retallen (overflow: hidden) pel reflex; aquest petit no en fa */
.ib-nav-start::after { display: none; }

/* 12/10 (Qualitat): a 320 px la columna de la calculadora no es podia estrènyer (1fr = mínim del contingut) */
@media (max-width: 900px) { .calc-wrap { grid-template-columns: minmax(0, 1fr); } }
.calc-form, .calc-results { min-width: 0; max-width: 100%; }
/* Fons de tot el lloc (body::before): quiet (WCAG 2.2.2: cap moviment automàtic de més de 5 s sense botó de pausa) */
body::before { animation: none !important; }
/* WCAG 2.2.2: el reflex daurat dels títols destacats fa una sola passada (abans 2 × 7 s) */
h1 em, h2 em { animation-duration: 4.5s; animation-iteration-count: 1; }
