/* Homepage design pass: one category colour system, readable readouts, and one signature
   graphic per section drawn from the objects of social research (ballots, catalogue cards,
   archive mounts, census pictograms, postage). Loaded after styles.css. */

.page-home-modern {
  --cat-play: #2247d4;
  --cat-discover: #1f6b4f;
  --cat-learn: #ae311d;
  --cat-research: #96650c;
  --night: #0f1730;
  --night-line: #2c3a61;
  --night-text: #f3efe4;
  --night-soft: #a9b3cf;
  --manila: #f4e9cc;
  --manila-rule: #9fb9d9;
}
[data-dark] .page-home-modern, [data-dark].page-home-modern, .page-home-modern[data-dark] {
  --cat-play: #93a8ff;
  --cat-discover: #79c8a6;
  --cat-learn: #ff9a85;
  --cat-research: #e8bd6c;
}
[data-dark] .page-home-modern { --manila: #2a2a22; --manila-rule: #3d4a5e; }

/* Readouts use the text face with even figures instead of a monospace face. */
.page-home-modern { --home-mono: var(--body); }
.home-mini output, .home-count, #hero-played-count, .community-pulse-strip strong, .duel-metric-sides span {
  font-variant-numeric: tabular-nums;
}
.home-mini output { font-weight: 700; font-size: .84rem; letter-spacing: 0; }

/* ---------- Menu: a night-blue atlas that opens from the menu button ---------- */
.home-menu {
  --menu-x: calc(100% - 3rem);
  --menu-y: 2rem;
  width: min(calc(100vw - 1.5rem), 76rem);
  max-height: calc(100dvh - 1.5rem);
  padding: clamp(1.1rem, 2.6vw, 2.2rem);
  border: 1px solid var(--night-line);
  border-radius: 22px;
  background: var(--night);
  color: var(--night-text);
  box-shadow: 0 30px 90px #050a1aa6;
}
[data-dark] .home-menu { background: #0a1124; border-color: #26345a; color: var(--night-text); }
.home-menu::backdrop { background: #0a1124b8; backdrop-filter: blur(3px); }
.home-menu header { align-items: flex-start; }
.home-menu h2 { color: var(--night-text); font-size: clamp(2.2rem, 4vw, 3.3rem); }
.home-menu .home-menu-close { border-color: #3b4a75; color: var(--night-text); }
.home-menu .home-menu-close:hover, .home-menu .home-menu-close:focus-visible { border-color: #f4c87a; box-shadow: none; outline: none; }
.home-menu nav {
  display: grid;
  grid-template-columns: minmax(15rem, .8fr) minmax(0, 1.6fr);
  grid-template-areas: "major play" "short short";
  gap: clamp(1.2rem, 3vw, 2.6rem);
}
.home-menu nav ul { list-style: none; margin: 0; padding: 0; max-width: none; }
.home-menu h3 { margin: 0 0 .7rem; color: var(--night-soft); font: 600 .9rem/1.3 var(--body); }

.home-menu-major { grid-area: major; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: .25rem; border-inline-end: 1px solid var(--night-line); padding-inline-end: clamp(.8rem, 2vw, 2rem); }
.home-menu .home-menu-major a {
  --kind: var(--cat-play);
  display: grid; justify-items: start; justify-content: start; gap: .1rem; min-height: 0; padding: .55rem 0 .7rem;
  border: 0; border-radius: 0; background: none; text-align: start; color: var(--night-text);
  border-block-end: 1px solid var(--night-line); box-shadow: none;
}
.home-menu .home-menu-major li:last-child a { border-block-end: 0; }
.home-menu .home-menu-major a[data-kind="discover"] { --kind: #6fd3a8; }
.home-menu .home-menu-major a[data-kind="learn"] { --kind: #ff8f78; }
.home-menu .home-menu-major a[data-kind="research"] { --kind: #f2c46b; }
.home-menu .home-menu-major a[data-kind="play"] { --kind: #8ea6ff; }
.home-menu-major b {
  position: relative; font: 400 clamp(2.4rem, 4.6vw, 3.9rem)/1 var(--editorial-heading); letter-spacing: -.01em;
  padding-inline-start: 1.1rem;
}
.home-menu-major b::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .48em; width: .48rem; height: .48rem; border-radius: 50%;
  background: var(--kind); transition: transform .25s ease;
}
.home-menu-major span { padding-inline-start: 1.1rem; color: var(--night-soft); font-size: .9rem; font-weight: 500; }
.home-menu .home-menu-major a:is(:hover, :focus-visible) { box-shadow: none; outline: none; color: #fff; }
.home-menu .home-menu-major a:is(:hover, :focus-visible) b { text-decoration: underline; text-decoration-color: var(--kind); text-decoration-thickness: 2px; text-underline-offset: .12em; }
.home-menu .home-menu-major a:is(:hover, :focus-visible) b::before { transform: scale(1.7); }

.home-menu-play { grid-area: play; min-width: 0; }
.home-menu .home-menu-games { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.home-menu .home-menu-games a {
  position: relative; display: grid; grid-template-rows: 1fr auto; justify-items: center; gap: .35rem;
  min-height: clamp(7rem, 12vw, 8.6rem); padding: .75rem .5rem .7rem; overflow: hidden;
  border: 1px solid var(--night-line); border-radius: 16px; background: #16213f; color: var(--night-text);
  font-size: clamp(.86rem, 1.4vw, 1.02rem); font-weight: 700; text-align: center;
  transition: background-color .2s ease, border-color .2s ease;
}
.home-menu .home-menu-games img { width: clamp(4.4rem, 8vw, 6.2rem); align-self: center; transition: transform .35s cubic-bezier(.2, .9, .3, 1.4); }
.home-menu .home-menu-games a:is(:hover, :focus-visible) { background: #1e2c55; border-color: #f4c87a; box-shadow: none; outline: none; }
.home-menu .home-menu-games a:is(:hover, :focus-visible) img { transform: translateY(-4px) rotate(-4deg) scale(1.1); }

.home-menu-shortcuts { grid-area: short; padding-top: 1rem; border-top: 1px solid var(--night-line); }
.home-menu-shortcuts ul { display: flex; flex-wrap: wrap; gap: .45rem; }
.home-menu .home-menu-shortcuts a {
  display: inline-flex; min-height: 40px; padding: .35rem .85rem; border: 1px solid var(--night-line);
  border-radius: 99px; background: transparent; color: var(--night-text); font-size: .88rem; font-weight: 650;
}
.home-menu .home-menu-shortcuts a:is(:hover, :focus-visible) { border-color: #f4c87a; color: #fff; box-shadow: none; outline: none; }
.home-menu :is(a, button):focus-visible { outline: 2px solid #f4c87a !important; outline-offset: 2px; }

@media (prefers-reduced-motion: no-preference) {
  .home-menu[open] { animation: menu-open .55s cubic-bezier(.2, .75, .15, 1) both; }
  .home-menu[open] :is(.home-menu-major li, .home-menu-games li) { animation: menu-item .5s cubic-bezier(.2, .75, .15, 1) both; animation-delay: calc(120ms + var(--i, 0) * 32ms); }
  .home-menu[open]::backdrop { animation: menu-fade .35s ease both; }
}
@keyframes menu-open {
  from { clip-path: circle(0 at var(--menu-x) var(--menu-y)); }
  to { clip-path: circle(150% at var(--menu-x) var(--menu-y)); }
}
@keyframes menu-item { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes menu-fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 860px) {
  .home-menu nav { grid-template-columns: minmax(0, 1fr); grid-template-areas: "major" "play" "short"; }
  .home-menu-major { border-inline-end: 0; padding-inline-end: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; }
  .home-menu .home-menu-major li:nth-last-child(2) a { border-block-end: 0; }
  .home-menu-major b { font-size: clamp(1.9rem, 7vw, 2.6rem); }
  .home-menu-major span { font-size: .8rem; }
}
@media (max-width: 560px) {
  .home-menu { width: calc(100vw - .75rem); max-height: calc(100dvh - .75rem); border-radius: 18px; }
  .home-menu .home-menu-games { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
  .home-menu .home-menu-games a { min-height: 6.4rem; padding: .5rem .3rem; font-size: .78rem; border-radius: 12px; }
  .home-menu .home-menu-games img { width: 3.6rem; }
}
.lang-ur .home-menu-major b { line-height: 1.6; }
.lang-ur .home-menu .home-menu-games a, .lang-ur .home-menu-major span { line-height: 1.9; }

/* ---------- Hero: jump links read as one row; the account link stands apart ---------- */
.home-exhibit-links { gap: .4rem; margin-top: .75rem; font-size: .84rem; }
.home-exhibit-links a {
  display: inline-flex; align-items: center; gap: .3rem; min-height: 34px; padding: .2rem .7rem;
  border: 1px solid var(--editorial-line); border-radius: 99px; background: var(--editorial-card);
  color: var(--editorial-ink); font-weight: 650; text-decoration: none;
}
.home-exhibit-links a[href^="#"]::after { content: "↓"; color: var(--cat-play); font-weight: 700; }
.home-exhibit-links .home-account-link { border-style: dashed; color: var(--editorial-soft); }
.home-exhibit-links a:hover { border-color: var(--cat-play); color: var(--cat-play); }

/* ---------- Shared panels for the three games on the page ---------- */
.home-paradox { box-shadow: none; }
.home-duel, .home-paradox, .home-flashcards { position: relative; }

/* ---------- Compare two countries: a versus header in the colours of the charts ---------- */
.duel-versus {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: clamp(.6rem, 2vw, 1.6rem);
  margin: 1.2rem 0 .4rem; padding: clamp(.8rem, 2vw, 1.2rem) clamp(.8rem, 2.4vw, 1.6rem);
  background: var(--editorial-card); border: 1px solid var(--editorial-line); border-radius: 14px;
}
.duel-versus p { display: flex; align-items: center; gap: .7rem; min-width: 0; margin: 0; }
.duel-versus p:last-child { flex-direction: row-reverse; text-align: end; }
.duel-versus i { flex: none; font-style: normal; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1; }
.duel-versus b {
  min-width: 0; font: 400 clamp(1.5rem, 3.6vw, 2.9rem)/1 var(--editorial-heading); overflow-wrap: anywhere;
  text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .18em; text-decoration-color: #607be3;
}
.duel-versus p:last-child b { text-decoration-color: #bc5539; }
.duel-versus em {
  display: grid; place-items: center; width: 3.1rem; height: 3.1rem; border-radius: 50%;
  border: 1.5px solid var(--editorial-ink); font: italic 400 1.25rem/1 var(--editorial-heading);
}
.duel-game { margin-top: 1rem; padding: clamp(.8rem, 2vw, 1.2rem); border: 1px solid var(--editorial-line); border-inline-start: 4px solid var(--cat-play); border-radius: 12px; background: var(--editorial-card); }
.duel-game [data-duel-answer] { min-height: 46px; padding-inline: 1.1rem; font-size: 1rem; }
.duel-game output { font-weight: 650; }
@media (max-width: 560px) {
  .duel-versus { gap: .45rem; padding: .7rem; }
  .duel-versus p, .duel-versus p:last-child { flex-direction: column; text-align: center; gap: .25rem; }
  .duel-versus i { font-size: 2rem; }
  .duel-versus b { font-size: 1.25rem; text-decoration-thickness: 2px; }
  .duel-versus em { width: 2.1rem; height: 2.1rem; font-size: .9rem; }
}

/* ---------- Try an activity: cards pack into columns, every graphic sits in the same well ---------- */
.home-mini-grid { display: block; columns: 3 18rem; column-gap: .9rem; }
.home-mini-grid > .home-mini { break-inside: avoid; margin-block-end: .9rem; }
.home-mini-grid > .home-mini[hidden] { display: none; }
.home-mini-chart, .home-amsterdam, .home-ols canvas, .home-distribution {
  border: 1px solid var(--editorial-line); border-radius: 10px; background: var(--editorial-wash);
}
.home-mini-chart { width: 100%; height: auto; }
.home-gap-mini .gap-link { stroke: var(--editorial-soft); stroke-width: 2; stroke-dasharray: 2 4; stroke-linecap: round; }
.home-gap-mini .gap-guess { fill: var(--cat-play); }
.home-gap-mini .gap-actual { fill: var(--cat-learn); }
.home-rank-mini .rank-dot { fill: var(--editorial-line); }
.home-rank-mini .rank-bar { fill: var(--cat-discover); }
.home-rank-mini rect:first-of-type { fill: var(--cat-research); }
.home-rank-mini .rank-year { stroke: var(--cat-research); stroke-width: 2; }
.home-solidarity-mini .solid-link { fill: none; stroke: var(--editorial-soft); stroke-width: 1.2; opacity: .7; }
.home-solidarity-mini .solid-same { fill: var(--cat-play); }
.home-solidarity-mini .solid-diff { fill: var(--cat-learn); stroke: var(--cat-learn); stroke-width: 2; }
.home-mini h3 { margin-top: .2rem; }
/* Every card reads the same way: title, one-line description, then its graphic and controls. */
.home-mini > * { order: 3; }
.home-mini > h3 { order: 0; }
.home-mini > h3 + p, .home-mini > h3 + .home-count + p { order: 1; }
.home-mini > :is(svg.home-mini-chart, figure.home-amsterdam, img.home-mini-art):first-child { order: 2; }

/* ---------- How sociologists think: archive prints with photo corners ---------- */
.story-portraits .thinker-portrait { position: relative; }
.story-portraits img {
  border: 5px solid #efe9da; border-radius: 2px; box-shadow: 0 6px 16px -6px #000c; filter: grayscale(1) contrast(1.05);
}
.story-portraits .thinker-portrait:not(.bridge-figure)::before, .story-portraits .thinker-portrait:not(.bridge-figure)::after {
  content: ""; position: absolute; z-index: 1; width: 14px; height: 14px; top: -3px; background: #2b3550;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.story-portraits .thinker-portrait::before { inset-inline-start: -3px; }
.story-portraits .thinker-portrait:not(.bridge-figure)::after { inset-inline-end: -3px; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.bridge-figure svg { display: block; width: 100%; height: auto; border-radius: 10px; background: #111a33; border: 1px solid #33426b; }
.bridge-figure .bridge-edge { fill: none; stroke: #7383b3; stroke-width: 2; }
.bridge-figure .bridge-node { fill: #6fd3a8; }
.bridge-figure .bridge-hub { fill: #f2c46b; }
.bridge-figure .bridge-ring { fill: none; stroke: #f2c46b; stroke-width: 1.5; stroke-dasharray: 3 4; }
.bridge-figure text { fill: #e6e9f5; font: 600 11px var(--body); text-anchor: middle; }
@media (prefers-reduced-motion: no-preference) {
  .bridge-figure .bridge-ring { animation: bridge-turn 14s linear infinite; transform-origin: 150px 75px; }
}
@keyframes bridge-turn { to { transform: rotate(1turn); } }

/* ---------- Sociological paradoxes: an ambiguous figure, and options marked like a ballot ---------- */
.paradox-emblem {
  position: absolute; inset-block-start: clamp(1rem, 2.9vw, 2.4rem); inset-inline-end: clamp(1rem, 2.9vw, 2.4rem);
  width: clamp(3.4rem, 7vw, 5.6rem); fill: none; stroke: var(--cat-research); stroke-width: 3; stroke-linejoin: round;
}
.home-paradox h2 { padding-inline-end: clamp(4rem, 9vw, 7rem); }
.paradox-list button[aria-pressed="true"] { border-color: var(--cat-research); box-shadow: inset 3px 0 var(--cat-research); }
[dir="rtl"] .paradox-list button[aria-pressed="true"] { box-shadow: inset -3px 0 var(--cat-research); }
.paradox-option { padding-inline-start: 2.6rem; }
.paradox-option::before {
  content: ""; position: absolute; inset-inline-start: .8rem; top: 50%; width: 1.05rem; height: 1.05rem; translate: 0 -50%;
  border: 1.5px solid var(--editorial-ink); border-radius: 2px; background: var(--editorial-card);
}
.paradox-option.is-choice::after {
  content: "✕"; position: absolute; inset-inline-start: .8rem; top: 50%; width: 1.05rem; translate: 0 -52%;
  color: var(--cat-learn); font: 800 1.05rem/1 var(--body); text-align: center;
}

/* ---------- Community and evidence: each tile pictures what it counts ---------- */
.evidence-figure { min-height: 10.5rem; padding-inline-end: 42%; }
.evidence-figure::before { content: none; }
.evidence-figure[data-evidence-type="countries"] { --evidence-bg: #3f2c08; --evidence-accent: #f2c46b; }
.evidence-figure[data-evidence-type="prompts"] { --evidence-bg: #5a2116; --evidence-accent: #ffb19c; }
.evidence-figure[data-evidence-type="people"] { --evidence-bg: #14245e; --evidence-accent: #aabdff; }
.evidence-figure[data-evidence-type="levels"] { --evidence-bg: #113b2d; --evidence-accent: #9fe0c2; }
.evidence-art {
  position: absolute; z-index: -1; inset-inline-end: .7rem; top: 50%; translate: 0 -50%; width: 40%; max-width: 9rem;
  fill: none; stroke: var(--evidence-accent); stroke-width: 2; color: var(--evidence-accent); opacity: .92;
}
.evidence-art .evidence-fill, .evidence-art .evidence-fill * { fill: var(--evidence-accent); stroke: none; }
.evidence-figure[data-evidence-type="people"] .evidence-art { stroke: none; fill: var(--evidence-accent); opacity: 1; }
.evidence-figure[data-evidence-type="people"] .evidence-art g:not(.evidence-fill) { opacity: .3; }
.evidence-art text { fill: var(--evidence-accent); stroke: none; font: 400 26px var(--editorial-heading); }
.evidence-art .evidence-on-fill { fill: var(--evidence-bg); }
.evidence-figure:hover .evidence-art { opacity: 1; }
.community-pulse-strip > div { border-block-start-color: var(--cat-play); }

/* ---------- Concept flashcards: library catalogue cards ---------- */
.home-flip-scene { position: relative; }
.home-flip-scene::before {
  content: ""; position: absolute; inset: 8px -8px -8px 8px; border: 1px solid #d6c497; border-radius: 6px;
  background: #ead9b0; transform: rotate(-1.4deg);
}
.home-flip-card { position: relative; min-height: 16rem; }
.home-flip-front, .home-flip-back {
  position: relative; align-content: start; color: #1d1b16; border: 1px solid #d6c497; border-radius: 6px;
  padding: 0 clamp(1rem, 3.5vw, 2.2rem) 2.4rem;
  background:
    linear-gradient(#c8473a, #c8473a) 0 3.6rem / 100% 2px no-repeat,
    repeating-linear-gradient(to bottom, transparent 0 calc(1.6rem - 1px), var(--manila-rule) calc(1.6rem - 1px) 1.6rem) 0 3.6rem / 100% calc(100% - 3.6rem) no-repeat,
    #f4e9cc;
  box-shadow: 0 14px 26px -18px #3d2f10;
}
.home-flip-front::after, .home-flip-back::after {
  content: ""; position: absolute; bottom: .8rem; left: 50%; width: .95rem; height: .95rem; translate: -50% 0;
  border-radius: 50%; background: var(--editorial-wash); box-shadow: inset 0 1px 2px #0005;
}
.home-flip-front small, .home-flip-back h3 { display: flex; align-items: center; height: 3.6rem; margin: 0; }
.home-flip-front small { color: #6b4f1d; font-size: .9rem; font-weight: 700; }
.home-flip-front h3 { margin: .9rem 0 0; color: #1d1b16; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.12; }
.home-flip-back h3 { font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1; color: #1d1b16; }
.home-flip-back p { margin: 0; padding-top: .25rem; font-size: .98rem; line-height: 1.6rem; color: #24211b; }
.home-flip-back a { color: #1c3db8; font-weight: 700; line-height: 1.6rem; }
[data-dark] .home-flip-front, [data-dark] .home-flip-back { filter: brightness(.9); }
.home-flip-controls output { font-variant-numeric: tabular-nums; }

/* ---------- Browse by feature: categories carry colour and a label; cards pack into columns ---------- */
.showcase-directory { display: block; columns: 4 15rem; column-gap: .8rem; }
.showcase-directory > div {
  --kind: var(--cat-play);
  break-inside: avoid; margin-block-end: .8rem; border-block-start: 3px solid var(--kind);
}
.showcase-directory > div[hidden] { display: none; }
.showcase-directory > div[data-showcase-group="discover"] { --kind: var(--cat-discover); border-block-start-color: var(--kind); }
.showcase-directory > div[data-showcase-group="learn"] { --kind: var(--cat-learn); border-block-start-color: var(--kind); }
.showcase-directory > div[data-showcase-group="research"] { --kind: var(--cat-research); border-block-start-color: var(--kind); }
.showcase-directory > div:nth-child(4n + 4):not([data-showcase-group]) { border-block-start-color: var(--kind); }
.showcase-directory > div[data-showcase-group="play"] { border-block-start-color: var(--kind); }
.directory-image { aspect-ratio: 16 / 9; object-fit: cover; object-position: center top; border-block-end: 1px solid var(--editorial-line); }
.directory-kind { display: inline-flex; align-items: center; gap: .35rem; color: var(--kind); font-size: .78rem; font-weight: 750; }
.directory-kind::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--kind); }
.showcase-filter button[value="play"][aria-pressed="true"] { background: var(--cat-play); border-color: var(--cat-play); }
.showcase-filter button[value="discover"][aria-pressed="true"] { background: var(--cat-discover); border-color: var(--cat-discover); }
.showcase-filter button[value="learn"][aria-pressed="true"] { background: var(--cat-learn); border-color: var(--cat-learn); }
.showcase-filter button[value="research"][aria-pressed="true"] { background: var(--cat-research); border-color: var(--cat-research); }
[data-dark] .showcase-filter button[aria-pressed="true"] { color: #10131a; }

/* ---------- Newsletter: the editorial heading and a postage stamp ---------- */
.page-home-modern .newsletter { position: relative; padding: clamp(1.2rem, 3vw, 2.2rem); padding-inline-end: clamp(1.2rem, 14vw, 12rem); }
.page-home-modern .newsletter h2 { margin: 0 0 .6rem; font: 400 clamp(2.1rem, 4.6vw, 3.5rem)/1 var(--editorial-heading); letter-spacing: -.01em; }
.page-home-modern .newsletter::after {
  content: ""; position: absolute; inset-inline-end: clamp(1rem, 3vw, 2.4rem); top: 50%; width: clamp(5.5rem, 10vw, 8rem); aspect-ratio: 4 / 5;
  translate: 0 -50%; rotate: 4deg; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 100'%3E%3Cpath fill='%23fdfbf6' d='M4 4h72v92H4z'/%3E%3Cg fill='%23efeadc'%3E%3Ccircle cx='4' cy='10' r='3'/%3E%3Ccircle cx='4' cy='22' r='3'/%3E%3Ccircle cx='4' cy='34' r='3'/%3E%3Ccircle cx='4' cy='46' r='3'/%3E%3Ccircle cx='4' cy='58' r='3'/%3E%3Ccircle cx='4' cy='70' r='3'/%3E%3Ccircle cx='4' cy='82' r='3'/%3E%3Ccircle cx='4' cy='94' r='3'/%3E%3Ccircle cx='76' cy='10' r='3'/%3E%3Ccircle cx='76' cy='22' r='3'/%3E%3Ccircle cx='76' cy='34' r='3'/%3E%3Ccircle cx='76' cy='46' r='3'/%3E%3Ccircle cx='76' cy='58' r='3'/%3E%3Ccircle cx='76' cy='70' r='3'/%3E%3Ccircle cx='76' cy='82' r='3'/%3E%3Ccircle cx='76' cy='94' r='3'/%3E%3Ccircle cx='16' cy='4' r='3'/%3E%3Ccircle cx='28' cy='4' r='3'/%3E%3Ccircle cx='40' cy='4' r='3'/%3E%3Ccircle cx='52' cy='4' r='3'/%3E%3Ccircle cx='64' cy='4' r='3'/%3E%3Ccircle cx='16' cy='96' r='3'/%3E%3Ccircle cx='28' cy='96' r='3'/%3E%3Ccircle cx='40' cy='96' r='3'/%3E%3Ccircle cx='52' cy='96' r='3'/%3E%3Ccircle cx='64' cy='96' r='3'/%3E%3C/g%3E%3Crect x='12' y='12' width='56' height='76' fill='%2314245e'/%3E%3Cpath d='M20 34h40M20 50h40M20 66h40' stroke='%233a4f99' stroke-width='1.5'/%3E%3Cpath d='M26 34h22M38 50h18M22 66h16' stroke='%23aabdff' stroke-width='2'/%3E%3Ccircle cx='26' cy='34' r='3.5' fill='%23aabdff'/%3E%3Ccircle cx='48' cy='34' r='3.5' fill='%23ffb19c'/%3E%3Ccircle cx='38' cy='50' r='3.5' fill='%23aabdff'/%3E%3Ccircle cx='56' cy='50' r='3.5' fill='%23ffb19c'/%3E%3Ccircle cx='22' cy='66' r='3.5' fill='%23aabdff'/%3E%3Ccircle cx='38' cy='66' r='3.5' fill='%23ffb19c'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 4px 6px #3d2f1033);
}
@media (max-width: 640px) {
  .page-home-modern .newsletter { padding-inline-end: clamp(1.2rem, 3vw, 2.2rem); padding-block-start: 5.6rem; }
  .page-home-modern .newsletter::after { top: 1rem; translate: none; width: 3.6rem; }
}

/* ---------- Concept map: thinker lists open with the same plus sign as the study guides ---------- */
.theory-directory details { background: var(--editorial-card); }
.theory-directory summary { display: flex; align-items: center; justify-content: space-between; gap: .5rem; list-style: none; font-weight: 700; }
.theory-directory summary::-webkit-details-marker { display: none; }
.theory-directory summary::after { content: "+"; color: var(--cat-play); font-size: 1.2rem; font-weight: 600; line-height: 1; }
.theory-directory details[open] summary::after { content: "−"; }
.theory-directory details[open] { border-color: var(--cat-play); }
.story-portraits .thinker-portrait:not(.bridge-figure)::before, .story-portraits .thinker-portrait:not(.bridge-figure)::after { background: #c9b98f; }
.evidence-figure { padding-inline-end: 38%; }

/* ---------- Footer headings use the same category colours as the menu and directory ---------- */
.home-footer nav:nth-of-type(1) h2 { color: #aabdff; }
.home-footer nav:nth-of-type(2) h2 { color: #ffb19c; }
.home-footer nav:nth-of-type(3) h2 { color: #9fe0c2; }
.home-footer nav:nth-of-type(4) h2 { color: #f2c46b; }

/* Directory screenshots sit whole inside a frame; only photographs fill it. */
.directory-image { object-fit: contain; object-position: center; padding: .45rem; background: var(--editorial-wash); }
.showcase-directory > div:has(img[src*="shibuya"]) img, .showcase-directory > div:has(img[src*="amsterdam"]) img { object-fit: cover; padding: 0; }

@media (max-width: 700px) {
  .evidence-figure { padding-inline-end: clamp(.75rem, 2vw, 1.38rem); padding-block-start: 3.6rem; min-height: 0; }
  .evidence-art { top: .7rem; inset-inline-end: .7rem; translate: none; width: 3.4rem; }
  .evidence-figure strong { position: absolute; top: .7rem; inset-inline-start: .8rem; }
}
@media (max-width: 560px) {
  /* On phones the directory is a compact index: category, title and links, without screenshots. */
  .directory-image { display: none; }
  .showcase-directory { columns: 2 10rem; }
  .directory-copy { padding: .7rem .75rem .8rem; }
  .showcase-directory h3 { font-size: 1.45rem; }
}
