:root {
  /* Layout idea: a navigation chart. One left-aligned column; the chart is the only loud
     object, drawn in magenta overprint on quiet chart paper. The middle ground is an island. */
  --paper: #F2F5F4;
  --surface: #FBFCFC;
  --sea: #DCE9EE;
  --island: #EFE3B9;
  --ink: #12243A;
  --ink-2: #44566A;
  --muted: #627080;
  --rule: #C4CFD4;
  --accent: #B3206F;
  --on-accent: #FFFFFF;
  --accent-wash: #F4DCE9;
  --friend: #2A78D6;
  --ijs-logo-filter: none;
  --display: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --body: var(--display);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0B1620; --surface: #122230; --sea: #15303F; --island: #453F22;
    --ink: #E5EDF0; --ink-2: #AEBCC6; --muted: #8C9AA5; --rule: #2C4050;
    --accent: #E0559F; --on-accent: #1A0A13; --accent-wash: #44203A; --friend: #4C8DE8;
    --ijs-logo-filter: brightness(0) invert(1);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0B1620; --surface: #122230; --sea: #15303F; --island: #453F22;
  --ink: #E5EDF0; --ink-2: #AEBCC6; --muted: #8C9AA5; --rule: #2C4050;
  --accent: #E0559F; --on-accent: #1A0A13; --accent-wash: #44203A; --friend: #4C8DE8;
  --ijs-logo-filter: brightness(0) invert(1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 18px/1.55 var(--body); font-optical-sizing: auto;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 44px); }
p { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.statement:focus, .camp-name:focus, .about-title:focus { outline: none; }
[hidden] { display: none !important; }
/* the static page stays hidden until the app has drawn itself (see index.html) */
.js #app:not([data-ready]) { visibility: hidden; }
.ui { font-family: var(--display); font-stretch: 88%; }

/* ---------- top bar ---------- */
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 0; border-bottom: 1.5px solid var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 9px; padding: 4px 2px; border: 0; background: none;
  color: var(--ink); cursor: pointer; font: 800 21px/1 var(--display); font-stretch: 76%; letter-spacing: .01em; }
.brand { white-space: nowrap; text-decoration: none; }
.brand-wrap { display: flex; align-items: baseline; gap: 4px 14px; min-width: 0; }
.by { font: 500 14.5px/1.2 var(--display); font-stretch: 88%; color: var(--muted); white-space: nowrap; text-decoration-color: var(--rule); }
.by:hover { color: var(--accent); text-decoration-color: var(--accent); }
.brand svg { display: block; }
.top-right { display: flex; align-items: center; gap: 14px; font: 500 15px/1.2 var(--display); font-stretch: 88%; color: var(--ink-2); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 20px;
  border: 1.5px solid var(--ink); border-radius: 3px; background: transparent; color: var(--ink); cursor: pointer;
  font: 700 17px/1.15 var(--display); font-stretch: 88%; text-align: center; }
.btn:hover { background: var(--accent-wash); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.quiet { min-height: 36px; padding: 6px 2px; border-color: transparent; background: none; font-weight: 600; font-size: 15px;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--muted); }
.btn.quiet:hover { text-decoration-color: var(--accent); }
.btn.small { min-height: 34px; padding: 5px 12px; font-size: 14px; font-weight: 600; }
.btn[disabled] { opacity: .4; cursor: default; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }

/* ---------- intro ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px 56px; align-items: center; padding: 40px 0 16px; }
.hero > :only-child { grid-column: 1 / -1; max-width: 46em; }   /* the static page has no chart beside the text */
.eyebrow { margin-bottom: 14px; font: 600 14px/1.3 var(--display); font-stretch: 88%; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.tagline { margin-top: 14px; font: 600 clamp(20px, 2.3vw, 25px)/1.25 var(--display); font-stretch: 84%; }
.hero h1, .camp-name { margin: 0; font: 700 clamp(36px, 5.4vw, 68px)/1.05 var(--display);
  letter-spacing: -.012em; text-wrap: balance; }
.hero h1 { font-size: clamp(32px, 4vw, 50px); }   /* after the shared rule above, whose font shorthand sets the size */
.lede { margin-top: 12px; max-width: 33em; font-size: 18px; line-height: 1.5; color: var(--ink-2); }
.hero .row { margin-top: 20px; }
.fine { margin-top: 14px; font: 500 15px/1.4 var(--display); font-stretch: 88%; color: var(--muted); max-width: 34em; }
.source-credit { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--rule);
  max-width: 35em; font: 500 14.5px/1.5 var(--display); font-stretch: 88%; color: var(--muted); }
.source-credit a { color: var(--ink-2); text-decoration-color: var(--muted); }
.source-credit a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.notice { margin-top: 24px; padding: 14px 16px; border-left: 4px solid var(--friend); background: var(--surface);
  font: 500 16px/1.4 var(--display); font-stretch: 88%; }
.chart figure, figure.chart { margin: 0; }
.compass { width: 100%; }
.compass svg { display: block; max-width: 100%; height: auto; }
figcaption { margin-top: 10px; font: 500 14.5px/1.4 var(--display); font-stretch: 88%; color: var(--muted); max-width: 46em; }

h2 { margin: 0 0 20px; padding-top: 14px; border-top: 1.5px solid var(--ink);
  font: 700 28px/1.1 var(--display); font-stretch: 76%; text-wrap: balance; }
section { margin-top: 56px; }
.axes-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 56px; margin: 0; padding: 0; list-style: none; }
.axes-list h3 { margin: 0 0 4px; font: 700 19px/1.2 var(--display); font-stretch: 80%; }
.axes-list p { color: var(--ink-2); line-height: 1.4; }
.versus { display: flex; align-items: center; gap: 10px; margin-top: 8px; font: 600 14.5px/1.2 var(--display); font-stretch: 88%; }
.versus i { flex: 1; min-width: 20px; max-width: 90px; height: 1.5px; background: var(--ink-2); }

/* ---------- quiz ---------- */
.quiz { max-width: 860px; padding: 28px 0 48px; }
.ticks { display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.ticks i { flex: 1; height: 6px; background: var(--rule); }
.ticks i.gate { height: 11px; }
.ticks i.done { background: var(--ink-2); }
.ticks i.skip { background: transparent; height: 6px; border-bottom: 2px dotted var(--muted); }
.ticks i.now { background: var(--accent); height: 16px; }
.count { margin-top: 10px; display: flex; justify-content: space-between; gap: 16px;
  font: 500 15px/1.3 var(--display); font-stretch: 88%; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.statement { margin: 34px 0 30px; max-width: 21em; min-height: 3.6em; font: 500 clamp(25px, 3.7vw, 37px)/1.17 var(--body);
  letter-spacing: -.006em; text-wrap: balance; }
.likert { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.likert button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  min-height: 72px; padding: 10px 6px; border: 1.5px solid var(--ink); border-radius: 3px; background: var(--surface);
  color: var(--ink); cursor: pointer; font: 600 16px/1.12 var(--display); font-stretch: 84%; text-align: center; }
.likert button:hover { background: var(--accent-wash); }
.likert button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.likert kbd { font: 500 12px/1 var(--display); color: var(--muted); }
.likert button[aria-pressed="true"] kbd { color: inherit; opacity: .8; }
.under { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 24px; margin-top: 12px; }
details.note { max-width: 34em; }
summary { cursor: pointer; font: 600 15px/1.3 var(--display); font-stretch: 88%; padding: 8px 0; color: var(--ink-2); }
summary:hover { color: var(--ink); }
details.note p { padding: 2px 0 8px; font-size: 17px; line-height: 1.45; color: var(--ink-2); }
.quiz-nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--rule); }
.q-status { margin-top: 12px; min-height: 2.9em; max-width: 46em; font: 500 14.5px/1.45 var(--display); font-stretch: 88%; color: var(--muted); }
.keys { margin-top: 10px; font: 500 14px/1.4 var(--display); font-stretch: 88%; color: var(--muted); }
@media (hover: none), (pointer: coarse) { .likert kbd, .keys { display: none; } }

/* ---------- result ---------- */
.result-head { padding: 44px 0 0; }
.kicker { font: 600 17px/1.2 var(--display); font-stretch: 88%; color: var(--ink-2); margin-bottom: 10px; }
.camp-name { font-size: clamp(28px, 5.4vw, 68px); overflow-wrap: anywhere; }
.match { margin-top: 16px; font: 700 20px/1.2 var(--display); font-stretch: 84%; }
.match span { font-weight: 500; color: var(--ink-2); }
.creed { margin-top: 18px; font: italic 500 26px/1.25 var(--body); max-width: 24em; text-wrap: balance; }
.about { margin-top: 14px; max-width: 62ch; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 20px 0 0; max-width: 70ch; }
.facts dt { font: 600 15px/1.6 var(--display); font-stretch: 88%; color: var(--ink-2); }
.facts dd { margin: 0; font-size: 17px; line-height: 1.45; }
.partial { margin-top: 24px; padding: 14px 16px; border-left: 4px solid var(--accent); background: var(--surface);
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; font: 500 16px/1.4 var(--display); font-stretch: 88%; }

.position { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); gap: 28px 48px; align-items: start; }
.reading p + p { margin-top: 12px; }
.reading .big { font: 500 22px/1.3 var(--body); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 18px 0 0; padding: 0; list-style: none;
  font: 500 14.5px/1.2 var(--display); font-stretch: 88%; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.legend svg { display: block; }

.axis { padding: 18px 0 14px; border-bottom: 1px solid var(--rule); }
.axis:first-of-type { padding-top: 0; }
.axis-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.axis-head h3 { margin: 0; font: 700 21px/1.2 var(--display); font-stretch: 78%; }
.axis-head p { color: var(--ink-2); font-size: 17px; line-height: 1.35; }
.scale { display: grid; grid-template-columns: minmax(110px, 200px) minmax(0, 1fr) minmax(110px, 200px); gap: 14px; align-items: center; margin-top: 10px; }
.pole { font: 500 15px/1.15 var(--display); font-stretch: 86%; color: var(--muted); }
.pole.a { text-align: right; }
.pole.on { color: var(--ink); font-weight: 700; }
.track { position: relative; height: 30px; }
.track .zone { position: absolute; left: 37.5%; width: 25%; top: 7px; height: 16px; background: var(--island); border-radius: 2px; }
.track .line { position: absolute; left: 0; right: 0; top: 14.5px; height: 1px; background: var(--ink-2); }
.track .end { position: absolute; top: 9px; width: 1px; height: 12px; background: var(--ink-2); }
.track .mid { position: absolute; left: 50%; top: 3px; width: 1.5px; height: 24px; margin-left: -.75px; background: var(--ink); }
.track .fill { position: absolute; top: 10px; height: 10px; background: var(--accent); }
.track .fill.neg { border-radius: 5px 0 0 5px; }
.track .fill.pos { border-radius: 0 5px 5px 0; }
.track .dot { position: absolute; top: 8px; width: 14px; height: 14px; margin-left: -7px; border: 3px solid var(--accent); border-radius: 50%; background: var(--surface); }
.axis.none .zone, .axis.none .mid { display: none; }
.axis.none .line { height: 0; background: none; border-top: 1.5px dashed var(--muted); }
.axis.none .read b { color: var(--muted); }
.track .fr { position: absolute; top: 3px; width: 24px; height: 24px; margin-left: -12px; padding: 0; border: 0; background: none; cursor: help; }
.track .fr::before { content: ""; position: absolute; left: 6.5px; top: 6.5px; width: 11px; height: 11px; transform: rotate(45deg);
  background: var(--friend); box-shadow: 0 0 0 2px var(--surface); }
.read { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 8px; }
.read b { font: 700 17px/1.3 var(--display); font-stretch: 86%; }
.read .num { font: 500 15px/1.3 var(--display); font-stretch: 88%; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.chip { display: inline-block; padding: 2px 9px; border: 1px solid var(--ink-2); border-radius: 999px;
  font: 600 13px/1.4 var(--display); font-stretch: 88%; color: var(--ink-2); cursor: help; }
.axis details { margin-top: 4px; }
.defs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 28px; margin: 6px 0 16px; }
.defs h4, .answers h4 { margin: 0 0 3px; font: 700 15px/1.25 var(--display); font-stretch: 86%; }
.defs p { font-size: 16px; line-height: 1.4; color: var(--ink-2); }
.answers { margin: 0; padding: 0; list-style: none; max-width: 70ch; }
.answers li { padding: 9px 0; border-top: 1px solid var(--rule); }
.answers .st { font-size: 17px; line-height: 1.4; }
.answers .an { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin-top: 2px;
  font: 500 14.5px/1.4 var(--display); font-stretch: 88%; color: var(--ink-2); }
.answers .an b { color: var(--ink); font-weight: 700; }

.share { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 48px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font: 600 15px/1.3 var(--display); font-stretch: 88%; }
.field .row { gap: 8px; }
input[type="text"], .copy-fallback { width: 100%; min-width: 0; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--ink-2); border-radius: 3px;
  background: var(--surface); color: var(--ink); font: 500 16px/1.2 var(--display); font-stretch: 92%; letter-spacing: .02em; }
.row input[type="text"] { flex: 1 1 200px; width: auto; }
.copy-fallback { flex: 1 0 100%; resize: vertical; }
.hint { font: 500 14px/1.4 var(--display); font-stretch: 88%; color: var(--muted); }
.err { font: 600 15px/1.4 var(--display); font-stretch: 88%; color: var(--accent); min-height: 1.4em; }
.friends { margin: 0; padding: 0; list-style: none; }
.friends li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; padding: 12px 0; border-top: 1px solid var(--rule); }
.friends .who { font: 700 18px/1.2 var(--display); font-stretch: 84%; display: inline-flex; align-items: center; gap: 8px; }
.friends .who::before { content: ""; width: 9px; height: 9px; transform: rotate(45deg); background: var(--friend); }
.friends .how { flex: 1 1 240px; font-size: 16px; line-height: 1.35; color: var(--ink-2); }
.tbl { overflow-x: auto; margin-top: 8px; }
table { border-collapse: collapse; font: 500 14.5px/1.3 var(--display); font-stretch: 88%; font-variant-numeric: tabular-nums; min-width: 100%; }
th, td { padding: 7px 12px 7px 0; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; white-space: normal; min-width: 150px; }
thead th { font-weight: 700; border-bottom: 1.5px solid var(--ink); vertical-align: bottom; }
.method p, .method li { max-width: 68ch; font-size: 17px; line-height: 1.5; color: var(--ink-2); }
.method p + p { margin-top: 10px; }
.method summary { font-size: 17px; color: var(--ink); }
.ranked { margin: 8px 0 0; padding: 0; list-style: none; max-width: 560px; }
.ranked li { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-top: 1px solid var(--rule);
  font: 500 16px/1.3 var(--display); font-stretch: 88%; font-variant-numeric: tabular-nums; }

footer { margin-top: 72px; padding: 20px 0 48px; border-top: 1.5px solid var(--ink); }
footer p { max-width: 72ch; font: 500 14.5px/1.5 var(--display); font-stretch: 88%; color: var(--muted); }
footer p + p { margin-top: 8px; }
.footer-contact-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 24px 32px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--rule); }
.footer-logos { display: flex; align-items: center; gap: 28px; }
.footer-logos img { display: block; height: auto; }
.footer-logos .ijs-logo { filter: var(--ijs-logo-filter); }
.footer-institute { display: inline-flex; align-items: center; gap: 12px;
  font: 700 15px/1.2 var(--display); font-stretch: 88%; }
.footer-contact { font-style: normal; font: 500 15px/1.5 var(--display); font-stretch: 88%; }
.footer-contact span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 13px; }
.footer-contact a:hover { color: var(--accent); }

/* ---------- chart ---------- */
.c-sea { fill: var(--sea); }
.c-island { fill: var(--island); }
.c-grid { stroke: var(--rule); stroke-width: 1; }
.c-axis { stroke: var(--ink-2); stroke-width: 1; }
.c-frame { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.c-tick { font: 500 11px var(--display); fill: var(--muted); font-variant-numeric: tabular-nums; }
.c-end { font: 700 13px var(--display); font-stretch: 84%; fill: var(--ink); }
.c-seaname { font: italic 500 15px var(--body); letter-spacing: .14em; fill: var(--ink-2); opacity: .62; }
.c-camp rect { fill: var(--surface); stroke: var(--ink-2); stroke-width: 1.5; }
.c-camp.is-top rect { stroke: var(--ink); stroke-width: 2.5; }
.c-label { font: 600 11.5px var(--display); font-stretch: 84%; fill: var(--ink-2); }
.c-label.strong { fill: var(--ink); font-weight: 700; font-size: 13px; }
.c-ring { fill: var(--surface); }
.c-you-o { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; }
.c-you-i { fill: var(--accent); }
.c-friend { fill: var(--friend); }
.c-bearing { stroke: var(--accent); stroke-width: 1.5; opacity: .6; }
.c-hit { fill: transparent; cursor: help; }
.c-pt:focus-visible { outline: none; }
.c-pt:focus-visible .c-hit { stroke: var(--accent); stroke-width: 2; }

#tip { position: fixed; z-index: 10; max-width: 270px; padding: 9px 11px; border-radius: 4px; background: var(--ink); color: var(--paper);
  font: 500 14px/1.35 var(--display); font-stretch: 88%; pointer-events: none; box-shadow: 0 4px 14px rgba(0, 0, 0, .22); }
#tip b { display: block; font-weight: 700; font-size: 15px; }
#tip span { display: block; opacity: .86; }
#tip[hidden] { display: none; }

/* ---------- landing: routes, assurances, steps, creator ---------- */
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 22px 0 0; padding: 0; border: 0; max-width: 31em; min-width: 0; }
.modes legend { padding: 0; margin-bottom: 8px; font: 600 15px/1.3 var(--display); font-stretch: 88%; color: var(--ink-2); }
.mode { position: relative; display: block; padding: 10px 12px 11px; border: 1.5px solid var(--ink-2); border-radius: 3px; background: var(--surface); cursor: pointer; }
.mode input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.mode b { display: block; font: 700 16.5px/1.2 var(--display); font-stretch: 84%; }
.mode b::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border: 1.5px solid var(--ink-2); border-radius: 50%; vertical-align: -1px; }
.mode span { display: block; margin-top: 4px; font: 500 14px/1.3 var(--display); font-stretch: 88%; color: var(--ink-2); }
.mode:hover { background: var(--accent-wash); }
.mode:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-wash); }
.mode input:checked ~ b::before { border-color: var(--accent); background: radial-gradient(var(--accent) 0 3.2px, transparent 3.8px); }
.mode:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.assure { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.assure li { padding: 3px 10px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface);
  font: 500 13.5px/1.4 var(--display); font-stretch: 88%; color: var(--ink-2); }
.credit { margin-top: 16px; font: 500 15px/1.5 var(--display); font-stretch: 88%; color: var(--ink-2); }
.credit a:hover, .creator a:hover, .about-text a:hover, .foot-links a:hover, .foot-id a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 48px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: block; margin-bottom: 6px; font: 700 26px/1 var(--display); color: var(--accent); }
.steps h3 { margin: 0 0 4px; font: 700 19px/1.2 var(--display); font-stretch: 80%; }
.steps p, .creator p { color: var(--ink-2); line-height: 1.45; }
.creator p { max-width: 68ch; }
.creator .row { margin-top: 16px; }
a.btn { text-decoration: none; }

/* ---------- about ---------- */
.about-view { padding-top: 40px; }
.about-title { margin: 0 0 8px; font: 700 clamp(30px, 4.4vw, 48px)/1.08 var(--display); letter-spacing: -.012em; }
.about-text h2 { margin-top: 44px; scroll-margin-top: 16px; }
.about-text p, .about-text li { max-width: 70ch; font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.about-text p + p { margin-top: 10px; }
.about-text strong { color: var(--ink); }
.about-text code { padding: 1px 5px; border: 1px solid var(--rule); border-radius: 3px; background: var(--surface); font: 500 .9em var(--display); }
.about-text [data-slot]:not(:empty) { margin-top: 16px; }
.about-text .dims { max-width: none; }
.about-text .dims h3 { margin: 0 0 2px; font: 700 18px/1.25 var(--display); font-stretch: 82%; color: var(--ink); }
.about-text .dims .defs { margin: 8px 0 4px; }
.plain-links { margin: 10px 0 0; padding: 0; list-style: none; }
.plain-links li { padding: 4px 0; }

/* ---------- footer links ---------- */
.foot-id { color: var(--ink-2); }
.foot-id b { color: var(--ink); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 12px 0 14px; font: 600 14.5px/1.5 var(--display); font-stretch: 88%; color: var(--ink-2); }

/* ---------- result: summary, tabs, camps ---------- */
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.kicker .chip, .camp-cards .chip { margin-left: 6px; cursor: default; }
.partial.demo { border-left-color: var(--friend); margin: 0 0 28px; }
.partial b { font-weight: 700; }
.brief .facts { margin-top: 0; max-width: 78ch; }
.brief .hint, .camps > .hint { margin-top: 14px; max-width: 70ch; }
.tabs { display: flex; gap: 4px; margin: 0 0 24px; border-bottom: 1.5px solid var(--ink); overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: 0 0 auto; min-height: 46px; padding: 8px 18px; border: 1.5px solid transparent; border-bottom: 0; border-radius: 3px 3px 0 0;
  background: none; color: var(--ink-2); cursor: pointer; font: 700 16.5px/1.2 var(--display); font-stretch: 84%; }
.tabs button:hover { background: var(--accent-wash); }
.tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.tabs button:focus-visible { outline-offset: -4px; }
.panel:focus-visible { outline-offset: 8px; }
.dims-legend { margin: 0 0 22px; }
.projection { padding: 12px 14px; border-left: 4px solid var(--accent); background: var(--surface); font-size: 16.5px; line-height: 1.45; }
.camp-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 18px 0 22px; padding: 0; list-style: none; }
.camp-cards li { padding: 14px 16px 16px; border: 1.5px solid var(--ink-2); border-radius: 3px; background: var(--surface); }
.camp-cards li:first-child { border-color: var(--ink); border-width: 2px; }
.camp-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.camp-cards h3 { margin: 0; font: 700 18.5px/1.2 var(--display); font-stretch: 80%; }
.sim { font: 600 14.5px/1.2 var(--display); font-stretch: 88%; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.simbar { display: block; height: 6px; margin: 10px 0 12px; border-radius: 3px; background: var(--rule); overflow: hidden; }
.simbar i { display: block; height: 100%; background: var(--accent); }
.creed-s { font: italic 500 17px/1.3 var(--body); }
.camp-cards .facts { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 12px; }
.camp-cards .facts dt { margin-top: 6px; }
.camp-cards .facts dd { font-size: 16px; }
.camps details { margin-top: 14px; }
.camps > .btn { margin-top: 6px; }

/* ---------- compare ---------- */
details.friend { padding: 2px 0 20px; border-top: 1.5px solid var(--ink-2); }
details.friend > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 14px 0 12px; font-size: 16px; }
details.friend > summary b { font: 700 20px/1.2 var(--display); font-stretch: 80%; color: var(--ink); }
details.friend > summary::before { content: "+"; width: 14px; font-weight: 700; color: var(--accent); }
details.friend[open] > summary::before { content: "−"; }
details.friend > summary::-webkit-details-marker { display: none; }
details.friend > summary { list-style: none; }
details.friend .facts { margin: 0 0 16px; max-width: 86ch; }
.pairs { margin-top: 12px; }
.pair { padding: 10px 0 8px; border-top: 1px solid var(--rule); }
.pair-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pair-head b { font: 700 16.5px/1.2 var(--display); font-stretch: 82%; }
.pair .scale { margin-top: 4px; }
.track .gap { position: absolute; top: 11px; height: 8px; border-radius: 4px; background: var(--friend); opacity: .3; }
.c-gap { fill: var(--friend); opacity: .3; }
.talk { margin-top: 18px; padding: 14px 16px 16px; border-left: 4px solid var(--friend); background: var(--surface); max-width: 86ch; }
.talk h4 { margin: 0 0 8px; font: 700 16px/1.25 var(--display); font-stretch: 86%; }
.talk ul { margin: 0; padding: 0; list-style: none; }
.talk li + li { margin-top: 12px; }
.talk li b { display: block; font: 600 14.5px/1.4 var(--display); font-stretch: 88%; color: var(--ink-2); }
.hint.how { margin: 18px 0 6px; max-width: 78ch; }

/* ---------- result image ---------- */
.card-box { margin: 0; }
.card { display: block; width: 100%; max-width: 440px; height: auto; border: 1px solid var(--rule); border-radius: 3px; background: #F2F5F4; }
.card.tall { max-width: 380px; }
.sharing .modes { margin-top: 0; }
.sharing .mode b::before { vertical-align: -1px; }

/* ---------- narrow screens ---------- */
/* These come after every component above, so that they win over the wide-screen rules. */
@media (max-width: 880px) {
  .hero, .position, .share, .camp-cards { grid-template-columns: minmax(0, 1fr); }
  .hero { padding: 32px 0 40px; }
  .axes-list { grid-template-columns: minmax(0, 1fr); }
  .defs { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .top-right .saved, .likert kbd, .keys { display: none; }
  .likert { grid-template-columns: minmax(0, 1fr); }
  .likert button { flex-direction: row; justify-content: flex-start; min-height: 50px; padding: 8px 16px; font-size: 17px; text-align: left; }
  /* One-handed use: the question sits at the top, the answers stay put near the bottom of the screen. */
  .quiz { display: flex; flex-direction: column; min-height: calc(100vh - 60px); min-height: calc(100dvh - 60px);
    padding: 16px 0 max(12px, env(safe-area-inset-bottom)); }
  .q-card { flex: 1; display: flex; flex-direction: column; }
  .statement { flex: 1; margin: 18px 0 14px; min-height: 5em; font-size: clamp(20px, 5.6vw, 25px); line-height: 1.25; text-wrap: pretty; }
  .under { margin-top: 6px; }
  .q-status { margin-top: 4px; min-height: 4.2em; }
  .quiz-nav { margin-top: 6px; padding-top: 10px; flex-wrap: nowrap; }
  .quiz-nav .btn { min-height: 46px; flex: 1 1 0; padding: 6px 8px; }
  .btn.quiet { min-height: 44px; }
  .brand-wrap { flex-direction: column; align-items: flex-start; }
  .top { padding: 10px 0; }
  body[data-view="quiz"] .by { display: none; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; overflow: visible; }
  .tabs button { padding: 8px 6px; font-size: 14.5px; }
  .scale { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 14px; }
  .scale .track { grid-column: 1 / -1; grid-row: 2; }
  .pole.a { text-align: left; }
  .pole.b { text-align: right; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .facts dd { margin-bottom: 10px; }
  section { margin-top: 44px; }
}

/* ---------- phones held sideways ---------- */
@media (max-height: 520px) and (orientation: landscape) {
  .top { padding: 6px 0; }
  .quiz { min-height: 0; padding: 10px 0 max(10px, env(safe-area-inset-bottom)); }
  .q-card, .statement { flex: none; }
  .statement { margin: 10px 0 12px; min-height: 0; max-width: none; font-size: 20px; }
  .likert { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .likert button { flex-direction: column; justify-content: center; min-height: 48px; padding: 6px 4px; font-size: 14px; text-align: center; }
  .q-status { min-height: 0; }
}

/* ---------- motion ---------- */
/* Everything that moves is in here, so a visitor who asks for reduced motion gets none of it. */
@media (prefers-reduced-motion: no-preference) {
  .btn, .likert button, .mode { transition: background-color .12s ease, color .12s ease, border-color .12s ease, transform .12s ease; }
  .btn:active, .likert button:active { transform: scale(.98); }
  .ticks i { transition: height .22s ease, background-color .22s ease; }
  /* a new page: its blocks rise in, one after another */
  main.enter > * { animation: rise .36s ease-out both; }
  main.enter > :nth-child(2) { animation-delay: .06s; }
  main.enter > :nth-child(3) { animation-delay: .12s; }
  main.enter > :nth-child(n + 4) { animation-delay: .18s; }
  /* switching between the three result views */
  .panel.enter { animation: rise .22s ease-out both; }
  /* bars grow from the center and position marks travel to their place */
  main.enter .fill, .panel.enter .fill, main.enter .simbar i { animation: grow .5s cubic-bezier(.2, .8, .2, 1) .1s both; }
  .fill.neg { transform-origin: right center; }
  .fill.pos, .simbar i { transform-origin: left center; }
  main.enter .gap, .panel.enter .gap { animation: fade .4s ease .45s both; }
  main.enter .dot, .panel.enter .dot, main.enter .track .fr, .panel.enter .track .fr { animation: dot-in .5s cubic-bezier(.2, .8, .2, 1) .1s both; }
  /* a new question: the old one slides out, the new one slides in from the other side */
  .q-card.out { opacity: 0; transform: translateX(calc(var(--dir, 1) * -14px)); transition: opacity .08s ease-in, transform .08s ease-in; }
  .q-card.in { animation: q-in .16s ease-out both; }
  .c-bearing.late { animation: fade .3s ease .5s both; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } }
  @keyframes q-in { from { opacity: 0; transform: translateX(calc(var(--dir, 1) * 14px)); } }
  @keyframes fade { from { opacity: 0; } }
  @keyframes grow { from { transform: scaleX(0); } }
  @keyframes dot-in { from { left: 50%; } }
}
