:root {
  --te-primary: #005B96;
  --te-primary-hover: #004a7a;
  --te-bg: #f8fafc;
  --te-surface: #ffffff;
  --te-text: #1a2b4c;
  --te-muted: #5c6b7e;
  --te-border: #dce3ea;
  --te-accent: #0d6e4f;
  --te-radius: 10px;
  --te-max: 960px;
  --te-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--te-font); background: var(--te-bg); color: var(--te-text); line-height: 1.6; }
a { color: var(--te-primary); }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 9999; background: #fff; padding: 8px 12px; }
.te-header { background: var(--te-surface); border-bottom: 1px solid var(--te-border); }
.te-header-inner, .te-main, .te-footer-inner { max-width: var(--te-max); margin: 0 auto; padding: 0 16px; }
.te-header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.te-logo img { display: block; height: 28px; width: auto; }
.te-nav { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 14px; }
.te-nav a { text-decoration: none; color: var(--te-text); }
.te-nav a:hover { color: var(--te-primary); }
.te-nav-cta { background: var(--te-primary); color: #fff !important; padding: 8px 14px; border-radius: var(--te-radius); font-weight: 600; }
.te-nav-cta:hover { background: var(--te-primary-hover); }
.te-main { padding: 24px 16px 48px; }
.te-hero { background: var(--te-surface); border: 1px solid var(--te-border); border-radius: 12px; padding: 28px 24px; margin-bottom: 32px; }
.te-hero h1 { margin: 0 0 12px; font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.2; }
.te-lead { font-size: 1.05rem; color: var(--te-muted); margin: 0 0 16px; }
.te-disclaimer-inline { font-size: 13px; color: var(--te-muted); border-left: 3px solid var(--te-accent); padding-left: 12px; margin: 16px 0; }
.te-card-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.te-card {
  position: relative;
  background: var(--te-surface); border: 1px solid var(--te-border); border-radius: var(--te-radius); padding: 18px;
  transition: border-color .15s, box-shadow .15s;
}
.te-card:hover { border-color: #b8d4ea; box-shadow: 0 4px 14px rgba(26, 43, 76, 0.07); }
.te-card:focus-within { outline: 2px solid var(--te-primary); outline-offset: 2px; }
.te-card h2, .te-card h3 { margin: 0 0 8px; font-size: 1rem; }
.te-card p { margin: 0; font-size: 14px; color: var(--te-muted); }
.te-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 20px; font-size: 13px; color: var(--te-muted); }
.te-breadcrumbs li:not(:last-child)::after { content: "›"; margin-left: 6px; }
.te-article h1 { font-size: clamp(1.35rem, 3.5vw, 1.75rem); margin: 0 0 8px; }
.te-meta { font-size: 13px; color: var(--te-muted); margin: 0 0 20px; }
.te-direct-answer { background: #eef6fc; border: 1px solid #cfe2f3; border-radius: var(--te-radius); padding: 16px 18px; margin-bottom: 24px; }
.te-answer-text { margin: 0; font-size: 1.05rem; }
.te-key-facts ul { margin: 0; padding-left: 1.2rem; }
.te-explanation-label { font-size: 13px; color: var(--te-muted); margin-bottom: 16px; }
.te-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.te-table th, .te-table td { border: 1px solid var(--te-border); padding: 10px 12px; text-align: left; }
.te-table th { background: #f0f4f8; }
.te-faq-item { border: 1px solid var(--te-border); border-radius: var(--te-radius); padding: 12px 14px; margin-bottom: 10px; background: var(--te-surface); }
.te-sources { margin-top: 32px; padding-top: 24px; border-top: 2px solid var(--te-border); }
.te-sources-list { list-style: none; padding: 0; }
.te-source-item { margin-bottom: 12px; font-size: 14px; }
.te-source-meta { color: var(--te-muted); font-size: 12px; }
.te-cta { background: linear-gradient(180deg, #f0f7fc, #e8f2fa); border: 1px solid #b8d4ea; border-radius: 12px; padding: 20px; margin-top: 32px; text-align: center; }
.te-cta-text { font-weight: 600; margin: 0 0 12px; }
.btn, .te-cta-btn { display: inline-block; background: var(--te-primary); color: #fff; padding: 14px 22px; border-radius: var(--te-radius); text-decoration: none; font-weight: 600; border: 0; cursor: pointer; font-size: 16px; }
.btn:hover, .te-cta-btn:hover { background: var(--te-primary-hover); color: #fff; }
.te-cta-disclaimer { font-size: 12px; color: var(--te-muted); margin: 10px 0 0; }
.te-footer { background: #1a2b4c; color: #c5d0dc; padding: 32px 16px; margin-top: 48px; font-size: 13px; }
.te-footer a { color: #e8eef4; text-decoration: none; display: block; margin: 6px 0; }
.te-footer a:hover { text-decoration: underline; }
.te-footer-inner nav { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 24px; }
.te-footer-copy { margin: 0; font-size: 12px; color: #9aabb8; border-top: 1px solid #2d3f55; padding-top: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.te-tool-form label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: 14px; }
.te-tool-form input, .te-tool-form select { width: 100%; max-width: 320px; padding: 10px 12px; border: 1px solid var(--te-border); border-radius: 8px; font-size: 16px; }
.te-tool-result { margin-top: 20px; padding: 16px; background: #eef9f3; border: 1px solid #b8dfc9; border-radius: var(--te-radius); }
.te-sitemap-section { margin-bottom: 28px; }
.te-sitemap-section h2 { font-size: 1.1rem; border-bottom: 1px solid var(--te-border); padding-bottom: 8px; }
.te-sitemap-list { list-style: none; padding: 0; }
.te-sitemap-list > li {
  position: relative; margin: 8px 0; padding: 0;
  background: var(--te-surface); border: 1px solid var(--te-border); border-radius: var(--te-radius);
  transition: border-color .15s, box-shadow .15s;
}
.te-sitemap-list > li:hover { border-color: #b8d4ea; box-shadow: 0 2px 8px rgba(26, 43, 76, 0.06); }
.te-sitemap-list > li:focus-within { outline: 2px solid var(--te-primary); outline-offset: 2px; }
.te-sitemap-list .te-card-link { display: block; padding: 12px 14px; text-decoration: none; color: inherit; }
.te-sitemap-list .te-card-link:hover .te-list-card-title { color: var(--te-primary); }
.te-list-card-title { display: block; font-weight: 500; color: var(--te-text); }
.te-list-card-desc { display: block; font-size: 13px; color: var(--te-muted); margin-top: 4px; }
.te-lang-switch { display: inline-flex; gap: 4px; align-items: center; }
.te-lang-btn { display: inline-block; padding: 6px 10px; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--te-text); border: 1px solid var(--te-border); border-radius: 6px; }
.te-lang-btn.te-lang-active { background: var(--te-primary); color: #fff; border-color: var(--te-primary); }
.te-lang-btn:hover { color: var(--te-primary); }
.te-lang-btn.te-lang-active:hover { color: #fff; }

/* —— Landing portal (tarjetas, mobile-first) —— */
.te-hero--home { margin-bottom: 24px; }
.te-home-stats { font-size: 14px; color: var(--te-accent); font-weight: 600; margin: 0 0 12px; }
.te-home-free-badge {
  display: inline-block; background: #e8f5e9; color: #1b5e20;
  font-weight: 700; font-size: 12px; padding: 6px 12px; border-radius: 999px; margin-bottom: 12px;
}
.te-home-portal { margin-top: 8px; }
.te-portal-intro { font-size: 15px; color: var(--te-muted); margin: 0 0 28px; line-height: 1.5; }
.te-hub-block { margin-bottom: 36px; }
.te-hub-block-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 16px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--te-border);
}
.te-hub-block-title { margin: 0; font-size: 1.15rem; line-height: 1.3; }
.te-hub-block-title a { color: var(--te-text); text-decoration: none; }
.te-hub-block-title a:hover { color: var(--te-primary); }
.te-hub-see-all { font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.te-content-cards {
  display: grid; gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 520px) {
  .te-content-cards { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
@media (min-width: 880px) {
  .te-content-cards { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
.te-content-card {
  position: relative;
  display: flex; flex-direction: column; min-height: 0;
  background: var(--te-surface); border: 1px solid var(--te-border); border-radius: 12px;
  padding: 0; transition: border-color .15s, box-shadow .15s;
}
.te-content-card:hover {
  border-color: #b8d4ea; box-shadow: 0 4px 14px rgba(26, 43, 76, 0.07);
}
.te-content-card:focus-within { outline: 2px solid var(--te-primary); outline-offset: 2px; }
.te-card-link {
  display: flex; flex-direction: column; flex: 1; min-height: 100%;
  padding: 16px; text-decoration: none; color: inherit;
}
.te-card-link:hover .te-card-title { color: var(--te-primary); }
.te-card-badge {
  align-self: flex-start; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--te-primary); background: #eef6fc;
  padding: 4px 8px; border-radius: 6px; margin-bottom: 8px;
}
.te-card-title { margin: 0 0 8px; font-size: 0.95rem; line-height: 1.35; font-weight: 600; color: var(--te-text); }
.te-card-title a { color: var(--te-text); text-decoration: none; }
.te-card-title a:hover { color: var(--te-primary); }
.te-card-excerpt {
  margin: 0; font-size: 13px; color: var(--te-muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.te-content-cards--compact .te-content-card { min-height: 100px; }
.te-content-cards--tools .te-content-card--tool {
  background: linear-gradient(180deg, #f8fbff 0%, var(--te-surface) 100%);
  border-color: #c5dff0;
}

/* —— Header mobile —— */
@media (max-width: 520px) {
  .te-header-inner { flex-wrap: wrap; min-height: auto; padding: 12px 16px; }
  .te-nav { width: 100%; justify-content: flex-end; }
  .te-nav-cta { font-size: 13px; padding: 7px 12px; }
  .te-logo img { height: 24px; }
  .te-main { padding: 16px 12px 40px; }
}
