/* Queering Law and Artificial Intelligence — launch site
   Base: the Routledge cover (lagoon + chartreuse painted texture, slate band, white field).
   On top: a full queer spectrum, robots, and the binary breaking into colour. */

@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("../fonts/eb-garamond-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("../fonts/eb-garamond-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("../fonts/eb-garamond-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("../fonts/eb-garamond-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  /* cover */
  --lagoon: #35b3c3;
  --lagoon-soft: #bfe6eb;
  --mist: #eaf6f8;
  --chartreuse: #d3cd3a;
  --slate: #24444f;
  --deep: #102830;
  --ink: #1b2d33;
  --muted: #4c656d;
  --white: #ffffff;
  --rule: #cfe3e7;

  /* spectrum */
  --r: #ef4053;
  --o: #f7893b;
  --y: #f9d443;
  --g: #3fbf74;
  --b: #2f7fe3;
  --v: #8b52dc;
  --pink: #f6a6c8;
  --sky: #74cdea;
  --rainbow: linear-gradient(90deg, var(--r), var(--o), var(--y), var(--g), var(--b), var(--v));
  --rainbow-v: linear-gradient(180deg, var(--r), var(--o), var(--y), var(--g), var(--b), var(--v));

  /* the three strategies get their own colour */
  --design: #2f7fe3;
  --participation: #e8467c;
  --education: #f2a52a;

  /* book scale: light = low, medium = moderate, dark = high */
  --lvl-low: #e3f3f5;
  --lvl-mod: #63c2cf;
  --lvl-high: #24444f;

  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
  --measure: 66ch;
  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--serif); font-size: 1.1875rem; line-height: 1.6; color: var(--ink); background: var(--white); font-kerning: normal; }
img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--slate); text-decoration-color: var(--participation); text-decoration-thickness: 2px; text-underline-offset: .2em; }
a:hover { color: var(--participation); }
:focus-visible { outline: 3px solid var(--y); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--y); color: var(--deep); padding: .5rem 1rem; z-index: 20; }
.skip:focus { left: 1rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Masthead: painted strip, rainbow seam, slate band ---------- */
.strip { height: 46px; background: var(--lagoon) url("../img/texture-top.jpg") center 35% / cover no-repeat; }
.seam { height: 8px; background: var(--rainbow); }
.band { background: var(--deep); color: var(--white); }
.band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; min-height: 68px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--white); text-decoration: none; }
.brand svg { width: 38px; height: 38px; flex: none; }
.brand b { font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: .03em; text-transform: uppercase; line-height: 1; }
.brand i { display: block; font-size: .98rem; color: var(--lagoon-soft); line-height: 1.2; }
.brand:hover { color: var(--white); }
.nav { display: flex; gap: .3rem; flex-wrap: wrap; margin: 0; padding: .55rem 0; list-style: none; }
.nav a { font-family: var(--display); font-weight: 600; font-size: 1.12rem; letter-spacing: .02em; color: var(--white); text-decoration: none; padding: .35rem .75rem; border-radius: 999px; display: block; }
.nav li:nth-child(1) a:hover, .nav li:nth-child(1) a[aria-current="page"] { background: var(--r); }
.nav li:nth-child(2) a:hover, .nav li:nth-child(2) a[aria-current="page"] { background: var(--o); color: var(--deep); }
.nav li:nth-child(3) a:hover, .nav li:nth-child(3) a[aria-current="page"] { background: var(--y); color: var(--deep); }
.nav li:nth-child(4) a:hover, .nav li:nth-child(4) a[aria-current="page"] { background: var(--g); color: var(--deep); }
.nav li:nth-child(5) a:hover, .nav li:nth-child(5) a[aria-current="page"] { background: var(--b); }

/* ---------- Type ---------- */
h1, h2 { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; line-height: .98; color: var(--deep); margin: 0 0 .55em; }
h1 { font-size: clamp(2.8rem, 6.6vw, 5.2rem); }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
h3 { font-family: var(--display); font-weight: 600; font-size: 1.5rem; line-height: 1.15; margin: 0 0 .4em; color: var(--deep); }
p { margin: 0 0 1em; max-width: var(--measure); }
.lede { font-size: 1.42rem; line-height: 1.5; max-width: 58ch; }
.subtitle { font-family: var(--display); font-weight: 600; text-transform: uppercase; font-size: clamp(1.25rem, 2.4vw, 1.9rem); letter-spacing: .03em; line-height: 1.12; }
.small { font-size: 1rem; color: var(--muted); }
.underline-rainbow { background: var(--rainbow) left bottom / 100% .16em no-repeat; padding-bottom: .08em; }

/* ---------- Sections ---------- */
.section { padding: clamp(3.2rem, 7vw, 5.5rem) 0; position: relative; }
.section--mist { background: var(--mist); }
.section--deep { background: var(--deep); color: var(--white); }
.section--deep h2, .section--deep h3 { color: var(--white); }
.section--deep a { color: var(--y); }
.section--tight { padding-top: 0; }

/* page heads: colour field + robot */
.page-head { position: relative; overflow: hidden; padding: clamp(2.5rem, 6vw, 4.5rem) 0; color: var(--deep); }
.page-head .wrap { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr); gap: 2rem; align-items: center; position: relative; z-index: 1; }
.page-head p { font-size: 1.32rem; }
.page-head .robot { width: min(100%, 290px); justify-self: center; }
.page-head--book { background: radial-gradient(circle at 85% 30%, var(--y) 0 18%, transparent 18.2%), var(--o); }
.page-head--tool { background: radial-gradient(circle at 82% 55%, var(--pink) 0 22%, transparent 22.2%), var(--lagoon); }
.page-head--author { background: radial-gradient(circle at 84% 40%, var(--sky) 0 20%, transparent 20.2%), var(--g); }
.page-head--project { background: radial-gradient(circle at 84% 45%, var(--y) 0 20%, transparent 20.2%), var(--v); color: var(--white); }
.page-head--project h1 { color: var(--white); }
.page-head .binary { position: absolute; inset: 0; z-index: 0; font-family: var(--display); font-weight: 700; font-size: 1.4rem; line-height: 1.5; letter-spacing: .35em; color: rgba(16, 40, 48, .06); word-break: break-all; padding: .5rem; pointer-events: none; user-select: none; }
.page-head--project .binary { color: rgba(255,255,255,.1); }

/* ---------- Home hero ---------- */
.hero { background: var(--deep); color: var(--white); overflow: hidden; position: relative; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding-top: clamp(2.5rem, 5vw, 4rem); padding-bottom: 0; }
.hero h1 { color: var(--white); margin-bottom: .2em; }
.hero h1 .glitch { display: block; background: var(--rainbow); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .subtitle { color: var(--lagoon-soft); margin: 0 0 1.4rem; }
.hero .author { font-size: 1.55rem; margin: 0 0 .4rem; }
.hero .meta { font-style: italic; color: var(--lagoon-soft); margin: 0 0 1.6rem; }
.hero-copy { padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.stage { position: relative; aspect-ratio: 640 / 560; align-self: end; }
.stage .arcs { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage .cover { position: absolute; left: 47%; bottom: 8%; width: 46%; transform: translateX(-50%) rotate(-3deg); box-shadow: 0 18px 40px rgba(0,0,0,.45); border: 5px solid var(--white); }
.stage .robot { position: absolute; width: 38%; right: -4%; bottom: 0; }
.stage .tag-binary { position: absolute; left: 2%; top: 22%; }
.arcs path { fill: none; stroke-width: 26; stroke-linecap: butt; stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: draw 1.6s cubic-bezier(.2,.7,.2,1) forwards; }
.arcs path:nth-child(2) { animation-delay: .08s; } .arcs path:nth-child(3) { animation-delay: .16s; }
.arcs path:nth-child(4) { animation-delay: .24s; } .arcs path:nth-child(5) { animation-delay: .32s; }
.arcs path:nth-child(6) { animation-delay: .40s; } .arcs path:nth-child(7) { animation-delay: .48s; }
.arcs path:nth-child(8) { animation-delay: .56s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.binary-card { background: var(--white); color: var(--deep); font-family: var(--display); font-weight: 600; padding: .55rem .8rem; transform: rotate(-6deg); box-shadow: 6px 6px 0 var(--r); font-size: 1.05rem; line-height: 1.35; }
.binary-card s { text-decoration-color: var(--r); text-decoration-thickness: 3px; }
.binary-card .row { display: flex; gap: .45rem; align-items: center; }
.binary-card .box { width: .9rem; height: .9rem; border: 2px solid var(--deep); display: inline-block; }

.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0 0; }
.btn { display: inline-block; font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: .02em; padding: .75rem 1.4rem; text-decoration: none; border: 3px solid var(--deep); color: var(--deep); background: var(--white); cursor: pointer; line-height: 1.1; box-shadow: 5px 5px 0 var(--deep); transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--deep); color: var(--deep); }
.btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--deep); }
.btn--y { background: var(--y); }
.btn--pink { background: var(--pink); }
.btn--sky { background: var(--sky); }
.hero .btn { border-color: var(--white); box-shadow: 5px 5px 0 var(--participation); }
.hero .btn:hover { box-shadow: 7px 7px 0 var(--participation); }

/* rainbow ribbon (marquee of key terms) */
.ribbon { background: var(--rainbow); color: var(--deep); overflow: hidden; white-space: nowrap; border-top: 3px solid var(--deep); border-bottom: 3px solid var(--deep); }
.ribbon .track { display: inline-flex; gap: 2.5rem; padding: .7rem 0; animation: slide 38s linear infinite; font-family: var(--display); font-weight: 700; font-size: 1.35rem; text-transform: uppercase; letter-spacing: .04em; }
.ribbon .track span::after { content: "✦"; margin-left: 2.5rem; }
@keyframes slide { to { transform: translateX(-50%); } }

/* facts */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 0; padding: 0; }
.facts div { padding: .9rem 1rem; border: 3px solid var(--deep); background: var(--white); }
.facts div:nth-child(6n+1) { box-shadow: 6px 6px 0 var(--r); }
.facts div:nth-child(6n+2) { box-shadow: 6px 6px 0 var(--o); }
.facts div:nth-child(6n+3) { box-shadow: 6px 6px 0 var(--y); }
.facts div:nth-child(6n+4) { box-shadow: 6px 6px 0 var(--g); }
.facts div:nth-child(6n+5) { box-shadow: 6px 6px 0 var(--b); }
.facts div:nth-child(6n+6) { box-shadow: 6px 6px 0 var(--v); }
.facts dt { font-family: var(--display); font-weight: 600; font-size: 1.02rem; color: var(--muted); }
.facts dd { margin: .1rem 0 0; font-size: 1.12rem; font-variant-numeric: lining-nums; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.split { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }

/* three crises → three strategies */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.trio article { border: 3px solid var(--deep); padding: 1.3rem 1.3rem 1.1rem; background: var(--white); position: relative; }
.trio article::before { content: ""; position: absolute; left: -3px; right: -3px; top: -3px; height: 12px; }
.trio .design::before { background: var(--design); }
.trio .participation::before { background: var(--participation); }
.trio .education::before { background: var(--education); }
.trio h3 { margin-top: .5rem; }
.trio .vs { font-style: italic; color: var(--muted); font-size: 1.02rem; margin: 0 0 .6rem; }
.trio p { font-size: 1.06rem; }
.trio svg { width: 56px; height: 56px; }

/* quotes */
.praise { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.4rem 2rem; align-items: start; }
.praise figure { margin: 0; padding: 2.6rem 1.6rem 1.3rem; background: var(--white); border: 3px solid var(--deep); position: relative; }
.praise figure:nth-child(1) { box-shadow: 10px 10px 0 var(--r); }
.praise figure:nth-child(2) { box-shadow: 10px 10px 0 var(--y); }
.praise figure:nth-child(3) { box-shadow: 10px 10px 0 var(--g); }
.praise figure:nth-child(4) { box-shadow: 10px 10px 0 var(--v); }
.praise figure::before { content: "“"; position: absolute; top: -.28em; left: .3em; font-family: var(--serif); font-size: 5.5rem; line-height: .9; height: .62em; overflow: hidden; color: var(--deep); background: var(--white); padding: 0 .1em; }
.praise blockquote { margin: 0; }
.praise blockquote p { font-size: 1.1rem; }
figcaption { font-family: var(--display); font-weight: 500; font-size: 1.08rem; line-height: 1.3; color: var(--muted); }
figcaption strong { font-weight: 700; color: var(--deep); display: block; font-size: 1.2rem; }
.excerpts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 3.5rem; }
.excerpt { margin: 0; }
.excerpt blockquote { margin: 0 0 .9rem; font-size: 1.42rem; line-height: 1.38; font-style: italic; color: var(--white); }
.excerpt blockquote p { margin: 0; }
.excerpt blockquote::before { content: ""; display: block; width: 3.5rem; height: 8px; background: var(--rainbow); margin-bottom: .9rem; }
.section--deep figcaption { color: var(--lagoon-soft); }
.section--deep figcaption strong { color: var(--white); }

/* ---------- Book structure ---------- */
.part { padding: 2.6rem 0 1rem; }
.part-head { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.6fr); gap: clamp(1.5rem, 4vw, 3.5rem); }
.part-badge { display: inline-block; font-family: var(--display); font-weight: 700; font-size: 1.1rem; letter-spacing: .05em; padding: .25rem .7rem; color: var(--deep); margin-bottom: .7rem; text-transform: uppercase; }
.part--1 .part-badge { background: var(--r); color: var(--white); }
.part--2 .part-badge { background: var(--y); }
.part--3 .part-badge { background: var(--b); color: var(--white); }
.part--1 { border-top: 8px solid var(--r); }
.part--2 { border-top: 8px solid var(--y); }
.part--3 { border-top: 8px solid var(--b); }
.part--0 { border-top: 8px solid var(--deep); }
.part-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
.chapters { list-style: none; margin: 0; padding: 0; }
.chapters li { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr) auto; gap: 0 1rem; padding: 1.1rem 0; border-bottom: 2px dashed var(--rule); }
.chapters .n { font-family: var(--display); font-weight: 700; font-size: 2.6rem; line-height: .9; }
.part--1 .n { color: var(--r); } .part--2 .n { color: var(--o); } .part--3 .n { color: var(--b); } .part--0 .n { color: var(--deep); }
.chapters h3 { font-size: 1.38rem; margin-bottom: .25rem; }
.chapters p { margin: 0; font-size: 1.05rem; }
.chapters .pg { font-family: var(--display); color: var(--muted); font-size: 1rem; white-space: nowrap; }

.cascade { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 3px solid var(--deep); }
.cascade > div { padding: 1.2rem 1.25rem; border-right: 3px solid var(--deep); position: relative; }
.cascade > div:last-child { border-right: 0; }
.cascade .f { background: #fde3e7; } .cascade .t { background: #fff4cf; } .cascade .i { background: #e2eefc; }
.cascade h3 { font-size: 1.45rem; }
.cascade .nature { font-style: italic; color: var(--muted); font-size: 1rem; margin: -.2rem 0 .6rem; }
.cascade ul { margin: 0; padding-left: 1.1rem; font-size: 1.04rem; }
.cascade h4 { font-family: var(--display); font-weight: 600; font-size: 1.1rem; margin: .7rem 0 .2rem; color: var(--slate); }
.cascade > div:not(:last-child)::after { content: ""; position: absolute; right: -19px; top: 1.3rem; width: 32px; height: 32px; background: var(--deep); clip-path: polygon(0 0, 100% 50%, 0 100%); z-index: 1; }

.axioms { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.axioms li { border: 3px solid var(--deep); padding: 1rem 1.1rem; background: var(--white); font-size: 1.06rem; }
.axioms li b { display: block; font-family: var(--display); font-weight: 700; font-size: 2.6rem; line-height: 1; margin-bottom: .3rem; }
.axioms li:nth-child(1) b { color: var(--r); } .axioms li:nth-child(2) b { color: var(--o); } .axioms li:nth-child(3) b { color: var(--g); }
.axioms li:nth-child(4) b { color: var(--b); } .axioms li:nth-child(5) b { color: var(--v); }

/* ---------- Matrix ---------- */
.lvl { display: inline-block; text-align: center; font-family: var(--display); font-weight: 700; letter-spacing: .02em; }
.lvl--Low { background: var(--lvl-low); color: var(--deep); }
.lvl--Moderate { background: var(--lvl-mod); color: var(--deep); }
.lvl--High { background: var(--lvl-high); color: var(--white); }
.matrix { display: grid; grid-template-columns: minmax(9rem, 1.15fr) repeat(3, minmax(0, 1fr)); gap: 5px; }
.matrix .h { font-family: var(--display); font-weight: 700; font-size: 1.15rem; line-height: 1.1; padding: .7rem .6rem; color: var(--white); text-align: center; }
.matrix .h--design { background: var(--design); } .matrix .h--participation { background: var(--participation); } .matrix .h--education { background: var(--education); color: var(--deep); }
.matrix .corner { background: transparent; }
.matrix .rowh { font-family: var(--display); font-weight: 700; font-size: 1.15rem; line-height: 1.12; padding: .75rem .7rem; background: var(--white); border: 3px solid var(--deep); color: var(--deep); }
.matrix .rowh span { display: block; font-family: var(--serif); font-weight: 400; font-style: italic; font-size: .95rem; color: var(--muted); }
.matrix .cell { font-family: var(--display); font-weight: 700; font-size: 1.3rem; display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 4.4rem; border: 3px solid var(--deep); cursor: pointer; padding: .5rem; transition: transform .12s; }
.matrix .cell:hover { transform: scale(1.03); }
.matrix .cell[aria-pressed="true"] { box-shadow: inset 0 0 0 5px var(--y); }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 8px; height: 18px; background: currentColor; opacity: .25; display: block; }
.pips i.on { opacity: 1; }
.matrix-note { margin-top: 1.1rem; min-height: 6rem; padding: 1.1rem 1.25rem; background: var(--white); border: 3px solid var(--deep); box-shadow: 8px 8px 0 var(--lagoon); display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 1rem; align-items: center; }
.matrix-note svg { width: 64px; }
.matrix-note p { margin: 0; }
.legend { display: flex; gap: .5rem 1.1rem; flex-wrap: wrap; font-size: 1rem; color: var(--muted); margin-top: 1rem; align-items: center; }
.legend .lvl { font-size: .95rem; padding: .15rem .6rem; border: 2px solid var(--deep); }

/* ---------- Tool ---------- */
.searchbox { position: relative; max-width: 760px; }
.searchbox label { display: block; font-family: var(--display); font-weight: 700; font-size: 1.45rem; color: var(--deep); margin-bottom: .5rem; }
.searchbox .field { display: flex; border: 3px solid var(--deep); box-shadow: 8px 8px 0 var(--participation); background: var(--white); }
.searchbox input { flex: 1; min-width: 0; font: inherit; font-size: 1.3rem; padding: .9rem 1rem; border: 0; background: transparent; color: var(--ink); }
.searchbox input:focus { outline: none; }
.searchbox .field:focus-within { box-shadow: 8px 8px 0 var(--y); }
.searchbox .field svg { width: 46px; margin: 0 .6rem; flex: none; }
.suggest { list-style: none; margin: 0; padding: 0; border: 3px solid var(--deep); border-top: 0; background: var(--white); position: absolute; left: 0; right: 0; z-index: 5; max-height: 24rem; overflow-y: auto; }
.suggest[hidden] { display: none; }
.suggest li { padding: .7rem 1rem; cursor: pointer; border-bottom: 1px solid var(--rule); }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--mist); }
.suggest li strong { font-weight: 600; display: block; }
.suggest li span { font-size: .98rem; color: var(--muted); }
.suggest li.none { cursor: default; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.4rem; max-width: 980px; }
.chip { font-family: var(--display); font-weight: 600; font-size: 1.05rem; padding: .4rem .85rem; border: 2px solid var(--deep); background: var(--white); color: var(--deep); cursor: pointer; border-radius: 999px; }
.chip:nth-child(6n+1):hover { background: var(--r); color: var(--white); } .chip:nth-child(6n+2):hover { background: var(--o); }
.chip:nth-child(6n+3):hover { background: var(--y); } .chip:nth-child(6n+4):hover { background: var(--g); }
.chip:nth-child(6n+5):hover { background: var(--b); color: var(--white); } .chip:nth-child(6n+6):hover { background: var(--v); color: var(--white); }

.result { margin-top: 2.8rem; border: 3px solid var(--deep); padding: clamp(1.25rem, 3vw, 2rem); background: var(--white); box-shadow: 12px 12px 0 var(--deep); position: relative; }
.result::before { content: ""; position: absolute; left: -3px; right: -3px; top: -3px; height: 12px; background: var(--rainbow); }
.result[hidden] { display: none; }
.result-head { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 1.25rem; align-items: center; margin: .6rem 0 1.5rem; }
.result-head svg { width: 96px; }
.result-head h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 .3rem; }
.tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.tag { font-family: var(--display); font-weight: 600; font-size: 1rem; color: var(--deep); background: var(--mist); padding: .2rem .65rem; border: 2px solid var(--deep); }
.tag--warn { background: #ffe1e5; }
.result-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem clamp(2rem, 5vw, 3.5rem); }
.result-grid h4 { font-family: var(--display); font-weight: 700; font-size: 1.3rem; margin: 0 0 .6rem; color: var(--deep); }
.levels { display: grid; gap: 6px; }
.levels .row { display: grid; grid-template-columns: minmax(0, 1fr) 9.5rem; gap: 6px; }
.levels .lab { padding: .7rem .85rem; font-family: var(--display); font-weight: 700; font-size: 1.15rem; line-height: 1.12; border: 3px solid var(--deep); }
.levels .lab span { display: block; font-family: var(--serif); font-weight: 400; font-style: italic; font-size: .95rem; color: var(--muted); }
.levels .lab--design { border-left: 14px solid var(--design); } .levels .lab--participation { border-left: 14px solid var(--participation); } .levels .lab--education { border-left: 14px solid var(--education); }
.levels .lab--f { border-left: 14px solid var(--r); } .levels .lab--t { border-left: 14px solid var(--y); } .levels .lab--i { border-left: 14px solid var(--b); }
.levels .lvl { display: flex; align-items: center; justify-content: center; gap: .55rem; font-size: 1.25rem; border: 3px solid var(--deep); }
.result .note { margin-top: 1.6rem; font-size: 1.08rem; }
.provenance { font-size: 1rem; color: var(--muted); border-left: 6px solid var(--y); padding: .2rem 0 .2rem .9rem; margin-top: 1.4rem; }

.q-intro { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .7fr); gap: 2rem; align-items: center; }
.q-intro svg { max-width: 230px; justify-self: center; }
.q-form fieldset { border: 0; margin: 0 0 2.5rem; padding: 0; }
.q-form legend { font-family: var(--display); font-weight: 700; font-size: 1.75rem; color: var(--white); padding: .2rem .8rem; margin-bottom: .5rem; }
.q-form .fs-design legend { background: var(--design); }
.q-form .fs-participation legend { background: var(--participation); }
.q-form .fs-education legend { background: var(--education); color: var(--deep); }
.q-form .legend-sub { font-size: 1.04rem; color: var(--muted); margin-bottom: .8rem; }
.q { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: .6rem 2rem; padding: 1rem 0; border-bottom: 2px dashed var(--rule); align-items: center; }
.q p { margin: 0; font-size: 1.08rem; }
.q p small { display: block; font-size: .95rem; color: var(--muted); margin-top: .2rem; }
.opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 3px solid var(--deep); background: var(--white); }
.opts label { position: relative; text-align: center; font-family: var(--display); font-weight: 600; font-size: 1rem; line-height: 1.1; padding: .6rem .35rem; cursor: pointer; border-right: 2px solid var(--deep); }
.opts label:last-child { border-right: 0; }
.opts input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.fs-design .opts label:has(input:checked) { background: var(--design); color: var(--white); }
.fs-participation .opts label:has(input:checked) { background: var(--participation); color: var(--white); }
.fs-education .opts label:has(input:checked) { background: var(--education); color: var(--deep); }
.opts label:has(input:focus-visible) { outline: 3px solid var(--y); outline-offset: -3px; }
.q-name { max-width: 760px; margin-bottom: 2.2rem; }
.q-name label { display: block; font-family: var(--display); font-weight: 700; font-size: 1.35rem; margin-bottom: .45rem; color: var(--deep); }
.q-name input { width: 100%; font: inherit; font-size: 1.15rem; padding: .75rem .9rem; border: 3px solid var(--deep); border-radius: 0; }
.score-line { font-size: .98rem; color: var(--muted); margin: .35rem 0 0; }
.method h3 { margin-top: 1.6rem; }
.method p, .method li { font-size: 1.06rem; }

/* ---------- Author ---------- */
.author-grid { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.6fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.idcard { border: 3px solid var(--deep); background: var(--white); box-shadow: 10px 10px 0 var(--g); position: sticky; top: 1.5rem; }
.idcard .top { height: 14px; background: var(--rainbow); }
.idcard .inner { padding: 1.25rem; }
.idcard img { border: 3px solid var(--deep); margin-bottom: 1rem; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: .55rem 0; border-bottom: 2px dashed var(--rule); font-size: 1.04rem; overflow-wrap: anywhere; }
.contact-list li span { display: block; font-family: var(--display); font-weight: 700; font-size: 1rem; color: var(--muted); }
.cv-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.cv-list li { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 1rem; padding: .75rem 0; border-bottom: 2px dashed var(--rule); }
.cv-list .when { font-family: var(--display); font-weight: 700; color: var(--participation); }

/* ---------- Timeline: a rainbow road ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .55rem; margin: 0 0 2.8rem; }
.filters button { font-family: var(--display); font-weight: 700; font-size: 1.08rem; padding: .45rem 1rem; border: 3px solid var(--deep); background: var(--white); color: var(--deep); cursor: pointer; border-radius: 999px; }
.filters button[aria-pressed="true"] { background: var(--deep); color: var(--white); }
.road { position: relative; padding-left: clamp(2.6rem, 6vw, 4.5rem); }
.road::before { content: ""; position: absolute; left: clamp(.6rem, 2vw, 1.4rem); top: 0; bottom: 0; width: 14px; background: var(--rainbow-v); border-left: 3px solid var(--deep); border-right: 3px solid var(--deep); }
.road .walker { position: sticky; top: 30vh; width: 74px; margin-left: calc(-1 * clamp(2.6rem, 6vw, 4.5rem) - 22px); height: 0; z-index: 2; }
.road .walker svg { width: 74px; }
.year { margin-bottom: 3rem; }
.year > header { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; position: relative; }
.year > header::before { content: ""; position: absolute; left: calc(-1 * clamp(2.6rem, 6vw, 4.5rem) + clamp(.6rem, 2vw, 1.4rem) - 9px); top: .55em; width: 38px; height: 38px; border-radius: 50%; border: 4px solid var(--deep); background: var(--yc, var(--y)); }
.year h2 { font-size: clamp(3rem, 7vw, 5rem); margin: 0; color: var(--yc, var(--deep)); -webkit-text-stroke: 2px var(--deep); line-height: .9; }
.year header p { margin: 0; font-style: italic; font-size: 1.2rem; color: var(--muted); }
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.event { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 0 1.25rem; padding: .9rem 1rem; border: 3px solid var(--deep); background: var(--white); }
.event[hidden] { display: none; }
.event .d { display: block; font-family: var(--display); font-weight: 700; color: var(--deep); line-height: 1.3; }
.event .k { display: inline-block; font-family: var(--display); font-weight: 600; font-size: .95rem; padding: .05rem .5rem; margin-top: .35rem; border: 2px solid var(--deep); }
.k--talk { background: var(--sky); } .k--publication { background: var(--y); } .k--research { background: #b7efc9; }
.k--milestone { background: var(--pink); } .k--visit { background: #d6c4f5; } .k--teaching { background: #ffd2b0; }
.event h3 { font-family: var(--serif); font-weight: 600; font-size: 1.14rem; line-height: 1.35; margin: 0 0 .15rem; color: var(--ink); }
.event p { margin: 0; font-size: 1.02rem; color: var(--muted); }
.event--milestone { box-shadow: 8px 8px 0 var(--yc, var(--y)); }

/* ---------- Robot animation ---------- */
.robot .eye { transform-box: fill-box; transform-origin: center; animation: blink 5.5s infinite; }
.robot .heart { transform-box: fill-box; transform-origin: center; animation: beat 2.4s ease-in-out infinite; }
.robot .eq rect { transform-box: fill-box; transform-origin: bottom; animation: eq 1.8s ease-in-out infinite; }
.robot .eq rect:nth-child(2) { animation-delay: .2s; } .robot .eq rect:nth-child(3) { animation-delay: .4s; }
.robot .eq rect:nth-child(4) { animation-delay: .6s; } .robot .eq rect:nth-child(5) { animation-delay: .8s; } .robot .eq rect:nth-child(6) { animation-delay: 1s; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
@keyframes eq { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.45); } }
.robot.happy .mouth { stroke: var(--y); }

/* ---------- Footer ---------- */
.foot { margin-top: 0; }
.foot .band .wrap { padding: 1.6rem var(--gutter); align-items: center; }
.foot p { margin: 0; font-size: 1rem; color: var(--lagoon-soft); }
.foot a { color: var(--white); }
.foot .strip { background-image: url("../img/texture-bottom.jpg"); background-position: center 60%; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero .wrap, .two-col, .split, .part-head, .result-grid, .page-head .wrap, .author-grid, .q-intro { grid-template-columns: 1fr; }
  .page-head .robot { width: 180px; justify-self: start; }
  .praise, .excerpts, .trio, .cascade { grid-template-columns: 1fr; }
  .cascade > div { border-right: 0; border-bottom: 3px solid var(--deep); }
  .cascade > div:last-child { border-bottom: 0; }
  .cascade > div:not(:last-child)::after { right: auto; left: 50%; top: auto; bottom: -19px; transform: translateX(-50%) rotate(90deg); }
  .q { grid-template-columns: 1fr; }
  .idcard { position: static; }
  .stage { max-width: 560px; width: 100%; justify-self: center; }
}
@media (max-width: 640px) {
  body { font-size: 1.1rem; }
  .matrix { grid-template-columns: minmax(6.5rem, 1fr) repeat(3, minmax(0, 1fr)); gap: 3px; }
  .matrix .cell { font-size: 1rem; min-height: 3.6rem; flex-direction: column; gap: .25rem; }
  .matrix .h { font-size: .95rem; padding: .5rem .3rem; }
  .chapters li { grid-template-columns: 2.6rem minmax(0, 1fr); }
  .chapters .pg { display: none; }
  .event, .cv-list li { grid-template-columns: 1fr; }
  .levels .row { grid-template-columns: minmax(0, 1fr) 7rem; }
  .levels .lvl { flex-direction: column; gap: .2rem; font-size: 1.05rem; }
  .road .walker { display: none; }
  .result-head { grid-template-columns: 64px minmax(0, 1fr); }
  .result-head svg { width: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .arcs path { stroke-dashoffset: 0; }
}
@media print { .strip, .seam, .band nav, .filters, .actions, .ribbon, .robot { display: none; } }

/* ---------- From the Foreword ---------- */
.section--foreword { background: var(--y); position: relative; overflow: hidden; }
.section--foreword::before { content: ""; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px; border-radius: 50%; background: var(--pink); border: 4px solid var(--deep); }
.section--foreword .wrap { position: relative; z-index: 1; }
.fw-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.5rem; margin-bottom: 1.6rem; }
.fw-head h2 { margin: 0; }
.fw-by { margin: 0; font-family: var(--display); font-size: 1.3rem; }
.fw-by strong { font-weight: 700; }
.fw-quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; align-items: start; }
.fw-quote { margin: 0; background: var(--white); border: 3px solid var(--deep); padding: 1.4rem 1.4rem 1.2rem; font-size: 1.3rem; line-height: 1.42; font-style: italic; }
.fw-quote p { margin: 0; }
.fw-quote--0 { box-shadow: 9px 9px 0 var(--r); transform: rotate(-1deg); }
.fw-quote--1 { box-shadow: 9px 9px 0 var(--b); transform: rotate(.8deg); }
.fw-quote--2 { box-shadow: 9px 9px 0 var(--g); transform: rotate(-.6deg); }

/* ---------- Inspirations: a rainbow bookshelf ---------- */
.page-head--inspo { background: radial-gradient(circle at 84% 45%, var(--g) 0 21%, transparent 21.2%), var(--pink); }
.shelf { margin-bottom: 3.2rem; }
.shelf[hidden] { display: none; }
.shelf > header { border-bottom: 8px solid var(--sc); padding-bottom: .6rem; margin-bottom: 1.3rem; }
.shelf > header h2 { margin: 0 0 .2rem; }
.shelf > header p { margin: 0; font-style: italic; color: var(--muted); font-size: 1.15rem; }
.shelf--equality { --sc: var(--r); } .shelf--queer { --sc: var(--v); } .shelf--data { --sc: var(--b); } .shelf--constitution { --sc: var(--g); }
.shelf-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.1rem; }
.shelf-item { display: grid; grid-template-columns: 22px minmax(0, 1fr); border: 3px solid var(--deep); background: var(--white); transition: transform .12s, box-shadow .12s; }
.shelf-item[hidden] { display: none; }
.shelf-item:hover { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 var(--sc); }
.shelf-item .spine { border-right: 3px solid var(--deep); background: repeating-linear-gradient(180deg, var(--sc) 0 22px, var(--white) 22px 26px, var(--sc) 26px 30px); }
.shelf-item > div { padding: .9rem 1rem 1rem; }
.shelf-item .k { display: inline-block; font-family: var(--display); font-weight: 600; font-size: .92rem; padding: .02rem .5rem; border: 2px solid var(--deep); margin-bottom: .5rem; }
.k--book { background: var(--y); } .k--article { background: var(--sky); } .k--chapter { background: #b7efc9; } .k--report { background: #ffd2b0; } .k--press { background: var(--pink); }
.shelf-item h3 { font-family: var(--serif); font-weight: 600; font-size: 1.12rem; line-height: 1.32; margin: 0 0 .35rem; color: var(--ink); }
.shelf-item .by { font-family: var(--display); font-weight: 600; font-size: 1.08rem; margin: 0 0 .2rem; color: var(--deep); }
.shelf-item .det { font-size: 1rem; color: var(--muted); margin: 0; }
.shelf-item .cited { font-family: var(--display); font-weight: 500; font-size: .95rem; margin: .55rem 0 0; color: var(--deep); background: var(--mist); display: inline-block; padding: .05rem .45rem; }
.shelf-empty { font-size: 1.25rem; border: 3px dashed var(--deep); padding: 1.5rem; background: var(--mist); max-width: none; }
@media (max-width: 960px) { .fw-quotes { grid-template-columns: 1fr; } .fw-quote { transform: none !important; } }
@media (max-width: 960px) {
  .page-head--book { background: radial-gradient(circle at 22% 84%, var(--y) 0 120px, transparent 121px), var(--o); }
  .page-head--tool { background: radial-gradient(circle at 22% 84%, var(--pink) 0 120px, transparent 121px), var(--lagoon); }
  .page-head--author { background: radial-gradient(circle at 22% 84%, var(--sky) 0 120px, transparent 121px), var(--g); }
  .page-head--inspo { background: radial-gradient(circle at 22% 84%, var(--g) 0 120px, transparent 121px), var(--pink); }
}
.shelf-item .note { font-size: 1rem; font-style: italic; margin: .5rem 0 0; padding-left: .6rem; border-left: 4px solid var(--sc); color: var(--ink); }
.shelf-item h3 a { color: inherit; text-decoration-color: var(--sc); }
