:root {
  color-scheme: dark;
  --ink: #090a17;
  --ink-deep: #060711;
  --panel: rgba(22, 21, 45, 0.68);
  --panel-raised: rgba(31, 28, 59, 0.82);
  --panel-solid: #121226;
  --line: rgba(255, 255, 255, 0.14);
  --line-soft: rgba(255, 255, 255, 0.08);
  --line-bright: rgba(184, 225, 255, 0.28);
  --ivory: #f4f3ff;
  --fog: #b3b0c8;
  --dim: #858198;
  --cyan: #62e6db;
  --lilac: #c591ff;
  --pink: #ff6cae;
  --red: #62e6db;
  --green: #62e6db;
  --amber: #f2c879;
  --glow: linear-gradient(100deg, var(--cyan), var(--lilac));
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --max: 1160px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 84% 9%, rgba(149, 91, 255, 0.18), transparent 29rem),
    radial-gradient(circle at 12% 42%, rgba(34, 218, 222, 0.08), transparent 31rem),
    linear-gradient(180deg, #090a17 0%, #080914 58%, #090a17 100%);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  background-image:
    linear-gradient(rgba(197, 145, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(98, 230, 219, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 78%);
  pointer-events: none;
}

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

::selection {
  background: var(--red);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 16px;
  padding: 9px 13px;
  transform: translateY(-170%);
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(100% - 48px, var(--max));
  margin-inline: auto;
}

.site-nav {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(9, 12, 18, 0.93);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wordmark-mark {
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border: 1px solid var(--red);
}

.wordmark-divider {
  margin-inline: 8px;
  color: var(--dim);
}

.wordmark-library {
  color: var(--red);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.045em;
}

.nav-links a {
  color: var(--fog);
  transition: color 150ms ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ivory);
}

.nav-links a[aria-current="page"]::before {
  content: "▸ ";
  color: var(--red);
}

.nav-lab {
  padding-left: 20px;
  border-left: 1px solid var(--line);
  color: var(--dim) !important;
}

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}

.hero::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(32, 40, 57, 0.26) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 40, 57, 0.26) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  mask-image: linear-gradient(90deg, transparent, black 44%, black);
  opacity: 0.45;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: clamp(48px, 9vw, 120px);
  align-items: center;
  min-height: 610px;
  padding-block: 92px;
}

.kicker,
.section-label,
.eyebrow,
.breadcrumb {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kicker,
.section-label,
.eyebrow {
  color: var(--red);
}

.kicker {
  margin-bottom: 20px;
}

h1 {
  max-width: 14ch;
  font-size: clamp(42px, 7vw, 78px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
}

.hero h1 em,
.page-hero h1 em {
  color: var(--red);
  font-style: normal;
}

.hero-deck {
  max-width: 58ch;
  margin-top: 26px;
  color: var(--fog);
  font-size: 17px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.button-primary {
  border-color: var(--red);
  background: var(--red);
  color: var(--ink);
  font-weight: 600;
}

.button-primary:hover {
  border-color: #ff6e61;
  background: #ff6e61;
}

.button-secondary {
  background: rgba(14, 18, 26, 0.85);
  color: var(--fog);
}

.button-secondary:hover {
  border-color: var(--fog);
  color: var(--ivory);
}

.ledger {
  border: 1px solid var(--line);
  background: rgba(14, 18, 26, 0.94);
  box-shadow: 16px 16px 0 rgba(0, 0, 0, 0.16);
}

.ledger-head,
.ledger-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ledger-head {
  border-bottom: 1px solid var(--line-soft);
}

.ledger-foot {
  border-top: 1px solid var(--line-soft);
}

.live {
  color: var(--green);
}

.live::before {
  content: "● ";
  font-size: 7px;
}

.ledger-list {
  list-style: none;
  padding: 6px 16px;
}

.ledger-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-soft);
}

.ledger-list li:last-child {
  border-bottom: 0;
}

.ledger-list span {
  color: var(--fog);
  font-size: 13px;
}

.ledger-list strong {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
}

.ledger-foot code {
  color: var(--red);
  font-family: var(--mono);
}

.stat-band {
  border-bottom: 1px solid var(--line-soft);
  background: var(--panel);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat {
  min-height: 128px;
  padding: 24px;
  border-left: 1px solid var(--line-soft);
}

.stat:last-child {
  border-right: 1px solid var(--line-soft);
}

.stat strong {
  display: block;
  font-family: var(--mono);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 500;
  line-height: 1.15;
}

.stat span {
  display: block;
  margin-top: 9px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section {
  padding-block: 86px;
  border-bottom: 1px solid var(--line-soft);
}

.section-label {
  margin-bottom: 14px;
}

h2 {
  max-width: 25ch;
  font-size: clamp(29px, 4.2vw, 44px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
}

.lede {
  max-width: 67ch;
  margin-top: 18px;
  color: var(--fog);
  font-size: 16px;
}

.lede strong {
  color: var(--ivory);
  font-weight: 500;
}

.shelf-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 38px;
  border: 1px solid var(--line);
  background: var(--line);
}

.shelf-card {
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: 26px;
  background: var(--panel);
  transition: background 160ms ease;
}

.shelf-card:hover {
  background: var(--panel-raised);
}

.shelf-card-top {
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.shelf-card-top b {
  color: var(--red);
  font-weight: 500;
}

.shelf-card h3 {
  margin-top: 54px;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.shelf-card p {
  max-width: 47ch;
  margin-top: 10px;
  color: var(--fog);
  font-size: 14px;
}

.shelf-card-meta {
  display: flex;
  gap: 14px;
  margin-top: auto;
  padding-top: 38px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10.5px;
}

.shelf-card-open {
  margin-left: auto;
  color: var(--red);
}

.route {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 40px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.route-step {
  position: relative;
  min-height: 230px;
  padding: 24px 22px;
  border-right: 1px solid var(--line);
}

.route-step:last-child {
  border-right: 0;
}

.route-step:not(:last-child)::after {
  position: absolute;
  z-index: 2;
  top: 44px;
  right: -7px;
  width: 12px;
  height: 12px;
  border: 1px solid var(--red);
  background: var(--panel);
  content: "";
  transform: rotate(45deg);
}

.route-number {
  color: var(--red);
  font-family: var(--mono);
  font-size: 11px;
}

.route-step strong {
  display: block;
  margin-top: 45px;
  font-size: 17px;
  font-weight: 500;
}

.route-step p {
  margin-top: 7px;
  color: var(--fog);
  font-size: 13px;
}

.note {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 28px;
  max-width: 850px;
  margin-top: 34px;
  padding: 24px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--red);
  background: var(--panel);
}

.note-title {
  color: var(--red);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.note p {
  color: var(--fog);
  font-size: 14px;
}

.receipt {
  max-width: 86ch;
  margin-top: 30px;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10.5px;
}

.receipt::before {
  color: var(--red);
  content: "receipt · ";
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: 82px 72px;
  border-bottom: 1px solid var(--line-soft);
}

.page-hero::after {
  position: absolute;
  top: 0;
  right: max(24px, calc((100vw - var(--max)) / 2));
  color: rgba(255, 75, 58, 0.055);
  font-family: var(--mono);
  font-size: clamp(180px, 28vw, 370px);
  font-weight: 600;
  line-height: 0.9;
  content: attr(data-index);
  pointer-events: none;
}

.page-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.38fr);
  gap: 60px;
  align-items: end;
}

.breadcrumb {
  margin-bottom: 22px;
  color: var(--dim);
}

.breadcrumb a:hover {
  color: var(--ivory);
}

.page-hero h1 {
  max-width: 15ch;
  font-size: clamp(40px, 6vw, 68px);
}

.page-hero .hero-deck {
  max-width: 62ch;
}

.page-fact {
  padding: 18px 0 4px 18px;
  border-left: 1px solid var(--red);
}

.page-fact strong,
.page-fact span {
  display: block;
}

.page-fact strong {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 500;
}

.page-fact span {
  margin-top: 6px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.era-list {
  margin-top: 40px;
  border: 1px solid var(--line);
}

.era {
  display: grid;
  grid-template-columns: 74px minmax(180px, 0.6fr) minmax(0, 1.4fr);
  background: var(--panel);
  border-top: 1px solid var(--line-soft);
}

.era:first-child {
  border-top: 0;
}

.era:hover {
  background: var(--panel-raised);
}

.era-index,
.era-name,
.era-copy {
  padding: 22px;
}

.era-index {
  border-right: 1px solid var(--line-soft);
  color: var(--red);
  font-family: var(--mono);
  font-size: 12px;
}

.era-name {
  border-right: 1px solid var(--line-soft);
}

.era-name strong {
  display: block;
  font-size: 15px;
  font-weight: 500;
}

.era-name span {
  display: block;
  margin-top: 5px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
}

.era-copy p {
  color: var(--fog);
  font-size: 14px;
}

.era-copy small {
  display: block;
  margin-top: 8px;
  color: var(--green);
  font-family: var(--mono);
  font-size: 10.5px;
}

.era-copy small::before {
  color: var(--dim);
  content: "turn · ";
}

.reading-map {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1px;
  margin-top: 40px;
  border: 1px solid var(--line);
  background: var(--line);
}

.reading-key,
.reading-groups {
  background: var(--panel);
}

.reading-key {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 360px;
  padding: 26px;
}

.reading-key strong {
  max-width: 10ch;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.1;
}

.reading-key span {
  color: var(--red);
  font-family: var(--mono);
  font-size: 10px;
}

.reading-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.reading-group {
  min-height: 180px;
  padding: 24px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.reading-group:nth-child(even) {
  border-right: 0;
}

.reading-group:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.reading-group b {
  color: var(--red);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
}

.reading-group strong {
  display: block;
  margin-top: 26px;
  font-weight: 500;
}

.reading-group p {
  margin-top: 5px;
  color: var(--fog);
  font-size: 13px;
}

.document-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 38px;
  border: 1px solid var(--line);
  background: var(--line);
}

.document {
  min-height: 235px;
  padding: 24px;
  background: var(--panel);
}

.document:hover {
  background: var(--panel-raised);
}

.document code {
  color: var(--red);
  font-family: var(--mono);
  font-size: 11px;
}

.document strong {
  display: block;
  margin-top: 28px;
  font-size: 17px;
  font-weight: 500;
}

.document p {
  margin-top: 7px;
  color: var(--fog);
  font-size: 13.5px;
}

.factory-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 40px;
  border: 1px solid var(--line);
  background: var(--line);
}

.factory {
  padding: 28px;
  background: var(--panel);
}

.factory-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-soft);
}

.factory-head h3 {
  font-size: 26px;
  font-weight: 500;
}

.factory-head code {
  color: var(--red);
  font-family: var(--mono);
  font-size: 11px;
}

.factory-total {
  color: var(--fog);
  text-align: right;
}

.factory-total strong,
.factory-total span {
  display: block;
}

.factory-total strong {
  color: var(--ivory);
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 500;
}

.factory-total span {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
}

.factory-rows {
  list-style: none;
}

.factory-rows li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}

.factory-rows li:last-child {
  border-bottom: 0;
}

.factory-rows span {
  color: var(--fog);
  font-size: 13.5px;
}

.factory-rows strong {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
}

.era-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.era-chips span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--fog);
  font-family: var(--mono);
  font-size: 10px;
}

.era-chips span:last-child {
  border-color: var(--red);
  color: var(--ivory);
}

.key-table {
  margin-top: 38px;
  border: 1px solid var(--line);
}

.key-row {
  display: grid;
  grid-template-columns: 180px 1fr 1fr;
  border-top: 1px solid var(--line-soft);
  background: var(--panel);
}

.key-row:first-child {
  border-top: 0;
}

.key-row > * {
  padding: 18px 20px;
  border-right: 1px solid var(--line-soft);
}

.key-row > *:last-child {
  border-right: 0;
}

.key-row strong {
  color: var(--ivory);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
}

.key-row span {
  color: var(--fog);
  font-size: 13px;
}

.thesis-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.75fr);
  gap: 1px;
  margin-top: 40px;
  border: 1px solid var(--line);
  background: var(--line);
}

.thesis-main,
.thesis-aside {
  padding: 30px;
  background: var(--panel);
}

.thesis-main blockquote {
  max-width: 20ch;
  font-size: clamp(27px, 4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.thesis-main p {
  max-width: 58ch;
  margin-top: 24px;
  color: var(--fog);
  font-size: 14px;
}

.thesis-aside {
  display: flex;
  flex-direction: column;
}

.thesis-aside code {
  color: var(--red);
  font-family: var(--mono);
  font-size: 10px;
}

.thesis-aside strong {
  margin-top: 44px;
  font-size: 19px;
  font-weight: 500;
}

.thesis-aside p {
  margin-top: 8px;
  color: var(--fog);
  font-size: 13.5px;
}

.thesis-aside small {
  margin-top: auto;
  padding-top: 34px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
}

.layer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 38px;
  border: 1px solid var(--line);
  background: var(--line);
}

.layer {
  padding: 28px;
  background: var(--panel);
}

.layer time {
  color: var(--red);
  font-family: var(--mono);
  font-size: 11px;
}

.layer h3 {
  margin-top: 26px;
  font-size: 22px;
  font-weight: 500;
}

.layer p {
  margin-top: 9px;
  color: var(--fog);
  font-size: 14px;
}

.not-found {
  display: grid;
  min-height: calc(100vh - 68px);
  place-items: center;
  padding-block: 70px;
}

.not-found-inner {
  max-width: 720px;
}

.not-found-code {
  color: var(--red);
  font-family: var(--mono);
  font-size: 12px;
}

.not-found h1 {
  margin-top: 18px;
}

.site-footer {
  padding-block: 44px 60px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10.5px;
}

.footer-inner a:hover {
  color: var(--ivory);
}

.footer-mark {
  display: inline-flex;
  align-items: center;
  color: var(--fog);
}

.footer-spacer {
  margin-left: auto;
}

/* Direction 04 — shared Signal Glass website shell */

main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-nav {
  min-height: 62px;
  border-bottom-color: var(--line-soft);
  background: rgba(9, 10, 23, 0.68);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
}

.shell {
  width: min(100% - 56px, var(--max));
}

.nav-inner {
  min-height: 62px;
}

.wordmark {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

.wordmark-mark {
  position: relative;
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  margin-right: 10px;
  border: 0;
  border-radius: 8px;
  background: rgba(244, 243, 255, 0.94);
  box-shadow: 0 0 24px rgba(197, 145, 255, 0.18);
}

.wordmark-mark::after {
  position: absolute;
  inset: 6px 0 0;
  color: #17142a;
  content: "pl";
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.04em;
  text-align: center;
}

.wordmark-dot {
  color: var(--cyan);
}

.nav-links {
  gap: clamp(16px, 2.5vw, 30px);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0;
}

.nav-links a {
  transition: color 160ms ease, text-shadow 160ms ease;
}

.nav-links a.lit {
  color: var(--ivory);
  text-shadow: 0 0 18px rgba(98, 230, 219, 0.35);
}

.nav-links a.lit::before {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 7px 1px 0;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  content: "";
}

.shelf-nav {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(9, 10, 23, 0.38);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.shelf-nav-inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-block: 10px;
  scrollbar-width: none;
}

.shelf-nav-inner::-webkit-scrollbar {
  display: none;
}

.shelf-nav a {
  flex: 0 0 auto;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.shelf-nav a:hover {
  color: var(--ivory);
}

.shelf-nav a.lit {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--cyan);
}

.hero {
  min-height: min(780px, calc(100vh - 105px));
}

.hero::before {
  z-index: 0;
  inset: -20%;
  mask-image: none;
  background:
    radial-gradient(circle at 74% 30%, rgba(154, 103, 255, 0.42), transparent 34%),
    radial-gradient(circle at 59% 69%, rgba(35, 214, 225, 0.26), transparent 34%),
    radial-gradient(circle at 91% 88%, rgba(255, 77, 155, 0.2), transparent 27%);
  background-size: auto;
  filter: blur(28px);
  opacity: 1;
  animation: library-aurora 12s ease-in-out infinite alternate;
}

.hero::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  background-image:
    linear-gradient(rgba(197, 145, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(98, 230, 219, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
  mask-image: linear-gradient(90deg, transparent, black 44%, black);
  pointer-events: none;
}

@keyframes library-aurora {
  to {
    filter: blur(44px) hue-rotate(18deg);
    transform: translate3d(-2%, 2%, 0) scale(1.04);
  }
}

.hero-inner {
  z-index: 1;
  min-height: min(700px, calc(100vh - 105px));
}

.kicker,
.section-label,
.eyebrow {
  color: var(--dim);
}

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

.kicker::before,
.section-label::before {
  display: inline-block;
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  content: "";
}

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

h1,
h2 {
  font-weight: 500;
}

h1 {
  letter-spacing: -0.045em;
}

.hero h1 em,
.page-hero h1 em {
  -webkit-background-clip: text;
  background: var(--glow);
  background-clip: text;
  color: transparent;
}

.button {
  border-radius: 999px;
}

.button-primary {
  border-color: var(--ivory);
  background: var(--ivory);
  color: #17142a;
  box-shadow: 0 10px 36px rgba(98, 230, 219, 0.1);
}

.button-primary:hover {
  border-color: var(--ivory);
  background: var(--ivory);
  box-shadow: 0 12px 38px rgba(197, 145, 255, 0.22);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.045);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.ledger,
.shelf-card,
.route-step,
.note,
.era,
.reading-key,
.reading-groups,
.document,
.factory,
.key-row,
.thesis-main,
.thesis-aside,
.layer {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.ledger {
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12), 0 34px 90px rgba(0, 0, 0, 0.42);
}

.ledger-foot code,
.live,
.shelf-card-top b,
.shelf-card-open,
.route-number,
.note-title,
.receipt::before,
.era-index,
.reading-key span,
.reading-group b,
.document code,
.factory-head code,
.thesis-aside code,
.layer time,
.not-found-code {
  color: var(--cyan);
}

.stat-band {
  background: transparent;
}

.stats {
  gap: 12px;
  padding-block: 18px;
}

.stat {
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.section {
  position: relative;
  overflow: hidden;
}

.section::after {
  position: absolute;
  top: 10%;
  right: -18rem;
  width: 32rem;
  height: 32rem;
  background: radial-gradient(circle, rgba(197, 145, 255, 0.075), transparent 66%);
  content: "";
  pointer-events: none;
}

.section > .shell {
  position: relative;
  z-index: 1;
}

.shelf-grid,
.route,
.reading-map,
.document-list,
.factory-grid,
.thesis-panel,
.layer-grid {
  gap: 12px;
  border: 0;
  background: transparent;
}

.era-list,
.key-table {
  display: grid;
  gap: 10px;
  border: 0;
}

.shelf-card,
.document,
.factory,
.layer {
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.shelf-card:hover,
.document:hover,
.factory:hover,
.layer:hover {
  border-color: var(--line-bright);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  transform: translateY(-3px);
}

.route-step {
  border-right: 1px solid var(--line);
}

.route-step:not(:last-child)::after {
  display: none;
}

.note {
  border-left: 2px solid var(--cyan);
  border-radius: 0 16px 16px 0;
}

.receipt {
  border-top-style: solid;
}

.page-hero {
  background:
    radial-gradient(circle at 82% 6%, rgba(154, 103, 255, 0.22), transparent 30rem),
    radial-gradient(circle at 65% 60%, rgba(35, 214, 225, 0.08), transparent 28rem);
}

.page-hero::after {
  color: rgba(197, 145, 255, 0.075);
}

.page-fact {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.era {
  overflow: hidden;
  border-top: 1px solid var(--line);
}

.era:first-child {
  border-top: 1px solid var(--line);
}

.era:hover {
  border-color: var(--line-bright);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
}

.reading-key,
.reading-groups,
.thesis-main,
.thesis-aside {
  min-width: 0;
}

.era-chips span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.not-found {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 80% 14%, rgba(154, 103, 255, 0.28), rgba(35, 214, 225, 0.08) 34%, transparent 66%);
}

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

.footer-mark .wordmark-mark {
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 10px rgba(98, 230, 219, 0.35);
}

.footer-mark .wordmark-mark::after {
  display: none;
}

@media (max-width: 920px) {
  .nav-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-block: 15px;
  }

  .nav-links {
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .nav-lab {
    margin-left: auto;
  }

  .hero-inner,
  .page-hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    gap: 48px;
    min-height: auto;
  }

  .ledger {
    max-width: 560px;
  }

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

  .route-step:nth-child(2) {
    border-right: 0;
  }

  .route-step:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .route-step:nth-child(2)::after {
    display: none;
  }

  .reading-map {
    grid-template-columns: 1fr;
  }

  .reading-key {
    min-height: 230px;
  }

  .key-row {
    grid-template-columns: 150px 1fr;
  }

  .key-row span:last-child {
    grid-column: 2;
    border-top: 1px solid var(--line-soft);
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 32px, var(--max));
  }

  .nav-links {
    gap: 15px;
  }

  .nav-lab {
    display: none;
  }

  .hero-inner {
    padding-block: 70px;
  }

  .stats,
  .shelf-grid,
  .factory-grid,
  .document-list,
  .layer-grid,
  .thesis-panel {
    grid-template-columns: 1fr;
  }

  .stat {
    min-height: 100px;
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
  }

  .stat:last-child {
    border-bottom: 0;
  }

  .shelf-card {
    min-height: 285px;
  }

  .era {
    grid-template-columns: 56px 1fr;
  }

  .era-index {
    grid-row: span 2;
    padding-inline: 16px;
  }

  .era-name {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .era-copy {
    grid-column: 2;
  }

  .reading-groups {
    grid-template-columns: 1fr;
  }

  .reading-group,
  .reading-group:nth-child(even),
  .reading-group:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .reading-group:last-child {
    border-bottom: 0;
  }

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

  .key-row span:last-child {
    grid-column: auto;
  }

  .key-row > * {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .key-row > *:last-child {
    border-bottom: 0;
  }

  .note {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 520px) {
  .wordmark-divider,
  .wordmark-library {
    display: none;
  }

  .nav-links {
    font-size: 10.5px;
  }

  h1 {
    font-size: 41px;
  }

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

  .route-step,
  .route-step:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .route-step:last-child {
    border-bottom: 0;
  }

  .route-step::after {
    display: none;
  }

  .page-hero {
    padding-block: 62px;
  }

  .section {
    padding-block: 68px;
  }

  .footer-spacer {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (min-width: 641px) and (max-width: 920px) {
  .nav-inner {
    align-items: center;
    flex-direction: row;
    gap: 30px;
    padding-block: 0;
  }

  .nav-links {
    width: auto;
    margin-left: auto;
    overflow: visible;
    padding-bottom: 0;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 38px, var(--max));
  }

  .nav-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    padding-block: 14px 11px;
  }

  .nav-links {
    width: calc(100vw - 38px);
    margin-left: 0;
    gap: 19px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    flex: 0 0 auto;
  }

  .hero {
    min-height: 0;
  }

  .hero-inner {
    min-height: 0;
    padding-block: 64px;
  }

  .shelf-nav-inner {
    width: calc(100vw - 38px);
  }
}
