/* ---------- Subpage template (missions + projects) ----------
   Reuses the design tokens, type system, nav, buttons and footer
   defined in styles.css. Adds only the structures the standard
   mission/project layout needs:
     1. Hero image
     2. Introduction
     3. The problem
     4. Our response (boxes)
     5. Our impact (stats)
     6. What we learnt
*/

/* ---------- Breadcrumb under the nav ---------- */
.crumb {
  border-bottom: 1px solid var(--rule);
}
.crumb .container {
  display: flex; align-items: center; gap: 12px;
  padding-top: 18px; padding-bottom: 18px;
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-mute);
}
.crumb a { color: var(--ink-mute); }
.crumb a:hover { color: var(--accent); }
.crumb .sep { opacity: 0.5; }
.crumb .here { color: var(--ink); }

/* ---------- 1. Hero ---------- */
.sp-hero {
  position: relative;
  min-height: 52vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff;
  background: var(--ink);
  overflow: hidden;
}
.sp-hero image-slot {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.sp-hero .scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(12,26,58,0.36) 0%,
    rgba(12,26,58,0.14) 26%,
    rgba(12,26,58,0.54) 52%,
    rgba(10,22,50,0.90) 78%,
    rgba(8,18,44,0.97) 100%);
}
.sp-hero .container { position: relative; padding-top: 56px; padding-bottom: 44px; }
.sp-hero .kind {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; color: rgba(255,255,255,0.82);
  display: inline-flex; align-items: center; gap: 12px;
}
.sp-hero .kind .bar { width: 28px; height: 1px; background: currentColor; opacity: 0.7; }
.sp-hero h1 {
  color: #fff;
  font-weight: 400;
  font-size: clamp(44px, 6vw, 104px);
  line-height: 0.96;
  margin-top: 22px;
  max-width: 18ch;
}
.sp-hero .standfirst {
  color: rgba(255,255,255,0.86);
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 1.5; max-width: 56ch; margin-top: 26px;
  text-wrap: pretty;
}
.sp-hero .hero-caption {
  margin-top: 40px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(255,255,255,0.6);
}

/* ---------- Section heading pattern (left rail + body) ---------- */
.sp-section { padding-top: 84px; padding-bottom: 84px; }
/* Tone bands — alternate section backgrounds so the page reads as a rhythm of
   distinct slabs rather than one long block. Bone (default) / white / deep tan,
   with the navy Problem and footer as the dark anchors. */
/* Alternating slabs give the long subpage rhythm. No white: sections step
   between the default bone (--bg) and the deeper tan (--bg-deep), with the
   navy Problem and footer as the dark anchors. */
.sp-section.tone-paper { background: var(--bg-deep); }
.sp-section.tone-deep { background: var(--bg-deep); }
.sp-section.tight { padding-top: 60px; padding-bottom: 60px; }
.sp-split {
  display: grid; grid-template-columns: 0.8fr 1.6fr;
  gap: 72px; align-items: start;
}
.sp-split .rail .eyebrow { display: inline-flex; align-items: center; }
.sp-split .rail h2 { margin-top: 18px; }
/* Impact: bottom-align the lede with the heading */
.sp-impact .sp-split { align-items: end; }
.sp-impact .sp-split .sp-lede-lg { margin-bottom: 0; }
.sp-lede-lg {
  font-family: var(--display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-track);
  font-size: clamp(24px, 2.4vw, 38px);
  line-height: 1.18;
  color: var(--ink);
  text-wrap: pretty;
}
.sp-body { font-size: 18px; line-height: 1.68; color: var(--ink-soft); }
.sp-body + .sp-body { margin-top: 22px; }
.sp-body.cols {
  column-count: 2; column-gap: 56px;
}

/* ---------- 2. Introduction stat band ---------- */
.intro-band {
  margin-top: 48px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
}
.intro-band .cell {
  padding: 28px 28px 28px 0;
  border-right: 1px solid var(--rule);
}
.intro-band .cell:last-child { border-right: 0; }
.intro-band .cell + .cell { padding-left: 28px; }
.intro-band .num {
  font-family: var(--display); font-weight: var(--display-weight);
  font-size: clamp(30px, 3vw, 48px); line-height: 1; color: var(--ink);
  letter-spacing: -0.02em;
}
.intro-band .num .unit { font-size: 0.5em; margin-left: 3px; color: var(--accent); }
.intro-band .lbl {
  margin-top: 12px;
  font-size: 14px; line-height: 1.45; color: var(--ink-mute);
}

/* ---------- 3. The problem (dark) ---------- */
.sp-problem {
  background: var(--brand-blue); color: var(--bg);
}
.sp-problem .eyebrow.accent { color: rgba(255,255,255,0.78); }
.sp-problem h2 { color: var(--bg); }
.sp-problem .sp-lede-lg { color: var(--bg); }
.sp-problem .sp-body { color: rgba(255,255,255,0.78); }
.sp-problem .pq {
  font-family: var(--display); font-weight: var(--display-weight);
  font-size: clamp(28px, 3.2vw, 52px); line-height: 1.1;
  color: #fff; margin: 0 0 8px; max-width: 20ch;
  letter-spacing: var(--display-track);
}
.sp-problem .problem-points {
  margin-top: 56px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0; border-top: 1px solid rgba(255,255,255,0.22);
}
.sp-problem .pp {
  padding: 32px 32px 0 0;
  border-right: 1px solid rgba(255,255,255,0.16);
}
.sp-problem .pp:last-child { border-right: 0; }
.sp-problem .pp + .pp { padding-left: 32px; }
.sp-problem .pp .pp-num {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: rgba(255,255,255,0.72); margin-bottom: 12px;
}
.sp-problem .pp h4 { color: #fff; font-size: 21px; margin-bottom: 10px; }
.sp-problem .pp p { color: rgba(255,255,255,0.74); font-size: 15px; line-height: 1.6; }

/* ---------- 4. Our response ---------- */
.response-head { margin-bottom: 56px; }
.response-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--rule);
  border: 1px solid var(--rule);
}
.response-grid.two { grid-template-columns: repeat(2, 1fr); }
.response-grid.four { grid-template-columns: repeat(4, 1fr); }

/* Orphan handling. A SINGLE trailing card (n%3 = 1) stretches across the full
   row in a horizontal layout so it doesn't sit alone. But TWO trailing cards
   (n%3 = 2) stay as normal vertical cards — matching the rest of the grid —
   and the one leftover cell is filled with neutral space rather than letting
   one card balloon into a mismatched horizontal tile. Tidy grids (6, 9...) are
   untouched. */
.response-grid > .resp-card:last-child:nth-child(3n + 1) { grid-column: span 3; }
.response-grid.two > .resp-card:last-child:nth-child(2n + 1) { grid-column: span 2; }
.response-grid:has(> .resp-card:last-child:nth-child(3n + 2))::after {
  content: ''; background: var(--bg-deep); display: block;
}
@media (min-width: 681px) {
  .response-grid > .resp-card.is-stretched,
  .response-grid > .resp-card:last-child:nth-child(3n + 1),
  .response-grid.two > .resp-card:last-child:nth-child(2n + 1) {
    flex-direction: row; align-items: stretch;
  }
  .response-grid > .resp-card.is-stretched > .r-img,
  .response-grid > .resp-card:last-child:nth-child(3n + 1) > .r-img,
  .response-grid.two > .resp-card:last-child:nth-child(2n + 1) > .r-img {
    flex: 0 0 40%; aspect-ratio: auto; align-self: stretch;
  }
  .response-grid > .resp-card.is-stretched > .r-body,
  .response-grid > .resp-card:last-child:nth-child(3n + 1) > .r-body,
  .response-grid.two > .resp-card:last-child:nth-child(2n + 1) > .r-body {
    flex: 1 1 auto; justify-content: center;
  }
}
.resp-card {
  background: var(--bg-deep);
  display: flex; flex-direction: column;
  min-height: 100%;
  transition: background 140ms ease;
}
a.resp-card:hover { background: var(--bg); }
.resp-card .r-img {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--bg-deep);
}
.resp-card .r-img image-slot { position: absolute; inset: 0; width: 100%; height: 100%; }
.resp-card .r-body {
  padding: 26px 26px 28px;
  display: flex; flex-direction: column; flex: 1 1 auto;
}
.resp-card .r-meta {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink); margin-bottom: 14px;
}
.resp-card h3 {
  font-size: 26px; line-height: 1.08; margin-bottom: 12px;
}
.resp-card p { font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.resp-card .r-foot {
  margin-top: auto; padding-top: 22px;
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-mute);
}
.resp-card .r-foot .go { color: var(--accent); }

/* Plain (non-image) response boxes for projects that describe interventions */
.resp-card.plain .r-body { padding-top: 30px; }
.resp-card.plain .r-num {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em;
  color: var(--ink-mute); margin-bottom: 18px;
}

/* ---------- 5. Our impact ---------- */
.sp-impact { background: var(--bg-deep); }
.impact-grid {
  margin-top: 56px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--rule);
  border: 1px solid var(--rule);
}
.impact-cell {
  background: var(--bg-deep);
  padding: 40px 34px 44px;
}
.impact-cell .num {
  font-family: var(--display); font-weight: var(--display-weight);
  font-size: clamp(46px, 5.4vw, 86px); line-height: 0.94;
  letter-spacing: -0.025em; color: var(--ink);
}
.impact-cell .num .unit { font-size: 0.42em; color: var(--accent); margin-left: 4px; }
.impact-cell .lbl {
  margin-top: 18px; font-size: 17px; font-weight: 600; color: var(--ink);
}
.impact-cell .desc { margin-top: 8px; font-size: 14px; line-height: 1.55; color: var(--ink-mute); }

/* ---------- 6. What we learnt ---------- */
.learnt-list {
  margin-top: 36px;
  border-top: 1px solid var(--rule);
}
.learnt-row {
  display: grid; grid-template-columns: 96px 0.9fr 1.4fr;
  gap: 40px; align-items: start;
  padding: 40px 0;
  border-bottom: 1px solid var(--rule);
}
.learnt-row .l-num {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em;
  color: var(--accent); padding-top: 6px;
}
.learnt-row h4 { font-size: clamp(22px, 1.8vw, 30px); line-height: 1.1; }
.learnt-row p { font-size: 17px; line-height: 1.62; color: var(--ink-soft); }

/* ---------- Closing CTA ---------- */
/* A light, integrated final section — sits on the page background and is set
   off by a hairline rather than a solid block, so the base of the page isn't
   two heavy slabs (CTA + footer). The navy footer stays the single anchor. */
.sp-cta {
  background: var(--bg); color: var(--ink);
  padding-top: 72px; padding-bottom: 76px;
}
.sp-cta .eyebrow.accent { color: var(--ink); }
.sp-cta h2 { color: var(--ink); max-width: 20ch; margin-top: 18px; }
.sp-cta .cta-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 36px; }
.sp-cta .siblings {
  margin-top: 56px; padding-top: 28px;
  border-top: 1px solid var(--rule);
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
}
.sp-cta .sib {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-soft);
  border: 1px solid var(--rule);
  padding: 10px 16px;
}
.sp-cta .sib:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ---------- Our people: profile grid ---------- */
.sp-people.alt { background: var(--bg-deep); }
.people-head { margin-bottom: 40px; max-width: 60ch; }
.people-head .people-note { margin-top: 16px; font-size: 17px; line-height: 1.6; color: var(--ink-soft); }
.people-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 28px;
}
.person { display: flex; flex-direction: column; }
.person .p-photo {
  aspect-ratio: 1/1; overflow: hidden; position: relative;
  background: transparent; margin-bottom: 16px;
}
.person .p-photo image-slot { width: 100%; height: 100%; display: block; }

/* ---------- Careers: journey video row ---------- */
.journey-grid {
  margin-top: 48px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.journey-card {
  display: flex; flex-direction: column; text-decoration: none;
  background: none; border: 0; padding: 0; margin: 0;
  text-align: left; font: inherit; cursor: pointer;
}
.journey-card .j-thumb {
  position: relative; aspect-ratio: 16/9; overflow: hidden;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  margin-bottom: 14px;
}
.journey-card .j-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 300ms ease;
}
.journey-card:hover .j-thumb img { transform: scale(1.04); }
.journey-card .j-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
}
.journey-card .j-play::after {
  content: ''; position: absolute; left: 55%; top: 50%; transform: translate(-50%, -50%);
  border-style: solid; border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent #FFFFFF;
}
.journey-card .j-num {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--accent);
}
.journey-card h3 {
  margin-top: 6px;
  font-family: var(--display); font-weight: var(--display-weight);
  font-size: 20px; line-height: 1.2; color: var(--ink);
}
.journey-card .j-watch {
  margin-top: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-mute, var(--ink));
}
.journey-card:hover .j-watch { color: var(--ink); }
.journey-card.pending .j-thumb {
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed color-mix(in srgb, var(--ink) 30%, transparent);
  background: color-mix(in srgb, var(--ink) 3%, transparent);
}
.journey-card.pending .j-soon {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-mute, var(--ink));
}
@media (max-width: 960px) { .journey-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .journey-grid { grid-template-columns: 1fr; } }
.person .p-photo.p-vacant {
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed color-mix(in srgb, var(--ink) 35%, transparent);
  background: color-mix(in srgb, var(--ink) 4%, transparent);
}
.person .p-photo.p-vacant span {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-mute, var(--ink));
}
.person .p-bio {
  position: absolute; inset: 0;
  background: color-mix(in srgb, var(--ink) 94%, transparent);
  color: var(--bg);
  padding: 22px; display: flex; align-items: center;
  opacity: 0; visibility: hidden; transition: opacity 220ms ease, visibility 220ms;
}
.person:hover .p-bio, .person:focus-within .p-bio { opacity: 1; visibility: visible; }
.person .p-bio p { font-size: 13.5px; line-height: 1.6; color: rgba(255,255,255,0.92); }
.person .p-name {
  font-family: var(--display); font-weight: var(--display-weight);
  font-size: 20px; line-height: 1.15; color: var(--ink);
}
.person .p-role {
  margin-top: 6px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-mute); line-height: 1.4;
}
@media (max-width: 1024px) { .people-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .people-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 18px; } }

/* ---------- Founder's letter ---------- */
.sp-letter { background: var(--bg); }
.sp-letter .rail { position: sticky; top: 96px; }
.letter-portrait {
  margin-top: 24px; aspect-ratio: 4/5; overflow: hidden; max-width: 340px;
  background: var(--bg-deep); border: 1px solid var(--rule);
}
.letter-portrait image-slot { width: 100%; height: 100%; display: block; }
.letter-body { max-width: 62ch; }
.letter-lede {
  font-family: var(--display); font-weight: var(--display-weight);
  letter-spacing: var(--display-track);
  font-size: clamp(23px, 2.3vw, 34px); line-height: 1.25;
  color: var(--ink); margin-bottom: 28px; text-wrap: pretty;
}
.letter-body p { font-size: 18px; line-height: 1.72; color: var(--ink-soft); }
.letter-body p + p { margin-top: 20px; }
.letter-sign { margin-top: 36px; }
.letter-sign .ls-name {
  font-family: var(--display); font-weight: var(--display-weight);
  font-size: 24px; color: var(--ink);
}
.letter-sign .ls-role {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-mute); margin-top: 6px;
}

/* ---------- Partnerships / contact form ---------- */
.pf-form { max-width: 62ch; }
.pf-form label {
  display: block; margin-bottom: 18px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-mute);
}
.pf-form input, .pf-form select, .pf-form textarea {
  display: block; width: 100%; margin-top: 8px; padding: 12px 14px;
  font-family: var(--body); font-size: 16px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--ink); border-radius: 0;
}
.pf-form .pf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pf-form textarea { resize: vertical; }
.pf-form .btn { margin-top: 8px; cursor: pointer; }
.pf-sent { margin-top: 18px; font-size: 14px; line-height: 1.6; color: var(--accent); }
@media (max-width: 680px) { .pf-form .pf-row { grid-template-columns: 1fr; } }

/* ---------- The Pharo Verse: group-structure tree ---------- */
/* Deep-tan band so it reads apart from the bone Response section above it. */
.sp-tree { background: var(--bg-deep); }
.tree-grid {
  margin-top: 56px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--rule);
  border: 1px solid var(--rule);
}
.tree-col { background: var(--bg); padding: 0; }
.tree-arm {
  padding: 20px 24px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--bg);
  background: var(--ink);
}
.tree-col.tone-edu .tree-arm { background: var(--ink); }
.tree-col.tone-dev .tree-arm { background: #2b6b63; }
.tree-col.tone-ven .tree-arm { background: var(--accent); }
.tree-units { display: flex; flex-direction: column; }
.tree-unit {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--rule);
  transition: background 120ms ease;
}
.tree-unit:first-child { border-top: 0; }
.tree-unit:hover { background: var(--paper); }
.tree-unit .tu-label { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.tree-unit .tu-country {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-mute); white-space: nowrap;
}
@media (max-width: 900px) {
  .tree-grid { grid-template-columns: 1fr; }
}

/* 404 / not found */
.sp-missing { padding: 200px 0; text-align: center; }
.sp-missing h1 { font-size: clamp(36px, 4vw, 64px); }
.sp-missing p { margin-top: 18px; color: var(--ink-mute); }
.sp-missing a { margin-top: 32px; display: inline-block; }

/* ---------- Newsletter: Field Notes + Pharo in Focus ---------- */
.nl-hero { min-height: 42vh; }
.nl-wrap { max-width: 900px; }
/* Subscribe band on Pharo in Focus */
.nl-subscribe{display:grid;grid-template-columns:1.6fr auto;gap:32px;align-items:center;background:var(--ink);color:#fff;padding:40px 44px;margin:56px 0 18px;border:1px solid var(--ink)}
.nl-sub-eyebrow{display:block;font-family:var(--mono);font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:var(--accent-bright);margin-bottom:10px}
.nl-subscribe h2{font-family:var(--display);font-size:clamp(26px,3vw,38px);line-height:1.04;letter-spacing:-.015em;margin:0;color:#fff}
.nl-subscribe p{margin:12px 0 0;max-width:52ch;color:rgba(255,255,255,.78);font-size:15px;text-wrap:pretty}
.nl-sub-btn{display:inline-flex;align-items:center;gap:12px;background:var(--accent-bright);color:var(--ink);font-family:var(--mono);font-size:13px;letter-spacing:.14em;text-transform:uppercase;font-weight:700;padding:20px 30px;text-decoration:none;white-space:nowrap;transition:background 140ms ease,transform 140ms ease}
.nl-sub-btn:hover{background:#fff;color:var(--ink);transform:translateX(3px)}
@media (max-width:760px){.nl-subscribe{grid-template-columns:1fr;padding:30px 24px;gap:22px}.nl-sub-btn{justify-content:center}}
.nl-foot-note {
  margin-top: 8px; font-size: 13px; color: var(--ink-mute);
  font-style: italic; max-width: 64ch;
}
/* Field notes */
.field-note { border-top: 1px solid var(--rule); }
.field-note:first-child { border-top: 0; }
.field-note > summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 200px 1fr auto; gap: 32px; align-items: center;
  padding: 28px 0;
}
.field-note > summary::-webkit-details-marker { display: none; }
.field-note > summary::after {
  content: '+'; font-family: var(--mono); font-size: 22px; color: var(--accent); line-height: 1;
}
.field-note[open] > summary::after { content: '\2013'; }
.field-note > summary:hover .fn-month { color: var(--accent); }
.field-note .fn-when { display: flex; flex-direction: column; gap: 6px; }
.field-note .fn-month {
  font-family: var(--display); font-weight: var(--display-weight);
  font-size: 22px; color: var(--ink); line-height: 1.1;
}
.field-note .fn-date {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-mute);
}
.field-note .fn-preview { font-size: 16px; line-height: 1.5; color: var(--ink-mute); }
.field-note[open] .fn-preview { visibility: hidden; }
.field-note .fn-body { padding: 0 0 40px 232px; max-width: 64ch; }
.field-note .fn-body p { font-size: 18px; line-height: 1.7; color: var(--ink-soft); }
.field-note .fn-body p + p { margin-top: 18px; }
.field-note .fn-teaser { font-style: italic; color: var(--ink-mute); }
.field-note .fn-sign {
  margin-top: 22px; font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.08em; color: var(--ink); line-height: 1.5;
}
/* Pharo in Focus editions */
.focus-edition { padding: 56px 0; border-top: 1px solid var(--rule); }
.focus-edition:first-child { border-top: 0; }
.focus-edition:not(.focus-compact) {
  position: relative; z-index: 1;
  background: var(--bg);
  margin: 0 -18px 36px; padding: 40px 34px 48px;
  border: 1px solid var(--rule); border-top: none;
  box-shadow: 0 26px 44px -28px rgba(30,20,8,0.45);
  transform: rotate(-0.35deg);
  overflow: hidden;
}
.fe-spine {
  display: none;
}
@media (min-width: 900px) {
  .fe-spine {
    display: block; position: absolute; left: -30px; top: 50%;
    writing-mode: vertical-rl; transform: translateY(-50%) rotate(180deg);
    font-family: var(--mono); font-size: 9px; letter-spacing: 0.22em;
    color: color-mix(in srgb, var(--ink) 40%, transparent);
    white-space: nowrap;
  }
}
.fe-head { position: relative; }
.fe-head[data-issue]::before {
  content: attr(data-issue);
  position: absolute; right: -6px; top: -34px;
  font-family: var(--display); font-weight: var(--display-weight);
  font-size: 140px; line-height: 1; color: color-mix(in srgb, var(--ink) 7%, transparent);
  z-index: -1; pointer-events: none;
}
.focus-edition.focus-compact { border-top: 1px dashed color-mix(in srgb, var(--ink) 22%, transparent); background: color-mix(in srgb, var(--bg) 88%, transparent); padding-left: 18px; padding-right: 18px; }
.focus-edition.focus-compact:first-of-type { border-top: 0; }
.focus-edition:not(.focus-compact) {
  position: relative;
}
@media (min-width: 900px) {
  .focus-edition:not(.focus-compact)::before {
    content: '';
    position: absolute; left: -34px; top: 8px; bottom: 8px; width: 8px;
    background-image: radial-gradient(circle, color-mix(in srgb, var(--ink) 22%, transparent) 2.5px, transparent 3px);
    background-size: 8px 26px; background-repeat: repeat-y;
  }
}
.focus-edition .fe-head { margin-bottom: 24px; }
.focus-edition .fe-head-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.focus-edition .fe-badge {
  display: inline-block; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase; color: #fff;
  background: var(--accent); padding: 5px 10px; margin-bottom: 14px;
}
.focus-edition .fe-head h2 { font-size: clamp(28px, 3vw, 44px); line-height: 1; }
.focus-edition .fe-issue {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  color: var(--ink-mute); white-space: nowrap;
  padding-bottom: 4px;
}
.focus-edition .fe-postmark {
  width: 68px; height: 68px; flex: none; color: var(--accent);
  opacity: 0.82; transform: rotate(6deg);
}
.focus-edition .fe-postmark svg { width: 100%; height: 100%; }
.fe-head-meta { margin-top: 10px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.fe-places {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent);
}
.fe-places .fe-pin, .fc-pin { width: 12px; height: 12px; display: inline-flex; flex: none; }
.fe-places .fe-pin svg, .fc-pin svg { width: 100%; height: 100%; }
.fc-pin { color: var(--accent); margin-right: 2px; }
.focus-edition .fe-date {
  display: block; margin-top: 10px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-mute);
}

/* --- Field-journal styling: torn photo edge, pinned tape, margin annotation --- */
.fe-masthead {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 28px;
}
.fe-masthead-line {
  flex: 1; height: 0; border-top: 1px dashed color-mix(in srgb, var(--ink) 32%, transparent);
}
.fe-masthead-label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-mute); white-space: nowrap;
}
.nl-signature {
  font-family: 'Caveat', cursive; font-size: 22px; font-weight: 600;
  color: var(--accent-soft); margin: -6px 0 14px; opacity: 0.9;
}
.nl-scrapbook {
  position: relative;
  background-color: #C9BBA0;
  background-image:
    radial-gradient(circle at 8% 12%, rgba(255,255,255,0.10) 0, transparent 45%),
    radial-gradient(circle at 92% 82%, rgba(0,0,0,0.10) 0, transparent 42%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, #CBBEA4, #B9AA8B);
  padding: 46px 8px 40px;
  box-shadow: inset 0 18px 34px -24px rgba(30,20,8,0.5), inset 0 -18px 34px -24px rgba(30,20,8,0.4);
}
/* Coffee-ring stains, torn map corner: desk clutter, purely decorative */
.nl-scrapbook::before, .nl-scrapbook::after {
  content: ''; position: absolute; pointer-events: none; border-radius: 50%;
  border: 7px solid rgba(90,58,20,0.16);
  box-shadow: inset 0 0 0 3px rgba(90,58,20,0.08);
}
.nl-scrapbook::before { width: 130px; height: 130px; top: 4%; right: 6%; transform: rotate(-8deg) scaleY(0.94); }
.nl-scrapbook::after { width: 86px; height: 86px; bottom: 8%; left: 3%; transform: rotate(12deg) scaleY(1.06); }
.nl-mapscrap {
  position: absolute; top: 18px; right: 32px; width: 190px; height: 130px;
  opacity: 0.5; transform: rotate(6deg); pointer-events: none; z-index: 0;
  filter: sepia(0.35) contrast(1.02);
}
@media (max-width: 900px) { .nl-mapscrap { display: none; } }
.fe-stamped-title {
  display: inline-block; position: relative; margin-top: 8px;
}
.fe-stamped-title span {
  position: relative; display: inline-block;
  font-family: var(--display); font-weight: var(--display-weight);
  font-size: clamp(28px, 3vw, 44px); line-height: 1;
  color: var(--ink);
  padding: 2px 4px;
}
.fe-stamped-title::before {
  content: ''; position: absolute; left: -10px; right: -14px; bottom: 2px; top: 44%;
  background: color-mix(in srgb, var(--accent-bright) 55%, transparent);
  transform: rotate(-1deg);
  z-index: -1;
}
.fe-media-wrap { position: relative; margin: 0 0 60px; padding: 0 0 0 18px; }
.fe-media-mat {
  position: absolute; inset: 14px -10px -18px 8px;
  background: var(--bg-deep);
  border: 1px solid var(--rule);
  transform: rotate(0.9deg);
  box-shadow: 0 18px 32px -18px rgba(16,22,33,0.28);
}
.fe-media-wrap .fe-media {
  position: relative;
  aspect-ratio: 16/9; overflow: hidden; background: var(--bg-deep);
  border: 1px solid var(--rule);
  transform: rotate(-0.7deg);
  clip-path: polygon(
    0% 0%, 100% 0%, 100% 96%,
    97% 98%, 93% 96.5%, 89% 98.3%, 85% 96.8%, 81% 98.5%,
    77% 96.6%, 73% 98.2%, 69% 97%, 65% 98.6%, 61% 96.4%,
    57% 98.3%, 53% 97%, 49% 98.5%, 45% 96.7%, 41% 98.4%,
    37% 96.9%, 33% 98.2%, 29% 97%, 25% 98.6%, 21% 96.5%,
    17% 98.3%, 13% 97%, 9% 98.5%, 5% 96.6%, 2% 98%, 0% 96.5%
  );
}
.fe-media-wrap .fe-media image-slot {
  filter: grayscale(0.7) sepia(0.3) contrast(1.08) brightness(0.96);
}
.fe-media-tint {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(150deg, rgba(0,47,108,0.38), rgba(217,164,65,0.14) 55%, rgba(0,47,108,0.08));
  mix-blend-mode: multiply;
}
.fe-media-wrap .fe-tape {
  position: absolute; top: -14px; left: 46px; width: 100px; height: 32px;
  background: linear-gradient(0deg, color-mix(in srgb, var(--accent-bright) 78%, transparent), color-mix(in srgb, var(--accent-bright) 60%, transparent));
  transform: rotate(-5deg);
  box-shadow: 0 3px 6px rgba(16,22,33,0.2);
  z-index: 3;
}
.fe-media-wrap .fe-tape-2 {
  top: auto; bottom: -14px; left: auto; right: 54px; width: 78px; height: 26px;
  background: linear-gradient(0deg, color-mix(in srgb, var(--ink) 42%, transparent), color-mix(in srgb, var(--ink) 28%, transparent));
  transform: rotate(7deg);
}
.fe-media-wrap .fe-tape::before, .fe-media-wrap .fe-tape::after,
.fe-media-wrap .fe-tape-2::before, .fe-media-wrap .fe-tape-2::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 10px;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,0.35) 0 2px, transparent 2px 5px);
}
.fe-media-wrap .fe-tape::before { left: 0; }
.fe-media-wrap .fe-tape::after { right: 0; }
.fe-pinline {
  position: absolute; right: 96px; bottom: -32px; width: 1px; height: 26px;
  border-left: 1px dashed color-mix(in srgb, var(--ink) 45%, transparent);
}
.fe-annot {
  position: absolute; right: 22px; bottom: -48px;
  font-family: 'Caveat', cursive; font-size: 25px; font-weight: 600;
  color: var(--ink); background: var(--bg); padding: 2px 14px 4px;
  transform: rotate(-2.5deg);
  border: 1px solid var(--rule);
  z-index: 2;
}
.fe-teaser-card {
  position: relative;
  background: var(--bg-deep); border: 1px dashed color-mix(in srgb, var(--ink) 34%, transparent);
  padding: 26px 30px 22px 52px; margin-bottom: 40px; max-width: 66ch;
}
.fe-quote-mark {
  position: absolute; left: 14px; top: 2px;
  font-family: var(--display); font-size: 56px; line-height: 1; color: var(--accent);
  opacity: 0.55;
}
.fe-teaser-card .fe-teaser { font-size: 18px; font-style: italic; color: var(--ink-soft); max-width: none; margin: 0; }
.fe-media {
  aspect-ratio: 16/9; overflow: hidden; background: var(--bg-deep);
  border: 1px solid var(--rule); margin: 0 0 32px;
}
.fe-media image-slot { width: 100%; height: 100%; display: block; }
.fe-letter { max-width: 64ch; }
.fe-letter p { font-size: 17px; line-height: 1.68; color: var(--ink-soft); }
.fe-letter p + p { margin-top: 16px; }
.fe-letter .fe-greet { font-weight: 600; color: var(--ink); }
.fe-sign { margin-top: 20px; font-family: var(--mono); font-size: 12px; color: var(--ink); line-height: 1.5; }
.fe-teaser { font-size: 18px; font-style: italic; color: var(--ink-mute); max-width: 60ch; }
.fe-sections {
  margin-top: 48px; display: grid; grid-template-columns: 1.3fr 1fr 1fr;
  gap: 26px 22px; background: none; border: 0;
}
@media (max-width: 900px) { .fe-sections { grid-template-columns: 1fr 1fr; } }
.fe-item {
  position: relative; display: block; text-decoration: none;
  padding: 26px 22px 20px;
  border: 1px dashed color-mix(in srgb, var(--ink) 30%, transparent);
  box-shadow: 0 8px 16px -12px rgba(16,22,33,0.24);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.fe-item .fe-ico { margin-right: 7px; color: var(--accent); }
.fe-item .fe-kind {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink);
  border: 1px solid var(--ink); border-radius: 999px;
  padding: 4px 12px; margin-bottom: 14px;
}
.fe-item h4 { font-size: 18px; line-height: 1.25; margin-bottom: 12px; color: var(--ink); }

.fe-item-0 { background: var(--bg-deep); transform: rotate(-1.3deg) translateY(6px); }
.fe-item-1 { background: var(--ink); color: var(--bg); border-color: color-mix(in srgb, var(--bg) 40%, transparent); transform: rotate(1deg); }
.fe-item-2 { background: var(--bg-deep); transform: rotate(-0.5deg) translateY(4px); }
.fe-item:hover { transform: rotate(0deg) translateY(0) scale(1.02); box-shadow: 0 14px 26px -14px rgba(16,22,33,0.32); z-index: 3; }
.fe-item-1 h4 { color: var(--bg); }
.fe-item-1 .fe-kind { color: var(--accent-soft); border-color: color-mix(in srgb, var(--bg) 55%, transparent); }
.fe-item-1 .fe-ico { color: var(--accent-soft); }
.fe-item-1 .fe-link { color: var(--accent-soft); }
.fe-clip {
  position: absolute; top: -9px; right: 18px; width: 22px; height: 22px;
  border: 2px solid color-mix(in srgb, var(--ink) 55%, transparent);
  border-radius: 50% 50% 50% 4px; transform: rotate(-40deg);
  background: transparent;
}
.fe-item-1 .fe-clip { border-color: color-mix(in srgb, var(--bg) 55%, transparent); }
.fe-item::before {
  content: ''; position: absolute; top: -1px; left: 10px; right: 10px; height: 8px;
  background-image: radial-gradient(circle at 6px 0, transparent 4px, var(--bg-deep) 4.5px);
  background-size: 12px 8px; background-repeat: repeat-x;
}
.fe-item-1::before, .fe-item-2::before { display: none; }
.fe-link {
  display: inline-block;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.fe-item:hover .fe-link { color: var(--ink); }
.fe-item-1:hover .fe-link { color: var(--bg); }

/* Compact (collapsed) historical editions */
.focus-compact { padding: 0; }
.focus-compact > summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 16px 130px 200px 1fr auto; gap: 12px; align-items: baseline;
  padding: 22px 0;
}
.focus-compact > summary::-webkit-details-marker { display: none; }
.focus-compact > summary::after {
  content: '+'; font-family: var(--mono); font-size: 20px; color: var(--accent); line-height: 1;
  justify-self: end;
}
.focus-compact[open] > summary::after { content: '\2013'; }
.focus-compact .fe-badge {
  display: inline-block; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mute);
  background: none; padding: 0; margin: 0;
}
.focus-compact .fc-month {
  font-family: var(--display); font-weight: var(--display-weight);
  font-size: 19px; color: var(--ink);
}
.focus-compact .fc-teaser {
  font-size: 15px; color: var(--ink-mute); font-style: italic;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.focus-compact:hover .fc-month { color: var(--accent); }
.focus-compact[open] .fc-teaser { visibility: hidden; }
.focus-compact .fc-body { padding: 4px 0 40px; }
@media (max-width: 760px) {
  .focus-compact > summary { grid-template-columns: 16px 1fr auto; }
  .focus-compact .fc-teaser, .focus-compact .fe-badge { display: none; }
}
@media (max-width: 760px) {
  .field-note > summary { grid-template-columns: 1fr; gap: 6px; }
  .field-note .fn-body { padding-left: 0; }
  .fe-sections { grid-template-columns: 1fr; }
}

.nl-yeartabs {
  position: fixed; right: 0; top: 45%; z-index: 20;
  display: flex; flex-direction: column;
}
.nl-yeartabs a {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  color: var(--bg); background: var(--ink);
  padding: 10px 14px 10px 18px; margin-bottom: 4px;
  border-radius: 6px 0 0 6px;
  box-shadow: -4px 4px 10px -6px rgba(16,22,33,0.4);
  transition: padding-right 140ms ease, background 140ms ease;
}
.nl-yeartabs a:hover { padding-right: 20px; background: var(--accent); color: var(--paper); }
@media (max-width: 760px) { .nl-yeartabs { display: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .sp-split { grid-template-columns: 1fr; gap: 32px; }
  .sp-letter .rail { position: static; top: auto; }
  .sp-body.cols { column-count: 1; }
  .intro-band { grid-template-columns: repeat(2, 1fr); }
  .intro-band .cell:nth-child(2) { border-right: 0; }
  .intro-band .cell { border-bottom: 1px solid var(--rule); padding: 24px; }
  .sp-problem .problem-points { grid-template-columns: 1fr; }
  .sp-problem .pp { border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.16); padding: 28px 0; }
  .sp-problem .pp + .pp { padding-left: 0; }
  .response-grid, .response-grid.two, .response-grid.four { grid-template-columns: repeat(2, 1fr); }
  .impact-grid { grid-template-columns: repeat(2, 1fr); }
  .learnt-row { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 680px) {
  .sp-section { padding-top: 56px; padding-bottom: 56px; }
  .intro-band, .response-grid, .response-grid.two, .response-grid.four, .impact-grid {
    grid-template-columns: 1fr;
  }
  .sp-hero { min-height: 64vh; }
}

/* ---------- Legal / privacy prose ---------- */
.legal-prose {
  max-width: 72ch;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.65;
}
.legal-prose p { margin: 0 0 18px; }
.legal-prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.legal-prose a:hover { color: var(--accent); }
.legal-prose h2 {
  font-family: var(--display); font-weight: var(--display-weight);
  color: var(--ink); font-size: 24px; line-height: 1.2;
  letter-spacing: -0.01em; margin: 40px 0 14px;
}
.legal-prose .legal-updated {
  margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.04em;
  color: var(--ink-mute);
}
/* Small privacy note under a form. */
.pf-privacy {
  margin-top: 16px; font-size: 12.5px; line-height: 1.5; color: var(--ink-mute);
}
.pf-privacy a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; }
.pf-privacy a:hover { color: var(--accent); }
