:root {
  --paper: #f2f3d9;
  --white: rgba(255, 255, 255, 0.42);
  --ink: #171717;
  --muted: #5d6471;
  --green: #6d28d9;
  --deep: #420217;
  --line: rgba(110, 125, 203, 0.7);
  --soft: rgba(109, 40, 217, 0.08);
  --mint: #ddd6fe;
  --amber: #b77828;
  --amber-soft: rgba(183, 120, 40, 0.16);
  --radius: 8px;
  --shadow: 0 12px 28px rgba(51, 28, 87, 0.12);
  --sans: Arial, Helvetica, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --nav-offset: 74px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #420217;
    --white: rgba(31, 41, 55, 0.34);
    --ink: #ededed;
    --muted: #d4d4d8;
    --green: #ddd6fe;
    --deep: #25000d;
    --line: rgba(255, 255, 255, 0.24);
    --soft: rgba(255, 255, 255, 0.08);
    --mint: #f5f3ff;
    --amber-soft: rgba(183, 120, 40, 0.2);
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 132px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--green);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover { text-decoration-thickness: 2px; }

button { font: inherit; cursor: pointer; }

button:disabled { cursor: default; opacity: 0.42; }

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #c58a32;
  outline-offset: 4px;
}

h1, h2, h3, p, figure { margin: 0; }

h1, h2, h3 {
  font-weight: 300;
  letter-spacing: 0;
  line-height: 1.15;
}

p + p { margin-top: 14px; }

svg { display: block; width: 100%; height: auto; }

svg text {
  fill: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
}

.skip-link {
  position: fixed;
  left: 20px;
  top: -70px;
  z-index: 100;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 10px 16px;
}

.skip-link:focus { top: 10px; }

.selsus-project-nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--nav-offset);
  padding: 1rem;
  background: transparent;
}

.selsus-project-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-decoration: none;
}

.selsus-project-brand img {
  width: 42px;
  height: 42px;
  filter: invert(25%) sepia(49%) saturate(2800%) hue-rotate(246deg) brightness(88%);
}

.project-nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0.25rem;
  background: rgba(82, 82, 91, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.project-nav-tabs a {
  padding: 0.7rem 1rem;
  border-radius: 6px;
  color: white;
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
}

.project-nav-tabs a:hover {
  background: rgba(255, 255, 255, 0.22);
  text-decoration: none;
}

.page-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  max-width: none;
  margin: auto;
  padding-top: var(--nav-offset);
}

.sidebar {
  position: sticky;
  top: var(--nav-offset);
  align-self: start;
  height: calc(100vh - var(--nav-offset));
  padding: 40px 22px 30px 30px;
}

.sidebar-label,
.eyebrow,
.figure-label,
.note-label,
.sidebar-note strong {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.13em;
}

.sidebar-label {
  margin: 0 0 20px;
  color: var(--muted);
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sidebar nav a {
  display: flex;
  gap: 12px;
  padding: 10px 5px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-decoration: none;
}

.sidebar nav a span {
  align-self: center;
  font-family: var(--mono);
  font-size: 10px;
  opacity: 0.8;
}

.sidebar nav a.active {
  padding-left: 10px;
  border-left-color: var(--green);
  background: rgba(109, 40, 217, 0.1);
  color: var(--green);
  font-weight: 650;
}

.sidebar-note {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.sidebar-note strong {
  font-size: 11px;
  letter-spacing: 0.02em;
}

.sidebar-note p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--amber);
}

.source-home {
  display: block;
  margin-top: 24px;
  color: var(--green);
  font-size: 11px;
}

main {
  min-width: 0;
  border-left: 1px solid var(--line);
}

.hero {
  position: relative;
  padding: 49px 54px 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  pointer-events: none;
  background-image:
    linear-gradient(135deg, rgba(124, 99, 224, 0.18) 0 1px, transparent 1px 96px),
    linear-gradient(45deg, rgba(124, 99, 224, 0.12) 0 1px, transparent 1px 120px);
  background-size: 180px 180px, 220px 220px;
}

.hero > * { position: relative; z-index: 1; }

.eyebrow {
  display: block;
  margin-bottom: 20px;
  color: var(--green);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 30px;
}

.hero h1,
.section-heading h2 {
  color: var(--green);
  font-weight: 300;
}

.hero h1 {
  font-size: clamp(36px, 3.65vw, 60px);
  line-height: 1.08;
}

.hero h1 em {
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
}

.hero-intro {
  max-width: 530px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.signal-title {
  margin-top: 26px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 300;
}

.signal-title + .hero-detail {
  margin-top: 8px;
}

.hero-detail {
  max-width: 550px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 24px;
}

.hero-chips span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--green);
  font-size: 10px;
}

.hero-figure svg {
  border: 1px solid var(--line);
  border-radius: 4px;
}

.hero-bottom {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-top: 43px;
  padding: 23px 0 25px;
  border-top: 1px solid var(--line);
}

.hero-bottom p {
  max-width: 750px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.hero-bottom strong { color: var(--ink); }

.hero-bottom a {
  margin-left: auto;
  color: var(--green);
  font-size: 11px;
  white-space: nowrap;
}

.content { padding: 0 54px; }

.scope-note {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 20px;
  align-items: start;
  padding: 27px 0 28px;
  border-bottom: 1px solid var(--line);
}

.note-label {
  padding-top: 3px;
  color: var(--muted);
}

.scope-note p {
  max-width: 880px;
  color: var(--muted);
  font-size: 13px;
}

.section {
  padding: 62px 0;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  max-width: 730px;
  margin-bottom: 32px;
}

.section-heading .eyebrow { margin-bottom: 15px; }

.section-heading h2 {
  font-size: clamp(30px, 3vw, 45px);
  line-height: 1.12;
}

.section-heading > p {
  max-width: 690px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 15px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.split-follow { margin-top: 20px; }

.panel,
.case-card,
.timeline-figure,
.projection-lab,
.output-block,
.closing-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel { padding: 26px; }

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

.small-index {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font: 11px var(--mono);
}

.panel h3 {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.panel p,
.fit-details p,
.output-block p,
.case-card p,
.review-list p {
  color: var(--muted);
  font-size: 13px;
}

.diagram { margin: 18px 0 8px; }

.formula {
  margin: 4px 0 16px;
  padding: 12px 10px;
  border-radius: 4px;
  background: var(--soft);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.8;
  text-align: center;
}

.inline-math {
  font-family: var(--mono);
  font-size: 0.9em;
  white-space: nowrap;
}

.source-line {
  margin-top: 20px !important;
  color: var(--muted);
  font-size: 11px !important;
  line-height: 1.7 !important;
}

.source-line a { color: var(--green); }

.convention-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 22px 0 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.convention-strip > div + div {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.convention-strip span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.convention-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.8;
}

.convention-strip small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.timeline-figure {
  overflow: hidden;
  margin-top: 22px;
}

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

.time-cell {
  position: relative;
  padding: 22px;
  border-right: 1px solid var(--line);
}

.time-cell:last-child { border-right: 0; }

.time-cell:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 44%;
  right: -11px;
  z-index: 1;
  width: 22px;
  background: var(--paper);
  color: var(--green);
  font-size: 17px;
  text-align: center;
}

.time-cell > span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.time-cell svg {
  max-height: 120px;
  margin: 8px auto 10px;
}

.time-cell strong {
  display: block;
  font-size: 12px;
  font-weight: 650;
}

.time-cell p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.timeline-figure figcaption {
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
  font-size: 10px;
}

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

.case-card {
  min-width: 0;
  padding: 16px;
}

.case-card > svg { margin-bottom: 14px; }

.case-number {
  color: var(--muted);
  font: 10px var(--mono);
}

.case-card h3 {
  margin-top: 7px;
  font-size: 16px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.case-card p {
  margin-top: 12px;
  font-size: 11px;
  line-height: 1.8;
}

.case-card strong {
  display: block;
  margin-top: 13px;
  color: var(--green);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.6;
}

.projection-lab {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  overflow: hidden;
  margin-top: 22px;
}

.projection-copy {
  padding: 28px;
  border-right: 1px solid var(--line);
  background: var(--soft);
}

.figure-label {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 9px;
}

.projection-copy h3 { font-size: 24px; }

.projection-copy p {
  color: var(--muted);
  font-size: 12px;
}

.example-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 22px;
}

.example-buttons button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
}

.example-buttons button[aria-pressed="true"] {
  border-color: var(--green);
  background: var(--green);
  color: var(--paper);
}

.map-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}

.projection-stage {
  align-self: center;
  min-width: 0;
  padding: 25px;
}

.projection-stage > svg {
  border: 1px solid var(--line);
  border-radius: 4px;
}

.projection-stage figcaption {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.legend { white-space: nowrap; }

.swatch {
  display: inline-block;
  width: 14px;
  height: 8px;
  margin-right: 7px;
  vertical-align: middle;
}

.swatch.material { background: #246757; }
.swatch.mixed { background: #7eae9a; }
.swatch.peripheral { background: #a87327; }

.map-point { transition: opacity 160ms ease; }
.map-point.material { fill: #246757; }
.map-point.mixed { fill: #7eae9a; }
.map-point.peripheral { fill: #a87327; }
.map-point.is-dim { opacity: 0.16; }

.headline-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 8px 0 28px;
}

.headline-metrics article {
  padding-right: 22px;
  border-right: 1px solid var(--line);
}

.headline-metrics article:last-child { border: 0; }

.headline-metrics strong {
  color: var(--green);
  font-size: 51px;
  font-weight: 550;
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.headline-metrics h3 {
  margin-top: 13px;
  font-size: 13px;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.headline-metrics p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

.evidence-table-wrap { overflow-x: auto; }

.evidence-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.7;
  text-align: left;
}

.evidence-table caption {
  padding-bottom: 12px;
  color: var(--muted);
  font-size: 11px;
  text-align: left;
}

.evidence-table th,
.evidence-table td {
  padding: 16px 18px;
  border: 1px solid var(--line);
  vertical-align: top;
}

.evidence-table thead th {
  background: var(--soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.evidence-table tbody th {
  width: 24%;
  background: var(--soft);
  font-weight: 650;
}

.evidence-table td { color: var(--muted); }

.note-bar {
  margin-top: 25px;
  padding: 18px 23px;
  border-left: 3px solid var(--amber);
  background: var(--amber-soft);
}

.note-bar strong {
  color: var(--ink);
  font-size: 12px;
}

.note-bar p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.output-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 28px;
  padding: 30px;
}

.output-block h3 {
  font-size: 24px;
  line-height: 1.2;
}

.review-list {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: review;
}

.review-list li {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 25px 0;
  border-top: 1px solid var(--line);
}

.review-list li::before {
  content: "0" counter(review);
  counter-increment: review;
  padding-top: 2px;
  color: var(--green);
  font: 14px var(--mono);
  opacity: 0.7;
}

.review-list h3 { font-size: 19px; }

.review-section { border-bottom: 0; }

.closing-card {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 30px;
  padding: 25px 29px;
  color: var(--ink);
}

.brand-icon {
  flex: none;
  width: 27px;
  height: 27px;
  border: 7px solid var(--green);
  color: var(--green);
}

.closing-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.closing-card strong {
  color: var(--green);
  font-size: 13px;
}

.closing-card a {
  margin-left: auto;
  color: var(--green);
  font-size: 10px;
  white-space: nowrap;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
}

footer a { color: var(--muted); }

@media (min-width: 1500px) {
  .hero,
  .content { padding-left: 70px; padding-right: 70px; }
  .hero h1 { font-size: 58px; }
  .section { padding-top: 70px; padding-bottom: 70px; }
}

@media (max-width: 1200px) {
  .page-shell { grid-template-columns: 186px minmax(0, 1fr); }
  .sidebar { padding-left: 20px; padding-right: 12px; }
  .sidebar nav a { gap: 9px; font-size: 11px; }
  .hero { padding: 36px 32px 0; }
  .content { padding: 0 32px; }
  .hero h1 { font-size: 40px; }
  .hero-intro { font-size: 16px; }
  .panel { padding: 20px; }
  .case-grid { grid-template-columns: 1fr 1fr; }
  .projection-lab { grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.1fr); }
}

@media (max-width: 960px) {
  html { scroll-padding-top: 132px; }

  .page-shell { display: block; }

  .sidebar {
    position: sticky;
    top: var(--nav-offset);
    z-index: 15;
    height: auto;
    padding: 0 20px;
    overflow-x: auto;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }

  .sidebar-label,
  .sidebar-note,
  .source-home { display: none; }

  .sidebar nav {
    flex-direction: row;
    gap: 10px;
    min-width: max-content;
  }

  .sidebar nav a {
    padding: 13px 8px;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }

  .sidebar nav a.active {
    padding-left: 8px;
    border-bottom-color: var(--green);
    background: none;
  }

  .sidebar nav a span { display: none; }

  main { border: 0; }

  .hero { padding: 38px 36px 0; }
  .hero h1 { font-size: 46px; }
  .content { padding: 0 36px; }
  .hero-grid,
  .two-col,
  .output-block,
  .projection-lab,
  .scope-note { grid-template-columns: 1fr; }

  .projection-copy {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .time-cell:nth-child(2),
  .time-cell:nth-child(4) { border-right: 0; }

  .time-cell:nth-child(2)::after,
  .time-cell:nth-child(4)::after { content: none; }

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

  .convention-strip { grid-template-columns: 1fr 1fr; }

  .convention-strip > div + div {
    padding-left: 0;
    border-left: 0;
  }

  .convention-strip > div:nth-child(even) {
    padding-left: 18px;
    border-left: 1px solid var(--line);
  }

  .convention-strip > div:nth-child(n+3) {
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .headline-metrics { grid-template-columns: 1fr; }

  .headline-metrics article {
    padding: 0 0 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .headline-metrics article:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  :root { --nav-offset: 66px; }

  .selsus-project-nav {
    min-height: 66px;
    padding: 0.75rem 1rem;
  }

  .selsus-project-brand span { display: none; }

  .project-nav-tabs a {
    padding: 0.58rem 0.68rem;
    font-size: 0.68rem;
  }

  .hero { padding: 32px 23px 0; }
  .hero h1 { font-size: 36px; }
  .content { padding: 0 23px; }
  .hero-bottom { display: block; }
  .hero-bottom a { display: inline-block; margin: 12px 0 0; }
  .case-grid,
  .timeline-row,
  .convention-strip { grid-template-columns: 1fr; }

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

  .time-cell::after { content: none !important; }
  .time-cell:last-child { border-bottom: 0; }

  .convention-strip > div:nth-child(even) {
    padding-left: 0;
    border-left: 0;
  }

  .convention-strip > div + div {
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .closing-card,
  footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .closing-card a { margin-left: 0; }
  .projection-stage figcaption { flex-wrap: wrap; }
}

@media (prefers-color-scheme: dark) {
  .selsus-project-brand img { filter: none; }
}

@media (prefers-color-scheme: dark) and (min-width: 961px) {
  .sidebar nav a.active { background: rgba(221, 214, 254, 0.12); }
}
