/* ============================================================
   AXYLITH — TECHNICAL DOCUMENT STYLESHEET
   A document, not a marketing page.
   ============================================================ */

@font-face {
  font-family: 'JetBrains Mono';
  font-weight: 400;
  font-style: normal;
  src: url('fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-weight: 700;
  font-style: normal;
  src: url('fonts/JetBrainsMono-Bold.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-weight: 400;
  font-style: italic;
  src: url('fonts/JetBrainsMono-Italic.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'EB Garamond';
  font-weight: 400;
  font-style: normal;
  src: url('fonts/EBGaramond-Regular.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'EB Garamond';
  font-weight: 400;
  font-style: italic;
  src: url('fonts/EBGaramond-Italic.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'EB Garamond';
  font-weight: 600;
  font-style: normal;
  src: url('fonts/EBGaramond-SemiBold.ttf') format('truetype');
  font-display: swap;
}

:root {
  --bg-deep:    #0a0b0d;
  --bg-base:    #0d0e10;
  --bg-raised:  #13151a;
  --bg-elev:    #1a1d23;

  --amber:      #c89858;
  --amber-dim:  #b88848;
  --amber-deep: #8a6638;

  --text-primary: #e8dcc8;
  --text-body:    #c8bca8;
  --text-muted:   #8b8275;
  --text-faint:   #5a5249;
  --text-quiet:   #3a342d;

  --rule:       #2a2620;
  --rule-soft:  #1e1c18;

  --serif: 'EB Garamond', 'Iowan Old Style', 'Palatino', Georgia, serif;
  --mono:  'JetBrains Mono', 'IBM Plex Mono', 'Menlo', monospace;

  --col-width: 960px;
  --col-narrow: 720px;
  --read-line: 1.6;
}

/* Global SVG text quality — applies to every SVG on the page */
svg { text-rendering: geometricPrecision; }
svg text { text-rendering: geometricPrecision; }

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text-body);
  font-family: var(--serif);
  font-size: 18px;
  line-height: var(--read-line);
  font-feature-settings: "kern" 1, "liga" 1, "onum" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  background-image:
    radial-gradient(ellipse at top, rgba(200, 152, 88, 0.025), transparent 50%),
    radial-gradient(ellipse at bottom, rgba(200, 152, 88, 0.015), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* Grain overlay — gives the page a paper feel */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   LOADING SCREEN
   ============================================================ */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg-deep);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
#loader.gone {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-mark {
  width: 64px;
  height: 64px;
  position: relative;
}
.loader-mark svg {
  width: 100%; height: 100%;
  animation: rotate-slow 8s linear infinite;
}
.loader-line {
  margin-top: 32px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--amber);
  text-transform: uppercase;
}
.loader-bar {
  margin-top: 24px;
  width: 220px;
  height: 1px;
  background: var(--rule);
  position: relative;
  overflow: hidden;
}
.loader-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--amber);
  transform-origin: left;
  animation: load-fill 1.6s cubic-bezier(0.6, 0, 0.2, 1) forwards;
}
.loader-sub {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

@keyframes rotate-slow {
  to { transform: rotate(360deg); }
}
@keyframes load-fill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ============================================================
   PAGE STRUCTURE
   ============================================================ */
.page {
  max-width: var(--col-width);
  margin: 0 auto;
  padding: 56px 40px 80px;
  position: relative;
  opacity: 0;
  animation: fade-up 1.2s 0.4s ease forwards;
}

/* Prose still has a comfortable max width inside the wider page */
.page p,
.page > section > h3,
.page > section > h4,
.page > section > ul,
.page > section > ol,
.page > section > pre,
.page > section > .aside,
.page > section > .pullquote {
  max-width: var(--col-narrow);
}
/* The "lede" first paragraph and figures/diagrams stretch fully */
.page p.lede {
  max-width: var(--col-narrow);
}
/* Figures bleed out PAST the page padding — full container width */
.fig, .diagram {
  /* full width within the page container, breaking out of the natural flow margin */
  max-width: 100%;
  margin-left: -20px;
  margin-right: -20px;
}
.pillars, .matrix, .subsystems, .timeline,
.byte-diagram, .ornament {
  max-width: 100%;
}
@media (max-width: 760px) {
  .fig, .diagram { margin-left: 0; margin-right: 0; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   MASTHEAD
   ============================================================ */
.masthead {
  text-align: center;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 40px;
  position: relative;
}

.mast-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 32px;
  display: block;
}

.mast-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 72px;
  letter-spacing: -0.02em;
  line-height: 0.95;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.mast-title em {
  font-style: italic;
  color: var(--amber);
}

.mast-sub {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 32px;
}

.mast-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-faint);
  line-height: 1.9;
  letter-spacing: 0.04em;
}

.mast-meta .row {
  display: flex;
  justify-content: space-between;
  max-width: 520px;
  margin: 0 auto;
  border-top: 1px solid var(--rule-soft);
  padding-top: 6px;
  margin-top: 6px;
}
.mast-meta .row:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 14px;
}
.mast-meta .row span:first-child {
  color: var(--text-quiet);
}
.mast-meta .row span:last-child {
  color: var(--text-muted);
}

/* ============================================================
   SECTIONS
   ============================================================ */
section {
  margin-bottom: 56px;
  position: relative;
}

.section-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--amber-deep);
  text-transform: uppercase;
  margin-bottom: 16px;
  display: block;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--text-primary);
  font-weight: 400;
  line-height: 1.2;
}

h2 {
  font-size: 36px;
  letter-spacing: -0.01em;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}

h2::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60px;
  height: 1px;
  background: var(--amber);
}

h3 {
  font-size: 22px;
  margin-top: 48px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

h3.numbered {
  display: flex;
  align-items: baseline;
  gap: 16px;
}
h3.numbered::before {
  content: attr(data-num);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--amber-deep);
  letter-spacing: 0.1em;
}

h4 {
  font-size: 16px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--amber);
  font-family: var(--mono);
  letter-spacing: 0.04em;
}

p {
  margin-bottom: 18px;
  color: var(--text-body);
}

p.lede {
  font-size: 21px;
  color: var(--text-primary);
  line-height: 1.55;
  margin-bottom: 28px;
  font-style: italic;
}

em { color: var(--text-primary); }
strong { color: var(--text-primary); font-weight: 600; }

a {
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid var(--amber-deep);
  transition: color 0.2s, border-color 0.2s;
}
a:hover {
  color: var(--text-primary);
  border-bottom-color: var(--amber);
}

ul, ol {
  margin: 18px 0 24px 0;
  padding-left: 28px;
}
li {
  margin-bottom: 10px;
  color: var(--text-body);
}
li::marker {
  color: var(--amber-deep);
}

ul.compact li, ol.compact li { margin-bottom: 4px; }

/* ============================================================
   PULL QUOTES / EMPHASIS
   ============================================================ */
.pullquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 26px;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 56px 0;
  padding: 0 0 0 32px;
  border-left: 2px solid var(--amber);
  position: relative;
}

.aside {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-raised);
  border-left: 2px solid var(--amber-deep);
  padding: 20px 24px;
  margin: 28px 0;
  line-height: 1.55;
}
.aside strong { color: var(--amber); }
.aside .label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin-bottom: 8px;
  display: block;
}

/* ============================================================
   CODE / MONO
   ============================================================ */
code {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--amber);
  background: var(--bg-raised);
  padding: 1px 5px;
  border-radius: 2px;
}

pre {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--bg-raised);
  border-left: 2px solid var(--amber-deep);
  padding: 18px 22px;
  margin: 24px 0;
  overflow-x: auto;
  white-space: pre;
}
pre code { background: transparent; padding: 0; color: inherit; }

/* ============================================================
   TABLES
   ============================================================ */
table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 12.5px;
  margin: 28px 0;
}
th {
  text-align: left;
  font-weight: 400;
  color: var(--amber);
  border-bottom: 1px solid var(--rule);
  padding: 10px 12px 10px 0;
  letter-spacing: 0.04em;
}
td {
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--text-body);
  vertical-align: top;
}
td:first-child { color: var(--text-primary); }
tr:last-child td { border-bottom: none; }

/* ============================================================
   ARCHITECTURE DIAGRAM
   ============================================================ */
.diagram {
  margin: 40px 0;
  padding: 32px 28px 22px;
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  border-radius: 2px;
}
.diagram svg {
  width: 100%;
  height: auto;
  display: block;
  text-rendering: geometricPrecision;
  shape-rendering: geometricPrecision;
}
.diagram svg text { text-rendering: geometricPrecision; }
.diagram-caption {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-align: center;
  margin-top: 12px;
}

/* ============================================================
   SUBSYSTEM CARDS
   ============================================================ */
.subsystems {
  margin: 32px 0;
}
.subsystem {
  border-top: 1px solid var(--rule-soft);
  padding: 24px 0;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
}
.subsystem:first-child { border-top: 1px solid var(--rule); }
.subsystem:last-child { border-bottom: 1px solid var(--rule); }
.subsystem .num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--amber-deep);
  letter-spacing: 0.1em;
}
.subsystem .body h4 {
  margin-top: 0;
  margin-bottom: 6px;
  font-family: var(--serif);
  font-size: 19px;
  color: var(--text-primary);
  letter-spacing: 0;
}
.subsystem .body p {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--text-body);
}
.subsystem .tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-right: 14px;
  margin-top: 6px;
}

/* ============================================================
   COMPARABLES MATRIX
   ============================================================ */
.matrix {
  margin: 32px 0;
}
.matrix-row {
  display: grid;
  grid-template-columns: 140px 1fr 90px;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--mono);
  font-size: 13px;
  align-items: baseline;
}
.matrix-row:first-child { border-top: 1px solid var(--rule); }
.matrix-row .name { color: var(--text-primary); }
.matrix-row .what { color: var(--text-muted); font-size: 12px; }
.matrix-row .axy {
  color: var(--amber);
  text-align: right;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================================================
   TIMELINE / ROADMAP
   ============================================================ */
.timeline {
  margin: 32px 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 80px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: var(--rule);
}
.tl-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 24px;
  padding: 14px 0;
  align-items: baseline;
  position: relative;
}
.tl-row::before {
  content: "";
  position: absolute;
  left: 76px;
  top: 22px;
  width: 9px;
  height: 9px;
  background: var(--amber);
  border-radius: 50%;
}
.tl-row .stage {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--amber);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.tl-row .what {
  font-size: 16px;
  color: var(--text-body);
}
.tl-row .what em {
  font-style: italic;
  color: var(--text-primary);
}

/* ============================================================
   SIGNATURE BLOCK
   ============================================================ */
.signature {
  margin-top: 96px;
  padding-top: 48px;
  border-top: 1px solid var(--rule);
  text-align: center;
}
.sig-line {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 28px;
}
.sig-name-block {
  display: inline-block;
  margin: 0 auto 12px;
}
.sig-name-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 34px;
  color: var(--text-primary);
  letter-spacing: 0.01em;
  padding: 0 32px 8px;
}
.sig-name-rule {
  width: 280px;
  margin: 0 auto;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--amber) 20%, var(--amber) 80%, transparent);
  opacity: 0.5;
}
.sig-name {
  width: 260px;
  height: 36px;
  margin: 0 auto 12px;
  display: block;
}
.sig-name svg { width: 100%; height: 100%; }
.sig-role {
  font-family: var(--serif);
  font-style: italic;
  color: var(--text-muted);
  font-size: 15px;
  margin-top: 14px;
}

.colophon {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  line-height: 1.9;
  text-align: center;
}
.colophon a { color: var(--text-muted); border-bottom-color: var(--rule); }
.colophon a:hover { color: var(--amber); border-bottom-color: var(--amber); }

/* ============================================================
   SITE FOOTER — proper, with social links
   ============================================================ */
.site-footer {
  max-width: var(--col-width);
  margin: 0 auto;
  padding: 60px 40px 80px;
  border-top: 1px solid var(--rule);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

.footer-col h5 {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 14px;
  font-weight: 400;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li {
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 12px;
}
.footer-col li::marker { content: ""; }
.footer-col a {
  color: var(--text-body);
  border-bottom: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s, border-color 0.2s;
}
.footer-col a:hover {
  color: var(--amber);
  border-bottom-color: var(--amber);
}
.footer-col svg {
  width: 13px;
  height: 13px;
  opacity: 0.7;
  flex-shrink: 0;
}
.footer-col a:hover svg { opacity: 1; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--rule-soft);
  padding-top: 24px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}
.footer-bottom .mark-mini {
  width: 16px; height: 16px;
  fill: #c89858;
  opacity: 0.6;
  margin-right: 8px;
  vertical-align: middle;
}
.footer-bottom a {
  color: var(--text-muted);
  border-bottom: none;
}
.footer-bottom a:hover { color: var(--amber); }
@media (max-width: 720px) {
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

/* ============================================================
   MASTHEAD ANIMATED MARK
   ============================================================ */
.mast-mark-large {
  width: 140px;
  height: 140px;
  margin: 0 auto 40px;
  display: block;
  position: relative;
}
.mast-mark-large svg { width: 100%; height: 100%; overflow: visible; }
.mast-mark-large .ring-1 { animation: rot-cw 24s linear infinite; transform-origin: 70px 70px; }
.mast-mark-large .ring-2 { animation: rot-ccw 18s linear infinite; transform-origin: 70px 70px; }
.mast-mark-large .ring-3 { animation: rot-cw 12s linear infinite; transform-origin: 70px 70px; }
.mast-mark-large .pulse-core { animation: core-pulse 3.2s ease-in-out infinite; transform-origin: center; }
.mast-mark-large .orbit-dot { animation: orbit-pulse 2.4s ease-in-out infinite; }
.mast-mark-large .orbit-dot.d2 { animation-delay: 0.6s; }
.mast-mark-large .orbit-dot.d3 { animation-delay: 1.2s; }

@keyframes rot-cw  { to { transform: rotate(360deg); } }
@keyframes rot-ccw { to { transform: rotate(-360deg); } }
@keyframes core-pulse {
  0%,100% { transform: scale(1);   opacity: 1;   }
  50%     { transform: scale(1.1); opacity: 0.85;}
}
@keyframes orbit-pulse {
  0%,100% { opacity: 0.3; }
  50%     { opacity: 1;   }
}

/* ============================================================
   FIGURES — common
   ============================================================ */
.fig {
  margin: 40px 0;
  padding: 32px 28px 22px;
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  border-radius: 2px;
  position: relative;
}
.fig svg {
  width: 100%;
  height: auto;
  display: block;
  text-rendering: geometricPrecision;
  shape-rendering: geometricPrecision;
}
.fig svg text {
  text-rendering: geometricPrecision;
  paint-order: stroke fill;
}
.fig-caption {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-align: center;
  margin-top: 14px;
}
.fig-caption em { color: var(--amber); font-style: normal; }

/* corner brackets */
.fig::before, .fig::after,
.fig > .bl, .fig > .br {
  content: "";
  position: absolute;
  width: 12px; height: 12px;
  border: 1px solid var(--amber-deep);
  opacity: 0.55;
}
.fig::before { top: 6px; left: 6px;  border-right: none; border-bottom: none; }
.fig::after  { top: 6px; right: 6px; border-left:  none; border-bottom: none; }
.fig > .bl   { bottom: 6px; left: 6px;  border-right: none; border-top: none; }
.fig > .br   { bottom: 6px; right: 6px; border-left:  none; border-top: none; }

/* ============================================================
   ANIMATED SVG ELEMENTS
   ============================================================ */
.svg-text-mono { font-family: 'JetBrains Mono', monospace; }
.svg-text-serif { font-family: 'EB Garamond', Georgia, serif; }

.dash-flow { stroke-dasharray: 4 4; animation: dash-march 22s linear infinite; }
@keyframes dash-march { to { stroke-dashoffset: -160; } }

.dash-slow { stroke-dasharray: 2 6; animation: dash-march-slow 36s linear infinite; }
@keyframes dash-march-slow { to { stroke-dashoffset: -240; } }

.fade-pulse { animation: fade-pulse 3.6s ease-in-out infinite; }
@keyframes fade-pulse {
  0%,100% { opacity: 0.4; }
  50%     { opacity: 1;   }
}

.node-pulse { animation: node-pulse 4s ease-in-out infinite; transform-origin: center; }
@keyframes node-pulse {
  0%,100% { transform: scale(1);    opacity: 0.85; }
  50%     { transform: scale(1.12); opacity: 1;    }
}

/* Stagger for galaxy nodes */
.gal-node:nth-child(3n) { animation-delay: 0.4s; }
.gal-node:nth-child(3n+1) { animation-delay: 0.9s; }
.gal-node:nth-child(3n+2) { animation-delay: 1.4s; }

/* ============================================================
   SECTION DIVIDERS — decorative ornament between sections
   ============================================================ */
.ornament {
  display: flex;
  justify-content: center;
  margin: 40px 0 16px;
}
.ornament svg {
  width: 160px;
  height: 20px;
  opacity: 0.6;
}

/* ============================================================
   BYTE DIAGRAM — for the file format section
   ============================================================ */
.byte-diagram {
  margin: 32px 0 24px;
  font-family: var(--mono);
  font-size: 10.5px;
}
.byte-diagram svg { width: 100%; height: auto; display: block; }

/* ============================================================
   PILLARS — three-card layout
   ============================================================ */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 48px 0;
}
.pillar {
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  padding: 24px 18px 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.pillar svg {
  width: 56px;
  height: 56px;
  display: block;
  margin: 0 auto 16px;
}
.pillar h4 {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--text-primary);
  margin: 0 0 6px 0;
  letter-spacing: 0;
}
.pillar .sub {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin-bottom: 10px;
}
.pillar p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
  text-align: left;
}
.pillar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(200,152,88,0.08), transparent 70%);
  pointer-events: none;
}
@media (max-width: 720px) {
  .pillars { grid-template-columns: 1fr; }
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   FOLIO (right edge running header — appears on scroll)
   ============================================================ */
.folio {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  transform-origin: right center;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.32em;
  color: var(--text-quiet);
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 100;
}
.folio.show { opacity: 1; }

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  :root { --bg-base: #fff; --bg-raised: #fafafa; --bg-deep: #fff; }
  body { background: white !important; color: #1a1a1a; }
  body::before { display: none; }
  #loader { display: none; }
  .folio { display: none; }
  .page { padding: 0; max-width: 100%; }
  h1, h2, h3, h4 { color: #1a1a1a; }
  .mast-title em { color: #8a6638; }
  .amber, a, code { color: #8a6638; }
  p, li, td { color: #2a2a2a; }
  .reveal { opacity: 1; transform: none; }

  /* Stop animations in print */
  .mast-mark-large .ring-1,
  .mast-mark-large .ring-2,
  .mast-mark-large .ring-3,
  .mast-mark-large .pulse-core,
  .mast-mark-large .orbit-dot,
  .node-pulse,
  .fade-pulse,
  .dash-flow,
  .dash-slow {
    animation: none !important;
  }
  /* keep figure backgrounds light in print */
  .fig, .pillar { background: #fafafa; border-color: #d8d4cc; }
  .fig::before, .fig::after, .fig > .bl, .fig > .br { border-color: #8a6638; opacity: 0.7; }
  /* page-break hints */
  section { break-inside: avoid-page; }
  .fig, .pillars { break-inside: avoid; }
}

@media (max-width: 720px) {
  .page { padding: 60px 22px 100px; }
  .mast-title { font-size: 48px; }
  h2 { font-size: 28px; }
  h3 { font-size: 19px; }
  body { font-size: 16px; }
  .matrix-row { grid-template-columns: 1fr; gap: 4px; }
  .matrix-row .axy { text-align: left; }
  .subsystem { grid-template-columns: 1fr; gap: 8px; }
  .tl-row { grid-template-columns: 1fr; gap: 4px; padding-left: 24px; }
  .timeline::before { left: 4px; }
  .tl-row::before { left: 0; }
}