/* research-hubs.css — shared, dependency-free presentation for the 42 UK research hubs */

:root {
  --research-bg: #080b0d;
  --research-panel: #101519;
  --research-panel-2: #141c20;
  --research-text: #eaffef;
  --research-muted: #a6c4b1;
  --research-accent: #00ff99;
  --research-accent-2: #5de4ff;
  --research-warn: #ffd166;
  --research-border: #25342b;
  --research-danger: #ff7a9f;
}

html { scroll-behavior: smooth; }

body.research-page {
  margin: 0;
  color: var(--research-text);
  background:
    radial-gradient(circle at 12% 0, rgba(0, 255, 153, 0.08), transparent 32rem),
    var(--research-bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

.research-page a { color: #8ff4cf; }
.research-page a:hover { color: #c5ffe9; }
.research-page code,
.research-page pre { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

.skip-link {
  position: absolute;
  top: -5rem;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1rem;
  color: #00140c;
  background: var(--research-accent);
  border-radius: 0.5rem;
  font-weight: 800;
}

.skip-link:focus { top: 1rem; }

.research-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--research-border);
  background: rgba(8, 11, 13, 0.94);
  backdrop-filter: blur(10px);
}

.research-wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.research-nav {
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.research-brand {
  color: var(--research-accent) !important;
  text-decoration: none;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.research-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1rem;
}

.research-menu a {
  color: var(--research-muted);
  text-decoration: none;
  font-size: 0.92rem;
}

.research-menu a[aria-current="page"] { color: var(--research-text); }

.research-hero {
  padding: clamp(3.5rem, 8vw, 7rem) 0 3.5rem;
  border-bottom: 1px solid var(--research-border);
}

.research-kicker {
  color: var(--research-accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font: 800 0.78rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.research-hero h1 {
  max-width: 17ch;
  margin: 0.75rem 0 1.25rem;
  font-size: clamp(2.3rem, 7vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.research-lede {
  max-width: 76ch;
  color: var(--research-muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.research-meta,
.research-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.research-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.3rem 0.7rem;
  color: var(--research-muted);
  border: 1px solid var(--research-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  font: 650 0.78rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.research-chip.verified { color: #7bffc5; border-color: rgba(0, 255, 153, 0.35); }
.research-chip.pending { color: var(--research-warn); border-color: rgba(255, 209, 102, 0.4); }

.research-button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--research-border);
  border-radius: 0.65rem;
  color: var(--research-text) !important;
  text-decoration: none;
  font-weight: 750;
}

.research-button.primary {
  color: #00140c !important;
  background: var(--research-accent);
  border-color: var(--research-accent);
}

.research-main { padding: 2rem 0 5rem; }

.research-breadcrumbs {
  margin: 0 0 2rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  color: var(--research-muted);
  font-size: 0.9rem;
}

.research-breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.4rem;
  color: #597064;
}

.research-toc,
.research-callout,
.research-card {
  border: 1px solid var(--research-border);
  border-radius: 0.85rem;
  background: linear-gradient(145deg, rgba(20, 28, 32, 0.96), rgba(13, 18, 21, 0.96));
}

.research-toc { padding: 1.25rem; margin-bottom: 2.5rem; }
.research-toc strong { display: block; margin-bottom: 0.5rem; }
.research-toc ol { margin: 0; padding-left: 1.25rem; columns: 2; }
.research-toc li { margin: 0.35rem 1rem 0.35rem 0; break-inside: avoid; }

.research-section {
  padding-top: 2.5rem;
  scroll-margin-top: 5rem;
}

.research-section h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.65rem, 4vw, 2.55rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.research-section h3 { margin: 1.5rem 0 0.5rem; line-height: 1.2; }
.research-section > p:first-of-type { max-width: 78ch; color: var(--research-muted); }

.research-callout {
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  border-left: 0.28rem solid var(--research-accent-2);
}

.research-callout.warning { border-left-color: var(--research-warn); }
.research-callout strong { color: var(--research-text); }
.research-callout p { margin: 0.35rem 0; }

.research-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.research-card { grid-column: span 4; padding: 1.1rem; }
.research-card.wide { grid-column: span 6; }
.research-card h3 { margin-top: 0; }
.research-card p:last-child { margin-bottom: 0; }
.research-card .status { color: var(--research-accent); font: 700 0.78rem ui-monospace, monospace; }

.research-table-wrap {
  margin: 1.25rem 0;
  overflow-x: auto;
  border: 1px solid var(--research-border);
  border-radius: 0.8rem;
}

.research-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: rgba(10, 14, 16, 0.75);
}

.research-table th,
.research-table td {
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--research-border);
  text-align: left;
  vertical-align: top;
}

.research-table th {
  color: #baffdf;
  background: #11191c;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.research-table tr:last-child td { border-bottom: 0; }

.research-status {
  white-space: nowrap;
  color: var(--research-accent);
  font: 750 0.78rem ui-monospace, monospace;
}

.research-status.draft { color: var(--research-warn); }
.research-status.blocked { color: var(--research-danger); }

.research-code {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--research-border);
  border-radius: 0.75rem;
  color: #d8fff0;
  background: #06090a;
  font-size: 0.88rem;
}

.research-checklist { padding-left: 1.2rem; }
.research-checklist li { margin-bottom: 0.55rem; }

.research-source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0;
  list-style: none;
}

.research-source-list li {
  padding: 0.9rem;
  border: 1px solid var(--research-border);
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.018);
}

.research-source-list small { display: block; margin-top: 0.25rem; color: var(--research-muted); }

.research-related {
  margin-top: 3rem;
  padding: 1.25rem;
  border: 1px solid rgba(0, 255, 153, 0.28);
  border-radius: 0.85rem;
  background: rgba(0, 255, 153, 0.045);
}

.research-related h2 { margin-top: 0; font-size: 1.35rem; }
.research-related ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem 1.5rem; }

.research-footer {
  padding: 2rem 0 3rem;
  color: var(--research-muted);
  border-top: 1px solid var(--research-border);
  font-size: 0.9rem;
}

.research-footer nav { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; }

@media (max-width: 820px) {
  .research-nav { align-items: flex-start; padding: 0.8rem 0; }
  .research-menu { max-width: 62%; }
  .research-card,
  .research-card.wide { grid-column: span 6; }
  .research-toc ol { columns: 1; }
}

@media (max-width: 560px) {
  .research-nav { display: block; }
  .research-menu { max-width: none; justify-content: flex-start; margin-top: 0.65rem; }
  .research-card,
  .research-card.wide { grid-column: 1 / -1; }
  .research-source-list,
  .research-related ul { grid-template-columns: 1fr; }
  .research-hero { padding-top: 3rem; }
}

@media print {
  .research-header,
  .research-actions,
  .skip-link { display: none; }
  body.research-page { color: #111; background: #fff; }
  .research-card,
  .research-toc,
  .research-callout,
  .research-table-wrap { border-color: #bbb; background: #fff; break-inside: avoid; }
  .research-page a { color: #111; text-decoration: underline; }
}
