:root {
  --ink: #07120f;
  --muted: #5d6965;
  --line: #dfe8e4;
  --paper: #ffffff;
  --wash: #f3f7f5;
  --green: #0b5f46;
  --green-2: #e6f4ee;
  --cobalt: #185bd8;
  --danger: #8a341f;
  --radius: 8px;
  --shadow: 0 18px 50px rgba(7, 18, 15, 0.10);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--green);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  background: var(--ink);
  color: white;
  padding: .7rem 1rem;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #050706;
  border-bottom: 1px solid #111916;
  backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner,
.site-main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.header-inner {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0;
}

.brand strong {
  color: white;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: #39c48c;
  font-size: .78rem;
}

.main-nav ul {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: rgba(255,255,255,.76);
  font-size: .94rem;
  font-weight: 650;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.status-chip,
.contact-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border-radius: 999px;
  padding: 0 14px;
  font-size: .86rem;
  font-weight: 750;
  white-space: nowrap;
}

.status-chip {
  background: #063d2f;
  color: #70e5ad;
}

.contact-link {
  background: white;
  color: var(--ink);
}

.site-main {
  padding: 34px 0 72px;
}

.feed-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.left-rail,
.right-rail {
  position: sticky;
  top: 108px;
  display: grid;
  gap: 12px;
}

.rail-link {
  display: flex;
  min-height: 44px;
  align-items: center;
  border-radius: 7px;
  padding: 0 14px;
  color: #37423e;
  font-weight: 750;
}

.rail-link.active {
  background: var(--green-2);
  color: var(--green);
}

.rail-link.muted {
  color: var(--muted);
}

.prealpha-card,
.spotlight-card,
.submission-card {
  margin-top: 18px;
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.prealpha-card span,
.spotlight-card span,
.submission-card span,
.featured-paper span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.prealpha-card strong,
.submission-card strong {
  display: block;
  margin: 6px 0 8px;
  color: var(--green);
  font-size: 1.1rem;
}

.feed-main {
  min-width: 0;
}

.feed-heading {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 22px;
}

.feed-heading h1 {
  margin-bottom: 4px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.feed-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.topic-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.topic-tabs a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 14px;
  background: white;
  color: #35413d;
  font-weight: 750;
}

.topic-tabs a.active {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.spotlight-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.25rem;
}

.spotlight-card blockquote {
  margin: 18px 0 0;
  color: var(--muted);
}

.featured-paper {
  padding: 24px;
  background: linear-gradient(135deg, #063d2f, #082019);
  border-radius: var(--radius);
  color: white;
}

.featured-paper h2 {
  margin: 10px 0 12px;
  font-size: 1.34rem;
  line-height: 1.18;
}

.featured-paper p {
  color: rgba(255,255,255,.78);
}

.hero-grid {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 32px;
  align-items: stretch;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lockline,
.panel-label,
.record-row span,
.collection-card span {
  margin: 0 0 12px;
  color: var(--green);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  max-width: 920px;
  font-size: clamp(2.5rem, 6vw, 5.9rem);
  line-height: .93;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(1.55rem, 2.8vw, 2.55rem);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.28rem;
  line-height: 1.15;
}

.hero-text,
.page-heading p,
.section-split > div:first-child p {
  color: var(--muted);
  max-width: 700px;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  font-size: .95rem;
  font-weight: 800;
}

.button.primary {
  background: var(--ink);
  color: white;
}

.button.secondary {
  background: white;
  color: var(--ink);
}

.button.light {
  background: white;
  color: var(--green);
  border-color: white;
}

.button.full {
  width: 100%;
}

.button.locked {
  border-color: #ecd1c8;
  background: #fff3ef;
  color: var(--danger);
}

.governance-panel {
  display: grid;
  gap: 14px;
}

.governance-panel > div {
  padding: 28px;
  background: var(--ink);
  color: white;
  border-radius: var(--radius);
}

.governance-panel > div:nth-child(2) {
  background: var(--green);
}

.governance-panel > div:nth-child(3) {
  background: var(--cobalt);
}

.governance-panel strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.25rem;
}

.governance-panel p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, .78);
}

.governance-panel .panel-label {
  color: rgba(255, 255, 255, .74);
}

.section-split {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 48px;
  margin-top: 72px;
  align-items: start;
}

.record-list {
  display: grid;
  gap: 12px;
}

.record-list.wide {
  min-width: 0;
}

.record-row,
.empty-state,
.collection-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.record-row p,
.collection-card p,
.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
}

.row-action {
  display: inline-flex;
  min-width: 78px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--green);
  font-weight: 850;
}

.row-action.disabled {
  color: var(--muted);
}

.application-band {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  margin-top: 72px;
  padding: 36px;
  border-radius: var(--radius);
  background: var(--green);
  color: white;
}

.application-band p {
  max-width: 760px;
  margin-bottom: 0;
  color: rgba(255,255,255,.82);
}

.page-heading {
  margin-bottom: 34px;
}

.research-layout,
.publication-grid {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.filter-panel {
  position: sticky;
  top: 100px;
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.filter-panel p {
  color: var(--muted);
}

.publication-header {
  padding: 40px;
  margin-bottom: 28px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.publication-header h1 {
  font-size: clamp(2.2rem, 4.8vw, 5rem);
}

.byline {
  color: var(--muted);
  font-weight: 700;
}

.publication-body {
  min-width: 0;
  padding: 34px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.publication-body .element {
  margin-bottom: 24px;
}

.publication-body h3 {
  color: var(--green);
  font-size: .9rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.sticky {
  position: sticky;
  top: 100px;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.collection-card {
  min-height: 220px;
  grid-template-columns: 1fr;
  align-items: start;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: white;
}

.footer-inner {
  display: flex;
  gap: 28px;
  justify-content: space-between;
  padding: 30px 0;
  color: var(--muted);
}

.footer-inner p {
  max-width: 720px;
  margin: 0;
}

.footer-inner nav {
  display: flex;
  gap: 16px;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .header-inner,
  .hero-grid,
  .feed-shell,
  .section-split,
  .research-layout,
  .publication-grid,
  .application-band,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .header-inner {
    gap: 14px;
    padding: 14px 0;
  }

  .main-nav ul {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .header-actions,
  .footer-inner {
    align-items: flex-start;
  }

  .hero-copy,
  .publication-header {
    padding: 30px;
  }

  .filter-panel,
  .sticky {
    position: static;
  }

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

  .footer-inner,
  .footer-inner nav {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .footer-inner,
  .site-main {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }

  .feed-shell {
    display: block;
  }

  .left-rail,
  .feed-main,
  .right-rail {
    width: 100%;
    margin-bottom: 28px;
  }

  .record-row {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .header-actions,
  .feed-heading {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .button,
  .contact-link,
  .status-chip {
    width: 100%;
  }

  .topic-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .topic-tabs a {
    justify-content: center;
    min-width: 0;
  }

  .record-row {
    min-width: 0;
  }

  .feed-shell,
  .left-rail,
  .feed-main,
  .right-rail,
  .prealpha-card,
  .spotlight-card,
  .submission-card,
  .featured-paper,
  .record-list,
  .topic-tabs,
  .feed-heading,
  .record-row {
    max-width: 100%;
    min-width: 0;
  }

  .record-row h2,
  .record-row h3,
  .record-row p,
  .featured-paper h2,
  .feed-heading p,
  .page-heading p,
  .hero-text,
  p,
  .prealpha-card p,
  .submission-card p,
  .spotlight-card p,
  .spotlight-card blockquote {
    overflow-wrap: anywhere;
  }
}
