/* Chronicles Stage SERP — 2×2 cards + title lines */

.chr-serp {
  width: 100%;
  max-width: min(72.6rem, 100%);
  margin: 0 auto;
  padding: 0 0 2rem;
}

.chr-serp[hidden] {
  display: none !important;
}

.chr-serp__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.25rem;
  margin: 1.5rem 0 1.25rem;
}

.chr-serp__heading {
  margin: 0;
  flex: 1 1 auto;
  font-family: var(--chr-font-story);
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 700;
  color: var(--chr-ink, #1a2230);
}

.chr-serp__count {
  margin: 0;
  font-family: var(--chr-font-dispatch);
  font-size: 0.9rem;
  color: var(--chr-ink-muted, #4a5568);
}

.chr-serp__back {
  margin: 0;
  padding: 0.35rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--chr-rule, #ba9b22) 45%, transparent);
  border-radius: 0.25rem;
  background: color-mix(in srgb, var(--chr-paper, #eef2f6) 88%, #fff);
  color: var(--chr-ink, #1a2230);
  font-family: var(--chr-font-dispatch);
  font-size: 0.85rem;
  cursor: pointer;
}

.chr-serp__back:hover,
.chr-serp__back:focus-visible {
  border-color: var(--chr-rule, #ba9b22);
}

.chr-serp__empty {
  margin: 1.5rem 0;
  font-family: var(--chr-font-story);
  color: var(--chr-ink-muted, #4a5568);
}

.chr-serp__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
  margin: 0 0 1.75rem;
}

.chr-serp__card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.chr-serp__card:hover .chr-serp__card-title,
.chr-serp__card:focus-visible .chr-serp__card-title {
  color: color-mix(in srgb, var(--chr-ink, #1c1917) 70%, #006631);
}

.chr-serp__card-media {
  aspect-ratio: 1;
  overflow: hidden;
  background: color-mix(in srgb, var(--chr-rule, #ba9b22) 12%, var(--chr-paper, #f5f2eb));
}

.chr-serp__card-media--empty {
  min-height: 8rem;
}

.chr-serp__card-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chr-serp__card-title {
  margin: 0;
  font-family: var(--chr-font-story);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--chr-ink, #1a2230);
}

.chr-serp__card-sub {
  margin: 0.25rem 0 0;
  font-family: var(--chr-font-story);
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--chr-ink-muted, #4a5568);
}

.chr-serp__lines {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  border-top: 1px solid color-mix(in srgb, var(--chr-rule, #ba9b22) 35%, transparent);
  padding-top: 1rem;
}

.chr-serp__line {
  display: block;
  padding: 0.2rem 0;
  color: var(--chr-ink, #1a2230);
  font-family: var(--chr-font-story);
  font-size: 1.05rem;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.35;
}

.chr-serp__line:hover,
.chr-serp__line:focus-visible {
  text-decoration: underline;
}

/* Browse control moved to q100 Category Search */
.chr-masthead__browse {
  display: none;
}

/* Sticky chrome — title · tagline · full-width rule (desktop / tablet-landscape) */
body[data-dd-token='desktop'] .chr-masthead,
body[data-dd-token='tablet-landscape'] .chr-masthead {
  position: sticky;
  top: 0;
  z-index: 6;
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0;
  padding: 0.65rem 0 0;
  background: var(--chr-paper, #eef2f6);
}

body[data-dd-token='desktop'] .chr-masthead__rule,
body[data-dd-token='tablet-landscape'] .chr-masthead__rule {
  width: 100%;
  max-width: none;
  margin: 0;
  opacity: 1;
  border-top-color: color-mix(in srgb, var(--chr-rule, #ba9b22) 55%, transparent);
}

body[data-dd-token='desktop'] .chr-serp__back,
body[data-dd-token='tablet-landscape'] .chr-serp__back {
  margin: 0.55rem auto 0.35rem;
}

/* Let q200 be the single scroller for long articles */
body[data-dd-token='desktop'] .chr-stage__article,
body[data-dd-token='tablet-landscape'] .chr-stage__article {
  overflow: visible;
}

/* Desk titles open category SERP */
.chr-desk[data-chr-category] .chr-desk__title {
  cursor: pointer;
}

.chr-desk[data-chr-category] .chr-desk__title:hover,
.chr-desk[data-chr-category] .chr-desk__title:focus-visible {
  color: color-mix(in srgb, var(--drydock-icon-dim, #ede1c9) 70%, #006631);
}

@media (max-width: 720px) {
  .chr-serp__grid {
    grid-template-columns: 1fr;
  }
}

.dd-viewport.dd-layout--phone-stack .chr-serp__grid,
body[data-dd-token='phone'] .chr-serp__grid,
body[data-dd-token='tablet-portrait'] .chr-serp__grid {
  grid-template-columns: 1fr;
}
