:root {
  color-scheme: light;
  --ink: #263238;
  --muted: #60717a;
  --line: #dfe9e8;
  --paper: #ffffff;
  --wash: #f7fbfa;
  --mint: #cfeee7;
  --sky: #d7ecfb;
  --peach: #ffe1d2;
  --lavender: #e9e1fb;
  --lemon: #f7edbf;
  --rose: #f8d9df;
  --green: #5d9286;
  --blue: #5f8fb7;
  --coral: #c98772;
  --violet: #8c7ab8;
  --shadow: 0 18px 45px rgba(59, 93, 99, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(247, 251, 250, 0.96), rgba(255, 255, 255, 1) 34rem),
    #ffffff;
  letter-spacing: 0;
}

body.home-view {
  overflow-x: hidden;
  color: #f7fbff;
  background: #161a20;
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.top-nav button,
.outline-link,
.paper-link {
  border: 1px solid rgba(93, 146, 134, 0.28);
  border-radius: 8px;
  background: #eef8f5;
  color: #2f6259;
  font-weight: 800;
}

.site-shell {
  min-height: 100vh;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.flow-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: none;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(22, 26, 32, 0.96), rgba(22, 26, 32, 0.98)),
    #161a20;
}

.home-view .flow-canvas {
  display: block;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(223, 233, 232, 0.86);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.home-view .topbar {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: rgba(22, 26, 32, 0.56);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.logo-symbol {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 40%, rgba(255, 255, 255, 0.75) 40% 55%, transparent 55%),
    linear-gradient(135deg, var(--mint), var(--sky));
  box-shadow: inset 0 0 0 1px rgba(93, 146, 134, 0.18);
}

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

.logo strong {
  font-size: 0.98rem;
}

.logo small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.home-view .logo strong {
  color: #ffffff;
}

.home-view .logo small,
.home-view .top-nav a,
.home-view .top-nav button {
  color: rgba(247, 251, 255, 0.72);
}

.home-view .top-nav button {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.top-nav a,
.top-nav button {
  min-height: 36px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.top-nav a:hover,
.top-nav button:hover {
  color: var(--ink);
  background: #f4f9f8;
}

.home-view .top-nav a:hover,
.home-view .top-nav button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

main {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 76px;
}

main:focus {
  outline: none;
}

.home-view main {
  width: min(1180px, calc(100% - 36px));
  padding-bottom: 34px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(290px, 0.72fr);
  gap: 24px;
  align-items: stretch;
  min-height: calc(100vh - 146px);
}

.home-view .hero {
  min-height: calc(100vh - 102px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(20px, 4vw, 42px) 0;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.35rem, 6.2vw, 5.2rem);
  line-height: 1.02;
}

.home-view .hero h1 {
  color: #ffffff;
  text-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

.home-view .eyebrow {
  color: #bfeee4;
}

.hero-lead {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.8;
}

.home-view .hero-lead {
  color: rgba(247, 251, 255, 0.78);
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.primary-action {
  background: #2f6259;
  color: #ffffff;
}

.secondary-action {
  background: #ffffff;
  color: var(--green);
}

.home-view .primary-action {
  border-color: rgba(255, 255, 255, 0.12);
  background: #d7ecfb;
  color: #1e313a;
}

.home-view .secondary-action {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #f7fbff;
}

.hero-panel {
  align-self: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.home-view .hero-panel {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.board-header {
  padding: 6px 4px 18px;
}

.document-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.home-view .document-kicker {
  color: #bfeee4;
}

.board-header h2 {
  margin: 0;
  font-size: clamp(1.28rem, 2.2vw, 1.78rem);
  line-height: 1.25;
}

.board-header p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.58;
}

.home-view .board-header p {
  color: rgba(247, 251, 255, 0.68);
}

.recent-document-list {
  display: grid;
  gap: 10px;
}

.recent-document {
  display: grid;
  gap: 9px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.recent-document:hover {
  transform: translateY(-2px);
  border-color: rgba(93, 146, 134, 0.38);
  background: #f8fbfb;
}

.home-view .recent-document {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.home-view .recent-document:hover {
  border-color: rgba(215, 236, 251, 0.45);
  background: rgba(255, 255, 255, 0.12);
}

.document-category {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 8px;
  background: #eef8f5;
  color: #2f6259;
  font-size: 0.74rem;
  font-weight: 800;
}

.home-view .document-category {
  background: rgba(207, 238, 231, 0.18);
  color: #d7fff7;
}

.recent-document strong {
  font-size: 1rem;
  line-height: 1.35;
}

.document-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.home-view .document-meta {
  color: rgba(247, 251, 255, 0.6);
}

.genome-map {
  display: grid;
  gap: 16px;
  padding: 8px 0 20px;
}

.track {
  position: relative;
  overflow: hidden;
  height: 44px;
  border: 1px solid rgba(96, 113, 122, 0.12);
  border-radius: 8px;
  background: #fbfdfd;
}

.home-view .track {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.08);
}

.track span {
  position: absolute;
  top: 9px;
  height: 24px;
  border-radius: 6px;
  background: var(--track-color, var(--mint));
  transform-origin: left center;
  animation: pulseTrack 3.6s ease-in-out infinite;
}

.track span:nth-child(1) {
  left: 7%;
  width: 24%;
}

.track span:nth-child(2) {
  left: 38%;
  width: 18%;
  animation-delay: 0.3s;
}

.track span:nth-child(3) {
  left: 62%;
  width: 30%;
  animation-delay: 0.6s;
}

.track:nth-child(2) {
  --track-color: var(--sky);
}

.track:nth-child(3) {
  --track-color: var(--peach);
}

.track:nth-child(4) {
  --track-color: var(--lavender);
}

@keyframes pulseTrack {
  0%,
  100% {
    transform: scaleX(0.92);
    opacity: 0.75;
  }

  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.metric {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
}

.home-view .metric {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.08);
}

.metric strong {
  display: block;
  font-size: 1.38rem;
}

.metric span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.home-view .metric span {
  color: rgba(247, 251, 255, 0.7);
}

.section {
  padding: 36px 0 8px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.3rem);
}

.section-heading p {
  max-width: 570px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.search-panel {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.search-panel input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--wash);
}

.search-panel input:focus {
  border-color: var(--green);
  outline: 3px solid rgba(207, 238, 231, 0.82);
}

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

.theme-card {
  position: relative;
  min-height: 240px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 12px 28px rgba(65, 99, 105, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.theme-card:hover {
  transform: translateY(-4px);
  border-color: rgba(93, 146, 134, 0.4);
  box-shadow: var(--shadow);
}

.theme-card::before {
  content: "";
  display: block;
  width: 58px;
  height: 8px;
  margin-bottom: 22px;
  border-radius: 8px;
  background: var(--accent, var(--mint));
}

.theme-card h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.35;
}

.theme-card p {
  margin: 12px 0 18px;
  color: var(--muted);
  line-height: 1.65;
}

.theme-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(96, 113, 122, 0.13);
  border-radius: 8px;
  background: #f8fbfb;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.roadmap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.roadmap-step {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.roadmap-step span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border-radius: 8px;
  background: var(--accent, var(--mint));
  font-weight: 900;
}

.roadmap-step h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.roadmap-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

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

.page-header {
  padding: 28px 0 20px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--green);
  font-weight: 800;
}

.page-header h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.06;
}

.page-header p {
  max-width: 820px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.8;
}

.content-block {
  scroll-margin-top: 92px;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.content-block h2 {
  margin: 0 0 14px;
  font-size: 1.32rem;
}

.content-block p,
.content-block li {
  color: var(--muted);
  line-height: 1.72;
}

.content-block ul,
.content-block ol {
  padding-left: 22px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.method-list {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.method-list li {
  padding: 12px 14px;
  border: 1px solid rgba(96, 113, 122, 0.13);
  border-radius: 8px;
  background: var(--wash);
}

.toc {
  position: sticky;
  top: 86px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.toc h2 {
  margin: 0 0 12px;
  font-size: 0.94rem;
}

.toc a {
  display: block;
  padding: 9px 8px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.toc a:hover,
.toc a.active {
  background: #eef8f5;
  color: #2f6259;
}

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

.paper-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.paper-item h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.paper-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.paper-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.empty-state {
  padding: 34px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 920px) {
  .hero,
  .page-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .hero-panel {
    align-self: auto;
  }

  .theme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .roadmap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toc {
    position: relative;
    top: auto;
  }
}

@media (max-width: 680px) {
  main {
    width: min(100% - 28px, 1180px);
    padding-top: 24px;
  }

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

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

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .theme-grid,
  .roadmap,
  .metric-strip,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .content-block {
    padding: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
