/* Hallmark · checked: 2026-11-04 · built: the project · redesign: polish · scope: site · brand: preserved */
/* Critique: legible small text, score badges that fit and primary actions before secondary content. */
/* Targeted follow-up: stable foreground on the dark Pro hero and action-first reading order. */
:root {
  --sa-pro-chip-ink: #f4f1ea;
  --sa-hero-column-gap: 40px;
  --sa-hero-mobile-gap: 20px;
}

html:root body .sp-hero .sp-chip {
  color: var(--sa-pro-chip-ink);
}
html:root body .sp-hero .sp-chip b {
  color: inherit;
}

html:root body .hero .hero-grid {
  grid-template-areas: 'copy search' 'coverage search';
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  column-gap: var(--sa-hero-column-gap);
  row-gap: 0;
}
html:root body .hero .hero-copy { grid-area: copy; min-width: 0; }
html:root body .hero .search-panel { grid-area: search; min-width: 0; }
html:root body .hero .hero-coverage { grid-area: coverage; min-width: 0; }

html:root body.sr-app #main .section-head > a.text-link,
html:root body.sr-app #main .hero-coverage > a.text-link {
  font-size: 12px !important;
  line-height: 1.5;
}

@media (max-width: 900px) {
  html:root body .hero .hero-grid {
    grid-template-areas: 'copy' 'search' 'coverage';
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--sa-hero-mobile-gap);
  }
  html:root body .hero .hero-copy > p { margin-bottom: 0; }
  html:root body .hero .hero-coverage .coverage { margin-top: 0; }
}

/* Targeted legibility and sizing fixes; values, links and ranking rules stay intact. */
:root {
  --sa-aux-text: 12px;
  --sa-score-width: 190px;
  --sa-action-target: 44px;
}

/* The label keeps its intrinsic width; the paragraph wraps beside or above it. */
html:root body.sr-app #main .rp-sugerir {
  flex-wrap: wrap;
}
html:root body.sr-app #main .rp-sugerir > div {
  flex: 1 1 28rem;
  min-width: 0;
}
html:root body.sr-app #main .rp-sugerir > .rp-btn-ghost {
  flex: 0 0 auto;
  max-width: 100%;
  min-height: var(--sa-action-target);
  white-space: nowrap;
}

/* The late stylesheet and these selectors cover both desktop and mobile rules. */
html:root body.sr-app #main .cat-score > span,
html:root body.sr-app #main .cat-score > small,
html:root body.sr-app #main .cat-score > strong > small,
html:root body.sr-app #main .cat-score > .cat-medal,
html:root body.sr-app #main .cat-contest-facts :is(span, small),
html:root body.sr-app .skr-page :is(.skr-order-label, .skr-data-note, .skr-tier),
html:root body.sr-app .skr-page .skr-score > :is(span, small) {
  font-size: var(--sa-aux-text);
  line-height: 1.5;
}
html:root body.sr-app .skr-page .skr-facts {
  font-size: var(--sa-aux-text);
}

/* Reserve enough room for a three-digit note, its marker, denominator and medal. */
html:root body.sr-app #main .cat-contest-head,
html:root body.sr-app #main .cat-role-main {
  grid-template-columns: minmax(0, 1fr) var(--sa-score-width);
}
html:root body.sr-app #main .cat-score {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-self: start;
}
html:root body.sr-app #main .cat-score > :is(span, strong, small, .cat-medal) {
  min-width: 0;
  max-width: 100%;
}

/* Existing home rules use !important for these specific auxiliary elements. */
html:root body.sr-app #main .highlight > p:not(.rate),
html:root body.sr-app #main .highlight .meta,
html:root body.sr-app #main .highlight .rate small,
html:root body.sr-app #main .highlight > a:last-child,
html:root body.sr-app #main .highlight p.muted,
html:root body.sr-app #main .highlight a.accent,
html:root body.sr-app #main .highlight a.text-link,
html:root body.sr-app #main .highlight .pill {
  font-size: var(--sa-aux-text) !important;
  line-height: 1.5;
}

@media (max-width: 760px) {
  html:root body.sr-app .skr-page .skr-position {
    font-size: var(--sa-aux-text);
  }
}

@media (max-width: 540px) {
  html:root body.sr-app #main .cat-contest-head,
  html:root body.sr-app #main .cat-role-main {
    grid-template-columns: minmax(0, 1fr);
  }
  html:root body.sr-app #main .cat-role-main > .cat-score {
    max-width: var(--sa-score-width);
  }
  html:root body.sr-app #main .cat-contest-head > .cat-score {
    grid-template-columns: minmax(0, 1fr) max-content max-content;
  }
}

/* A 320px page cannot carry three badge columns at the readable text size. */
@media (max-width: 360px) {
  html:root body.sr-app #main .cat-contest-head > .cat-score {
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 4px 10px;
  }
  html:root body.sr-app #main .cat-contest-head > .cat-score > span {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  html:root body.sr-app #main .cat-contest-head > .cat-score > strong {
    grid-column: 1;
    grid-row: 2;
  }
  html:root body.sr-app #main .cat-contest-head > .cat-score > .cat-medal {
    grid-column: 2;
    grid-row: 2;
  }
  html:root body.sr-app #main .cat-contest-head > .cat-score > small {
    grid-column: 1 / -1;
    grid-row: 3;
    max-width: none;
  }
}

