/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --ink: #16161d;
  --ink-2: #4a4a55;
  --muted: #66666f;
  --line: #e5e2da;
  --line-2: #d6d2c8;
  --accent: #1f5fd1;
  --accent-ink: #1747a6;
  --accent-soft: #eaf1fd;
  --ok: #15803d;
  --warn: #b45309;
  --bad: #b91c1c;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(22, 22, 29, .05), 0 12px 32px -12px rgba(22, 22, 29, .14);
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", var(--sans);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, video, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select { font: inherit; color: inherit; }
a { color: inherit; }
p { text-wrap: pretty; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .6rem 1rem; background: var(--ink); color: #fff; border-radius: 8px;
}
.skip-link:focus { top: 1rem; }
.small { font-size: .82rem; }
.muted { color: var(--muted); }
.noscript { padding: 1rem; background: var(--accent-soft); border-radius: var(--radius-sm); margin-bottom: 1rem; }

/* =============================================================
   4. Header / hero
   ============================================================= */
.site-header { border-bottom: 1px solid var(--line); background: rgba(247, 245, 240, .9); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; font-family: var(--display); font-size: 1.15rem; }
.brand b { color: var(--accent); font-weight: 700; margin-left: 2px; }
.brand-mark { width: 28px; height: 28px; }
.header-nav { display: none; gap: 1.4rem; font-size: .92rem; font-weight: 600; }
.header-nav a { text-decoration: none; color: var(--ink-2); }
.header-nav a:hover { color: var(--accent); }

.hero { padding: 1.1rem 0 .9rem; }
.hero h1 { font-family: var(--display); font-size: clamp(1.6rem, 4.6vw, 2.9rem); font-weight: 700; }
.hero-sub { color: var(--ink-2); margin-top: .4rem; font-size: clamp(.95rem, 2vw, 1.08rem); max-width: 62ch; }

/* =============================================================
   5. Tool card
   ============================================================= */
.tool-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "content" "preview" "design" "obj";
  gap: 12px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.panel-content { grid-area: content; }
.panel-preview { grid-area: preview; display: grid; gap: 12px; }
.panel-design { grid-area: design; }
.panel-3d { grid-area: obj; }

.panel-title { font-size: 1.02rem; font-weight: 800; display: flex; align-items: center; gap: .55rem; margin-bottom: .8rem; letter-spacing: -0.01em; }
.step-num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .8rem; flex: none; }

.field { display: grid; gap: .3rem; margin-bottom: .75rem; min-width: 0; }
.field-label { font-size: .82rem; font-weight: 700; color: var(--ink-2); display: block; margin-bottom: .3rem; }
.field .field-label { margin-bottom: 0; }
.field input[type="url"], .field input[type="text"], .field select {
  width: 100%; height: 46px; padding: 0 .85rem;
  border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); background: #fff;
  transition: border-color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(22, 22, 29, .08); }
#in-url { font-size: 1rem; height: 52px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 12px; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .92rem; min-height: 46px; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.hint { font-size: .84rem; color: var(--muted); margin-top: .5rem; }

.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-bottom: .9rem; }
.seg-btn { padding: .4rem 1rem; border-radius: 999px; font-weight: 700; font-size: .9rem; color: var(--ink-2); }
.seg-btn.is-active { background: var(--ink); color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: .35rem .75rem; border: 1px solid var(--line-2); border-radius: 999px; font-size: .84rem; font-weight: 600; background: #fff; transition: border-color .2s, background .2s; }
.chip:hover { border-color: var(--ink); background: var(--bg); }

/* preview */
.preview-2d { display: grid; grid-template-columns: 1fr; gap: 10px; justify-items: center; }
.qr-frame {
  width: min(100%, 230px); aspect-ratio: 1; border-radius: 14px; background: #fff;
  border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; padding: 8px;
}
.qr-frame canvas, .qr-frame svg { width: 100% !important; height: 100% !important; }
.dl-row { display: flex; gap: 8px; }
.viewer {
  position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden;
  background: radial-gradient(120% 100% at 50% 0%, #ffffff 0%, #ece8df 70%, #e2ddd2 100%);
  border: 1px solid var(--line); touch-action: none;
}
.viewer canvas { width: 100% !important; height: 100% !important; cursor: grab; }
.viewer canvas:active { cursor: grabbing; }
.viewer-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 1rem; color: var(--muted); font-weight: 600; font-size: .92rem; }
.viewer[data-state="ready"] .viewer-msg { display: none; }
.viewer-hint { position: absolute; left: 10px; bottom: 8px; font-size: .74rem; color: var(--muted); background: rgba(255, 255, 255, .8); padding: 2px 8px; border-radius: 999px; pointer-events: none; }
.viewer:not([data-state="ready"]) .viewer-hint { display: none; }

/* design */
.styles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: .9rem; }
.style-btn { display: grid; justify-items: center; gap: 4px; padding: .5rem .2rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-size: .78rem; font-weight: 700; color: var(--ink-2); background: #fff; }
.style-btn.is-active { border-color: var(--ink); color: var(--ink); background: var(--bg); }
.sw { width: 30px; height: 30px; display: block;
  background-image: radial-gradient(var(--ink) 0 0); }
.sw-clasico { background: conic-gradient(var(--ink) 25%, transparent 0 50%, var(--ink) 0 75%, transparent 0) 0 0 / 15px 15px; }
.sw-redondeado { background: conic-gradient(var(--ink) 25%, transparent 0 50%, var(--ink) 0 75%, transparent 0) 0 0 / 15px 15px; border-radius: 9px; }
.sw-puntos { background: radial-gradient(circle, var(--ink) 55%, transparent 58%) 0 0 / 10px 10px; }
.sw-elegante { background: conic-gradient(var(--ink) 25%, transparent 0 50%, var(--ink) 0 75%, transparent 0) 0 0 / 15px 15px; border-radius: 12px 2px 12px 2px; }

.color-field { display: flex; align-items: center; gap: .6rem; font-size: .88rem; font-weight: 600; margin-bottom: .75rem; cursor: pointer; }
.color-field input[type="color"] { width: 40px; height: 40px; padding: 0; border: 1.5px solid var(--line-2); border-radius: 10px; background: none; cursor: pointer; flex: none; }
.color-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 3px; }
.color-field input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 6px; }
.color-field.big input[type="color"] { width: 48px; height: 48px; }

.emoji-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: .6rem; }
.emoji-btn { height: 42px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-size: 1.3rem; background: #fff; transition: transform .15s var(--ease-out); }
.emoji-btn:hover { transform: translateY(-1px); border-color: var(--line-2); }
.emoji-btn.is-active { border-color: var(--accent); background: var(--accent-soft); }
.logo-row { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .8rem; }
.upload { cursor: pointer; }
.link-btn { color: var(--ink-2); font-weight: 600; font-size: .86rem; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover:not(:disabled) { color: var(--accent-ink); }
.link-btn:disabled { opacity: .45; cursor: not-allowed; }

/* 3D panel */
.formats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 1rem; }
.format-btn { display: grid; justify-items: center; gap: 2px; padding: .7rem .3rem .6rem; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink-2); text-align: center; transition: border-color .2s, background .2s; }
.format-btn svg { width: 44px; height: 30px; margin-bottom: 2px; }
.format-btn b { font-size: .84rem; color: var(--ink); line-height: 1.2; }
.format-btn small { font-size: .72rem; color: var(--muted); }
.format-btn.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }

.swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -.2rem 0 1rem; }
.sw-label { font-size: .78rem; color: var(--muted); margin-right: 2px; }
.swatch { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid rgba(0, 0, 0, .15); }
.swatch:hover { transform: scale(1.12); }

.sliders input[type="range"] { width: 100%; accent-color: var(--accent); height: 28px; }

.specs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: .6rem; }
.spec { font-size: .78rem; font-weight: 700; background: var(--bg); border: 1px solid var(--line); padding: .2rem .6rem; border-radius: 999px; color: var(--ink-2); }
.spec.good { color: var(--ok); border-color: #bbf7d0; background: #f0fdf4; }
.spec.bad { color: var(--bad); border-color: #fecaca; background: #fef2f2; }

.warnings { list-style: none; padding: 0; display: grid; gap: 6px; margin-bottom: 1rem; }
.warnings li { font-size: .84rem; padding: .5rem .75rem; border-radius: var(--radius-sm); border-left: 3px solid; line-height: 1.45; }
.warnings .w-bad { background: #fef2f2; border-color: var(--bad); color: #7f1d1d; }
.warnings .w-warn { background: #fffbeb; border-color: #f59e0b; color: #78350f; }
.warnings .w-info { background: #f1f5f9; border-color: #94a3b8; color: #334155; }
.warnings .w-ok { background: #f0fdf4; border-color: #22c55e; color: #14532d; }

.dl-3d { display: grid; gap: .6rem; justify-items: center; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; height: 42px; padding: 0 1.1rem; border-radius: 12px; font-weight: 700; font-size: .92rem; transition: transform .15s var(--ease-out), background .2s, box-shadow .2s; white-space: nowrap; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: progress; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2a2a35; }
.btn-ghost { background: #fff; border: 1.5px solid var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { height: 36px; font-size: .85rem; padding: 0 .85rem; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 22px -8px rgba(31, 95, 209, .55); }
.btn-primary:hover:not(:disabled) { background: #1a52b8; }
.btn-xl { width: 100%; height: 58px; font-size: 1.05rem; border-radius: 14px; }
.btn-xl svg { width: 22px; height: 22px; }

.privacy { margin-top: .9rem; font-size: .88rem; color: var(--ink-2); text-align: center; }

/* =============================================================
   6. Ad slots (placeholders)
   ============================================================= */
.ad-slot {
  display: grid; place-items: center; border: 1.5px dashed #c9c4b8; border-radius: 12px;
  background: repeating-linear-gradient(45deg, #f1eee7 0 10px, #ece8e0 10px 20px);
  color: #9a9488; font-weight: 800; letter-spacing: .18em; font-size: .8rem;
}
.ad-leaderboard { min-height: 90px; max-width: 728px; margin: 1.6rem auto 0; }
.ad-incontent { min-height: 250px; max-width: 336px; margin: 0 auto; }
@media (min-width: 720px) { .ad-incontent { max-width: 728px; min-height: 120px; } }
.ad-modal { width: 300px; max-width: 100%; height: 250px; margin: .8rem auto; }
.ad-corner { width: 100%; height: 100px; }

.ad-dialog {
  border: 0; border-radius: 18px; padding: 22px 20px 18px; width: min(360px, calc(100% - 32px));
  text-align: center; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); position: fixed;
}
.ad-dialog::backdrop { background: rgba(22, 22, 29, .55); backdrop-filter: blur(2px); }
.ad-dialog[open] { animation: popIn .3s var(--ease-out); }
.ad-dialog-title { font-weight: 800; }
.ad-close { position: absolute; top: 8px; right: 10px; width: 34px; height: 34px; border-radius: 50%; font-size: 1.5rem; line-height: 1; color: var(--ink-2); background: var(--bg); }
.ad-close:hover { background: var(--line); }
.ad-close.sm { width: 26px; height: 26px; font-size: 1.1rem; top: -10px; right: -10px; background: var(--ink); color: #fff; z-index: 1; }

.ad-toast {
  position: fixed; right: 16px; bottom: 16px; z-index: 80; width: min(300px, calc(100% - 32px));
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: var(--shadow);
  animation: slideUp .45s var(--ease-out);
}
.ad-toast-label { font-size: .68rem; color: var(--muted); margin-bottom: 4px; }

/* =============================================================
   7. Content sections
   ============================================================= */
.section { padding: 3.2rem 0 1rem; }
.section-title { font-family: var(--display); font-size: clamp(1.4rem, 3.2vw, 2rem); margin-bottom: 1.3rem; }
.steps { list-style: none; padding: 0; display: grid; gap: 12px; counter-reset: st; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; position: relative; counter-increment: st; }
.step::after { content: counter(st); position: absolute; top: .9rem; right: 1.1rem; font-family: var(--display); font-size: 2rem; font-weight: 700; color: var(--line-2); }
.step-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; margin-bottom: .8rem; }
.step-icon svg { width: 24px; height: 24px; }
.step h3 { font-size: 1.08rem; margin-bottom: .35rem; }
.step p { color: var(--ink-2); font-size: .94rem; }

.ideas { display: grid; gap: 12px; margin-bottom: 2rem; }
.idea { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.idea-emoji { font-size: 1.8rem; display: block; margin-bottom: .5rem; }
.idea h3 { font-size: 1.04rem; margin-bottom: .35rem; }
.idea p { color: var(--ink-2); font-size: .93rem; }

.prose { max-width: 780px; }
.prose p, .prose ul { color: var(--ink-2); margin-bottom: 1rem; }
.prose h3 { font-size: 1.15rem; margin: 1.4rem 0 .5rem; }
.prose ul { padding-left: 1.2rem; display: grid; gap: .4rem; }
.prose strong { color: var(--ink); }

.faq { display: grid; gap: 8px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 1.1rem; }
.faq summary { cursor: pointer; font-weight: 700; padding: 1rem 1.6rem 1rem 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: .85rem; font-size: 1.3rem; color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 1rem; color: var(--ink-2); }

.site-footer { margin-top: 3.5rem; border-top: 1px solid var(--line); padding: 2rem 0 5rem; font-size: .9rem; }
.footer-inner { display: grid; gap: .7rem; }
.footer-inner nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer-inner nav a { color: var(--ink-2); }

.legal { max-width: 760px; padding: 2rem 0; }
.legal h1 { font-family: var(--display); font-size: 2rem; margin-bottom: 1rem; }
.legal h2 { font-size: 1.2rem; margin: 1.5rem 0 .5rem; }
.legal p, .legal li { color: var(--ink-2); margin-bottom: .6rem; }

/* =============================================================
   8. Effects
   ============================================================= */
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } }
.is-busy { position: relative; pointer-events: none; }

/* =============================================================
   9. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview-2d { grid-template-columns: auto 1fr; align-items: center; justify-items: start; }
  .qr-frame { width: 170px; }
  .dl-row { flex-direction: column; }
  .emoji-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
}
@media (min-width: 720px) {
  .header-nav { display: flex; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ideas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel { padding: 20px; }
  .hero { padding: 1.8rem 0 1.2rem; }
}
@media (min-width: 960px) {
  .tool-card {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    grid-template-areas: "content preview" "design preview" "obj preview";
    align-items: start;
  }
  .panel-preview { position: sticky; top: 72px; }
  .ideas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .emoji-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .qr-frame { width: 190px; }
}

/* =============================================================
   10. Reduced motion (only intrusive effects)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .ad-dialog[open], .ad-toast { animation: none; }
}

/* =============================================================
   11. Salary calculator
   ============================================================= */
.calc-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.money { position: relative; }
.money input { font-size: 1.35rem !important; font-weight: 800; height: 58px !important; padding-right: 2.6rem !important; }
.money::after { content: "€"; position: absolute; right: .9rem; bottom: 17px; font-weight: 700; color: var(--muted); font-size: .85rem; pointer-events: none; }
.money input { padding-right: 2.4rem !important; }
.money input::placeholder { font-size: .9rem; font-weight: 500; }
.field-error { color: var(--bad); font-size: .85rem; font-weight: 600; margin-top: -.3rem; margin-bottom: .6rem; }
.seg-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 12px; }
.seg-row .seg { display: flex; width: 100%; }
.seg-row .seg-btn { flex: 1; }
.stepper { display: flex; align-items: center; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); height: 46px; overflow: hidden; background: #fff; }
.stepper input { width: 100%; min-width: 0; text-align: center; border: 0; font-weight: 800; font-size: 1.05rem; height: 100%; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.step-btn { width: 46px; height: 100%; font-size: 1.3rem; font-weight: 700; color: var(--ink-2); flex: none; }
.step-btn:hover { background: var(--bg); }
.more { border-top: 1px solid var(--line); margin-top: .4rem; padding-top: .8rem; }
.more summary { cursor: pointer; font-weight: 700; font-size: .9rem; color: var(--ink-2); list-style: none; margin-bottom: .8rem; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "＋ "; color: var(--accent); }
.more[open] summary::before { content: "－ "; }

.result { display: grid; gap: 14px; }
.result[data-state="empty"] .result-body { opacity: .35; pointer-events: none; }
.hero-num { background: var(--ink); color: #fff; border-radius: 16px; padding: 18px 18px 16px; }
.hero-num small { display: block; font-size: .82rem; font-weight: 600; opacity: .75; }
.hero-num strong { display: block; font-family: var(--display); font-size: clamp(2.3rem, 9vw, 3.2rem); line-height: 1.05; letter-spacing: -0.02em; margin: .2rem 0 .1rem; color: #9cc2ff; }
.hero-num p { font-size: .92rem; opacity: .9; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kpi { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: .65rem .8rem; }
.kpi small { display: block; font-size: .75rem; font-weight: 700; color: var(--muted); }
.kpi b { font-size: 1.08rem; }
.bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--line); }
.bar span { transition: width .4s var(--ease-out); }
.bar-net, .dot-net { background: var(--accent); }
.bar-irpf, .dot-irpf { background: #f59e0b; }
.bar-ss, .dot-ss { background: #6366f1; }
.legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .8rem; color: var(--ink-2); margin-top: .5rem; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.breakdown { width: 100%; border-collapse: collapse; font-size: .88rem; }
.breakdown th { text-align: left; font-weight: 500; color: var(--ink-2); padding: .38rem 0; }
.breakdown td { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; padding: .38rem 0; white-space: nowrap; }
.breakdown tr + tr { border-top: 1px dashed var(--line); }
.breakdown tr.strong th, .breakdown tr.strong td { font-weight: 800; color: var(--ink); }
.breakdown tr.total { border-top: 2px solid var(--ink) !important; }
.breakdown tr.total td { color: var(--accent-ink); font-size: 1rem; }
.company { font-size: .86rem; color: var(--ink-2); background: var(--bg); border-radius: 10px; padding: .6rem .8rem; }
.notes { list-style: none; padding: 0; display: grid; gap: 6px; }
.notes li { font-size: .84rem; padding: .5rem .75rem; border-radius: var(--radius-sm); border-left: 3px solid #94a3b8; background: #f1f5f9; color: #334155; }
.notes:empty { display: none; }
.result-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.result-actions .btn-xl { height: 52px; font-size: 1rem; }
.result-actions .btn-ghost { height: 52px; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.net-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 460px; }
.net-table th, .net-table td { padding: .6rem .9rem; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.net-table th:first-child, .net-table td:first-child { text-align: left; }
.net-table thead th { background: var(--bg); font-size: .8rem; color: var(--ink-2); }
.net-table tbody tr + tr { border-top: 1px solid var(--line); }
.net-table td:last-child { font-weight: 800; color: var(--accent-ink); }
.table-note { font-size: .82rem; color: var(--muted); margin-top: .6rem; }

@media (min-width: 540px) {
  .seg-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .calc-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: start; }
  .calc-card .result { position: sticky; top: 72px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.quick-result { display: block; margin: -.2rem 0 .8rem; padding: .55rem .8rem; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-ink); font-size: .92rem; text-decoration: none; }
.quick-result b { font-size: 1.05rem; }
.quick-result span { font-size: .82rem; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 960px) { .quick-result { display: none; } }

/* =============================================================
   12. CalculaFisco additions
   ============================================================= */
.header-nav { gap: 1rem; font-size: .86rem; }
.header-nav a[aria-current="page"] { color: var(--accent); }
.more-grid, .hub-grid { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.more-card, .hub-card {
  display: grid; gap: .25rem; text-decoration: none; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.1rem; transition: border-color .2s, transform .2s var(--ease-out);
}
.more-card:hover, .hub-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.more-card span { font-size: 1.5rem; }
.more-card b { font-size: 1rem; }
.more-card small { color: var(--ink-2); font-size: .85rem; line-height: 1.45; }
.hub-card { padding: 1.3rem; gap: .5rem; }
.hub-card .hub-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.5rem; background: var(--accent-soft); }
.hub-card h2 { font-size: 1.15rem; }
.hub-card p { color: var(--ink-2); font-size: .92rem; }
.hub-card .go { font-weight: 800; color: var(--accent-ink); font-size: .9rem; margin-top: .2rem; }
.field-hint { font-size: .78rem; color: var(--muted); }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 3rem !important; }
.input-suffix::after { content: attr(data-suffix); position: absolute; right: .85rem; bottom: 14px; font-weight: 700; color: var(--muted); font-size: .85rem; pointer-events: none; }
.field input[type="date"], .field input[type="number"] { width: 100%; height: 46px; padding: 0 .85rem; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; }
.field input[type="date"]:focus, .field input[type="number"]:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(22, 22, 29, .08); }
.verify { font-size: .84rem; padding: .5rem .75rem; border-radius: var(--radius-sm); border-left: 3px solid #f59e0b; background: #fffbeb; color: #78350f; }
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.compare .kpi.win { border-color: var(--accent); background: var(--accent-soft); }
.compare .kpi.win small::after { content: " · el que pagas"; color: var(--accent-ink); }
.tramos { width: 100%; border-collapse: collapse; font-size: .84rem; }
.tramos th, .tramos td { padding: .45rem .6rem; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tramos th:first-child, .tramos td:first-child { text-align: left; }
.tramos thead th { background: var(--bg); color: var(--ink-2); font-size: .76rem; }
.tramos tbody tr + tr { border-top: 1px solid var(--line); }
.tramos tr.is-current { background: var(--accent-soft); font-weight: 800; }
.chart { width: 100%; height: 200px; display: block; }
.amort details { border-top: 1px solid var(--line); padding-top: .6rem; }
.amort summary { cursor: pointer; font-weight: 700; font-size: .9rem; color: var(--ink-2); }
.amort .table-wrap { margin-top: .6rem; max-height: 360px; overflow: auto; }
@media (min-width: 540px) {
  .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .more-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hub-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.field input[type="date"] { min-width: 0; max-width: 100%; padding: 0 .5rem; font-size: .92rem; }
.field-row { align-items: end; }

.result-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.result-actions .btn-xl { grid-column: 1 / -1; }
.result-actions .btn-ghost { height: 46px; }

.savings-title { font-size: .95rem; margin-bottom: .3rem; }

/* =============================================================
   13. Trust, sources, print
   ============================================================= */
.updated { display: inline-flex; align-items: center; gap: .4rem; margin-top: .6rem; font-size: .8rem; font-weight: 600; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .2rem .7rem; }
.updated::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.sources ul { padding-left: 1.2rem; display: grid; gap: .35rem; color: var(--ink-2); }
.sources a { color: var(--accent-ink); text-underline-offset: 3px; }
.sources .section-title { font-size: 1.2rem; }
input[aria-invalid="true"] { border-color: var(--bad) !important; }

@media print {
  .site-header, .site-footer, .ad-slot, .ad-dialog, .ad-toast, .result-actions, .quick-result, .more-grid, #mas-calc,
  .steps, .ideas, .faq, .sources, .skip-link, .section-title + .ideas, .chart + .legend { display: none !important; }
  body { background: #fff; }
  .section { padding: 0; }
  main > section:not(#herramienta):not(.hero) { display: none; }
  .calc-card { grid-template-columns: 1fr 1fr !important; }
  .panel { box-shadow: none; break-inside: avoid; }
  .hero-num { background: #fff; color: #000; border: 2px solid #000; }
  .hero-num strong { color: #000; }
  .amort details > *:not(summary) { display: block; }
}
.nav-all { font-weight: 800; color: var(--accent-ink) !important; }
.more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 539px) { .more-card small { display: none; } .more-card { padding: .8rem; } }
@media (min-width: 960px) { .more-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* =============================================================
   14. Compare two options
   ============================================================= */
.compare-card { margin-top: 12px; border-color: var(--accent); }
.compare-head .panel-title { margin-bottom: .2rem; }
.compare-head .field-hint { margin: 0 0 .7rem; }
.compare-table td.diff { font-weight: 800; color: var(--accent-ink); }
.compare-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: .8rem; }
.result-actions .btn-ghost:last-child:nth-child(even) { grid-column: 1 / -1; }
/* =============================================================
   15. Guides
   ============================================================= */
.guide { padding-top: .6rem; }
.guide h2 { font-family: var(--display); font-size: clamp(1.25rem, 3vw, 1.55rem); margin: 2rem 0 .6rem; color: var(--ink); }
.guide p, .guide li { font-size: 1.02rem; line-height: 1.7; }
.guide .ad-slot { margin: 1.6rem auto; }
.callout { background: var(--accent-soft); border: 1px solid #cddcfa; border-radius: 12px; padding: .8rem 1rem; color: var(--ink) !important; }
.callout a { color: var(--accent-ink); font-weight: 700; }
.region-chips { margin-top: .2rem; }
.region-chips .chip { text-decoration: none; }
.region-chips .chip[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* =============================================================
   16. Dark mode (follows the phone / computer setting)
   ============================================================= */
.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; }
.site-search { margin: -.2rem auto 1rem; }
.search-box { display: flex; align-items: center; gap: .6rem; background: var(--surface); border: 1.5px solid var(--line-2); border-radius: 14px; padding: 0 1rem; height: 54px; box-shadow: var(--shadow); }
.search-box:focus-within { border-color: var(--accent); }
.search-box svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.search-box input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 1rem; height: 100%; color: var(--ink); }
.search-box input:focus { outline: none; }
.search-empty { margin-top: .6rem; color: var(--ink-2); font-size: .92rem; }
.see-all { margin-top: 1rem; font-weight: 700; font-size: .92rem; }
.see-all a { color: var(--accent-ink); }
input::placeholder { color: var(--muted); }

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #111216; --surface: #1a1b21; --ink: #ececf1; --ink-2: #c3c3cf; --muted: #9d9daa;
    --line: #2b2c35; --line-2: #3a3b46;
    --accent: #6f9cff; --accent-ink: #a9c4ff; --accent-soft: #1b2540;
    --ok: #4ade80; --bad: #f87171;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -12px rgba(0, 0, 0, .6);
  }
  .site-header { background: rgba(17, 18, 22, .88); }
  .field input[type="url"], .field input[type="text"], .field select, .field input[type="date"], .field input[type="number"],
  .stepper, .stepper input, .chip, .btn-ghost, .ad-toast, .ad-dialog { background: var(--surface); color: var(--ink); }
  .field input:focus, .field select:focus { box-shadow: 0 0 0 3px rgba(255, 255, 255, .08); border-color: var(--accent); }
  .step-num, .seg-btn.is-active, .region-chips .chip[aria-current="page"], .ad-close.sm, .skip-link { background: var(--accent); color: #0b1020; }
  .btn-primary { background: #3d74e6; }
  .btn-primary:hover:not(:disabled) { background: #4a80f0; }
  .hero-num { background: #0a0b0f; border: 1px solid var(--line); }
  .ad-slot { border-color: #3a3b46; background: repeating-linear-gradient(45deg, #1d1e25 0 10px, #202129 10px 20px); color: #7a7b8a; }
  .notes li { background: #1e2330; color: #cfd6e4; border-color: #55607a; }
  .verify { background: #2b2412; color: #f5d48a; border-color: #f59e0b; }
  .callout { border-color: #2c3d66; }
  .hub-card .hub-icon { background: #22263a; }
  .breakdown tr.total { border-top-color: var(--ink) !important; }
  .tramos tr.is-current { background: #1d2a48; }
}