/* ── Research programme page extras ─────────────────────── */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
}
.inst-link-pill {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}
.inst-link-pill:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  text-decoration: none;
}
.inst-link-pill__id {
  color: var(--text-muted);
}
.status-dot--active { color: var(--green); }
.status-dot--building { color: var(--amber); }
.status-dot--inactive { color: var(--text-muted); }
.doi-link {
  font-size: var(--fs-md);
  font-family: var(--font-mono);
}

/* ── Instrument page ─────────────────────────────────────── */
.inst-badge-inline {
  margin-left: var(--s2);
}
.badge--outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}
.inst-charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s4);
  margin-top: var(--s4);
}
@media (min-width: 700px) {
  .inst-charts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1000px) {
  .inst-charts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.inst-live-panels {
  display: flex;
  flex-direction: column;
  gap: var(--s6);
}
.inst-station-id {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.inst-reading-small {
  font-size: var(--fs-xs);
}
.inst-chart-container {
  height: 160px;
}
.inst-chart-note {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  margin-top: var(--s2);
}
.inst-cal-card {
  margin-top: var(--s4);
}
.inst-github-link {
  font-size: var(--fs-md);
}
.inst-cal-intro {
  max-width: var(--w-prose);
  color: var(--text-muted);
  font-size: var(--fs-base);
  margin-bottom: var(--s5);
}
.calibration-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.calibration-table tr {
  border-bottom: 1px solid var(--border);
}
.calibration-table tr:last-child {
  border-bottom: none;
}
.calibration-table th,
.calibration-table td {
  text-align: left;
  padding: var(--s3) var(--s4);
}
.calibration-table th {
  color: var(--text-muted);
}

.calibration-table__date {
  font-family: var(--font-mono);
  color: var(--text-muted);
}
.calibration-table__sensor {
  font-family: var(--font-mono);
  color: var(--accent);
}
.calibration-table__offset {
  font-family: var(--font-mono);
  text-align: right;
}
.calibration-table__offset--applied {
  color: var(--accent);
}
.calibration-table__offset--none {
  color: var(--text-dim);
}
.calibration-table__notes {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  font-style: italic;
  padding: 0 var(--s4) var(--s3);
}

/* ── Instrument page — embed snippet ─────────────────────── */
.embed-snippet-wrap {
  margin-bottom: var(--s5);
}
.embed-snippet-label {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-bottom: var(--s2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.embed-snippet {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s4);
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
  overflow-x: auto;
  white-space: pre;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-bottom: var(--s3);
}
.embed-copy-btn {
  font-size: var(--fs-sm);
  padding: 0.3rem 0.8rem;
}

.card--compact {
  padding: var(--s4);
}

/* ── About page — partner items ──────────────────────────── */
.partner-item {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: var(--s4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.partner-item__logo {
  max-height: 45px;
  width: auto;
  align-self: flex-start;
  margin-bottom: var(--s2);
  object-fit: contain;
}
.partner-item__name {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: var(--fs-lg);
  color: var(--heading);
}
.partner-item__type {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--accent);
  text-transform: uppercase;
}
.partner-item__link {
  margin: 0;
  font-size: var(--fs-sm);
  text-decoration: none;
  color: var(--accent);
  font-family: var(--font-mono);
}
.partner-item__link:hover {
  text-decoration: underline;
}
.section--padded-bottom {
  padding-bottom: var(--s7);
}
.about-coords {
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
}

/* ── Education index page ────────────────────────────────── */
.edu-equity-note {
  font-size: var(--fs-base);
}
.edu-notebook-note {
  font-size: var(--fs-base);
}
.syllabus-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  align-items: center;
  margin-top: var(--s3);
}
.syllabus-download-link {
  font-size: var(--fs-xs);
  color: var(--teal);
  text-decoration: none;
}
.syllabus-download-link:hover {
  text-decoration: underline;
}
.badge--easy {
  background: rgba(var(--accent-rgb), 0.25);
  color: var(--accent-bright);
}
.edu-data-links {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.edu-resource-link {
  font-size: var(--fs-md);
}

/* ── Inline search modal ─────────────────────────────────────────────────── */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 1rem 1rem;
}
.search-modal[hidden] { display: none; }

.search-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.search-modal__panel {
  position: relative;
  width: 100%;
  max-width: 620px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(var(--accent-rgb), 0.1);
  overflow: hidden;
}

.search-modal__form {
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--border-light);
}

.search-modal__input-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.search-modal__icon {
  color: var(--text-dim);
  flex-shrink: 0;
}

.search-modal__input {
  flex: 1;
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  color: var(--text);
  background: transparent;
  border: none;
  outline: none;
  min-width: 0;
}
.search-modal__input::placeholder { color: var(--text-dim); }
.search-modal__form:focus-within {
  border-bottom-color: var(--accent);
  box-shadow: 0 1px 0 0 rgba(var(--accent-rgb), 0.4);
}

.search-modal__results {
  max-height: 400px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.search-modal__results[hidden] { display: none; }

.search-modal__list {
  list-style: none;
  margin: 0;
  padding: var(--s2) 0;
}

.search-modal__result {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: var(--s3) var(--s5);
  text-decoration: none;
  color: var(--text);
  transition: background 0.1s;
}
.search-modal__result:hover,
.search-modal__result--active {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

.search-modal__result-type {
  font-size: var(--fs-xs);
  align-self: flex-start;
  margin-bottom: 0.1rem;
}

.search-modal__result-title {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--heading);
  line-height: var(--lh-title);
}
.search-modal__result:hover .search-modal__result-title,
.search-modal__result--active .search-modal__result-title {
  color: var(--accent-bright);
}

.search-modal__result-excerpt {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-body);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-modal__empty {
  padding: var(--s4) var(--s5);
  font-size: var(--fs-md);
  color: var(--text-muted);
}

.search-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s3) var(--s5);
  border-top: 1px solid var(--border-light);
  font-size: var(--fs-xs);
}

.search-modal__full-link {
  color: var(--accent);
  text-decoration: none;
  font-size: var(--fs-xs);
}
.search-modal__full-link:hover { text-decoration: underline; }

.nav-search-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* ── Publication cite export ─────────────────────────────────────────────── */
.pub-cite {
  margin-top: var(--s4);
  border-top: 1px solid var(--border-light);
  padding-top: var(--s4);
}

.pub-cite__toggle {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.pub-cite__toggle::-webkit-details-marker { display: none; }
.pub-cite__toggle::before {
  content: '+ ';
  color: var(--accent);
}
details[open] .pub-cite__toggle::before { content: '− '; }
.pub-cite__toggle:hover { color: var(--text); }

.pub-cite__body {
  margin-top: var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.pub-cite__section { display: flex; flex-direction: column; gap: var(--s2); }

.pub-cite__label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pub-cite__label-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.pub-cite__apa {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-body);
  margin: 0;
}

.pub-cite__pre {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: var(--s4);
  white-space: pre-wrap;
  overflow-x: auto;
  margin: 0;
  line-height: var(--lh-body);
}

.pub-cite__copy {
  font-size: var(--fs-xs);
  padding: 0.2rem 0.6rem;
  cursor: pointer;
}

/* ── Publication detail page ─────────────────────────────────────────────── */
.pub-detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s6);
  margin-top: var(--s6);
}
@media (min-width: 860px) {
  .pub-detail-layout {
    grid-template-columns: 1fr 280px;
    align-items: start;
  }
}
.pub-detail__title {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: var(--lh-title);
}
.pub-detail-meta-card {
  position: sticky;
  top: var(--s6);
}
.pub-meta-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s2) var(--s4);
  font-size: var(--fs-md);
  margin-top: var(--s4);
}
.pub-meta-list dt {
  color: var(--text-dim);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 2px;
}
.pub-meta-list dd {
  margin: 0;
  color: var(--text);
}
.pub-detail-actions {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.pub-action-btn {
  width: 100%;
  text-align: center;
  justify-content: center;
}
.pub-cite--open .pub-cite__body {
  display: flex;
}
.pub-detail__sidebar .pub-cite--open {
  border: none;
  padding: 0;
}

/* ── Publication author cards ───────────────────────────────────────────── */
.pub-author-cards {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.pub-author-card {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s2) 0;
  text-decoration: none;
  color: var(--text);
  border-top: 1px solid var(--border-light);
}
.pub-author-card:first-of-type { border-top: none; }
.pub-author-card:hover .pub-author-name { color: var(--accent); }
.pub-author-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.pub-author-avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--accent);
  font-weight: 600;
  font-size: var(--fs-lg);
}
.pub-author-info { display: flex; flex-direction: column; gap: 0.1rem; }
.pub-author-name { font-weight: 500; font-size: var(--fs-base); }
.pub-author-role { font-size: var(--fs-sm); color: var(--text-muted); }

/* pub-card author row (index page) */
.pub-card__author-row {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
}
.pub-card__author-avatar {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
}

/* ── Lab note detail field-site map ─────────────────────────────────────── */
.note-site-map {
  height: 240px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-light);
  margin-top: var(--s4);
}

/* ── Lab note prev/next navigation ──────────────────────────────────────── */
.note-pagination {
  margin: var(--s7) 0 var(--s8);
  border-top: 1px solid var(--border-light);
  padding-top: var(--s6);
}

.note-pagination__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s5);
}

@media (max-width: 600px) {
  .note-pagination__inner { grid-template-columns: 1fr; }
}

.note-pagination__link {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: var(--s4) var(--s5);
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}
.note-pagination__link:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

.note-pagination__link--next {
  text-align: right;
}

.note-pagination__dir {
  font-size: var(--fs-xs);
}

.note-pagination__title {
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: var(--lh-title);
}

.note-pagination__meta {
  font-size: var(--fs-xs);
}

/* ── Lab notes index pager ───────────────────────────────────────────────── */
.note-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s5);
  padding: var(--s5) 0 var(--s8);
}

.note-pager__btn {
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  color: var(--accent);
  text-decoration: none;
  padding: var(--s2) var(--s4);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  transition: border-color 0.15s, background 0.15s;
}
.note-pager__btn:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  text-decoration: none;
}

.note-pager__info {
  font-size: var(--fs-sm);
}

/* ── Error page (404, 500) layout ───────────────────────────────────────── */
.page-hero--center { padding: var(--s8) 0; text-align: center; }
.error-code {
  color: var(--accent);
  font-size: var(--fs-3xl);
  font-family: var(--font-mono);
  margin-bottom: var(--s4);
}
.error-sub {
  max-width: 600px;
  margin: var(--s4) auto 0;
  color: var(--text-muted);
  line-height: var(--lh-body);
}
.error-cta {
  margin-top: var(--s6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  justify-content: center;
}
.error-back-icon { transform: rotate(180deg); }
.error-code--red { color: var(--red); }

/* ══════════════════════════════════════════════════════════
   D.13 Block component CSS — eliminates inline styles
   from all StreamField block templates
   ══════════════════════════════════════════════════════════ */

/* Accordion block */
.accordion-block { margin: var(--s5) 0; }
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-summary {
  padding: var(--s4) 0;
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.accordion-summary::-webkit-details-marker { display: none; }
.accordion-arrow {
  color: var(--text-dim);
  font-size: var(--fs-xs);
  flex-shrink: 0;
  margin-left: var(--s4);
  transition: transform 0.2s;
}
details[open] .accordion-arrow { transform: rotate(90deg); }
.accordion-body {
  padding: 0 0 var(--s5);
  color: var(--text-muted);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
}

/* Callout block */
.callout {
  margin: var(--s5) 0;
  padding: var(--s5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}
.callout--key     { border-left-color: var(--amber); }
.callout--status  { border-left-color: var(--green); }
.callout--warning { border-left-color: var(--red); }
.callout__title {
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  font-weight: 600;
  margin-bottom: var(--s3);
  color: var(--accent);
}
.callout--key     .callout__title { color: var(--amber); }
.callout--status  .callout__title { color: var(--green); }
.callout--warning .callout__title { color: var(--red); }
.callout__body { font-size: var(--fs-base); line-height: var(--lh-body); }

/* Stats row block */
.stats-row {
  display: flex;
  gap: var(--s6);
  flex-wrap: wrap;
  margin: var(--s6) 0;
  padding: var(--s5) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-value {
  font-family: var(--font-mono);
  font-size: var(--fs-4xl);
  font-weight: 500;
  line-height: var(--lh-data);
  font-variant-numeric: tabular-nums;
}
.stat-unit {
  font-size: var(--fs-md);
  color: var(--accent);
  margin-left: 2px;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: var(--s2);
}

/* Person block — extend existing grid layout */
.person-block {
  margin: var(--s5) 0;
  padding: var(--s5) 0;
  border-top: 1px solid var(--border);
}
.person-block img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
}
.person-name {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-lg);
}
.person-role {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
}
.person-bio { font-size: var(--fs-base); line-height: var(--lh-body); }

/* Partner card block */
.partner-card__logo-wrap {
  height: 56px;
  display: flex;
  align-items: center;
  margin-bottom: var(--s4);
}
.partner-card__logo {
  max-height: 56px;
  max-width: 160px;
  object-fit: contain;
}
.partner-card__name {
  font-weight: 600;
  margin-bottom: var(--s1);
}
.partner-card__desc {
  margin: var(--s2) 0 0;
  line-height: var(--lh-base);
}

/* Section heading block — before-space now comes from the uniform block margin
   above, so it doesn't stack its own top padding (was var(--s7)) into a double
   gap. Keeps the bottom padding to set the heading off its following content;
   the divider rule was dropped (too much decorative line-work in headers). */
.section-heading-block {
  padding: 0 0 var(--s4);
}
.section-heading-block h2 { margin-top: 0; }

/* Coordinates block */
.block-coordinates__label {
  font-size: var(--fs-xs);
  margin-bottom: var(--s3);
}
.block-coordinates__value { font-size: var(--fs-md); line-height: var(--lh-body); }

/* Image caption block */
.block-image { margin: var(--s6) 0; }
.block-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
}
.block-image figcaption {
  font-size: var(--fs-xs);
  margin-top: var(--s2);
  padding-left: 0.25rem;
}

/* Pull quote block */
.pull-quote {
  margin: var(--s6) 0;
  padding: var(--s5) var(--s6);
  border-left: 3px solid var(--accent);
  font-family: var(--font-sans);
  font-size: var(--fs-xl);
  line-height: var(--lh-body);
  color: var(--heading);
  font-style: normal;
}
.pull-quote footer {
  margin-top: var(--s3);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-style: normal;
}

/* Code block */
.code-block { margin: var(--s5) 0; }
.code-block figcaption { font-size: var(--fs-xs); margin-top: var(--s2); }

/* Button block alignment modifiers */
.block-button { margin: var(--s4) 0; }
.block-button--left   { text-align: left; }
.block-button--center { text-align: center; }
.block-button--right  { text-align: right; }

/* Station chart canvas height */
.sci-chart__canvas { height: 220px; }

/* Sensor chart block */
.sensor-chart { margin: var(--s5) 0; }
.sensor-chart__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--s3);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.sensor-chart__period { font-size: var(--fs-xs); color: var(--text-dim); }
.sensor-chart__meta { font-size: var(--fs-xs); color: var(--text-dim); margin-top: var(--s2); }

/* Station live dot — inline usage (inside text/flex context) */
.station-live__dot--inline {
  display: inline-block;
  vertical-align: middle;
  margin-right: var(--s2);
}

/* Station quality colour variants */
.station-card-stat__value--green { color: var(--green); }
.station-card-stat__value--amber { color: var(--amber); }
.station-card-stat__value--red   { color: var(--red); }

/* 404 page search form */
.error-search-form { margin: var(--s6) auto; max-width: 480px; }
.error-search-row { display: flex; gap: var(--s3); }
.error-search-input {
  flex: 1;
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: var(--s3) var(--s4);
  outline: none;
  transition: border-color 0.2s;
  min-width: 0;
}
.error-search-input:focus:not(:focus-visible) { outline: none; }
.error-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.35);
}
.error-search-input::placeholder { color: var(--text-dim); }

/* Generic pagination (search results, data tables) */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s4);
  margin: var(--s7) 0;
  font-family: var(--font-mono);
  font-size: var(--fs-md);
}
.pagination__link {
  color: var(--accent);
  text-decoration: none;
  padding: var(--s2) var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, background 0.15s;
}
.pagination__link:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}
.pagination__info { color: var(--text-muted); }

/* ── Platform Stats Strip (homepage map section) ────────────────────── */
.platform-stats {
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-wrap: wrap;
  margin-top: var(--s5);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.platform-stats[hidden] { display: none; }
.platform-stats__item {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s1);
}
.platform-stats__value {
  color: var(--heading);
  font-weight: 600;
}
.platform-stats__item--since .platform-stats__label { order: -1; }
.platform-stats__sep { opacity: 0.4; }

/* ── Generic dataset/content citation box ───────────────────────────────── */
.cite-section {
  margin-top: var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cite-toggle {
  display: block;
  padding: var(--s2) var(--s3);
  cursor: pointer;
  font-size: var(--fs-md);
  color: var(--text-muted);
  background: var(--surface-2);
  user-select: none;
  list-style: none;
}
.cite-toggle::-webkit-details-marker { display: none; }
.cite-toggle:hover { color: var(--text); }
.cite-content {
  padding: var(--s3);
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.cite-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--s3);
  font-size: var(--fs-xs);
  line-height: var(--lh-body);
  overflow-x: auto;
  white-space: pre;
  color: var(--text-muted);
  margin: 0;
}

/* ── Lab notes feed subscribe row ───────────────────────────────────────── */
.notes-subscribe-row {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) 0 var(--s3);
  flex-wrap: wrap;
}
.feed-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: border-color var(--transition), color var(--transition);
}
.feed-badge:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.feed-badge__icon {
  flex-shrink: 0;
}

/* ── Badge counts (e.g. filter tab "Peer-reviewed 3") ───────────────────── */
.badge-count {
  font-variant-numeric: tabular-nums;
  font-size: 0.7em;
  opacity: 0.7;
}

/* ── Lab notes tag cloud ─────────────────────────────────────────────────── */
.note-tag-cloud {
  padding-top: var(--s6);
  border-top: 1px solid var(--border);
  margin-top: var(--s5);
}
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s4);
}
.tag-cloud__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.tag-cloud__item:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
}
.tag-cloud__item--active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
}
.tag-cloud__count {
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-xs);
  opacity: 0.65;
  font-family: var(--font-mono);
}

/* ── Data page — station card embed snippet ──────────────────────────────── */
.station-embed-details {
  margin-top: var(--s4);
  border-top: 1px solid var(--border);
  padding-top: var(--s3);
}
.station-embed-summary {
  cursor: pointer;
  color: var(--accent);
  font-size: var(--fs-sm);
  font-family: var(--font-mono);
  list-style: none;
  padding: var(--s2) 0;
  user-select: none;
  outline-offset: 3px;
}
.station-embed-summary::-webkit-details-marker { display: none; }
.station-embed-body { padding-top: var(--s3); }
.station-embed-intro {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  margin-bottom: var(--s3);
}
.station-embed-params {
  display: flex;
  gap: var(--s4);
  flex-wrap: wrap;
  margin-bottom: var(--s3);
  align-items: center;
}
.station-embed-params__label {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.station-embed-params select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}
.station-embed-actions {
  display: flex;
  gap: var(--s4);
  align-items: center;
  margin-top: var(--s3);
}
.station-embed-preview-link {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--text-dim);
  text-decoration: none;
}
.station-embed-preview-link:hover { color: var(--accent); }

/* ── Search result query highlighting ───────────────────────────────────── */
mark.search-highlight {
  background: rgba(var(--accent-rgb), 0.2);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0 1px;
}

/* ── Publication detail — programme list ─────────────────────────────────── */
.pub-programme-list {
  list-style: none;
  padding: 0;
  margin: var(--s3) 0 0;
}
.pub-programme-list li {
  padding: var(--s1) 0;
  border-bottom: 1px solid var(--border);
}
.pub-programme-list li:last-child {
  border-bottom: none;
}

/* ── Public status page ──────────────────────────────────────────────────── */
.status-overall {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  margin-top: var(--s3);
}
.status-overall__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-overall__dot--ok    { background: var(--green); box-shadow: 0 0 8px rgba(var(--green-rgb), 0.5); }
.status-overall__dot--warn  { background: var(--amber); box-shadow: 0 0 8px rgba(var(--amber-rgb), 0.4); }
.status-overall__dot--alert { background: var(--red);   box-shadow: 0 0 6px rgba(var(--red-rgb), 0.4); }
.status-overall__dot--unknown { background: var(--border); }

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot--status-ok      { background: var(--green); }
.status-dot--status-warn    { background: var(--amber); }
.status-dot--status-alert   { background: var(--red); }
.status-dot--status-dead    { background: var(--text-dim); }
.status-dot--status-unknown { background: var(--border); }

.status-station-list,
.status-service-list {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  margin-top: var(--s5);
}
.status-station-item,
.status-service-item {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.status-station-item__body {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--s4);
}
.status-station-item__id  { font-size: var(--fs-base); color: var(--accent); }
.status-station-item__name { font-size: var(--fs-md); }
.status-station-item__meta { font-size: var(--fs-xs); width: 100%; }
.status-station-item__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--s1);
}
.status-station-item__age  { font-size: var(--fs-sm); color: var(--text-dim); }
.status-station-item__link { font-size: var(--fs-xs); color: var(--text-dim); text-decoration: none; }
.status-station-item__link:hover { color: var(--accent); }
.status-service-item__name { flex: 1; font-size: var(--fs-base); }
.status-service-item__link { font-size: var(--fs-sm); color: var(--text-dim); text-decoration: none; }
.status-service-item__link:hover { color: var(--accent); }

@media (max-width: 600px) {
  .status-station-item { flex-wrap: wrap; }
  .status-station-item__right { flex-direction: row; align-items: center; gap: var(--s3); width: 100%; }
}

/* ── Publication detail — related content row ────────────────────────────── */
.pub-related-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s8);
}
@media (max-width: 720px) {
  .pub-related-row { grid-template-columns: 1fr; }
}

/* ── Photo Gallery ───────────────────────────────────────────────────────── */

/* Album index grid */
.gallery-album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s5);
  margin-top: var(--s5);
}

.gallery-album-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.gallery-album-card:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  box-shadow: var(--glow-accent);
  transform: translateY(-2px);
  text-decoration: none;
}

.gallery-album-card__cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
}
.gallery-album-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.gallery-album-card:hover .gallery-album-card__img {
  transform: scale(1.03);
}
.gallery-album-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border-light);
}

.gallery-album-card__meta {
  padding: var(--s4) var(--s5);
}
.gallery-album-card__date {
  font-size: var(--fs-xs);
  margin-bottom: var(--s2);
}
.gallery-album-card__location {
  font-size: var(--fs-sm);
  margin-bottom: var(--s2);
}
.gallery-album-card__title {
  font-family: var(--font-sans);
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--s2);
}
.gallery-album-card__count {
  font-size: var(--fs-xs);
}

/* Photo grid (used on album page and embedded block) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-auto-rows: 180px;
  gap: var(--s1);
  margin-top: var(--s5);
}
.gallery-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  grid-auto-rows: 140px;
}

/* Individual photo thumbnail (button) */
.gallery-thumb {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.gallery-thumb__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease, filter 0.25s ease;
}
.gallery-thumb:hover .gallery-thumb__img {
  transform: scale(1.06);
  filter: brightness(1.1);
}
.gallery-thumb__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--s3) var(--s4);
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.9);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  font-family: var(--font-mono);
  line-height: var(--lh-title);
}
.gallery-thumb:hover .gallery-thumb__overlay,
.gallery-thumb:focus .gallery-thumb__overlay {
  opacity: 1;
}
.gallery-thumb:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Lightbox dialog */
.gallery-dialog {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  background: rgba(0,0,0,0.96);
  border: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.gallery-dialog::backdrop {
  background: rgba(0,0,0,0.96);
}
.gallery-dialog[open] {
  display: flex;
}

/* Close button — top-right corner */
.gallery-dialog__close {
  position: absolute;
  top: var(--s4);
  right: var(--s4);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: var(--fs-2xl);
  line-height: var(--lh-data);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  /* Above the full-height prev/next strips, which overlap this corner. */
  z-index: 3;
}
.gallery-dialog__close:hover {
  background: rgba(255,255,255,0.16);
  color: #fff;
}

/* Prev / next — full-height side strips with fade-in chevron */
.gallery-dialog__prev,
.gallery-dialog__next {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0);
  font-size: var(--fs-4xl);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0 var(--s4);
  transition: background 0.2s, color 0.2s;
  z-index: 2;
}
.gallery-dialog__prev { left: 0;  justify-content: flex-start; }
.gallery-dialog__next { right: 0; justify-content: flex-end;   }
.gallery-dialog__prev:hover {
  background: linear-gradient(to right, rgba(0,0,0,0.35), transparent);
  color: rgba(255,255,255,0.85);
}
.gallery-dialog__next:hover {
  background: linear-gradient(to left,  rgba(0,0,0,0.35), transparent);
  color: rgba(255,255,255,0.85);
}

.gallery-dialog__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(88vw, 1200px);
  max-height: 100vh;
  padding: var(--s6) var(--s7);
  box-sizing: border-box;
  pointer-events: none;
}
.gallery-dialog__img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  pointer-events: none;
}
.gallery-dialog__footer {
  margin-top: var(--s4);
  text-align: center;
  width: 100%;
}
.gallery-dialog__caption {
  font-size: var(--fs-md);
  color: rgba(255,255,255,0.65);
  margin: 0 0 var(--s2) 0;
  line-height: var(--lh-body);
}
.gallery-dialog__credit {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.35);
  margin: 0;
}
.gallery-dialog__counter {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.25);
  margin: var(--s2) 0 0 0;
  letter-spacing: 0.08em;
}

/* Embedded gallery block */
.gallery-embed {
  margin: var(--s6) 0;
}
.gallery-embed__heading {
  margin-bottom: var(--s4);
}

/* Album prev/next navigation */
.gallery-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: var(--s7) 0 var(--s6);
  gap: var(--s4);
}
.gallery-pager__btn {
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: var(--s3) var(--s5);
  border-radius: var(--radius);
  transition: border-color 0.2s, background 0.2s;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gallery-pager__btn:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

@media (max-width: 720px) {
  .gallery-album-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); grid-auto-rows: 120px; }
  .gallery-grid--compact { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); grid-auto-rows: 100px; }
  .gallery-pager { flex-direction: column; align-items: stretch; }
  .gallery-pager__btn { max-width: 100%; }
}
@media (max-width: 480px) {
  .gallery-album-grid { grid-template-columns: 1fr; }
}

/* ── Curriculum lesson (/learn/modules/<m>/<a>/) ──────────────────────────────
   Mirrors the IESH on-device portal's lesson scaffold (web/templates/learn/
   activity.html): a reading column of labelled section panels + a sticky
   "at a glance" sidebar, numbered procedure steps, a vocabulary card grid, and
   collapsible worksheet answer guides. Replaces the old flat <h2>+list wall. */
.activity-meta { margin-top: var(--s4); }

.lesson-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  gap: var(--s7);
  align-items: start;
}
.lesson-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s5);
}

/* Lead overview — larger reading text, no panel */
.lesson-overview {
  font-size: var(--fs-xl);
  line-height: var(--lh-body);
  color: var(--text);
  max-width: var(--w-prose);
}

/* Section panel + small uppercase mono label */
.lesson-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s5) var(--s6);
}
.lesson-section__label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0 0 var(--s4);
}
.lesson-section > p:first-of-type { margin-top: 0; }
.lesson-section ul {
  list-style: disc;
  padding-left: var(--s6);
  line-height: var(--lh-body);
}
.lesson-section ul li + li { margin-top: var(--s2); }
.lesson-section ul li::marker { color: var(--accent); }

/* Numbered procedure steps */
.lesson-steps {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  counter-reset: lstep;
}
.lesson-steps li {
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  line-height: var(--lh-body);
  color: var(--text);
}
.lesson-steps li::before {
  counter-increment: lstep;
  content: counter(lstep);
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent-bright);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

/* Discussion questions — numbered, divided rows */
.lesson-dq {
  list-style: none;
  padding-left: 0;
  counter-reset: ldq;
}
.lesson-dq li {
  display: flex;
  gap: var(--s3);
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--border);
  line-height: var(--lh-body);
  color: var(--text);
}
.lesson-dq li:last-child { border-bottom: none; }
.lesson-dq li:first-child { padding-top: 0; }
.lesson-dq li::before {
  counter-increment: ldq;
  content: counter(ldq, decimal-leading-zero);
  flex-shrink: 0;
  min-width: 1.6rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
}

/* Worksheet — bordered Q cards with a collapsible teacher answer guide */
.worksheet-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s4) var(--s5);
}
.worksheet-item + .worksheet-item { margin-top: var(--s3); }
.worksheet-item details summary {
  cursor: pointer;
  color: var(--accent);
  font-size: var(--fs-md);
  margin-top: var(--s3);
}

/* Vocabulary — card grid (was a flat <dl>) */
.vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: var(--s3);
}
.vocab-grid > div,
.vocab-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--s4);
}
.vocab-grid dt {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--heading);
  font-size: var(--fs-md);
  margin-bottom: var(--s1);
}
.vocab-grid dd {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
}

/* Left-rule callouts — Nepal context (green), teacher notes (amber) */
.lesson-callout {
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--s4) var(--s5);
}
.lesson-callout--nepal { border-left-color: var(--green); }
.lesson-callout--teacher { border-left-color: var(--amber); }
.lesson-callout__label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 var(--s2);
  color: var(--text-muted);
}
.lesson-callout--nepal .lesson-callout__label { color: var(--green); }
.lesson-callout--teacher .lesson-callout__label { color: var(--amber); }
.lesson-callout p { margin: 0; line-height: var(--lh-body); color: var(--text); }

/* Sticky "at a glance" sidebar */
.lesson-aside {
  position: sticky;
  top: calc(var(--header-height) + var(--s4));
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}
.lesson-glance {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s5);
}
.lesson-glance__label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0 0 var(--s4);
}
.lesson-glance dl { display: flex; flex-direction: column; gap: var(--s3); margin: 0; }
.lesson-glance dt {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  margin-bottom: 2px;
}
.lesson-glance dd { margin: 0; color: var(--text); font-size: var(--fs-base); }
.lesson-glance dd a { color: var(--accent); }

/* Materials checklist (sidebar) */
.lesson-materials {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin: 0;
}
.lesson-materials li {
  position: relative;
  padding-left: var(--s5);
  color: var(--text);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
}
.lesson-materials li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--accent);
  border-radius: 2px;
}

@media (max-width: 880px) {
  .lesson-layout { grid-template-columns: 1fr; gap: var(--s6); }
  .lesson-aside { position: static; order: -1; }
}

/* ── Print stylesheet (lab notes, publications, research pages) ──────────── */
@media print {
  /* Hide navigation, footer, interactive elements */
  .site-nav, .site-nav-mobile, .site-footer,
  .search-modal, .search-form,
  .note-pagination, .note-pager,
  .pub-cite, .station-embed-details,
  .feed-badge, .notes-subscribe-row,
  .error-search-form, .data-dl-form,
  .embed-snippet-wrap, .embed-copy-btn,
  .station-embed-actions,
  #skip-nav { display: none !important; }

  /* Reset dark background for printing */
  :root {
    --bg: #fff;
    --surface: #f9f9f9;
    --text: #111;
    --text-dim: #555;
    --border: #ccc;
    --accent: #1a5fa8;
  }

  body {
    background: #fff !important;
    color: #111 !important;
    font-size: 11pt;
    line-height: var(--lh-body);
  }

  /* Page hero — simplified for print */
  .page-hero {
    background: none !important;
    border-bottom: 2px solid #111;
    padding: 1rem 0;
    break-after: avoid;
  }
  .page-hero .section__label { color: #555; font-size: 9pt; }
  .page-hero h1 {
  font-size: 18pt; margin: 0.5rem 0; }

  /* Container */
  .container { max-width: none !important; padding: 0 !important; }

  /* Links — show full URLs for print */
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #555;
    word-break: break-all;
  }
  /* Don't show URLs for internal badges/tags */
  .badge a::after, .tag-row a::after, .inst-link-pill::after,
  .note-item a::after, .nav a::after, footer a::after { content: none; }

  /* Lab note content */
  .research-body, .content { max-width: 100% !important; }

  /* Publication cards — simplified */
  .pub-card { border: 1px solid #ccc; break-inside: avoid; }
  .pub-card__title a { color: #111 !important; }
  .pub-card__doi a::after { content: none; }

  /* Charts and canvases — hide (cannot print correctly) */
  canvas { display: none !important; }
  .chart-md, .chart-lg, .chart-xl, .chart-170 { display: none !important; }

  /* Map containers — hide */
  #station-map, .notes-field-map, .note-site-map, #notes-field-map,
  #data-station-map, .sci-map { display: none !important; }

  /* Section breaks */
  .section { break-inside: avoid-page; }

  /* Page numbers (footer) */
  @page {
    size: A4;
    margin: 20mm 15mm 20mm 15mm;
    @bottom-right { content: counter(page) " / " counter(pages); font-size: 9pt; }
    @top-left { content: "HICS — himalayansciences.org"; font-size: 9pt; color: #555; }
  }
}
