/* ============================================================
   Studiologie — shared design system
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..500;1,9..144,300..500&family=Source+Serif+4:opsz,wght@8..60,300;8..60,400;8..60,500;8..60,600&display=swap');

:root {
  /* Colour */
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --ink-faint: #6e6e6e;
  --paper: #fafaf9;
  --paper-deep: #f0efed;
  --rule: #d4d4d2;
  --accent: #000000;

  /* Type */
  --display: 'Fraunces', Georgia, serif;
  --body: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;

  /* Scale */
  --measure: 38rem;
  --measure-wide: 52rem;
  --measure-essay: 36rem;

  /* Rhythm */
  --line: 1.6;
  --line-tight: 1.25;
}

/* ------------------------------------------------------------
   Reset and base
   ------------------------------------------------------------ */

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

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (max-width: 720px) {
  html {
    font-size: 17px;
  }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  line-height: var(--line);
  font-feature-settings: 'kern', 'liga', 'onum';
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background: var(--accent);
  color: var(--paper);
}

/* ------------------------------------------------------------
   Accessibility: skip link and focus
   ------------------------------------------------------------ */

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.65rem 1rem;
  font-family: var(--body);
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 2px;
  transform: translateY(-150%);
  transition: transform 0.18s ease;
  z-index: 100;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  text-decoration: none;
}

/* ------------------------------------------------------------
   Layout
   ------------------------------------------------------------ */

.frame {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  flex: 1;
}

@media (max-width: 720px) {
  .frame {
    padding: 1.75rem 1.25rem;
  }
}

/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 4rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.site-header .mark {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  font-variation-settings: 'opsz' 14;
}

.site-header .mark:hover {
  color: var(--accent);
}

.site-header nav {
  display: flex;
  gap: 2rem;
  font-family: var(--body);
  font-size: 0.95rem;
}

.site-header nav a {
  color: var(--ink-soft);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
}

.site-header nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.35s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.site-header nav a:hover {
  color: var(--accent);
}

.site-header nav a:hover::after,
.site-header nav a[aria-current="page"]::after {
  width: 100%;
}

.site-header nav a[aria-current="page"] {
  color: var(--ink);
}

@media (max-width: 560px) {
  .site-header {
    padding-bottom: 2.5rem;
  }
  .site-header nav {
    gap: 1.25rem;
    font-size: 0.9rem;
  }
  .site-header nav a {
    padding-block: 0.4rem;
  }
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
  margin-top: 6rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.85rem;
  color: var(--ink-faint);
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, color 0.25s;
}

.site-footer a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ------------------------------------------------------------
   Centre line and lead
   ------------------------------------------------------------ */

.centre-line {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.65rem, 3.6vw, 2.4rem);
  line-height: 1.18;
  letter-spacing: -0.012em;
  max-width: var(--measure-wide);
  color: var(--ink);
  font-variation-settings: 'opsz' 96, 'SOFT' 30;
}

.lead {
  font-family: var(--body);
  font-weight: 400;
  font-size: 1.1rem;
  line-height: 1.55;
  max-width: var(--measure);
  margin-top: 1.75rem;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------
   The four-line spine
   ------------------------------------------------------------ */

.spine {
  margin-top: 6rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.spine .line {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 2.5rem;
  padding: 0;
  margin: 0;
  align-items: baseline;
  text-decoration: none;
  color: inherit;
  transition: color 0.25s;
}

.spine .line:hover .lens {
  color: var(--accent);
}

.spine .lens {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  line-height: 1.2;
  color: var(--ink);
  font-variation-settings: 'opsz' 60, 'SOFT' 60;
}

.spine .predicate {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.4;
  color: var(--ink);
  font-variation-settings: 'opsz' 40;
}

@media (max-width: 640px) {
  .spine .line {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .spine .line {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------------------
   On the desk
   ------------------------------------------------------------ */

.desk {
  margin-top: 6rem;
}

.desk-heading,
.spine-heading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: fit-content;
  font-family: var(--body);
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 2rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--rule);
}

.desk-icon,
.spine-icon {
  height: 1.4rem;
  width: auto;
  color: var(--ink-faint);
  flex: 0 0 auto;
  display: block;
}

.desk-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.desk-item {
  padding: 1.85rem 0 2.1rem;
  border-bottom: 1px solid var(--rule);
}

.desk-item:first-child {
  padding-top: 0;
}

.desk-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.desk-state {
  display: block;
  font-family: var(--body);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.85rem;
}

.desk-state .dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 0.55rem;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.desk-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.4rem, 2.6vw, 1.7rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin-bottom: 0.55rem;
  font-variation-settings: 'opsz' 60;
  max-width: var(--measure-wide);
}

.desk-title a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.4s cubic-bezier(0.2, 0.6, 0.2, 1), color 0.25s;
  padding-bottom: 2px;
}

.desk-title a:hover {
  color: var(--accent);
  background-size: 100% 1px;
}

.desk-note {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: var(--measure);
}

/* ------------------------------------------------------------
   Routes (footer-of-page links)
   ------------------------------------------------------------ */

.routes {
  margin-top: 5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: var(--measure);
}

.routes {
  gap: 0;
}

.routes a {
  font-family: var(--display);
  font-size: 1.1rem;
  color: var(--ink);
  text-decoration: none;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  transition: color 0.25s, padding 0.3s;
  font-variation-settings: 'opsz' 36;
}

.routes a:last-of-type {
  border-bottom: none;
}

.routes a::after {
  content: '→';
  font-family: var(--body);
  font-size: 0.95rem;
  color: var(--ink-faint);
  transition: transform 0.3s cubic-bezier(0.2, 0.6, 0.2, 1), color 0.25s;
}

.routes a:hover {
  color: var(--accent);
  padding-left: 0.35rem;
}

.routes a:hover::after {
  transform: translateX(4px);
  color: var(--accent);
}

.routes a.route-rich {
  align-items: flex-start;
  padding-block: 1.1rem;
}

.routes a.route-rich .route-content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.routes a.route-rich .route-title {
  font-family: var(--display);
  font-size: 1.1rem;
  line-height: 1.2;
  font-variation-settings: 'opsz' 36;
}

.routes a.route-rich .route-note {
  font-family: var(--body);
  font-style: italic;
  font-weight: 400;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 36rem;
}

/* ------------------------------------------------------------
   Lenses page
   ------------------------------------------------------------ */

.page-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 144;
  margin-bottom: 1.5rem;
}

.page-intro {
  font-family: var(--body);
  font-size: 1.1rem;
  line-height: 1.55;
  max-width: var(--measure);
  color: var(--ink-soft);
}

.page-intro em {
  font-style: italic;
  color: var(--ink);
}

.lenses {
  margin-top: 5rem;
  display: flex;
  flex-direction: column;
  gap: 4.5rem;
}

.lens {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 3rem;
  align-items: start;
}

.lens-mark {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.6rem;
  font-style: italic;
  color: var(--ink);
  font-variation-settings: 'opsz' 60, 'SOFT' 60;
  position: sticky;
  top: 2rem;
}

.lens-mark .mark-num {
  display: block;
  font-family: var(--body);
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.6rem;
}

.lens-body {
  max-width: var(--measure);
}

.lens-statement {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 1.35;
  letter-spacing: -0.005em;
  margin-bottom: 1.5rem;
  font-variation-settings: 'opsz' 48;
}

.lens-statement strong {
  font-weight: 500;
}

.lens-paragraph {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 2rem;
}

.lens-related {
  border-top: 1px solid var(--rule);
  padding-top: 1.6rem;
  margin-top: 0.5rem;
}

.lens-related-label {
  font-family: var(--body);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.75rem;
  display: block;
}

.lens-related ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.lens-related li {
  line-height: 1.45;
}

.lens-related li a {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.1rem, 1.7vw, 1.25rem);
  line-height: 1.25;
  letter-spacing: -0.005em;
  font-variation-settings: 'opsz' 36, 'SOFT' 50;
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.4s cubic-bezier(0.2, 0.6, 0.2, 1), color 0.25s;
  padding-bottom: 2px;
  display: inline-block;
}

.lens-related li a:hover {
  color: var(--accent);
  background-size: 100% 1px;
}

.lens-related .state-tag {
  font-family: var(--body);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-left: 0.5rem;
}

.lens.is-active .lens-mark,
.lens.is-active .lens-statement {
  color: var(--accent);
}

.lens.is-active .lens-mark {
  font-variation-settings: 'opsz' 60, 'SOFT' 100;
}

.lenses-coda {
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--rule);
  max-width: var(--measure-wide);
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.45;
  font-style: italic;
  color: var(--ink-soft);
  font-variation-settings: 'opsz' 40, 'SOFT' 40;
}

@media (max-width: 720px) {
  .lens {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .lens-mark {
    position: static;
    font-size: 1.3rem;
  }
}

/* ------------------------------------------------------------
   Essay page
   ------------------------------------------------------------ */

.essay-frame {
  max-width: 60rem;
  margin: 0 auto;
}

.essay-meta {
  display: flex;
  gap: 1.5rem;
  font-family: var(--body);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.essay-meta .meta-state .dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 0.45rem;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.essay-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-variation-settings: 'opsz' 144;
  margin-bottom: 1.25rem;
  max-width: var(--measure-wide);
}

.essay-dek {
  font-family: var(--display);
  font-weight: 300;
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.35;
  color: var(--ink-soft);
  max-width: var(--measure-wide);
  font-variation-settings: 'opsz' 60, 'SOFT' 50;
  margin-bottom: 3rem;
}

.essay-lens-link {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1.25rem 0;
  margin-bottom: 4rem;
  font-family: var(--body);
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: var(--measure-wide);
}

.essay-lens-link a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color 0.25s, border-color 0.25s;
}

.essay-lens-link a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.essay-body {
  max-width: var(--measure-essay);
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.7;
}

.essay-body p {
  margin-bottom: 1.4rem;
}

.essay-body p:first-of-type::first-line {
  font-feature-settings: 'smcp', 'kern';
  letter-spacing: 0.04em;
}

.essay-body p:first-of-type::first-letter {
  font-family: var(--display);
  font-weight: 400;
  font-size: 3.4rem;
  float: left;
  line-height: 0.95;
  margin: 0.35rem 0.6rem 0 -0.15rem;
  color: var(--ink);
  font-variation-settings: 'opsz' 144;
}

.essay-body h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.55rem;
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin: 3.5rem 0 1.25rem;
  font-variation-settings: 'opsz' 60;
}

.essay-body h3 {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.35;
  margin: 2.5rem 0 1rem;
  color: var(--ink);
  font-variation-settings: 'opsz' 40, 'SOFT' 40;
}

.essay-body blockquote {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--ink);
  border-left: 2px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  font-variation-settings: 'opsz' 60, 'SOFT' 50;
}

.essay-body em {
  font-style: italic;
}

.essay-body strong {
  font-weight: 600;
}

.essay-body a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--rule), var(--rule));
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: background-image 0.25s, color 0.25s;
}

.essay-body a:hover {
  color: var(--accent);
  background-image: linear-gradient(var(--accent), var(--accent));
}

.essay-body hr {
  border: none;
  text-align: center;
  margin: 3rem 0;
  font-size: 1rem;
  color: var(--ink-faint);
}

.essay-body hr::after {
  content: '* * *';
  letter-spacing: 0.5em;
}

.essay-body ul,
.essay-body ol {
  margin: 1.5rem 0 1.5rem 1.5rem;
}

.essay-body li {
  margin-bottom: 0.6rem;
}

.essay-body .essay-questions {
  list-style: none;
  margin: 1.75rem 0;
  padding: 1.4rem 0 1.4rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.essay-body .essay-questions li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.55rem;
  font-style: italic;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.08rem;
  line-height: 1.45;
  font-variation-settings: 'opsz' 36, 'SOFT' 40;
  color: var(--ink);
}

.essay-body .essay-questions li:last-child {
  margin-bottom: 0;
}

.essay-body .essay-questions li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--ink-faint);
  font-style: normal;
}

.essay-figure {
  width: min(calc(100vw - 2.5rem), 52rem);
  margin: 3rem 50% 3.4rem;
  transform: translateX(-50%);
}

.essay-figure figcaption {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-top: 0.95rem;
  max-width: 36rem;
}

@media (max-width: 720px) {
  .essay-figure {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    transform: none;
  }
}

.essay-end {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--body);
  font-size: 0.92rem;
  color: var(--ink-soft);
  flex-wrap: wrap;
  gap: 1rem;
  max-width: var(--measure-essay);
  margin-left: auto;
  margin-right: auto;
}

.essay-end a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.25s;
}

.essay-end a:hover {
  color: var(--accent);
}

/* ------------------------------------------------------------
   Essay index and practice page additions
   ------------------------------------------------------------ */

.essay-collection {
  margin-top: 4rem;
  display: flex;
  flex-direction: column;
  gap: 4.5rem;
  max-width: var(--measure-wide);
  list-style: none;
}

.essay-group {
  display: flex;
  flex-direction: column;
}

.essay-group-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 0.9rem;
  margin: 0 0 2rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--rule);
}

.essay-group-lens {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.55rem, 3.2vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-variation-settings: 'opsz' 96, 'SOFT' 60;
}

.essay-group-tagline {
  font-family: var(--body);
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  position: relative;
  padding-left: 1rem;
}

.essay-group-tagline::before {
  content: '/';
  position: absolute;
  left: 0;
  color: var(--rule);
  font-style: normal;
  letter-spacing: 0;
}

.essay-list,
.practice-modes {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: var(--measure-wide);
}

.practice-modes {
  margin-top: 4rem;
}

.essay-list-item,
.practice-modes article {
  padding: 1.6rem 0 1.85rem;
  border-bottom: 1px solid var(--rule);
}

.essay-list-item:first-child,
.practice-modes article:first-child {
  padding-top: 0;
}

.essay-list-item:last-child,
.practice-modes article:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.essay-list-item h2,
.essay-list-item h3,
.practice-modes h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 0 0 0.5rem;
  font-variation-settings: 'opsz' 48;
}

.essay-list-item h2 a,
.essay-list-item h3 a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.4s cubic-bezier(0.2, 0.6, 0.2, 1), color 0.25s;
  padding-bottom: 2px;
}

.essay-list-item h2 a:hover,
.essay-list-item h3 a:hover {
  color: var(--accent);
  background-size: 100% 1px;
}

.essay-list-item p,
.practice-modes p,
.practice-body p {
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.6;
  max-width: var(--measure);
}

.practice-modes .practice-mode-lead {
  font-family: var(--display);
  font-weight: 300;
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.4;
  color: var(--ink-faint);
  margin-bottom: 0.85rem;
  font-variation-settings: 'opsz' 60, 'SOFT' 50;
}

.essay-list-item .essay-list-meta {
  margin-top: 0.6rem;
  font-family: var(--body);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.essay-list-lenses {
  margin-top: 0.85rem;
  font-size: 0.8rem !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint) !important;
}

.practice-body {
  margin-top: 2rem;
  max-width: var(--measure);
}

.practice-body p + p {
  margin-top: 1.4rem;
}

/* ------------------------------------------------------------
   Semantic state markers: state, not dates
   ------------------------------------------------------------ */

.desk-state .state-marker,
.meta-state .state-marker {
  display: inline-block;
  width: 0.72rem;
  height: 0.72rem;
  margin-right: 0.55rem;
  vertical-align: -0.08rem;
  position: relative;
  color: var(--accent);
}

.state-draft .state-marker {
  width: 0.38rem;
  height: 0.9rem;
  border-right: 1.5px solid currentColor;
  animation: caret-blink 1.4s steps(1, end) infinite;
}

.state-early-build .state-marker {
  width: 0.52rem;
  height: 0.52rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  top: -1px;
}

.state-early-build .state-marker::after {
  content: '';
  position: absolute;
  inset: -0.28rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.7);
  animation: soft-pulse 3.6s cubic-bezier(0.2, 0.6, 0.2, 1) infinite;
}

.state-building .state-marker {
  width: 0.62rem;
  height: 0.62rem;
  border: 1px solid currentColor;
  border-right-color: transparent;
  background: transparent;
}

.state-published .state-marker {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
  top: -1px;
}

@keyframes caret-blink {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0.18; }
}

@keyframes soft-pulse {
  0% { opacity: 0; transform: scale(0.7); }
  28% { opacity: 0.28; }
  70%, 100% { opacity: 0; transform: scale(1.28); }
}

@media (prefers-reduced-motion: reduce) {
  .state-draft .state-marker,
  .state-early-build .state-marker::after {
    animation: none;
  }
}

/* ------------------------------------------------------------
   Lens labels on related artefacts
   ------------------------------------------------------------ */

.lens-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.lens-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 1.25rem;
  padding: 0.1rem 0.45rem 0.12rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-faint);
  font-family: var(--body);
  font-size: 0.66rem;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.related-note {
  margin-top: 0.4rem;
  max-width: var(--measure);
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ------------------------------------------------------------
   Selected work (homepage and practice page)
   ------------------------------------------------------------ */

.selected-work {
  margin-top: 6rem;
  max-width: var(--measure-wide);
}

.selected-work-heading {
  font-family: var(--body);
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.85rem;
}

.selected-work-intro {
  font-family: var(--display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.1rem, 1.9vw, 1.3rem);
  line-height: 1.4;
  color: var(--ink-soft);
  margin: 0 0 2.5rem;
  font-variation-settings: 'opsz' 40, 'SOFT' 50;
  max-width: var(--measure);
}

.selected-work-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
}

.selected-work-item {
  padding: 1.85rem 0 2.1rem;
  border-bottom: 1px solid var(--rule);
}

.selected-work-item:first-child {
  padding-top: 0;
}

.selected-work-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.selected-work-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.4rem, 2.6vw, 1.7rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 0.55rem;
  font-variation-settings: 'opsz' 60;
  max-width: var(--measure-wide);
}

.selected-work-title a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.4s cubic-bezier(0.2, 0.6, 0.2, 1), color 0.25s;
  padding-bottom: 2px;
}

.selected-work-title a:hover {
  color: var(--accent);
  background-size: 100% 1px;
}

.selected-work-note {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: var(--measure);
  margin: 0;
}

/* ------------------------------------------------------------
   Work pages
   ------------------------------------------------------------ */

.work-figure {
  width: min(calc(100vw - 2.5rem), 48rem);
  margin: 3.2rem 50% 3.6rem;
  transform: translateX(-50%);
}

.work-figure.work-hero {
  margin-top: 0;
}

.work-figure-bleed {
  width: min(calc(100vw - 2.5rem), 64rem);
  margin: 3.6rem 50% 4rem;
  transform: translateX(-50%);
}

.work-figure-narrow {
  width: min(100%, 26rem);
  margin: 3rem auto 3.2rem;
  transform: none;
}

.work-figure img,
.work-figure-bleed img,
.work-figure-narrow img,
.work-figure-pair img,
.work-figure-bleed video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
}

.work-figure figcaption,
.work-figure-bleed figcaption,
.work-figure-narrow figcaption,
.work-figure-pair figcaption {
  font-size: 0.85rem;
  color: var(--ink-faint);
  line-height: 1.45;
  margin-top: 0.95rem;
  max-width: 36rem;
}

.work-figure-pair {
  width: min(calc(100vw - 2.5rem), 64rem);
  margin: 3.6rem 50% 4rem;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

.work-figure-pair-item {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background: var(--paper-deep);
}

.work-figure-pair-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-figure-pair-item.is-wide {
  aspect-ratio: 4 / 3;
}

.work-figure-pair-item.is-tall {
  aspect-ratio: 3 / 4;
}

.essay-body .work-pull {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  line-height: 1.35;
  color: var(--ink);
  font-variation-settings: 'opsz' 60, 'SOFT' 50;
  border-left: 1px solid var(--rule);
  padding: 0.25rem 0 0.25rem 1.25rem;
  margin: 1.6rem 0;
}

.essay-body .work-coda {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  line-height: 1.35;
  color: var(--ink);
  font-variation-settings: 'opsz' 48, 'SOFT' 50;
  margin: 0.5rem 0 0;
}

.work-cross {
  width: min(100%, 64rem);
  margin: 4rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.work-cross-link {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--ink);
  padding: 0.5rem 0;
  transition: color 0.25s;
}

.work-cross-link:hover {
  color: var(--accent);
}

.work-cross-kicker {
  font-family: var(--body);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.work-cross-title {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.3;
  font-variation-settings: 'opsz' 36, 'SOFT' 50;
}

@media (max-width: 720px) {
  .work-figure,
  .work-figure-bleed {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    transform: none;
  }
  .work-figure-pair {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    transform: none;
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .work-figure-pair-item.is-wide,
  .work-figure-pair-item.is-tall {
    aspect-ratio: auto;
  }
  .work-cross {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ------------------------------------------------------------
   Essay reading trace
   ------------------------------------------------------------ */

.essay-frame {
  position: relative;
}

.reading-trace {
  position: fixed;
  left: max(1.25rem, calc((100vw - 60rem) / 2 + 1rem));
  top: 28vh;
  width: 1px;
  height: 44vh;
  background: var(--rule);
  opacity: 0.9;
  z-index: 0;
  pointer-events: none;
}

.reading-trace-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.12s linear;
}

@media (max-width: 920px) {
  .reading-trace {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reading-trace-fill {
    transition: none;
  }
}

.essay-list-lenses {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.essay-list-lenses span {
  display: inline-flex;
  align-items: center;
  min-height: 1.25rem;
  padding: 0.1rem 0.45rem 0.12rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-faint);
  font-size: 0.66rem;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ============================================================
   Repair pass — quieter visual system, no ornamental motion
   ============================================================ */

html,
body {
  overflow-x: hidden;
}

.frame {
  max-width: min(100%, 72rem);
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

/* Stop the homepage spine from performing as an animation. */
.spine .line {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

/* More editorial, less badge-like state marks. Static by default. */
.desk-state .state-marker,
.meta-state .state-marker {
  width: 0.72rem;
  height: 0.72rem;
  margin-right: 0.58rem;
  vertical-align: -0.08rem;
  color: currentColor;
  opacity: 0.72;
}

.state-draft .state-marker {
  width: 0.62rem;
  height: 0.62rem;
  border: 1px solid currentColor;
  border-top-color: transparent;
  border-left-color: transparent;
  animation: none !important;
  transform: rotate(-45deg);
}

.state-early-build .state-marker {
  width: 0.58rem;
  height: 0.58rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, currentColor 0 1px, transparent 1.5px);
  box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.04);
  top: 0;
}

.state-early-build .state-marker::after {
  display: none !important;
  animation: none !important;
}

.state-building .state-marker {
  width: 0.62rem;
  height: 0.62rem;
  border: 1px solid currentColor;
  border-right-color: transparent;
  background: transparent;
}

.state-published .state-marker {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 0;
  background: currentColor;
  transform: rotate(45deg);
}

/* Lens marks should read as notation, not UI pills. */
.lens-tags,
.essay-list-lenses {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
  margin-top: 0.55rem;
  color: var(--ink-faint) !important;
}

.lens-tags::before,
.essay-list-lenses::before {
  content: 'Lenses: ';
  margin-right: 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.lens-tags span,
.essay-list-lenses span {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lens-tags span + span::before,
.essay-list-lenses span + span::before {
  content: ' · ';
  color: var(--ink-faint);
  margin-inline: 0.35rem;
}

/* Essay layout repair. The previous version let the hero and trace collide. */
.essay-frame {
  width: 100%;
  max-width: 64rem;
  margin-inline: auto;
  position: relative;
}

.essay-meta {
  max-width: min(100%, 48rem);
  gap: 0.8rem 1.25rem;
  letter-spacing: 0.14em;
  margin-bottom: clamp(2rem, 6vw, 4rem);
}

.essay-title {
  max-width: min(100%, 16ch);
  font-size: clamp(2.6rem, 7.5vw, 6rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
  text-wrap: balance;
  overflow-wrap: normal;
  hyphens: none;
  margin-bottom: 1.5rem;
}

.essay-dek {
  /* max-width: min(100%, 42rem); */
  font-family: var(--body);
  font-size: clamp(1.18rem, 2.2vw, 1.55rem);
  line-height: 1.42;
  text-wrap: balance;
  margin-bottom: clamp(2.5rem, 7vw, 4.5rem);
}

.essay-lens-link {
  max-width: min(100%, 44rem);
  margin-bottom: clamp(3rem, 7vw, 5rem);
  padding-block: 1.35rem;
  font-size: 0.98rem;
}

.essay-body {
  max-width: min(100%, var(--measure-essay));
  margin-inline: auto;
  font-size: clamp(1.02rem, 1.35vw, 1.12rem);
  line-height: 1.72;
}

/* Remove the magazine drop cap. It was creating the wrong register and breaking the first paragraph. */
.essay-body p:first-of-type::first-line {
  font-feature-settings: 'kern', 'liga', 'onum';
  letter-spacing: normal;
}

.essay-body p:first-of-type::first-letter {
  float: none;
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
  line-height: inherit;
  margin: 0;
  color: inherit;
  font-variation-settings: normal;
}

.essay-body > p:first-of-type {
  font-size: clamp(1.18rem, 2vw, 1.34rem);
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 1.65rem;
}

/* Remove the broken fixed progress rule. It collided with the essay hero. */
.reading-trace {
  display: none !important;
}

@media (max-width: 720px) {
  .essay-meta {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
  }

  .essay-title {
    font-size: clamp(2.8rem, 17vw, 5.1rem);
    max-width: 10.8ch;
  }

  .essay-dek {
    font-size: 1.1rem;
  }
}


/* ============================================================
   Robust illustrative layer
   Built from HTML/CSS so the diagrams remain readable before motion.
   Motion reveals state; it does not carry the meaning.
   ============================================================ */

.thinking-figure {
  color: var(--ink);
}

.thinking-figure figcaption {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-faint);
  margin-top: 0.85rem;
  max-width: 34rem;
}

/* Home relationship field */
.home-field {
  width: min(100%, 42rem);
  margin: clamp(3.25rem, 8vw, 5rem) 0 clamp(3rem, 8vw, 5rem);
}

.home-field figcaption {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 0.9rem;
}

.field-map {
  position: relative;
  height: clamp(14rem, 34vw, 18rem);
  border-block: 1px solid var(--rule);
  background:
    radial-gradient(circle at 50% 50%, rgba(26, 26, 26, 0.035), transparent 38%),
    linear-gradient(90deg, transparent, rgba(212, 212, 210, 0.35), transparent);
  overflow: hidden;
}

.field-map::before {
  content: '';
  position: absolute;
  inset: 13% 16%;
  border: 1px solid rgba(212, 212, 210, 0.76);
  border-radius: 999px;
  opacity: 0.85;
}

.field-line {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52%;
  height: 1px;
  background: rgba(26, 26, 26, 0.36);
  transform-origin: center;
  opacity: 0.72;
}

.field-line-a { transform: translate(-50%, -50%) rotate(25deg) scaleX(0.92); }
.field-line-b { transform: translate(-50%, -50%) rotate(-25deg) scaleX(0.92); }
.field-line-c { transform: translate(-50%, -50%) rotate(90deg) scaleX(0.58); background: rgba(212, 212, 210, 0.86); }
.field-line-d { transform: translate(-50%, -50%) rotate(0deg) scaleX(0.70); background: rgba(212, 212, 210, 0.86); }

.field-centre,
.field-node {
  position: absolute;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid var(--rule);
  background: rgba(250, 250, 249, 0.92);
  box-shadow: 0 0 0 0.5rem rgba(250, 250, 249, 0.54);
}

.field-centre {
  left: 50%;
  top: 50%;
  width: 5.2rem;
  height: 5.2rem;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  font-family: var(--display);
  font-size: 0.95rem;
  color: var(--ink);
  border-color: rgba(26, 26, 26, 0.44);
}

.field-node {
  width: 7.7rem;
  min-height: 3.2rem;
  border-radius: 999px;
  padding: 0.5rem 0.8rem;
}

.field-node strong {
  font-family: var(--display);
  font-size: 0.96rem;
  font-weight: 400;
  line-height: 1;
}

.field-node em {
  margin-top: 0.25rem;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-style: normal;
  color: var(--ink-faint);
}

.field-products { left: 7%; top: 13%; }
.field-people { right: 7%; top: 13%; }
.field-evidence { left: 7%; bottom: 13%; }
.field-organisations { right: 7%; bottom: 13%; }

.thinking-figure:not(.is-visible) .field-line,
.thinking-figure:not(.is-visible) .sketch-arrow,
.thinking-figure:not(.is-visible) .evidence-thread,
.thinking-figure:not(.is-visible) .guard {
  transform-origin: left center;
  transform: scaleX(0);
}

.thinking-figure.is-visible .field-line,
.thinking-figure.is-visible .sketch-arrow,
.thinking-figure.is-visible .evidence-thread,
.thinking-figure.is-visible .guard {
  transition: transform 900ms cubic-bezier(0.2, 0.6, 0.2, 1), opacity 700ms ease;
}

.thinking-figure:not(.is-visible) .field-node,
.thinking-figure:not(.is-visible) .field-centre,
.thinking-figure:not(.is-visible) .protection-row,
.thinking-figure:not(.is-visible) .lens-sketch figcaption {
  opacity: 0;
  transform: translateY(4px);
}

.thinking-figure.is-visible .field-node,
.thinking-figure.is-visible .field-centre,
.thinking-figure.is-visible .protection-row,
.thinking-figure.is-visible .lens-sketch figcaption {
  opacity: 1;
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* Lens canvases */
.lens-sketch {
  width: min(100%, 33rem);
  margin: 1.6rem 0 2rem;
}

.lens-sketch figcaption {
  font-size: 0.78rem;
}

.lens-canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-block: 1px solid var(--rule);
  background: var(--paper);
  overflow: hidden;
}

.lens-canvas-wrap.is-bare {
  border-block: none;
}

.lens-canvas-wrap.is-shallow {
  aspect-ratio: 32 / 9;
}

.lens-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Essay argument figures */
.argument-card {
  width: min(calc(100vw - 2.5rem), 52rem);
  margin: 3.1rem 50% 3.6rem;
  transform: translateX(-50%);
  border-block: 1px solid var(--rule);
  padding: 1.35rem 0 1.45rem;
}

.argument-card figcaption {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.45;
  margin: 0 0 1.2rem;
}

.figure-note {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.protection-grid {
  display: grid;
  gap: 0.55rem;
}
.protection-row {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) 4rem minmax(11rem, 0.9fr);
  gap: 0.8rem;
  align-items: center;
  padding-block: 0.18rem;
}
.protection-row .failure {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.25;
}
.protection-row strong {
  font-family: var(--display);
  font-weight: 400;
  font-size: 0.98rem;
  line-height: 1.25;
  text-align: right;
}
.guard {
  height: 1px;
  background: linear-gradient(90deg, var(--rule), rgba(26, 26, 26, 0.62));
}

@media (max-width: 820px) {
  .home-field { width: 100%; }
  .field-map { height: 19rem; }
  .field-node { width: 7rem; font-size: 0.9rem; }
  .field-products, .field-evidence { left: 2%; }
  .field-people, .field-organisations { right: 2%; }
  .argument-card { width: 100%; margin-left: 0; margin-right: 0; transform: none; }
  .protection-row { grid-template-columns: 1fr; gap: 0.25rem; padding: 0.65rem 0; border-bottom: 1px solid rgba(212, 212, 210, 0.65); }
  .protection-row strong { text-align: left; }
  .guard { width: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .thinking-figure * {
    transition: none !important;
    animation: none !important;
  }
  .thinking-figure:not(.is-visible) .field-line,
  .thinking-figure:not(.is-visible) .sketch-arrow,
  .thinking-figure:not(.is-visible) .evidence-thread,
  .thinking-figure:not(.is-visible) .guard {
    transform: none !important;
  }
  .thinking-figure:not(.is-visible) .field-node,
  .thinking-figure:not(.is-visible) .field-centre,
  .thinking-figure:not(.is-visible) .protection-row,
  .thinking-figure:not(.is-visible) .lens-sketch figcaption {
    opacity: 1 !important;
    transform: none !important;
  }
}


/* ------------------------------------------------------------
   Clean symbolic pass
   ------------------------------------------------------------ */

/* Static state labels: no draft markers, no blinking UI vocabulary. */
.desk-state,
.essay-meta {
  letter-spacing: 0.14em;
}

.state-marker,
.desk-state .dot,
.essay-meta .meta-state .dot {
  display: none !important;
}

.site-footer {
  justify-content: space-between;
}

.footer-contact,
.footer-credit {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

.footer-credit {
  letter-spacing: 0.04em;
}

@media (max-width: 540px) {
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}

/* Remove the old drop-cap/editorial treatment from essays. */
.essay-body p:first-of-type::first-letter {
  all: unset;
}

.essay-body p:first-of-type::first-line {
  font-feature-settings: 'kern', 'liga';
  letter-spacing: 0;
}

/* Homepage system field: a living field, not a repeated four-lens diagram. */
.system-field-figure {
  max-width: min(100%, 56rem);
  margin: 2rem 0 1rem;
}

.system-canvas-wrap {
  width: 100%;
  height: clamp(16rem, 32vw, 24rem);
  position: relative;
  overflow: hidden;
  border-block: 0px solid var(--rule);
  background: var(--paper);
}

.system-field-canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

.system-field-figure figcaption,
.experiment-symbol figcaption {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-faint);
  margin-top: 0.85rem;
  max-width: var(--measure);
}

/* Symbolic experiment figure: an aperture rather than a methods table. */
.experiment-symbol {
  padding: 1.45rem 0 1.55rem;
}

.experiment-symbol-stage {
  position: relative;
  min-height: clamp(17rem, 31vw, 23rem);
  overflow: hidden;
  border-block: 1px solid rgba(212, 212, 210, 0.72);
  background:
    radial-gradient(circle at 20% 50%, rgba(74, 74, 74, 0.035), transparent 25%),
    radial-gradient(circle at 80% 50%, rgba(26, 26, 26, 0.045), transparent 28%);
}

.uncertainty-field span {
  position: absolute;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  border: 1px solid rgba(74, 74, 74, 0.30);
  opacity: 0.76;
}

.uncertainty-field span:nth-child(1) { left: 10%; top: 26%; }
.uncertainty-field span:nth-child(2) { left: 16%; top: 68%; }
.uncertainty-field span:nth-child(3) { left: 24%; top: 41%; }
.uncertainty-field span:nth-child(4) { left: 31%; top: 18%; }
.uncertainty-field span:nth-child(5) { left: 37%; top: 74%; }
.uncertainty-field span:nth-child(6) { left: 45%; top: 36%; }
.uncertainty-field span:nth-child(7) { left: 55%; top: 63%; }
.uncertainty-field span:nth-child(8) { left: 63%; top: 22%; }
.uncertainty-field span:nth-child(9) { left: 69%; top: 52%; }
.uncertainty-field span:nth-child(10) { left: 76%; top: 33%; }
.uncertainty-field span:nth-child(11) { left: 84%; top: 70%; }
.uncertainty-field span:nth-child(12) { left: 89%; top: 44%; }

.apparatus-rings .ring {
  position: absolute;
  border: 1px solid rgba(26, 26, 26, 0.25);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ring-a { left: 50%; top: 50%; width: 24rem; height: 7.6rem; }
.ring-b { left: 50%; top: 50%; width: 18rem; height: 12.5rem; transform: translate(-50%, -50%) rotate(-22deg); }
.ring-c { left: 50%; top: 50%; width: 9rem; height: 9rem; border-color: rgba(26, 26, 26, 0.38); }

.signal-beam {
  position: absolute;
  left: 23%;
  right: 24%;
  height: 1px;
  top: 50%;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(212, 212, 210, 0), rgba(26, 26, 26, 0.56), rgba(212, 212, 210, 0));
}

.beam-one { transform: rotate(-7deg) scaleX(1); }
.beam-two { transform: rotate(7deg) scaleX(1); }

.claim-aperture {
  position: absolute;
  right: 12%;
  top: 50%;
  width: 5.2rem;
  height: 5.2rem;
  transform: translateY(-50%);
  border: 1px solid rgba(26, 26, 26, 0.45);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(250, 250, 249, 0.78);
  box-shadow: 0 0 0 0.7rem rgba(250, 250, 249, 0.35);
}

.claim-aperture span {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: rgba(26, 26, 26, 0.42);
}

.aperture-label {
  position: absolute;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.label-question { left: 9%; top: 11%; }
.label-method { left: 47%; top: 11%; transform: translateX(-50%); }
.label-claim { right: 12%; top: 11%; }

.residue {
  position: absolute;
  display: block;
  border: 1px solid rgba(212, 212, 210, 0.95);
  border-radius: 50%;
}

.residue-a { left: 12%; bottom: 12%; width: 7rem; height: 2.6rem; transform: rotate(11deg); }
.residue-b { right: 20%; bottom: 14%; width: 6rem; height: 2.1rem; transform: rotate(-15deg); }

.thinking-figure:not(.is-visible) .experiment-symbol-stage .ring,
.thinking-figure:not(.is-visible) .signal-beam,
.thinking-figure:not(.is-visible) .claim-aperture,
.thinking-figure:not(.is-visible) .residue,
.thinking-figure:not(.is-visible) .uncertainty-field span,
.thinking-figure:not(.is-visible) .aperture-label {
  opacity: 0;
}

.thinking-figure.is-visible .experiment-symbol-stage .ring,
.thinking-figure.is-visible .signal-beam,
.thinking-figure.is-visible .claim-aperture,
.thinking-figure.is-visible .residue,
.thinking-figure.is-visible .uncertainty-field span,
.thinking-figure.is-visible .aperture-label {
  opacity: 1;
  transition: opacity 900ms ease, transform 1100ms cubic-bezier(0.2, 0.6, 0.2, 1);
}

.thinking-figure:not(.is-visible) .signal-beam {
  transform: rotate(0deg) scaleX(0.05);
}

.thinking-figure:not(.is-visible) .claim-aperture {
  transform: translateY(-50%) scale(0.86);
}

.thinking-figure:not(.is-visible) .uncertainty-field span:nth-child(odd) {
  transform: translateY(0.7rem);
}

.thinking-figure:not(.is-visible) .uncertainty-field span:nth-child(even) {
  transform: translateY(-0.7rem);
}

@media (max-width: 760px) {
  .system-field-figure { margin-top: 3.2rem; }
  .system-canvas-wrap { height: 15rem; }
  .ring-a { width: 18rem; height: 6.2rem; }
  .ring-b { width: 13.5rem; height: 9.4rem; }
  .ring-c { width: 6.7rem; height: 6.7rem; }
  .claim-aperture { right: 8%; width: 4.4rem; height: 4.4rem; }
  .label-claim { right: 8%; }
}

@media (prefers-reduced-motion: reduce) {
  .system-field-canvas,
  .system-canvas-wrap * {
    animation: none !important;
  }
  .thinking-figure:not(.is-visible) .experiment-symbol-stage .ring,
  .thinking-figure:not(.is-visible) .signal-beam,
  .thinking-figure:not(.is-visible) .claim-aperture,
  .thinking-figure:not(.is-visible) .residue,
  .thinking-figure:not(.is-visible) .uncertainty-field span,
  .thinking-figure:not(.is-visible) .aperture-label {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ------------------------------------------------------------
   References — testimonial blocks
   ------------------------------------------------------------ */

.essay-body .reference {
  margin: 0 0 3.25rem;
}

.essay-body .reference blockquote {
  margin: 0;
}

.essay-body .reference blockquote p {
  margin-bottom: 1rem;
}

.essay-body .reference blockquote p:last-child {
  margin-bottom: 0;
}

.essay-body .reference figcaption {
  margin-top: 0.7rem;
  padding-left: 1.5rem;
  font-family: var(--body);
  font-style: normal;
  font-size: 0.95rem;
}

.essay-body .reference-name {
  display: block;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
  font-variation-settings: 'opsz' 30;
}

.essay-body .reference-name::before {
  content: '— ';
  color: var(--ink-faint);
}

.essay-body .reference-role {
  display: block;
  color: var(--ink-faint);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

/* ------------------------------------------------------------
   Visually hidden — for accessible text alternatives
   ------------------------------------------------------------ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------
   Programme system diagram — Strengthening Families case study
   Swimlane: one week of the programme, coordination view.
   Wrapped in .argument-card for the established schematic
   visual language (52rem breakout, hairline frame).
   ------------------------------------------------------------ */

/* Scroll wrapper so the swimlane stays readable on narrow viewports */
.programme-week-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.4rem 0 0;
}

.programme-week-svg {
  display: block;
  width: 100%;
  min-width: 540px;
  height: auto;
}

/* Time-axis label across the top */
.programme-week-svg .axis-label {
  font-family: var(--body);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  fill: var(--ink-faint);
  text-anchor: middle;
  opacity: 0.8;
}

/* Lane labels */
.programme-week-svg .lane-label {
  font-family: var(--body);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  fill: var(--ink-faint);
  dominant-baseline: middle;
}

.programme-week-svg .lane-label--faint {
  opacity: 0.65;
}

/* Lane separators */
.programme-week-svg .lane-separator {
  stroke: var(--rule);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

/* Event labels (no anchoring ticks; lane separator is the visual anchor) */
.programme-week-svg .event-label {
  font-family: var(--body);
  font-size: 9.5px;
  fill: var(--ink-soft);
  text-anchor: middle;
  dominant-baseline: alphabetic;
}

.programme-week-svg .event-label--faint {
  fill: var(--ink-faint);
}

/* Accent stroke for handoff lines and accent labels */
.programme-week-svg .stroke-dashed-accent {
  stroke: var(--accent);
  stroke-width: 1.25;
  stroke-dasharray: 4 3;
  fill: none;
  vector-effect: non-scaling-stroke;
}

.programme-week-svg .label-accent {
  font-family: var(--display);
  font-style: italic;
  font-size: 11px;
  fill: var(--accent);
  text-anchor: middle;
  font-variation-settings: 'opsz' 24;
}

/* Reveal animation — sequenced when .is-visible toggles on */
.programme-system-diagram .programme-week-svg .events,
.programme-system-diagram .programme-week-svg .handoffs,
.programme-system-diagram .programme-week-svg .lane-separators {
  opacity: 0;
  transition: opacity 0.7s ease;
}

.programme-system-diagram.is-visible .programme-week-svg .lane-separators {
  opacity: 1;
  transition-delay: 0s;
}

.programme-system-diagram.is-visible .programme-week-svg .events {
  opacity: 1;
  transition-delay: 0.3s;
}

.programme-system-diagram.is-visible .programme-week-svg .handoffs {
  opacity: 1;
  transition-delay: 0.6s;
}

@media (prefers-reduced-motion: reduce) {
  .programme-system-diagram .programme-week-svg .events,
  .programme-system-diagram .programme-week-svg .handoffs,
  .programme-system-diagram .programme-week-svg .lane-separators {
    opacity: 1 !important;
    transition: none !important;
  }
}
