/* v47: painted worlds, changing colour, and Beanie in the closing scene. */
.on-light {
  --head: #f7f0e4; --text: #edf3fa; --text-mid: #ced9e6;
  --text-dim: #b7c6d8; --text-hint: #94aac1; --teal-text: #9ac8eb;
  --line: rgba(182,205,229,.13); --line-strong: rgba(182,205,229,.25);
  --surface: #182b41;
  --coral-ink: #f0a08a; --moss-ink: #b0ca95; --blue-ink: #99c9e9;
  --indigo-ink: #c0b6ee; --plum-ink: #d5aaca; --amber-ink: #ebc781;
  --violet-ink: #cdb2ec; --rose-ink: #efa9bc; --cornflower-ink: #adcaf5;
  --lilac-ink: #d0bdee; --lime-ink: #c4e78b;
  --coral-pale: rgba(232,120,90,.14); --moss-pale: rgba(111,143,82,.15);
  --blue-pale: rgba(45,111,158,.18); --indigo-pale: rgba(99,85,160,.18);
  --plum-pale: rgba(138,90,122,.16); --amber-pale: rgba(201,150,58,.16);
  --violet-pale: rgba(139,95,184,.17); --rose-pale: rgba(194,91,115,.15);
  --cornflower-pale: rgba(91,143,220,.16); --lilac-pale: rgba(160,135,208,.17);
  --lime-pale: rgba(141,198,63,.13); --teal-tile: rgba(127,179,218,.12);
  --shadow-sm: 0 8px 25px #030a142b; --shadow-lg: 0 28px 70px #030a1470;
}
.on-light .section-inner, .on-light .section-inner-wide { position: relative; z-index: 10; }
.on-light .eyebrow { color: #dfbc85; font-size: 10px; letter-spacing: .21em; }
.on-light .eyebrow::before { color: #a4b5c5; }

/* The statement becomes a lit bridge between the film and the collection. */
.statement { background: radial-gradient(ellipse at 95% 0,#ba96673b,transparent 62%),linear-gradient(125deg,#203b3a,#283c36 60%,#40303a); }
.statement-inner { max-width: 1360px; gap: 6rem; padding-top: 6rem; padding-bottom: 6rem; }
.statement-prose .lead { color: #f1f3f5; line-height: 1.65; }
.stat { padding: 1.35rem 1.6rem; border-color: #c2d4e32b; border-radius: 8px; background: linear-gradient(120deg,#e8c18a09,#a8d7ff0a); box-shadow: 0 20px 55px -30px #0009; }
.stat::before { background: #e5bc7e; box-shadow: 0 0 18px #e5bc7e55; }
.stat-num { color: #f5dfb8; font-size: clamp(3rem,4.8vw,4.8rem); }
.stat-label { color: #ccdae9; }

/* Collection entrance: the actual tool artwork, arranged as a floating film gallery. */
#tools { padding: 7.5rem clamp(24px,4vw,76px) 8rem; background: linear-gradient(180deg,#3d2a3c 0%,#292c38 12%,#263e36 37%,#342f3b 68%,#3d3031 100%); }
#tools > .section-inner-wide { max-width: 1460px; }
#tools::before { height: 1100px; background: linear-gradient(90deg,#3d2a3ce6,#3d2a3cb3 55%,#3d2a3c66),url("worlds/curve-table.webp") center top / cover; -webkit-mask-image: linear-gradient(#000,transparent); mask-image: linear-gradient(#000,transparent); }
#tools::after, #possibilities::after, #about::after, #contact::after { opacity: .022; }
.tools-intro { grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); gap: 4rem; align-items: center; margin-bottom: 4.5rem; }
.tools-intro-prose { grid-column: 1; grid-row: 1; max-width: 650px; }
.tools-intro h2 { font-size: clamp(3.25rem,6.2vw,6.1rem); line-height: .99; letter-spacing: -.045em; margin-bottom: 2rem; }
.tools-intro-prose p { font-size: 16px; line-height: 1.85; color: #dfd4d6; }
.tools-intro-prose p.lead { color: #f3e7de; font-size: 18px; }
.tools-intro .pullquote { grid-column: 1 / -1; grid-row: 2; margin-top: 1.5rem; margin-bottom: 0; padding: 3rem 9%; border: 0; border-top: 1px solid #e7c28b33; border-bottom: 1px solid #e7c28b33; background: radial-gradient(ellipse at 50% 50%,#bd986a0d,transparent 75%); text-align: center; }
.tools-intro .pullquote p { font-size: clamp(1.8rem,3vw,2.85rem); color: #f0debf; line-height: 1.35; letter-spacing: -.015em; }
.tools-intro .pullquote-source { color: #aabccd; font-size: 9px; margin-top: 1.25rem; }
.collection-art { grid-column: 2; grid-row: 1; min-width: 0; height: 590px; position: relative; perspective: 1300px; transform: rotateX(var(--collage-rx,0deg)) rotateY(var(--collage-ry,0deg)); transition: transform .8s cubic-bezier(.22,1,.36,1); }
.collection-halo { position: absolute; inset: 3% -5%; border-radius: 50%; background: radial-gradient(ellipse at 45% 50%,#d4ad7040,transparent 50%),radial-gradient(ellipse at 70% 70%,#7db8e44a,transparent 60%); filter: blur(28px); }
.collection-art::after { content: ''; position: absolute; inset: 15% 8%; border: 1px solid #d3dfed1c; border-radius: 50%; transform: rotate(-18deg); pointer-events: none; }
.collection-art-screen { position: absolute; display: block; object-fit: cover; aspect-ratio: 16 / 10; height: auto; border: 1px solid #d7dce04d; border-radius: 5px; box-shadow: 0 32px 65px #030a167d,0 0 35px #b9cde415; transform: translateY(0) rotate(var(--angle)); animation: gallery-drift 10s ease-in-out infinite; animation-play-state: paused; }
.collection-art.is-in-view .collection-art-screen { animation-play-state: running; }
.collection-art .art-a { width: 78%; left: 2%; top: 16%; --angle: -10deg; z-index: 3; }
.collection-art .art-b { width: 66%; right: 0; top: 3%; --angle: 8deg; z-index: 1; animation-delay: -3s; }
.collection-art .art-c { width: 71%; right: 0; bottom: 7%; --angle: 7deg; z-index: 4; animation-delay: -6s; }
.collection-art .art-d { width: 58%; left: 0; bottom: 3%; --angle: -6deg; z-index: 2; animation-delay: -1.5s; }
@keyframes gallery-drift { 0%,100% { transform: translateY(0) rotate(var(--angle)); } 50% { transform: translateY(-9px) rotate(calc(var(--angle) + 1deg)); } }

/* Each tool keeps its own artwork and accent, with room for the teaching material. */
.tools-body { grid-template-columns: 172px minmax(0,1fr); gap: 2.25rem; margin-top: 5rem; }
.tools-rail { padding: 1.25rem .9rem 1rem; border: 1px solid #afc9e221; border-radius: 12px; background: #292837d9; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 18px 50px #030b1438; }
.tools-rail.is-long .rail-name { font-size: .86rem; line-height: 1.4; }
.tools-rail.is-long .rail-item { padding-top: .7rem; padding-bottom: .7rem; }
.rail-item { margin-left: -.35rem; padding-left: .35rem; }
.rail-item.is-active { background: linear-gradient(90deg,rgba(var(--a-rgb),.22),transparent); }
.rail-up { font-size: 8px; letter-spacing: .09em; }
.entries { gap: 5.5rem; }
#tools .entry { position: relative; isolation: isolate; grid-template-columns: minmax(0,1.14fr) minmax(0,.92fr); gap: 2.75rem; padding: 2.5rem; border: 1px solid rgba(var(--a-rgb),.31); border-radius: 16px; background: linear-gradient(135deg,rgba(var(--world-rgb,49,37,49),.95),rgb(var(--world-rgb,49,37,49))); box-shadow: 0 35px 90px -50px #000c,0 0 70px -30px rgba(var(--a-rgb),.22); scroll-margin-top: 112px; }
#tools .entry::before { content: ''; position: absolute; inset: 0; z-index: -2; border-radius: inherit; background-image: linear-gradient(90deg,rgba(var(--world-rgb),.14),rgb(var(--world-rgb)) 72%),var(--chapter-image); background-size: cover; background-position: center; opacity: .8; filter: none; clip-path: inset(0 round 16px); pointer-events: none; }
#tools .entry::after { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; background: radial-gradient(ellipse at 0 0,rgba(var(--a-rgb),.16),transparent 65%); }
#tools .entry .entry-media { grid-column: 1; grid-row: 1; position: sticky; top: 125px; width: 100%; max-width: none; border-radius: 7px; border: 1px solid rgba(var(--a-rgb),.38); box-shadow: 0 28px 75px #0007,0 0 45px -15px rgba(var(--a-rgb),.4); }
#tools .entry .entry-body { grid-column: 2; grid-row: 1; padding: .2rem 0; }
#tools .entry:nth-child(even) { grid-template-columns: minmax(0,.92fr) minmax(0,1.14fr); }
#tools .entry:nth-child(even) .entry-media { grid-column: 2; }
#tools .entry:nth-child(even) .entry-body { grid-column: 1; }
.entry .entry-media::after { content: ''; position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; background: radial-gradient(360px circle at var(--light-x,70%) var(--light-y,30%),#e1f2ff24,transparent 65%); transition: opacity .45s; mix-blend-mode: screen; }
.entry .entry-media.is-lit::after { opacity: 1; }
.entry .entry-topline { height: 8px; }
.entry .entry-topline::before { height: 2px; }
.entry .entry-topline::after { display: none; }
.js-reveal #tools .entry.fade-in { transform: none; transition: opacity .85s ease; }
.js-reveal #tools .entry.fade-in.visible { transform: none; }
.entry-kind { font-size: 9px; letter-spacing: .15em; margin-bottom: 1.1rem; }
.entry-name { font-size: clamp(2.1rem,3.2vw,3.4rem); line-height: 1.01; letter-spacing: -.035em; margin-bottom: 1.35rem; }
.entry-decision { font-size: clamp(1.18rem,1.6vw,1.5rem); color: var(--a-ink); border-left-color: var(--a-ink); margin-bottom: 1.5rem; }
.entry-intro p, .entry-body > p { font-size: 15px; line-height: 1.85; color: #e0dacf; }
.entry-intro p { margin-bottom: 1rem; }
.entry-facts { font-size: 11px; line-height: 1.9; color: #cfc4bc; }
.entry .tool-links .entry-editions { color: #d9d0c8; font-size: 12px; line-height: 1.75; padding-left: .85rem; }
.entry .btn-tool { padding: .75rem 1rem; font-size: 12px; border-radius: 6px; }
.entry .btn-tool.solid { background: var(--a-ink); color: #102238; box-shadow: 0 9px 30px -12px rgba(var(--a-rgb),.9); }
.entry .btn-tool.ghost { border-color: rgba(var(--a-rgb),.6); }
.entry-more summary { font-size: 10px; letter-spacing: .1em; line-height: 1.7; }
.entry-more { border-top-color: rgba(var(--a-rgb),.25); }
.on-light .feature { background: #d6e7fa07; border-color: var(--line); color: #c4d2e3; }
.on-light .feature strong { color: #f1f4f8; }
.on-light .exercise-item { background: rgba(var(--a-rgb),.12); border-radius: 7px; }
.on-light .exercise-item-label { color: #edf1f7; font-size: 13px; }
.exercise-item-chapter { font-size: 9px; }
.coverage-disclosure { background: linear-gradient(120deg,#d8e6fa08,#18324c2b); border-color: #bbd6ed26; box-shadow: 0 24px 70px -50px #000a; }
.coverage-disclosure > summary { padding: 1.3rem 1.6rem; }
.ci-curve path:first-child { stroke: #edb383; }
.ci-curve path:last-child { stroke: #8dc2e9; }

/* The chapter change uses the existing painted wetland, with a slow camera-like drift. */
.chapter-break { min-height: 380px; padding: 8rem 2rem; background: #172b3d; }
.chapter-break::before { content: ''; position: absolute; inset: -8%; z-index: 0; pointer-events: none; background: linear-gradient(90deg,#31332bba,#31332b21 50%,#31332ba8),linear-gradient(180deg,#3d303166,transparent 50%,#203b30a8),url('chapter-wetlands.jpg') 50% 61% / cover; transform: translate3d(0,var(--chapter-shift,0px),0) scale(1.035); }
.chapter-break-text { font-size: clamp(3.3rem,7.5vw,7.8rem); color: #fff0d4; letter-spacing: -.035em; text-shadow: 0 8px 50px #0008; }
.chapter-curve { opacity: .65; height: 50%; }
.chapter-break-light.l1 { background: radial-gradient(circle,#95c5df3b,transparent 65%); }
.chapter-break-light.l2 { background: radial-gradient(circle,#e1bb7e47,transparent 65%); }

/* What else: a constellation of possible teaching applications. */
#possibilities { padding: 7.5rem clamp(24px,5vw,84px) 8rem; background: radial-gradient(ellipse at 0 75%,#a7794f33,transparent 65%),#203b30; }
#possibilities .section-inner-wide { max-width: 1360px; }
#possibilities::before { background: linear-gradient(90deg,#203b30f5 5%,#203b30e6 40%,#203b3059 100%),linear-gradient(180deg,#203b3055,transparent 40%,#203b30 100%),url("worlds/laboratory.jpg") right top / auto 850px no-repeat; -webkit-mask-image: none; mask-image: none; }
.possibilities-intro { max-width: 940px; margin-bottom: 4rem; }
.possibilities-intro h2 { font-size: clamp(3rem,6vw,5.5rem); line-height: 1.02; letter-spacing: -.04em; max-width: 950px; }
.possibilities-intro .lead { max-width: 750px; color: #d5dfeb; font-size: 18px; line-height: 1.8; }
.poss-net path { stroke: #b7d3e930; }
.poss-node { fill: #dfc291; }
.possibilities-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1.15rem; }
.possibility { overflow: hidden; border: 1px solid #bbcfec26; border-top: 2px solid var(--p); border-radius: 11px; padding: 1.8rem 1.4rem 2rem; background: linear-gradient(145deg,#365548c9,#1d3329ed); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 20px 50px #020a161f; }
.possibility::before { content: ''; pointer-events: none; position: absolute; inset: 0; background: radial-gradient(340px circle at var(--light-x,70%) var(--light-y,20%),var(--p-pale),transparent 75%); opacity: .55; transition: opacity .4s; }
.possibility:hover { border-color: var(--p-ink); border-top-color: var(--p-ink); box-shadow: 0 26px 65px #030d2459,0 0 28px -14px var(--p); transform: translateY(-7px); }
.possibility:hover::before { opacity: 1; }
.js-reveal .possibility.visible:hover { transform: translateY(-7px); }
.possibility > * { position: relative; }
.possibility h4 { font-family: var(--serif); color: #f1eada; font-size: 23px; font-weight: 400; line-height: 1.2; letter-spacing: -.02em; margin: 1.4rem 0 .8rem; }
.possibility p { color: #d4dbcb; font-size: 13px; line-height: 1.8; }
.possibility-icon { height: 52px; width: 52px; border: 1px solid var(--p-pale); background: var(--p-pale); color: var(--p-ink); border-radius: 13px; box-shadow: 0 0 30px -15px var(--p); }
.possibility-icon svg { width: 25px; height: 25px; }
.possibility.is-invite { background: radial-gradient(ellipse at 100% 0,#ddc18a22,transparent 70%),linear-gradient(135deg,#65513c,#3c3a2c); border-color: #e7c58b66; border-top-color: #e7c58b; }
.possibility.is-invite h4 { color: #ffe6bc; }
.possibility.is-invite p { color: #d7e1eb; }
.possibility.is-invite .possibility-icon { color: #ffe6bc; background: #edcd9917; border-color: #e7c58b40; }
.invite-cta { color: #f1d0a0; font-size: 10px; margin-top: 1.4rem; }

/* About is given the same scale and light as the collection. */
#about { padding: 8rem clamp(24px,6vw,100px); background: radial-gradient(ellipse at 8% 10%,#c5936d40,transparent 68%),linear-gradient(120deg,#593c40,#332634); border-top: 1px solid #e5bd8d40; }
#about::before { background: linear-gradient(90deg,#593c407a,#332634f5 65%),url("worlds/dawn-city.png") center / cover; opacity: .3; -webkit-mask-image: none; mask-image: none; }
#about .section-inner { max-width: 1200px; }
.about-grid { grid-template-columns: minmax(0,.9fr) minmax(0,1.4fr); gap: 6rem; }
.about-label::before { left: 18px; top: 18px; width: min(100%,350px); border-color: #e5c393; opacity: .6; border-radius: 8px; }
.on-light .about-photo-wrap { width: min(100%,350px); border: 1px solid #d5e1ef4a; border-radius: 8px; box-shadow: 0 35px 80px #020b175c,0 0 65px -20px #88b6d55c; position: relative; }
.about-photo-wrap::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(135deg,#f3d5a017,transparent 60%); }
.about-label h2 { color: #f5e6cd; font-size: clamp(2.6rem,4.1vw,4.1rem); line-height: 1.02; }
.about-body { padding-top: .4rem; }
.about-body p { color: #e1d4ce; font-size: 16px; line-height: 1.9; margin-bottom: 1.6rem; }
.about-body p.lead { font-size: 20px; color: #f5e9dc; line-height: 1.75; }
#about .about-body a { color: #a5d1ee !important; border-bottom-color: #a5d1ee55 !important; }
.about-linkedin { padding: 11px 0; }

/* A closing scene for enquiries, with a warm, well-lit form. */
#contact { padding: 8rem clamp(24px,6vw,100px); isolation: isolate; overflow: hidden; background: radial-gradient(ellipse at 10% 10%,#b96e744a,transparent 55%),radial-gradient(ellipse at 90% 65%,#517f8e4d,transparent 60%),linear-gradient(135deg,#3b243c,#251f38 62%,#263c40); border-top: 0; }
#contact::before { background: radial-gradient(ellipse at 28% 30%,#efc18226,transparent 42%),radial-gradient(ellipse at 80% 0,#bd9de71c,transparent 55%); background-size: auto; -webkit-mask-image: none; mask-image: none; }
#contact .section-inner { max-width: 1300px; }
.contact-grid { grid-template-columns: minmax(0,1fr) minmax(0,1.08fr); gap: 5.5rem; }
.contact-intro h2 { font-size: clamp(3.1rem,4.9vw,5.2rem); line-height: 1.02; letter-spacing: -.045em; color: #ffe1bf; margin-bottom: 1.6rem; }
.contact-intro > p.lead { color: #d0dce8; font-size: 18px; line-height: 1.8; }
.contact-routes { gap: 1rem; margin-top: 2rem; }
.route { border-radius: 8px; background: #e7d8fa09; border-color: #a9c8e72b; border-left-color: #97c8eb; padding: 1.4rem; box-shadow: none; }
.route + .route { border-left-color: #c6b5e9; }
.route h3 { color: #f4ead9; font-family: var(--serif); font-weight: 400; font-size: 24px; }
.contact-intro .route p { font-size: 13px; color: #c5d2e2; line-height: 1.85; margin-bottom: 1.1rem; }
.btn-route { border-color: #a1c4df66; color: #b5d6ed; border-radius: 5px; font-size: 12px; padding: .65rem 1rem; }
.btn-route:hover { background: #9bc4eb14; border-color: #c0dbef; }
.on-light #contact-form { position: relative; scroll-margin-top: 100px; padding: 2.5rem; border: 1px solid #e1c39859; border-radius: 13px; background: linear-gradient(145deg,#533a50d9,#29283ded); box-shadow: 0 38px 100px #020a194d,0 0 65px -30px #ddb0784d; gap: 1.65rem; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
#contact-form::before { content: ''; pointer-events: none; position: absolute; top: 0; left: 15%; right: 15%; height: 1px; background: linear-gradient(90deg,transparent,#f0d0a2,transparent); box-shadow: 0 0 24px #edc59480; }
#contact-form label { color: #d0dce9; font-size: 10px; letter-spacing: .15em; }
#contact-form input, #contact-form select, #contact-form textarea { font-size: 15px; background-color: #050f1c18; padding: .75rem .15rem .85rem; color: #edf3f8; border-bottom-color: #c4d6e54a; }
#contact-form input::placeholder, #contact-form textarea::placeholder { color: #a4b7ca; }
#contact-form input:focus, #contact-form select:focus, #contact-form textarea:focus { border-bottom-color: #e8c698; box-shadow: 0 1px 0 #e8c698; }
#contact-form textarea { min-height: 155px; }
#contact-form select { padding-right: 24px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c9dceb' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); }
#contact-form .btn-submit { background: linear-gradient(135deg,#f0d3a7,#d9b87f); color: #14273b; width: 100%; border-radius: 6px; box-shadow: 0 14px 35px -15px #e5b77b6b; font-size: 14px; }
#contact-form .btn-submit:hover { background: linear-gradient(135deg,#ffe4bb,#eac78e); }

footer { background: linear-gradient(120deg,#2b2435,#23363b); padding: 4rem 2rem 3rem; border-image: linear-gradient(90deg,transparent,#d9b87f80,transparent) 1; }
.footer-tagline { font-size: clamp(1.55rem,3vw,2.5rem); color: #e1c69f; margin-bottom: 1.4rem; }
footer p { color: #9eafc2; font-size: 9px; line-height: 1.8; }
#pageDust { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; opacity: .7; }
#pageDust[hidden] { display: none; }

/* Each tool opens into its own painted world, rather than a repeat of one blue panel. */
#tool-simulation { --world-rgb: 65,43,43; }
#tool-fetp { --world-rgb: 35,59,46; }
#tool-water { --world-rgb: 31,57,61; }
#tool-deadend { --world-rgb: 61,48,42; }
#tool-outbreaks { --world-rgb: 59,48,56; }
#tool-block404 { --world-rgb: 65,49,35; }
#tool-curve { --world-rgb: 57,43,62; }
#tool-exercises { --world-rgb: 48,48,60; }
#tool-ipc { --world-rgb: 36,59,56; }
#tool-diplomacy, #tool-vomid { --world-rgb: 59,40,57; }
#tools .entry:nth-child(even)::before { background-image: linear-gradient(270deg,rgba(var(--world-rgb),.14),rgb(var(--world-rgb)) 72%),var(--chapter-image); }
.entry-name { color: #ffebd0; }
.entry .entry-media { outline: 5px solid #e7bc8a08; outline-offset: 7px; }
.collection-halo { background: radial-gradient(ellipse at 30% 40%,#edae6f61,transparent 60%),radial-gradient(ellipse at 70% 70%,#c997d759,transparent 65%); }
.on-light .feature { background: #ecd9bd09; }
.on-light .feature strong { color: #fff0de; }
.coverage-disclosure { background: linear-gradient(120deg,#7453673d,#302c3cbd); border-color: #ebc3a440; }

/* An existing panoramic illustration joins the copper portrait chapter to the closing scene. */
.world-panorama { position: relative; overflow: hidden; height: clamp(220px,24vw,430px); background: #63444a; }
.world-panorama img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 65%; }
.world-panorama::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg,#49313c55,transparent 25%,transparent 72%,#3b243c99); }

/* Beanie waves beside the heading, with a little orbit and crown light. */
.contact-intro { display: grid; grid-template-columns: minmax(0,1fr) clamp(140px,13vw,220px); column-gap: .5rem; align-content: start; }
.contact-intro > .eyebrow { grid-column: 1 / -1; grid-row: 1; }
.contact-intro > h2 { grid-column: 1; grid-row: 2; align-self: center; }
.contact-intro > .lead { grid-column: 1 / -1; grid-row: 3; }
.contact-intro > .contact-routes { grid-column: 1 / -1; grid-row: 4; }
.contact-beanie { grid-column: 2; grid-row: 2; position: relative; align-self: center; width: 100%; aspect-ratio: .98; isolation: isolate; margin-bottom: 1rem; transform: rotate(var(--beanie-lean,0deg)); transition: transform .7s ease; }
.beanie-halo { position: absolute; inset: -12%; border-radius: 50%; background: radial-gradient(ellipse,#e5bc7861,transparent 62%); filter: blur(16px); z-index: -1; }
.contact-beanie::before, .contact-beanie::after { content: ''; position: absolute; inset: 12% -8% 8%; border: 1px solid #eac4974a; border-radius: 50%; transform: rotate(-27deg); z-index: -1; }
.contact-beanie::after { inset: 6% 14% -3%; border-color: #b3dce643; transform: rotate(23deg); }
.beanie-float { height: 100%; animation: beanie-float 6s ease-in-out infinite; animation-play-state: paused; }
.contact-beanie img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 18px 20px #0d0b2255); -webkit-mask-image: linear-gradient(#000 90%,transparent); mask-image: linear-gradient(#000 90%,transparent); transition: filter .6s; }
#contact.is-in-view .beanie-float { animation-play-state: running; }
#contact.is-writing .contact-beanie img { filter: drop-shadow(0 0 16px #f6d18d66) drop-shadow(0 18px 20px #0d0b2255); }
.beanie-spark { position: absolute; width: 8px; height: 8px; background: #ffe5a9; filter: drop-shadow(0 0 5px #ffdba8); clip-path: polygon(50% 0,60% 38%,100% 50%,60% 62%,50% 100%,40% 62%,0 50%,40% 38%); animation: crown-spark 3.5s ease-in-out infinite; animation-play-state: paused; }
.beanie-spark.s1 { left: 8%; top: 7%; }
.beanie-spark.s2 { right: 4%; top: 20%; animation-delay: -1.2s; width: 5px; height: 5px; }
.beanie-spark.s3 { left: -4%; top: 55%; animation-delay: -2.4s; width: 6px; height: 6px; }
#contact.is-in-view .beanie-spark { animation-play-state: running; }
@keyframes beanie-float { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }
@keyframes crown-spark { 0%,100% { opacity: .2; transform: scale(.6); } 50% { opacity: 1; transform: scale(1.2); } }

/* Two illuminated epidemic curves and slowly drifting, illustrated microbe silhouettes. */
.contact-atmosphere { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.contact-ribbons { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; opacity: .75; }
.contact-ribbons path { fill: none; vector-effect: non-scaling-stroke; }
.contact-ribbons .peak { stroke: #f2b187; }
.contact-ribbons .flat { stroke: #a6dcd7; }
.contact-ribbons .curve { stroke-width: 1.5; opacity: .62; }
.contact-ribbons .glow { stroke-width: 19; filter: blur(14px); opacity: .25; }
.contact-ribbons .comet { stroke-width: 3; stroke-dasharray: 2 160 14 420 3 270; filter: drop-shadow(0 0 6px currentColor); animation: curve-stream 22s linear infinite; animation-play-state: paused; }
.contact-ribbons .comet.peak { stroke: #ffe1b8; color: #f2b187; }
.contact-ribbons .comet.flat { stroke: #dbfff8; color: #9ad9e6; animation-direction: reverse; animation-duration: 29s; }
#contact.is-in-view .contact-ribbons .comet { animation-play-state: running; }
@keyframes curve-stream { to { stroke-dashoffset: -869; } }
.contact-virus { position: absolute; width: var(--size); height: var(--size); color: var(--virus-colour); opacity: var(--opacity); filter: drop-shadow(0 0 18px currentColor); animation: microbe-drift var(--duration) ease-in-out infinite alternate; animation-play-state: paused; }
.contact-virus path, .contact-virus circle { vector-effect: non-scaling-stroke; }
.contact-virus.v1 { --size: 240px; --virus-colour: #d5a2cb; --opacity: .16; --duration: 24s; left: -80px; top: 7%; filter: blur(1.5px) drop-shadow(0 0 30px #bd8fc0); }
.contact-virus.v2 { --size: 90px; --virus-colour: #f2ca8e; --opacity: .26; --duration: 19s; left: 39%; top: 5%; animation-delay: -8s; }
.contact-virus.v3 { --size: 170px; --virus-colour: #9edcd7; --opacity: .18; --duration: 27s; right: -40px; top: 37%; animation-delay: -14s; }
.contact-virus.v4 { --size: 68px; --virus-colour: #e2bbf0; --opacity: .28; --duration: 21s; left: 46%; bottom: 13%; animation-delay: -5s; }
.contact-virus.v5 { --size: 115px; --virus-colour: #eeb387; --opacity: .16; --duration: 23s; left: 4%; bottom: 5%; animation-delay: -17s; }
.contact-virus.v6 { --size: 48px; --virus-colour: #d2f4d2; --opacity: .24; --duration: 18s; right: 9%; top: 6%; animation-delay: -11s; }
#contact.is-in-view .contact-virus { animation-play-state: running; }
@keyframes microbe-drift { from { transform: translate3d(-8px,8px,0) rotate(-13deg); } to { transform: translate3d(12px,-20px,0) rotate(18deg); } }
#contact-form::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(400px circle at var(--light-x,70%) var(--light-y,20%),#f6d2b314,transparent 70%); opacity: 0; transition: opacity .5s; }
#contact-form.is-lit::after { opacity: 1; }
#contact-form input, #contact-form textarea, #contact-form select { background-color: #130f211c; }
#contact-form input::placeholder, #contact-form textarea::placeholder { color: #c8b9c9; }
#contact-form label { color: #e6cfdb; }

@media (max-width:1359px) {
  .tools-body { display: block; --pad: clamp(24px,4vw,76px); }
  .tools-rail { position: sticky; top: 64px; z-index: 25; margin: 0 calc(-1 * var(--pad)) 2.5rem; padding: 0 var(--pad); max-height: none; border-radius: 0; border-left: 0; border-right: 0; background: #302936ee; }
  .tools-rail-title, .rail-kind, .rail-track, .rail-up { display: none; }
  .rail-list { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding: .7rem 0; border: 0; }
  .rail-list li { flex: none; border: 0; }
  .tools-rail.is-long .rail-item { margin: 0; padding: .5rem .8rem; border: 1px solid #b6cde933; border-radius: 999px; background: #d0e1fa07; white-space: nowrap; }
  .tools-rail.is-long .rail-name { font-family: var(--mono); font-size: 9px; line-height: 1.5; letter-spacing: .08em; text-transform: uppercase; }
  .rail-item.is-active { border-color: var(--a-ink) !important; background: rgba(var(--a-rgb),.2) !important; }
  .rail-item.is-active .rail-name, .rail-item.is-active .rail-name::before { color: var(--a-ink); }
  #tools .entry { padding: 2rem; }
}
@media (max-width:1100px) {
  .collection-art { height: 500px; }
  .tools-intro { gap: 2.7rem; }
  .possibilities-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .about-grid, .contact-grid { gap: 3rem; }
}
@media (max-width:900px) {
  .tools-intro { grid-template-columns: 1fr; }
  .tools-intro-prose { max-width: 740px; grid-column: 1; grid-row: 1; }
  .collection-art { grid-column: 1; grid-row: 2; width: 100%; max-width: 630px; height: 500px; margin: 0 auto; }
  .tools-intro .pullquote { grid-column: 1; grid-row: 3; margin-top: 0; }
  .tools-intro h2 { font-size: clamp(3.4rem,8vw,5rem); }
  #tools .entry, #tools .entry:nth-child(even) { grid-template-columns: 1fr; gap: 2.2rem; }
  #tools .entry .entry-media, #tools .entry:nth-child(even) .entry-media { grid-column: 1; grid-row: 1; position: relative; top: auto; max-width: none; }
  #tools .entry .entry-body, #tools .entry:nth-child(even) .entry-body { grid-column: 1; grid-row: 2; }
  .entry-name { font-size: clamp(2.5rem,5.8vw,3.8rem); max-width: 700px; }
  .entry-intro p { font-size: 16px; }
  .about-grid { grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); }
  .about-body p.lead { font-size: 18px; }
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .contact-intro { max-width: 740px; }
  .contact-intro h2 { font-size: clamp(3.4rem,6.8vw,5.2rem); max-width: 640px; }
}
@media (max-width:768px) {
  .statement-inner { padding: 4rem 1.5rem; gap: 2rem; }
  .stat { padding: 1.1rem 1.3rem; }
  #tools, #possibilities, #about, #contact { padding-left: 24px; padding-right: 24px; padding-top: 4.5rem; padding-bottom: 5rem; }
  .tools-intro { gap: 2rem; margin-bottom: 3rem; }
  .tools-intro h2 { font-size: clamp(2.8rem,11vw,4.4rem); margin-bottom: 1.6rem; }
  .tools-intro-prose p, .tools-intro-prose p.lead { font-size: 15px; line-height: 1.85; }
  .collection-art { height: 380px; }
  .tools-intro .pullquote { padding: 2rem .5rem; }
  .tools-intro .pullquote p { font-size: 1.7rem; line-height: 1.4; }
  .tools-body { margin-top: 3rem; --pad: 24px; }
  .tools-rail { top: 60px; }
  .entries { gap: 3rem; }
  #tools .entry { padding: 1.25rem; border-radius: 12px; gap: 1.6rem; scroll-margin-top: 120px; }
  .entry-name { font-size: clamp(2rem,8vw,2.8rem); margin-bottom: 1.1rem; }
  .entry-kind { font-size: 8px; letter-spacing: .12em; }
  .entry-decision { font-size: 1.2rem; }
  .entry-intro p, .entry-body > p { font-size: 14.5px; }
  .entry-facts { font-size: 10.5px; }
  .entry-more summary { font-size: 10px; letter-spacing: .06em; }
  .coverage-disclosure > summary { padding: 1rem; }
  .coverage-summary-hint { font-size: 8px; }
  .curve-index-title { font-size: 9px; letter-spacing: .1em; }
  .chapter-break { min-height: 300px; padding: 6rem 1.5rem; }
  .chapter-break-text { font-size: clamp(3rem,10vw,4.8rem); }
  .possibilities-intro h2 { font-size: clamp(2.7rem,10vw,4rem); }
  .possibilities-intro .lead { font-size: 16px; }
  .possibilities-grid { grid-template-columns: 1fr; gap: 1rem; }
  .possibility { padding: 1.6rem; }
  .possibility h4 { font-size: 25px; margin-top: 1rem; }
  .possibility p { font-size: 14px; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-label { position: relative; top: auto; }
  .on-light .about-photo-wrap { width: min(85%,340px); }
  .about-label::before { width: min(85%,340px); }
  .about-label h2 { font-size: 3.1rem; }
  .about-body p { font-size: 15px; }
  .about-body p.lead { font-size: 18px; }
  .contact-intro h2 { font-size: clamp(2.5rem,8.5vw,3.8rem); }
  .on-light #contact-form { padding: 1.5rem; border-radius: 10px; }
  #contact-form .form-row { grid-template-columns: 1fr; gap: 1.65rem; }
  #contact-form input, #contact-form select, #contact-form textarea { font-size: 16px; }
  #pageDust { opacity: .55; }
  .world-panorama { height: 230px; }
  .world-panorama img { object-position: 85% 70%; }
  .contact-intro { grid-template-columns: minmax(0,1fr) 130px; column-gap: .25rem; }
  .contact-beanie { margin-bottom: .5rem; }
  .contact-virus.v1 { --size: 140px; left: -70px; }
  .contact-virus.v2 { --size: 60px; left: 60%; }
  .contact-virus.v3 { --size: 110px; right: -50px; }
  .contact-virus.v4 { --size: 55px; }
  .contact-ribbons { opacity: .5; }
}
@media (max-width:420px) {
  .collection-art { height: 300px; }
  #tools, #possibilities, #about, #contact { padding-left: 20px; padding-right: 20px; }
  .tools-body { --pad: 20px; }
  #tools .entry { padding: 1rem; }
  .entry .btn-tool { padding: .7rem .8rem; font-size: 11px; }
  .contact-intro { grid-template-columns: minmax(0,1fr) 110px; }
  .contact-intro h2 { font-size: 2.5rem; }
}
@media (prefers-reduced-motion:reduce) {
  .collection-art, .collection-art-screen, .chapter-break::before { animation: none !important; transition: none !important; }
  .collection-art { transform: none; }
  .chapter-break::before { transform: scale(1.035); }
  #pageDust { display: none; }
  .possibility:hover { transform: none; }
  .js-reveal .possibility.visible:hover { transform: none; }
  .beanie-float, .beanie-spark, .contact-ribbons .comet, .contact-virus { animation: none !important; }
  .contact-beanie { transform: none; transition: none; }
}

/* On stacked layouts the painting fades before the teaching text begins. */
@media (max-width:900px) {
  #tools .entry::before, #tools .entry:nth-child(even)::before {
    background-image: linear-gradient(180deg,rgba(var(--world-rgb),.18),rgba(var(--world-rgb),.90) 260px,rgb(var(--world-rgb)) 420px),var(--chapter-image);
  }
}
/* Tiny translucent pointer symbols, always transparent to clicks and keyboard input. */
#pointerMicrobes { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 180; pointer-events: none; }
#pointerMicrobes[hidden] { display: none; }
@media (prefers-reduced-motion:reduce), (pointer:coarse) { #pointerMicrobes { display: none; } }

/* Retain the warm, faded About treatment over a sunny river-and-meadow painting. */
#about::before { background-image: linear-gradient(90deg,#593c407a,#332634f5 65%),url('worlds/about-meadow.jpg'); }
/* v49: give the tool names comfortable type and enough width for their longer titles. */
@media (min-width:1360px) {
  .tools-body { grid-template-columns: 216px minmax(0,1fr); gap: 2rem; }
  .tools-rail.is-long .rail-name { font-size: 1.05rem; line-height: 1.35; }
  .tools-rail .rail-name::before { font-size: .65rem; }
  .tools-rail-title { font-size: 11px; letter-spacing: .16em; }
  .tools-rail .rail-up { font-size: 9.5px; line-height: 1.6; }
}
@media (max-width:1359px) {
  .tools-rail.is-long .rail-name { font-size: 12px; letter-spacing: .05em; }
  .tools-rail .rail-name::before { font-size: 10px; }
  #tools .entry { scroll-margin-top: 144px; }
}
@media (max-width:768px) {
  #tools .entry { scroll-margin-top: 136px; }
}
