/* ── StreamField Block Components ─────────────────────── */

/* Columns block */
.hics-grid-row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -1.25rem;
  margin-left: -1.25rem;
  row-gap: var(--s6);
  margin-top: var(--s6);
  margin-bottom: var(--s6);
}
.hics-grid-col {
  position: relative;
  width: 100%;
  padding-right: 1.25rem;
  padding-left: 1.25rem;
  box-sizing: border-box;
}
@media (min-width: 768px) {
  .hics-grid-col--12 { flex: 0 0 100%; max-width: 100%; }
  .hics-grid-col--9  { flex: 0 0 75%; max-width: 75%; }
  .hics-grid-col--8  { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .hics-grid-col--6  { flex: 0 0 50%; max-width: 50%; }
  .hics-grid-col--4  { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .hics-grid-col--3  { flex: 0 0 25%; max-width: 25%; }
}
@media (max-width: 767px) {
  .hics-grid-col { flex: 0 0 100%; max-width: 100%; margin-bottom: var(--s5); }
  .hics-grid-col:last-child { margin-bottom: 0; }
}

/* Divider block */
.hics-divider {
  border: 0;
  width: 100%;
}
.hics-divider--solid  { border-top: 1.5px solid var(--border); }
.hics-divider--dashed { border-top: 1.5px dashed var(--border); }
.spacing-small  { margin-top: var(--s5); margin-bottom: var(--s5); height: 1.5rem; }
.spacing-medium { margin-top: 3.5rem; margin-bottom: 3.5rem; height: 3.5rem; }
.spacing-large  { margin-top: 7rem;   margin-bottom: 7rem;   height: 7rem; }
.hics-spacer { display: block; width: 100%; }

/* Video block */
.block-video { margin: var(--s6) 0; }
.video-embed-wrapper {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.video-embed-wrapper iframe,
.video-embed-wrapper embed,
.video-embed-wrapper object {
  width: 100% !important;
  aspect-ratio: 16 / 9;
  height: auto !important;
  display: block;
}
.local-video-player {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: block;
}
.hics-video-caption {
  font-size: var(--fs-xs);
  margin-top: var(--s2);
  padding-left: 0.25rem;
}

/* ── Accordion Details ────────────────────────────────── */
.accordion-item[open] summary span {
  transform: rotate(90deg);
}
.accordion-item summary span {
  transition: transform 0.2s;
  display: inline-block;
}

/* ── Contact Cards ─────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s5);
}
.contact-card {
  display: block;
  padding: var(--s5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.contact-card:hover {
  border-color: rgba(var(--accent-rgb),0.30);
  background: var(--surface-2);
}
.contact-card__icon {
  margin-bottom: var(--s4);
}
.contact-card__label {
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--text);
  margin-bottom: var(--s2);
}
.contact-card__text {
  color: var(--text-muted);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  margin-bottom: var(--s4);
}
.contact-card__cta {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--accent);
}
.card-inline-email {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.card-inline-email:hover {
  color: var(--text) !important;
}

/* ── Contact Form Styling ──────────────────────────────── */
.contact-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s6);
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin-bottom: var(--s5);
}
.form-group:last-of-type {
  margin-bottom: var(--s6);
}
.form-group label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea,
.form-group select {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--s3) var(--s4);
  transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
  outline: none;
  width: 100%;
}
.form-group textarea {
  resize: vertical;
  line-height: var(--lh-body);
}
.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.35);
  background: var(--surface-2);
}
.select-wrapper {
  position: relative;
}
.select-wrapper::after {
  content: "";
  position: absolute;
  right: var(--s4);
  top: 50%;
  transform: translateY(-50%);
  border: 4px solid transparent;
  border-top-color: var(--text-muted);
  pointer-events: none;
}
.form-group select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: var(--s6);
}
/* ── Contact layout (form-first, with a topic aside) ───── */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: var(--s7);
  align-items: start;
}
.contact-aside {
  display: flex;
  flex-direction: column;
  gap: var(--s6);
  position: sticky;
  top: var(--s6);
}
.contact-aside__block .section__label {
  margin-bottom: var(--s3);
}
.contact-topics {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: 0;
  margin: var(--s4) 0 0;
}
.contact-topic {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s4);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.contact-topic:hover,
.contact-topic:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.30);
  background: var(--surface-2);
  outline: none;
}
.contact-topic__label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--text);
}
.contact-topic__desc {
  display: block;
  margin-top: var(--s2);
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
  color: var(--text-muted);
}
.contact-enquiry-chip {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s3);
  margin-bottom: var(--s5);
  padding: var(--s2) var(--s4);
  border-left: 3px solid var(--accent);
  background: linear-gradient(90deg, rgba(var(--accent-rgb),0.12) 0%, transparent 90%);
  border-radius: var(--radius-sm);
}
.contact-enquiry-chip__label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.contact-enquiry-chip__value {
  font-size: var(--fs-md);
  color: var(--text);
}

/* ── Button Components ───────────────────────────────────── */
/* Button system — used by StreamField ButtonBlock (class="btn btn-primary"),
   and by .btn-primary / .btn-accent / .btn-outline standalone in templates.
   The shared geometry is applied to the variant classes directly (not only to
   .btn) so a button works with or without the .btn base class. Variants below
   set colour only, so an amber and a blue button standing side by side match
   in every respect but hue. */
.btn,
.btn-primary,
.btn-accent,
.btn-outline,
.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: var(--s3) var(--s5);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: var(--fs-sm);
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s, color 0.2s;
  cursor: pointer;
}
.btn:hover,
.btn-primary:hover,
.btn-accent:hover,
.btn-outline:hover,
.btn-submit:hover {
  text-decoration: none;
}
/* Keyboard focus — a visible ring on every button (none existed before). */
.btn:focus-visible,
.btn-primary:focus-visible,
.btn-accent:focus-visible,
.btn-outline:focus-visible,
.btn-submit:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}
/* A filled button (ButtonBlock) renders as <a class="btn …"> inside .content,
   where the content link-hover rule (.content a:hover) repaints the label
   bluish (--accent-bright) — unreadable on the amber or blue fill. Pin the
   dark label through hover. The .content-scoped selectors (0,3,1) strictly
   outrank .content a:hover (0,2,1) regardless of partial load order; the bare
   ones cover filled buttons used outside .content. Outline buttons are left
   bluish on purpose — that reads fine on the dark fill. */
.content a.btn-accent:hover,
.content a.btn-primary:hover,
a.btn-accent:hover,
a.btn-primary:hover {
  color: var(--bg);
}
.btn:active {
  transform: translateY(0);
}

/* Amber / highlight variant — dark label on amber (≈9:1) */
.btn-accent {
  background: var(--amber);
  color: var(--bg);
  border-color: var(--amber);
}
.btn-accent:hover {
  background: var(--amber-bright);
  border-color: var(--amber-bright);
  box-shadow: var(--glow-amber);
  transform: translateY(-1px);
  color: var(--bg);
}

/* Primary button — solid accent fill, dark label (≈6.4:1; white would fail) */
.btn-primary {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  box-shadow: var(--glow-accent);
  transform: translateY(-1px);
  color: var(--bg);
}

/* Outline button — secondary actions (PDF downloads, open-access links) */
.btn-outline {
  font-weight: 500;
  color: var(--accent);
  background: transparent;
  border-color: rgba(var(--accent-rgb), 0.35);
  padding: var(--s2) var(--s4);
}
.btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent-bright);
  transform: translateY(-1px);
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s3);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--bg);
  background: var(--text);
  border: none;
  border-radius: var(--radius-sm);
  padding: var(--s3) var(--s5);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.btn-submit:hover {
  background: var(--accent);
  color: var(--bg);
}
.btn-submit:active {
  transform: translateY(1px);
}
.form-success-card {
  text-align: center;
  padding: var(--s5) var(--s2);
}
.form-success-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
/* Accessible hide — visually hidden but screen-reader visible */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Ensure last real form-group before button gets correct spacing */
.form-group + .visually-hidden + .btn-submit {
  margin-top: var(--s5);
}

.form-error-alert {
  padding: var(--s4);
  background: var(--red-dim);
  border: 1px solid rgba(var(--red-rgb),0.25);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
}

/* ── Tablet breakpoint (768–900px) ─────────────────────── */
@media (max-width: 900px) {
  .grid-3col {
    grid-template-columns: 1fr 1fr;
  }
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Responsive ─────────────────────────────────────────── */
/* ── Responsive grid helpers — used in templates to replace inline grid styles ── */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s5);
}
.grid-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--s5);
}
.card-grid--2col {
  grid-template-columns: repeat(2, 1fr);
}


@media (max-width: 700px) {
  .site-nav-desktop {
    display: none;
  }
  .station-live {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  .note-item {
    grid-template-columns: 1fr;
    gap: var(--s2);
  }
  .data-widget__readings {
    gap: var(--s5);
  }
  .reading__value {
    font-size: var(--fs-3xl);
  }
  .site-footer__inner {
    grid-template-columns: 1fr;
  }
  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s3);
  }
  .cta-grid {
    grid-template-columns: 1fr;
  }
  .map-wrap {
    height: 280px;
  }
  .pipeline-item {
    font-size: var(--fs-sm);
  }
  /* About page + homepage grids → single column on mobile */
  .two-col,
  .vision-grid,
  .domain-grid,
  .principles-grid,
  .contact-grid,
  .contact-layout,
  .partner-grid {
    grid-template-columns: 1fr;
  }
  /* Aside drops below the form on mobile — no sticky. */
  .contact-aside {
    position: static;
  }
  .gap-panel {
    flex-direction: column;
    gap: var(--s4);
    padding: var(--s5);
  }
  .founder-card {
    grid-template-columns: 100px 1fr;
    gap: var(--s4);
  }
  .domain-card__letter {
    font-size: var(--fs-2xl);
  }
  .section-alt {
    padding: var(--s6) 0;
  }
  /* Image blocks */
  .block-image--small {
    max-width: 100%;
  }
  /* Footer nav 2-col → 1-col */
  .site-footer__nav-links {
    grid-template-columns: 1fr;
  }
  /* Responsive grid helpers → single column */
  .grid-2col,
  .grid-3col,
  .card-grid--2col {
    grid-template-columns: 1fr;
  }
  /* Hero height: don't lock mobile to 80vh */
  .hero {
    min-height: 0;
    padding: clamp(3rem, 8vh, 5rem) 0 clamp(2.5rem, 6vh, 4rem);
  }
  /* Page hero: tighten padding */
  .page-hero {
    min-height: 0;
  }
  /* Nepal map: shrink on mobile so it doesn't dominate */
  .page-hero--map {
    background-size: auto, 80% auto, auto;
    background-position: center, center bottom, center;
  }
  /* Home hero: reduce SVG on mobile, drop to bottom so text stays clear */
  .hero {
    background-size: auto, auto, 90% auto, auto;
    background-position: center, center, center bottom, center;
  }
  /* Ensure canvas charts never overflow their container */
  canvas {
    max-width: 100% !important;
  }
  /* Data widget station name + status bar */
  .data-widget__header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s2);
  }
  /* Station list page spacing */
  .station-card {
    padding: var(--s4);
  }
  /* Publications listing */
  .publication-row {
    flex-direction: column;
    gap: var(--s2);
  }
}

/* ── Custom Cursor ───────────────────────────────────────── */
/* Shown on all pointer-capable (non-touch) devices. Under reduced-motion the
   custom cursor still renders, but the trailing/easing is removed below so it
   snaps to the pointer instead of animating — honouring the motion preference
   without falling back to the plain native cursor. */
@media (pointer: fine) {
  /* Hide the native cursor only once main.js confirms the custom cursor is
     live (it adds .has-cursor to <html>). If the script is blocked or errors,
     the native cursor stays — no "invisible pointer" failure mode. */
  html.has-cursor body,
  html.has-cursor body * {
    cursor: none !important;
  }

  /* Custom cursor elements stay hidden until activated by JS */
  .cursor-dot,
  .cursor-ring { display: none; }
  html.has-cursor .cursor-dot,
  html.has-cursor .cursor-ring { display: block; }

  .cursor-dot {
    position: fixed;
    top: 0; left: 0;
    width: 5px; height: 5px;
    background: var(--accent-bright);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: background 0.15s, transform 0.08s;
    will-change: transform;
  }

  .cursor-ring {
    position: fixed;
    top: 0; left: 0;
    width: 26px; height: 26px;
    border: 1.5px solid rgba(var(--accent-rgb),0.55);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, border-color 0.2s, background 0.2s;
    will-change: transform;
  }

  /* Hover state — ring expands over clickable elements */
  .cursor-ring.is-hovering {
    width: 40px;
    height: 40px;
    border-color: rgba(var(--accent-rgb),0.30);
    background: rgba(var(--accent-rgb),0.06);
  }

  /* Press state */
  .cursor-dot.is-clicking {
    transform: translate(-50%, -50%) scale(0.6);
    background: var(--teal);
  }
}

/* Reduced-motion: keep the custom cursor but remove easing so it snaps to the
   pointer (the JS also drops the ring lerp — see main.js). */
@media (pointer: fine) and (prefers-reduced-motion: reduce) {
  .cursor-dot,
  .cursor-ring {
    transition: none;
  }
}

/* ── Page-load staggered reveal ──────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero__title    { animation: fade-up 0.5s ease both; animation-delay: 0.05s; }
.hero__tagline  { animation: fade-up 0.5s ease both; animation-delay: 0.15s; }
.hero__mission  { animation: fade-up 0.5s ease both; animation-delay: 0.28s; }
.hero__links    { animation: fade-up 0.5s ease both; animation-delay: 0.42s; }

/* ── Premium CMS Table Styling ───────────────────────────── */
.responsive-table-container {
  width: 100%;
  overflow-x: auto;
  margin: var(--s6) 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.responsive-table-container table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  color: var(--text);
}

.responsive-table-container th {
  background: var(--surface-2);
  color: var(--accent);
  font-weight: 600;
  text-align: left;
  padding: var(--s3) var(--s4);
  border-bottom: 2px solid var(--border);
  text-transform: uppercase;
  font-size: var(--fs-xs);
  letter-spacing: 0.05em;
}

.responsive-table-container td {
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}

.responsive-table-container tr:last-child td {
  border-bottom: none;
}

.responsive-table-container tr:hover td {
  background: rgba(var(--accent-rgb),0.04);
}

/* ── Premium Education Hub Resources Layouts ────────────────── */

/* A. Syllabus/Curriculum Track */
.syllabus-track {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  margin-top: var(--s4);
}
.syllabus-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: start;
  gap: var(--s5);
  padding: var(--s5) var(--s6);
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.syllabus-item:hover {
  transform: translateX(4px);
  border-color: rgba(var(--accent-rgb),0.40);
}
.syllabus-item__grade {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--surface-2);
  padding: var(--s1) var(--s3);
  border-radius: var(--radius-sm);
  text-align: center;
  border: 1px solid var(--border);
}
.syllabus-item__title {
  margin: 0 0 var(--s2) 0;
  font-size: var(--fs-xl);
  color: var(--heading);
}
.syllabus-item__desc {
  margin: 0;
  font-size: var(--fs-base);
  color: var(--text-muted);
  line-height: var(--lh-body);
}
.syllabus-item__instrument {
  display: inline-block;
  margin-top: var(--s3);
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

/* B. Premium Lab Build Guides Grid */
.build-guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s5);
  margin-top: var(--s4);
}
.build-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--s5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  text-decoration: none !important;
}
.build-card:hover {
  transform: translateY(-4px);
  border-color: var(--teal);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}
.build-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--s4);
}
.build-card__difficulty {
  font-size: var(--fs-xs);
  padding: 2px 8px !important;
}
.build-card__cost {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.build-card__title {
  margin: 0 0 var(--s2) 0;
  font-size: var(--fs-xl);
  color: var(--heading);
}
.build-card__desc {
  margin: 0 0 var(--s4) 0;
  font-size: var(--fs-base);
  color: var(--text-muted);
  line-height: var(--lh-body);
  flex-grow: 1;
}
.build-card__action {
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--teal);
  transition: color 0.15s ease;
}
.build-card:hover .build-card__action {
  color: var(--accent-bright);
}

/* C. Developer Jupyter Notebook Directory */
.notebook-directory {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  margin-top: var(--s4);
  box-shadow: var(--shadow-sm);
}
.notebook-item {
  display: grid;
  grid-template-columns: var(--s8) 1fr 120px;
  align-items: center;
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
  text-decoration: none !important;
}
.notebook-item:last-child {
  border-bottom: none;
}
.notebook-item:hover {
  background: var(--surface-2);
}
.notebook-item__icon {
  font-size: var(--fs-2xl);
  color: var(--accent);
}
.notebook-item__name {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--heading);
}
.notebook-item__desc {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-top: 2px;
}
.notebook-item__meta {
  text-align: right;
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

@media (max-width: 700px) {
  .syllabus-item {
    grid-template-columns: 1fr;
    gap: var(--s3);
  }
  .notebook-item {
    grid-template-columns: var(--s8) 1fr;
    gap: var(--s2);
  }
  .notebook-item__meta {
    display: none;
  }
}

/* ── Accessibility Standards Helpers ─────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Focus indicators ────────────────────────────────────
   Global rule covers most elements. The more-specific block
   below restores the outline on inputs that suppress it via
   outline:none so keyboard users always have a visible cue. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[role="button"]:focus-visible,
[role="menuitem"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.form-group input[type="text"]:focus-visible,
.form-group input[type="email"]:focus-visible,
.form-group textarea:focus-visible,
.form-group select:focus-visible,
.search-input:focus-visible,
.search-modal__input:focus-visible,
.data-dl-form__input:focus-visible,
.error-search-input:focus-visible,
.footer-nl__input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* ── Touch targets — minimum 24 × 24px (WCAG 2.5.8 AA) ── */
a.lang-btn {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 0;
}
a.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}
.mobile-nav__lang-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: var(--s2) 0;
}

/* ── Skip Navigation ── */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--accent);
  color: var(--bg);
  padding: var(--s3) var(--s5);
  z-index: 9999;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: var(--fs-md);
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-nav:focus {
  top: 0;
}

/* ── Reduced Motion ── */
/* ── Person StreamField block ──────────────────────────── */
.person-block {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--s5);
  align-items: start;
}
@media (max-width: 700px) {
  .person-block {
    grid-template-columns: 80px 1fr;
    gap: var(--s3);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  /* cursor-dot / cursor-ring: intentionally NOT hidden here — under reduced-motion
     the cursor still renders but snaps to the pointer (no lerp, no transitions).
     See the (pointer: fine) and (prefers-reduced-motion: reduce) block above. */
  .pulse-ring { animation: none; }
}

/* ── Footer Newsletter Form ─────────────────────────────── */
.footer-nl {
  margin-top: var(--s5);
}
.footer-nl__heading {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: var(--s3);
}
.footer-nl__form {
  display: flex;
  gap: var(--s2);
}
.footer-nl__input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: var(--s1) var(--s3);
  font-size: var(--fs-sm);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  transition: border-color 0.2s;
}
.footer-nl__input:focus:not(:focus-visible) {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.35);
}
.footer-nl__btn {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: var(--s1) var(--s3);
  font-size: var(--fs-sm);
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font-mono);
  transition: background 0.2s;
}
.footer-nl__btn:hover {
  background: var(--accent-bright);
}
.footer-nl__note {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  margin-top: var(--s2);
  line-height: var(--lh-body);
  margin-bottom: 0;
}

/* ── Team Grid and Cards ── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s5);
  margin-top: var(--s5);
}

.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s5);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.team-card:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  background: var(--grad-card-hover);
  box-shadow: var(--glow-accent);
  transform: translateY(-2px);
  text-decoration: none;
}

.team-card__image-container {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: var(--s4);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.team-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.team-card:hover .team-card__image {
  transform: scale(1.03);
}

.team-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--text-muted);
}

.team-card__role {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--amber);
  margin-bottom: var(--s2);
}

.team-card__name {
  font-family: var(--font-mono);
  font-size: var(--fs-xl);
  font-weight: 500;
  color: var(--heading);
  margin: 0 0 var(--s2) 0;
}

.team-card__bio-snippet {
  font-size: var(--fs-base);
  color: var(--text-muted);
  line-height: var(--lh-body);
  margin-top: 0;
  flex-grow: 1;
}

.team-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s4);
}

/* ── Research programme team mini-cards ────────────────────────────────── */
.prog-team-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  margin-top: var(--s4);
}
.prog-team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  padding: var(--s4);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  width: 7rem;
  text-align: center;
  transition: border-color 0.15s;
}
.prog-team-card:hover { border-color: var(--accent); }
.prog-team-card:hover .prog-team-card__name { color: var(--accent); }
.prog-team-card__avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  object-fit: cover;
}
.prog-team-card__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-2xl);
}
.prog-team-card__name {
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: var(--lh-title);
}
.prog-team-card__role {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-title);
}

/* ── Team Member Profile Page ── */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s6);
  margin: var(--s6) 0;
  align-items: start;
}

@media (min-width: 768px) {
  .profile-grid {
    grid-template-columns: 1fr 2fr;
    gap: var(--s7);
  }
}

.profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--s5);
}

.profile-photo-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.profile-photo {
  width: 100%;
  display: block;
}

.profile-contact-list {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.profile-contact-link {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.profile-contact-link:hover {
  color: var(--text);
  text-decoration: none;
}

.profile-contact-link svg {
  color: var(--accent);
}

.profile-section-title {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: var(--s3);
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--s2);
}

/* ── Breadcrumb links in section labels ─────────────────── */
.section__label a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}
.section__label a:hover {
  color: var(--text);
  text-decoration: none;
}

/* ── Sub-navigation ─────────────────────────────────────── */
.sub-nav-container {
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s6);
}
.sub-nav {
  display: flex;
  gap: var(--s5);
  overflow-x: auto;
  scrollbar-width: none; /* Hide scrollbar Firefox */
  padding: 0;
  margin: 0;
}
.sub-nav::-webkit-scrollbar {
  display: none; /* Hide scrollbar Chrome/Safari */
}
.sub-nav a {
  display: inline-block;
  padding: 0.875rem 0;
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--fs-base);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.sub-nav a:hover {
  color: var(--accent);
}
.sub-nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}


/* ── Scientific / research StreamField blocks ──────────────────────────────── */

/* Equations (KaTeX) */
.equation {
  margin: var(--s5) 0;
  padding: var(--s4) var(--s5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
}
.equation__math {
  text-align: center;
  color: var(--text);
}
.equation__caption {
  margin-top: var(--s3);
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* Data-gap stat grid */
.stat-grid {
  display: grid;
  gap: var(--s4);
  margin: var(--s4) 0 var(--s6);
}
.stat-grid--2col { grid-template-columns: repeat(2, 1fr); }
.stat-grid--3col { grid-template-columns: repeat(3, 1fr); }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--s5);
}
.stat-card__value {
  font-size: 2.4rem;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: var(--lh-data);
}
.stat-card__value--red { color: var(--red); }
.stat-card__value--amber { color: var(--amber); }
.stat-card__value--green { color: var(--green); }
.stat-card__value--accent { color: var(--accent); }
.stat-card__unit {
  font-size: var(--fs-xl);
  margin-left: 0.15em;
  opacity: 0.8;
}
.stat-card__label {
  font-size: var(--fs-md);
  color: var(--text-muted);
  margin-top: var(--s2);
}
.stat-card__sublabel {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  margin-top: var(--s2);
}

/* Scientific figure */
.sci-figure {
  margin: var(--s5) auto;
}
.sci-figure--full { max-width: 100%; }
.sci-figure--content { max-width: var(--w-prose); }
.sci-figure--small { max-width: 420px; }
.sci-figure__img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: block;
}
.sci-figure__caption {
  margin-top: var(--s3);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-body);
}
.sci-figure__source { color: var(--text-dim); }
.sci-figure__source a { color: var(--accent); font-family: var(--font-mono); font-size: var(--fs-xs); }

/* Charts & maps in body */
.sci-chart { margin: var(--s5) 0; padding: var(--s5); }
.sci-chart__caption {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-top: var(--s3);
  line-height: var(--lh-body);
}
.sci-chart__note {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  margin-top: var(--s2);
}
.sci-map {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: var(--s4) 0 var(--s3);
}

@media (max-width: 700px) {
  .stat-grid--2col,
  .stat-grid--3col { grid-template-columns: 1fr; }
  .stat-card__value { font-size: var(--fs-4xl); }
}

/* ── Status list (active rows + planned/other grid) ─────────────────────────
   Shared by the research index and the instrument index. Entity-neutral. */

.status-list {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}
.status-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s5);
  padding: var(--s5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.status-row:hover {
  border-color: var(--accent);
  border-left-color: var(--accent);
  transform: translateX(3px);
}
.status-row--active { border-left-color: var(--green); }
.status-row--paused { border-left-color: var(--amber); }
.status-row--building { border-left-color: var(--amber); }
.status-row--retired { border-left-color: var(--text-dim); }
.status-row__type {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--s2);
}
.status-row__title {
  font-size: 1.35rem;
  color: var(--heading);
  margin: 0 0 var(--s3);
  line-height: var(--lh-display);
}
.status-row__summary {
  color: var(--text-muted);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  max-width: var(--w-prose);
  margin: 0;
}
.status-row__aside {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--s3);
}
.status-row__explore {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--accent);
  white-space: nowrap;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--s4);
}
.status-card {
  display: block;
  padding: var(--s4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.status-card:hover {
  border-color: rgba(var(--accent-rgb), 0.5);
  background: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.status-card:hover .status-card__title { color: var(--accent-bright); }
.status-card__top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: var(--s2);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  background: var(--text-dim);
}
.status-dot--planned { background: var(--text-muted); }
.status-dot--paused { background: var(--amber); }
.status-dot--building { background: var(--amber); }
.status-dot--testing { background: var(--amber); }
.status-dot--retired { background: var(--text-dim); }
.status-dot--active { background: var(--green); }
.status-card__type {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}
.status-card__title {
  font-weight: 600;
  color: var(--heading);
  margin-bottom: var(--s2);
  line-height: var(--lh-title);
}
.status-card__summary {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-body);
  margin: 0 0 var(--s3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.status-card__status {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (max-width: 640px) {
  .status-row {
    flex-direction: column;
    gap: var(--s4);
  }
  .status-row__aside {
    flex-direction: row;
    align-items: center;
    gap: var(--s4);
  }
}

/* Equal-area SVG map (Equal Earth) */
.sci-map--geo {
  display: block;
  width: 100%;
  background: #0b1018;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: var(--s4) 0 var(--s3);
}

/* ── Leaflet UI themed to the HICS dark design system ───────────────────────── */

.leaflet-container {
  background: #0b1018;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}
.sci-map, .leaflet-container { max-width: 100%; }

/* Zoom + bar controls */
.leaflet-bar {
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.leaflet-bar a,
.leaflet-touch .leaflet-bar a {
  background: var(--surface);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  width: 28px;
  height: 28px;
  line-height: 28px;
}
.leaflet-bar a:hover {
  background: #161c2b;
  color: var(--accent);
}
.leaflet-bar a.leaflet-disabled {
  background: var(--surface);
  color: var(--text-dim);
}

/* Attribution + scale */
.leaflet-control-attribution {
  background: rgba(13, 15, 20, 0.78) !important;
  color: var(--text-dim) !important;
  font-size: 0.58rem;
  padding: 1px 6px;
  border-top-left-radius: 4px;
}
.leaflet-control-attribution a { color: var(--text-muted) !important; }
.leaflet-control-scale-line {
  background: rgba(13, 15, 20, 0.6);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-top: none;
  font-size: 0.58rem;
}

/* Popups */
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55);
}
.leaflet-popup-content-wrapper { border-radius: var(--radius-sm); }
.leaflet-popup-tip { border-top: none; border-left: none; }
.leaflet-popup-content {
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
  color: var(--text-muted);
  margin: 10px 12px;
}
.leaflet-popup-content strong { color: var(--text); }
.leaflet-container a.leaflet-popup-close-button { color: var(--text-dim); }
.leaflet-container a.leaflet-popup-close-button:hover { color: var(--accent); }

/* Tooltips */
.leaflet-tooltip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}
.leaflet-tooltip-top::before { border-top-color: var(--border); }
.leaflet-tooltip-bottom::before { border-bottom-color: var(--border); }
.leaflet-tooltip-left::before { border-left-color: var(--border); }
.leaflet-tooltip-right::before { border-right-color: var(--border); }

/* ── Research / instrument body: prose readable, visuals full width ─────────── */
/* The body keeps .content prose styling (links, lists) but is NOT capped to the
   reading column — instead, prose blocks are capped and data-viz blocks span the
   full container width. Wagtail wraps each block in .block-<type>. */
.research-body.content { max-width: none; }
.research-body > .block-text,
.research-body > .block-section_heading,
.research-body > .block-callout,
.research-body > .block-pull_quote,
.research-body > .block-accordion,
.research-body > .block-equation,
.research-body > .block-coordinates,
.research-body > .block-code {
  max-width: var(--content-width);
}
/* stat grids, charts, maps, figures, plots, tables fill the full width */
.research-body > .block-stat_grid,
.research-body > .block-data_plot,
.research-body > .block-station_chart,
.research-body > .block-sensor_chart,
.research-body > .block-map,
.research-body > .block-figure,
.research-body > .block-table,
.research-body > .block-columns {
  max-width: 100%;
}

/* Vertical rhythm between body blocks. StreamField wraps each block in
   .block-<type>; previously only section_heading carried its own spacing, so
   stat grids, charts, maps, etc. crammed against the preceding paragraph (the
   reported "02 THE DATA GAP" gap). Give a uniform 48px gap before each block;
   the block after a heading hugs it (24px) so headings stay attached to their
   content. Targets .content so it covers both .research-body and plain bodies. */
.content > [class*="block-"] + [class*="block-"] {
  margin-top: var(--s6);
}
/* A new section heading opens a clear break from the previous section's content;
   its own body then hugs it. Differentiated rhythm: big gap BEFORE a section,
   small gap TITLE→body — so sections read as separated, not one flat stack. */
.content > [class*="block-"] + .block-section_heading {
  margin-top: var(--s8);
}
.content > .block-section_heading + [class*="block-"] {
  margin-top: var(--s4);
}

/* Prose lists — the global reset zeroes list padding/margin, so body lists had
   no indent, clipped markers, and items crammed together. Restore indent,
   markers, and one-step spacing between items so lists actually read as lists. */
.content ul, .content ol,
.research-body ul, .research-body ol {
  padding-left: var(--s6);
  margin-top: var(--s4);
  line-height: var(--lh-body);
}
.content ul, .research-body ul { list-style: disc; }
.content ol, .research-body ol { list-style: decimal; }
.content li + li, .research-body li + li { margin-top: var(--s2); }
.content li::marker, .research-body li::marker { color: var(--accent); }

/* ── Site Search ─────────────────────────────────────────────────────────────── */

.nav-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.nav-search-btn:hover {
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}

.search-form {
  max-width: 640px;
  margin: var(--s6) 0 var(--s7);
}
.search-input-row {
  display: flex;
  gap: var(--s3);
}
.search-input {
  flex: 1;
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  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, box-shadow 0.2s;
  min-width: 0;
}
.search-input:focus:not(:focus-visible) { outline: none; }
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.35);
}
.search-input::placeholder {
  color: var(--text-dim);
}
.search-btn {
  flex-shrink: 0;
}

.search-facets {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-bottom: var(--s5);
}
.search-meta {
  font-size: var(--fs-md);
  color: var(--text-muted);
  margin-bottom: var(--s5);
  font-family: var(--font-mono);
}
.search-meta strong {
  color: var(--text);
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}
.search-result {
  padding: var(--s5);
  background: var(--surface-2);
  border-radius: var(--radius);
  border-left: 3px solid var(--border-light);
  transition: border-color 0.2s;
}
.search-result:hover {
  border-left-color: var(--accent);
}
.search-result__meta {
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-wrap: wrap;
  margin-bottom: var(--s2);
}
.search-result__type {
  font-size: var(--fs-xs);
  flex-shrink: 0;
}
.search-result__title {
  font-size: var(--fs-xl);
  font-weight: 600;
  color: var(--heading);
  text-decoration: none;
}
.search-result__title:hover {
  color: var(--accent-bright);
}
.search-result__excerpt {
  font-size: var(--fs-base);
  color: var(--text-muted);
  margin: var(--s2) 0;
  line-height: var(--lh-body);
}
.search-result__context {
  font-size: var(--fs-xs);
  margin-top: var(--s2);
}
.search-result__url {
  font-size: var(--fs-xs);
  margin-top: var(--s1);
}

.search-no-results {
  padding: var(--s6) 0;
}
.search-pub-results {
  margin-top: var(--s7);
  border-top: 1px solid var(--border-light);
  padding-top: var(--s5);
}
.search-pub-results__heading {
  margin-bottom: var(--s4);
}
.search-suggestions {
  list-style: disc;
  padding-left: 1.5rem;
  margin-top: var(--s4);
  line-height: var(--lh-body);
}
.search-suggestions a {
  color: var(--accent);
}

.search-empty-state {
  padding: var(--s6) 0;
}
.search-shortcuts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
  margin-top: var(--s4);
}
.search-container {
  margin-bottom: var(--s9);
}

