/* topics/ only: the announcement/blog list rows. */

.subpage-page--topics .topics-list {
  /* Keep announcement rows at a readable measure rather than letting the
     list inherit the entire editorial canvas on wider screens. */
  width: min(100%, clamp(560px, 78vw, 920px));
  margin-inline: auto;
  border-top: 1px solid #ddd;
}

.subpage-page--topics .topic-row {
  position: relative;
  display: grid;
  grid-template-columns: clamp(96px, 8vw, 116px) clamp(100px, 8vw, 108px) minmax(0, 1fr) 24px;
  align-items: center;
  gap: clamp(14px, 1.7vw, 24px);
  padding: 26px 0;
  border-bottom: 1px solid #ddd;
  text-decoration: none;
  color: inherit;
}

.subpage-page--topics .topic-row time { font-family: var(--top-en); font-size: 14px; color: var(--subpage-muted); }

.subpage-page--topics .topic-row .label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 26px;
  padding: 0 clamp(8px, 1vw, 14px);
  border-radius: 999px;
  background: var(--subpage-ink);
  color: #fff;
  font-size: clamp(11px, .85vw, 12px);
  letter-spacing: .04em;
  white-space: nowrap;
}

.subpage-page--topics .topic-row .label--pink { background: var(--top-pink, #e683bd); }

.subpage-page--topics .topic-row h2 { margin: 0 0 6px; font-size: 16px; font-weight: 500; line-height: 1.6; }
.subpage-page--topics .topic-row h2 a { color: inherit; text-decoration: none; }
.subpage-page--topics .topic-row p { margin: 0; font-size: 13px; color: var(--subpage-muted); }
.subpage-page--topics .topic-row .topic-row__arrow { display: block; color: var(--subpage-ink); font-size: 20px; text-align: center; text-decoration: none; transition: transform .2s ease; }
.subpage-page--topics .topic-row .topic-row__arrow::before { position: absolute; inset: 0; content: ''; }
.topic-row .topic-row__arrow svg { display: block; width: 12px; height: 12px; margin: auto; transition: transform .2s ease; }
.subpage-page--topics .topic-row:hover .topic-row__arrow svg { transform: translateX(4px); }
.subpage-page--topics .topic-row:has(a:focus-visible) { outline: 2px solid var(--subpage-ink); outline-offset: 5px; }
.subpage-page--topics .topic-row a:focus-visible { outline: none; }

/* Column teasers belong to this page, so their responsive behavior must not
   be inherited from the generic subpage/tablet article grids. */
.subpage-page--topics .subpage-article-grid {
  width: 100%;
  align-items: stretch;
  grid-auto-flow: row;
}

.subpage-page--topics .subpage-article-card {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
}

.subpage-page--topics .subpage-article-card .subpage-dot-media {
  width: 100%;
  flex: 0 0 auto;
  aspect-ratio: 3 / 2;
}

.subpage-page--topics .subpage-article-card .subpage-dot-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.subpage-page--topics .subpage-article-card h3,
.subpage-page--topics .subpage-article-card p { overflow-wrap: anywhere; }

.subpage-page--topics .subpage-article-card .subpage-button { margin-top: auto; }

@media (min-width: 768px) {
  .subpage-page--topics .topics-list {
    width: min(calc(100% - 48px), 920px);
  }

  .subpage-page--topics .topic-row {
    display: grid;
    grid-template-columns: clamp(88px, 8vw, 116px) clamp(96px, 8vw, 108px) minmax(0, 1fr) 24px;
    gap: clamp(12px, 1.7vw, 24px);
    padding: clamp(20px, 2vw, 26px) 0;
  }

  .subpage-page--topics .topic-row div,
  .subpage-page--topics .topic-row .topic-row__arrow {
    grid-column: auto;
    grid-row: auto;
    order: initial;
    margin-left: 0;
  }

  .subpage-page--topics .subpage-article-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: clamp(24px, 3vw, 44px);
    row-gap: clamp(56px, 6vw, 84px);
  }

  .subpage-page--topics .subpage-article-card {
    align-self: stretch;
  }

  .subpage-page--topics .subpage-article-card .subpage-button {
    width: fit-content;
  }
}

@media (max-width: 767px) {
  .subpage-page--topics .topics-list { width: 100%; }

  .subpage-page--topics .topic-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    padding: 20px 0;
  }

  .subpage-page--topics .topic-row div { flex: 1 1 100%; order: 2; }
  .subpage-page--topics .topic-row .topic-row__arrow { order: 1; flex: 0 0 auto; margin-left: auto; }
  .subpage-page--topics .topic-row .label { width: auto; min-width: 100px; }
  .subpage-page--topics .topic-row h2 { font-size: 15px; }
  .subpage-page--topics .topic-row p { display: none; }

  .subpage-page--topics .subpage-article-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 48px;
  }

  .subpage-page--topics .subpage-article-card { height: auto; }
}
