/* The footer (site/partials/footer.html), the same on every page, everything centred: survey, the runes,
   one line, the site map, the legal line. Its colours are the site's (base.css), so it reads the same on the cream home, on
   /wizard and on Dead Agents Society's parchment. */
.site-foot { flex: none; width: 100%; margin-top: 4rem; border-top: 2px solid var(--ink); background: var(--foot); color: var(--muted);
  padding: 2.4rem max(16px, calc((100% - 42rem) / 2 + 16px)) max(2.4rem, env(safe-area-inset-bottom)); font: .95rem/1.55 var(--sans); text-align: center; }
body:has(#crew) .site-foot { padding-bottom: 110px; }   /* the crew's ground, on the pages they live on */
.site-foot p { margin: 0; }
.site-foot > * { width: min(100%, 30rem); margin-left: auto; margin-right: auto; }

/* X, GitHub and Hugging Face, big enough to notice */
.runes { display: flex; flex-wrap: wrap; gap: .8rem; margin: .4rem 0 1.2rem; }
.site-foot .runes { width: 100%; margin: 0 auto 1.8rem; justify-content: center; }
/* the About page shows them already */
body:has(.about) .site-foot .runes { display: none; }
.rune { font: 700 1.1rem/1 var(--sans); color: var(--bg); background: var(--accent); padding: .8rem 1.1rem; }
.rune span { font: 500 .85rem/1 var(--sans); color: color-mix(in srgb, var(--bg) 78%, var(--accent)); }
.rune:hover { background: var(--ink); }

.foot-line { font: 600 1.05rem/1.5 var(--sans); color: var(--ink); margin: 0 auto 1.8rem !important; text-wrap: balance; }

/* the site map: one centred column, so it is symmetrical however long a line gets. Each part of the site, then its pages
   on one line, wrapping in the middle; a new agent joins Quirky Agents' line. Pages with nothing under them: the legal line */
.foot-map { display: grid; gap: 1.2rem; justify-items: center; width: 100%; }
.foot-map > div { display: grid; gap: .35rem; justify-items: center; }
.foot-map p { text-wrap: balance; }
.foot-map a { color: var(--muted); }
.foot-map .foot-top { font: 600 1rem/1.3 var(--sans); color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--gold); }
.foot-map .foot-top:hover { border-bottom-color: var(--accent); }
.foot-legal { margin: 1.8rem auto 0 !important; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .85rem; }
.foot-legal a { color: var(--muted); }

/* a live count (stats.js), wherever a page shows one: a pixel soul, still, in the agent's mascot colour
   (--agent, set by stats.js from the mascot's palette; ink until it loads) */
.agent-count { display: inline-flex; align-items: center; gap: .45em; font: 600 .82rem/1.4 var(--sans); letter-spacing: .04em; color: var(--agent, var(--ink)); }
:root[data-theme="dark"] .agent-count { color: var(--agent-light, var(--ink)); }
.agent-count::before { content: ""; flex: none; width: 13px; height: 13px; background: var(--agent, var(--ink));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' shape-rendering='crispEdges'%3E%3Crect x='3' y='0' width='1' height='1'/%3E%3Crect x='4' y='0' width='1' height='1'/%3E%3Crect x='5' y='0' width='1' height='1'/%3E%3Crect x='1' y='1' width='1' height='1'/%3E%3Crect x='2' y='1' width='1' height='1'/%3E%3Crect x='3' y='1' width='1' height='1'/%3E%3Crect x='4' y='1' width='1' height='1'/%3E%3Crect x='5' y='1' width='1' height='1'/%3E%3Crect x='6' y='1' width='1' height='1'/%3E%3Crect x='7' y='1' width='1' height='1'/%3E%3Crect x='1' y='2' width='1' height='1'/%3E%3Crect x='2' y='2' width='1' height='1'/%3E%3Crect x='3' y='2' width='1' height='1'/%3E%3Crect x='4' y='2' width='1' height='1'/%3E%3Crect x='5' y='2' width='1' height='1'/%3E%3Crect x='6' y='2' width='1' height='1'/%3E%3Crect x='7' y='2' width='1' height='1'/%3E%3Crect x='0' y='3' width='1' height='1'/%3E%3Crect x='1' y='3' width='1' height='1'/%3E%3Crect x='3' y='3' width='1' height='1'/%3E%3Crect x='4' y='3' width='1' height='1'/%3E%3Crect x='5' y='3' width='1' height='1'/%3E%3Crect x='7' y='3' width='1' height='1'/%3E%3Crect x='8' y='3' width='1' height='1'/%3E%3Crect x='0' y='4' width='1' height='1'/%3E%3Crect x='1' y='4' width='1' height='1'/%3E%3Crect x='3' y='4' width='1' height='1'/%3E%3Crect x='4' y='4' width='1' height='1'/%3E%3Crect x='5' y='4' width='1' height='1'/%3E%3Crect x='7' y='4' width='1' height='1'/%3E%3Crect x='8' y='4' width='1' height='1'/%3E%3Crect x='0' y='5' width='1' height='1'/%3E%3Crect x='1' y='5' width='1' height='1'/%3E%3Crect x='2' y='5' width='1' height='1'/%3E%3Crect x='3' y='5' width='1' height='1'/%3E%3Crect x='4' y='5' width='1' height='1'/%3E%3Crect x='5' y='5' width='1' height='1'/%3E%3Crect x='6' y='5' width='1' height='1'/%3E%3Crect x='7' y='5' width='1' height='1'/%3E%3Crect x='8' y='5' width='1' height='1'/%3E%3Crect x='0' y='6' width='1' height='1'/%3E%3Crect x='1' y='6' width='1' height='1'/%3E%3Crect x='2' y='6' width='1' height='1'/%3E%3Crect x='3' y='6' width='1' height='1'/%3E%3Crect x='4' y='6' width='1' height='1'/%3E%3Crect x='5' y='6' width='1' height='1'/%3E%3Crect x='6' y='6' width='1' height='1'/%3E%3Crect x='7' y='6' width='1' height='1'/%3E%3Crect x='8' y='6' width='1' height='1'/%3E%3Crect x='0' y='7' width='1' height='1'/%3E%3Crect x='1' y='7' width='1' height='1'/%3E%3Crect x='2' y='7' width='1' height='1'/%3E%3Crect x='3' y='7' width='1' height='1'/%3E%3Crect x='4' y='7' width='1' height='1'/%3E%3Crect x='5' y='7' width='1' height='1'/%3E%3Crect x='6' y='7' width='1' height='1'/%3E%3Crect x='7' y='7' width='1' height='1'/%3E%3Crect x='8' y='7' width='1' height='1'/%3E%3Crect x='0' y='8' width='1' height='1'/%3E%3Crect x='2' y='8' width='1' height='1'/%3E%3Crect x='3' y='8' width='1' height='1'/%3E%3Crect x='5' y='8' width='1' height='1'/%3E%3Crect x='6' y='8' width='1' height='1'/%3E%3Crect x='8' y='8' width='1' height='1'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' shape-rendering='crispEdges'%3E%3Crect x='3' y='0' width='1' height='1'/%3E%3Crect x='4' y='0' width='1' height='1'/%3E%3Crect x='5' y='0' width='1' height='1'/%3E%3Crect x='1' y='1' width='1' height='1'/%3E%3Crect x='2' y='1' width='1' height='1'/%3E%3Crect x='3' y='1' width='1' height='1'/%3E%3Crect x='4' y='1' width='1' height='1'/%3E%3Crect x='5' y='1' width='1' height='1'/%3E%3Crect x='6' y='1' width='1' height='1'/%3E%3Crect x='7' y='1' width='1' height='1'/%3E%3Crect x='1' y='2' width='1' height='1'/%3E%3Crect x='2' y='2' width='1' height='1'/%3E%3Crect x='3' y='2' width='1' height='1'/%3E%3Crect x='4' y='2' width='1' height='1'/%3E%3Crect x='5' y='2' width='1' height='1'/%3E%3Crect x='6' y='2' width='1' height='1'/%3E%3Crect x='7' y='2' width='1' height='1'/%3E%3Crect x='0' y='3' width='1' height='1'/%3E%3Crect x='1' y='3' width='1' height='1'/%3E%3Crect x='3' y='3' width='1' height='1'/%3E%3Crect x='4' y='3' width='1' height='1'/%3E%3Crect x='5' y='3' width='1' height='1'/%3E%3Crect x='7' y='3' width='1' height='1'/%3E%3Crect x='8' y='3' width='1' height='1'/%3E%3Crect x='0' y='4' width='1' height='1'/%3E%3Crect x='1' y='4' width='1' height='1'/%3E%3Crect x='3' y='4' width='1' height='1'/%3E%3Crect x='4' y='4' width='1' height='1'/%3E%3Crect x='5' y='4' width='1' height='1'/%3E%3Crect x='7' y='4' width='1' height='1'/%3E%3Crect x='8' y='4' width='1' height='1'/%3E%3Crect x='0' y='5' width='1' height='1'/%3E%3Crect x='1' y='5' width='1' height='1'/%3E%3Crect x='2' y='5' width='1' height='1'/%3E%3Crect x='3' y='5' width='1' height='1'/%3E%3Crect x='4' y='5' width='1' height='1'/%3E%3Crect x='5' y='5' width='1' height='1'/%3E%3Crect x='6' y='5' width='1' height='1'/%3E%3Crect x='7' y='5' width='1' height='1'/%3E%3Crect x='8' y='5' width='1' height='1'/%3E%3Crect x='0' y='6' width='1' height='1'/%3E%3Crect x='1' y='6' width='1' height='1'/%3E%3Crect x='2' y='6' width='1' height='1'/%3E%3Crect x='3' y='6' width='1' height='1'/%3E%3Crect x='4' y='6' width='1' height='1'/%3E%3Crect x='5' y='6' width='1' height='1'/%3E%3Crect x='6' y='6' width='1' height='1'/%3E%3Crect x='7' y='6' width='1' height='1'/%3E%3Crect x='8' y='6' width='1' height='1'/%3E%3Crect x='0' y='7' width='1' height='1'/%3E%3Crect x='1' y='7' width='1' height='1'/%3E%3Crect x='2' y='7' width='1' height='1'/%3E%3Crect x='3' y='7' width='1' height='1'/%3E%3Crect x='4' y='7' width='1' height='1'/%3E%3Crect x='5' y='7' width='1' height='1'/%3E%3Crect x='6' y='7' width='1' height='1'/%3E%3Crect x='7' y='7' width='1' height='1'/%3E%3Crect x='8' y='7' width='1' height='1'/%3E%3Crect x='0' y='8' width='1' height='1'/%3E%3Crect x='2' y='8' width='1' height='1'/%3E%3Crect x='3' y='8' width='1' height='1'/%3E%3Crect x='5' y='8' width='1' height='1'/%3E%3Crect x='6' y='8' width='1' height='1'/%3E%3Crect x='8' y='8' width='1' height='1'/%3E%3C/svg%3E") center / contain no-repeat; }

/* the survey */
.survey { margin: 0 auto 2.2rem; text-align: left; background: var(--card); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--line); color: var(--ink); }
.survey > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.2rem; padding: .7rem 1.2rem; cursor: pointer; list-style: none; }
.survey > summary::-webkit-details-marker { display: none; }
.survey > summary:hover { background: var(--bg); }
.survey > summary:focus-visible { outline: 2px dashed var(--accent); outline-offset: 3px; }
.survey h2 { font: 600 .82rem/1.4 Atkinson, system-ui, sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); margin: 0; }
.survey-arrow { flex: none; width: 16px; height: 10px; fill: var(--ink); shape-rendering: crispEdges; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.survey[open] .survey-arrow { transform: rotate(180deg); }
.survey[open] > summary { padding-bottom: .3rem; }
.survey > :not(summary) { margin-left: 1.2rem; margin-right: 1.2rem; }
.survey > .survey-q { margin-top: .3rem; }
.survey > .survey-meta { margin-bottom: 1rem; }
.survey-q { font-size: 1.1rem; line-height: 1.4; margin: 0 0 .8rem; }
.survey-opts { display: grid; gap: .5rem; }
.survey-opt { position: relative; display: flex; align-items: center; justify-content: space-between; gap: .8rem; width: 100%; min-height: 2.75rem;
  padding: .55rem .8rem; border: 2px solid var(--ink); background: var(--bg); color: var(--ink); font: 1rem/1.3 Atkinson, system-ui, sans-serif; text-align: left; overflow: hidden; }
button.survey-opt { cursor: pointer; }
button.survey-opt:hover { background: var(--line); }
button.survey-opt:focus-visible { outline: 2px dashed var(--accent); outline-offset: 3px; }
.survey-opt .bar { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--bar); transition: width .7s cubic-bezier(.2, .7, .2, 1); }
.survey-opt.mine .bar { background: var(--bar-mine); }
.survey-opt .label, .survey-opt .pct { position: relative; }
.survey-opt .pct { font: 600 .9rem/1 Atkinson, system-ui, sans-serif; white-space: nowrap; }
.survey-opt.mine .label { font-weight: 700; }
.survey.busy .survey-opts { opacity: .6; pointer-events: none; }
.survey-meta { font: .75rem/1.5 Atkinson, system-ui, sans-serif; color: var(--muted); letter-spacing: .02em; margin: .7rem 0 0; }
.survey-opt .you { font: 500 .62rem/1 Atkinson, system-ui, sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-left: .5em; vertical-align: .15em; white-space: nowrap; display: inline-block; }
@media (prefers-reduced-motion: reduce) { .survey-opt .bar { transition: none; } }
