/* ST3LLARsat1 "Boira" — mission microsite (6 pages).
   Loaded after projects.css and stellarsat.css, whose vocabulary it reuses:
   .project-facts, .facts, .board, .metrics, .program-section, .figure, .tags.
   This file only adds what a long technical mission description needs on top:
   the section tabs, data tables, spec sheets, phase diagrams, photo rows and
   the document / publication lists. */

/* =========================================================== Hero + tabs === */
.mission-hero { padding-bottom: clamp(20px, 3vw, 30px); }
.mission-hero h1 .q { color: var(--accent); }

/* Six pages, one mission: a segmented control that behaves like tabs but is made
   of real links, so every section keeps its own URL. */
.mission-tabs {
  display: flex; justify-content: center;
  margin-top: clamp(1.3rem, 3vw, 1.9rem);
}
.mission-tabs__list {
  display: inline-flex; gap: .25rem;
  padding: .3rem; max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
  overflow-x: auto; scrollbar-width: none;
}
.mission-tabs__list::-webkit-scrollbar { display: none; }
.mission-tabs a {
  flex: none;
  padding: .5rem 1.1rem;
  border-radius: 999px;
  font-size: .92rem; font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.mission-tabs a:hover { color: var(--accent); background: var(--surface-2); text-decoration: none; }
.mission-tabs a[aria-current="page"] {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-blue), var(--accent-strong));
  box-shadow: 0 6px 16px rgba(47, 123, 255, .35);
}

/* ============================================================ Prose rhythm === */
/* Sub-sections: the same left accent bar the Leganés spaces use, aligned to the
   reading column. */
.sec-sub {
  max-width: var(--prose-w);
  margin: clamp(2.4rem, 4vw, 3.4rem) auto 1rem;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  display: flex; align-items: center; gap: .7rem;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.sec-sub::before {
  content: ""; flex: none;
  width: 5px; height: 1.05em; border-radius: 3px;
  background: var(--accent);
}
.sec-sub .code {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  padding: .25rem .6rem; border-radius: 999px;
  color: var(--accent);
  background: var(--surface-2); border: 1px solid var(--border);
}
.program-section .project-body + .project-body { margin-top: 0; }
.program-section .project-body ul.result-list { margin-bottom: 1.2rem; }
.program-section .project-body p a,
.program-section .project-body li a { text-decoration: underline; text-decoration-color: rgba(47,123,255,.4); text-underline-offset: 3px; }
.program-section .project-body p a:hover,
.program-section .project-body li a:hover { text-decoration-color: var(--accent); }
.project-body p strong, .project-body li strong { color: var(--text); font-weight: 600; }

/* A cross-reference to a figure or table: reads as a link, never as noise. */
a.xref { font-weight: 500; white-space: nowrap; }

/* Footnote marker + the notes themselves */
sup.fnref { font-size: .72em; line-height: 0; }
sup.fnref a { font-weight: 700; padding: 0 .1em; text-decoration: none; }
.fn-list {
  max-width: var(--prose-w); margin: 1.6rem auto 0; padding: 1rem 1.2rem 1rem 2.6rem;
  font-size: .85rem; color: var(--text-muted); line-height: 1.5;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.fn-list li { padding-left: .2rem; }
.fn-list li + li { margin-top: .4rem; }
.fn-list li::marker { color: var(--accent); font-weight: 700; }

/* ===================================================== Hub: fact sheet ==== */
.mission-facts {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2.4rem);
}
.mission-facts__main { display: grid; gap: 1.4rem; min-width: 0; }
.mission-facts .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.board-member__photo--ph {
  display: grid; place-items: center;
  color: var(--text-muted); font-size: .95rem; font-weight: 700; letter-spacing: .04em;
  border-style: dashed;
}
.mission-badges {
  display: flex; gap: clamp(.9rem, 2vw, 1.5rem); align-items: flex-start;
  padding-left: clamp(1.1rem, 3vw, 2.2rem);
  border-left: 1px solid var(--border);
}
.badge-item { display: flex; flex-direction: column; align-items: center; gap: .45rem; text-align: center; }
.badge-item img { width: clamp(100px, 11vw, 140px); height: auto; }
.badge-item__label {
  font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text);
}
.badge-item__dates { font-size: .8rem; color: var(--text-muted); margin-top: -.3rem; }
@media (max-width: 960px) {
  .mission-facts { grid-template-columns: 1fr; }
  .mission-badges {
    border-left: 0; padding-left: 0;
    border-top: 1px solid var(--border); padding-top: 1.3rem;
    justify-content: center;
  }
}
@media (max-width: 560px) {
  .mission-facts .board { grid-template-columns: 1fr; }
}

/* ===================================================== Hub: at a glance === */
.glance {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}
.glance__item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow);
}
.glance__v { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; color: var(--accent); }
.glance__l {
  margin-top: .45rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted);
}
.glance__n { margin-top: .2rem; font-size: .85rem; color: var(--text-muted); }
.glance-more { text-align: center; margin: 1.4rem 0 0; }

/* ======================================================== Hub: explore ==== */
.explore {
  display: grid; gap: 1.2rem;
  /* five cards: three on the first row, two wider ones on the second */
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.explore-card { grid-column: span 2; }
.explore-card:nth-child(n+4) { grid-column: span 3; }
 (max-width: 900px) {
  .explore { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .explore-card, .explore-card:nth-child(n+4) { grid-column: span 1; }
  .explore-card:last-child { grid-column: 1 / -1; }
}
 (max-width: 560px) {
  .explore { grid-template-columns: 1fr; }
}
.explore-card {
  display: flex; flex-direction: column; gap: .55rem;
  padding: 1.5rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  color: inherit;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
}
.explore-card:hover {
  transform: translateY(-5px); box-shadow: var(--shadow-strong);
  border-color: var(--accent); text-decoration: none;
}
.explore-card__icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--brand-blue), var(--accent-strong));
  box-shadow: 0 6px 16px rgba(47,123,255,.35);
}
.explore-card__icon svg { width: 22px; height: 22px; }
.explore-card h3 { margin: .35rem 0 0; font-size: 1.2rem; color: var(--text); }
.explore-card p { margin: 0; color: var(--text-muted); font-size: .95rem; line-height: 1.5; }
.explore-card__go {
  margin-top: auto; padding-top: .7rem;
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .9rem; font-weight: 600; color: var(--accent);
}
.explore-card__go::after {
  content: ""; width: 1.1em; height: .66em; background: currentColor;
  -webkit-mask: var(--arrow-right) no-repeat center / contain;
          mask: var(--arrow-right) no-repeat center / contain;
  transition: transform .25s var(--ease);
}
.explore-card:hover .explore-card__go::after { transform: translateX(4px); }

/* ======================================================== Figures ========= */
.figure--full { max-width: 1100px; }
.figure--narrow { max-width: 560px; }
.figure--mid { max-width: 880px; }
.figure--large { max-width: 920px; }
/* Slides and diagrams are drawn on white: give them a white mat in both themes
   instead of a dark card with a white rectangle floating inside it. */
.figure__frame--paper { background: #fff; padding: clamp(.4rem, 1.2vw, .8rem); }
.figure__frame--photo { padding: 0; overflow: hidden; background: var(--surface-2); }
.figure__frame--photo img { border-radius: 0; }
.figure img[width] { height: auto; }

.figure-grid {
  display: grid; gap: .7rem;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  align-items: center;
}
.figure-grid > figure { margin: 0; }
.figure-grid img { width: 100%; height: auto; border-radius: 6px; }
.figure-sub { margin-top: .4rem; font-size: .82rem; font-weight: 600; color: var(--text-muted); text-align: center; }
@media (max-width: 720px) { .figure-grid { grid-template-columns: 1fr; } }

/* Rows of photos that share one height, whatever their proportions: each item
   takes a share of the row equal to its aspect ratio (--r). */
.photo-rows { display: grid; gap: .6rem; }
.photo-row { display: flex; gap: .6rem; align-items: stretch; }
.photo-row > * { flex: var(--r, 1) 1 0; min-width: 0; margin: 0; }
.photo-row img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 8px; }
@media (max-width: 640px) {
  .photo-row { flex-wrap: wrap; }
  .photo-row > * { flex: 1 1 calc(50% - .3rem); }
  .photo-row img { height: auto; }
}

/* ===================================================== Tables ============= */
.table-fig { max-width: 1000px; margin: 1.8rem auto 0; }
.table-fig--narrow { max-width: 760px; }
.table-cap { margin: 0 0 .7rem; font-size: .87rem; color: var(--text-muted); }
.table-cap strong { color: var(--text); font-weight: 600; }
.table-wrap {
  overflow-x: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.data-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.data-table th {
  text-align: left; white-space: nowrap;
  padding: .8rem 1rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: .8rem 1rem; vertical-align: top;
  color: var(--text-muted); line-height: 1.5;
  border-bottom: 1px solid var(--border);
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table td:first-child { color: var(--text); font-weight: 600; }
.data-table td.id { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table td strong { color: var(--text); font-weight: 600; }
.data-table td p { margin: 0 0 .7rem; }
.data-table td p:last-child { margin-bottom: 0; }
.data-table--min { min-width: 640px; }
.data-table .cell-fl { color: var(--text); font-weight: 500; }
.table-note { margin: .6rem 0 0; font-size: .84rem; color: var(--text-muted); }
@media (max-width: 720px) {
  .data-table--stack thead { display: none; }
  .data-table--stack, .data-table--stack tbody, .data-table--stack tr, .data-table--stack td { display: block; width: 100%; }
  .data-table--stack tr { border-bottom: 1px solid var(--border); padding: .4rem 0; }
  .data-table--stack tr:last-child { border-bottom: 0; }
  .data-table--stack td { border: 0; padding: .3rem 1rem; }
  .data-table--stack td:first-child { padding-top: .7rem; }
}

/* ===================================================== Spec sheet (Table 1) */
.spec-sheet {
  display: grid; gap: 1rem;
  /* five groups: three on the first row, two wider ones below */
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.spec-group { grid-column: span 2; }
.spec-group:nth-child(n+4) { grid-column: span 3; }
 (max-width: 900px) {
  .spec-sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec-group, .spec-group:nth-child(n+4) { grid-column: span 1; }
  .spec-group:last-child { grid-column: 1 / -1; }
}
 (max-width: 560px) { .spec-sheet { grid-template-columns: 1fr; } }
.spec-group {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.2rem 1.3rem;
}
.spec-group__title {
  margin: 0 0 .8rem;
  font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent);
}
.spec-group dl { margin: 0; display: grid; gap: .55rem; }
.spec-group dl > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .1rem 1rem; align-items: baseline; }
.spec-group dt { color: var(--text-muted); font-size: .88rem; }
.spec-group dd { margin: 0; color: var(--text); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; font-size: .93rem; }

/* ============================================ Notes and cards inside prose === */
.note-card {
  max-width: var(--prose-w);
  margin: 1.3rem auto 0;
  padding: 1.2rem 1.35rem;
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.note-card__tag {
  font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent);
}
.note-card h4 { margin: .25rem 0 .6rem; font-size: 1.08rem; }
.note-card p { margin: 0 0 .8rem; color: var(--text-muted); }
.note-card p:last-child { margin-bottom: 0; }
.note-card strong { color: var(--text); font-weight: 600; }

/* Funder logos at the foot of a funding card (drawn on white, in both themes) */
.note-card__logos {
  display: flex; flex-wrap: wrap; align-items: center; gap: .7rem;
  margin-top: 1rem; padding-top: .95rem; border-top: 1px solid var(--border);
}
.note-card p + .note-card__logos { margin-top: .3rem; }
.fund-logo {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .45rem .8rem; background: #fff; border: 1px solid #e3e8f2; border-radius: 10px;
}
.fund-logo img { display: block; height: 72px; width: auto; max-width: 100%; }
.fund-logo--wide img { height: 46px; }
.fund-logo--sm img { height: 40px; }

/* ConOps operational modes */
.modes { display: grid; gap: 1.1rem; max-width: var(--prose-w); margin: 1.4rem auto 0; }
.mode {
  --mode-c: var(--accent);
  background: var(--surface); border: 1px solid var(--border);
  border-top: 4px solid var(--mode-c);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.3rem 1.4rem;
}
.mode--leop { --mode-c: #2f7bff; }
.mode--nominal { --mode-c: #16a6b6; }
.mode--safe { --mode-c: #e08a1e; }
.mode__tag { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--mode-c); }
.mode h4 { margin: .2rem 0 .7rem; font-size: 1.12rem; }
.mode p { margin: 0 0 .8rem; color: var(--text-muted); }
.mode p:last-child { margin-bottom: 0; }
.mode strong { color: var(--text); font-weight: 600; }

/* Symbol / meaning pairs (thresholds) */
.defs {
  max-width: var(--prose-w); margin: 1rem auto 0;
  display: grid; gap: .5rem;
}
.defs > div {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; align-items: baseline;
  padding: .65rem 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.defs dt { font-weight: 700; color: var(--accent); font-style: italic; }
.defs dd { margin: 0; color: var(--text-muted); }
@media (max-width: 560px) { .defs > div { grid-template-columns: 1fr; gap: .1rem; } }

/* ===================================================== Phases ============== */
/* Phases actually run by the mission */
.timeline { list-style: none; max-width: var(--prose-w); margin: 1.6rem auto 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 14px; top: .8rem; bottom: 1rem; width: 2px; background: var(--border); }
.tl { position: relative; padding: .1rem 0 1.2rem 3rem; }
.tl::before {
  content: ""; position: absolute; left: 6px; top: .45rem;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--accent);
}
.tl.is-current::before { background: var(--accent); box-shadow: 0 0 0 5px rgba(47,123,255,.2); }
.tl__dates {
  font-size: .76rem; font-weight: 700; letter-spacing: .06em;
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.tl__title { margin: .1rem 0 0; color: var(--text); font-weight: 600; line-height: 1.4; }
.tl__status {
  display: inline-block; margin-left: .5rem; padding: .12rem .55rem; border-radius: 999px;
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; vertical-align: .1em;
  color: #fff; background: linear-gradient(135deg, var(--brand-blue), var(--accent-strong));
}

/* ====================================================== Funding =========== */
.funding { display: grid; gap: 1.1rem; max-width: var(--prose-w); margin: 1.4rem auto 0; }
.funding .note-card { margin: 0; max-width: none; }
.link-list { list-style: none; margin: 1rem auto 0; padding: 0; max-width: var(--prose-w); display: grid; gap: .7rem; }
.link-list li {
  padding: .9rem 1.15rem; color: var(--text-muted); line-height: 1.55;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}
.link-list strong { color: var(--text); font-weight: 600; }

/* ================================================= Documents & lists ====== */
.docs-intro { max-width: none; margin: 0 auto; text-align: left; } /* as wide as the lists below it */
.docs-intro .lead { max-width: none; }
.legend { max-width: 1000px; margin: 0 auto 1rem; font-size: .84rem; line-height: 1.8; color: var(--text-muted); }
.legend > span { display: inline-block; margin-right: 1.3rem; }
.legend b { color: var(--text); font-weight: 700; }
.list-tools { max-width: 1000px; margin: 0 auto 1.1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1.1rem; }
.search { position: relative; flex: 1 1 260px; }
.search input {
  width: 100%; padding: .65rem 1rem .65rem 2.5rem;
  font: inherit; font-size: .93rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,123,255,.18); }
.search svg { position: absolute; left: .95rem; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.chips__label { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); margin-right: .2rem; }
.chip-btn {
  font: inherit; font-size: .8rem; font-weight: 600;
  padding: .38rem .8rem; border-radius: 999px; cursor: pointer;
  color: var(--text-muted); background: var(--surface); border: 1px solid var(--border);
  transition: all .2s var(--ease);
}
.chip-btn:hover { color: var(--accent); border-color: var(--accent); }
.chip-btn[aria-pressed="true"] { color: #fff; background: var(--accent); border-color: var(--accent); }
.list-count { margin-left: auto; font-size: .82rem; color: var(--text-muted); }
.no-results { max-width: 1000px; margin: .8rem auto 0; padding: 1rem; text-align: center; color: var(--text-muted); border: 1px dashed var(--border); border-radius: 12px; }
.no-results[hidden] { display: none; }

.pubs { list-style: none; margin: 0 auto; padding: 0; max-width: 1000px; display: grid; gap: .55rem; }
.pub {
  display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: .9rem; align-items: start;
  padding: .9rem 1.1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  line-height: 1.5; font-size: .93rem;
  transition: border-color .22s var(--ease);
}
.pub:hover { border-color: var(--accent); }
.pub[hidden] { display: none; }
.pub__n { font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.pub__body { min-width: 0; color: var(--text-muted); }
.pub__title { color: var(--text); font-weight: 600; }
.pub__sub { display: block; margin-top: .25rem; font-size: .86rem; }
.pub__meta { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; font-size: .78rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.tag-type {
  padding: .12rem .55rem; border-radius: 6px; letter-spacing: .05em;
  color: var(--accent); background: var(--surface-2); border: 1px solid var(--border);
}
abbr[title] { text-decoration: underline dotted; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 50%, transparent); cursor: help; }
.list-sub { max-width: 1000px; margin: 1.8rem auto .8rem; font-size: 1.1rem; display: flex; align-items: center; gap: 1rem; }
.list-sub::after { content: ""; flex: 1; height: 1px; background: var(--border); }
@media (max-width: 640px) {
  .pub { grid-template-columns: 1.8rem minmax(0, 1fr); }
  .pub__meta { grid-column: 2; flex-direction: row; align-items: center; gap: .6rem; }
}

/* Student reports, folded by academic year */
.reports { max-width: 1000px; margin: 0 auto; display: grid; gap: .7rem; }
.reports-bar { max-width: 1000px; margin: 0 auto .9rem; display: flex; justify-content: flex-end; }
.year-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.year-group[hidden] { display: none; }
.year-group > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.3rem; font-weight: 700; color: var(--text);
}
.year-group > summary::-webkit-details-marker { display: none; }
.year-group > summary::after {
  content: ""; margin-left: auto; width: 10px; height: 10px; flex: none;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg); transition: transform .25s var(--ease);
}
.year-group[open] > summary::after { transform: rotate(-135deg); }
.year-group > summary:hover { color: var(--accent); }
.year-group__count { font-size: .78rem; font-weight: 600; color: var(--text-muted); padding: .12rem .6rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.year-group__body { padding: 0 1.3rem 1.2rem; border-top: 1px solid var(--border); }
.course { margin-top: 1.1rem; }
.course[hidden] { display: none; }
.course h4 { margin: 0 0 .5rem; font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.rep-list { list-style: none; margin: 0; padding: 0; display: grid; }
.rep { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) minmax(0, 1.1fr); gap: .8rem; padding: .5rem .2rem; border-bottom: 1px dashed var(--border); font-size: .92rem; }
.rep:last-child { border-bottom: 0; }
.rep[hidden] { display: none; }
.rep__n { color: var(--text-muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.rep__who { color: var(--text); font-weight: 500; }
.rep__what { color: var(--text-muted); }
@media (max-width: 640px) {
  .rep { grid-template-columns: 2rem minmax(0, 1fr); }
  .rep__what { grid-column: 2; margin-top: -.5rem; }
}

/* ===================================================== Prev / next ======== */
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; max-width: 1000px; margin: 0 auto; }
.pager a {
  display: grid; align-items: center; column-gap: 1.1rem; row-gap: .1rem;
  padding: 1.05rem 1.2rem; color: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.pager a:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-strong); text-decoration: none; }
.pager__dir { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); align-self: end; }
.pager__title { font-size: 1.15rem; font-weight: 700; color: var(--text); align-self: start; transition: color .2s var(--ease); }
.pager a:hover .pager__title { color: var(--accent); }

/* The round blue arrow that says "this changes page" */
.pager a::before,
.pager a::after {
  content: none;
  grid-row: 1 / span 2;
  width: 3rem; height: 3rem; border-radius: 50%;
  background: var(--accent) center / 1.35rem no-repeat;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .32);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.pager a.next { grid-column: 2; grid-template-columns: 1fr auto; text-align: right; }
.pager a.next .pager__dir, .pager a.next .pager__title { grid-column: 1; }
.pager a.next::after {
  content: ""; grid-column: 2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
}
.pager a.prev { grid-column: 1; grid-template-columns: auto 1fr; text-align: left; }
.pager a.prev .pager__dir, .pager a.prev .pager__title { grid-column: 2; }
.pager a.prev::before {
  content: ""; grid-column: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E");
}
.pager a.next:hover::after { transform: translateX(5px); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent), 0 4px 12px rgba(37, 99, 235, .32); }
.pager a.prev:hover::before { transform: translateX(-5px); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent), 0 4px 12px rgba(37, 99, 235, .32); }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager a.next, .pager a.prev { grid-column: 1; } }
.section-pager { padding-block: clamp(32px, 5vw, 56px); border-top: 1px solid var(--border); }

@media (prefers-reduced-motion: reduce) {
  .pub, .explore-card, .pager a { transition: none; }
}

/* Small helpers */
.h-count { color: var(--text-muted); font-weight: 500; }
.list-sub[hidden] { display: none; }
/* .figure__frame is a centring grid; its multi-image children must take the full width */
.figure__frame > .figure-grid,
.figure__frame > .photo-rows,
.figure__frame > .photo-row { width: 100%; }

/* ================================================ Links are underlined ===== */
/* Every text link in the mission pages is underlined, so it can be told apart
   from the plain blue headings and labels. Navigation widgets (tabs, cards,
   buttons, pager, side index, footnote marks) keep their own look. */
:where(main) a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
}
:where(main) a:hover { text-decoration-thickness: 2px; text-decoration-color: var(--accent); }
main .mission-tabs a,
main .explore-card,
main .pager a,
main .btn,
main .toc a,
main sup.fnref a,
main .badge-item a { text-decoration: none; }
main .mission-tabs a:hover,
main .explore-card:hover,
main .pager a:hover,
main .btn:hover,
main .toc a:hover { text-decoration: none; }
