:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #6b7280;
  --accent: #111111;
  --accent-dark: #000000;
  --line: #e5e7eb;
  --panel: #ffffff;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --radius: 10px;
  --font-sans: "Söhne", "Soehne", "ui-sans-serif", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.noise { display: none; }

.hero {
  position: relative;
  min-height: auto;
  padding: 48px 20px 40px;
  background: #ffffff;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.topnav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 auto;
  max-width: 1200px;
  padding-bottom: 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
}
.topnav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.2;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all 0.2s ease;
}
.topnav a:hover {
  color: var(--text);
  border-color: #d1d5db;
  background: #f9fafb;
}
.hero-content {
  max-width: 1200px;
  margin: 24px auto 0;
}
.kicker {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

h1, h2, h3 {
  font-family: var(--font-sans);
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}
h1 {
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 700;
  line-height: 1.15;
  margin-top: 12px;
}
h2 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 12px;
}
h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}

.lead {
  max-width: 920px;
  color: var(--muted);
  margin-top: 16px;
  font-size: 18px;
  line-height: 1.7;
}
.intro-copy {
  max-width: 820px;
}
.lead strong { color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid #111111;
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  transition: all 0.2s ease;
  box-shadow: none;
}
.btn:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 96px;
}
main > .panel {
  margin-top: 96px;
}
main > .panel:first-child {
  margin-top: 24px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.panel.alt {
  background: #ffffff;
}
.panel p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}
.panel p + p,
.panel p + figure,
.panel figure + p,
.panel .grid,
.panel .cards,
.panel .cluster-table-wrap,
.panel .highlight {
  margin-top: 16px;
}

.grid {
  display: grid;
  gap: 16px;
}
.grid.two {
  grid-template-columns: 1fr;
}
figure {
  margin: 0;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
figure img {
  width: 100%;
  display: block;
  height: auto;
}
figcaption {
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.mini-note {
  padding: 0 16px 16px;
}
.mini-note > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.component-card {
  margin-top: 10px;
  padding: 12px;
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.component-card h4 {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--text);
}
.component-card p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}
.component-card p + p {
  margin-top: 8px;
}
.network-note {
  padding-top: 4px;
}
.network-read-card {
  margin-top: 0;
}
.network-read-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.legend-title {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
}
.network-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}
.dot {
  display: inline-block;
  border-radius: 999px;
  background: #10a37f;
  border: 1px solid #0b7f62;
}
.dot-s { width: 8px; height: 8px; }
.dot-m { width: 12px; height: 12px; }
.dot-l { width: 16px; height: 16px; }
.edge {
  display: inline-block;
  width: 18px;
  background: #9ca3af;
  border-radius: 999px;
}
.edge-thin { height: 2px; }
.edge-strong { height: 5px; }


.frame-card-title {
  padding: 18px 16px 6px;
  color: var(--text);
  font-size: clamp(24px, 2.2vw, 30px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
}

.frame-card {
  overflow: hidden;
}
.frame-card iframe {
  width: 100%;
  display: block;
  border: 0;
  background: #ffffff;
  aspect-ratio: 16 / 9;
  min-height: 320px;
}
.fullframe iframe {
  aspect-ratio: 16 / 9;
}
.level1-frame iframe {
  aspect-ratio: 16 / 10;
}
.pca-frame iframe {
  aspect-ratio: 16 / 9;
}
.pca-frame iframe, .network-frame iframe { min-height: 420px; }
.network-frame iframe {
  aspect-ratio: 16 / 9;
}
.heatmap-frame iframe {
  aspect-ratio: 16 / 9;
}
.treemap-frame iframe {
  aspect-ratio: 16 / 10;
}
.map-frame iframe,
.cube-frame iframe {
  aspect-ratio: 4 / 3;
}

.insight-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}
.insight-strip span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 12px;
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}
.cards article {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.cards article p {
  font-size: 15px;
  line-height: 1.6;
}
.cards.two-up {
  align-items: start;
}
.ml-cards {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}
.metric {
  margin: 8px 0 6px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
}

summary {
  cursor: pointer;
  margin-top: 8px;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 600;
}
details p {
  margin-top: 8px;
  padding: 12px;
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}
.traffic-box {
  margin-top: 8px;
  padding: 12px;
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.traffic-box p {
  margin-top: 10px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}
.semaforo-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.semaforo-tab {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.semaforo-tab.active[data-target="rojo"] { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.semaforo-tab.active[data-target="ambar"] { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.semaforo-tab.active[data-target="verde"] { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.semaforo-panels {
  margin-top: 10px;
}
.semaforo-panel {
  display: none;
}
.semaforo-panel.active {
  display: block;
}
.semaforo-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
}
.semaforo-list li {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.5;
}
.empty-state {
  margin: 0;
  padding: 8px 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
}
.quasi-box {
  margin-top: 8px;
  padding: 12px;
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.quasi-box p {
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}
.effect-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
}
.effect-item {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
}
.effect-item.strong-neg {
  border-color: #fecaca;
  background: #fef2f2;
}
.effect-item.weak {
  border-color: #e5e7eb;
}
.effect-label {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
}
.effect-value {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.traffic-lights {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}
.light {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #e5e7eb;
  border: 1px solid rgba(0,0,0,0.06);
}
.light.red.on { background: #ef4444; }
.light.amber.on { background: #f59e0b; }
.light.green.on { background: #10b981; }

.cluster-table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
}
th {
  color: var(--muted);
  background: #f9fafb;
  font-weight: 600;
}

.highlight {
  padding: 16px;
  border: 1px solid #d1fae5;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: #f0fdf9;
}
.ml-summary {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #d1fae5;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: #f0fdf9;
}
.ml-summary p {
  color: #0f172a;
  font-size: 15px;
  line-height: 1.6;
}
.mini-viz-card {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.mini-viz-head {
  padding: 14px 16px 10px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
}
.rel-bars {
  display: grid;
  gap: 10px;
  padding: 0 16px 14px;
}
.rel-row {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr auto;
  gap: 10px;
  align-items: center;
}
.rel-label {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;
}
.rel-track {
  height: 10px;
  border-radius: 999px;
  background: #eef2f7;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}
.rel-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10a37f, #0b7f62);
}
.rel-fill.strong { width: 88%; }
.rel-fill.medium { width: 68%; }
.rel-fill.soft { width: 45%; }
.rel-tag {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
}
.highlight p {
  color: #0f172a;
  font-size: 15px;
  line-height: 1.6;
}
.small,
.note {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
a {
  color: var(--accent-dark);
}

/* Sin bordes ni sombra en cards/subcards */
.cards article,
.component-card,
.contact-card,
.mini-viz-card,
.frame-card,
.traffic-box,
.quasi-box,
.effect-item,
.tech-subcard,
.ficha-tecnica .tech-grid,
.tech-table-wrap,
details p,
.highlight,
.ml-summary {
  border: 0 !important;
  box-shadow: none !important;
}

.highlight,
.ml-summary {
  border-left: 0 !important;
}

.contact-blocks {
  display: grid;
  gap: 16px;
}
.contact-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 16px;
  box-shadow: var(--shadow);
}
.contact-card h3 {
  font-size: 16px;
  margin-bottom: 12px;
}
.social-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  transition: all 0.2s ease;
}
.social-links a:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}
.social-links img {
  width: 16px;
  height: 16px;
  border-radius: 2px;
}
.social-links.icon-only a {
  width: 36px;
  height: 36px;
}

.ficha-tecnica .tech-grid {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 12px;
}
.subsection-title {
  font-size: 20px;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 8px;
}
.ficha-tecnica .subsection-title + p {
  margin-top: 0;
}
.metodos-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
  margin-top: 14px;
}
.method-card {
  margin-top: 0;
  padding: 14px;
}
.method-card h4 {
  font-size: 15px;
  margin-bottom: 10px;
}
.method-block + .method-block {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.method-details {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.method-details summary {
  cursor: pointer;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 600;
  list-style: none;
}
.method-details summary::-webkit-details-marker {
  display: none;
}
.method-details summary::before {
  content: "▸ ";
  color: var(--accent-dark);
}
.method-details[open] summary::before {
  content: "▾ ";
}
.method-details > .method-block {
  margin-top: 8px;
}
.method-details > .method-block + .method-block {
  border-top: none;
  padding-top: 0;
}
.method-card ul {
  margin: 8px 0 0 18px;
  padding: 0;
  color: var(--text);
}
.method-card li {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.5;
}
.method-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 0 4px;
}
.method-card em {
  font-style: normal;
  color: #374151;
}
.cluster-table-wrap .small.note {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.ficha-tecnica .tech-label {
  background: #f9fafb;
  color: var(--text);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.ficha-tecnica .tech-content {
  background: #ffffff;
  color: var(--text);
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.ficha-tecnica .tech-content p {
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}
.ficha-tecnica .tech-content p + p {
  margin-top: 10px;
}
.tech-details {
  margin-top: 14px;
}
.tech-subcard {
  margin-top: 8px;
}
.tech-subcard p {
  color: var(--text);
  font-size: 14px;
}
.tech-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}
.tech-table {
  min-width: 760px;
}
.tech-table th {
  background: #f9fafb;
  color: var(--muted);
  font-size: 13px;
}
.tech-table td {
  font-size: 13px;
  line-height: 1.35;
}
.tech-table td:first-child {
  font-weight: 600;
  color: #374151;
}

@media (min-width: 768px) {
  .insight-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .cards.two-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .contact-blocks {
    grid-template-columns: 1fr 1fr;
  }
  .effect-grid {
    grid-template-columns: 1fr 1fr;
  }
  .network-read-grid {
    grid-template-columns: 1fr 1fr;
  }
  .ficha-tecnica .tech-grid {
    grid-template-columns: 260px 1fr;
  }
  .metodos-grid {
    grid-template-columns: 1fr 1fr;
  }
  .ficha-tecnica .tech-label {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  .ficha-tecnica .tech-content {
    border-bottom: 1px solid var(--line);
  }
}

@media (min-width: 980px) {
  .grid.two {
    grid-template-columns: 1fr 1fr;
  }
  .pca-frame iframe,
  .network-frame iframe {
    min-height: 420px;
  }
  .metodos-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767px) {
  body { font-size: 16px; }
  .hero { padding: 32px 16px 28px; }
  .panel { padding: 16px; border-radius: 12px; }
  main > .panel { margin-top: 64px; }
  .frame-card iframe { min-height: 280px; }
  .rel-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .rel-tag {
    white-space: normal;
  }
}

.meta-line { color: var(--muted); }
