:root {
  color-scheme: dark;
  --bg: #08100f;
  --bg-deep: #030706;
  --surface: rgba(12, 28, 25, 0.9);
  --surface-strong: rgba(18, 42, 37, 0.94);
  --surface-soft: rgba(226, 241, 230, 0.055);
  --text: #f4efe4;
  --muted: #b7c9be;
  --quiet: #7f9a8d;
  --line: rgba(214, 238, 224, 0.18);
  --line-strong: rgba(244, 239, 228, 0.32);
  --kelp: #72d19b;
  --cyan: #8dd8d3;
  --star: #f5a34a;
  --star-deep: #d86d2f;
  --cream: #fff3d5;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  overflow-x: hidden;
  background:
    radial-gradient(circle at 84% 14%, rgba(245, 163, 74, 0.16), transparent 28rem),
    radial-gradient(circle at 12% 12%, rgba(114, 209, 155, 0.14), transparent 30rem),
    linear-gradient(135deg, var(--bg) 0%, #0b1b18 52%, var(--bg-deep) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 243, 213, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 243, 213, 0.028) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 70%);
}

body::after {
  content: "";
  position: fixed;
  inset: auto 0 0;
  height: 36vh;
  pointer-events: none;
  background: linear-gradient(to top, rgba(245, 163, 74, 0.08), transparent);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 26px 0 46px;
}

.site-nav,
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.brand,
.top-nav a,
.nav-links a {
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(245, 163, 74, 0.36);
  border-radius: 50%;
  color: var(--star);
  background: rgba(245, 163, 74, 0.1);
  box-shadow: 0 0 32px rgba(245, 163, 74, 0.12);
}

.nav-links,
.top-nav {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.top-nav a:hover,
.top-nav a:focus-visible,
.brand:hover,
.brand:focus-visible {
  color: var(--text);
  outline: none;
}

.hero {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(13, 32, 28, 0.94), rgba(7, 17, 15, 0.84));
  box-shadow: var(--shadow);
}

.home-hero {
  min-height: auto;
  padding: clamp(28px, 4.8vw, 54px);
  overflow: hidden;
}

.hero-copy {
  max-width: 760px;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--star);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
p {
  text-wrap: pretty;
}

h1 {
  margin: 0;
  overflow-wrap: normal;
  font-size: clamp(3.25rem, 8vw, 6.2rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.lede {
  max-width: 610px;
  margin: 16px 0 0;
  color: var(--cream);
  font-size: clamp(1.04rem, 1.7vw, 1.28rem);
  line-height: 1.46;
}

.mission-note {
  max-width: 650px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.cta-groups {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.cta-label {
  margin: 0 0 10px;
  color: #a8c2b6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-weight: 850;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  outline: 2px solid rgba(245, 163, 74, 0.28);
  outline-offset: 3px;
}

.primary {
  color: #06100f;
  background: linear-gradient(135deg, var(--kelp), var(--cyan));
  border-color: transparent;
}

.donate {
  color: #1a1000;
  background: linear-gradient(135deg, var(--star), #ffd48d);
  border-color: transparent;
}

.secondary,
.ghost {
  background: rgba(255, 243, 213, 0.07);
}

.ghost {
  color: var(--muted);
}

.status-band {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(245, 163, 74, 0.24);
  border-radius: 24px;
  background: rgba(245, 163, 74, 0.07);
}

.status-band p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid rgba(245, 163, 74, 0.4);
  border-radius: 999px;
  color: var(--star);
  background: rgba(245, 163, 74, 0.09);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.workflow,
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.card,
.note {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-soft);
  backdrop-filter: blur(16px);
}

.card {
  padding: 24px;
}

.step-number {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--star);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  font-weight: 900;
}

.card h2,
.note h2 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  letter-spacing: -0.03em;
}

.card p,
.note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.note {
  margin-top: 18px;
  padding: 22px 24px;
}

.split-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.split-note div {
  max-width: 740px;
}

.narrow {
  max-width: 920px;
}

.top-nav {
  margin-bottom: 18px;
}

.page-hero {
  padding: clamp(34px, 7vw, 72px);
}

.page-hero h1 {
  max-width: 760px;
  font-size: clamp(2.8rem, 8vw, 5.8rem);
  line-height: 0.94;
}

.info-grid {
  grid-template-columns: 1fr;
}

.wide-card p {
  font-size: 1.02rem;
}

.contact-card {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 30px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 243, 213, 0.075);
}

.contact-name {
  margin: 0;
  font-weight: 900;
}

.contact-link {
  color: var(--star);
  font-weight: 800;
  text-decoration: none;
}

.contact-link:hover,
.contact-link:focus-visible {
  color: var(--cream);
  outline: none;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding: 18px 4px 0;
  border-top: 1px solid rgba(214, 238, 224, 0.12);
  color: var(--quiet);
}

.site-footer p {
  margin: 0;
  line-height: 1.5;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.site-footer a {
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--text);
  outline: none;
}

.compact-actions {
  margin-top: 18px;
}

/* bioRxiv-inspired public splash page */
.preprint-home {
  color-scheme: light;
  --paper: #fffdf7;
  --paper-edge: #e1d8c6;
  --preprint-red: #b3262e;
  --preprint-red-dark: #8f1d24;
  --ink: #17120f;
  --ink-soft: #3f3932;
  --caption: #6b6258;
  --rule: #cfc4b4;
  --note: #f7f2e9;
  --link: #8c1f27;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", Times, serif;
  background: #f4efe6;
}

.preprint-home::before,
.preprint-home::after {
  content: none;
}

.preprint-home .preprint-shell {
  width: min(1040px, calc(100% - 44px));
  padding: 24px 0 40px;
}

.preprint-subpage .preprint-shell {
  width: min(920px, calc(100% - 44px));
}

.preprint-home .site-nav {
  margin: 0 auto 0;
  padding: 12px 0 16px;
  border-bottom: 3px solid var(--preprint-red);
  font-family: Helvetica, Arial, sans-serif;
}

.preprint-home .brand,
.preprint-home .top-nav a,
.preprint-home .nav-links a {
  color: var(--ink);
  font-weight: 700;
}

.preprint-home .brand-mark {
  width: 28px;
  height: 28px;
  border: 1px solid var(--preprint-red);
  border-radius: 0;
  color: var(--paper);
  background: var(--preprint-red);
  box-shadow: none;
  font-family: Georgia, "Times New Roman", Times, serif;
}

.preprint-home .nav-links a {
  color: var(--link);
  font-size: 0.92rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.preprint-home .nav-links a:hover,
.preprint-home .nav-links a:focus-visible,
.preprint-home .brand:hover,
.preprint-home .brand:focus-visible {
  color: var(--preprint-red-dark);
}

.preprint-masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0 16px;
  border-bottom: 1px solid var(--rule);
  font-family: Helvetica, Arial, sans-serif;
  color: var(--caption);
}

.preprint-masthead p {
  margin: 0;
}

.preprint-kicker {
  color: var(--preprint-red);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: lowercase;
}

.preprint-home .manuscript-abstract {
  margin-top: 24px;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--paper-edge);
  border-top: 5px solid var(--preprint-red);
  border-radius: 0;
  background: var(--paper);
  box-shadow: 0 18px 44px rgba(80, 66, 48, 0.12);
}

.preprint-home .page-hero {
  margin-top: 24px;
  padding: clamp(30px, 6vw, 54px);
}

.preprint-home .lab-hero h1 {
  font-size: clamp(1.15rem, 2.2vw, 2rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
}

.preprint-home .contact-hero h1 {
  font-size: clamp(1.05rem, 1.9vw, 1.7rem);
  line-height: 1.18;
  letter-spacing: -0.015em;
}

.preprint-home .hero-copy {
  max-width: 820px;
}

.preprint-home .eyebrow {
  margin-bottom: 18px;
  color: var(--caption);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.preprint-home h1 {
  max-width: 780px;
  color: var(--ink);
  font-size: clamp(3.4rem, 8vw, 6.8rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.08em;
}

.preprint-home .home-title {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.preprint-home .lede {
  max-width: 720px;
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: clamp(1.28rem, 2.4vw, 1.68rem);
  line-height: 1.28;
}

.preprint-home .lab-summary {
  font-size: 0.95rem;
  line-height: 1.55;
  text-indent: 1.6em;
}

.manuscript-authors {
  margin: 18px 0 0;
  color: var(--caption);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
}

.abstract-block {
  max-width: 720px;
  margin-top: 24px;
  padding: 16px 0 0;
  border-top: 1px solid var(--rule);
}

.abstract-block h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1.08rem;
  font-weight: 700;
}

.abstract-block p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.04rem;
  line-height: 1.58;
}

.preprint-home .mission-note {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.65;
}

.manuscript-meta {
  display: grid;
  gap: 0;
  margin: 22px 0 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.manuscript-meta div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  padding: 9px 0;
  border-top: 1px solid rgba(207, 196, 180, 0.62);
}

.manuscript-meta div:first-child {
  border-top: 0;
}

.manuscript-meta dt,
.manuscript-meta dd {
  margin: 0;
}

.manuscript-meta dt {
  color: var(--caption);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.manuscript-meta dd {
  color: var(--ink-soft);
  line-height: 1.45;
}

.preprint-home .cta-groups {
  gap: 14px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.preprint-home .cta-label {
  color: var(--caption);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.preprint-home .button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  background: #fffaf0;
  box-shadow: none;
}

.preprint-home .button:hover,
.preprint-home .button:focus-visible {
  transform: none;
  border-color: var(--preprint-red);
  outline: 2px solid rgba(179, 38, 46, 0.18);
}

.preprint-home .primary,
.preprint-home .donate {
  color: #ffffff;
  border-color: var(--preprint-red);
  background: var(--preprint-red);
}

.preprint-home .secondary,
.preprint-home .ghost {
  color: var(--link);
  background: transparent;
}

.preprint-home .manuscript-note {
  grid-template-columns: auto 1fr;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--paper-edge);
  border-left: 5px solid var(--preprint-red);
  border-radius: 0;
  background: var(--note);
  font-family: Helvetica, Arial, sans-serif;
}

.preprint-home .note p {
  color: var(--ink-soft);
}

.preprint-home .source-list {
  margin: 10px 0 0;
  padding-left: 1.25rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.preprint-home .source-list li + li {
  margin-top: 8px;
}

.preprint-home .source-list a {
  color: var(--link);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.preprint-home .source-list a:hover,
.preprint-home .source-list a:focus-visible {
  color: var(--preprint-red-dark);
}

.preprint-home .story-list span {
  color: var(--caption);
  font-weight: 700;
}

.preprint-home .status-band p {
  color: var(--ink-soft);
}

.preprint-home .status-pill {
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--preprint-red);
  background: transparent;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.preprint-home .manuscript-sections {
  grid-template-columns: 1fr;
  margin-top: 16px;
}

.preprint-home .card {
  padding: 18px 18px 20px;
  border: 1px solid var(--paper-edge);
  border-radius: 0;
  background: var(--paper);
  backdrop-filter: none;
}

.preprint-subpage .wide-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  column-gap: 18px;
  align-items: start;
}

.preprint-subpage .wide-card .step-number {
  grid-row: 1 / span 2;
}

.preprint-home .step-number {
  margin-bottom: 16px;
  color: var(--preprint-red);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.76rem;
}

.preprint-home .card h2 {
  margin-bottom: 8px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1.18rem;
  font-weight: 400;
  letter-spacing: 0;
}

.preprint-home .card p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.5;
}

.preprint-home .manuscript-footer {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  color: var(--caption);
  font-family: Helvetica, Arial, sans-serif;
}

.preprint-home .site-footer a {
  color: var(--link);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.preprint-home .site-footer a:hover,
.preprint-home .site-footer a:focus-visible {
  color: var(--preprint-red-dark);
}

.preprint-home .manuscript-contact {
  display: inline-flex;
  margin-top: 26px;
  padding: 18px 20px;
  border: 1px solid var(--paper-edge);
  border-left: 5px solid var(--preprint-red);
  border-radius: 0;
  background: var(--note);
}

.preprint-home .contact-name {
  color: var(--ink);
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 700;
}

.preprint-home .contact-name + .contact-name {
  margin-top: 12px;
}

.preprint-home .contact-role {
  margin: 0;
  color: var(--caption);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.92rem;
}

.preprint-home .access-note {
  max-width: 660px;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

.preprint-home .contact-link {
  color: var(--link);
  font-family: Helvetica, Arial, sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 940px) {
  .workflow,
  .cards,
  .preprint-home .manuscript-sections {
    grid-template-columns: 1fr;
  }

  .split-note,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}

.preprint-home .lab-sections {
  display: grid;
  grid-template-columns: 1fr;
}

.preprint-home .lab-sections .wide-card {
  width: 100%;
}

@media (max-width: 620px) {
  .shell {
    width: min(320px, calc(100vw - 56px));
    margin: 0 auto;
    padding-top: 18px;
  }

  .site-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links,
  .top-nav {
    justify-content: flex-start;
  }

  .hero {
    border-radius: 24px;
  }

  .home-hero,
  .page-hero {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 20px 16px;
    overflow: hidden;
  }

  h1 {
    font-size: clamp(2.08rem, 10.8vw, 3.25rem);
    line-height: 1.02;
    letter-spacing: -0.025em;
  }

  .lede {
    font-size: 1.04rem;
    line-height: 1.48;
    overflow-wrap: anywhere;
  }

  .mission-note {
    font-size: 0.96rem;
    overflow-wrap: anywhere;
  }

  .actions {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
  }

  .button {
    width: 100%;
    max-width: 100%;
    padding-inline: 14px;
  }

  .status-band {
    grid-template-columns: 1fr;
  }

  .preprint-home .preprint-shell,
  .preprint-subpage .preprint-shell {
    width: min(340px, calc(100vw - 34px));
  }

  .preprint-masthead {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .preprint-home .manuscript-abstract {
    border-radius: 0;
    padding: 24px 18px;
  }

  .preprint-home h1 {
    font-size: clamp(3.1rem, 18vw, 4.4rem);
    line-height: 0.94;
    letter-spacing: -0.08em;
  }

  .preprint-home .lede {
    font-size: 1.22rem;
    overflow-wrap: normal;
  }

  .manuscript-meta div,
  .preprint-subpage .wide-card {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .preprint-home .manuscript-note {
    grid-template-columns: 1fr;
  }
}
