/* ═══════════════════════════════════════════════════════════════════
   AMYKELLAM.COM — CONSOLIDATED STYLESHEET
   Paper → water descent. Libre Baskerville + IBM Plex Mono.
   ═══════════════════════════════════════════════════════════════════ */


/* ── 1. Fonts ────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 400;
  /*size-adjust: 106%;*/
  font-display: swap;
  src: url('/assets/fonts/libre-baskerville-v24-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Libre Baskerville';
  font-style: italic;
  font-weight: 400;
  /*size-adjust: 106%;*/
  font-display: swap;
  src: url('/assets/fonts/libre-baskerville-v24-latin-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 700;
  /*size-adjust: 106%;*/
  font-display: swap;
  src: url('/assets/fonts/libre-baskerville-v24-latin-700.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-v20-latin-regular.woff2') format('woff2');
}


:root {
  /* Paper */
  --paper:       #faf9f5;
  --paper-warm:  #f4f2ea;
  --paper-cool:  #eef1ec;
  --paper-light: #ffffff;
  --mist:        #e6ebe5;
  --pale-sage:   #dde4dc;
  --soft-water:  #c5d6ce;
  --water:       #9bbcb4;

  /* Ink */
  --ink:        #1d5a7a;
  --ink-deep:   #164a66;
  --ink-mid:    #427b88;
  --ink-quiet:  #6f9e9a;

  /* Rule & accent */
  --rule:       #b4b5a8;
  --rule-faint: #d2d3c8;
  --accent:     #2c7a6b;
  --sage:       #5c9c8f;

  /* Families */
  --serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --mono:  'IBM Plex Mono', 'Lucida Sans Typewriter', 'Courier New', monospace;

/* Fluid type scale */
--step--2: clamp(0.6875rem, 0.66rem + 0.14vw, 0.75rem);    /* 11–12px */
--step--1: clamp(0.75rem,   0.72rem + 0.20vw, 0.8125rem);  /* 12–13px */
--step-0:  clamp(0.875rem,  0.84rem + 0.25vw, 1.00rem);    /* 14–16px */
--step-1:  clamp(1.00rem,   0.94rem + 0.35vw, 1.15rem);    /* 16–18.4px */
--step-2:  clamp(1.125rem,  1.04rem + 0.50vw, 1.35rem);    /* 18–21.6px */
--step-3:  clamp(1.30rem,   1.16rem + 0.75vw, 1.65rem);    /* 20.8–26.4px */
--step-4:  clamp(1.55rem,   1.35rem + 1.10vw, 2.10rem);    /* 24.8–33.6px */

  /* ── Spacing ───────────────────────────────────────────────────
     --space-unit is tied to the x-height of the current text, so
     spacing scales with the body — not with the viewport.
     ─────────────────────────────────────────────────────────────── */
  --space-unit: 1ex;

  /* Role-named spacing — the semantic layer.
     Reach for these when you want to say *what* a gap is for. */
  --space-default:    calc(var(--space-unit) / 0.32);   /* paragraphs */
  --space-list-items: calc(var(--space-unit) / 0.64);   /* list items */

  /* Heading spacing — swaps at 780px (see media query below) */
  --space-l1: calc(var(--space-unit) * 0.5);   /* h1 — narrow default */
  --space-l2: calc(var(--space-unit) * 0.75);  /* h2 — narrow default */
  --space-l3: calc(var(--space-unit) * 0.5);   /* h3 — narrow default */
  --space-l4: calc(var(--space-unit) * 0.4);   /* h4 — narrow default */

  /* Generic scale — the working layer.
     Used by components throughout this stylesheet. */
  --space-3xs: calc(var(--space-unit) * 0.15);
  --space-2xs: calc(var(--space-unit) * 0.35);
  --space-xs:  calc(var(--space-unit) * 0.6);
  --space-s:   calc(var(--space-unit) * 1);
  --space-m:   var(--space-default);
  --space-l:   calc(var(--space-unit) * 2);
  --space-xl:  calc(var(--space-unit) * 3.5);
  --space-2xl: calc(var(--space-unit) * 6);

  /* Measures */
  --measure:        66ch;
  --measure-narrow: 55ch;
  --measure-wide:   70ch;

  /* Layout */
  --max:   1060px;
  --pad-x: clamp(1.25rem, 1rem + 1.5vw, 2rem);
}

/* Heading spacing swaps to the "lg" values above 780px */
@media (min-width: 780px) {
  :root {
    --space-l1: calc(var(--space-unit) * 1);
    --space-l2: calc(var(--space-unit) * 1.5);
    --space-l3: calc(var(--space-unit) * 1.25);
    --space-l4: calc(var(--space-unit) * 1);
  }
}

/* ── 3. Reset ────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, li, blockquote, figure {
  margin: 0;
  padding: 0;
}


/* ── 4. Body & background ────────────────────────────────────────── */

body {
  font-family: var(--serif);
  font-size: var(--step-0);
  line-height: 1.5;
  color: var(--ink);
  min-height: 100vh;
  background: linear-gradient(
    to bottom,
    var(--paper)      0%,
    var(--paper)      32%,
    var(--paper-warm) 48%,
    var(--paper-cool) 62%,
    var(--mist)       74%,
    var(--pale-sage)  89%,
    var(--soft-water) 96%,
    var(--water)      100%
  );
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "onum" 1;
}

nav, main, .site-footer { position: relative; z-index: 2; }


/* ── 5. Links — wavy underline on hover ──────────────────────────── */

a {
  text-decoration: none;
  color: #2c7a6b;
  border-bottom: 1px solid #2c7a6b;
  padding-bottom: 0.12em;
  transition: border-bottom 0.1s ease;
}
a:hover {
  border-bottom: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg id='squiggle-link' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 4'%3E%3Cstyle type='text/css'%3E.squiggle{animation:shift .3s linear infinite;}@keyframes shift {from {transform:translateX(0);}to {transform:translateX(-20px);}}%3C/style%3E%3Cpath fill='none' stroke='%235c9c8f' stroke-width='2' class='squiggle' d='M0,3.5 c 5,0,5,-3,10,-3 s 5,3,10,3 c 5,0,5,-3,10,-3 s 5,3,10,3'/%3E%3C/svg%3E");
  background-position: 0 calc(100% - 1.5px);
  background-size: auto 3px;
  background-repeat: repeat-x;
  padding-bottom: 3px;
  text-decoration: none;
}

/* ── 6. Base headings — declared ONCE ────────────────────────────── */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink-deep);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--step-4); line-height: 1.1; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

h1 { margin: 0 0 var(--space-l1); }
h2 { margin: var(--space-default) 0 var(--space-l1); }
h3 { margin: var(--space-default) 0 var(--space-l1); }

/* ── 7. Utilities ────────────────────────────────────────────────── */

.subhead {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-deep);
  margin: 0 0 var(--space-l);
  padding-bottom: var(--space-s);
  border-bottom: 1px solid var(--rule-faint);
}

.lead,
.statement {
  font-size: var(--step-1);
  font-style: italic;
  line-height: 1.55;
  color: var(--ink);
  max-width: var(--measure-narrow);
  margin: 0 0 var(--space-l);
}

.positions {
  font-size: var(--step--1);
  line-height: 1.55;
  color: var(--ink-mid);
  max-width: var(--measure-narrow);
  margin: 0 0 var(--space-l);
}

.alert {
  max-width: var(--measure-narrow);
  padding-left: var(--space-s);
  border-left: 1px solid var(--rule);
  font-size: var(--step--1);
  line-height: 1.65;
  color: var(--ink-mid);
}
.alert strong { font-weight: 400; color: var(--ink); }


/* ── 8. Layout primitives ────────────────────────────────────────── */

.column {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.prose {
  max-width: var(--measure);
  margin: 0 auto;
  padding-bottom: var(--space-2xl);
}
.prose p, .sections-content p                 { margin: 0 0 var(--space-default); }
.prose li, .sections-content li               { margin-bottom: var(--space-list-items); }
.prose li:last-child, .sections-content li:last-child    { margin-bottom: 0; }
.prose ul, .sections-content ul,
.prose ol,  .sections-content ol           { padding-left: var(--space-default);
  margin: 0 0 var(--space-default); }

.page-head {
  max-width: var(--measure);
  margin: 0 auto;
  padding: var(--space-2xl) 0 var(--space-l);
}
.page-head h1 { margin: 0 0 var(--space-s); }


/* ── 9. Dot-line-dot mark ────────────────────────────────────────── */

.mark {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  margin: var(--space-l) 0;
}
.mark-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sage);
  flex-shrink: 0;
}
.mark-rule {
  flex: 1;
  height: 1px;
  background: var(--sage);
  opacity: 0.5;
}
.mark-num,
.mark-label {
  font-family: var(--mono);
  font-size: var(--step--2);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  flex-shrink: 0;
  color: var(--ink-deep);
}


/* ── 10. Navigation ──────────────────────────────────────────────── */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 245, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: var(--space-m);
  border-bottom: 1px solid var(--rule-faint);
}

.nav-container {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--space-s) var(--pad-x);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-s);
}

.nav-brand {
  font-family: var(--serif);
  font-size: var(--step-0);
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--ink-deep);
  text-decoration: none;
  border-bottom: none;
  padding-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.nav-brand::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  display: inline-block;
  flex-shrink: 0;
}

.nav-brand:hover {
  border-bottom: none;
  background-image: none;
  color: var(--ink-deep);
  padding-bottom: 0;
}
.nav-links {
  display: flex;
  gap: var(--space-l);
  list-style: none;
  padding: 0;
  align-items: baseline;
}

.nav-links > li > a {
  font-family: var(--mono);
  font-size: var(--step--2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-deep);
  text-decoration: none;
  background-image: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  transition: color 0.2s, border-color 0.2s;
}

/* Hover: colour shift + faint rule */
.nav-links > li > a:hover {
  color: var(--accent);
  border-bottom-color: var(--rule-faint);
  background-image: none;
}

/* Active: colour shift + solid rule in accent */
.nav-links > li > a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background-image: none;
}

.nav-dropdown .dropdown-menu a.active,
.nav-dropdown .dropdown-submenu a.active {
  color: var(--accent);
  background: var(--paper-warm);
}
.nav-dropdown {
  position: relative;
}

.nav-dropdown .dropdown-menu {
  position: absolute;
  top: 100%;
  left: -0.9rem;
  min-width: 220px;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: var(--space-2xs) 0;
  list-style: none;
  margin: var(--space-xs) 0 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  box-shadow: 0 16px 36px -26px rgba(22, 74, 102, 0.35);
  z-index: 1000;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
}

.nav-dropdown .dropdown-menu li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-dropdown .dropdown-menu a {
  display: block;
  padding: var(--space-2xs) var(--space-s);
  font-family: var(--serif);
  font-size: var(--step--1);
  letter-spacing: 0.005em;
  line-height: 1.35;
  text-transform: none;
  color: var(--ink);
  text-decoration: none;
  border-bottom: none;
  background-image: none;
}
.nav-dropdown .dropdown-menu a:hover {
  background: var(--paper-warm);
  color: var(--accent);
  border-bottom: none;
  background-image: none;
}

.nav-dropdown .dropdown-menu .dropdown-divider {
  height: 1px;
  background: var(--rule-faint);
  margin: var(--space-2xs) var(--space-s);
  padding: 0;
  list-style: none;
}

.nav-toggle-checkbox,
.nav-toggle-label,
.nav-dropdown-checkbox,
.dropdown-arrow { display: none; }

.nav-dropdown .dropdown-submenu {
  list-style: none;
  margin: 0;
  padding: 0 0 0 var(--space-s);
  border-left: 1px solid var(--rule-faint);
  margin-left: var(--space-s);
  margin-top: var(--space-2xs);
}

.nav-dropdown .dropdown-submenu a {
  padding-left: var(--space-s);
  font-size: var(--step--2);
  color: var(--ink-mid);
}

.nav-dropdown .dropdown-submenu a:hover {
  color: var(--accent);
  background: var(--paper-warm);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* ── 11. Sections layout (with optional strata slice) ────────────── */

.sections-layout {
  display: grid;
  grid-template-columns: 56px 1fr;
    gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
  max-width: 940px;
  margin: 0 auto;
}


.sections-layout.no-slice {
  grid-template-columns: 1fr;
  max-width: var(--measure);
  margin: 0 auto;
}

.strata-slice {
  position: sticky;
  top: 2rem;
  width: 56px;
  height: 700px;
  display: block;
  border: 1px solid #cfcabf;
  border-radius: 2px;
  overflow: hidden;
  background-image: url('assets/strata-slice.svg');
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.sections-content { max-width: none; }
.sections-content > * { max-width: var(--measure); }
section.sect {
  padding: 0 0 var(--space-2xl);
}
section.sect:last-child { padding-bottom: 0; }

.sect h2 {
  font-style: italic;
  line-height: 1.32;
  margin: 0 0 var(--space-m);
  padding-top: 0.8rem;
}
.sect p {
  color: var(--ink);
  margin: 0 0 var(--space-s);
}
.sect p:last-child { margin-bottom: 0; }

.sect .meta-link {
  display: inline-block;
  margin-top: var(--space-s);
  font-family: var(--mono);
  font-size: var(--step--2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.25em;
}
.sect .meta-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background-image: none;
}


/* ── 12. Prose details ───────────────────────────────────────────── */

.prose h2 {
  font-style: italic;
  line-height: 1.32;
  margin: var(--space-xl) 0 var(--space-m);
}
.prose h2:first-of-type { margin-top: 0; }

.prose h3 {
  font-style: italic;
  line-height: 1.4;
  margin: var(--space-l) 0 var(--space-xs);
}

.prose em     { font-style: italic; }
.prose strong { font-weight: 700; color: var(--ink-deep); }


/* ── 13. Publication list ────────────────────────────────────────── */

.pub-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pub-list li {
  padding: var(--space-s) 0 var(--space-s) var(--space-s);
  border-left: 1px solid var(--rule-faint);
  margin: 0 0 var(--space-2xs);
  line-height: 1.65;
  color: var(--ink);
}
.pub-list li:last-child { margin-bottom: 0; }

.pub-date {
  font-family: var(--mono);
  font-size: var(--step-0);
  letter-spacing: 0.12em;
  color: var(--ink-mid);
  margin-right: 0.65rem;
  text-transform: uppercase;
}

.venue { font-style: italic; }


/* ── 14. Working papers index ────────────────────────────────────── */

.papers {
  list-style: none;
  padding: 0;
  margin: 0;
}
.papers li {
  padding: var(--space-l) 0;
  border-top: 1px solid var(--rule-faint);
}
.papers li:last-child {
  border-bottom: 1px solid var(--rule-faint);
}
.paper-title {
  font-family: var(--serif);
  font-size: var(--step-1);
  font-weight: 400;
  font-style: italic;
  line-height: 1.35;
  margin: 0 0 var(--space-s);
  color: var(--ink-deep);
}
.paper-title a {
  color: inherit;
  border-bottom: none;
  padding-bottom: 0;
}
.paper-title a:hover {
  color: var(--accent);
  background-image: none;
}
.paper-desc {
  font-size: var(--step--1);
  line-height: 1.6;
  color: var(--ink-mid);
  margin: 0;
}


/* ── 15. Notes and callouts ──────────────────────────────────────── */

.note {
  background: rgb(255 255 255 / 70%);
  border-left: 3px solid var(--sage);
  padding: var(--space-s) var(--space-m);
  font-size: var(--step-0);
  line-height: 1.5;
  color: var(--ink);
  margin: var(--space-m) 0;
  max-width: var(--measure);
}
.note p { margin: 0; }
.note h3 {
  margin: 0 0 var(--space-s);
  font-family: var(--serif);
  font-size: var(--step-1);
  font-weight: 400;
  font-style: normal;
  color: var(--ink-deep);
}

.impact-note {
  margin-top: var(--space-2xs);
  padding-left: var(--space-s);
  border-left: 2px solid var(--rule);
  font-size: var(--step--2);
  line-height: 1.55;
  color: var(--ink-mid);
}
.impact-note strong {
  font-weight: 700;
  color: var(--ink-deep);
}

.call-alert {
  background: rgb(255 255 255 / 60%);
  border-left: 3px solid var(--rule);
  padding: var(--space-s) var(--space-m);
  margin: var(--space-m) 0;
  font-size: var(--step--1);
  line-height: 1.55;
  max-width: var(--measure-wide);
  color: var(--ink);
}
.call-alert a { white-space: nowrap; }


/* ── 16. Bulleted lists ──────────────────────────────────────────── */

ul.bulleted {
  list-style: disc;
  padding-left: var(--space-m);
  margin: 0 0 var(--space-m);
}
ul.bulleted li {
  margin-bottom: var(--space-xs);
  line-height: 1.6;
  color: var(--ink);
}
ul.bulleted li:last-child { margin-bottom: 0; }


/* ── 17. Separator ───────────────────────────────────────────────── */

.separator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: var(--space-m) 0;
}
.separator .dot {
  width: 5px;
  height: 5px;
  background: var(--sage);
  border-radius: 50%;
  flex-shrink: 0;
}
.separator .line {
  flex: 1;
  height: 1px;
  background: var(--rule);
}


/* ── 18. Technical demos — Heartbeat, Attestation, notes, blackbox ─────────── */

.hb-hero {
  background: var(--paper-cool);
  padding: var(--space-s) var(--space-m);
  margin: var(--space-m) 0;
}
.hb-hero p { margin: 0; }
.hb-hero p + p { margin-top: var(--space-xs); }

.hb-steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-s);
  margin: var(--space-m) 0;
}
.hb-steps li {
  background: var(--paper-light);
  border: 1px solid var(--pale-sage);
  border-radius: 4px;
  padding: var(--space-m);
  font-size: var(--step--1);
  line-height: 1.55;
}
.hb-steps li strong {
  display: block;
  font-family: var(--mono);
  font-size: var(--step--2);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-deep);
  margin-bottom: var(--space-2xs);
}

.hb-table-wrap {
  overflow-x: auto;
  margin: var(--space-m) 0;
}
.hb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
}
.hb-table th {
  background: var(--mist);
  text-align: left;
  padding: var(--space-xs) var(--space-xs);
  font-family: var(--mono);
  font-size: var(--step--2);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-deep);
  white-space: nowrap;
  border-bottom: 1px solid var(--soft-water);
}
.hb-table td {
  padding: var(--space-xs) var(--space-xs);
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.hb-mono {
  font-family: var(--mono);
  font-size: var(--step--2);
  color: var(--ink-deep);
  word-break: break-all;
}

.hb-badge {
  display: inline-block;
  background: var(--pale-sage);
  color: var(--ink-deep);
  padding: 0.15rem 0.55rem;
  font-family: var(--mono);
  font-size: var(--step--2);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: middle;
}

.hb-verify {
  background: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--step--2);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.hb-verify:hover {
  background: var(--ink);
  color: var(--paper);
}

.hb-code {
  font-family: var(--mono);
  font-size: var(--step--1);
  background: var(--paper-warm);
  padding: 0.1rem 0.35rem;
  color: var(--ink-deep);
  word-break: break-all;
}
.bb-section {
  margin: var(--space-xl) 0;
}

.bb-section h2 {
  font-style: italic;
  margin-bottom: var(--space-m);
}

.bb-section > p {
  margin: 0 0 var(--space-default);
}

.bb-section ul.bulleted {
  margin: var(--space-default) 0;
}

/* ── Lists with an anchor ───────────────────────────────────── */

.bb-section ul.bulleted,
.prose ul.bulleted {
  list-style: none;
  padding-left: 0;
  margin: var(--space-default) 0;
  border-left: 2px solid var(--rule-faint);
}

.bb-section ul.bulleted li,
.prose ul.bulleted li {
  position: relative;
  padding-left: var(--space-m);
  margin-bottom: var(--space-list-items);
  line-height: 1.6;
  color: var(--ink);
}

.bb-section ul.bulleted li:last-child,
.prose ul.bulleted li:last-child {
  margin-bottom: 0;
}

/* The bullet becomes a small dot on the rail */
.bb-section ul.bulleted li::before,
.prose ul.bulleted li::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-m) - 1px);
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
  transform: translateX(-50%);
}

/* ── Concept illustrations (BLACKBOX page) ──────────────────── */

.illustrations {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  margin: var(--space-2xl) 0;
}

/* Break out of the prose measure on wide screens */
@media (min-width: 900px) {
  .illustrations {
    width: min(calc(100vw - 2 * var(--pad-x)), var(--max));
    margin-left: calc(50% - min(calc(100vw - 2 * var(--pad-x)), var(--max)) / 2);
    margin-right: calc(50% - min(calc(100vw - 2 * var(--pad-x)), var(--max)) / 2);
  }
}

.art-piece {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
  padding: var(--space-l) var(--space-l);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(2px);
  border-left: 2px solid #cbdbe2;
}

.art-piece .relational-link,
.art-piece .cultural-commons,
.art-piece .heuristic-future,
.art-piece .kairos-chronos {
  flex: 0 0 auto;
}

.art-piece .art-text {
  flex: 1 1 380px;
  min-width: 0;
  max-width: 58ch;
}

.art-piece .art-text h3 {
  margin: 0 0 var(--space-s);
}

.art-piece .art-text p {
  margin: 0;
  color: #3b6e8b;
}
/* Glossary styles */
.glossary {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #92b6b5;
}
.glossary h3 {
  font-family: 'Libre Baskerville', serif;
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  /*color: #427b88;*/
}
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.glossary-item {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(2px);
  padding: 1rem;
  border-left: 2px solid #92b6b5;
}
.glossary-item strong {
  display: block;
  font-family: var(--mono);
  font-size: var(--step--2);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-deep);
  margin-bottom: 0.4rem;
}
.glossary-item p {
  font-size: var(--step--2);
  /*color: #427b88;*/
  line-height: 1.4;
  margin: 0;
}

/* ── Relational links graph ──────────────────────────────── */

.graph-container {
  background: var(--paper-light);
  border: 1px solid var(--rule-faint);
  padding: var(--space-m);
  margin: var(--space-l) 0;
  position: relative;
}

#graph {
  width: 100%;
  height: 750px;
  background: var(--paper);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-m);
  margin-top: var(--space-m);
  font-size: var(--step--1);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-mid);
}

.legend-line {
  display: inline-block;
  width: 20px;
  height: 3px;
  border-radius: 2px;
}

.tooltip {
  position: fixed;
  background: var(--ink-deep);
  color: var(--paper);
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
  font-size: var(--step--2);
  line-height: 1.45;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  max-width: 260px;
  z-index: 2000;
}

@media (max-width: 780px) {
  #graph { height: 560px; }
}

    /* ===== ILLUSTRATIONS (corrected) ===== */
    .relational-link,
    .cultural-commons,
    .heuristic-future {
      width: 180px;
      height: 180px;
      flex-shrink: 0;
      position: relative;
    }

    /* 1. Relational link – original wire‑sphere */
    .relational-link {
      background: #eef3fa;
      border-radius: 50%;
      box-shadow: inset 0 0 0 2px rgba(30, 90, 125, 0.2);
    }

    .relational-link::before,
    .relational-link::after {
      content: "";
      position: absolute;
      top: 10%;
      left: 10%;
      width: 80%;
      height: 80%;
      border-radius: 50%;
      border: 1px dashed #2e7ea0;
      animation: spin 8s linear infinite;
    }

    .relational-link::after {
      width: 60%;
      height: 60%;
      top: 20%;
      left: 20%;
      border: 1px solid #6f9fc0;
      animation-duration: 5s;
      animation-direction: reverse;
    }

    @keyframes spin {
      from {
        transform: rotate(0deg);
      }

      to {
        transform: rotate(360deg);
      }
    }

    /* 2. Cultural commons – square inside circle */
    .cultural-commons {
      background: radial-gradient(circle at 30% 40%, #cde3ef 2%, transparent 2.5%);
      background-size: 20px 20px;
      border-radius: 50%;
      position: relative;
    }

    .cultural-commons::before {
      content: "";
      position: absolute;
      top: 10%;
      left: 10%;
      width: 80%;
      height: 80%;
      border-radius: 50%;
      border: 2px solid #2e7ea0;
      opacity: 0.5;
    }

    .cultural-commons::after {
      content: "";
      position: absolute;
      top: -5%;
      left: -5%;
      width: 110%;
      height: 110%;
      border: 2px dashed #6f9fc0;
      transform: rotate(15deg);
      animation: pulseSquare 4s infinite alternate;
    }

    @keyframes pulseSquare {
      0% {
        opacity: 0.4;
        transform: rotate(10deg) scale(0.95);
      }

      100% {
        opacity: 1;
        transform: rotate(20deg) scale(1.05);
      }
    }


    /* 4. Heuristic future – chain links inside circular context */
    .heuristic-future {
      background: rgba(200, 220, 235, 0.3);
      border-radius: 50%;
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 8px;
    }

    .heuristic-future::before,
    .heuristic-future::after {
      content: "";
      width: 50px;
      height: 50px;
      border: 3px solid #2e7ea0;
      border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
      animation: morphRing 3s ease-in-out infinite alternate;
    }

    .heuristic-future::after {
      border-color: #6f9fc0;
      animation-delay: 0.5s;
    }

    @keyframes morphRing {
      0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        transform: rotate(0deg);
      }

      100% {
        border-radius: 70% 30% 30% 70% / 60% 40% 60% 40%;
        transform: rotate(20deg);
      }
    }
	.recording-governing {
  position: relative;
  width: 180px;
  height: 180px;
  flex-shrink: 0;
  background: #eef3fa;
}

/* The register: a horizontal rail with many equal records */
.recording-governing::before {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 24%;
  height: 10px;
  border-bottom: 2px solid #2e7ea0;
  background-image: radial-gradient(circle, #2e7ea0 1.8px, transparent 2.6px);
  background-size: 15px 8px;
  background-position: 0 bottom;
  background-repeat: repeat-x;
  animation: rg-record 3s linear infinite;
}

@keyframes rg-record {
  from { background-position-x: 0; }
  to   { background-position-x: 15px; }
}

/* The governing body: a small circle, floating above, unconnected */
.recording-governing::after {
  content: "";
  position: absolute;
  top: 22%;
  left: 50%;
  width: 42px;
  height: 42px;
  border: 2px solid #1d5a7a;
  border-radius: 50%;
  transform: translateX(-50%);
}
/* ── Monograph figures ──────────────────────────────────────── */

.kairos-chronos {
  width: 180px;
  height: 180px;
  flex-shrink: 0;
  position: relative;
  border: 2px solid #958f8c;
  background-image: repeating-linear-gradient(
    90deg,
    transparent, transparent 15px,
    #c0b096 15px, #b6a78f 25px
  );
  background-position: 0 85%;
  background-size: 40px 30%;
  background-repeat: repeat-x;
  animation: waveMove 2s linear infinite;
}

.kairos-chronos::before {
  content: "";
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid #767371;
  top: 15%;
  left: 10%;
}

.kairos-chronos::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 30px;
  background: #767371;
  top: calc(15% + 35px);
  left: calc(10% + 35px);
  transform-origin: top;
  animation: rotateHand 60s linear infinite;
}

@keyframes waveMove {
  from { background-position-x: 0; }
  to   { background-position-x: 40px; }
}

@keyframes rotateHand {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Figure layout: illustration beside prose */
.kairos-figure {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
  margin: var(--space-xl) 0;
}

.kairos-figure .kairos-text {
  flex: 1 1 380px;
  min-width: 0;
  max-width: 58ch;
}

.kairos-figure .kairos-chronos {
  flex-shrink: 0;
}



/* ── Comparison table (blockchain-context) ───────────────── */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-m) 0 var(--space-l);
  font-size: var(--step--1);
}
.comparison-table th {
  background: var(--mist);
  color: var(--ink-deep);
  font-weight: 700;
  padding: var(--space-xs) var(--space-s);
  text-align: left;
  border-bottom: 2px solid var(--soft-water);
}
.comparison-table td {
  padding: var(--space-xs) var(--space-s);
  border-bottom: 1px solid var(--rule-faint);
  vertical-align: top;
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table .highlight { background: var(--paper-cool); }

/* ── Table of contents ───────────────────────────────────── */
.toc {
  background: var(--paper-cool);
  padding: var(--space-s) var(--space-m);
  margin: var(--space-m) 0;
}
.toc p { margin: 0 0 var(--space-2xs); }
.toc ul {
  list-style: none;
  padding-left: 0;
  margin: var(--space-2xs) 0 0;
}
.toc ul li { margin-bottom: var(--space-3xs); }

/* ── Attestation demo box ────────────────────────────────── */
.demo-box {
  background: rgb(255 255 255 / 70%);
  border-left: 3px solid var(--rule);
    max-width: min(72ch, 100%);
  margin-left: calc(-1 * var(--space-m));
  margin-right: calc(-1 * var(--space-m));
  padding: var(--space-m);
  
}
.demo-box textarea,
.demo-box input {
  width: 100%;
  padding: var(--space-xs);
  margin: var(--space-2xs) 0 var(--space-s);
  border: 1px solid var(--rule-faint);
  font-family: var(--mono);
  font-size: var(--step--1);
  background: var(--paper-light);
}
.proof {
  background: var(--paper-light);
  border: 1px dashed var(--water);
  padding: var(--space-s);
  font-family: var(--mono);
  font-size: var(--step--2);
  word-break: break-all;
  margin-top: var(--space-s);
}
.status {
  margin-top: var(--space-s);
  padding: var(--space-xs) var(--space-s);
  background: var(--pale-sage);
  font-size: var(--step--1);
}
.status.valid   { background: var(--pale-sage); border-left: 3px solid var(--sage); }
.status.invalid { background: #f3e2e2;          border-left: 3px solid #c78a8a; }

/* ── Reference note / further reading ────────────────────── */
.reference-note {
  background: rgb(248 250 248 / 60%);
  padding: var(--space-m);
  margin: var(--space-l) 0;
  font-size: var(--step--1);
  line-height: 1.6;
  max-width: var(--measure-wide);
}
.reference-note ol,
.reference-note ul { padding-left: var(--space-m); margin: var(--space-s) 0; }
.reference-note li { margin-bottom: var(--space-2xs); }
.ref-note-inline {
  font-family: var(--mono);
  font-size: var(--step--2);
  color: var(--ink-mid);
}
/* ── 19. Footer ──────────────────────────────────────────────────── */

.site-footer {
  padding: var(--space-2xl) var(--pad-x) var(--space-xl);
  margin-top: var(--space-2xl);
  font-family: var(--mono);
  font-size: var(--step--2);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-deep);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
}
.footer-inner .mark {
  justify-content: center;
  margin-bottom: var(--space-m);
}
.footer-inner .mark-rule {
  flex: 0 1 140px;
  background: rgba(22, 74, 102, 0.22);
  opacity: 1;
}
.footer-inner p {
  margin: 0 0 var(--space-s);
  line-height: 1.75;
  color: var(--ink-deep);
}
.footer-inner a {
  color: var(--ink-deep);
  text-decoration: none;
  border-bottom: none;
  margin: 0 0.85rem;
  padding-bottom: 0;
}
.footer-inner a:hover {
  color: var(--accent);
  background-image: none;
  border-bottom: none;
}


/* ── 20. Back to top ─────────────────────────────────────────────── */

#back-to-top {
  position: fixed;
  bottom: var(--space-m);
  right: var(--space-m);
  width: 44px;
  height: 44px;
  background: var(--ink-mid);
  color: var(--paper);
  border: none;
  border-radius: 50%;
  font-size: var(--step-1);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.2s;
  box-shadow: 0 4px 12px rgba(22, 74, 102, 0.15);
  z-index: 1000;
  font-family: var(--mono);
  line-height: 1;
}
#back-to-top:hover {
  background: var(--ink-deep);
  transform: translateY(-3px);
}
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}


/* ── 21. Buttons ─────────────────────────────────────────────────── */

button {
  font-family: var(--mono);
  font-size: var(--step--2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--ink-mid);
  color: var(--paper);
  border: none;
  padding: var(--space-xs) var(--space-s);
  cursor: pointer;
  margin-bottom: 1.5rem;
}
button:hover { background: var(--ink-deep); }


/* ── 22. Diagram components ──────────────────────────────────────── */

.movements-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  margin: var(--space-l) 0 var(--space-xl);
  border: 1px solid var(--rule);
}
.movement {
  background: var(--paper);
  padding: var(--space-m) var(--space-s);
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}
.movement-num,
.movement-name {
  font-family: var(--mono);
  font-size: var(--step--2);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-quiet);
}
.movement-name { color: var(--ink-deep); }
.movement-phrase {
  font-family: var(--serif);
  font-size: var(--step-1);
  font-style: italic;
  line-height: 1.45;
  margin-top: var(--space-xs);
  color: var(--ink-deep);
}

.constraints-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin: var(--space-m) 0;
}
.constraint {
  background: var(--paper);
  padding: var(--space-s);
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}
.constraint-num {
  font-family: var(--mono);
  font-size: var(--step--2);
  letter-spacing: 0.2em;
  color: var(--ink-quiet);
}
.constraint-word {
  font-family: var(--serif);
  font-size: var(--step-1);
  font-style: italic;
  color: var(--ink-deep);
}
.constraint-note {
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--ink-mid);
}

/* ── Diagram components ──────────────────────────────────── */

.dg-section {
  margin: var(--space-xl) 0;
}

.dg-label {
  font-family: var(--mono);
  font-size: var(--step--2);
  letter-spacing: 0.24em;
  color: var(--ink-mid);
  margin-bottom: var(--space-2xs);
}

.dg-title {
  margin: 0 0 var(--space-m);
  font-style: italic;
}

.dg-commentary p {
  margin: 0 0 var(--space-default);
}

.dg-svg {
  display: block;
  width: 100%;
  height: auto;
}

/* The two canvas wrappers share base spacing */
.dg-canvas,
.dg-scroll {
  margin: var(--space-m) 0;
}

/* ── Wide viewports: only the canvases break out ────────── */
@media (min-width: 900px) {
  .dg-canvas,
  .dg-scroll {
    width: min(calc(100vw - 2 * var(--pad-x)), var(--max));
    margin-left: calc(50% - min(calc(100vw - 2 * var(--pad-x)), var(--max)) / 2);
    margin-right: calc(50% - min(calc(100vw - 2 * var(--pad-x)), var(--max)) / 2);
    margin-top: var(--space-m);
    margin-bottom: var(--space-m);
  }

  /* Timeline is too wide even for the column — allow scroll */
  .dg-scroll {
    overflow-x: auto;
    padding-bottom: var(--space-s);
  }
  .dg-scroll .dg-svg {
    min-width: 1600px;
  }
}

/* ── Narrow viewports: scroll rather than shrink illegibly ── */
@media (max-width: 899px) {
  .dg-canvas,
  .dg-scroll {
    overflow-x: auto;
    padding-bottom: var(--space-s);
    -webkit-overflow-scrolling: touch;
  }

  .dg-canvas .dg-svg {
    min-width: 700px;
  }
  .dg-scroll .dg-svg {
    min-width: 1400px;
  }
}
/* ── 24. Log page ────────────────────────────────────────────────── */

.log-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

.log-content {
  max-width: var(--measure);
}

.log-content h2 {
  font-size: var(--step-2);
  font-style: italic;
  line-height: 1.3;
  margin: var(--space-xl) 0 var(--space-m);
  padding-top: var(--space-l);
  border-top: 1px solid var(--rule-faint);
  scroll-margin-top: 5rem;
}

.log-content h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.log-content p {
  margin: 0 0 var(--space-default);
}

.log-toc {
  position: sticky;
  top: 5rem;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  padding-top: var(--space-xl);
}

.log-toc .toc {
  margin: 0;
}

.log-toc .toc ul {
  margin: var(--space-2xs) 0 0;
  padding-left: 0;
  border-left: 1px solid var(--rule-faint);
}

.log-toc .toc li {
  margin-bottom: 0;
  line-height: 1.35;
}

.log-toc .toc a {
  display: block;
  padding: var(--space-2xs) 0 var(--space-2xs) var(--space-s);
  margin-left: -1px;
  font-family: var(--mono);
  font-size: var(--step--2);
  letter-spacing: 0.02em;
  color: var(--ink-mid);
  border-bottom: none;
  border-left: 2px solid transparent;
  padding-bottom: var(--space-2xs);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.log-toc .toc a:hover {
  color: var(--ink-deep);
  border-left-color: var(--sage);
  background-image: none;
  border-bottom-color: transparent;
}

.log-toc .toc a.active {
  color: var(--ink-deep);
  border-left-color: var(--accent);
}
@media (max-width: 900px) {
  .log-layout {
    grid-template-columns: 1fr;
  }
  .log-toc {
    display: none;
  }
}
@media (min-width: 900px) {
  .illustrations {
    width: min(calc(100vw - 2 * var(--pad-x)), 860px);
    margin-left: calc(50% - min(calc(100vw - 2 * var(--pad-x)), 860px) / 2);
    margin-right: calc(50% - min(calc(100vw - 2 * var(--pad-x)), 860px) / 2);
  }
}
/* ── 25. Responsive ──────────────────────────────────────────────── */

@media (max-width: 780px) {
  .nav-container { padding: var(--space-s) var(--pad-x); }
  section.sect   { padding: 0 0 var(--space-xl); }
  .site-footer   { padding: var(--space-l) var(--pad-x); }

  .sections-layout {
    grid-template-columns: 42px 1fr;
    gap: var(--space-s);
  }
  .strata-slice {
    width: 42px;
    height: 520px;
  }

  .movements-strip  { grid-template-columns: 1fr 1fr; }
  .constraints-list { grid-template-columns: 1fr 1fr; }

  .nav-links { display: none; }
  .nav-toggle-label {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 16px;
    cursor: pointer;
  }
  .nav-toggle-label span {
    display: block;
    width: 100%;
    height: 1px;
    background: var(--ink-deep);
  }
  .nav-toggle-checkbox:checked ~ .nav-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: var(--space-s);
    padding-top: var(--space-s);
    margin-top: var(--space-xs);
    border-top: 1px solid var(--rule-faint);
  }
  .dropdown-arrow {
    display: inline-block;
    font-size: 0.6rem;
    margin-left: var(--space-2xs);
  }
  .nav-dropdown .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    border: none;
    box-shadow: none;
    padding: var(--space-2xs) 0 0 var(--space-s);
    background: transparent;
    margin-top: 0;
    display: none;
  }
  .nav-dropdown-checkbox:checked ~ .dropdown-menu {
    display: block;
  }
}

@media (max-width: 480px) {
  .movements-strip  { grid-template-columns: 1fr; }
  .constraints-list { grid-template-columns: 1fr; }
  .sections-layout {
    grid-template-columns: 32px 1fr;
    gap: var(--space-xs);
  }
  .strata-slice {
    width: 32px;
    height: 420px;
  }
}