:root {
  --bg: #050505;
  --bg-alt: #070707;
  --panel: #0f0f0f;
  --panel-strong: #151515;
  --panel-soft: rgba(16, 16, 16, 0.82);
  --surface: rgba(11, 11, 11, 0.86);
  --surface-strong: rgba(18, 18, 18, 0.94);
  --border: #272727;
  --border-soft: rgba(245, 241, 232, 0.09);
  --text: #f2f2f2;
  --muted: #a7a7a7;
  --muted-2: #777;
  --soft: #f5f1e8;
  --red: #e92124;
  --red-dark: #9e1416;
  --line: rgba(245, 241, 232, 0.055);
  --amber: #d68a1f;
  --green: #3fa66b;
  --max: 1240px;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 8px;
  --inset-glow: inset 0 1px 0 rgba(245, 241, 232, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.015);
  --inset-red: inset 0 0 0 1px rgba(233, 33, 36, 0.34);
  --font-ui: "SF Pro Display", Roboto, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-brand: Lomareta, "SF Pro Display", Roboto, "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  position: relative;
  overflow-x: hidden;
  isolation: isolate;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  line-height: 1.46;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: 0;
  background-image: url("../img/fondo_HLT.jpg");
  background-image: image-set(
    url("../img/fondo_HLT.webp") type("image/webp"),
    url("../img/fondo_HLT.jpg") type("image/jpeg")
  );
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0.13;
}

body::after {
  z-index: 0;
  background:
    radial-gradient(circle at 16% 0%, rgba(233, 33, 36, 0.075), transparent 30%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.74), rgba(5, 5, 5, 0.92) 34%, rgba(5, 5, 5, 0.98)),
    linear-gradient(rgba(245, 241, 232, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 241, 232, 0.025) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

:where(a, button, input, select):focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.site-header {
  position: relative;
  top: auto;
  z-index: auto;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(160px, 0.7fr);
  gap: 14px;
  align-items: center;
  padding: 12px clamp(14px, 3vw, 34px);
  border-bottom: 1px solid var(--border-soft);
  background: rgba(7, 7, 7, 0.86);
  backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: var(--inset-glow);
}

main,
.site-header,
.site-footer {
  position: relative;
  z-index: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
}

.brand-mark {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(233, 33, 36, 0.9);
  border-radius: var(--radius-xs);
  background:
    linear-gradient(90deg, transparent 44%, var(--red) 44%, var(--red) 56%, transparent 56%),
    linear-gradient(transparent 44%, var(--red) 44%, var(--red) 56%, transparent 56%);
  box-shadow: inset 0 0 18px rgba(233, 33, 36, 0.16);
}

.brand strong {
  display: block;
  font-family: var(--font-brand);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: 0;
}

.brand small,
.updated,
.technical-label {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.top-nav a,
.top-nav button,
.filter,
.open-source,
.item-link,
.install-app-button {
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(11, 11, 11, 0.82);
  color: var(--soft);
  cursor: pointer;
  padding: 7px 10px;
  font-size: 0.72rem;
  font-weight: 560;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: var(--inset-glow);
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.top-nav a:hover,
.top-nav button:hover,
.filter:hover,
.open-source:hover,
.item-link:hover,
.install-app-button:hover,
.is-active {
  border-color: var(--red);
  color: #fff;
  box-shadow: var(--inset-red);
}

.updated {
  margin: 0;
  text-align: right;
}

main {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  min-height: 250px;
  padding: clamp(20px, 3vw, 34px) 0 24px;
  border-bottom: 1px solid var(--border-soft);
}

.hero-copy {
  min-width: 0;
}

.hero-compact {
  min-height: 180px;
}

.hero h1 {
  margin: 0;
  color: var(--soft);
  font-family: var(--font-brand);
  font-size: clamp(3.35rem, 6.2vw, 6rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0;
  white-space: nowrap;
  overflow-wrap: anywhere;
}

.hero-subtitle {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--text);
  font-size: clamp(1rem, 1.6vw, 1.32rem);
  line-height: 1.38;
}

.hero-status {
  position: relative;
  align-self: center;
  justify-self: end;
  width: 100%;
  max-width: 360px;
  border: 1px solid rgba(233, 33, 36, 0.32);
  border-radius: var(--radius);
  padding: 16px 17px;
  background: linear-gradient(135deg, rgba(233, 33, 36, 0.095), rgba(16, 16, 16, 0.7) 42%, rgba(8, 8, 8, 0.72));
  box-shadow: var(--inset-glow), inset 0 0 28px rgba(233, 33, 36, 0.05);
}

.hero-status.is-loading {
  border-color: var(--border-soft);
  background: rgba(12, 12, 12, 0.78);
}

.counter {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.counter strong {
  color: var(--red);
  font-size: 2rem;
  line-height: 1;
}

.hero-status p {
  margin: 0;
  color: var(--soft);
  font-size: 0.92rem;
  line-height: 1.42;
}

.control-strip {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px);
  gap: 12px;
  align-items: end;
  margin: 18px 0 0;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--inset-glow);
}

.opportunity-dashboard {
  margin: 18px 0 0;
}

.opportunity-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.opportunity-stat {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: rgba(12, 12, 12, 0.76);
  padding: 10px;
  box-shadow: var(--inset-glow);
}

.opportunity-stat strong {
  display: block;
  color: var(--soft);
  font-size: 1.28rem;
  line-height: 1;
}

.opportunity-stat span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.055em;
  line-height: 1.2;
  text-transform: uppercase;
}

.opportunity-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px);
  gap: 12px;
  align-items: end;
  margin: 12px 0 0;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--inset-glow);
}

.opportunity-filter-block {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
}

.opportunity-filter-block > span {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.filter-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  contain: paint;
  overscroll-behavior-inline: contain;
  padding-bottom: 2px;
  scrollbar-color: var(--border) transparent;
  scrollbar-width: thin;
}

.control-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.micro-status,
.quality-inline {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 560;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.micro-status.is-updating {
  color: var(--amber);
}

.micro-status.is-success {
  color: var(--green);
}

.micro-status.is-muted {
  color: var(--muted-2);
}

.quality-inline {
  margin: 4px 0 0;
}

.search-box,
.sort-box {
  display: grid;
  gap: 6px;
}

.search-box span,
.sort-box span {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(9, 9, 9, 0.9);
  color: var(--text);
  padding: 8px 10px;
  outline: none;
  box-shadow: var(--inset-glow);
}

input:focus,
select:focus {
  border-color: var(--red);
  box-shadow: var(--inset-red);
}

.radar-section {
  padding: 34px 0 44px;
  border-bottom: 1px solid var(--border-soft);
}

.section-heading {
  display: grid;
  gap: 5px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  color: var(--soft);
  font-size: clamp(1.45rem, 3vw, 2.55rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.section-support {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.42;
}

.section-limit-note {
  color: var(--muted-2);
  font-size: 0.78rem;
}

.section-limit-note[hidden] {
  display: none;
}

.section-link {
  width: max-content;
  margin-top: 4px;
}

.quality-section {
  padding-bottom: 28px;
}

.quality-section .section-heading h2 {
  font-size: clamp(1.2rem, 2vw, 1.7rem);
}

.skeleton-card,
.skeleton-stat {
  overflow: hidden;
  position: relative;
}

.skeleton-card::after,
.skeleton-stat::after,
.hero-status.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 0%, rgba(245, 241, 232, 0.04) 42%, rgba(233, 33, 36, 0.08) 50%, transparent 62%);
  transform: translateX(-100%);
  animation: radar-skeleton 1.8s ease-in-out infinite;
  pointer-events: none;
}

.skeleton-line {
  display: block;
  height: 10px;
  margin: 8px 0;
  border-radius: var(--radius-xs);
  background: rgba(245, 241, 232, 0.08);
}

.skeleton-meta {
  width: 34%;
  height: 8px;
}

.skeleton-title {
  width: 74%;
  height: 16px;
  margin-top: 18px;
}

.skeleton-short {
  width: 54%;
}

.skeleton-stat {
  min-height: 64px;
}

@keyframes radar-skeleton {
  100% {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-card::after,
  .skeleton-stat::after,
  .hero-status.is-loading::after {
    animation: none;
  }
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.item-grid-featured {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.radar-section.is-alert-compact {
  padding: 20px 0 26px;
}

.radar-section.is-alert-list {
  padding: 26px 0 34px;
}

.radar-section.is-alert-compact .section-heading {
  display: none;
}

.radar-section.is-alert-compact .item-grid {
  display: block;
}

.radar-section.is-compact-empty {
  padding: 24px 0 28px;
}

.radar-section.is-compact-empty .section-heading {
  margin-bottom: 10px;
}

.radar-card,
.archive-card,
.detail-shell {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--inset-glow);
}

.radar-card,
.archive-card {
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.radar-card:hover,
.archive-card:hover {
  border-color: rgba(245, 241, 232, 0.22);
  background: rgba(18, 18, 18, 0.97);
}

.radar-card {
  display: flex;
  min-height: 100%;
  min-width: 0;
  flex-direction: column;
  padding: 15px;
}

.card-meta,
.score-line,
.card-tags,
.archive-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.meta-chip,
.tag,
.score-pill {
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--muted);
  padding: 4px 6px;
  font-size: 0.64rem;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  background: rgba(5, 5, 5, 0.28);
}

.score-pill.impact-high {
  border-color: rgba(233, 33, 36, 0.78);
  color: #ff4c4f;
}

.score-pill.impact-medium {
  border-color: rgba(214, 138, 31, 0.78);
  color: var(--amber);
}

.score-pill.impact-low {
  border-color: rgba(63, 166, 107, 0.78);
  color: var(--green);
}

.meta-chip.source {
  border-color: rgba(233, 33, 36, 0.45);
  color: var(--soft);
}

.meta-chip.opportunity-type {
  border-color: rgba(245, 241, 232, 0.18);
  color: var(--soft);
}

.radar-card h3 {
  margin: 13px 0 8px;
  color: var(--soft);
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: normal;
}

.alert-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border-color: rgba(233, 33, 36, 0.5);
  background: rgba(18, 18, 18, 0.9);
}

.alert-banner h3 {
  margin-top: 10px;
  font-size: clamp(1rem, 1.4vw, 1.24rem);
}

.alert-banner .summary {
  max-width: 820px;
  margin-bottom: 10px;
}

.alert-label {
  border-color: rgba(233, 33, 36, 0.8);
  color: #ff4c4f;
}

.alert-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.source-official {
  border-color: rgba(128, 155, 174, 0.72);
  color: #b5c4cc;
}

.opportunity-card .summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.opportunity-decision {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 2px 0 12px;
}

.opportunity-decision div {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: rgba(5, 5, 5, 0.24);
  padding: 8px;
}

.opportunity-decision dt {
  margin: 0 0 3px;
  color: var(--muted-2);
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.opportunity-decision dd {
  margin: 0;
  color: var(--soft);
  font-size: 0.82rem;
  line-height: 1.25;
}

.opportunity-list-compact {
  display: grid;
  grid-template-columns: 1fr;
}

.opportunity-row {
  display: grid;
  grid-template-columns: minmax(92px, auto) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
  padding: 11px;
  box-shadow: var(--inset-glow);
}

.opportunity-row h3 {
  margin: 0;
  color: var(--soft);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
}

.opportunity-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.opportunity-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.summary,
.why,
.action,
.date-line,
.quality-note {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.summary {
  color: var(--text);
  font-weight: 400;
  line-height: 1.5;
}

.why strong,
.action strong,
.date-line strong,
.quality-note strong {
  color: var(--soft);
}

.card-tags {
  margin-top: auto;
  padding-top: 8px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.copy-signal {
  min-width: 112px;
}

.copy-signal.is-copied {
  border-color: rgba(63, 166, 107, 0.78);
  color: var(--green);
}

.copy-signal.is-failed {
  border-color: rgba(233, 33, 36, 0.78);
  color: #ff4c4f;
}

.card-detail {
  margin-top: 12px;
  border-top: 1px solid var(--border-soft);
  padding-top: 12px;
  color: var(--muted);
  font-size: 0.84rem;
}

.card-detail p {
  margin: 0 0 10px;
}

.card-detail strong {
  color: var(--soft);
}

.url-text {
  overflow-wrap: anywhere;
}

.open-source {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -10px 18px rgba(0, 0, 0, 0.12);
}

.item-link {
  background: transparent;
}

.install-app-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.install-app-button[hidden] {
  display: none;
}

.empty-state,
.error-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(16, 16, 16, 0.64);
  color: var(--muted);
  margin: 0;
  padding: 18px;
  box-shadow: var(--inset-glow);
}

.is-compact-empty .empty-state {
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
}

.archive-list {
  display: grid;
  gap: 12px;
}

.archive-card {
  display: grid;
  grid-template-columns: minmax(160px, 0.25fr) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 15px;
}

.archive-card h3 {
  margin: 0;
  color: var(--soft);
}

.archive-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.archive-actions {
  display: flex;
  gap: 8px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 28px 0 44px;
}

.about-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
  padding: clamp(18px, 3vw, 26px);
  box-shadow: var(--inset-glow);
}

.about-card-wide {
  grid-column: 1 / -1;
}

.about-card h2 {
  margin: 8px 0 12px;
  color: var(--soft);
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  font-weight: 650;
  line-height: 1.14;
}

.about-card p,
.about-card li {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.52;
}

.about-card p {
  margin: 0;
}

.about-card ul {
  margin: 0;
  padding-left: 18px;
}

.detail-shell {
  margin: 36px auto;
  max-width: 920px;
  padding: clamp(20px, 5vw, 42px);
}

.detail-shell h1 {
  margin: 12px 0 18px;
  color: var(--soft);
  font-size: clamp(1.9rem, 4.4vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.detail-block {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.detail-block strong {
  color: var(--soft);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: space-between;
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
  padding: 26px 0 36px;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.site-footer strong {
  color: var(--soft);
}

.footer-link {
  color: var(--soft);
  text-decoration: underline;
  text-decoration-color: rgba(233, 33, 36, 0.55);
  text-underline-offset: 3px;
}

.footer-link:hover {
  color: #fff;
  text-decoration-color: var(--red);
}

.offline-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.offline-card {
  width: min(620px, 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
  padding: clamp(24px, 6vw, 48px);
  box-shadow: var(--inset-glow);
}

.offline-card h1 {
  margin: 10px 0 12px;
  color: var(--soft);
  font-size: clamp(2.6rem, 12vw, 5.8rem);
  line-height: 0.88;
  letter-spacing: 0;
}

.offline-card p {
  color: var(--muted);
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    white-space: normal;
  }

  .hero-status {
    justify-self: start;
    max-width: 520px;
  }
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: 1fr;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .updated {
    text-align: left;
  }

  .hero,
  .control-strip,
  .opportunity-controls {
    grid-template-columns: 1fr;
  }

  .item-grid,
  .item-grid-featured,
  .archive-card,
  .detail-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .opportunity-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .alert-banner {
    grid-template-columns: 1fr;
  }

  .alert-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  main,
  .site-footer {
    width: min(100% - 24px, var(--max));
  }

  .site-header {
    padding: 12px;
  }

  .hero {
    min-height: 285px;
    padding-top: 26px;
  }

  .hero h1 {
    font-size: clamp(2.9rem, 17vw, 5rem);
    white-space: normal;
  }

  .hero.hero-compact {
    min-height: 220px;
    padding-top: 22px;
  }

  .top-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-row {
    flex-wrap: wrap;
    width: 100%;
  }

  .filter,
  .top-nav a,
  .top-nav button {
    width: 100%;
  }

  .filter {
    flex: 0 0 auto;
    width: auto;
  }

  .opportunity-stat-grid {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding-bottom: 2px;
    scrollbar-color: var(--border) transparent;
    scrollbar-width: thin;
  }

  .opportunity-stat {
    min-width: 132px;
  }

  .opportunity-decision,
  .opportunity-row {
    grid-template-columns: 1fr;
  }

  .opportunity-row-actions {
    justify-content: flex-start;
  }
}

/* Dashboard compacto: superficies públicas que consumen app.js. */
body.dashboard-page {
  min-width: 320px;
  padding: 0;
  background: #080808;
  color: #f4f2ed;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body.dashboard-page::before,
body.dashboard-page::after {
  display: none;
}

.dashboard-page .app-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 208px;
  flex-direction: column;
  border-right: 1px solid rgba(244, 242, 237, 0.14);
  background: #0a0a0a;
}

.dashboard-page .rail-brand {
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 11px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(244, 242, 237, 0.14);
  color: #f2f0ea;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-decoration: none;
}

.dashboard-page .rail-nav {
  display: grid;
  gap: 3px;
  padding: 20px 12px;
}

.dashboard-page .rail-nav small {
  padding: 0 10px 7px;
  color: #77746e;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dashboard-page .rail-nav a {
  display: flex;
  min-height: 38px;
  align-items: center;
  padding: 0 10px;
  border-left: 2px solid transparent;
  color: #aaa7a0;
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.055em;
  text-decoration: none;
  text-transform: uppercase;
}

.dashboard-page .rail-nav a:hover,
.dashboard-page .rail-nav a.is-active {
  border-color: #e92124;
  background: rgba(244, 242, 237, 0.035);
  color: #f2f0ea;
}

.dashboard-page .rail-footer {
  margin-top: auto;
  padding: 18px 22px;
  border-top: 1px solid rgba(244, 242, 237, 0.14);
  color: #77746e;
  font-size: 0.71rem;
  line-height: 1.45;
}

.dashboard-page .page-frame {
  min-height: 100vh;
  margin-left: 208px;
}

.dashboard-page .site-header,
.dashboard-page main,
.dashboard-page .site-footer {
  width: min(1280px, calc(100% - 44px));
  margin-inline: auto;
}

.dashboard-page .site-header {
  display: grid;
  min-height: 64px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 0;
  border-bottom: 1px solid rgba(244, 242, 237, 0.14);
  background: transparent;
}

.dashboard-page .site-header .brand {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 10px;
  color: #f2f0ea;
  text-decoration: none;
}

.dashboard-page .site-header .brand > span:last-child {
  display: grid;
  gap: 2px;
}

.dashboard-page .site-header .brand strong {
  font-size: 0.84rem;
  letter-spacing: 0.045em;
}

.dashboard-page .site-header .brand small {
  color: #aaa7a0;
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dashboard-page .top-nav {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.dashboard-page .top-nav a {
  min-height: auto;
  padding: 7px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: #aaa7a0;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.dashboard-page .top-nav a:hover,
.dashboard-page .top-nav a.is-active {
  border-color: #e92124;
  color: #f2f0ea;
}

.dashboard-page .updated {
  color: #aaa7a0;
  font-size: 0.7rem;
}

.dashboard-page main { padding-bottom: 20px; }

.dashboard-page .hero,
.dashboard-page .hero.hero-compact {
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 22px;
  padding: 26px 0 20px;
  border-bottom: 1px solid rgba(244, 242, 237, 0.14);
}

.dashboard-page .hero h1 {
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.035em;
  white-space: normal;
}

.dashboard-page .technical-label {
  color: #e92124;
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.09em;
}

.dashboard-page .hero-subtitle {
  max-width: 680px;
  margin-top: 10px;
  color: #aaa7a0;
  font-size: 0.94rem;
  line-height: 1.45;
}

.dashboard-page .hero-status,
.dashboard-page .control-strip,
.dashboard-page .opportunity-controls,
.dashboard-page .opportunity-dashboard {
  margin-top: 0;
  border: 1px solid rgba(244, 242, 237, 0.14);
  border-radius: 0;
  background: #101010;
  box-shadow: none;
}

.dashboard-page .hero-status { padding: 13px; }
.dashboard-page .counter { margin-bottom: 5px; font-size: 0.64rem; }
.dashboard-page .counter strong { font-size: 1.55rem; }
.dashboard-page .hero-status p { font-size: 0.78rem; }

.dashboard-page .opportunity-dashboard { margin-top: 15px; }
.dashboard-page .opportunity-stat-grid { gap: 0; }
.dashboard-page .opportunity-stat { padding: 12px; border: 0; border-right: 1px solid rgba(244, 242, 237, 0.14); border-radius: 0; background: transparent; box-shadow: none; }
.dashboard-page .opportunity-stat:last-child { border-right: 0; }
.dashboard-page .opportunity-stat strong { font-size: 1.25rem; }

.dashboard-page .control-strip,
.dashboard-page .opportunity-controls { gap: 10px; margin-top: 15px; padding: 12px; }
.dashboard-page input,
.dashboard-page select { min-height: 36px; border-radius: 0; box-shadow: none; font-size: 0.82rem; }
.dashboard-page .filter-row { gap: 5px; }
.dashboard-page .filter,
.dashboard-page .item-link,
.dashboard-page .open-source { min-height: 32px; padding: 6px 8px; border-radius: 0; font-size: 0.66rem; letter-spacing: 0.055em; }

.dashboard-page .radar-section { padding: 22px 0; border-bottom-color: rgba(244, 242, 237, 0.2); }
.dashboard-page .section-heading { gap: 4px; margin-bottom: 13px; }
.dashboard-page .section-heading h2 { font-size: clamp(1.1rem, 2vw, 1.55rem); line-height: 1.08; }
.dashboard-page .section-support { max-width: 680px; font-size: 0.8rem; }
.dashboard-page .section-link { margin-top: 7px; }

.dashboard-page .item-grid { gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-page .item-grid-featured { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-page .radar-card { min-height: 0; padding: 13px; border-radius: 0; background: #101010; box-shadow: none; }
.dashboard-page .radar-card h3 { margin: 10px 0 6px; font-size: 1rem; line-height: 1.24; }
.dashboard-page .summary { font-size: 0.82rem; line-height: 1.45; }
.dashboard-page .card-meta { gap: 4px; }
.dashboard-page .meta-chip,
.dashboard-page .tag,
.dashboard-page .score-pill { border-radius: 0; font-size: 0.58rem; }
.dashboard-page .card-actions { gap: 6px; margin-top: 10px; }
.dashboard-page .date-line { margin: 9px 0; font-size: 0.74rem; }
.dashboard-page .card-detail { font-size: 0.78rem; }

.dashboard-page .opportunity-decision { margin: 10px 0; }
.dashboard-page .opportunity-decision div { padding: 8px; }
.dashboard-page .opportunity-decision dt { font-size: 0.58rem; }
.dashboard-page .opportunity-decision dd { font-size: 0.72rem; }
.dashboard-page .opportunity-row { gap: 10px; padding: 12px; border-radius: 0; }
.dashboard-page .opportunity-row h3 { font-size: 0.9rem; }

.dashboard-page .archive-list { display: grid; gap: 8px; }
.dashboard-page .archive-card { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 14px; border-radius: 0; background: #101010; }
.dashboard-page .archive-card h3 { font-size: 1rem; }

.dashboard-page .detail-shell { margin-top: 25px; padding: 20px; border: 1px solid rgba(244, 242, 237, 0.14); border-radius: 0; background: #101010; }
.dashboard-page .detail-shell h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.06; }
.dashboard-page .about-grid { gap: 10px; margin: 24px 0; }
.dashboard-page .about-card { padding: 16px; border-radius: 0; background: #101010; }
.dashboard-page .about-card h2 { font-size: 1.05rem; }

.dashboard-page .site-footer { min-height: 84px; padding: 20px 0; color: #aaa7a0; font-size: 0.68rem; }
.dashboard-page .site-footer strong,
.dashboard-page .footer-link { color: #f2f0ea; }

.dashboard-page .mobile-nav { display: none; }

@media (max-width: 920px) {
  .dashboard-page .app-rail { width: 182px; }
  .dashboard-page .page-frame { margin-left: 182px; }
  .dashboard-page .site-header { grid-template-columns: 1fr; gap: 5px; padding: 12px 0; }
  .dashboard-page .top-nav { justify-content: flex-start; }
  .dashboard-page .updated { text-align: left; }
  .dashboard-page .hero,
  .dashboard-page .hero.hero-compact { grid-template-columns: 1fr; }
  .dashboard-page .item-grid,
  .dashboard-page .item-grid-featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  body.dashboard-page { padding-bottom: 68px; }
  .dashboard-page .app-rail { display: none; }
  .dashboard-page .page-frame { margin-left: 0; }
  .dashboard-page .site-header,
  .dashboard-page main,
  .dashboard-page .site-footer { width: min(100% - 24px, 1280px); }
  .dashboard-page .top-nav { display: none; }
  .dashboard-page .site-header { min-height: 60px; padding: 0; grid-template-columns: 1fr auto; }
  .dashboard-page .site-header .brand small { display: none; }
  .dashboard-page .updated { text-align: right; font-size: 0.62rem; }
  .dashboard-page .hero,
  .dashboard-page .hero.hero-compact { gap: 12px; padding: 20px 0 15px; }
  .dashboard-page .hero h1 { font-size: 1.6rem; }
  .dashboard-page .opportunity-stat-grid { display: flex; overflow-x: auto; }
  .dashboard-page .opportunity-stat { min-width: 130px; }
  .dashboard-page .item-grid,
  .dashboard-page .item-grid-featured { grid-template-columns: 1fr; }
  .dashboard-page .radar-section { padding: 17px 0; }
  .dashboard-page .opportunity-controls { padding: 10px; }
  .dashboard-page .opportunity-row { grid-template-columns: 1fr; }
  .dashboard-page .site-footer { align-items: flex-start; flex-direction: column; justify-content: center; }
  .dashboard-page .mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 25; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid rgba(244, 242, 237, 0.2); background: rgba(8, 8, 8, 0.98); }
  .dashboard-page .mobile-nav a { display: grid; min-height: 64px; place-items: center; color: #aaa7a0; font-size: 0.56rem; font-weight: 750; letter-spacing: 0.02em; text-decoration: none; text-transform: uppercase; }
  .dashboard-page .mobile-nav a.is-active { color: #e92124; }
}
