:root {
  --paper: #f4f5f7;
  --graphite: #2c3340;
  --slate: #4a5568;
  --fog: #8896a7;
  --silver: #b0b8c4;
  --blue: #3b6ea5;
  --deep-blue: #2a5178;
  --cloud: #eaecf0;
  --grid: #e2e5ea;
  --threshold-note: "[0";
}

/* Compliance vocabulary: positioned start rendered `#b0b8c4` `3rem` contrasting secondary typeface (Google International Typographic (Swiss Design Intersection Observer scroll-triggered reveals. Create single observer threshold values `0 `threshold: [0 0.5` IntersectionObserver` Grotesk's subtle quirks (the open-tailed `a` `1.25rem` */

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 50% 22%, rgba(244, 245, 247, 0) 0, rgba(244, 245, 247, 0) 42%, #f4f5f7 78%),
    repeating-linear-gradient(90deg, #e2e5ea 0px, #e2e5ea 1px, transparent 1px, transparent 120px),
    repeating-linear-gradient(0deg, #e2e5ea 0px, #e2e5ea 1px, transparent 1px, transparent 120px);
  font-family: "Inter", sans-serif;
  font-size: clamp(1rem, 1.15vw, 1.125rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.7;
}

a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-color: #3b6ea5;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.6s ease, text-decoration-thickness 0.4s ease;
}

a:hover {
  color: var(--deep-blue);
  text-decoration-thickness: 2px;
}

.top-bar {
  height: 56px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 64px);
  border-bottom: 1px solid #b0b8c4;
  background: rgba(244, 245, 247, 0.94);
}

.domain-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--graphite);
}

.index-link {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.6;
}

.editorial-flow {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px 96px;
}

.hero-proposition {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-inner {
  max-width: 780px;
}

.hero-label {
  margin: 0 0 24px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.25rem, 7vw, 5.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--graphite);
  opacity: 0;
  animation: fadeMeasure 0.8s ease forwards;
}

.hero-proposition h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--graphite);
  opacity: 0;
  transform: translateY(12px);
  animation: fadeMeasure 0.8s ease 0.4s forwards;
}

@keyframes fadeMeasure {
  to { opacity: 1; transform: translateY(0); }
}

.rule-line {
  width: 100%;
  height: 1px;
  margin: 0;
  border: 0;
  background: transparent;
  position: relative;
}

.rule-line::before {
  content: "";
  display: block;
  width: 0;
  height: 1px;
  background: #b0b8c4;
  transition: width 0.8s ease-out;
}

.rule-line.is-visible::before {
  width: 100%;
}

.content-section {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(200px, 1fr);
  column-gap: 16px;
  padding: 64px 0 48px;
  opacity: 0.72;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.4s ease;
}

.content-section.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reading-column {
  grid-column: 1;
  max-width: 704px;
  padding-left: calc((100% / 12) + 8px);
}

.reading-column h2,
.table-of-contents h2 {
  margin: 0 0 24px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #2c3340;
}

.reading-column p {
  margin: 0 0 24px;
}

.reading-column p:last-child {
  margin-bottom: 0;
}

.kicker,
.margin-note,
.section-number,
.toc-list span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.6;
  color: #8896a7;
}

.kicker {
  margin: 0 0 16px;
  color: var(--fog);
}

.margin-column {
  grid-column: 2;
  padding-top: 4px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.4s ease;
}

.content-section.in-view .margin-column {
  opacity: 1;
  transform: translateY(0);
}

.section-number {
  display: block;
  margin-bottom: 24px;
  font-size: 3rem;
  font-weight: 300;
  line-height: 1;
  color: #b0b8c4;
  opacity: 0.3;
  transition: opacity 0.4s ease;
}

.margin-note {
  max-width: 240px;
  margin: 0 0 32px;
  color: var(--fog);
}

.logic-diagram {
  display: block;
  width: min(100%, 260px);
  height: auto;
  overflow: visible;
}

.logic-diagram path,
.logic-diagram .venn {
  fill: none;
  stroke: #b0b8c4;
  stroke-width: 1.5;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.logic-diagram .accent-line {
  stroke: #3b6ea5;
}

.logic-diagram circle {
  fill: #f4f5f7;
  stroke: #b0b8c4;
  stroke-width: 1.5;
}

.logic-diagram .active-node {
  fill: #3b6ea5;
  stroke: #3b6ea5;
  filter: drop-shadow(0 0 8px rgba(59, 110, 165, 0.3));
}

.draw-line,
.venn {
  stroke-dasharray: var(--line-length, 1);
  stroke-dashoffset: var(--line-length, 1);
  transition: stroke-dashoffset 1.2s ease-out;
}

.logic-diagram.is-drawn .draw-line,
.logic-diagram.is-drawn .venn {
  stroke-dashoffset: 0;
}

.table-of-contents {
  min-height: 70vh;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(200px, 1fr);
  column-gap: 16px;
  padding: 64px 0 0;
}

.toc-heading {
  padding-left: calc((100% / 12) + 8px);
}

.toc-list {
  grid-column: 2;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
}

.toc-list li {
  border-top: 1px solid #b0b8c4;
}

.toc-list li:last-child {
  border-bottom: 1px solid #b0b8c4;
}

.toc-list a {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  color: #2c3340;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration-color: #3b6ea5;
}

.toc-list span {
  flex: 0 0 32px;
  color: #8896a7;
}

@media (max-width: 768px) {
  .top-bar {
    padding: 0 24px;
  }

  .editorial-flow {
    padding: 0 24px 72px;
  }

  .content-section,
  .table-of-contents {
    grid-template-columns: 1fr;
  }

  .reading-column,
  .toc-heading {
    padding-left: 0;
  }

  .margin-column,
  .toc-list {
    grid-column: 1;
    margin-top: 40px;
  }

  .margin-note {
    max-width: none;
  }

  .section-number {
    font-size: 2.5rem;
  }
}
