.rvns-collection {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(36px, 7vw, 88px) 0 72px;
  color: var(--t-text, var(--text, #1c1c1c));
  font-family: var(--t-font-body, var(--font-body, system-ui, sans-serif));
  line-height: var(--t-line-height, 1.55);
}

.rvns-collection-header {
  position: relative;
  overflow: hidden;
  min-height: 240px;
  display: flex;
  align-items: flex-end;
  padding: clamp(24px, 5vw, 56px);
  border-radius: 18px;
  background: var(--surface, rgba(127, 127, 127, 0.1));
}

.rvns-collection-header--cover {
  min-height: min(68vh, 620px);
  color: #fff;
  background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.8)), var(--rvns-collection-cover) center / cover;
}

.rvns-collection-header-copy { position: relative; max-width: 720px; }
.rvns-collection-label { margin: 0 0 10px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.7; }
.rvns-collection-title { margin: 0; font-family: var(--t-font-display, var(--font-serif, Georgia, serif)); font-size: clamp(2.4rem, 8vw, 5.6rem); line-height: 0.98; letter-spacing: -0.035em; }
.rvns-collection-description { max-width: 620px; margin: 18px 0 0; font-size: clamp(1rem, 2vw, 1.25rem); }
.rvns-collection-event, .rvns-collection-count { margin: 12px 0 0; font-size: 0.85rem; opacity: 0.72; }
.rvns-collection-participants { margin: 20px 0 0; font-size: 0.88rem; }
.rvns-collection-participants > span { margin-right: 6px; opacity: 0.62; }
.rvns-collection-entries { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 18px; margin-top: clamp(28px, 5vw, 54px); }
.rvns-collection-entry { min-width: 0; }
.rvns-collection-entry-link { display: block; height: 100%; overflow: hidden; color: inherit; text-decoration: none; border: 1px solid color-mix(in srgb, currentColor 14%, transparent); border-radius: 12px; background: var(--surface, rgba(127, 127, 127, 0.06)); }
.rvns-collection-entry-cover { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.rvns-collection-entry-cover--empty { display: grid; place-items: center; background: linear-gradient(145deg, color-mix(in srgb, currentColor 5%, transparent), color-mix(in srgb, currentColor 14%, transparent)); }
.rvns-collection-entry-cover--empty span { font-family: var(--t-font-display, var(--font-serif, Georgia, serif)); font-size: 2rem; opacity: 0.28; }
.rvns-collection-entry-body { display: flex; flex-direction: column; padding: 18px; }
.rvns-collection-entry-number { font-size: 0.68rem; opacity: 0.45; }
.rvns-collection-entry-title { margin-top: 5px; font-family: var(--t-font-display, var(--font-serif, Georgia, serif)); font-size: 1.35rem; line-height: 1.15; }
.rvns-collection-entry-meta { margin-top: 9px; font-size: 0.76rem; opacity: 0.58; }
.rvns-collection-entry-description { margin-top: 9px; font-size: 0.88rem; opacity: 0.76; }
.rvns-collection-empty { grid-column: 1 / -1; padding: 54px 20px; text-align: center; opacity: 0.58; }

/* Trip layouts ------------------------------------------------------------
   Composition is selected per Trip. Every colour resolves through the active
   site theme, so the same three layouts work in light, dark, and auto themes. */
body[data-rvns-collection="trip"] {
  margin: 0;
  background: var(--t-bg, #fff);
  color: var(--t-text, #182126);
}

.rvns-trip {
  --trip-bg: var(--t-bg, #fff);
  --trip-panel: var(--t-bg-elevated, var(--t-surface, color-mix(in srgb, currentColor 5%, transparent)));
  --trip-panel-soft: var(--t-bg-subtle, var(--t-surface, color-mix(in srgb, currentColor 7%, transparent)));
  --trip-text: var(--t-text, #182126);
  --trip-muted: var(--t-text-muted, var(--t-muted, color-mix(in srgb, currentColor 58%, transparent)));
  --trip-line: var(--t-border, color-mix(in srgb, currentColor 15%, transparent));
  --trip-accent: var(--t-accent, currentColor);
  --trip-on-media: var(--t-on-media, #fff);
  width: min(1220px, calc(100% - 40px));
  padding: clamp(28px, 5vw, 64px) 0 80px;
  color: var(--trip-text);
  font-family: var(--t-font-body, system-ui, sans-serif);
  line-height: var(--t-line-height, 1.55);
}

.rvns-trip-section-label {
  margin: 0;
  color: var(--trip-accent);
  font-size: .7rem;
  font-weight: 760;
  letter-spacing: .18em;
  line-height: 1.3;
  text-transform: uppercase;
}

.rvns-trip-hero {
  position: relative;
  min-height: min(66vh, 620px);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  border-radius: 18px 18px 0 0;
  background: var(--trip-panel-soft);
  isolation: isolate;
}

.rvns-trip-hero-cover,
.rvns-trip-entry-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rvns-trip-hero-cover {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.rvns-trip-cover--empty {
  background:
    radial-gradient(circle at 72% 28%, color-mix(in srgb, var(--trip-accent) 34%, transparent), transparent 28%),
    linear-gradient(145deg, var(--trip-panel-soft), color-mix(in srgb, var(--trip-text) 16%, var(--trip-bg)));
}

.rvns-trip-hero-overlay,
.rvns-trip-entry-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, .82));
  pointer-events: none;
}

.rvns-trip-hero:not(.rvns-trip-hero--cover) .rvns-trip-hero-overlay { display: none; }

.rvns-trip-hero-copy {
  width: min(860px, 100%);
  padding: clamp(28px, 5vw, 62px);
}

.rvns-trip-hero--cover .rvns-trip-hero-copy { color: var(--trip-on-media); }
.rvns-trip-hero--cover .rvns-trip-section-label { color: color-mix(in srgb, var(--trip-accent) 68%, white); }

.rvns-trip-hero h1 {
  max-width: 980px;
  margin: 12px 0 0;
  font-family: var(--t-font-heading, var(--t-font-display, Georgia, serif));
  font-size: clamp(2.6rem, 7vw, 6.2rem);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: .98;
}

.rvns-trip-hero-description {
  max-width: 720px;
  margin: 22px 0 0;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  opacity: .86;
}

.rvns-trip-people {
  display: flex;
  align-items: center;
  margin-top: 24px;
}

.rvns-trip-person {
  display: inline-flex;
  min-width: 0;
  align-items: center;
}

.rvns-trip-person + .rvns-trip-person { margin-left: -7px; }

.rvns-trip-person-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--trip-panel);
  border-radius: 50%;
  color: var(--trip-on-media);
  background: var(--trip-accent);
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.rvns-trip-person:nth-child(2n) .rvns-trip-person-avatar { background: color-mix(in srgb, var(--trip-accent) 62%, #1b688b); }
.rvns-trip-person:nth-child(3n) .rvns-trip-person-avatar { background: color-mix(in srgb, var(--trip-accent) 58%, #5f845d); }
.rvns-trip-person:nth-child(4n) .rvns-trip-person-avatar { background: color-mix(in srgb, var(--trip-accent) 52%, #d58b2e); }

.rvns-trip-people--labelled {
  flex-direction: column;
  align-items: stretch;
  margin-top: 14px;
}

.rvns-trip-people--labelled .rvns-trip-person {
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--trip-line);
}

.rvns-trip-people--labelled .rvns-trip-person + .rvns-trip-person { margin-left: 0; }
.rvns-trip-people--labelled .rvns-trip-person-avatar { width: 34px; height: 34px; border: 0; }
.rvns-trip-people--labelled strong { overflow: hidden; font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }

.rvns-trip-people-caption {
  margin: 11px 0 0;
  font-size: .75rem;
  opacity: .74;
}

.rvns-trip-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--trip-panel-soft);
}

.rvns-trip-stat {
  display: flex;
  min-height: 104px;
  flex-direction: column;
  justify-content: center;
  padding: 22px clamp(18px, 3vw, 34px);
  border-right: 1px solid var(--trip-line);
}

.rvns-trip-stat:last-child { border-right: 0; }
.rvns-trip-stat span { color: var(--trip-accent); font-size: .67rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.rvns-trip-stat strong { margin-top: 5px; font-family: var(--t-font-heading, Georgia, serif); font-size: clamp(1.65rem, 3vw, 2.35rem); font-weight: 550; line-height: 1; }

.rvns-trip-expedition-body {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(260px, 1fr);
  gap: clamp(28px, 5vw, 60px);
  padding: clamp(38px, 6vw, 72px) clamp(0px, 2vw, 24px) 0;
}

.rvns-trip-entries { min-width: 0; }
.rvns-trip-entry { min-width: 0; }
.rvns-trip-entry + .rvns-trip-entry { margin-top: 22px; }

.rvns-trip-entry-link {
  display: block;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--trip-line);
  border-radius: 12px;
  background: var(--trip-panel);
  transition: border-color .2s ease, transform .2s ease;
}

.rvns-trip-entry-link:hover {
  border-color: color-mix(in srgb, var(--trip-accent) 72%, var(--trip-line));
  transform: translateY(-2px);
}

.rvns-trip-entry-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 22px;
}

.rvns-trip-entry-number {
  color: var(--trip-muted);
  font-family: var(--t-font-heading, Georgia, serif);
  font-size: 1.65rem;
  line-height: 1;
  opacity: .45;
}

.rvns-trip-entry-title-group { display: flex; min-width: 0; flex-direction: column; }
.rvns-trip-entry-title { font-family: var(--t-font-heading, Georgia, serif); font-size: 1.2rem; line-height: 1.2; }
.rvns-trip-entry-author,
.rvns-trip-entry-meta { margin-top: 4px; color: var(--trip-muted); font-size: .75rem; }

.rvns-trip-entry-facts {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  color: var(--trip-muted);
  font-size: .71rem;
  white-space: nowrap;
}

.rvns-trip-entry-facts strong { color: inherit; font-size: .92rem; }
.rvns-trip-entry-cover { aspect-ratio: 16 / 6; }

.rvns-trip-entry-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 22px;
  color: var(--trip-muted);
  font-size: .73rem;
}

.rvns-trip-entry-footer strong { color: var(--trip-accent); }

.rvns-trip-expedition-aside {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 22px;
}

.rvns-trip-route,
.rvns-trip-contributors {
  padding: 22px;
  border: 1px solid var(--trip-line);
  border-radius: 12px;
  background: var(--trip-panel);
}

.rvns-trip-route-map {
  display: block;
  width: 100%;
  height: 210px;
  margin-top: 12px;
  overflow: visible;
  background: color-mix(in srgb, var(--trip-accent) 10%, var(--trip-panel-soft));
}

.rvns-trip-route-current { fill: none; stroke: color-mix(in srgb, var(--trip-accent) 16%, transparent); stroke-width: .5; vector-effect: non-scaling-stroke; }
.rvns-trip-route-line { fill: none; stroke: var(--trip-accent); stroke-width: .8; stroke-dasharray: 2 2; opacity: .62; vector-effect: non-scaling-stroke; }
.rvns-trip-route-point { fill: var(--trip-accent); stroke: var(--trip-panel); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rvns-trip-route-caption { margin: 10px 0 0; color: var(--trip-muted); font-size: .68rem; }

/* Route Log: the route owns the middle of the page, and entries become a
   compact ledger. It stays equally legible on light and dark themes. */
body[data-rvns-collection-layout="route-log"] .rvns-trip {
  width: min(1440px, 100%);
  padding-top: 0;
}

body[data-rvns-collection-layout="route-log"] .rvns-trip-hero {
  min-height: min(68vh, 660px);
  border-radius: 0;
}

body[data-rvns-collection-layout="route-log"] .rvns-trip-hero-copy { width: 100%; }
body[data-rvns-collection-layout="route-log"] .rvns-trip-hero-description { display: none; }

body[data-rvns-collection-layout="route-log"] .rvns-trip-stats {
  width: min(700px, 100%);
  margin-top: clamp(80px, 20vh, 220px);
  color: inherit;
  background: transparent;
}

body[data-rvns-collection-layout="route-log"] .rvns-trip-stat {
  min-height: 0;
  padding: 0 28px 0 0;
  border: 0;
}

body[data-rvns-collection-layout="route-log"] .rvns-trip-stat strong { font-family: var(--t-font-body, system-ui, sans-serif); font-size: clamp(1.5rem, 3vw, 2.35rem); font-weight: 750; }
body[data-rvns-collection-layout="route-log"] .rvns-trip-stat span { order: 2; margin-top: 8px; color: inherit; opacity: .62; }

body[data-rvns-collection-layout="route-log"] .rvns-trip-contributors {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 22px clamp(28px, 4vw, 52px);
  border-width: 1px 0;
  border-radius: 0;
}

body[data-rvns-collection-layout="route-log"] .rvns-trip-contributors .rvns-trip-section-label { flex: 0 0 auto; }
body[data-rvns-collection-layout="route-log"] .rvns-trip-people--labelled { flex-direction: row; flex-wrap: wrap; gap: 10px; margin: 0; }
body[data-rvns-collection-layout="route-log"] .rvns-trip-people--labelled .rvns-trip-person { gap: 8px; padding: 5px 13px 5px 5px; border: 1px solid var(--trip-line); border-radius: 999px; background: var(--trip-panel-soft); }

body[data-rvns-collection-layout="route-log"] .rvns-trip-route {
  padding: 28px clamp(28px, 4vw, 52px) 36px;
  border-width: 0 0 1px;
  border-radius: 0;
  background: color-mix(in srgb, var(--trip-accent) 12%, var(--trip-panel-soft));
}

body[data-rvns-collection-layout="route-log"] .rvns-trip-route-map { height: clamp(250px, 32vw, 390px); background: transparent; }
body[data-rvns-collection-layout="route-log"] .rvns-trip-route-caption { text-align: right; }

body[data-rvns-collection-layout="route-log"] .rvns-trip-entries { padding: clamp(38px, 5vw, 66px) clamp(28px, 4vw, 52px); }
body[data-rvns-collection-layout="route-log"] .rvns-trip-entries > .rvns-trip-section-label { margin-bottom: 24px; }
body[data-rvns-collection-layout="route-log"] .rvns-trip-entry + .rvns-trip-entry { margin-top: 0; }

body[data-rvns-collection-layout="route-log"] .rvns-trip-entry-link {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(220px, 340px);
  gap: 22px;
  align-items: center;
  padding: 20px 0;
  border-width: 1px 0 0;
  border-radius: 0;
  background: transparent;
}

body[data-rvns-collection-layout="route-log"] .rvns-trip-entry-link:hover { transform: none; }
body[data-rvns-collection-layout="route-log"] .rvns-trip-entry-cover { aspect-ratio: 16 / 5; border-radius: 5px; }
body[data-rvns-collection-layout="route-log"] .rvns-trip-entry-facts { margin-top: 7px; color: var(--trip-accent); }

/* Cinematic Chapters: each contribution becomes a full-bleed visual chapter. */
body[data-rvns-collection-layout="dive-chapters"] .rvns-trip {
  width: min(1440px, 100%);
  padding: 0;
}

body[data-rvns-collection-layout="dive-chapters"] .rvns-trip-hero {
  min-height: min(88vh, 900px);
  align-items: center;
  justify-content: center;
  border-radius: 0;
  text-align: center;
}

body[data-rvns-collection-layout="dive-chapters"] .rvns-trip-hero-overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, .2), rgba(0, 18, 25, .72));
}

body[data-rvns-collection-layout="dive-chapters"] .rvns-trip-hero-copy { width: min(920px, 100%); }
body[data-rvns-collection-layout="dive-chapters"] .rvns-trip-hero h1 { margin-inline: auto; }
body[data-rvns-collection-layout="dive-chapters"] .rvns-trip-people { justify-content: center; }

body[data-rvns-collection-layout="dive-chapters"] .rvns-trip-intro {
  display: grid;
  min-height: 300px;
  place-items: center;
  padding: clamp(50px, 8vw, 110px) 24px;
  text-align: center;
}

body[data-rvns-collection-layout="dive-chapters"] .rvns-trip-intro p {
  max-width: 820px;
  margin: 0;
  font-family: var(--t-font-heading, Georgia, serif);
  font-size: clamp(1.35rem, 3vw, 2.25rem);
  line-height: 1.45;
}

body[data-rvns-collection-layout="dive-chapters"] .rvns-trip-entry + .rvns-trip-entry { margin-top: 0; }
body[data-rvns-collection-layout="dive-chapters"] .rvns-trip-entry-link {
  position: relative;
  min-height: min(72vh, 760px);
  border: 0;
  border-radius: 0;
  background: var(--trip-panel-soft);
  isolation: isolate;
}

body[data-rvns-collection-layout="dive-chapters"] .rvns-trip-entry-link:hover { transform: none; }
body[data-rvns-collection-layout="dive-chapters"] .rvns-trip-entry-cover { position: absolute; inset: 0; z-index: -2; aspect-ratio: auto; }
body[data-rvns-collection-layout="dive-chapters"] .rvns-trip-entry-overlay { z-index: -1; background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, .82)); }
body[data-rvns-collection-layout="dive-chapters"] .rvns-trip-entry-heading {
  position: absolute;
  inset: auto clamp(22px, 4vw, 54px) clamp(28px, 5vw, 64px);
  display: flex;
  max-width: 760px;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  padding: 0;
  color: var(--trip-on-media);
}

body[data-rvns-collection-layout="dive-chapters"] .rvns-trip-entry-title { font-size: clamp(2rem, 5vw, 4.8rem); font-weight: 550; }
body[data-rvns-collection-layout="dive-chapters"] .rvns-trip-entry-meta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 0; color: inherit; }
body[data-rvns-collection-layout="dive-chapters"] .rvns-trip-entry-facts { color: inherit; }

body[data-rvns-collection-layout="dive-chapters"] .rvns-trip-route {
  padding: clamp(44px, 7vw, 84px) clamp(24px, 5vw, 70px);
  border: 0;
  border-radius: 0;
  background: color-mix(in srgb, var(--trip-accent) 12%, var(--trip-panel-soft));
}

body[data-rvns-collection-layout="dive-chapters"] .rvns-trip-route-map { height: clamp(220px, 28vw, 360px); background: transparent; }
body[data-rvns-collection-layout="dive-chapters"] .rvns-trip-route-caption { text-align: center; }

body[data-rvns-collection="tag"] .rvns-collection-header { min-height: 0; padding-block: 28px; background: transparent; }
body[data-rvns-collection="tag"] .rvns-collection-title { font-size: clamp(2rem, 5vw, 3rem); }
body[data-rvns-collection="tag"] .rvns-collection-entries { grid-template-columns: 1fr; max-width: 780px; }
body[data-rvns-collection="tag"] .rvns-collection-entry-link { display: grid; grid-template-columns: 150px minmax(0, 1fr); }
body[data-rvns-collection="tag"] .rvns-collection-entry-cover { height: 100%; aspect-ratio: auto; }

@media (max-width: 560px) {
  .rvns-collection { width: min(100% - 28px, 1120px); padding-top: 22px; }
  .rvns-collection-header { padding: 24px 20px; }
  body[data-rvns-collection="tag"] .rvns-collection-entry-link { grid-template-columns: 1fr; }
  body[data-rvns-collection="tag"] .rvns-collection-entry-cover { aspect-ratio: 16 / 9; }

  .rvns-trip { width: 100%; padding-top: 0; }
  .rvns-trip-hero { min-height: 68vh; border-radius: 0; }
  .rvns-trip-hero-copy { padding: 26px 20px; }
  .rvns-trip-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rvns-trip-stat { min-height: 82px; padding: 16px 20px; border-bottom: 1px solid var(--trip-line); }
  .rvns-trip-expedition-body { grid-template-columns: 1fr; padding: 28px 14px 0; }
  .rvns-trip-expedition-aside { order: -1; }
  .rvns-trip-entry-heading { grid-template-columns: auto minmax(0, 1fr); }
  .rvns-trip-entry-heading > .rvns-trip-entry-facts { grid-column: 2; flex-wrap: wrap; white-space: normal; }
  .rvns-trip-entry-cover { aspect-ratio: 16 / 9; }

  body[data-rvns-collection-layout="route-log"] .rvns-trip-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 70px; gap: 18px; }
  body[data-rvns-collection-layout="route-log"] .rvns-trip-contributors { align-items: flex-start; flex-direction: column; gap: 10px; }
  body[data-rvns-collection-layout="route-log"] .rvns-trip-people--labelled { flex-direction: column; width: 100%; }
  body[data-rvns-collection-layout="route-log"] .rvns-trip-entry-link { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; }
  body[data-rvns-collection-layout="route-log"] .rvns-trip-entry-cover { grid-column: 1 / -1; grid-row: 2; aspect-ratio: 16 / 8; }
  body[data-rvns-collection-layout="dive-chapters"] .rvns-trip-entry-link { min-height: 62vh; }
}
