/* ==========================================================================
   Calcula ya — Hoja de estilos principal
   Paleta: azul tinta (confianza) + verde jade (acción) sobre papel cálido
   ========================================================================== */

:root {
  /* Base */
  --ink: #0E1A2B;
  --ink-2: #33415A;
  --muted: #5F6B7E;
  --bg: #F7F5F0;
  --surface: #FFFFFF;
  --surface-2: #FBFAF7;
  --line: #E6E1D6;
  --line-strong: #D6CFC0;

  /* Marca */
  --brand: #13315C;
  --brand-2: #1E4B87;
  --brand-deep: #0B1F3D;
  --accent: #0B8A6B;
  --accent-ink: #076650;
  --accent-soft: #E3F3EE;
  --gold: #C8962E;

  /* Categorías (tintes de la misma familia) */
  --c-fin: #0B8A6B;   --c-fin-soft: #E3F3EE;
  --c-date: #2F5DA8;  --c-date-soft: #E7EEF9;
  --c-study: #A86E14; --c-study-soft: #FAF0DD;
  --c-conv: #6A4C9C;  --c-conv-soft: #EFEAF7;
  --c-util: #B04A35;  --c-util-soft: #F8E8E3;

  /* Tipografía */
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;

  /* Forma */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(14, 26, 43, .06);
  --shadow: 0 1px 2px rgba(14, 26, 43, .05), 0 8px 24px -12px rgba(14, 26, 43, .18);
  --shadow-lg: 0 2px 4px rgba(14, 26, 43, .06), 0 24px 48px -20px rgba(14, 26, 43, .30);

  --container: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 68px;
}

/* ---------- Reset ligero ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
a { color: var(--brand-2); text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; color: var(--ink); }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

[hidden] { display: none !important; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
  text-decoration: none; transition: top .15s;
}
.skip-link:focus { top: 12px; color: #fff; }

.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 245, 240, .88);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo-mark { width: 36px; height: 36px; flex-shrink: 0; }
.logo-text { font-size: 1.28rem; font-weight: 800; letter-spacing: -0.035em; }
.logo-text span { color: var(--accent); }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav a {
  display: block; padding: 8px 12px; border-radius: 999px;
  font-size: .94rem; font-weight: 600; color: var(--ink-2); text-decoration: none;
  transition: background .15s, color .15s;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); cursor: pointer; color: var(--ink);
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; padding: 12px var(--gutter) 20px; gap: 2px; }
  .main-nav a { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 1rem; }
}

/* ==========================================================================
   Hero (home)
   ========================================================================== */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(11, 138, 107, .38), transparent 60%),
    radial-gradient(700px 380px at -10% 110%, rgba(30, 75, 135, .55), transparent 60%),
    var(--brand-deep);
  padding: clamp(56px, 9vw, 104px) 0 clamp(64px, 9vw, 112px);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}
.hero .container { position: relative; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  font-size: .86rem; font-weight: 600; color: #CFE9E1; margin-bottom: 22px;
}
.hero-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #3FD1A6; box-shadow: 0 0 0 4px rgba(63, 209, 166, .2); }
.hero h1 {
  color: #fff; font-size: clamp(2.1rem, 5.4vw, 3.6rem); font-weight: 800;
  letter-spacing: -0.035em; max-width: 16ch; margin-bottom: 18px;
}
.hero h1 em { font-style: normal; color: #5FE0B8; }
.hero-lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: #C4CFDF; max-width: 58ch; margin-bottom: 32px; }

.search { position: relative; max-width: 560px; }
.search .icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 60px; padding: 0 20px 0 52px;
  border: 0; border-radius: 16px; background: #fff; color: var(--ink);
  font-size: 1.05rem; box-shadow: 0 20px 40px -18px rgba(0,0,0,.5);
}
.search input::placeholder { color: #8A93A3; }
.search input:focus { outline: 3px solid #5FE0B8; outline-offset: 2px; }

.hero-facts { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: #B7C3D6; font-size: .94rem; }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts .icon { width: 18px; height: 18px; color: #5FE0B8; }

/* ==========================================================================
   Secciones y categorías
   ========================================================================== */
.section { padding-block: clamp(48px, 7vw, 80px); }
.section + .section { padding-top: 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-kicker { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 6px; }
.section-title { font-size: clamp(1.6rem, 3.2vw, 2.1rem); font-weight: 800; margin: 0; }

.category { margin-bottom: 56px; }
.category:last-child { margin-bottom: 0; }
.category-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.category-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--cat-soft, var(--accent-soft)); color: var(--cat, var(--accent));
}
.category-head h2 { font-size: 1.35rem; font-weight: 750; margin: 0; }
.category-head p { margin: 0; color: var(--muted); font-size: .95rem; }
.category-count { margin-left: auto; font-size: .85rem; font-weight: 600; color: var(--muted); white-space: nowrap; }

.cat-fin   { --cat: var(--c-fin);   --cat-soft: var(--c-fin-soft); }
.cat-date  { --cat: var(--c-date);  --cat-soft: var(--c-date-soft); }
.cat-study { --cat: var(--c-study); --cat-soft: var(--c-study-soft); }
.cat-conv  { --cat: var(--c-conv);  --cat-soft: var(--c-conv-soft); }
.cat-util  { --cat: var(--c-util);  --cat-soft: var(--c-util-soft); }

/* ---------- Tarjetas de herramientas ---------- */
.tool-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.tool-card {
  position: relative; height: 100%;
  display: flex; flex-direction: column; gap: 10px;
  padding: 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
a.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); color: var(--ink); }
a.tool-card:hover .tool-go { color: var(--cat, var(--accent)); gap: 10px; }
.tool-icon {
  width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center;
  background: var(--cat-soft, var(--accent-soft)); color: var(--cat, var(--accent));
  margin-bottom: 4px;
}
.tool-title { font-size: 1.06rem; font-weight: 700; margin: 0; letter-spacing: -0.015em; }
.tool-desc { font-size: .93rem; color: var(--muted); margin: 0; flex: 1; }
.tool-go { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 700; color: var(--brand-2); transition: gap .18s, color .18s; }
.tool-go .icon { width: 16px; height: 16px; stroke-width: 2.2; }
.tool-card.is-soon { background: var(--surface-2); box-shadow: none; }
.tool-card.is-soon .tool-icon { opacity: .75; }
.tool-badge {
  align-self: flex-start; font-size: .75rem; font-weight: 700; letter-spacing: .02em;
  padding: 4px 10px; border-radius: 999px; background: #EFEBE2; color: var(--muted);
}

.no-results { display: none; padding: 40px 24px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.no-results.is-visible { display: block; }

/* ---------- Bloque de ventajas ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feature { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.feature .icon { width: 28px; height: 28px; color: var(--accent); margin-bottom: 14px; }
.feature h3 { font-size: 1.08rem; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ==========================================================================
   Páginas interiores (legales, herramientas)
   ========================================================================== */
.page-head { padding: clamp(36px, 6vw, 64px) 0 clamp(24px, 4vw, 36px); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); }
.page-head h1 { font-size: clamp(1.9rem, 4.4vw, 2.8rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 10px; }
.page-head .lead { font-size: 1.1rem; color: var(--muted); max-width: 64ch; margin: 0; }

.breadcrumbs ol { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: .88rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand-2); text-decoration: underline; }

/* Texto largo */
.prose { max-width: 760px; font-size: 1.03rem; color: var(--ink-2); }
.prose h2 { font-size: 1.5rem; font-weight: 750; margin: 2em 0 .6em; color: var(--ink); }
.prose h3 { font-size: 1.15rem; font-weight: 700; margin: 1.6em 0 .5em; color: var(--ink); }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .4em; }
.prose strong { color: var(--ink); }
.prose .updated { font-size: .92rem; color: var(--muted); }

.table-wrap { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); -webkit-overflow-scrolling: touch; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 640px; }
.table-wrap th, .table-wrap td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap th { background: var(--surface-2); font-weight: 700; color: var(--ink); white-space: nowrap; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap code { font-family: var(--font-mono); font-size: .88em; background: #F1EEE6; padding: 2px 6px; border-radius: 5px; color: var(--ink); white-space: nowrap; }
.table-group td { background: #FAF8F3; font-weight: 700; color: var(--ink); }

/* Datos que el titular debe completar */
.fill { background: #FFF1C9; color: #6B4A00; padding: 1px 6px; border-radius: 4px; font-weight: 600; }

.note {
  padding: 16px 18px; border-radius: var(--radius-sm); margin: 0 0 1.4em;
  background: var(--accent-soft); border-left: 4px solid var(--accent); color: var(--ink-2); font-size: .97rem;
}
.note p:last-child { margin: 0; }

/* Botones genéricos */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; font-size: .98rem; cursor: pointer; text-decoration: none;
  transition: background .15s, box-shadow .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--brand-2); color: var(--brand); }

/* Tarjeta de contacto */
.contact-card { display: flex; gap: 16px; align-items: flex-start; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin-bottom: 1.4em; }
.contact-card .icon { color: var(--accent); width: 28px; height: 28px; }
.contact-card p { margin: 0; }

/* Espacios publicitarios: ocultos hasta que haya consentimiento y AdSense esté configurado */
.ad-slot { display: none; }
.ads-on .ad-slot { display: block; min-height: 120px; margin: 32px auto; text-align: center; }
.ad-label { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { margin-top: 64px; background: var(--brand-deep); color: #AFBBCD; font-size: .94rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; padding: 56px 0 40px; }
.site-footer .logo { color: #fff; margin-bottom: 12px; }
.site-footer .logo-text span { color: #5FE0B8; }
.footer-about { max-width: 34ch; margin: 0; }
.footer-col h2 { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin: 6px 0 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a, .link-btn { color: #AFBBCD; text-decoration: none; }
.site-footer a:hover, .site-footer .link-btn:hover { color: #fff; text-decoration: underline; }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; text-align: left; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 22px 0 28px; border-top: 1px solid rgba(255,255,255,.1); font-size: .86rem; color: #8896AB; }
.footer-bottom p { margin: 0; }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ==========================================================================
   Consentimiento de cookies (AEPD 2023)
   Los tres botones comparten EXACTAMENTE el mismo estilo (.cc-btn)
   ========================================================================== */
.cc-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1000;
  max-width: 1080px; margin: 0 auto;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -20px rgba(14, 26, 43, .45);
  padding: 22px 24px;
  display: grid; grid-template-columns: 1fr auto; gap: 18px 28px; align-items: center;
  animation: cc-in .25s ease-out;
}
.cc-banner[hidden] { display: none; }
@keyframes cc-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.cc-title { font-weight: 800; font-size: 1.05rem; margin: 0 0 6px; letter-spacing: -0.01em; }
.cc-text { font-size: .93rem; line-height: 1.55; color: var(--ink-2); margin: 0; }
.cc-text a { color: var(--brand-2); font-weight: 600; }
.cc-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; min-width: 460px; }
.cc-btn {
  min-height: 48px; padding: 0 16px; border-radius: 12px;
  border: 2px solid var(--brand); background: var(--brand); color: #fff;
  font-weight: 700; font-size: .96rem; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.cc-btn:hover { background: var(--brand-2); border-color: var(--brand-2); }

@media (max-width: 900px) {
  .cc-banner { grid-template-columns: 1fr; }
  .cc-actions { min-width: 0; }
}
@media (max-width: 520px) {
  .cc-banner { left: 10px; right: 10px; bottom: 10px; padding: 18px; }
  .cc-actions { grid-template-columns: 1fr; }
}

/* Panel de configuración */
.cc-modal {
  width: min(640px, calc(100% - 24px)); max-height: calc(100vh - 32px);
  padding: 0; border: 0; border-radius: var(--radius-lg);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg);
}
.cc-modal::backdrop { background: rgba(11, 31, 61, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.cc-modal form { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.cc-modal-head { padding: 24px 24px 8px; }
.cc-modal-head h2 { font-size: 1.35rem; margin: 0 0 6px; }
.cc-modal-head p { font-size: .93rem; color: var(--muted); margin: 0; }
.cc-modal-body { padding: 8px 24px; overflow-y: auto; }
.cc-cat { padding: 16px 0; border-bottom: 1px solid var(--line); }
.cc-cat:last-child { border-bottom: 0; }
.cc-cat-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cc-cat-name { font-weight: 700; font-size: 1rem; }
.cc-cat p { margin: 6px 0 0; font-size: .9rem; color: var(--muted); }
.cc-always { font-size: .82rem; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.cc-modal-foot { padding: 16px 24px 24px; border-top: 1px solid var(--line); background: var(--surface-2); }
.cc-modal-foot .cc-actions { min-width: 0; }
.cc-close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px;
  border: 0; border-radius: 10px; background: transparent; cursor: pointer; color: var(--muted);
  display: grid; place-items: center;
}
.cc-close:hover { background: var(--bg); color: var(--ink); }

/* Interruptor accesible (checkbox nativo) — nunca premarcado */
.switch { position: relative; display: inline-flex; flex-shrink: 0; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch .track { width: 48px; height: 28px; border-radius: 999px; background: #CBD2DC; transition: background .15s; position: relative; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--accent); outline-offset: 2px; }

.cc-status { display: inline-block; font-weight: 700; color: var(--ink); }

/* ==========================================================================
   Páginas de herramienta
   ========================================================================== */
.tool-head { padding: 22px 0 18px; }
.tool-head .breadcrumbs ol { margin-bottom: 12px; }
.tool-head-row { display: flex; align-items: center; gap: 14px; }
.tool-head-row .tool-icon { margin: 0; width: 46px; height: 46px; }
.tool-head h1 { font-size: clamp(1.55rem, 4vw, 2.3rem); font-weight: 800; letter-spacing: -0.03em; margin: 0; }
.tool-head .lead { margin: 10px 0 0; color: var(--muted); font-size: 1.02rem; max-width: 70ch; }

.tool-main { display: grid; gap: 18px; }
.calc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: clamp(18px, 3.5vw, 30px);
}
.calc-title { font-size: 1.08rem; font-weight: 750; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.calc-title .num { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: .82rem; background: var(--cat-soft, var(--accent-soft)); color: var(--cat, var(--accent)); flex-shrink: 0; }
.calc-hint { font-size: .88rem; color: var(--muted); margin: 12px 0 0; }
.calc-sep { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.noscript-msg { padding: 16px; border-radius: var(--radius-sm); background: #FFF1C9; color: #6B4A00; margin: 0; }

/* Formularios */
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.fields + .fields, .fields + .field, .field + .fields, .seg + .fields, .fields + .seg, .fields + .checks, .checks + .fields { margin-top: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: .88rem; font-weight: 650; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; min-height: 52px; padding: 0 14px;
  border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--surface);
  font-size: 1.1rem; color: var(--ink); transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.select {
  padding-right: 40px; cursor: pointer; font-size: 1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235F6B7E' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
.textarea { display: block; padding: 14px; min-height: 220px; resize: vertical; line-height: 1.6; font-size: 1.02rem; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(11, 138, 107, .15); }
.input[aria-invalid="true"] { border-color: #C0392B; }
input[type="date"].input { font-size: 1rem; }
.affix { position: relative; }
.affix .input { padding-right: 46px; }
.affix-txt { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 650; pointer-events: none; }

/* Control segmentado (radios) */
.seg { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; margin: 0; }
.seg label { flex: 1 1 auto; position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.seg span {
  display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 14px;
  border-radius: 10px; font-weight: 650; font-size: .95rem; color: var(--ink-2); white-space: nowrap; transition: background .15s, color .15s;
}
.seg input:checked + span { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }
.seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 1px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; font-size: .88rem; font-weight: 650; color: var(--ink-2); margin-bottom: 6px; }

.check { display: inline-flex; align-items: center; gap: 10px; font-size: .95rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; flex-shrink: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 12px 22px; }
.range { width: 100%; accent-color: var(--accent); height: 28px; margin: 0; }

/* Frase interactiva (porcentajes) */
.sentence { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 1.05rem; color: var(--ink-2); }
.sentence .input { width: 128px; min-height: 48px; text-align: center; }
.sentence .select { width: auto; min-height: 48px; }
.sentence .eq { font-weight: 700; color: var(--muted); }
.sentence output { font-size: 1.4rem; font-weight: 800; color: var(--ink); min-width: 60px; font-variant-numeric: tabular-nums; }
.sentence-sub { font-size: .88rem; color: var(--muted); margin: 8px 0 0; min-height: 1.4em; }

/* Resultados */
.result {
  margin-top: 18px; padding: 18px 20px; border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-deep), var(--brand)); color: #fff;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.result-label { font-size: .85rem; font-weight: 600; color: #B9C6DA; margin: 0 0 2px; }
.result-value { font-size: clamp(1.7rem, 5vw, 2.3rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; margin: 0; word-break: break-word; font-variant-numeric: tabular-nums; color: #fff; }
.result-sub { font-size: .92rem; color: #C9D4E4; margin: 4px 0 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.stat { padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.stat-label { font-size: .8rem; font-weight: 650; color: var(--muted); margin: 0 0 2px; }
.stat-value { font-size: 1.25rem; font-weight: 800; margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; word-break: break-word; }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn-light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.28); min-height: 42px; padding: 0 16px; }
.btn-light:hover { background: rgba(255,255,255,.2); color: #fff; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .9rem; border-radius: 10px; }
.btn-icon { width: 44px; padding: 0; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-ink); color: #fff; }
.btn .icon { width: 18px; height: 18px; }
.is-copied { background: var(--accent) !important; border-color: var(--accent) !important; color: #fff !important; }

.privacy-badge { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--muted); padding: 0 4px; margin: 0; }
.privacy-badge .icon { width: 20px; height: 20px; color: var(--accent); }

/* Conversores */
.conv-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: end; }
.conv-side { display: grid; gap: 10px; min-width: 0; }
.swap-btn { width: 52px; height: 52px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--surface); cursor: pointer; display: grid; place-items: center; color: var(--brand); transition: transform .2s, border-color .15s; }
.swap-btn:hover { border-color: var(--accent); }
.conv-out { min-height: 52px; display: flex; align-items: center; padding: 0 14px; border-radius: 12px; background: var(--surface-2); border: 1.5px dashed var(--line-strong); font-size: 1.1rem; font-weight: 750; font-variant-numeric: tabular-nums; word-break: break-all; }
@media (max-width: 620px) {
  .conv-grid { grid-template-columns: 1fr; }
  .swap-btn { justify-self: center; transform: rotate(90deg); margin: 0; }
}
.equiv { margin-top: 18px; }
.equiv .table-wrap table { min-width: 0; }
.equiv td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }

/* Filas dinámicas (notas) */
.rows { display: grid; gap: 12px; }
.row { display: grid; grid-template-columns: 1.6fr 1fr 1fr 44px; gap: 10px; align-items: end; }
.row .btn-icon { min-height: 52px; }
@media (max-width: 560px) {
  .row { grid-template-columns: 1fr 1fr 44px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .row .field:first-child { grid-column: 1 / -1; }
}

/* Barras de límite */
.limits { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 22px; margin-top: 16px; }
.limit-top { display: flex; justify-content: space-between; gap: 8px; font-size: .88rem; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.bar { height: 8px; background: #ECE8DF; border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .2s, background .2s; }
.bar.is-over > i { background: #C0392B; }
.is-over-txt { color: #C0392B; }

/* Contraseñas */
.pass-out { display: flex; gap: 10px; align-items: stretch; }
.pass-out output {
  flex: 1; min-width: 0; min-height: 64px; display: flex; align-items: center; padding: 10px 16px;
  font-family: var(--font-mono); font-size: clamp(1rem, 3.4vw, 1.3rem); font-weight: 600; word-break: break-all;
  background: var(--brand-deep); color: #fff; border-radius: 12px; letter-spacing: .02em;
}
.pass-out .btn { min-height: 64px; }
.strength { margin-top: 14px; }
.bulk { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-family: var(--font-mono); font-size: .95rem; }
.bulk li { padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; word-break: break-all; }

/* Pomodoro */
.pomo { display: grid; justify-items: center; gap: 18px; text-align: center; }
.pomo-ring { position: relative; width: min(250px, 68vw); aspect-ratio: 1; }
.pomo-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pomo-ring circle { fill: none; stroke-width: 10; }
.pomo-ring .ring-track { stroke: #ECE8DF; }
.pomo-ring .ring-prog { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .4s linear, stroke .3s; }
.pomo.is-break .ring-prog { stroke: var(--c-date); }
.pomo-time { position: absolute; inset: 0; display: grid; place-content: center; gap: 2px; }
.pomo-time output { font-size: clamp(2.5rem, 11vw, 3.5rem); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--ink); line-height: 1; }
.pomo-time span { font-size: .9rem; font-weight: 650; color: var(--muted); }
.pomo-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pomo-controls .btn { min-width: 120px; }
.pomo-settings { width: 100%; text-align: left; }

/* Contenido bajo la herramienta */
.tool-content { padding-top: 44px; }
.example { padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin: 0 0 1.2em; }
.example p:last-child, .example ul:last-child { margin-bottom: 0; }
.faq { max-width: 760px; margin-top: 44px; }
.faq h2, .related h2 { font-size: 1.5rem; font-weight: 750; margin-bottom: 16px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 10px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 500; color: var(--muted); }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 18px 16px; color: var(--ink-2); }
.faq details > div p:last-child { margin: 0; }
.related { margin-top: 48px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.stepper { display: flex; gap: 8px; }
.stepper .input { text-align: center; }
.stepper .btn { min-height: 52px; font-size: 1.3rem; flex-shrink: 0; }
.pairs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pomo-settings { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.pomo-settings summary { cursor: pointer; padding: 12px 16px; font-weight: 700; }
.pomo-settings > div { padding: 0 16px 16px; }
fieldset + .fields, fieldset + .field, .fields + fieldset { margin-top: 14px; }
@media (max-width: 560px) {
  .tool-head { padding: 16px 0 14px; }
  .tool-head .lead { font-size: .95rem; }
}
