/* Methodology page (templates/web/method.html), Edmon 12 Oct 2026: calm, large type, one picture per chapter.
   Motion: only transform / opacity (smooth), eased like iOS. Every picture's FINISHED state is the default; the
   starting states apply only under .mth-js (JavaScript on) and before the chapter gets .in. With "reduce motion"
   nothing moves. Colours are the site's day/night tokens, so both modes work without extra rules. */

.mth { --ease: cubic-bezier(0.22, 1, 0.36, 1); --stage-r: 28px; overflow-x: clip; }
.mth-hero, .mth-ch, .mth-end { text-align: center; padding: clamp(72px, 11vw, 150px) var(--side-pad); }
.mth-hero { padding-top: clamp(56px, 8vw, 110px); }

.mth-eyebrow { font-size: var(--fs-meta); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); }
.mth-hero-title { font-size: clamp(2.25rem, 6.4vw, 5rem); line-height: 1.06; font-weight: 700; letter-spacing: -0.015em;
  max-width: 14em; margin: var(--s3) auto 0; overflow-wrap: break-word; }
.mth-num { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--fs-meta); font-weight: 700;
  letter-spacing: 0.1em; color: var(--ink-muted); }
.mth-num::before { content: ""; width: 18px; height: 3px; background: var(--brand-amber); }
.mth-title { font-size: clamp(1.875rem, 4.6vw, 3.25rem); line-height: 1.1; font-weight: 700; letter-spacing: -0.01em;
  margin: var(--s3) auto 0; max-width: 16em; overflow-wrap: break-word; }
.mth-text { font-size: clamp(1.0625rem, 1.7vw, 1.3125rem); line-height: 1.5; color: var(--ink-muted); max-width: 34em;
  margin: var(--s4) auto 0; }
.mth-stage { position: relative; max-width: 760px; margin: clamp(32px, 5vw, 56px) auto 0; background: var(--surface);
  border-radius: var(--stage-r); padding: clamp(20px, 4vw, 44px); overflow: hidden; }
.mth-note { font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--ink-muted); max-width: 46em; margin: var(--s5) auto 0; }

/* reveal: text rises in, then the picture plays */
.mth-js [data-reveal] .mth-title, .mth-js [data-reveal] .mth-text, .mth-js [data-reveal] .mth-num,
.mth-js [data-reveal] .mth-hero-title, .mth-js [data-reveal] .mth-eyebrow {
  opacity: 0; transform: translateY(18px); transition: opacity 1.28s var(--ease), transform 1.28s var(--ease); }
.mth-js [data-reveal] .mth-title, .mth-js [data-reveal] .mth-hero-title { transition-delay: 0.13s; }
.mth-js [data-reveal] .mth-text { transition-delay: 0.26s; }
.mth-js [data-reveal].in .mth-title, .mth-js [data-reveal].in .mth-text, .mth-js [data-reveal].in .mth-num,
.mth-js [data-reveal].in .mth-hero-title, .mth-js [data-reveal].in .mth-eyebrow { opacity: 1; transform: none; }

/* ---------- 0. hero: dots line up into the bar ---------- */
.mth-dots { --z: 1; position: relative; max-width: 760px; aspect-ratio: 16 / 7; margin: clamp(32px, 5vw, 56px) auto 0; }
@media (max-width: 599px) { .mth-dots { --z: 1.7; aspect-ratio: 4 / 3; } }   /* phones: the lined-up bar wider and bolder */
.mth-dots i { position: absolute; left: calc(50% + (var(--x1) - 50) * var(--z) * 1%); top: calc(50% + (var(--y1) - 50) * var(--z) * 1%);
  width: clamp(6px, calc(1.5vw * var(--z)), 12px); height: clamp(6px, calc(1.5vw * var(--z)), 12px); border-radius: 50%;
  transform: translate(-50%, -50%); transition: left 2.24s var(--ease) var(--d), top 2.24s var(--ease) var(--d), opacity 0.96s ease 3.52s; }
.mth-seg { position: absolute; left: calc(50% + (var(--l) - 50) * var(--z) * 1%); width: calc(var(--w) * var(--z) * 1%);
  top: 50%; height: clamp(22px, 4vw, 30px); transform: translateY(-50%); border-radius: 4px; opacity: 1; transition: opacity 1.12s ease 3.04s; }
.mth-js .mth-hero:not(.in) .mth-dots i { left: var(--x0); top: var(--y0); }
.mth-js .mth-hero:not(.in) .mth-seg { opacity: 0; }
.mth-js .mth-hero .mth-dots i { animation: mth-float 6s ease-in-out infinite alternate; animation-delay: calc(var(--d) * -8); }
.mth-js .mth-hero.in .mth-dots i { animation: none; opacity: 0; }
.mth-hero .mth-dots i { opacity: 0; }      /* no JavaScript: just the bar */
.mth-js .mth-hero:not(.in) .mth-dots i { opacity: 1; }
@keyframes mth-float { to { transform: translate(-50%, -50%) translate(6px, -8px); } }
.mth-scroll { display: inline-flex; align-items: center; gap: var(--s1); margin-top: clamp(24px, 4vw, 40px);
  font-size: var(--fs-meta); font-weight: 600; color: var(--ink-muted); text-decoration: none; }
.mth-scroll .icon { animation: mth-bob 1.8s ease-in-out infinite; }
@keyframes mth-bob { 50% { transform: translateY(3px); } }

/* ---------- 1. gather: outlets light up in waves ---------- */
.mth-gather { display: flex; flex-wrap: nowrap; justify-content: center; align-items: flex-start; gap: clamp(16px, 7vw, 72px); }
.mth-group { flex: 0 1 200px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: clamp(12px, 2.5vw, 20px); }
.mth-grid { width: 100%; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: clamp(3px, 1.2vw, 8px); }
.mth-grid i { display: block; width: 100%; aspect-ratio: 1; border-radius: 26%; background: var(--ink); opacity: 0.85;
  transition: opacity 0.8s ease calc(var(--i) * 72ms), transform 0.8s var(--ease) calc(var(--i) * 72ms); }
.mth-grid-world i { background: var(--side-foreign); }
.mth-js [data-reveal]:not(.in) .mth-grid i { opacity: 0.12; transform: scale(0.6); }
.mth-js [data-reveal].in .mth-grid i { animation: mth-pulse 4.5s ease-in-out infinite; animation-delay: calc(1.2s + var(--i) * 90ms); }
@keyframes mth-pulse { 0%, 80%, 100% { opacity: 0.85; } 88% { opacity: 0.35; } }
.mth-count { display: flex; flex-direction: column; align-items: center; gap: var(--s1); text-align: center; }
.mth-count b { font-size: clamp(2rem, 7vw, 4rem); line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.mth-count span { font-size: var(--fs-meta); line-height: 1.3; color: var(--ink-muted); overflow-wrap: anywhere; }

/* ---------- 2. combine: scattered headlines become one story ---------- */
.mth-combine { height: 300px; display: grid; place-items: center; }
.mth-card { grid-area: 1 / 1; width: min(240px, 62%); padding: 16px; border-radius: 14px; background: var(--paper);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.10); display: flex; flex-direction: column; gap: 9px;
  transform: translate(calc(var(--k) * 3px), calc(var(--k) * -5px)) rotate(calc(var(--k) * 0.6deg - 2deg));
  transition: transform 1.76s var(--ease) calc(var(--k) * 112ms); }
.mth-card i { display: block; height: 9px; border-radius: 3px; background: var(--rule); }
.mth-card i:first-child { width: 92%; background: var(--ink-muted); } .mth-card i:nth-child(2) { width: 78%; } .mth-card i:nth-child(3) { width: 55%; }
.mth-js [data-reveal]:not(.in) .mth-card { transform: translate(var(--sx), var(--sy)) rotate(var(--sr)); }
.mth-badge { grid-area: 1 / 1; align-self: end; justify-self: center; margin-bottom: 18px; padding: 6px 14px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-size: var(--fs-meta); font-weight: 700; white-space: nowrap;
  transition: opacity 0.8s ease 1.92s, transform 0.96s var(--ease) 1.92s; }
.mth-js [data-reveal]:not(.in) .mth-badge { opacity: 0; transform: translateY(10px) scale(0.9); }

/* ---------- 3. sort: sources move into their side's column ---------- */
.mth-sort { height: 340px; }
.mth-col-label { position: absolute; left: var(--x); top: 22%; transform: translateX(-50%); display: inline-flex; align-items: center;
  gap: var(--s1); font-size: var(--fs-meta); font-weight: 600; white-space: nowrap; transition: opacity 0.96s ease 1.44s; }
.mth-chip { position: absolute; left: var(--x1); top: var(--y1); width: 64px; height: 26px; border-radius: 8px; transform: translateX(-50%);
  display: flex; align-items: center; padding: 0 9px; transition: left 1.6s var(--ease) var(--d), top 1.6s var(--ease) var(--d), background-color 0.96s ease calc(var(--d) + 0.64s); }
.mth-chip i { display: block; width: 70%; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.85); }
.mth-js [data-reveal]:not(.in) .mth-chip { left: var(--x0); top: 8%; background: var(--side-balanced); }
.mth-js [data-reveal]:not(.in) .mth-col-label { opacity: 0; }
/* phones: a colour legend under the chips instead of the column labels (long words don't fit 3 columns) */
.mth-legend.mth-sort-legend { display: none; position: absolute; left: 0; right: 0; bottom: 18px; margin: 0; }
@media (max-width: 559px) { .mth-chip { width: 46px; } .mth-col-label { display: none; } .mth-legend.mth-sort-legend { display: flex; }
  .mth-sort { height: 330px; } .mth-chip { top: calc(var(--y1) - 18%); } }

/* ---------- 4. facts: judgement words are struck out and fall away ---------- */
.mth-headline { font-family: var(--font-serif); font-weight: 700; font-size: clamp(1.25rem, 3vw, 2rem); line-height: 1.35; }
.mth-headline .tok { display: inline-block; white-space: nowrap; vertical-align: bottom; }
.mth-headline .drop { position: relative; max-width: 0; opacity: 0; overflow: hidden;
  transition: max-width 1.44s var(--ease) 2.4s, opacity 0.8s ease 2.24s; }
.mth-headline .drop::after { content: ""; position: absolute; left: 0; right: 0.35em; top: 55%; height: 3px; background: var(--side-opposition);
  transform-origin: left; transform: scaleX(1); transition: transform 0.8s var(--ease) 0.96s; }
.mth-js [data-reveal]:not(.in) .mth-headline .drop { max-width: 20em; opacity: 1; color: var(--side-opposition); }
.mth-js [data-reveal]:not(.in) .mth-headline .drop::after { transform: scaleX(0); }
.mth-js [data-reveal] .mth-headline .drop { max-width: 20em; opacity: 1; color: var(--side-opposition); }
.mth-js [data-reveal].in .mth-headline .drop { max-width: 0; opacity: 0; }
.mth-cut { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }
.mth-cut li { position: relative; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--rule); font-size: var(--fs-meta);
  color: var(--ink-muted); text-decoration: line-through; text-decoration-color: var(--side-opposition);
  transition: opacity 0.8s ease calc(3.52s + var(--k) * 192ms), transform 0.8s var(--ease) calc(3.52s + var(--k) * 192ms); }
.mth-js [data-reveal]:not(.in) .mth-cut li { opacity: 0; transform: translateY(8px); }

/* ---------- 5. the bar: each side's share, then compared on 100% ---------- */
.mth-rows { display: flex; flex-direction: column; gap: var(--s4); text-align: left; }
.mth-row { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr) auto; align-items: center; gap: var(--s3);
  transition: opacity 0.96s ease calc(var(--k) * 0.4s), transform 0.96s var(--ease) calc(var(--k) * 0.4s); }
.mth-row-name { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--fs-meta); font-weight: 600; overflow-wrap: anywhere; }
.mth-pips { display: flex; flex-wrap: wrap; gap: 4px; }
.mth-pips i { width: 10px; height: 10px; border-radius: 50%; background: var(--rule); }
.mth-pips i.on { transition: transform 0.64s var(--ease) calc(0.64s + var(--i) * 64ms); }
.mth-pips i.on.side-progov { background: var(--side-progov); } .mth-pips i.on.side-balanced { background: var(--side-balanced); }
.mth-pips i.on.side-opposition { background: var(--side-opposition); }
.mth-row-num { font-size: var(--fs-meta); color: var(--ink-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mth-row-num b { color: var(--ink); margin-left: var(--s1); }
.mth-js [data-reveal]:not(.in) .mth-row { opacity: 0; transform: translateY(10px); }
.mth-js [data-reveal]:not(.in) .mth-pips i.on { transform: scale(0); }
@media (max-width: 559px) { .mth-row { grid-template-columns: 1fr auto; } .mth-pips { grid-column: 1 / -1; grid-row: 2; } }
.mth-final { display: flex; height: 34px; gap: 3px; margin-top: var(--s6); border-radius: 6px; overflow: hidden; }
.mth-final .seg { flex: 0 0 auto; width: var(--w); display: flex; align-items: center; justify-content: center; font-size: var(--fs-meta);
  font-weight: 700; color: #FFFFFF; transform-origin: left; transition: transform 1.44s var(--ease) calc(1.92s + var(--k) * 0.32s); }
.mth-js [data-reveal]:not(.in) .mth-final .seg { transform: scaleX(0); }

/* ---------- 6. blindspot: three conditions, then the eye ---------- */
.mth-eye { width: clamp(72px, 12vw, 104px); height: auto; display: block; margin: 0 auto var(--s5); fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mth-eye .eye { stroke: var(--ink); stroke-width: 1.2; opacity: 0.55; }
.mth-eye .cut { stroke: var(--surface); stroke-width: 4; stroke-linecap: butt; }
.mth-eye .line { stroke: var(--brand-amber); stroke-width: 1.8; stroke-linecap: butt; stroke-dasharray: 1; stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.44s var(--ease) 3.84s; }
.mth-js [data-reveal]:not(.in) .mth-eye .line { stroke-dashoffset: 1; }
.mth-js [data-reveal]:not(.in) .mth-eye .cut { opacity: 0; }
.mth-eye .cut { transition: opacity 0.48s ease 3.84s; }
.mth-rules { list-style: none; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2);
  width: fit-content; max-width: 100%; margin: var(--s5) auto 0; }
.mth-rules li { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--fs-meta); text-align: left;
  transition: opacity 0.8s ease calc(1.44s + var(--k) * 0.72s), transform 0.8s var(--ease) calc(1.44s + var(--k) * 0.72s); }
.mth-rules .icon { color: var(--ink); background: var(--brand-amber); border-radius: 50%; padding: 2px; stroke-width: 2.6; color: #000; }
.mth-js [data-reveal]:not(.in) .mth-rules li { opacity: 0; transform: translateY(8px); }
.mth-tag { margin-top: var(--s5); transition: opacity 0.96s ease 4.8s, transform 0.96s var(--ease) 4.8s; }
.mth-tag .chip-blindspot { --blind-gap: var(--surface); }
.mth-js [data-reveal]:not(.in) .mth-tag { opacity: 0; transform: scale(0.94); }
.mth-final-blind { margin-top: 0; }
/* the blindspot legend: every side with its share; the silent side stands out */
.mth-legend { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-top: var(--s3);
  font-size: var(--fs-meta); }
.mth-legend li { display: inline-flex; align-items: center; gap: var(--s1); color: var(--ink-muted); white-space: nowrap; }
.mth-legend b { color: var(--ink); }
.mth-legend li.silent { color: var(--ink); font-weight: 700; padding: 2px 10px; border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--brand-amber); }

/* ---------- 7. you decide: the eye opens ---------- */
.mth-open { width: clamp(64px, 10vw, 88px); height: auto; display: block; margin: 0 auto var(--s5); fill: none; stroke: var(--ink);
  stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.mth-open path { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 2.24s var(--ease) 0.32s; }
.mth-open circle { fill: var(--brand-amber); stroke: none; transform-origin: 12px 12px; transition: transform 0.96s var(--ease) 1.92s; }
.mth-js [data-reveal]:not(.in) .mth-open path { stroke-dashoffset: 1; }
.mth-js [data-reveal]:not(.in) .mth-open circle { transform: scale(0); }
.mth-cta { margin-top: var(--s6); }

/* no movement for readers who asked for it: everything in its finished state */
@media (prefers-reduced-motion: reduce) {
  .mth *, .mth *::after { transition: none !important; animation: none !important; }
}

/* ---------- slides (Edmon, 13 Oct 2026): one horizontal track, each chapter fills the screen below the header ---------- */
.mth-deck { position: relative; --deck-h: calc(100svh - 120px); }
.mth-track { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  overscroll-behavior-x: contain; scrollbar-width: none; outline: none; }
.mth-track::-webkit-scrollbar { display: none; }
.mth-slide { flex: 0 0 100%; min-width: 0; height: var(--deck-h); overflow-y: auto; scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; flex-direction: column; justify-content: center; box-sizing: border-box;
  padding: clamp(24px, 4vh, 56px) var(--side-pad) 28px; }
.mth-slide > * { flex: none; }
/* centred when it fits, starting at the top (and scrolling inside the slide) when it doesn't: plain centring would cut
   the top off on short or zoomed screens */
.mth-slide { justify-content: flex-start; }
.mth-slide > :first-child { margin-top: auto; }
.mth-slide > :last-child { margin-bottom: auto; }
.mth-slide .mth-stage, .mth-slide .mth-dots { margin-top: clamp(20px, 3.5vh, 40px); }
.mth-slide .mth-text { margin-top: var(--s3); }
.mth-hero .mth-scroll { align-self: center; }
button.mth-scroll { border: 0; background: none; font: inherit; cursor: pointer; }
.mth-right { transform: rotate(-90deg); }
.mth-arrow { position: absolute; top: calc(var(--deck-h) / 2); transform: translateY(-50%); z-index: 5; width: 52px; height: 52px;
  border-radius: 50%; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); display: grid; place-items: center;
  cursor: pointer; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12); transition: opacity 0.3s ease, transform 0.3s var(--ease); }
.mth-arrow:hover { transform: translateY(-50%) scale(1.06); }
.mth-arrow[disabled] { opacity: 0; pointer-events: none; }
.mth-prev { left: max(16px, calc(50% - 640px)); } .mth-prev .icon { transform: rotate(90deg); }
.mth-next { right: max(16px, calc(50% - 640px)); } .mth-next .icon { transform: rotate(-90deg); }
.mth-dots-nav { display: flex; width: fit-content; gap: 8px; padding: 8px 12px; margin: 0 auto 12px; border-radius: 999px;
  background: var(--surface); }   /* below the slides, never over their text */
.mth-dots-nav button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: var(--rule); cursor: pointer;
  transition: width 0.4s var(--ease), background-color 0.3s ease; }
.mth-dots-nav button[aria-selected="true"] { width: 24px; background: var(--brand-amber); }
@media (max-width: 767px) {   /* phones: swipe; the side arrows step aside, the dots stay */
  .mth-arrow { display: none; }
  .mth-slide { padding-bottom: 24px; justify-content: flex-start; padding-top: 24px; }
  .mth-slide .mth-title { font-size: clamp(1.75rem, 8vw, 2.4rem); }
}
/* inside a slide (a flex column) the pictures need their full width, centred */
.mth-slide .mth-stage, .mth-slide .mth-dots { width: 100%; max-width: 760px; margin-left: auto; margin-right: auto; align-self: center; }
.mth-slide .mth-text, .mth-slide .mth-title, .mth-slide .mth-hero-title, .mth-slide .mth-num,
.mth-slide .mth-eyebrow { align-self: center; }

/* short or zoomed screens (13 Oct 2026: a friend's iPhone with a larger display zoom): everything a little smaller, so a
   slide's words, picture and numbers fit on one screen; the outlet grids also scale with the screen's height */
.mth-slide .mth-group { flex-basis: min(200px, 30vh); }
@media (max-height: 760px) {
  .mth-slide { padding-top: 16px; padding-bottom: 16px; }
  .mth-slide .mth-title { font-size: clamp(1.5rem, 6.4vw, 2.25rem); margin-top: var(--s2); }
  .mth-slide .mth-text { font-size: clamp(0.9375rem, 3.9vw, 1.125rem); line-height: 1.45; margin-top: var(--s2); }
  .mth-slide .mth-stage, .mth-slide .mth-dots { margin-top: 16px; }
  .mth-slide .mth-stage { padding: clamp(12px, 3vw, 28px); }
  .mth-count b { font-size: clamp(1.75rem, 6vw, 3rem); }
  .mth-slide .mth-note { margin-top: var(--s3); }
}
@media (max-height: 620px) {
  .mth-slide .mth-num { display: none; }
  .mth-slide .mth-group { flex-basis: min(200px, 24vh); }
}
@media (max-height: 900px) {   /* the opening and the blindspot slides carry the most: they tighten first */
  .mth-slide .mth-hero-title { font-size: clamp(2rem, 6.5vh, 4rem); }
  .mth-slide .mth-dots { max-height: 30vh; }
  .mth-hero .mth-scroll { margin-top: var(--s3); }
  .mth-slide .mth-eye { width: clamp(44px, 8vh, 80px); margin-bottom: var(--s3); }
  .mth-slide .mth-rules, .mth-slide .mth-tag { margin-top: var(--s3); }
  .mth-slide .mth-blind .mth-note { margin-top: var(--s2); }
}

/* the last slide: the Median mark (M + the three-part bar) rises in, then its bar fills from the middle */
.mth-mark { width: clamp(64px, 10vw, 92px); height: auto; display: block; margin: 0 auto var(--s5); }
.mth-mark .m { fill: var(--ink); transition: opacity 1.2s ease 0.2s, transform 1.2s var(--ease) 0.2s; }
.mth-mark .b { transform-box: fill-box; transform-origin: center; transition: transform 0.9s var(--ease) 1.1s; }
.mth-mark .side { fill: var(--ink); opacity: 0.45; }
.mth-mark .mid { fill: var(--brand-amber); transition-delay: 0.9s; }
.mth-js [data-reveal]:not(.in) .mth-mark .m { opacity: 0; transform: translateY(40px); }
.mth-js [data-reveal]:not(.in) .mth-mark .b { transform: scaleX(0); }
@media (prefers-reduced-motion: reduce) { .mth-mark * { transition: none !important; } }
