/**
 * /herramientas — single-source design system for every tool page.
 * Mirrors the homepage minimalist language (.net-tile / .why-tile / .how-feature)
 * so every calculator and generator feels native to the rest of the site.
 *
 * Each tool view uses the .tl-* namespace. Legacy classes from the old
 * gradient-flooded design are still neutralised at the bottom of the file
 * in case any cached HTML still references them.
 */

/* ============================================================
   Tokens (mirror homepage.css)
   ============================================================ */
.tl-page {
  --tl-primary: #e61c72;
  --tl-primary-dark: #b51358;
  --tl-primary-light: #ff4d94;
  --tl-text-1: #0f172a;
  --tl-text-2: #475569;
  --tl-text-3: #94a3b8;
  --tl-border: #e5e7eb;
  --tl-border-soft: #f1f5f9;
  --tl-surface: #ffffff;
  --tl-surface-soft: #fafafa;
  --tl-success: #10b981;
  --tl-warn: #f59e0b;
  --tl-danger: #ef4444;
  --tl-radius: 14px;
  --tl-radius-sm: 10px;
}

/* ============================================================
   Page shell
   ============================================================ */
.tl-page {
  background: #fff;
  color: var(--tl-text-1);
  font-family: 'Inter','Source Sans Pro',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  overflow-x: hidden;
}
.tl-page *, .tl-page *::before, .tl-page *::after { box-sizing: border-box; }
.tl-page a { text-decoration: none; }
.tl-page img, .tl-page svg { max-width: 100%; }

.tl-container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ============================================================
   Hero (universal)
   ============================================================ */
.tl-hero { padding: 56px 0 36px; background: var(--tl-surface-soft); border-bottom: 1px solid var(--tl-border); }
.tl-hero-inner { max-width: 720px; }
.tl-hero .tl-eyebrow,
.tl-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(230, 28, 114, 0.08);
  color: var(--tl-primary);
  border: 1px solid rgba(230, 28, 114, 0.2);
  padding: 5px 11px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 16px;
}
.tl-eyebrow svg { width: 13px; height: 13px; }
.tl-hero h1 {
  font-size: clamp(1.85rem, 3.8vw, 2.65rem);
  font-weight: 800; letter-spacing: -0.025em; line-height: 1.12;
  margin: 0 0 14px;
  color: var(--tl-text-1);
}
.tl-hero h1 .accent {
  background: linear-gradient(135deg, #e61c72, #ff4d94);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.tl-hero p.tl-lead {
  font-size: 1.04rem; color: var(--tl-text-2);
  line-height: 1.55; margin: 0 0 18px;
  max-width: 620px;
}
.tl-meta-row {
  display: flex; gap: 18px; flex-wrap: wrap;
  font-size: 0.85rem; color: var(--tl-text-2); font-weight: 600;
}
.tl-meta-row span { display: inline-flex; align-items: center; gap: 6px; }
.tl-meta-row svg { color: var(--tl-success); width: 16px; height: 16px; }

/* ============================================================
   Section primitives
   ============================================================ */
.tl-section { padding: 48px 0; }
.tl-section.alt { background: var(--tl-surface-soft); border-top: 1px solid var(--tl-border); border-bottom: 1px solid var(--tl-border); }
.tl-section h2 {
  font-size: clamp(1.45rem, 3vw, 1.95rem);
  font-weight: 800; letter-spacing: -0.02em;
  margin: 0 0 8px; color: var(--tl-text-1);
}
.tl-section h3 {
  font-size: 1.15rem; font-weight: 700;
  color: var(--tl-text-1); margin: 0 0 6px;
}
.tl-section-sub {
  color: var(--tl-text-2); font-size: 1rem; line-height: 1.55;
  margin: 0 0 28px; max-width: 640px;
}

/* ============================================================
   Tool card — universal "main work" container
   ============================================================ */
.tl-card {
  background: var(--tl-surface);
  border: 1px solid var(--tl-border);
  border-radius: var(--tl-radius);
  padding: 28px;
  display: flex; flex-direction: column; gap: 18px;
}
.tl-card-head {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 18px; border-bottom: 1px solid var(--tl-border-soft);
  margin-bottom: 4px;
}
.tl-card-head-icon {
  width: 44px; height: 44px; border-radius: 11px;
  background: rgba(230, 28, 114, 0.08); color: var(--tl-primary);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.tl-card-head-icon svg { width: 22px; height: 22px; }
.tl-card-head h2 { font-size: 1.15rem; font-weight: 700; margin: 0 0 2px; }
.tl-card-head p { font-size: 0.88rem; color: var(--tl-text-2); margin: 0; }

/* Grid for tool + side info */
.tl-work-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 24px;
  align-items: start;
}
@media (max-width: 960px) {
  .tl-work-grid { grid-template-columns: 1fr; gap: 18px; }
}

/* ============================================================
   Platform tabs (Instagram / TikTok / YouTube)
   ============================================================ */
.tl-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  background: var(--tl-surface-soft);
  border: 1px solid var(--tl-border-soft);
  border-radius: 12px; padding: 4px;
}
.tl-tab {
  appearance: none; -webkit-appearance: none;
  background: transparent; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 12px; border-radius: 9px;
  font-size: 0.9rem; font-weight: 600; color: var(--tl-text-2);
  transition: background .15s ease, color .15s ease;
}
.tl-tab svg { width: 16px; height: 16px; }
.tl-tab:hover { color: var(--tl-text-1); }
.tl-tab.active {
  background: #fff;
  color: var(--tl-primary);
  box-shadow: 0 1px 3px rgba(15, 15, 20, 0.06);
}

/* ============================================================
   Form fields — universal
   ============================================================ */
.tl-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.tl-field-label {
  font-size: 0.82rem; font-weight: 700; color: var(--tl-text-1);
  display: inline-flex; align-items: center; gap: 6px;
}
.tl-field-label svg { width: 15px; height: 15px; color: var(--tl-text-3); }
.tl-input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 11px 14px;
  background: var(--tl-surface);
  border: 1.5px solid var(--tl-border);
  border-radius: var(--tl-radius-sm);
  color: var(--tl-text-1);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tl-input::placeholder { color: var(--tl-text-3); }
.tl-input:focus {
  outline: none;
  border-color: var(--tl-primary);
  box-shadow: 0 0 0 3px rgba(230, 28, 114, 0.12);
}
.tl-field-hint {
  font-size: 0.75rem; color: var(--tl-text-3);
}

/* Inline quick-pick buttons (e.g. goal followers) */
.tl-quick-row {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px;
}
.tl-quick-pill {
  appearance: none; background: var(--tl-surface-soft);
  border: 1.5px solid var(--tl-border);
  color: var(--tl-text-2);
  padding: 6px 12px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700;
  cursor: pointer; transition: all .15s ease;
}
.tl-quick-pill:hover { border-color: rgba(230, 28, 114, 0.4); color: var(--tl-primary); }
.tl-quick-pill.is-active { background: var(--tl-primary); color: #fff; border-color: var(--tl-primary); }

/* ============================================================
   CTA Button
   ============================================================ */
.tl-btn {
  appearance: none; -webkit-appearance: none;
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, #e61c72 0%, #ff4d94 100%);
  color: #fff; border: 0; cursor: pointer;
  padding: 14px 22px; border-radius: 12px;
  font-size: 1rem; font-weight: 700; letter-spacing: 0;
  box-shadow: 0 6px 18px rgba(230, 28, 114, 0.25);
  transition: transform .18s ease, box-shadow .18s ease;
  min-height: 50px;
}
.tl-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(230, 28, 114, 0.32); }
.tl-btn:active { transform: translateY(0); }
.tl-btn svg { width: 18px; height: 18px; }

.tl-btn--ghost {
  background: var(--tl-surface);
  color: var(--tl-text-1);
  border: 1.5px solid var(--tl-border);
  box-shadow: none;
}
.tl-btn--ghost:hover {
  border-color: var(--tl-primary); color: var(--tl-primary);
  box-shadow: none;
}

/* ============================================================
   Result panel
   ============================================================ */
.tl-result {
  background: var(--tl-surface);
  border: 1px solid var(--tl-border);
  border-radius: var(--tl-radius);
  padding: 28px;
}
.tl-result-headline {
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  font-weight: 800; letter-spacing: -0.025em;
  background: linear-gradient(135deg, #e61c72, #ff4d94);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1; margin: 0;
}
.tl-result-sub {
  margin-top: 6px; font-size: 0.95rem; color: var(--tl-text-2); font-weight: 600;
}
.tl-result-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  margin-top: 18px;
}
.tl-stat {
  padding: 14px 16px;
  background: var(--tl-surface-soft);
  border: 1px solid var(--tl-border-soft);
  border-radius: 11px;
}
.tl-stat-label {
  display: block; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.45px; color: var(--tl-text-3);
}
.tl-stat-value {
  display: block; font-size: 1.25rem; font-weight: 800;
  color: var(--tl-text-1); margin-top: 4px; line-height: 1.1;
}

.tl-bar {
  height: 8px; border-radius: 999px;
  background: var(--tl-border-soft); margin: 14px 0 8px;
  overflow: hidden;
}
.tl-bar-fill {
  height: 100%; background: linear-gradient(90deg, #e61c72, #ff4d94);
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.tl-bar-label { font-size: 0.85rem; color: var(--tl-text-2); font-weight: 600; }

.tl-insight {
  margin-top: 18px; padding: 14px 16px;
  background: rgba(230, 28, 114, 0.05);
  border: 1px solid rgba(230, 28, 114, 0.15);
  border-radius: 11px;
  font-size: 0.9rem; color: var(--tl-text-1); line-height: 1.55;
}

.tl-hidden { display: none; }

/* ============================================================
   Benchmark / comparison rows
   ============================================================ */
.tl-benchmark-list { display: flex; flex-direction: column; gap: 8px; }
.tl-benchmark-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 14px;
  background: var(--tl-surface);
  border: 1px solid var(--tl-border-soft);
  border-radius: 11px;
}
.tl-benchmark-row strong {
  font-weight: 700; color: var(--tl-text-1); font-size: 0.92rem;
}
.tl-benchmark-row em {
  font-style: normal; font-weight: 700; font-size: 0.85rem;
  padding: 3px 9px; border-radius: 999px;
}
.tl-benchmark-row em.is-low { background: rgba(239, 68, 68, .12); color: var(--tl-danger); }
.tl-benchmark-row em.is-mid { background: rgba(245, 158, 11, .14); color: #b45309; }
.tl-benchmark-row em.is-ok  { background: rgba(16, 185, 129, .12); color: var(--tl-success); }
.tl-benchmark-row em.is-top { background: rgba(5, 150, 105, .14); color: #047857; }

/* ============================================================
   How-it-works steps
   ============================================================ */
.tl-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .tl-steps { grid-template-columns: 1fr; } }
.tl-step {
  background: var(--tl-surface); padding: 20px 22px;
  border: 1px solid var(--tl-border); border-radius: var(--tl-radius);
}
.tl-step-num {
  width: 32px; height: 32px; border-radius: 10px;
  background: rgba(230, 28, 114, 0.1); color: var(--tl-primary);
  font-weight: 800; font-size: 0.95rem;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.tl-step h3 { font-size: 1rem; font-weight: 700; margin: 0 0 6px; }
.tl-step p { font-size: 0.9rem; color: var(--tl-text-2); line-height: 1.5; margin: 0; }

/* ============================================================
   FAQ accordion
   ============================================================ */
.tl-faq { max-width: 780px; }
.tl-faq-item {
  background: var(--tl-surface);
  border: 1px solid var(--tl-border);
  border-radius: var(--tl-radius);
  margin-bottom: 10px; overflow: hidden;
  transition: border-color .18s ease;
}
.tl-faq-item:hover { border-color: rgba(230, 28, 114, 0.25); }
.tl-faq-q {
  width: 100%; background: none; border: 0;
  padding: 17px 20px; text-align: left;
  font-size: 0.98rem; font-weight: 700; color: var(--tl-text-1);
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  gap: 14px; font-family: inherit;
}
.tl-faq-q svg { color: var(--tl-primary); transition: transform .25s ease; flex-shrink: 0; }
.tl-faq-item.open .tl-faq-q svg { transform: rotate(45deg); }
.tl-faq-a {
  padding: 0 20px; max-height: 0; overflow: hidden;
  transition: max-height .3s ease-out, padding .3s ease-out;
  color: var(--tl-text-2); font-size: 0.93rem; line-height: 1.6;
}
.tl-faq-item.open .tl-faq-a { max-height: 600px; padding: 0 20px 18px; }

/* ============================================================
   Cross-promotion (other tools)
   ============================================================ */
.tl-cross-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.tl-cross-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--tl-surface);
  border: 1px solid var(--tl-border);
  border-radius: var(--tl-radius);
  color: var(--tl-text-1);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.tl-cross-card:hover {
  border-color: rgba(230, 28, 114, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15, 15, 20, 0.05);
  color: var(--tl-text-1);
}
.tl-cross-icon {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
  background: rgba(230, 28, 114, 0.08); color: var(--tl-primary);
  display: flex; align-items: center; justify-content: center;
}
.tl-cross-icon svg { width: 18px; height: 18px; }
.tl-cross-text strong { display: block; font-size: 0.9rem; font-weight: 700; }
.tl-cross-text span { display: block; font-size: 0.78rem; color: var(--tl-text-2); margin-top: 2px; }

/* ============================================================
   Final CTA (pink gradient)
   ============================================================ */
.tl-cta-final {
  padding: 72px 0; text-align: center;
  background: linear-gradient(135deg, #e61c72, #ff4d94); color: #fff;
  position: relative; overflow: hidden; isolation: isolate;
}
.tl-cta-final::before {
  content: ''; position: absolute; inset: -30% -8% auto auto;
  width: min(360px, 60vw); aspect-ratio: 1/1;
  background: radial-gradient(circle, rgba(255,255,255,.1), transparent 70%);
  pointer-events: none; z-index: 0;
}
.tl-cta-final-inner { position: relative; z-index: 1; }
.tl-cta-final h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 800;
  margin: 0 0 12px; line-height: 1.2; letter-spacing: -.02em;
}
.tl-cta-final p {
  font-size: 1.02rem; opacity: .95; max-width: 540px;
  margin: 0 auto 24px; line-height: 1.55;
}
.tl-cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--tl-primary);
  padding: 13px 28px; border-radius: 50px;
  font-weight: 700; font-size: 0.98rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .15);
  transition: transform .18s ease, color .18s ease, box-shadow .18s ease;
}
.tl-cta-btn:hover {
  transform: translateY(-2px);
  color: var(--tl-primary-dark);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .2);
}
.tl-cta-btn svg { width: 16px; height: 16px; }

/* ============================================================
   Mobile polish
   ============================================================ */
@media (max-width: 640px) {
  .tl-container { padding: 0 16px; }
  .tl-hero { padding: 38px 0 26px; }
  .tl-section { padding: 36px 0; }
  .tl-card { padding: 20px; }
  .tl-result { padding: 22px; }
  .tl-tabs { padding: 3px; }
  .tl-tab { padding: 9px 6px; font-size: 0.85rem; }
  .tl-tab span { display: none; }
  .tl-tab svg { width: 18px; height: 18px; }
  .tl-result-grid { grid-template-columns: 1fr; }
  .tl-cross-grid { grid-template-columns: 1fr; }
  .tl-cta-final { padding: 52px 18px; }
  .tl-faq-q { padding: 15px 18px; font-size: 0.94rem; }
  .tl-faq-item.open .tl-faq-a { padding: 0 18px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .tl-card, .tl-cross-card, .tl-btn, .tl-tab,
  .tl-faq-q svg, .tl-bar-fill { transition: none !important; animation: none !important; }
}

/* ============================================================
   Legacy class neutralisers — defensive, in case old cached
   HTML from any tool view still references these.
   ============================================================ */
.engagement-hero .hero-background,
.engagement-hero .hero-pattern,
.engagement-hero .floating-shapes,
.engagement-hero .shape,
.bio-hero .floating-shapes,
.bio-hero .hero-background,
.bio-hero .hero-pattern,
.bio-hero .shape { display: none !important; }
