/* OpenPep: a light research site using ProteinQure's blue and blue-grey palette.
 * Pale grey follows the derived PQ_BLUE_10 token in the supplied design-system bundle. */
@import url("fonts/fonts.css");

:root {
  color-scheme: light;
  --bg: #FFFFFF;
  --fg: #47566D;
  --accent: #0A1E3C;
  --border: #BBBFC8;
  --soft: #E3E5E9;
  --footer-bg: color-mix(in srgb, var(--soft) 35%, var(--bg));
  --footer-grid-line: rgb(187 191 200 / 40%);
  --grid-line: rgb(187 191 200 / 24%);
  --grid-size: 48px;
  --font-body: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --container: 1040px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; font-family: var(--font-body); font-size: 18px; line-height: 1.6; color: var(--fg); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
main { flex: 1 0 auto; }
main:focus { outline: none; }
h1, h2, h3 { font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 16px; overflow-wrap: break-word; }
h1 { font-size: clamp(34px, 4vw, 48px); max-width: 24ch; }
h2 { font-size: 28px; }
h3 { font-size: 20px; }
p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 24px; }
code { font-family: var(--font-mono); font-size: 0.85em; background: var(--soft); padding: 2px 5px; overflow-wrap: anywhere; }
.container { width: min(100%, var(--container)); margin-inline: auto; padding-inline: 24px; }
.lede { font-size: 18px; line-height: 1.6; }
.eyebrow, .resource-status, .resource-note { font-size: 18px; }
.eyebrow { margin-bottom: 20px; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--bg); padding: 8px 12px; z-index: 10; }
.skip-link:focus { left: 8px; }

/* Compact page navigation with visible current-page and focus states. */
.site-header { border-bottom: 1px solid var(--border); }
.header-row { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 8px 24px; flex-wrap: wrap; padding-block: 12px; }
.brand { font-size: 24px; font-weight: 600; letter-spacing: -0.03em; color: var(--accent); text-decoration: none; }
nav ul { display: flex; gap: 24px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 18px; color: var(--fg); text-decoration: none; border-bottom: 2px solid transparent; }
nav a:hover, nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

.hero, .page-header { position: relative; isolation: isolate; }
.hero { padding-block: 32px 48px; }
/* Shared introduction texture, fading out before the main content. */
.hero::before, .page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  mask-image: radial-gradient(ellipse at 55% 25%, #000 20%, transparent 80%);
}
.hero-copy { min-width: 0; width: 100%; margin-top: 24px; }
.hero h1 { font-size: clamp(40px, 5.3vw, 68px); line-height: 1.12; max-width: none; margin: 0 0 24px; color: var(--accent); text-align: center; }
.hero .lede { font-size: 18px; max-width: none; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin-top: 24px; }
.science-title-image { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; border-radius: 4px; margin-top: 28px; }
.science-image-caption { font-size: 14px; margin-top: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 44px; padding: 12px 20px; border: 1px solid transparent; border-radius: 4px; font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; }
.button.primary { color: var(--bg); background: var(--accent); }
.button.primary:hover { background: var(--fg); text-decoration: none; }
.button.secondary { color: var(--accent); border: 1px solid var(--accent); background: var(--bg); }
.button.secondary:hover { background: var(--soft); text-decoration: none; }
.section { padding-block: 48px; position: relative; scroll-margin-top: 24px; }
.section::before { content: ""; position: absolute; top: 0; left: 24px; right: 24px; height: 1px; background: var(--border); }
.section h2 { margin-bottom: 28px; }
.video-feature { width: 100%; margin-inline: auto; }
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 202px; background: var(--soft); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-poster { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 0; border: 0; background: var(--accent); cursor: pointer; }
.video-poster img { width: 100%; height: 100%; object-fit: cover; }
.video-poster:focus-visible { outline: 3px solid var(--bg); outline-offset: -6px; }
.video-poster .video-mark { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; background: var(--bg); border-color: var(--bg); }
.video-poster .video-mark::after { border-block-width: 9px; border-left-width: 14px; border-left-color: var(--accent); }
.video-error { font-size: 18px; margin-top: 8px; }
.video-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; text-align: center; }
.video-placeholder p { margin: 0; }
.video-mark { width: 48px; height: 48px; border: 1px solid var(--border); border-radius: 50%; display: grid; place-items: center; }
.video-mark::after { content: ""; width: 0; height: 0; border-block: 7px solid transparent; border-left: 11px solid var(--fg); margin-left: 3px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.step-number { display: block; font-size: 18px; margin-bottom: 12px; }
.steps h3 a { color: var(--fg); text-decoration: none; }
.steps h3 a:hover { color: var(--accent); text-decoration: underline; }
.steps p { font-size: 18px; }
.resources { margin: 0; display: grid; gap: 28px; }
.resources > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; }
.resources dt { font-size: 20px; font-weight: 500; }
.resource-status { display: block; font-weight: 400; margin-top: 4px; }
.resources dd { margin: 0; }
.resource-note { margin-top: 8px; }
.resource-releases { list-style: none; padding: 0; margin: 16px 0; }
.resource-releases li { margin-bottom: 12px; }
.resource-releases .resource-note { display: block; margin: 4px 0 0; }

.team-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.person { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: start; }
.person h2, .person h3 { font-size: 18px; letter-spacing: 0; margin: 0 0 4px; }
.person h2 a { color: var(--fg); }
.person p { font-size: 18px; margin: 0; }
.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.initials { display: grid; place-items: center; background: var(--soft); font-size: 18px; }
.advisory-team { margin-top: 40px; }
.advisor-placeholder { background: var(--soft); border: 1px solid var(--border); }

/* Target lookup builds a prefilled link to the public nomination form. */
[hidden] { display: none !important; }
.target-tool { width: 100%; }
.target-tool label { display: block; font-size: 18px; margin-bottom: 8px; }
.target-tool textarea { display: block; width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg); color: var(--fg); font: inherit; }
.target-tool textarea { resize: vertical; }
.target-tool .resource-note { margin-bottom: 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.target-combobox { position: relative; border: 1px solid var(--border); border-radius: 4px; }
.target-tool #target-query { height: 96px; resize: none; border: 0; font-size: 18px; line-height: 1.45; }
#target-selections { list-style: none; margin: 0; padding: 12px; display: grid; gap: 8px; }
.target-chip { display: flex; align-items: start; gap: 8px; padding: 8px; border-radius: 4px; background: var(--soft); color: var(--accent); }
.target-chip > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.target-chip strong, .target-chip > div > span { display: block; }
.target-chip strong { font-weight: 500; }
.target-chip-check { padding-top: 2px; }
.target-chip button { flex-shrink: 0; width: 44px; height: 44px; border: 0; background: transparent; color: var(--accent); font-size: 24px; cursor: pointer; }
.target-tool #target-query:disabled { display: none; }
#target-selection-count { margin: 8px 0 0; }

#target-results { position: absolute; inset: calc(100% + 4px) 0 auto; z-index: 2; max-height: 280px; overflow-y: auto; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; box-shadow: 0 6px 16px rgb(10 30 60 / 8%); }
.protein-option { padding: 10px 12px; border-bottom: 1px solid var(--soft); cursor: pointer; overflow-wrap: anywhere; line-height: 1.4; font-size: 18px; }
.protein-option:last-child { border-bottom: 0; }
.protein-option:hover, .protein-option[aria-selected="true"] { background: var(--soft); }
.protein-option strong { display: block; font-weight: 500; color: var(--accent); margin-bottom: 2px; }
.protein-option span { display: block; }
.lookup-message { padding: 12px; font-size: 18px; }
#target-draft { margin-top: 24px; }
#target-continue[aria-disabled="true"] { opacity: 0.45; cursor: default; }
#target-draft .button { margin-top: 20px; }
#target-draft .resource-note { margin-top: 12px; }
.target-fallback { margin-top: 32px; font-size: 18px; overflow-wrap: anywhere; }

.page-header { padding-block: 56px 32px; }
.page-header .lede { margin-top: 20px; }
.page-subtitle { font-size: 18px; line-height: 1.6; margin-top: 20px; }
.prose { width: 100%; }
.prose + .section { margin-top: 48px; }
.prose h2 { margin: 40px 0 16px; scroll-margin-top: 24px; }
.prose img { margin-top: 24px; }
.prose .caption { font-size: 14px; margin-top: 8px; }

.dataset-list { display: grid; gap: 40px; }
.dataset { min-width: 0; padding-top: 24px; border-top: 1px solid var(--border); }
.dataset-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; flex-wrap: wrap; }
.dataset h2 { font-size: 24px; margin: 0; }
.meta { display: flex; flex-wrap: wrap; gap: 16px 32px; padding-block: 20px; margin-block: 20px; border-block: 1px solid var(--border); }
.meta > div { min-width: 0; max-width: 100%; }
.meta dt { font-size: 18px; }
.meta dd { margin: 0; font-size: 18px; }
details summary { cursor: pointer; padding-block: 10px; color: var(--accent); }
.table-scroll { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 18px; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.empty { width: 100%; }
.empty h2 { font-size: 24px; }
.release-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 24px; }
.citation { white-space: pre-wrap; overflow-wrap: anywhere; padding: 16px; background: var(--soft); font-size: 18px; }
.citation code { padding: 0; font-size: inherit; }
.site-footer { position: relative; isolation: isolate; margin-top: 56px; padding-bottom: 32px; border-top: 1px solid var(--accent); background-color: var(--footer-bg); font-size: 18px; }
.site-footer::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: linear-gradient(var(--footer-grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--footer-grid-line) 1px, transparent 1px); background-size: var(--grid-size) var(--grid-size); mask-image: linear-gradient(to bottom, transparent 50%, #000 85%); }
.footer-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; padding-top: 24px; }
.footer-about { max-width: 65ch; }
.footer-about p { margin: 0 0 8px; }
.site-footer a { color: var(--accent); }
.footer-contact { white-space: nowrap; }
.footer-nav ul { gap: 4px 20px; justify-content: flex-end; max-width: 320px; }
.footer-nav a { font-size: 18px; }

@media (max-width: 640px) {
  .container { padding-inline: 20px; }
  .header-row { gap: 0 20px; }
  nav ul { gap: 20px; }
  .hero, .page-header, .site-footer { --grid-size: 32px; }
  .hero { padding-block: 24px 40px; }
  .lede { font-size: 18px; }
  .section { padding-block: 40px; }
  .prose + .section { margin-top: 40px; }
  .section::before { left: 20px; right: 20px; }
  h2 { font-size: 24px; }
  .steps, .team-list { grid-template-columns: 1fr; gap: 24px; }
  .resources > div { grid-template-columns: 1fr; gap: 8px; }
  .resource-status { display: inline; margin-left: 12px; }
  .page-header { padding-block: 40px 24px; }
  .target-tool #target-query { height: 192px; }
  .footer-row { grid-template-columns: 1fr; gap: 12px; }
  .footer-nav ul { justify-content: flex-start; max-width: none; }
}
