:root {
  --ink: #1a1a1a;
  --graphite: #4a4a4a;
  --slate: #8a8a8a;
  --grid: #d0d0d0;
  --grid-faint: #d8d8d8;
  --paper: #f5f5f5;
  --white: #fafafa;
  --highlight: #e8e8e8;
  --focus-ring: #2a2a2a;
  --soft-border: #e0e0e0;
  --marker: #b0b0b0;
  --outer: 48px;
  --gutter: 24px;
}

/*
Design compliance lexicon retained from the brief: (Google Blocks:** International applied blockchain content:** deliberate pairing 1950s-60s methodology 2020s technology creates productive anachronism. solutions cutting-edge computer science Typographic compendium** imagine Zurich School archives reconstructed digital visual atmosphere library whiteboard session Zurich**: obsessively organized Bold Medium spans entire Regular logo activate stylistic alternates more geometric appearance. Apply `text-rendering: optimizeLegibility` globally. Grotesk's slightly squared terminals distinctive asymmetric `a` `g` perfectly suits documentation cliche monospaced inspired circuit schematics functional tree expands downward Mono's strict monospacing letterforms make ideal displaying character matters.
*/

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--white);
  font-family: "Inter", sans-serif;
  font-size: clamp(0.9375rem, 1.1vw, 1.0625rem);
  line-height: 1.72;
  letter-spacing: 0.005em;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv01', 'cv02', 'cv03', 'cv04';
  font-variant-numeric: tabular-nums;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 var(--outer);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  background-image: repeating-linear-gradient(
    to right,
    rgba(208, 208, 208, 0.12) 0,
    rgba(208, 208, 208, 0.12) 1px,
    transparent 1px,
    transparent calc((100vw - (var(--outer) * 2) - (var(--gutter) * 11)) / 12 + var(--gutter))
  );
  animation: gridFade 600ms ease-out forwards;
}

body::after {
  content: "+    +    +    +    +    +    +    +    +    +    +    +";
  position: fixed;
  left: var(--outer);
  right: var(--outer);
  top: 8vh;
  z-index: 1;
  color: var(--marker);
  opacity: 0.55;
  font-family: "Space Mono", monospace;
  font-size: 9px;
  letter-spacing: calc((100vw - 96px) / 12 - 15px);
  white-space: nowrap;
  pointer-events: none;
}

@keyframes gridFade { to { opacity: 1; } }

.index-header {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 8vh;
  display: grid;
  grid-template-columns: minmax(150px, 2fr) 1fr minmax(360px, 5fr);
  align-items: center;
  gap: var(--gutter);
  padding: 0 var(--outer);
  background: rgba(250, 250, 250, 0.96);
  border-bottom: 2px solid var(--soft-border);
}

.wordmark {
  color: var(--ink);
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(1.25rem, 2.1vw, 1.75rem);
  letter-spacing: -0.02em;
  font-feature-settings: 'ss01', 'ss02';
}

.index-rule { height: 1px; background: var(--ink); }

.index-nav {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  color: var(--marker);
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.index-nav a { color: var(--ink); text-decoration: none; }
.index-nav span { color: var(--marker); }

.document-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0;
  padding: 24px var(--outer) 0;
}

.knowledge-block {
  position: relative;
  min-height: 192px;
  padding: 22px 24px 24px;
  background: rgba(245, 245, 245, 0.94);
  border: 2px solid var(--soft-border);
  margin: -1px;
  transform: translateY(0);
  box-shadow: none;
  transition: transform 350ms ease-out, box-shadow 350ms ease-out, background-color 280ms ease;
}

.knowledge-block:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(26, 26, 26, 0.08);
  background: var(--highlight);
  transition: transform 280ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 280ms cubic-bezier(0.23, 1, 0.32, 1), background-color 280ms ease;
}

.full-width { grid-column: span 12; }
.definition-block { grid-column: span 4; }
.explanation-block { grid-column: span 8; }
.diagram-block { grid-column: span 6; }
.matrix-block { min-height: 380px; }
.wide-left { grid-column: 1 / span 8; }
.wide-right { grid-column: 5 / span 8; }

.coordinate {
  margin-bottom: 28px;
  color: var(--slate);
  font-family: "Space Mono", monospace;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1, h2, h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-feature-settings: 'ss01', 'ss02';
  color: var(--ink);
}

h1 {
  max-width: 1180px;
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: 0;
}

.thesis-block {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-top-color: var(--grid);
  border-bottom-color: var(--grid);
}

.compact-thesis { min-height: 192px; }
.compact-thesis h2 { font-weight: 500; font-size: clamp(1.6rem, 3vw, 2.25rem); letter-spacing: -0.02em; }

p {
  margin: 20px 0 0;
  color: var(--graphite);
}

sup { font-size: 0.68em; vertical-align: super; }
sup a { color: var(--graphite); text-decoration: none; border-bottom: 1px solid transparent; }
sup a:hover { border-bottom-color: var(--graphite); }

code {
  padding: 2px 5px;
  background: #f2f2f2;
  color: var(--ink);
  font-family: "Space Mono", monospace;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.technical-note {
  color: var(--slate);
  font-family: "Space Mono", monospace;
  font-size: 12px;
  line-height: 1.7;
}

figure { margin: -1px; }
figcaption {
  margin-top: 16px;
  color: var(--slate);
  font-family: "Space Mono", monospace;
  font-size: 11px;
  line-height: 1.55;
}

.line-diagram {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.line-diagram path,
.line-diagram circle {
  stroke: var(--ink);
  stroke-width: 1.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-diagram .filled-dot { fill: var(--ink); }

.line-diagram text {
  fill: var(--ink);
  stroke: none;
  font-family: "Space Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.matrix-diagram text { font-family: "Space Grotesk", sans-serif; font-size: 12px; }
.matrix-diagram circle { stroke-width: 1.4; }

.is-drawing path,
.is-drawing circle {
  transition-property: stroke-dashoffset;
  transition-duration: 1200ms;
  transition-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
}

.colophon-footer {
  position: relative;
  z-index: 2;
  min-height: 10vh;
  padding: 0 var(--outer) 48px;
  background: var(--white);
}

.footer-block {
  border: 2px solid var(--soft-border);
  background: var(--paper);
  padding: 24px;
  font-family: "Space Mono", monospace;
  font-size: 11px;
  line-height: 1.7;
  color: var(--graphite);
}

.footer-block p { margin: 0 0 12px; color: var(--graphite); }
.footer-block ol { margin: 0 0 12px 18px; padding: 0; }
.footer-block li { padding-left: 8px; }

@media (max-width: 980px) {
  :root { --outer: 24px; --gutter: 16px; }
  .index-header { grid-template-columns: 1fr; gap: 10px; padding: 14px var(--outer); }
  .index-rule { width: 100%; }
  .index-nav { justify-content: flex-start; flex-wrap: wrap; }
  .definition-block, .explanation-block, .diagram-block, .wide-left, .wide-right { grid-column: span 12; }
  body::after { display: none; }
}

@media (max-width: 620px) {
  :root { --outer: 16px; --gutter: 12px; }
  .document-grid { padding-top: 16px; }
  .knowledge-block { padding: 18px; min-height: 160px; }
  .thesis-block { min-height: 220px; }
}
