@font-face {
  font-family: "Source Sans Pro";
  src: url("assets/source-sans-pro-400.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans Pro";
  src: url("assets/source-sans-pro-600.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans Pro";
  src: url("assets/source-sans-pro-700.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --red: #850703;
  --ink: #111111;
  --gray: #7f7f7f;
  --light: #f2f2f2;
  --muted: #545454;
  --border: #dedbd9;
  --paper: #ffffff;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Source Sans Pro", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.52;
}
h1, h2, h3, p, dl, figure { margin: 0; }
h1, h2, h3 { line-height: 1.1; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 3vw, 2.7rem); letter-spacing: -0.025em; }
h3 { font-size: 1.28rem; }
p + p { margin-top: 0.8rem; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
[hidden] { display: none !important; }
.wrap { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }
.skip { position: absolute; top: -200px; }
.skip:focus { top: 8px; left: 12px; z-index: 2; background: white; padding: 10px; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--border); }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 1.75rem; min-height: 78px; }
.masthead img { object-fit: contain; }
.masthead nav { display: flex; flex-wrap: wrap; gap: 0.5rem clamp(0.9rem, 2.2vw, 2rem); }
.masthead nav a { text-decoration: none; font-weight: 600; font-size: 1rem; }
.masthead nav a:hover { color: var(--red); text-decoration: underline; text-underline-offset: 4px; }

.hero {
  background: linear-gradient(105deg, #fff 35%, var(--light));
  border-bottom: 1px solid var(--border);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(270px, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 4.5vw, 4rem);
  padding-block: clamp(3rem, 7vw, 6rem);
}
.eyebrow { color: var(--red); font-weight: 700; letter-spacing: 0.045em; text-transform: uppercase; font-size: 0.94rem; }
h1 { max-width: 810px; margin: 0.55rem 0 1rem; font-size: clamp(2.75rem, 5.15vw, 4.85rem); letter-spacing: -0.038em; }
.lead { max-width: 650px; color: var(--muted); font-size: clamp(1.1rem, 1.6vw, 1.25rem); }
.button { display: inline-block; margin-top: 1.55rem; padding: 0.67rem 1.05rem; border-radius: 4px; background: var(--red); color: white; text-decoration: none; font-weight: 700; }
.button:hover { background: #690500; }
.cover-summary { display: grid; gap: 0.85rem; }
.cover-chart { padding: 1rem 1.15rem 1.15rem; }
.cover-chart figcaption { padding: 0; margin-bottom: 0.75rem; font-size: 1.15rem; font-weight: 700; }
.cover-chart-body { display: flex; align-items: center; flex-wrap: wrap; gap: 0.8rem 1rem; }
.cover-chart-ring {
  display: grid;
  place-items: center;
  width: 7rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--red) 80.3%, var(--gray) 0);
}
.cover-chart-ring span {
  display: grid;
  place-content: center;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--paper);
  text-align: center;
  line-height: 1.1;
}
.cover-chart-ring strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.cover-chart-ring small { color: var(--muted); font-size: 0.88rem; }
.cover-chart-legend { list-style: none; padding: 0; margin: 0; font-size: 0.95rem; }
.cover-chart-total { border-top: 1px solid var(--border); margin-top: 0.35rem; padding-top: 0.35rem; }
.cover-meta { border-top: 3px solid var(--red); background: var(--paper); padding: 1.15rem 1.3rem; }
.cover-meta dt { color: var(--muted); font-size: 0.95rem; }
.cover-meta dd { margin: 0.15rem 0 0; font-size: 1.2rem; font-weight: 700; }
.cover-meta dd span { display: block; font-size: 1rem; font-weight: 400; }

.hero-grid { padding-bottom: clamp(1.5rem, 3vw, 2.75rem); }
.survey-flow { padding-bottom: clamp(1.75rem, 3.5vw, 3rem); }
.survey-flow h2 { margin-bottom: 0.7rem; font-size: 1.05rem; letter-spacing: 0; }
.survey-flow ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--paper);
}
.survey-flow ol > li { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.85rem 1rem; }
.survey-flow ol > li + li { border-inline-start: 1px solid var(--border); }
.survey-flow svg {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 7px;
  border-radius: 5px;
  background: #f8eeed;
  color: var(--red);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.survey-flow strong, .survey-flow small { display: block; }
.survey-flow small { margin-top: 0.12rem; color: var(--muted); font-size: 0.94rem; line-height: 1.35; }
.survey-scope { margin-top: 1.3rem; text-align: center; }
.survey-scope h3 { margin-bottom: 0.65rem; font-size: 1.05rem; }
.scope-checklist {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.scope-checklist li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.46rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--paper);
  font-weight: 600;
}
.scope-checklist span {
  display: grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 3px;
  background: #f8eeed;
}
.scope-checklist span::before {
  content: "";
  width: 0.32rem;
  height: 0.57rem;
  border: solid var(--red);
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg);
}

.section { padding-block: clamp(2.75rem, 5vw, 4.5rem); }
.soft { background: var(--light); }
.section-head { margin-bottom: 1.5rem; }
.section-head p { color: var(--muted); margin-top: 0.45rem; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.metrics article { padding: 1.05rem 1.15rem; border: 1px solid var(--border); border-top: 3px solid var(--red); border-radius: 4px; }
.metrics p { font-weight: 600; }
.metrics strong { display: block; font-size: clamp(2rem, 4vw, 3.15rem); line-height: 1; margin-block: 0.4rem; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.metrics small { font-size: 0.95rem; font-weight: 600; letter-spacing: 0; white-space: nowrap; }
.metrics span, .fine { color: var(--muted); font-size: 0.95rem; }
.analysis-grid { display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); gap: 1.15rem; }
.panel { background: var(--paper); border: 1px solid var(--border); border-radius: 5px; min-width: 0; padding: 1.25rem; }
.legend { display: flex; gap: 1.2rem; margin: 0.75rem 0 1.2rem; font-size: 0.95rem; }
.key::before { content: ""; display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 2px; margin-right: 0.4rem; background: var(--red); }
.key.inactive::before { background: var(--gray); }
.comparison > div:not(.bar-row) { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.2rem 0.6rem; }
.comparison span { color: var(--muted); font-size: 0.95rem; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) 4.2rem; align-items: center; gap: 0.65rem; margin: 0.25rem 0 0.85rem; }
.bar-row:last-child { margin-bottom: 0; }
.bar { height: 0.6rem; background: var(--gray); border-radius: 30px; overflow: hidden; }
.bar i { height: 100%; display: block; background: var(--red); }
.bar-value { color: var(--red); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-scroll { overflow: auto; }
.table-scroll:has(.inventory-table) { border: 1px solid var(--border); border-radius: 5px; }
.panel h3 + .table-scroll { margin-top: 0.75rem; }
.table-scroll + p { margin-top: 0.75rem; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 0.96rem; }
th, td { padding: 0.53rem 0.65rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.inventory-table th, .inventory-table td { vertical-align: middle; }
.inventory-table thead th { background: var(--red); color: var(--paper); white-space: nowrap; }
.inventory-table tbody tr:nth-child(even) { background: var(--light); }
.inventory-table tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 600; }
.summary th, .summary td { text-align: center; }
.summary td:nth-child(n+3) { font-variant-numeric: tabular-nums; }
.conclusion { font-size: 1.12rem; max-width: 82ch; }
.finding-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.85rem; }
.finding-card { border: 1px solid var(--border); border-radius: 5px; overflow: hidden; background: var(--paper); }
.finding-card header { padding: 0.85rem 1rem; background: #f8eeed; border-bottom: 1px solid var(--border); }
.finding-card h3 { color: var(--red); font-size: 1.16rem; }
.finding-card header span { display: block; margin-top: 0.2rem; color: var(--muted); font-size: 0.94rem; }
.finding-card p { padding: 0.8rem 1rem 1rem; }
.finding-note { margin-top: 1.15rem; }
.finding-note h3 { margin-bottom: 0.25rem; font-size: 1.05rem; }
.finding-note p { color: var(--muted); }
.recommendations-scroll { margin-top: 1.15rem; }
.recommendations-table { min-width: 28rem; }
.recommendations-table th, .recommendations-table td { padding: 0.75rem 0.9rem; }
.recommendations-table tbody th { width: 25%; color: var(--red); }
.evidence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
figure { background: white; border: 1px solid var(--border); border-radius: 5px; overflow: hidden; }
figure img { width: 100%; height: auto; }
figure a:focus-visible { display: block; outline-offset: -6px; }
figcaption { padding: 0.9rem 1.1rem 1.15rem; }
figcaption b { display: block; font-size: 1.16rem; margin-bottom: 0.15rem; }
.filter-grid { display: grid; grid-template-columns: 1.1fr 0.8fr 1.6fr; gap: 0.8rem; }
.filter-grid label { display: grid; gap: 0.3rem; font-size: 0.95rem; font-weight: 700; }
select, input { font: inherit; font-weight: 400; border: 1px solid var(--gray); border-radius: 4px; padding: 0.55rem 0.65rem; min-width: 0; min-height: 44px; background: white; color: var(--ink); width: 100%; }
select { appearance: none; padding-right: 2rem; background: white no-repeat right 0.75rem center / 10px 6px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23111' stroke-width='1.4'/%3E%3C/svg%3E"); }
.result-count { margin: 0.85rem 0 0.45rem; }
.inventory-scroll { max-height: 34rem; }
.inventory-scroll table { min-width: 54rem; }
.inventory-scroll table:has([data-column="canales"]) { min-width: 65rem; }
.inventory-scroll thead { position: sticky; top: 0; }
.inventory-scroll :is([data-column="fila"], [data-column="estado"], [data-column="canales"]) { text-align: center; }
.inventory-scroll :is([data-column="modelo"], [data-column="serie"]) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.inventory-scroll [data-column="observaciones"] { min-width: 12rem; white-space: pre-line; }
.status-active { font-weight: 600; }
.status-inactive { color: var(--red); font-weight: 700; }
.report-download { padding-block: 1.75rem; text-align: center; }
.report-download .button { margin-top: 0; }
footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 0.95rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 0.4rem 1rem; flex-wrap: wrap; padding-block: 1.25rem; }
footer strong { color: var(--ink); }

@media (max-width: 900px) {
  .wrap { width: calc(100% - 42px); }
  .analysis-grid { grid-template-columns: 1fr; }
  .masthead { min-height: 68px; gap: 1rem; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finding-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 670px) {
  .wrap { width: calc(100% - 32px); }
  .masthead { display: block; padding-block: 0.7rem; }
  .masthead img { height: 35px; width: auto; margin-bottom: 0.4rem; }
  .masthead nav a { min-height: 32px; display: flex; align-items: center; }
  .hero-grid, .finding-grid, .evidence-grid, .filter-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 1.55rem; }
  .survey-flow ol { grid-template-columns: 1fr; }
  .survey-flow ol > li + li { border-inline-start: 0; border-top: 1px solid var(--border); }
  .metrics { gap: 0.65rem; }
  .metrics article, .panel { padding: 0.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
