/* Homepage only, loaded after style.css (24 Sep 2026 streamline and polish).
 *
 * style.css is byte-pinned by the CapitaLand Ascendas REIT publication chain
 * (tests/clar-public-derivation.test.mjs), so homepage layout changes live here instead.
 * This file also carries the few next-tests rules the homepage used to take from
 * result-stories.css, which now loads on /changes/ only.
 */

/* Screen-reader-only text: the hero search keeps its <label>, out of sight. */
.visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important;
  padding: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important;
}

/* Hero: the heading and the search on one row; stacked on narrow screens (style.css). */
.home .home-hero {
  grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); align-items: center;
  gap: 1rem 2.5rem; margin: 2rem 0 1.75rem;
}
.home .home-hero h1 { margin: 0; font-size: clamp(1.75rem, 2.9vw, 2.35rem); text-wrap: balance; }
.home .home-hero .site-search { margin: 0; }

/* One heading per section, with its link on the same line. */
.home-section-heading {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: .25rem 1rem; margin: 0 0 .8rem;
}
.home-section-heading h2,
.home #research-desk-home .home-section-heading h2 {
  margin: 0; padding: 0; border: 0; font: 650 1.25rem/1.3 var(--ui-font); letter-spacing: -.02em;
}
.home-section-heading > a {
  min-height: 44px; display: inline-flex; align-items: center; font: 550 .75rem/1.5 var(--ui-font);
}
.home .directory-heading { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; }
.home .directory-heading h2 { margin: 0 !important; }

/* Company list: every company, newest evidence first. The name sits left; a small
   right-aligned block holds the ticker over the evidence date. */
.home .coverage { gap: .6rem; }
.home .coverage a.row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: .9rem;
  align-items: start; padding: .9rem 1rem;
}
.home .coverage .name { grid-area: 1 / 1; order: 0; font: 650 1rem/1.35 var(--ui-font); letter-spacing: -.02em; }
.home .coverage .row-meta {
  grid-area: 1 / 2; order: 0; display: flex; flex-direction: column; align-items: flex-end; gap: .05rem;
  text-align: right; white-space: nowrap; color: var(--ink-faint); font-variant-numeric: tabular-nums;
}
.home .coverage .row-meta .tick {
  display: block; order: 0; margin: 0; color: var(--ink-faint);
  font: 600 .66rem/1.35 var(--ui-font); letter-spacing: .04em;
}
.home .coverage .row-date { display: block; margin: 0; color: var(--ink-faint); font: .68rem/1.35 var(--ui-font); font-variant-numeric: tabular-nums; }
.home .coverage .sub { grid-area: 2 / 1 / 3 / -1; order: 0; margin: .5rem 0 0; font: .78rem/1.55 var(--ui-font); }
.home .coverage .company-watch { padding-top: .5rem; margin-top: .5rem; }
.home .coverage-count,
.home .coverage-note { margin: .9rem 0 0; color: var(--ink-faint); font: .72rem/1.6 var(--ui-font); }
.home .coverage-count + .coverage-note { margin-top: .3rem; }

/* Research desk and next evidence tests share one row below the list. */
.home .home-desk { display: block; margin: 0 0 1.6rem; }
.home .home-desk-side {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 2.5rem; align-items: start;
}
.home .next-tests { margin: 0; min-width: 0; }
.home .next-tests__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.home .next-tests__list li { border-bottom: 1px solid var(--rule); }
.home .next-tests__when { display: block; }
.home .next-tests__note { margin: .6rem 0 0; color: var(--ink-faint); }

/* How we work: the no-ratings line sits under the heading. */
.home .method-summary h2 { margin-bottom: .35rem; }
.home .method-summary .method-note { margin: 0 0 1.4rem; color: var(--ink-faint); font: .8rem/1.6 var(--ui-font); }

@media (max-width: 760px) {
  .home .home-hero { margin: 1.5rem 0 1.25rem; }
  .home .home-search-panel { margin-top: .9rem; }
  .home .home-desk-side { grid-template-columns: 1fr; gap: 1.5rem; }
  .home .coverage a.row { padding: .85rem .9rem; }
}
