/* Hand to Hand: A Hundred Years of Realist Painting. Explainers (lineage, maps, charts) */
@import url("../fonts/fonts.css");

:root {
  --paper: #fbf8f2;
  --paper-2: #f3eee4;
  --paper-3: #ebe3d4;
  --ink: #221e1a;
  --ink-2: #4a433b;
  --muted: #7a7064;
  --rule: #ddd4c6;
  --accent: #7a2e22;
  --accent-soft: #a2594b;
  --ochre: #a87a32;
  --umber: #8a6d4b;
  --sage: #6d7a68;
  --sea: #eee6d6;
  --land: #e2d6bf;
  --land-edge: #c9b99b;
  --display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --text: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --measure: 36rem;
  --wide: 68rem;
  --bar-h: 3.25rem;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
  font-variant-numeric: lining-nums proportional-nums;
}
@media (min-width: 760px) { body { font-size: 1.1875rem; } }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--ink); }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar (same as the reading site, friendly/assets/style.css) ---------- */
.bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 1rem;
  height: var(--bar-h); padding: 0 1.25rem;
  background: rgba(251, 248, 242, .92);
  -webkit-backdrop-filter: saturate(1.2) blur(10px); backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: transform .3s ease, border-color .3s ease;
  font-size: .8rem;
}
.bar.scrolled { border-bottom-color: var(--rule); }
.bar.hide { transform: translateY(-100%); }
.bar-title { display: flex; align-items: baseline; gap: .5rem; text-decoration: none; color: var(--ink); white-space: nowrap; }
.bt-main { font-family: var(--display); font-weight: 600; font-size: 1.3rem; letter-spacing: .02em; }
.bt-sub { font-family: var(--display); font-style: italic; font-size: 1.1rem; color: var(--muted); }
.bar-chap {
  flex: 1; text-align: center; color: var(--muted); font-style: italic;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transition: opacity .3s ease;
}
.bar.scrolled .bar-chap { opacity: 1; }
.bar nav { display: flex; gap: 1.1rem; margin-left: auto; }
.bar nav a { color: var(--ink-2); text-decoration: none; letter-spacing: .08em; text-transform: uppercase; font-size: .72rem; white-space: nowrap; }
.bar nav a:hover { color: var(--accent); }
.bar-nav a[aria-current="page"] { color: var(--accent); }
.nl-short { display: none; }
@media (max-width: 1100px) { .bar-chap { display: none; } }
@media (max-width: 760px) {
  .bar { gap: .6rem; }
  .bar nav { gap: .85rem; }
  .bar nav a { font-size: .66rem; letter-spacing: .06em; }
  .bar-nav .nl-long { display: none; }
  .bar-nav .nl-short { display: inline; }
}
@media (max-width: 640px) {
  .bar { padding: 0 1rem; }
  .bt-sub { display: none; }
}
.subnav {
  display: flex; justify-content: center; flex-wrap: wrap; gap: .3rem 1.4rem; padding: .7rem 1rem 0;
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
}
.subnav span { color: var(--muted); }
@media (max-width: 520px) { .subnav span { display: none; } .subnav { gap: .3rem .95rem; letter-spacing: .08em; } }
.subnav a { color: var(--ink-2); text-decoration: none; padding-bottom: .15rem; border-bottom: 1px solid transparent; }
.subnav a:hover { color: var(--accent); }
.subnav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- page furniture ---------- */
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.kicker {
  margin: 0 0 .4rem; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
}
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.05; margin: 0; letter-spacing: .005em; }
h1 { font-size: clamp(2.4rem, 7vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
h3 { font-size: 1.45rem; }
.dek { font-family: var(--display); font-style: italic; font-size: clamp(1.25rem, 3.4vw, 1.6rem); line-height: 1.3; color: var(--ink-2); margin: .7rem 0 0; }
.page-head { padding-top: 2.6rem; padding-bottom: 1.4rem; text-align: center; }
.page-head .dek { max-width: 34rem; margin-left: auto; margin-right: auto; }
.ornament { text-align: center; color: var(--rule); letter-spacing: .6em; margin: 2.2rem 0; font-size: .9rem; }
.small { font-size: .82rem; line-height: 1.5; color: var(--muted); }
.note-box {
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 1rem 0; margin: 2rem auto; font-size: .92rem; color: var(--ink-2);
}
.note-box strong { font-weight: 600; color: var(--ink); }
.bits { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: .9rem; }
.bits li { padding-left: 1.4rem; position: relative; font-size: .98rem; }
.bits li::before { content: ""; position: absolute; left: .2rem; top: .62em; width: .45rem; height: .45rem; border-radius: 50%; background: var(--accent); }
.bits li.ring::before { background: var(--paper); border: 1.5px solid var(--umber); }
.bits li.faded::before { background: #b9afa2; opacity: .6; }
footer.foot { border-top: 1px solid var(--rule); margin-top: 3.5rem; padding: 1.6rem 0 3rem; font-size: .85rem; color: var(--muted); }
footer.foot a { color: var(--ink-2); }
footer.foot .links { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-bottom: .6rem; }
.btn {
  display: inline-flex; align-items: center; gap: .45rem; cursor: pointer;
  border: 1px solid var(--rule); background: var(--paper); border-radius: 999px;
  padding: .45rem 1rem; font-size: .85rem; color: var(--ink-2); line-height: 1.2;
  transition: background .2s, border-color .2s, color .2s;
}
.btn:hover { border-color: var(--accent-soft); color: var(--accent); }
.btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn.primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.keys { font-size: .78rem; color: var(--muted); letter-spacing: .02em; }

/* ---------- index ---------- */
.lead-card {
  display: grid; gap: 1.2rem; align-items: center; text-decoration: none; color: inherit;
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 4px; padding: 1rem; margin: 1rem 0 2.2rem;
}
.lead-card:hover { border-color: var(--accent-soft); }
.lead-card .mini-map { width: 100%; aspect-ratio: 2 / 1; background: var(--sea); border-radius: 2px; }
.lead-card h2 { font-size: clamp(1.8rem, 5vw, 2.5rem); }
.lead-card p { margin: .6rem 0 0; }
.lead-card .go { margin-top: .9rem; color: var(--accent); font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; }
@media (min-width: 820px) { .lead-card { grid-template-columns: 1.35fr 1fr; padding: 1.4rem; } }
.card-grid { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .card-grid { grid-template-columns: 1fr 1fr 1fr; } }
.chart-card { text-decoration: none; color: inherit; display: flex; flex-direction: column; border-top: 2px solid var(--ink); padding-top: .8rem; }
.chart-card .thumb { aspect-ratio: 3 / 2; overflow: hidden; background: var(--paper-3); margin-bottom: .8rem; }
.chart-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.chart-card:hover .thumb img { transform: scale(1.03); }
.chart-card .num { font-family: var(--display); font-size: 1rem; color: var(--accent); }
.chart-card h3 { margin: .1rem 0 .4rem; }
.chart-card p { margin: 0; font-size: .95rem; color: var(--ink-2); }
.chart-card:hover h3 { color: var(--accent); }

/* ---------- charts page ---------- */
.toc { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem .6rem; margin: 1.2rem auto 0; max-width: 40rem; }
.toc a { font-size: .8rem; text-decoration: none; color: var(--ink-2); border: 1px solid var(--rule); border-radius: 999px; padding: .25rem .75rem; }
.toc a:hover { border-color: var(--accent-soft); color: var(--accent); }
.chart-sec { padding: 2.6rem 0 1rem; border-top: 1px solid var(--rule); scroll-margin-top: 3.5rem; }
.chart-sec:first-of-type { border-top: 0; }
.chart-head { display: grid; gap: 1.1rem; align-items: start; }
.chart-head .plate { margin: 0; }
.chart-head .plate img { width: 100%; max-height: 17rem; object-fit: cover; border: 1px solid var(--rule); }
.chart-head .plate.portrait img { max-height: 15rem; width: auto; }
.plate figcaption { font-size: .78rem; line-height: 1.45; color: var(--muted); margin-top: .45rem; }
.plate figcaption em { font-style: italic; }
.takeaway { font-family: var(--display); font-size: clamp(1.4rem, 4.2vw, 1.85rem); line-height: 1.22; margin: .8rem 0 0; color: var(--ink); }
@media (max-width: 560px) { .chart-head .plate.portrait img { max-height: 11rem; } }
@media (min-width: 860px) {
  .chart-head { grid-template-columns: 1.5fr 1fr; gap: 2.4rem; }
  .chart-head .plate.portrait { justify-self: end; }
}
.chart-fig { margin: 1.6rem 0 0; position: relative; }
.chart-box { width: 100%; position: relative; }
.chart-box svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-box.pre svg { opacity: 0; transform: translateY(10px); }
.chart-box.pre.in svg { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s ease; }
.chart-detail { margin: .5rem 0 0; min-height: 1.5em; font-style: italic; color: var(--ink-2); font-size: .95rem; line-height: 1.45; }
.ast { color: var(--accent); text-decoration: none; font-weight: 600; padding: 0 .05em; }
.ast:hover { color: var(--ink); }
.method-note { margin: .35rem 0 0; font-size: .78rem; color: var(--muted); }
.method-note span { color: var(--accent); font-weight: 600; scroll-margin-top: 5rem; }
.method-note span:target { background: #f2e2cf; }
.price-legend { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .7rem; }
@media (min-width: 860px) { .price-legend { grid-template-columns: 1fr 1fr; gap: .8rem 2rem; } }
.price-legend li { display: flex; gap: .7rem; align-items: flex-start; font-size: .85rem; line-height: 1.4; }
.price-legend img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid; flex: none; }
.price-legend b { font-weight: 600; }
.price-legend .made { color: var(--muted); font-size: .78rem; }
.price-legend .path { display: block; color: var(--ink-2); }
.price-legend .today { color: var(--muted); }
.price-legend .lnote { display: block; color: var(--muted); font-size: .74rem; }
.price-legend .dia { width: 12px; height: 12px; margin: .3rem 16px 0; background: var(--umber); transform: rotate(45deg); flex: none; }
.swatches { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; margin: .8rem 0 0; font-size: .8rem; color: var(--ink-2); }
.swatches span { display: inline-flex; align-items: center; gap: .4rem; }
.swatches i { width: 14px; height: 10px; border-radius: 2px; display: inline-block; flex: none; }
.swatches .sw-note { flex-basis: 100%; color: var(--muted); font-size: .76rem; display: block; }
table.mini { width: 100%; border-collapse: collapse; font-size: .8rem; margin-top: .5rem; }
table.mini th { text-align: left; font-weight: 600; border-bottom: 1px solid var(--ink-2); padding: .3rem; }
table.mini td { border-bottom: 1px solid var(--rule); padding: .3rem; vertical-align: top; }
table.mini td.today { color: var(--muted); white-space: nowrap; }
.dotk { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .35rem; }
.step-line {
  display: flex; align-items: flex-start; gap: .8rem; margin-top: .6rem; min-height: 3.2em;
}
.step-caption { flex: 1; margin: 0; font-style: italic; color: var(--ink-2); font-size: 1rem; line-height: 1.45; }
@media (max-width: 560px) {
  .step-line { flex-direction: column; gap: .5rem; min-height: 5.4em; }
  .step-caption { min-height: 2.9em; }
}
.step-dots { display: flex; gap: .35rem; align-items: center; padding-top: .3rem; }
.step-dots button {
  width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 1px solid var(--rule); background: var(--paper);
  cursor: pointer; font-size: .72rem; color: var(--muted); padding: 0; line-height: 1;
}
.step-dots button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.step-dots .replay { width: auto; border-radius: 999px; padding: 0 .7rem; }
.source-line { margin: 1rem 0 0; font-size: .82rem; line-height: 1.5; color: var(--muted); }
.source-line b { font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .7rem; color: var(--ink-2); margin-right: .3rem; }
details.notes { margin-top: .7rem; font-size: .85rem; color: var(--ink-2); }
details.notes summary { cursor: pointer; color: var(--muted); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
details.notes ul { margin: .5rem 0; padding-left: 1.1rem; }
details.notes li { margin: .25rem 0; }

/* chart primitives */
.ch-axis text, .ch-label, .ch-tick { font-family: var(--text); fill: var(--muted); }
.ch-axis line, .ch-grid line { stroke: var(--rule); stroke-width: 1; }
.ch-grid line { stroke-dasharray: 2 4; }
.ch-base { stroke: var(--ink-2); stroke-width: 1; }
.ch-val { font-family: var(--text); fill: var(--ink); font-weight: 600; }
.ch-big { font-family: var(--display); fill: var(--ink); font-weight: 600; }
.ch-note { font-family: var(--text); fill: var(--ink-2); font-style: italic; }
.ch-accent { fill: var(--accent); }
.fade-in { opacity: 0; transition: opacity .7s ease; }
.fade-in.on { opacity: 1; }
.grow { transform: scaleY(0); transform-box: fill-box; transform-origin: 50% 100%; transition: transform .9s cubic-bezier(.2, .8, .2, 1); }
.grow.on { transform: scaleY(1); }
.pop { opacity: 0; transform: scale(.2); transform-box: fill-box; transform-origin: 50% 50%; transition: opacity .35s ease, transform .6s cubic-bezier(.3, 1.6, .5, 1); }
.pop.on { opacity: 1; transform: scale(1); }
.draw { transition: stroke-dashoffset 1.1s ease; }
.no-motion .fade-in, .no-motion .grow, .no-motion .pop, .no-motion .draw { transition: none !important; }

/* ---------- map page ---------- */
.map-fig { margin: 0 auto; max-width: 78rem; padding: 0 .75rem; }
.map-stage {
  position: relative; background: var(--sea); border: 1px solid var(--rule); border-radius: 3px; overflow: hidden;
  touch-action: manipulation;
}
.map-stage > svg { display: block; width: 100%; height: auto; cursor: pointer; }
.map-land { fill: var(--land); stroke: var(--land-edge); stroke-width: .6; vector-effect: non-scaling-stroke; }
.map-borders { fill: none; stroke: #cdbd9f; stroke-width: .6; vector-effect: non-scaling-stroke; }
.map-states { fill: none; stroke: #d6c9b0; stroke-width: .5; vector-effect: non-scaling-stroke; stroke-dasharray: 2 2; }
.dot { vector-effect: non-scaling-stroke; transition: opacity .6s ease; }
.dot.key { fill: var(--accent); stroke: var(--paper); stroke-width: 1.2; }
.dot.dated { fill: var(--accent-soft); stroke: var(--paper); stroke-width: 1.1; }
.dot.listed { fill: var(--paper); stroke: var(--umber); stroke-width: 1.5; }
.dot.faded { fill: #b8ab97; stroke: #8f8272; stroke-width: 1; opacity: .7; }
.dot.closed { fill: var(--paper); stroke: #5f564c; stroke-width: 1.2; stroke-dasharray: 2 1.5; opacity: .85; }
.dot.sel { stroke: var(--ink); stroke-width: 2.4; }
.ripple { fill: none; stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; pointer-events: none; }
.map-year {
  position: absolute; left: .9rem; top: .4rem; font-family: var(--display); font-weight: 600;
  font-size: clamp(2.6rem, 9vw, 5.2rem); line-height: 1; color: var(--ink); opacity: .88; pointer-events: none;
  font-variant-numeric: lining-nums tabular-nums;
}
.map-counts {
  position: absolute; right: .8rem; top: .7rem; text-align: right; font-size: .78rem; line-height: 1.35; color: var(--ink-2);
  background: rgba(251, 248, 242, .82); padding: .4rem .6rem; border-radius: 3px; pointer-events: none; max-width: 46%;
}
.map-counts b { font-family: var(--display); font-size: 1.5rem; font-weight: 600; color: var(--ink); line-height: 1; }
.map-counts .arc b { color: var(--umber); }
.map-counts div + div { margin-top: .25rem; }
.start-overlay {
  position: absolute; inset: auto 0 1.1rem 0; display: flex; justify-content: center; pointer-events: none;
}
.start-overlay .btn { pointer-events: auto; box-shadow: 0 6px 24px rgba(34, 30, 26, .18); font-size: .95rem; padding: .7rem 1.3rem; }
.map-caption {
  min-height: 4.6em; margin: .8rem .2rem 0; font-size: 1.02rem; line-height: 1.45; color: var(--ink);
  display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; align-items: baseline;
}
.map-caption .cy { font-family: var(--display); font-weight: 600; font-size: 1.5rem; color: var(--accent); line-height: 1; }
.map-caption .keys { grid-column: 2; }
.map-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1rem; margin-top: .6rem; }
.play {
  width: 3rem; height: 3rem; border-radius: 50%; border: 0; background: var(--accent); color: var(--paper);
  cursor: pointer; display: grid; place-items: center; flex: none;
}
.play:hover { background: var(--ink); }
.play svg { width: 1.1rem; height: 1.1rem; fill: currentColor; }
.slider-wrap { flex: 1 1 14rem; min-width: 12rem; }
.slider-wrap input[type=range] { width: 100%; accent-color: var(--accent); height: 2rem; margin: 0; }
.slider-ticks { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); margin-top: -.2rem; padding: 0 .2rem; }
.views { display: flex; gap: .35rem; flex-wrap: wrap; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: 1rem .2rem 0; font-size: .8rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.legend svg { width: 14px; height: 14px; overflow: visible; }
.school-card {
  position: absolute; right: .8rem; top: 5.2rem; width: min(22rem, 46%); max-height: calc(100% - 6rem); overflow: auto;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 1rem 1.1rem 1rem;
  box-shadow: 0 10px 30px rgba(34, 30, 26, .16); font-size: .88rem; line-height: 1.5; z-index: 5;
}
.school-card[hidden] { display: none; }
.school-card h3 { font-size: 1.45rem; padding-right: 1.8rem; }
.school-card .where { color: var(--muted); font-size: .8rem; margin: .25rem 0 .6rem; letter-spacing: .02em; }
.school-card .when { font-weight: 600; margin: 0 0 .4rem; }
.school-card p { margin: .35rem 0; }
.school-card .close {
  position: absolute; right: .5rem; top: .45rem; width: 2rem; height: 2rem; border: 0; background: none; cursor: pointer;
  font-size: 1.4rem; line-height: 1; color: var(--muted);
}
.school-card .lists { display: flex; gap: .35rem; flex-wrap: wrap; margin: .5rem 0; }
.school-card .lists span { font-size: .72rem; border: 1px solid var(--rule); border-radius: 999px; padding: .05rem .5rem; color: var(--muted); }
.school-card .lists span.on { border-color: var(--umber); color: var(--ink); background: var(--paper-2); }
.school-card .src { font-size: .76rem; color: var(--muted); margin-top: .6rem; border-top: 1px solid var(--rule); padding-top: .5rem; }
.school-card .src div { margin: .15rem 0; }
.school-card ul.pick { list-style: none; padding: 0; margin: .4rem 0 0; }
.school-card ul.pick li { border-top: 1px solid var(--rule); }
.school-card ul.pick button { width: 100%; text-align: left; background: none; border: 0; padding: .5rem 0; cursor: pointer; font-size: .9rem; }
.school-card ul.pick button:hover { color: var(--accent); }
.school-card ul.pick small { color: var(--muted); display: block; font-size: .75rem; }
@media (max-width: 760px) {
  .school-card {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 62vh;
    border-radius: 12px 12px 0 0; padding: 1rem 1.2rem calc(1rem + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 30px rgba(34, 30, 26, .22); z-index: 40;
  }
  .map-counts { font-size: .7rem; padding: .3rem .45rem; }
  .map-counts b { font-size: 1.15rem; }
  .map-caption { font-size: .95rem; }
}
/* journeys mode */
.modes { display: inline-flex; margin: 1.4rem auto 0; border: 1px solid var(--rule); border-radius: 999px; padding: .25rem; gap: .25rem; background: var(--paper); }
.mode-btn { border: 0; background: none; border-radius: 999px; padding: .45rem 1.1rem; cursor: pointer; text-align: center; line-height: 1.2; color: var(--ink-2); }
.mode-btn b { display: block; font-family: var(--display); font-size: 1.15rem; font-weight: 600; }
.mode-btn span { display: block; font-size: .68rem; letter-spacing: .04em; color: var(--muted); }
.mode-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.mode-btn[aria-pressed="true"] span { color: #d9cfbf; }
@media (max-width: 520px) { .mode-btn { padding: .4rem .7rem; } .mode-btn span { font-size: .62rem; } }
body.mode-journeys .s-only, body.mode-schools .j-only { display: none !important; }
body.mode-journeys .dot { opacity: .5; }
body.mode-journeys .dot.faded, body.mode-journeys .dot.closed { opacity: .25; }
.jarc { fill: none; stroke: var(--umber); stroke-width: 1.3; opacity: .45; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.jgroup.cur .jarc, .jgroup.sel .jarc { stroke: var(--accent); stroke-width: 2.6; opacity: 1; }
.jhit { fill: none; stroke: transparent; stroke-width: 14; vector-effect: non-scaling-stroke; cursor: pointer; pointer-events: stroke; }
circle.jhit { fill: transparent; pointer-events: all; }
.jstay { fill: none; stroke: var(--umber); stroke-width: 1.3; opacity: .5; vector-effect: non-scaling-stroke; }
.jgroup.cur .jstay, .jgroup.sel .jstay { stroke: var(--accent); stroke-width: 2.2; opacity: 1; }
.jlink { fill: none; stroke: #9b8f7e; stroke-width: .9; stroke-dasharray: 3 3; opacity: .7; vector-effect: non-scaling-stroke; cursor: pointer; }
.jlink:hover { stroke: var(--accent); opacity: 1; }
.jlabel { font-family: var(--display); font-weight: 600; fill: var(--ink); text-anchor: middle; paint-order: stroke; stroke: rgba(251, 248, 242, .92); stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.jcity { font-family: var(--text); fill: var(--ink-2); font-style: italic; paint-order: stroke; stroke: rgba(251, 248, 242, .9); stroke-width: 3px; pointer-events: none; }
.jtraveler { fill: var(--accent); stroke: var(--paper); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.jpeople { display: inline-flex; gap: .2rem; margin-right: .45rem; vertical-align: middle; }
.jpeople img, .jpeople .ini { width: 1.9rem; height: 1.9rem; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--paper); box-shadow: 0 0 0 1px var(--rule); }
.jpeople .ini, .jwho .ini { display: inline-grid; place-items: center; background: var(--paper-3); color: var(--ink-2); font-size: .68rem; letter-spacing: .04em; }
.jwho { list-style: none; padding: 0; margin: .6rem 0; }
.jwho li { display: flex; gap: .6rem; align-items: flex-start; margin: .45rem 0; }
.jwho img, .jwho .ini { width: 2.6rem; height: 2.6rem; border-radius: 50%; object-fit: cover; flex: none; }
.jwho small { color: var(--muted); font-size: .76rem; }
.jwho .cred { font-size: .68rem; }
.showall { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; margin-left: auto; }
.page-head .modes { display: inline-flex; }
.browse { margin-top: 2rem; }
.browse summary { cursor: pointer; font-family: var(--display); font-size: 1.4rem; font-weight: 600; }
.browse input[type=search] {
  width: 100%; max-width: 22rem; margin: .8rem 0; padding: .5rem .7rem; font: inherit; font-size: .9rem;
  border: 1px solid var(--rule); border-radius: 3px; background: var(--paper);
}
.browse table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.browse th { text-align: left; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--ink-2); padding: .35rem .4rem; }
.browse td { border-bottom: 1px solid var(--rule); padding: .4rem; vertical-align: top; }
.browse tr { cursor: pointer; }
.browse tr:hover td { background: var(--paper-2); }
.browse td.y { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 620px) { .browse .hide-sm { display: none; } }

/* ---------- feedback form (same as the reading site, friendly/assets/style.css) ---------- */
.thought-form {
  margin: 2.2rem 0 0; padding: 1.4rem 1.4rem 1.2rem; border-radius: 4px;
  background: var(--paper-2); border: 1px solid #e6ddce; font-size: .88rem;
}
.tf-title { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.4rem; color: var(--ink); }
.tf-sub { margin: .2rem 0 1rem; font-size: .82rem; font-style: italic; color: var(--muted); }
.tf-field { display: flex; flex-direction: column; gap: .3rem; }
.tf-label { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.tf-label em { text-transform: none; letter-spacing: 0; font-size: .95em; color: var(--muted); }
.thought-form textarea, .thought-form input[type="text"], .thought-form input[type="email"] {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink); background: #fffdf9;
  border: 1px solid #d9cfbf; border-radius: 3px; padding: .6rem .7rem; transition: border-color .2s, box-shadow .2s;
}
.thought-form textarea { resize: vertical; min-height: 6rem; line-height: 1.5; }
.thought-form textarea:focus, .thought-form input:focus { outline: none; border-color: var(--accent-soft); box-shadow: 0 0 0 3px rgba(162, 89, 75, .12); }
.tf-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: .8rem; }
@media (max-width: 560px) { .tf-row { grid-template-columns: 1fr; } }
.tf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tf-actions { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.thought-form button {
  font: inherit; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; cursor: pointer;
  padding: .7rem 1.6rem; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: #fff;
  transition: background .2s, border-color .2s;
}
.thought-form button:hover { background: var(--ink); border-color: var(--ink); }
.thought-form button:disabled { opacity: .6; cursor: default; }
.tf-status { margin: 0; font-size: .82rem; font-style: italic; color: var(--muted); }
.tf-status.ok { color: #3f6b3a; }
.tf-status.err { color: var(--accent); }
.thought-form .tf-field + .tf-field { margin-top: .8rem; }

/* ---------- find your lineage ---------- */
.lin-head { padding-bottom: .6rem; }
.lin-search { position: relative; max-width: 36rem; margin: 1.6rem auto 0; text-align: left; }
.lin-box { display: flex; gap: .5rem; background: var(--paper); border: 1.5px solid var(--ink-2); border-radius: 999px; padding: .3rem .3rem .3rem 1.1rem; box-shadow: 0 6px 24px rgba(34, 30, 26, .06); }
.lin-box input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1.05rem; color: var(--ink); outline: none; }
.lin-box .btn { padding: .55rem 1.3rem; font-size: .9rem; }
.lin-sugg { list-style: none; margin: .35rem 0 0; padding: .3rem; position: absolute; left: 0; right: 0; z-index: 10; background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 12px 30px rgba(34, 30, 26, .14); max-height: 22rem; overflow: auto; }
.lin-sugg li { padding: .5rem .8rem; border-radius: 8px; cursor: pointer; line-height: 1.3; }
.lin-sugg li.on, .lin-sugg li:hover { background: var(--paper-2); }
.lin-sugg b { display: block; font-weight: 600; font-size: .98rem; }
.lin-sugg small { color: var(--muted); font-size: .78rem; }
.lin-name { display: flex; flex-direction: column; gap: .25rem; margin: .9rem auto 0; max-width: 22rem; font-size: .78rem; color: var(--muted); text-align: center; }
.lin-name em { font-style: italic; }
.lin-name input { font: inherit; font-size: .95rem; padding: .45rem .7rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); text-align: center; }
.lin-starts { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; max-width: 44rem; margin: 1.2rem auto 0; font-size: .8rem; color: var(--muted); align-items: center; }
.chip { border: 1px solid var(--rule); background: var(--paper); border-radius: 999px; padding: .3rem .8rem; font-size: .8rem; color: var(--ink-2); cursor: pointer; }
.chip:hover { border-color: var(--accent-soft); color: var(--accent); }
.lin-result { max-width: 44rem; padding-top: 1.5rem; scroll-margin-top: 4rem; }
.lin-summary { font-family: var(--display); font-size: clamp(1.45rem, 4vw, 1.9rem); line-height: 1.25; text-align: center; margin: .5rem 0 2rem; }
.lin-summary b { font-weight: 600; }
.lin-steps { list-style: none; padding: 0; margin: 0; position: relative; }
.lin-step { position: relative; padding-left: 0; }
.lin-rel { margin: 0 0 0 1.55rem; padding: .7rem 0 .7rem 1.6rem; border-left: 2px solid var(--land-edge); font-size: .82rem; color: var(--ink-2); line-height: 1.45; }
.lin-rel .rel-verb { font-style: italic; }
.lin-rel .rel-when { color: var(--muted); }
.lin-rel .rel-src a, .lin-rel .rel-src { color: var(--muted); font-size: .74rem; }
.lin-rel .conf { font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent-soft); border-radius: 999px; padding: 0 .4rem; }
.lin-card { position: relative; background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 1rem 1.1rem 1rem 1.1rem; box-shadow: 0 2px 10px rgba(34, 30, 26, .04); }
.lin-step.gerome .lin-card { border-color: var(--accent-soft); box-shadow: 0 0 0 3px rgba(162, 89, 75, .12); }
.lin-step.you .lin-card { background: var(--paper-2); }
.lin-step.school .lin-card { background: var(--paper-2); }
.lin-card .gen { position: absolute; top: .7rem; right: .8rem; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lin-who { display: flex; gap: .9rem; align-items: center; padding-right: 3rem; }
.lin-who .por { width: 3.4rem; height: 3.4rem; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--rule); }
.lin-who .ini { display: grid; place-items: center; background: var(--paper-3); color: var(--ink-2); font-size: .9rem; letter-spacing: .05em; }
.lin-step.gerome .lin-who .ini { background: var(--accent); color: var(--paper); }
.lin-who h3 { font-size: 1.45rem; }
.lin-who .meta { margin: .15rem 0 0; font-size: .8rem; color: var(--muted); }
.lin-card .line { margin: .7rem 0 0; font-size: .92rem; color: var(--ink-2); line-height: 1.5; }
.lin-work { margin: .8rem 0 0; }
.lin-work img { width: 100%; max-height: 20rem; object-fit: contain; background: var(--paper-2); border-radius: 3px; }
.lin-work figcaption { font-size: .74rem; color: var(--muted); margin-top: .35rem; }
.lin-card .pcred { font-size: .68rem; color: var(--muted); margin: .5rem 0 0; }
.lin-alt { margin: 0 0 0 1.55rem; padding: .2rem 0 .4rem 1.6rem; border-left: 2px dashed var(--land-edge); font-size: .76rem; color: var(--muted); }
.lin-alt button { border: 1px dashed var(--rule); background: none; border-radius: 999px; padding: .15rem .6rem; font-size: .76rem; color: var(--ink-2); cursor: pointer; margin: .15rem .1rem; }
.lin-alt button:hover { border-color: var(--accent-soft); color: var(--accent); }
.lin-share { margin: 2.6rem 0 0; text-align: center; border-top: 1px solid var(--rule); padding-top: 2rem; }
.lin-share h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
.lin-share canvas { width: min(100%, 27rem); height: auto; aspect-ratio: 1080 / 1350; margin: 1rem auto 0; display: block; border-radius: 4px; box-shadow: 0 14px 40px rgba(34, 30, 26, .16); }
.lin-share-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1.1rem; }
.lin-missing { padding-top: 1.5rem; scroll-margin-top: 4rem; }
.lin-missing h2 { font-size: clamp(1.6rem, 4vw, 2rem); }
.lin-near { display: flex; flex-wrap: wrap; gap: .4rem; margin: .8rem 0 1.4rem; }
.lin-tell { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 6px; padding: 1.2rem; }
.lin-about { margin-top: 2rem; }
@media (max-width: 560px) {
  .lin-who h3 { font-size: 1.25rem; }
  .lin-who .por { width: 2.8rem; height: 2.8rem; }
  .lin-rel, .lin-alt { margin-left: 1.2rem; padding-left: 1.1rem; }
  .lin-box .btn { padding: .5rem .9rem; }
}
.lin-lead { background: linear-gradient(180deg, var(--paper-2), var(--paper)); }
.lin-lead-art { display: flex; align-items: center; justify-content: center; gap: 0; padding: 1.2rem 0; }
.lin-lead-art img, .lin-lead-art span { width: 4.6rem; height: 4.6rem; border-radius: 50%; object-fit: cover; border: 3px solid var(--paper); box-shadow: 0 0 0 1px var(--rule); margin-left: -0.6rem; position: relative; }
.lin-lead-art span { display: grid; place-items: center; background: var(--accent); color: var(--paper); font-family: var(--display); font-size: 1.3rem; font-weight: 600; }
@media (max-width: 520px) { .lin-lead-art img, .lin-lead-art span { width: 3.6rem; height: 3.6rem; } }

/* ---------- the moving card ---------- */
.lin-video { margin: 2.4rem auto 0; max-width: 34rem; }
.lin-video h3 { font-size: clamp(1.35rem, 3.4vw, 1.7rem); margin: 0 0 .3rem; }
a.btn { text-decoration: none; display: inline-block; }
.lin-fmt { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--muted); }
.lin-fmt select { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 999px; padding: .35rem .7rem; }
.lin-video-stage { position: relative; width: min(100%, 17rem); margin: 1.2rem auto 0; }
.lin-video-stage canvas, .lin-video-stage video { display: block; width: 100%; height: auto; aspect-ratio: 1080 / 1920; border-radius: 6px; background: var(--paper-2); box-shadow: 0 14px 40px rgba(34, 30, 26, .18); }
.lin-progress { height: 3px; background: var(--rule); border-radius: 2px; margin-top: .7rem; overflow: hidden; }
.lin-progress span { display: block; height: 100%; width: 0; background: var(--accent); }
.lin-count { margin: .55rem 0 0; font-size: .82rem; color: var(--muted); text-align: center; }
.lin-count b { color: var(--ink-2); font-weight: 600; }

/* ---------- map: story titles and step buttons ---------- */
.map-title { margin: 0 0 .2rem; font-family: var(--display); font-size: clamp(1.3rem, 3.4vw, 1.75rem); font-weight: 600; text-align: center; }
.map-story { margin: 0 auto .8rem; max-width: 40rem; text-align: center; font-size: .95rem; color: var(--ink-2); font-style: italic; }
.step-btn { font: inherit; font-size: .85rem; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); border-radius: 999px; padding: .45rem .95rem; cursor: pointer; white-space: nowrap; }
.step-btn:hover:not(:disabled) { border-color: var(--accent-soft); color: var(--accent); }
.step-btn:disabled { opacity: .4; cursor: default; }
body.mode-journeys .dot { display: none !important; }
body.mode-journeys .map-controls { justify-content: center; }

/* ---------- charts: one number, one sentence ---------- */
.big-num { margin: .2rem 0 .3rem; font-family: var(--display); font-weight: 600; font-size: clamp(3rem, 9vw, 5.2rem); line-height: .95; color: var(--accent); }
.big-num span { display: block; margin-top: .35rem; font-family: var(--text); font-weight: 400; font-size: .95rem; line-height: 1.35; color: var(--ink-2); }
.chart-head h2.headline { font-size: clamp(1.35rem, 3.4vw, 1.9rem); line-height: 1.25; margin: .6rem 0 0; }
.notes .takeaway-small { font-size: .95rem; color: var(--ink-2); margin: .6rem 0; }
.notes .source-line, .notes .method-note { margin: .5rem 0; }

/* ---------- overview: what each tool shows ---------- */
.tool-list { list-style: none; margin: 0 auto 2.4rem; padding: 0; max-width: 44rem; display: grid; gap: .6rem; }
.tool-list a { display: flex; flex-direction: column; gap: .15rem; padding: .85rem 1.1rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); color: inherit; text-decoration: none; transition: border-color .2s; }
.tool-list a:hover { border-color: var(--accent-soft); }
.tool-list b { font-family: var(--display); font-size: 1.3rem; font-weight: 600; color: var(--accent); }
.tool-list span { font-size: .95rem; color: var(--ink-2); }
.card-big { display: block; font-family: var(--display); font-weight: 600; font-size: 2.1rem; line-height: 1; color: var(--accent); margin-bottom: .3rem; }

/* ---------- lineage polish ---------- */
.lin-also { margin: 1rem 0 0; text-align: center; font-size: .9rem; color: var(--muted); }
.lin-also a { color: var(--accent); }
.lin-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.4rem; margin: -1rem 0 1.8rem; font-size: .92rem; }
.lin-links a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-soft); }
.lin-links a:hover { color: var(--ink); border-color: var(--ink); }
.lin-tree { display: inline-block; margin-top: .6rem; font-size: .8rem; color: var(--muted); text-decoration: none; }
.lin-tree:hover { color: var(--accent); }
.lin-share .lin-name { max-width: 22rem; margin: 1rem auto 0; }
.lin-alt span { font-style: italic; }
@media (max-width: 560px) {
  .lin-starts { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    margin-left: -1.25rem; margin-right: -1.25rem; padding: 0 1.25rem .3rem; mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .lin-starts::-webkit-scrollbar { display: none; }
  .lin-starts .chip, .lin-starts span { flex: none; }
  .lin-links { flex-direction: column; align-items: center; gap: .5rem; }
}

/* ---------- journeys polish ---------- */
body.mode-journeys .map-caption { display: block; min-height: 5.2em; font-size: 1.12rem; line-height: 1.5; margin-top: .9rem; }
.jcap { display: block; }
.jcap .jpeople { float: left; margin: .15rem .6rem .2rem 0; }
.jcap .jpeople img, .jcap .jpeople .ini { width: 2.3rem; height: 2.3rem; }
.jtext { display: block; overflow: hidden; }
.jcaplinks { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .35rem; font-size: .85rem; clear: both; }
.jcaplinks a, .jcaplinks button { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; border-bottom: 1px solid var(--accent-soft); }
.jcaplinks a:hover, .jcaplinks button:hover { color: var(--ink); border-color: var(--ink); }
.map-counts .jstep { font-size: .85rem; }
.map-counts .jstep b { font-size: 1.35rem; }
body.mode-journeys .map-controls { justify-content: center; margin-top: .8rem; }
body.mode-journeys .play { order: 2; }
body.mode-journeys #jback { order: 1; }
body.mode-journeys #jnext { order: 3; }
.page-head .dek { margin-bottom: 1rem; }
@media (max-width: 560px) {
  body.mode-journeys .map-caption { font-size: 1rem; min-height: 7.5em; }
  .step-btn { padding: .55rem 1.1rem; font-size: .92rem; }
}
.page-map .page-head { padding-top: 1.6rem; padding-bottom: .6rem; }
.page-map .page-head h1 { font-size: clamp(2rem, 4.6vw, 3rem); margin-bottom: .3rem; }
.page-map .page-head .dek { max-width: 44rem; font-size: 1.05rem; margin-bottom: .8rem; }
.page-map .map-title { font-size: clamp(1.15rem, 2.6vw, 1.45rem); }
.page-map .mode-btn { padding-top: .4rem; padding-bottom: .4rem; }
.lin-rel .rel-verb span { color: var(--accent); font-style: normal; }
body.mode-journeys .map-controls { margin-top: .7rem; }
body.mode-journeys .map-caption { margin-top: .7rem; max-width: 46rem; margin-left: auto; margin-right: auto; }
.page-map .page-head { padding-top: 1.1rem; padding-bottom: .3rem; }
.page-map .page-head .dek { max-width: 54rem; margin-bottom: .6rem; }
.page-map .map-title { margin-bottom: .1rem; }

/* ---------- journeys: one step at a time ---------- */
.jgroup { transition: opacity .45s ease; }
.jgroup.past .jarc, .jgroup.past .jstay { stroke: var(--umber); stroke-width: 1.2; opacity: .35; }
.jend { fill: var(--paper); stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.jend.dest { fill: var(--accent); }
.jgroup.cur .jcity, .jcity { font-style: normal; font-weight: 600; fill: var(--ink); }
body.mode-journeys .legend.j-only { gap: .4rem 1.4rem; }
/* spread steps: where a teacher's pupils went */
.jgroup.spread.cur .jarc { stroke: #a87a32; stroke-width: 2.2; opacity: .95; }
.jgroup.spread.cur .jstay { stroke: #a87a32; stroke-width: 2.2; opacity: 1; }
.jgroup.spread .jend.dest { fill: #a87a32; stroke: var(--paper); }
.jgroup.spread .jend.home { fill: var(--accent); stroke: var(--paper); }
.jcity.home { fill: var(--accent); }
.map-counts .jspread-tag { margin-top: .2rem; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #8a6420; font-weight: 600; }
.jspread-list { list-style: none; padding: 0; margin: .5rem 0; font-size: .85rem; }
.jspread-list li { margin: .2rem 0; }

/* ---------- lineage: several roots ---------- */
.lin-roots { margin: 0 auto 2rem; max-width: 44rem; padding: 1.2rem 1.2rem 1rem; background: var(--paper-2); border: 1px solid var(--rule); border-radius: 10px; }
.lin-roots h2 { font-size: clamp(1.3rem, 3.4vw, 1.6rem); margin: 0 0 .3rem; }
.root-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: .55rem; margin-top: .8rem; }
.root-card { display: flex; gap: .6rem; align-items: flex-start; text-align: left; font: inherit; background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: .55rem .65rem; cursor: pointer; color: var(--ink); }
.root-card:hover { border-color: var(--accent-soft); }
.root-card img, .root-card .ini { flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; object-fit: cover; }
.root-card .ini { display: grid; place-items: center; background: var(--paper-3); color: var(--ink-2); font-size: .8rem; }
.root-card b { display: block; font-family: var(--display); font-size: 1.08rem; font-weight: 600; line-height: 1.15; }
.root-card small { display: block; font-size: .74rem; color: var(--muted); line-height: 1.35; }
.jstudio { font-family: var(--display); font-weight: 600; fill: var(--accent); paint-order: stroke; stroke: rgba(251, 248, 242, .92); stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
