/* hero-index (Definer Group brand section; refs 125, 263, 86).
   Title, intro and actions first (source order = phone order: headline first),
   then a numbered index of large serif rows split by hairlines. Type only:
   no photo slot. From 960px the title sits left and the intro / actions right,
   and each index row runs number | name | text | arrow on one line.
   Optional photo (content step 2026-11-17): one wide real photo under the
   index, framed by a 1px gilt hairline inset (signature S2), caption below. */
.s-hindex__title span { display: block; }
.s-hindex__top { display: grid; row-gap: var(--space-6); }
.s-hindex__eyebrow { color: var(--accent); }
.s-hindex__side > * + * { margin-top: var(--space-6); }
.s-hindex__intro { color: var(--fg-soft); max-width: 30rem; }
.s-hindex__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }

.s-hindex__label {
  max-width: none;
  margin-top: var(--space-9);
  padding-bottom: var(--space-4);
  border-bottom: var(--hairline) solid var(--rule-strong);
  color: var(--fg-muted);
}
.s-hindex__list { list-style: none; margin: 0; padding: 0; counter-reset: hindex; }
.s-hindex__item { counter-increment: hindex; border-bottom: var(--hairline) solid var(--rule); scroll-margin-top: var(--space-5); }
.s-hindex__row {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  column-gap: var(--space-4);
  row-gap: var(--space-2);
  align-items: baseline;
  min-height: var(--tap-min);
  padding-block: var(--space-5);
  color: inherit;
  text-decoration: none;
}
.s-hindex__row::before {
  content: counter(hindex, decimal-leading-zero);
  grid-column: 1;
  grid-row: 1;
  font-family: var(--font-body);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  color: var(--accent);
}
.s-hindex__name {
  grid-column: 2;
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: var(--fw-heading);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  transition: color var(--t-fast) var(--ease);
}
.s-hindex__text { grid-column: 2; color: var(--fg-soft); max-width: 34rem; }
.s-hindex__sub { display: block; margin-top: var(--space-1); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--fg-muted); }
.s-hindex__arrow {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  width: 28px;
  height: 28px;
  transition: transform var(--t-fast) var(--ease);
}
a.s-hindex__row:hover .s-hindex__name { color: var(--accent); }
a.s-hindex__row:hover .s-hindex__arrow { transform: translateX(4px); }

@media (min-width: 960px) {
  .s-hindex__top { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); column-gap: var(--space-8); align-items: end; }
  .s-hindex__eyebrow { grid-column: 1 / -1; }
  .s-hindex__title span + span { padding-left: 1.4em; }
  .s-hindex__side { padding-bottom: var(--space-3); }
  .s-hindex__row { grid-template-columns: 4rem minmax(0, 4fr) minmax(0, 6fr) auto; column-gap: var(--space-6); align-items: center; }
  .s-hindex__row::before, .s-hindex__name, .s-hindex__text, .s-hindex__arrow { grid-column: auto; grid-row: 1; }
}

/* Phones, Latin: the title lines run on as one sentence (the space between them is in the
   markup, so the headline also reads as two words when copied or read aloud), so a
   long first line never leaves one word alone. Chinese keeps one line per row (each
   row is a short clause ending in punctuation) and never splits a word inside a row. */
@media (max-width: 639px) {
  .s-hindex__title:lang(en) span { display: inline; }
  .s-hindex__title:lang(zh) span { word-break: keep-all; }
}

/* ---- optional photo under the index (content step 2026-11-17) ---- */
.s-hindex__photo { position: relative; margin: var(--space-8) 0 0; }
/* the line pages' photo sits in the first screen since 2026-11-18 (the index moved below), so it is the hero slot: loaded first */
.s-hindex__photo .media--wide, .s-hindex__photo .media--hero { aspect-ratio: 4 / 3; }
.s-hindex__cap { margin-top: var(--space-3); color: var(--fg-muted); max-width: 40rem; }
@media (min-width: 640px) { .s-hindex__photo .media--wide, .s-hindex__photo .media--hero { aspect-ratio: 16 / 9; } }
@media (min-width: 960px) { .s-hindex__photo .media--wide, .s-hindex__photo .media--hero { aspect-ratio: 21 / 9; } }
