/* The engine's pages (the Skeptic's, the Workshop's and the Clinic's; each adds its own stylesheet): bright parchment,
   terracotta, and a dash of late-night-TV yellow. Light only. */

:root {
  color-scheme: light;
  --bg: #fbf6ea;
  --surface: #ffffff;
  --ink: #2a2320;
  --muted: #7a6d63;
  --line: #eadfca;
  --accent: #b4482a;
  --accent-dark: #8f3519;
  --accent-soft: #fbe6dc;
  --sun: #ffd23f;
  --sun-soft: #fff4c7;
  --visitor: #f3ecdd;
  --win: #2f7a3b;
  --serif: "EB Garamond", Georgia, serif;
  --display: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --loud: "Oswald", "Arial Narrow", Impact, sans-serif;
  /* The argument map and its legend (argmap.js) */
  --map-box: #fffdf8;
  --map-ended: #f4f1ea;
  --map-faded: #b8afa3;
  --map-hover: #ece8e1;
  --map-hover-line: #a69c90;
  --sun-line: #e0b419;
  --sun-dark: #c99a06;
  --bad: #c0392b;
  --bad-soft: #fbe9e6;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 18px/1.55 var(--serif);
}
main { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
[hidden] { display: none !important; }

.masthead { text-align: center; padding: 36px 16px 12px; }
.masthead h1 {
  font: 700 3.4rem/1 var(--display);
  letter-spacing: 0.04em;
  margin: 0;
  color: var(--accent);
}
.masthead .tagline { margin: 8px 0 0; font-style: italic; color: var(--muted); }

/* ---------- Start screen (infomercial) ---------- */

.start {
  display: grid;
  grid-template-columns: 1fr 300px;
  grid-template-areas: "pitch spokes" "order order" "quotes quotes" "fine fine";
  gap: 28px;
  align-items: start;
  margin-top: 16px;
}
.pitch { position: relative; grid-area: pitch; }
.pitch h2 {
  font: 700 2.3rem/1.1 var(--display);
  margin: 6px 0 12px;
}

/* Sextus Empiricus, our spokesman, in his own column, presenting the starburst on his open palm */
.spokesman {
  grid-area: spokes;
  position: relative;
  margin: 0;
  align-self: start;
}
.spokesman img { display: block; width: 100%; height: auto; }
.spokesman figcaption { text-align: center; font-style: italic; margin-top: -6px; }
.spokesman figcaption span { display: block; font-style: normal; font-size: 0.85rem; color: var(--muted); margin-top: 2px; }
.lede { font-size: 1.15rem; margin: 0 0 18px; }
.lede strong { color: var(--accent); }

.starburst {
  position: absolute;
  top: -6px;
  right: 0;
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  background: var(--sun);
  clip-path: polygon(50% 0%, 61% 15%, 79% 7%, 80% 26%, 98% 30%, 88% 46%, 100% 61%, 82% 69%, 84% 88%, 65% 85%, 55% 100%, 43% 87%, 25% 95%, 21% 77%, 3% 72%, 12% 55%, 0% 40%, 17% 31%, 15% 12%, 34% 15%);
  transform: rotate(12deg);
  animation: wobble 3s ease-in-out infinite;
}
.starburst span {
  font: 600 0.85rem/1.15 var(--loud);
  text-transform: uppercase;
  text-align: center;
  color: var(--accent-dark);
}
@keyframes wobble { 50% { transform: rotate(4deg) scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .starburst { animation: none; } }

.benefits { list-style: none; padding: 0; margin: 0 0 22px; }
.benefits li { padding: 4px 0 4px 32px; position: relative; }
.benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font: 600 0.8rem/22px var(--loud);
  text-align: center;
}

.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; grid-area: quotes; margin-top: 12px; }
.testimonials blockquote {
  margin: 0;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--sun);
  border-radius: 4px;
  font-style: italic;
}
.testimonials cite {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--muted);
}
.testimonials cite::before { content: "— "; }

.order {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 6px 6px 0 var(--sun);
  grid-area: order;
  position: relative;
  margin-top: 44px;   /* room for the starburst sticking up from the corner */
  width: 100%;
  max-width: 620px;
  justify-self: center;
}
.order .starburst { top: -40px; right: -46px; }
.order h3 { font: 600 1.4rem var(--loud); text-transform: uppercase; margin: 0; color: var(--accent); letter-spacing: 0.02em; }
.order .small { margin: 4px 0 0; }
.rules { font-size: 0.88rem; margin: 18px 0 0; padding-top: 14px; border-top: 1px dashed var(--line); }
.fineprint { grid-area: fine; font-size: 0.75rem; color: var(--muted); margin: 4px 0 0; text-align: center; }

label { display: block; margin: 16px 0 0; font-weight: 500; }
input, textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
button {
  font: 500 1rem var(--serif);
  padding: 10px 22px;
  border-radius: 4px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
button:hover { background: var(--accent-dark); }
button:disabled { opacity: 0.5; cursor: wait; }
button.quiet { background: transparent; color: var(--accent); padding: 6px 12px; }
button.quiet:hover { background: var(--accent-soft); }
#start-form button[type="submit"] {
  width: 100%;
  margin-top: 26px;
  padding: 14px;
  font: 600 1.15rem var(--loud);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.suggestions { margin-top: 12px; }
#suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
#suggestions button {
  font: 400 0.88rem var(--serif);
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--sun-soft);
  border: 1px solid var(--sun);
  color: var(--ink);
}
#suggestions button:hover { background: var(--sun); }
.error { color: var(--accent); font-style: italic; min-height: 1.5em; margin: 12px 0 0; }

/* ---------- Progress strip ---------- */

/* Status bar: progress and claim, pinned to the top of the screen */
.status-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 20px;
  margin: 0 -16px 20px;
  padding: 10px 16px;
  background: rgba(251, 246, 234, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(4px);
}
.progress {
  list-style: none;
  display: flex;
  width: 100%;
  padding: 0;
  margin: 0;
}
/* One continuous track; reached steps fill with green, like a real progress bar. */
.progress li {
  flex: 1;
  position: relative;
  text-align: center;
  font-size: 0.85rem;
  padding: 2px 4px 16px;
  color: var(--muted);
  transition: color 0.4s;
}
.progress li::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  background: var(--line) linear-gradient(var(--win), var(--win)) no-repeat left / 0% 100%;
  transition: background-size 0.6s ease;
}
.progress li:first-child::after { border-radius: 5px 0 0 5px; }
.progress li:last-child::after { border-radius: 0 5px 5px 0; }
.progress li + li::after { box-shadow: inset 1px 0 rgba(255, 255, 255, 0.7); }
.progress li.reached { color: var(--win); font-weight: 600; }
.progress li.reached::after { background-size: 100% 100%; }
.status-claim { margin: 0; font-size: 0.95rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.status-label { color: var(--muted); }

/* ---------- Debate ---------- */

#debate { max-width: 1200px; margin: 0 auto; }
main:has(#debate:not([hidden])) { max-width: 1240px; }
/* Chat first, map below it at full width (the map needs the room). */
.debate-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.conversation { width: 100%; max-width: 780px; margin: 0 auto; }
.conversation h2 { font: 600 1.6rem var(--display); margin: 0 0 16px; }

.log { display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 88%; padding: 12px 16px; border-radius: 6px; scroll-margin-top: 90px; }
.msg.skeptic { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); }
.msg.visitor { align-self: flex-end; background: var(--visitor); }
.msg .who { font-size: 0.8rem; color: var(--muted); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.msg .avatar { width: 34px; height: 34px; margin: -4px 0 -2px -4px; }
.mode {
  display: inline-block;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 3px;
  padding: 1px 8px;
  margin-bottom: 6px;
}
.msg p { margin: 0; }
.thinking { color: var(--muted); font-style: italic; }

.end { display: grid; justify-items: center; gap: 20px; padding: 8px 0; }
.end > .congrats {
  font: 600 1.25rem/1.3 var(--loud);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--win);
  text-align: center;
  margin: 0;
}

.end-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
@keyframes pop { from { transform: scale(0.92); opacity: 0; } }

.say { margin-top: 20px; }
.say textarea:disabled, .say button:disabled { opacity: 0.55; cursor: not-allowed; background: #efe9dd; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.choices button { font-size: 0.92rem; padding: 6px 12px; background: var(--sun-soft); border-color: #e0b419; color: var(--ink); }
.choices button:hover { background: var(--sun); }
.say-row { display: flex; gap: 10px; align-items: flex-end; }
.say-buttons { display: flex; flex-direction: column; gap: 6px; }
#give-up { font-size: 0.85rem; padding: 6px 10px; white-space: nowrap; }
.say textarea { margin: 0; resize: vertical; }
.actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }

/* Ledger */
.ledger {
  position: static;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px 20px;
  font-size: 0.95rem;
}
.claim { margin: 0; }
/* The argument map (an SVG diagram, drawn by argmap.js) */
.ladder { font-size: 0.9rem; }
.ladder > p.muted { text-align: center; font-style: italic; margin: 8px 0; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; margin: 0; }

footer { text-align: center; color: #f6e7dc; background: var(--accent-dark); font-size: 0.85rem; padding: 22px 16px 24px; margin-top: 40px; }
footer p { margin: 4px 0; }
footer a { color: var(--sun); }

@media (max-width: 800px) {
  body { font-size: 17px; }
  .masthead h1 { font-size: 2.6rem; }
  .start { grid-template-columns: 1fr; grid-template-areas: "spokes" "pitch" "quotes" "order" "fine"; }
  .pitch h2 { font-size: 1.9rem; }
  .spokesman { width: 240px; justify-self: center; }
  .testimonials { grid-template-columns: 1fr; }
  .order .starburst { width: 84px; height: 84px; top: -34px; right: -10px; }
  .order .starburst span { font-size: 0.7rem; }
  .debate-layout { grid-template-columns: 1fr; gap: 20px; }
  .ledger { position: static; }
  .msg { max-width: 100%; scroll-margin-top: 110px; }
  .progress li { font-size: 0.75rem; }
  .status-claim { font-size: 0.85rem; }
}


.invite-gate { text-align: center; padding: 6px 4px 2px; }
.invite-gate .gate-title { font: 600 1.15rem var(--display); margin: 0 0 6px; }
.invite-gate .gate-row { display: flex; gap: 8px; justify-content: center; margin: 12px 0 4px; }
.invite-gate .gate-row input { max-width: 240px; }
.invite-gate a { color: var(--accent); }
.invite-gate .gate-ask { font-size: 1.05rem; margin: 8px 0 8px; }
/* The invitation button: as loud as the Suspend judgment one */
.request-cta {
  font: 600 1.15rem var(--loud);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 14px 28px;
  background: var(--win);
  border-color: var(--win);
  box-shadow: 5px 5px 0 var(--sun);
  max-width: 100%;
  white-space: normal;
}
.request-cta:hover { filter: brightness(1.1); background: var(--win); }

.say-count { display: block; font-size: 0.8rem; color: var(--muted); text-align: right; }

/* The small "?" buttons: a mode's explanation, and full citations. Discreet: a see-through circle. */
.mode-q, .cite-q { margin-left: 5px; width: 1.2em; height: 1.2em; padding: 0; border-radius: 50%; border: 1px solid currentColor;
  background: transparent; color: var(--accent-dark); opacity: 0.7; font: 600 0.72rem/1 var(--serif); font-style: normal;
  cursor: pointer; vertical-align: 1px; display: inline-flex; align-items: center; justify-content: center; }
.mode-q:hover, .cite-q:hover { opacity: 1; }
.mode-info, .cite-box { margin: 0 0 8px; padding: 6px 10px; font-size: 0.85rem; color: var(--muted); background: #fbf7ee;
  border-left: 3px solid var(--accent-soft); border-radius: 3px; text-align: left; font-style: normal; }
@media print { .mode-q, .cite-q, .cite-box, .mode-info { display: none !important; } }

.request-form { max-width: 360px; margin: 10px auto 0; text-align: left; }
.request-form label { display: block; margin-bottom: 8px; font-size: 0.95rem; }
.request-form input { width: 100%; margin-top: 3px; }
.request-form button { margin-top: 4px; }
#request-msg { margin: 8px 0 0; font-size: 0.95rem; }

.request-page { max-width: 520px; margin: 30px auto; }
.request-page .request-form { max-width: none; }
.request-form textarea { width: 100%; margin-top: 3px; font: inherit; }

/* Honeypot field: off-screen, invisible to people */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Map legend */
.legend { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.legend summary { cursor: pointer; font-size: 0.9rem; color: var(--accent); width: max-content; }
.legend[open] summary { margin-bottom: 10px; }
/* Two columns, filled down, the first the longer by at most one (chat.js sets --rows from how many items the guide has:
   Angela, 2026-11-10, "make it fit evenly for all guides"). */
.legend-items { display: grid; grid-template-columns: repeat(2, max-content); grid-auto-flow: column; grid-template-rows: repeat(var(--rows, 4), auto); gap: 8px 48px; font-size: 0.85rem; color: var(--muted); }
.legend-item { min-height: 30px; }
@media (max-width: 560px) { .legend-items { grid-template-columns: 1fr; grid-auto-flow: row; grid-template-rows: none; } }
.legend-item { display: grid; grid-template-columns: 64px auto 20px; align-items: center; gap: 8px; }
.legend-item > span:first-child:not(.lg-chip):not(.lg-mark), .legend-item .lg-chip, .legend-item .lg-mark { justify-self: center; }
.legend-item svg { width: 60px; height: 42px; }
/* Being asked about: the box with the map's "?" on its corner (Angela, 2026-11-10). */
.legend-item svg.lg-asked { width: 40px; height: 23px; justify-self: center; }
.lg-target-box { fill: var(--sun-soft); stroke: var(--sun-line); stroke-width: 1.5; }
.lg-q-dot { fill: var(--sun); stroke: var(--sun-dark); stroke-width: 1; }
.lg-q-mark { font: 700 9px var(--loud); fill: var(--ink); }
.legend-item svg[viewBox="0 0 40 20"] { width: 34px; height: 16px; }
.lg-box { fill: var(--map-box); stroke: var(--line); stroke-width: 1; }
.lg-link { fill: none; stroke: var(--ink); stroke-width: 1.1; }
.lg-link.lg-broken { stroke: var(--map-faded); stroke-dasharray: 4 3; stroke-width: 1.5; }
.lg-head { fill: var(--ink); }
.lg-chip { display: inline-grid; place-items: center; width: 22px; height: 14px; border-radius: 3px; font: 700 10px var(--loud); }
.lg-suggested { background: var(--map-box); border: 1.5px dashed var(--muted); }
.lg-mark { font-weight: 700; }
.lg-ok { color: var(--win); }
.lg-bad { color: var(--bad); }
.lg-q { width: 18px; height: 18px; padding: 0; border-radius: 50%; font: 700 11px var(--serif); background: transparent; color: var(--accent); border: 1px solid var(--accent); line-height: 16px; }
.lg-q:hover { background: var(--accent-soft); }
.legend-explain { margin: 8px 0 0; font-size: 0.88rem; color: var(--ink); background: var(--sun-soft); border-radius: 5px; padding: 8px 12px; }

.trilemma-note { font-size: 0.85rem; color: var(--muted); margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }

/* Argument map (drawn by argmap.js) */
.map-head { display: flex; justify-content: flex-end; }
.map-head:has(#enlarge-map[hidden]) { display: none; }
.small-btn { font-size: 0.8rem; padding: 3px 10px; }
.argmap-svg { display: block; height: auto; margin: 4px auto 0; }
.am-box rect { fill: var(--map-box); stroke: var(--line); stroke-width: 1.2; }
.am-box text { font: 13.5px "EB Garamond", Georgia, serif; fill: var(--ink); }
.am-belief rect { stroke: var(--ink); stroke-width: 2.5; fill: var(--surface); }
.am-belief text { font-size: 14.5px; }
.am-box text.am-belief-tag { font: 700 9.5px var(--serif); letter-spacing: 0.12em; fill: var(--ink); }
.am-belief text { font-weight: 600; }
.am-unstated rect { stroke-dasharray: 4 3; stroke: var(--muted); }
.am-target rect { fill: var(--sun-soft); stroke: var(--sun-line); stroke-width: 2; }
.am-ended rect { fill: var(--map-ended); }
.am-end-set_aside { opacity: 0.55; }
.am-moot, .am-link.am-moot, .am-arrowhead.am-moot { opacity: 0.35; }
.am-circle rect { stroke: var(--bad); stroke-width: 2; fill: var(--bad-soft); }
.am-dots rect { stroke: none; fill: transparent; }
.am-dots text:not(.am-note) { font-size: 20px; letter-spacing: 3px; }
.am-box text.am-tag { font: 600 9px var(--serif); letter-spacing: 0.08em; text-transform: uppercase; fill: var(--muted); }
.am-box text.am-note { font: 600 11.5px var(--serif); }
.am-ok text.am-note { fill: var(--win); }
.am-bad text.am-note { fill: var(--bad); }
.am-end-set_aside text.am-note { fill: var(--muted); font-weight: 400; }
.am-q-dot { fill: var(--sun); stroke: var(--sun-dark); stroke-width: 1; }
.am-box text.am-q { font: 700 13px var(--loud); fill: var(--ink); }
.am-remove { display: none; cursor: pointer; }
.am-removable:hover .am-remove, .am-removable:focus-within .am-remove { display: inline; }
.am-removable:focus-visible rect, .am-remove:focus-visible circle { outline: none; stroke: var(--accent); stroke-width: 2.5; }
.am-removable:focus { outline: none; }
/* Picking a statement by its box (argmap.js onPick) */
.am-pickable { cursor: pointer; }
.am-editable { cursor: pointer; }
/* No focus ring around the whole statement (it takes in the tags above the box, and flashed on each click: Angela,
   2026-11-08); from the keyboard, the box's own edge lights up instead. */
.am-editable:focus { outline: none; }
.am-editable:focus-visible rect:not(.am-label rect) { stroke: var(--accent); stroke-width: 2.5; }
.am-box g.am-label rect { fill: var(--surface); stroke: var(--line); stroke-width: 1; stroke-dasharray: none; }   /* (a tab on the top edge, outlined: Angela 2026-11-09) */
/* Its outline in the box's own colour, whatever state the box is in (Angela, 2026-11-09). */
.am-belief g.am-label rect { stroke: var(--ink); }
.am-unstated g.am-label rect { stroke: var(--muted); }
.am-target g.am-label rect { stroke: var(--sun-line); }
.am-circle g.am-label rect { stroke: var(--bad); }
.am-removable:hover g.am-label rect { stroke: var(--map-hover-line); }
.am-pickable:hover g.am-label rect, .am-pickable:focus-visible g.am-label rect, .am-picked g.am-label rect { stroke: var(--accent); }
.am-box .am-label text { font: 700 9.5px "EB Garamond", Georgia, serif; fill: var(--ink); }
.am-pickable:hover rect, .am-pickable:focus-visible rect { stroke: var(--accent); stroke-width: 2.5; }
.am-pickable:focus { outline: none; }
.am-picked rect { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 3; }
.am-removable:hover rect { fill: var(--map-hover); stroke: var(--map-hover-line); }
.am-remove circle { fill: var(--muted); stroke: var(--surface); stroke-width: 1.5; }
.am-box .am-remove text { font: 700 13px var(--serif); fill: var(--surface); }
.am-remove:hover circle { fill: var(--bad); }
body.busy .am-remove { display: none !important; }
/* Definitions (argmap.js; Angela, 2026-11-10): a defined word, and its meaning when it's read in, in the guide's colour
   (the page's accent; a map in the Library, its own guide's: clinic.css .am-guide-*); the glossary card beside or under
   the map, with the switch. */
.am-defined { fill: var(--am-defined, var(--accent)); font-weight: 600; }
.am-card { fill: var(--surface); stroke: var(--line); stroke-width: 1; }
.am-defs text { font: 13.5px "EB Garamond", Georgia, serif; fill: var(--ink); }
.am-defs text.am-defs-title { font: 700 9.5px var(--serif); letter-spacing: 0.12em; text-transform: uppercase; fill: var(--muted); }
.am-defs text.am-switch-label { font: 600 11px var(--serif); fill: var(--muted); }
.am-def-bg { fill: transparent; }
.am-def.am-editable:hover .am-def-bg, .am-def.am-editable:focus-visible .am-def-bg { fill: var(--map-hover); }
.am-switch { cursor: pointer; }
.am-switch:focus { outline: none; }
.am-switch-track { fill: var(--line); }
.am-switch-on .am-switch-track { fill: var(--am-defined, var(--accent)); }
.am-switch:focus-visible .am-switch-track { stroke: var(--ink); stroke-width: 1.5; }
.am-switch-knob { fill: var(--surface); }
.am-defs .am-remove text { font: 700 13px var(--serif); fill: var(--surface); }
.am-link { stroke: var(--ink); stroke-width: 1.2; fill: none; }
/* The step being asked about (a link question): its arrow highlighted, with the question's "?" on it */
.am-link.am-link-target { stroke: var(--sun-line); stroke-width: 3; }
.am-links text.am-q { font: 700 13px var(--loud); fill: var(--ink); }
.am-arrowhead { fill: var(--ink); }
.am-link.am-broken { stroke: var(--map-faded); stroke-dasharray: 5 4; }
.am-arrowhead.am-broken { fill: var(--map-faded); }
.am-x { font: 700 15px var(--serif); fill: var(--bad); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.am-x-label { font: 600 11px var(--serif); fill: var(--bad); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.am-end-set_aside tspan { text-decoration: line-through; }
.map-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(42, 35, 32, 0.45); display: grid; place-items: center; padding: 16px; }
.map-overlay-inner { background: var(--surface); border-radius: 8px; padding: 16px; max-width: 100%; max-height: 100%; overflow: auto; box-shadow: 0 10px 40px rgba(0,0,0,0.3); }
.map-overlay-inner #close-map { float: right; }
/* Rewording a statement on the map (Angela, 2026-11-08): a small box with its words. */
.reword-overlay { z-index: 60; }
.reword-box { width: min(440px, 100%); box-sizing: border-box; }
.reword-box h3 { margin: 0 0 10px; font-size: 1.05rem; }
.reword-box textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; resize: vertical; }
.reword-buttons { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }
/* Editing in the box itself (big enough to read): a field over the box, in its words' size, growing as they type. */
.reword-host { position: relative; }
.reword-inbox { position: absolute; z-index: 5; box-sizing: border-box; margin: 0; resize: none; overflow: hidden; text-align: center;
  font-family: "EB Garamond", Georgia, serif; line-height: 1.2; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--accent); box-shadow: 0 3px 10px rgba(0,0,0,0.12); }
/* One line around it, not two (Angela, 2026-11-08: "I don't love the double lines while editing"): no focus ring. */
textarea.reword-inbox:focus { outline: none; }
.reword-inbox-root { font-weight: 600; }
.reword-inbox-def { text-align: left; }
.reword-inbox-lead { position: absolute; z-index: 6; pointer-events: none; font-family: "EB Garamond", Georgia, serif; font-weight: 600; color: var(--am-defined, var(--accent)); white-space: nowrap; }
.share-inner { width: min(760px, 100%); box-sizing: border-box; text-align: center; }
.share-inner #share-close { float: right; }
.share-title { font: 600 1.2rem var(--display); margin: 4px 0 12px; }
#share-card { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; margin: 0 0 14px; }
#share-msg { min-height: 1.4em; margin: 8px 0 0; }

/* ---------- FAQ page ---------- */
.masthead h1 a { color: inherit; text-decoration: none; }
.faq { max-width: 760px; }
.faq-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; margin: 4px 0 8px; font-size: 0.95rem; }
.faq-nav a, .faq a { color: var(--accent); }
.faq h2 { font: 700 1.8rem var(--display); margin: 32px 0 10px; color: var(--accent-dark); scroll-margin-top: 16px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 8px 0;
  padding: 0 18px;
}
.faq summary {
  cursor: pointer;
  font: 600 1.15rem var(--display);
  padding: 12px 0;
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 10px; font: 600 1.3rem var(--loud); color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq details > :not(summary) { margin: 0 0 14px; }
.faq ul { padding-left: 22px; }
.faq li { margin: 6px 0; }
.faq-back { text-align: center; margin: 32px 0 0; }
.faq-back .button {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font: 600 1.05rem var(--loud);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}


/* ---------- Debate PDF (printed from the page; black and white) ---------- */
#printout { display: none; }
@media print {
  body.print-debate > *:not(#printout) { display: none !important; }
  body.print-debate { background: #fff; }
  body.print-debate #printout { display: block; color: #000; font: 11.5pt/1.45 "EB Garamond", Georgia, serif; }
  #printout header { text-align: center; margin-bottom: 18pt; border-bottom: 1px solid #000; padding-bottom: 10pt; }
  #printout .p-site { margin: 0; font: 600 9pt var(--serif); letter-spacing: 0.15em; text-transform: uppercase; }
  #printout h1 { margin: 4pt 0; font: 600 18pt "Cormorant Garamond", Georgia, serif; }
  #printout .p-date { margin: 0; font-style: italic; }
  #printout .p-msg { margin: 0 0 9pt; width: fit-content; max-width: 80%; break-inside: avoid; }
  /* Each exchange beside the map as it stood after it (as in the sample debate: Angela, 2026-11-08). */
  #printout .p-row { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14pt; align-items: start; margin: 0 0 6pt; }
  #printout .p-row > * { min-width: 0; }
  #printout .p-row .p-msg { max-width: 92%; }
  #printout .p-side-map { border: 1px solid #000; border-radius: 4pt; padding: 6pt; break-inside: avoid; }
  #printout .p-side-map svg { display: block; max-width: 100%; height: auto; margin: 0 auto; filter: grayscale(1); }
  #printout .p-skeptic { margin-right: auto; }
  #printout .p-visitor { margin-left: auto; text-align: left; }
  #printout .p-who { font: 600 8.5pt var(--serif); letter-spacing: 0.08em; text-transform: uppercase; margin: 0 4pt 2pt; }
  #printout .p-visitor .p-who { text-align: right; }
  #printout .p-bubble { border: 1px solid #000; border-radius: 10pt; padding: 6pt 10pt; }
  #printout .p-skeptic .p-bubble { background: #ececec; border-color: #ececec; border-top-left-radius: 2pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #printout .p-visitor .p-bubble { background: #fff; border-top-right-radius: 2pt; }
  #printout .p-note { text-align: center; font-style: italic; font-size: 10pt; margin: 4pt 0 10pt; }
  #printout .p-part { text-align: center; font: 600 14pt "Cormorant Garamond", Georgia, serif; margin: 0 0 12pt; }
  #printout .p-map { page: mapsheet; break-before: page; }
  #printout .p-map h2 { text-align: center; font: 600 16pt "Cormorant Garamond", Georgia, serif; margin: 0 0 16pt; }
  #printout .p-map-box svg { display: block; margin: 0 auto; max-width: none; filter: grayscale(1); }
  #printout .am-remove, #printout .am-q-dot, #printout .am-q { display: none; }
}

/* Required-field asterisk */
.req { color: #c0392b; font-weight: 600; }

/* The skeptic's invitation to correct the map, just under it */
.map-fix { font-style: italic; font-size: 0.92rem; color: var(--muted, #6b6258); text-align: center; margin: 22px 0 12px; }

/* Paragraph breaks in the Skeptic's replies: a small gap */
.pbreak { display: block; height: 0.45em; }

/* Cloudflare's "Verify you are human" box, when it shows: room above it */
#turnstile-box:not(:empty) { margin-top: 26px; }
/* An empty error line takes no room, so the gaps above the check and above the button match. */
#start-error:empty { min-height: 0; margin: 0; }

/* Feedback: the end-of-debate rating, and "Something went wrong?" during a debate */
.rating { width: min(520px, 100%); justify-self: center; margin: 26px auto 8px; text-align: center; }
.rating-q { font: 600 1.1rem var(--display); margin: 0 0 6px; }
.stars { display: flex; justify-content: center; gap: 4px; margin-bottom: 10px; }
.star { background: none; border: none; padding: 0 2px; font-size: 2rem; line-height: 1; color: #d9cfbd; cursor: pointer; }
.star:hover, .star.on { background: none; color: var(--sun); text-shadow: 0 0 1px #b8860b; }
.rating textarea { width: 100%; margin-bottom: 8px; }
.problem { margin-top: 6px; font-size: 0.9rem; text-align: right; }
.problem a { color: var(--muted, #8a7f70); }
.problem-box { display: flex; gap: 6px; margin-top: 6px; }
.problem-box input { flex: 1; }

/* ---------- Site menu (nav.js) ---------- */
.site-nav { background: var(--accent-dark); }
.site-nav ul { list-style: none; margin: 0 auto; padding: 0 16px; max-width: 1100px; display: flex; justify-content: center; gap: 0; }
.site-nav a { display: block; padding: 10px 23px; color: #fff; text-decoration: none; font: 600 0.95rem var(--loud); text-transform: uppercase;
  letter-spacing: 0.09em; border-radius: 0; margin: 0; }
/* (Hover colours only where there's a real pointer: on a phone a tap left them stuck, and with the phone's own tap flash
   the menu flickered as the next page came in. Angela, 2026-11-07.) */
@media (hover: hover) { .site-nav a:hover { background: var(--sun); color: var(--ink); } }
.site-nav a:focus-visible { background: var(--sun); color: var(--ink); }
.site-nav a, .site-nav .nav-toggle { -webkit-tap-highlight-color: transparent; }
.site-nav a[aria-current="page"] { background: var(--sun); color: var(--ink); }
.site-nav .nav-toggle { display: none; }
@media (max-width: 640px) {
  .site-nav .nav-toggle { display: flex; align-items: center; gap: 8px; margin: 0 0 0 auto; padding: 10px 16px; background: none; border: 0; border-radius: 0; box-shadow: none;
    color: #fff; font: 600 0.95rem var(--loud); text-transform: uppercase; letter-spacing: 0.09em; cursor: pointer; }
  @media (hover: hover) { .site-nav .nav-toggle:hover { background: var(--sun); color: var(--ink); } }
  .site-nav .nav-toggle .bars { font-size: 1.2rem; line-height: 1; }
  .site-nav { display: flex; flex-direction: column; }
  .site-nav ul { display: none; flex-direction: column; gap: 0; padding: 0 0 6px; width: 100%; box-sizing: border-box; }
  .site-nav.open ul { display: flex; }
}
@media print { .site-nav { display: none !important; } }

/* Kid-friendly switch, above "Popular choices" on the start page. */
.kid-switch { display: inline-flex; align-items: center; gap: 8px; font: 400 0.88rem var(--serif); color: var(--ink); cursor: pointer; margin: 0 0 8px; }
.kid-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kid-switch .track { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--line); border: 1px solid #d9ccb3; transition: background 0.2s; flex: none; }
.kid-switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.25); transition: transform 0.2s; }
.kid-switch input:checked + .track { background: var(--win); border-color: var(--win); }
.kid-switch input:checked + .track::after { transform: translateX(14px); }
.kid-switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* "Enter it here" after a visitor limit: the code box inside the message. */
.code-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.code-row input { flex: 1 1 160px; max-width: 260px; font-style: normal; }
.code-row .error { flex-basis: 100%; margin: 4px 0 0; min-height: 0; }

/* "Forget my code", under the start form while an access code is in use. */
.forget-code { margin: 8px 0 0; font-size: 0.85rem; color: var(--muted); text-align: center; }

/* The end's share row (chat.js; Angela, 2026-11-09): "Share:" and small round buttons, one per social site */
.end-share { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-top: 2px; }
.end-share-label { color: var(--muted); font-size: 0.95rem; margin-right: 4px; }
.end-share > .end-share-btn { width: 34px; height: 34px; padding: 0; margin: 0; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--muted); text-decoration: none; box-shadow: none; }
.end-share > .end-share-btn:hover, .end-share > .end-share-btn:focus-visible { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.end-share > .end-share-btn svg { display: block; }
