/* ==========================================================================
   DetectorEstado — hoja de estilos
   Temas: [data-theme="light"] (modo normal) y [data-theme="dark"] (modo oscuro)
   ========================================================================== */

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f0f3fa;
  --border: #e2e7f0;
  --text: #18213a;
  --muted: #5c6782;
  --primary: #3b5bdb;
  --primary-strong: #2c47b8;
  --primary-soft: #e8edff;
  --on-primary: #ffffff;
  --ok: #138a49;
  --ok-soft: #e2f6ea;
  --warn: #b86e00;
  --warn-soft: #fff3d9;
  --down: #d32f2f;
  --down-soft: #ffe7e7;
  --ok-dot: #16a34a;
  --warn-dot: #f59e0b;
  --down-dot: #ef4444;
  --chart-line: #3b5bdb;
  --chart-fill: rgba(59, 91, 219, .16);
  --chart-grid: #e7ebf3;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .06);
  --radius: 16px;
  --radius-sm: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0d1220;
  --surface: #151b2d;
  --surface-2: #1b2338;
  --border: #283149;
  --text: #e6e9f2;
  --muted: #9ea8c0;
  --primary: #7d95ff;
  --primary-strong: #9cafff;
  --primary-soft: #1f2a4d;
  --on-primary: #0d1220;
  --ok: #4fd68b;
  --ok-soft: #12301f;
  --warn: #ffbf5c;
  --warn-soft: #362a10;
  --down: #ff7b7b;
  --down-soft: #3b1b1f;
  --ok-dot: #3ccf7e;
  --warn-dot: #ffb547;
  --down-dot: #ff6b6b;
  --chart-line: #8aa0ff;
  --chart-fill: rgba(125, 149, 255, .18);
  --chart-grid: #232c43;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.6 var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-wrap: anywhere;
}
img, svg { max-width: 100%; }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-strong); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.3rem); }
h2 { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.45rem); }
h3 { font-size: 1.1rem; margin-top: 1.4em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--primary); color: var(--on-primary); padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 8px; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.main { flex: 1; padding-top: 20px; padding-bottom: 40px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 70ch; }
.empty { color: var(--muted); padding: 12px 0; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------------------------------------------------------------- Cabecera */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) { .site-header { background: var(--surface); } }
.header-inner { display: flex; align-items: center; gap: 14px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.12rem; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand-name b { color: var(--primary); font-weight: 800; }
.brand-bg { fill: var(--primary); }
.site-search { position: relative; flex: 1 1 320px; max-width: 520px; display: flex; align-items: center; }
.site-search input, .hero-search input {
  width: 100%; border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  border-radius: 999px; padding: 10px 16px 10px 40px; font: inherit; font-size: .98rem;
}
.site-search input:focus, .hero-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); background: var(--surface); }
.search-icon { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.theme-toggle, .lang-menu summary {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; min-width: 40px; justify-content: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 0 10px; cursor: pointer; font: inherit; font-size: .9rem; font-weight: 600;
}
.theme-toggle:hover, .lang-menu summary:hover { border-color: var(--primary); color: var(--primary); }
:root[data-theme="light"] .icon-moon, :root[data-theme="dark"] .icon-sun { display: none; }
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu ul { position: absolute; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); min-width: 160px; z-index: 60; }
.lang-menu a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--text); }
.lang-menu a:hover, .lang-menu a[aria-current] { background: var(--primary-soft); color: var(--primary); }

.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); max-height: 60vh; overflow: auto; z-index: 70; }
.search-results li a, .search-results li.none { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--text); text-decoration: none; }
.search-results li a small { color: var(--muted); margin-left: auto; font-size: .78rem; text-align: right; }
.search-results li a:hover, .search-results li[aria-selected="true"] a { background: var(--primary-soft); }
.search-results li.none { color: var(--muted); }

@media (max-width: 720px) {
  .site-search { order: 3; flex-basis: 100%; max-width: none; }
  .header-actions { margin-left: auto; }
}

/* ---------------------------------------------------------------- Botones, chips, insignias */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .96rem; line-height: 1.2;
  border-radius: 999px; padding: 11px 18px; border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-strong); color: var(--on-primary); }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); }
.btn-small { padding: 7px 12px; font-size: .86rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .82rem; color: var(--muted); text-decoration: none; }
.chip-link:hover { color: var(--primary); border-color: var(--primary); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.badge .dot, .status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.badge--ok { background: var(--ok-soft); color: var(--ok); } .badge--ok .dot { background: var(--ok-dot); }
.badge--warn { background: var(--warn-soft); color: var(--warn); } .badge--warn .dot { background: var(--warn-dot); }
.badge--down { background: var(--down-soft); color: var(--down); } .badge--down .dot { background: var(--down-dot); }
.status-dot--ok { background: var(--ok-dot); } .status-dot--warn { background: var(--warn-dot); } .status-dot--down { background: var(--down-dot); box-shadow: 0 0 0 4px var(--down-soft); }

/* ---------------------------------------------------------------- Tarjetas */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; }
@media (min-width: 720px) { .card { padding: 26px; } }
.section { margin: 28px 0; }
.section-title { display: flex; align-items: center; gap: 10px; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--down-dot); box-shadow: 0 0 0 0 var(--down-dot); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .55); } 70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }

.avatar { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; color: #fff; font-weight: 800; font-size: .92rem; letter-spacing: .02em; flex: none; }
.avatar--lg { width: 64px; height: 64px; border-radius: 18px; font-size: 1.35rem; }
.avatar--sm { width: 28px; height: 28px; border-radius: 8px; font-size: .7rem; }
.av-0 { background: #e2554f; } .av-1 { background: #e0742c; } .av-2 { background: #c9932b; } .av-3 { background: #5aa33b; }
.av-4 { background: #22a06b; } .av-5 { background: #1e9aa8; } .av-6 { background: #2f80d1; } .av-7 { background: #4b63d8; }
.av-8 { background: #7952d6; } .av-9 { background: #a548c2; } .av-10 { background: #d1478f; } .av-11 { background: #5f6b85; }

/* ---------------------------------------------------------------- Portada */
.hero { text-align: center; padding: 26px 0 8px; }
.hero h1 { max-width: 26ch; margin-left: auto; margin-right: auto; }
.hero .lead { margin: 0 auto 20px; }
.hero-search { position: relative; display: flex; align-items: center; gap: 8px; max-width: 640px; margin: 0 auto; text-align: left; }
.hero-search input { padding-top: 14px; padding-bottom: 14px; font-size: 1.05rem; background: var(--surface); box-shadow: var(--shadow); }
.hero-search .search-icon { left: 16px; }
.hero-search .btn { flex: none; }
@media (max-width: 520px) { .hero-search .btn { display: none; } }

.hot-grid, .company-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hot-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.company-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.hot-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--text); margin: 0; padding: 16px; height: 100%; transition: border-color .15s, transform .15s; }
.hot-card:hover, .company-card:hover { border-color: var(--primary); color: var(--text); transform: translateY(-1px); }
.hot-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hot-name { display: flex; flex-direction: column; min-width: 0; }
.hot-name strong, .company-card-body strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hot-name small, .company-card-body small { color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hot-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.hot-bottom small { color: var(--muted); font-size: .8rem; }
.spark { width: 100%; height: 36px; }
.spark-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark--ok .spark-line { stroke: var(--ok-dot); } .spark--ok .spark-area { fill: var(--ok-soft); }
.spark--warn .spark-line { stroke: var(--warn-dot); } .spark--warn .spark-area { fill: var(--warn-soft); }
.spark--down .spark-line { stroke: var(--down-dot); } .spark--down .spark-area { fill: var(--down-soft); }
.company-card { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 14px; text-decoration: none; color: var(--text); height: 100%; transition: border-color .15s, transform .15s; }
.company-card-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.letters { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 14px; }
.letters a, .letters span { display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; font-weight: 700; color: var(--text); }
.letters a:hover, .letters a[aria-current] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.letters span { opacity: .35; }
.letters--big a, .letters--big span { min-width: 44px; height: 44px; }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; }
.steps { padding-left: 1.3em; } .steps li { margin-bottom: .4em; }
.tips { padding-left: 1.2em; } .tips li { margin-bottom: .4em; }
.prose { max-width: 100%; }
.prose p, .prose li { max-width: 75ch; }

/* ---------------------------------------------------------------- Página de compañía */
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; font-size: .88rem; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); text-decoration: underline; }
.company-layout { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .company-layout { grid-template-columns: minmax(0, 1fr) 300px; } .company-aside { position: sticky; top: 84px; align-self: start; } }
.company-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.company-head h1 { margin-bottom: .2em; }
.company-head p.muted { margin-bottom: .6em; }

.status-panel { border-radius: 14px; padding: 16px 18px; display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; border: 1px solid transparent; }
.status-ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.status-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.status-down { background: var(--down-soft); border-color: color-mix(in srgb, var(--down) 30%, transparent); }
.status-main { display: flex; gap: 14px; align-items: center; min-width: 0; flex: 1 1 280px; }
.status-icon { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.status-icon::after { content: ""; width: 18px; height: 18px; border-radius: 50%; background: #fff; }
.status-ok .status-icon { background: var(--ok-dot); }
.status-warn .status-icon { background: var(--warn-dot); }
.status-down .status-icon { background: var(--down-dot); animation: pulse 1.8s infinite; }
.status-label { font-weight: 800; font-size: 1.2rem; margin: 0; }
.status-ok .status-label { color: var(--ok); } .status-warn .status-label { color: var(--warn); } .status-down .status-label { color: var(--down); }
.status-text { margin: 0; font-size: .95rem; }
.status-metrics { display: flex; gap: 22px; margin: 0; flex-wrap: wrap; }
.status-metrics div { display: flex; flex-direction: column; }
.status-metrics dt { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.status-metrics dd { margin: 0; font-weight: 800; font-size: 1.15rem; }
@media (max-width: 600px) {
  .status-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
  .status-metrics dt { font-size: .68rem; }
  .company-head .avatar--lg { width: 48px; height: 48px; font-size: 1.05rem; border-radius: 14px; }
}
.report { margin-top: 22px; }
.report h2 { margin-bottom: .2em; }
.report-buttons { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.btn-report { background: var(--surface); color: var(--text); border: 1.5px solid var(--border); border-radius: 12px; padding: 14px 12px; font-size: .98rem; }
.btn-report:hover { border-color: var(--down-dot); color: var(--down); background: var(--down-soft); }
.btn-report.is-sent { border-color: var(--ok-dot); color: var(--ok); background: var(--ok-soft); }
.report-feedback, .form-feedback { min-height: 1.6em; margin: 10px 0 0; font-weight: 600; }
.report-feedback.is-ok, .form-feedback.is-ok { color: var(--ok); }
.report-feedback.is-error, .form-feedback.is-error { color: var(--down); }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.section > .share, .main > .share { border-top: 0; padding-top: 0; justify-content: center; }
.share-label { font-weight: 600; color: var(--muted); margin-right: 4px; font-size: .92rem; }
.share-btn { width: 42px; height: 42px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; border: 0; cursor: pointer; transition: transform .1s, filter .15s; }
.share-btn svg { width: 22px; height: 22px; fill: currentColor; }
.share-btn:hover { color: #fff; filter: brightness(1.08); transform: translateY(-1px); }
.share-fb { background: #1877f2; } .share-wa { background: #1fa855; } .share-x { background: #111; } .share-tg { background: #229ed9; }
:root[data-theme="dark"] .share-x { background: #2b2f36; }
.share-copy { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.share-copy:hover { color: var(--primary); }
.share-feedback { font-size: .88rem; color: var(--ok); font-weight: 600; }

.chart { position: relative; height: 240px; margin: 8px 0 6px; user-select: none; touch-action: pan-y; }
@media (min-width: 720px) { .chart { height: 280px; } }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .grid line { stroke: var(--chart-grid); stroke-width: 1; }
.chart .axis text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .area { fill: var(--chart-fill); }
.chart .line { fill: none; stroke: var(--chart-line); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .baseline { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 5; opacity: .7; }
.chart .cursor { stroke: var(--muted); stroke-width: 1; opacity: .6; }
.chart .dot { fill: var(--chart-line); stroke: var(--surface); stroke-width: 2; }
.chart-tip { position: absolute; top: 0; pointer-events: none; background: var(--text); color: var(--bg); font-size: .82rem; padding: 6px 10px; border-radius: 8px; white-space: nowrap; transform: translateX(-50%); box-shadow: var(--shadow); }
.chart-legend { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); margin: 0; flex-wrap: wrap; }
.legend-line, .legend-dash { display: inline-block; width: 22px; height: 0; border-top: 3px solid var(--chart-line); }
.legend-dash { border-top: 2px dashed var(--muted); margin-left: 12px; }

.problem-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.problem-bars li { display: grid; grid-template-columns: minmax(110px, 180px) 1fr 48px; align-items: center; gap: 10px; }
.problem-bars li.empty { display: block; }
.bar { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--down-dot)); border-radius: 999px; transition: width .6s ease; }
.bar-value { text-align: right; font-weight: 700; font-size: .9rem; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .field .label { font-weight: 600; font-size: .92rem; }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="url"], .field input[type="number"], .field textarea, .field select {
  font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; width: 100%;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); background: var(--surface); }
.field [aria-invalid="true"] { border-color: var(--down); }
.field-error { color: var(--down); font-size: .88rem; margin: 0; font-weight: 600; }
.field-row { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field.check { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.field.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); }
.field.check label { font-weight: 400; flex: 1; }
.field.check .field-error { flex-basis: 100%; }
.captcha-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.captcha-row img { border-radius: 10px; border: 1px solid var(--border); background: #eef1f8; }
.field.captcha input { max-width: 220px; text-transform: uppercase; letter-spacing: .2em; }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--primary-soft); margin: 0 0 16px; }
.notice--ok { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.notice--error { background: var(--down-soft); color: var(--down); font-weight: 600; }

.comments .count { color: var(--muted); font-weight: 500; font-size: .9em; }
.comment-form { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin: 12px 0 18px; }
.comment-form .field input, .comment-form .field textarea { background: var(--surface); }
.comment-list { list-style: none; padding: 0; margin: 0 0 12px; }
.comment { padding: 14px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: 0; }
.comment.is-new { animation: fadein .6s ease; }
@keyframes fadein { from { background: var(--primary-soft); } to { background: transparent; } }
.comment-meta { margin: 0 0 4px; font-size: .86rem; color: var(--muted); }
.comment-meta strong { color: var(--text); }
.comment-body { margin: 0; white-space: normal; }

.faq-item { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-bottom: 10px; }
.faq.card .faq-item { background: var(--surface-2); }
.faq-item summary { cursor: pointer; padding: 14px 44px 14px 16px; font-weight: 650; list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--primary); font-weight: 400; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding: 0 16px 14px; margin: 0; color: var(--muted); }

.related ul { list-style: none; margin: 0; padding: 0; }
.related li a { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 10px; color: var(--text); text-decoration: none; }
.related li a:hover { background: var(--primary-soft); color: var(--primary); }
.related h2 { font-size: 1.05rem; }

.error-page { text-align: center; }
.error-code { font-size: 4.5rem; font-weight: 900; color: var(--primary); margin: 0; line-height: 1; }
.error-page .hero-search { margin: 20px auto; }
.error-page .company-grid { text-align: left; margin-bottom: 18px; }
.legal h2 { font-size: 1.2rem; margin-top: 1.4em; }
.email-img { vertical-align: middle; height: 24px; width: auto; }

/* ---------------------------------------------------------------- Publicidad */
.ad { margin: 18px auto; text-align: center; max-width: 100%; overflow: hidden; }
.ad--company_sidebar { margin-top: 0; }
.ad--preview { border: 2px dashed var(--warn-dot); background: var(--warn-soft); color: var(--warn); border-radius: 12px; min-height: 90px; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.ad--preview.ad--company_sidebar { min-height: 250px; }

/* ---------------------------------------------------------------- Pie */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 30px 0 24px; margin-top: auto; font-size: .92rem; }
.footer-inner { display: grid; gap: 16px; }
.footer-tagline { color: var(--muted); margin: 4px 0 0; }
.footer-links, .footer-langs { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-links a, .footer-langs a { color: var(--text); text-decoration: none; }
.footer-links a:hover, .footer-langs a:hover { color: var(--primary); text-decoration: underline; }
.footer-langs a[aria-current] { color: var(--primary); font-weight: 700; }
.disclaimer { color: var(--muted); font-size: .84rem; max-width: 110ch; margin: 0; }
.copyright { color: var(--muted); font-size: .84rem; margin: 0; }
