/* The Skeptic: 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;
}

* { 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; }

/* The Suspend judgment button, then the big finish */
.suspend-cta { margin-top: 20px; text-align: center; animation: pop 0.5s ease-out; }
#suspend-button {
  font: 600 1.3rem var(--loud);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 16px 40px;
  background: var(--win);
  border-color: var(--win);
  box-shadow: 5px 5px 0 var(--sun);
}
#suspend-button:hover { filter: brightness(1.1); }

.closed-note {
  margin-top: 20px;
  padding: 16px;
  text-align: center;
  background: var(--sun-soft);
  border: 1px dashed var(--sun);
  border-radius: 8px;
}
.closed-note p { margin: 0 0 12px; }
.closed-note strong { color: var(--win); }

.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;
}

/* The certificate */
.certificate {
  --gold: #b08a3e;
  width: 100%;
  max-width: 760px;
  padding: 14px;
  background: #fdf8ec;
  border: 3px double var(--gold);
  box-shadow: 0 2px 0 var(--line), 0 18px 40px rgba(90, 60, 20, 0.18);
  animation: pop 0.6s ease-out;
  font-family: var(--serif);
}
.cert-inner {
  position: relative;
  padding: 36px 40px 28px;
  text-align: center;
  border: 2px solid var(--gold);
  outline: 1px solid var(--gold);
  outline-offset: -8px;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 70%),
    repeating-linear-gradient(45deg, rgba(176, 138, 62, 0.05) 0 2px, transparent 2px 10px);
}
/* Corner ornaments */
.cert-inner::before, .cert-inner::after {
  content: "❦";
  position: absolute;
  top: 14px;
  font-size: 1.5rem;
  color: var(--gold);
}
.cert-inner::before { left: 20px; transform: scaleX(-1); }
.cert-inner::after { right: 20px; }

.cert-school {
  font: 500 0.78rem var(--serif);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin: 0 0 10px;
}
.cert-title {
  font: 400 3.6rem/1 "UnifrakturMaguntia", var(--display);
  color: var(--accent-dark);
  margin: 0;
}
.cert-of {
  font: 600 1.15rem var(--display);
  font-variant: small-caps;
  letter-spacing: 0.14em;
  margin: 4px 0 22px;
}
.cert-text { margin: 4px 0; font-size: 1.05rem; }
.cert-name {
  font: 400 3.6rem/1.15 "Pinyon Script", cursive;
  color: var(--ink);
  margin: 6px auto 4px;
  padding: 0 16px 4px;
  border-bottom: 1px solid var(--gold);
  display: inline-block;
  min-width: 60%;
  overflow-wrap: anywhere;
}
.cert-claim { font-style: italic; font-size: 1.15rem; margin: 6px 0; }
.cert-gift { color: var(--muted); font-size: 0.95rem; margin-top: 10px; }

.cert-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 16px;
  margin-top: 26px;
}
.cert-sign { display: flex; flex-direction: column; align-items: center; }
.cert-signature {
  /* An old-fashioned copperplate hand in iron-gall ink, nearly level, as if signed with a quill. */
  font: 400 3.4rem/0.9 "Monsieur La Doulaise", cursive;
  color: #3a2716;
  text-shadow: 0 0 0.6px rgba(58, 39, 22, 0.55);
  transform: rotate(-1.5deg) translateY(6px);
  position: relative;
  z-index: 1;
  white-space: nowrap;
}
.cert-date { font: italic 1.05rem var(--serif); }
.cert-line {
  width: 100%;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--ink);
  font-size: 0.78rem;
  color: var(--muted);
}

/* Wax seal: an irregular blob of wax with a stamped, slightly sunken impression */
.seal { width: 160px; height: 160px; filter: drop-shadow(1px 3px 2px rgba(70, 15, 8, 0.4)); transform: rotate(-4deg); }
.seal-hi { fill: none; stroke: rgba(255, 190, 170, 0.35); stroke-width: 1.5; }
.seal-lo { fill: none; stroke: rgba(70, 10, 5, 0.45); stroke-width: 2; }
.seal-rim { fill: none; stroke: rgba(255, 205, 190, 0.55); stroke-width: 1.2; }
.seal-ring-text { font: 600 11.5px var(--display); fill: rgba(255, 228, 218, 0.92); }
.seal-centre { font: 600 31px var(--display); fill: rgba(255, 232, 224, 0.95); }
.seal-centre-hi { fill: rgba(70, 10, 5, 0.45); }

.end-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
@keyframes pop { from { transform: scale(0.92); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .suspend-cta, .certificate { animation: none; } }

.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); }
.suspend-cta p { margin: 10px 0 0; }
.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; }
  .cert-inner { padding: 30px 16px 22px; }
  .cert-title { font-size: 2.6rem; }
  .cert-name { font-size: 2.6rem; min-width: 80%; }
  .cert-footer { grid-template-columns: 1fr 1fr; }
  .seal { grid-column: 1 / -1; grid-row: 1; justify-self: center; width: 140px; height: 140px; }
}

.out-of-oil .funding { display: block; margin-top: 6px; font-size: 0.9rem; }

.map-note { font-size: 0.85rem; text-align: center; }

.early-exit { margin: 14px auto; max-width: 560px; padding: 12px 16px; border: 1px dashed var(--line); border-radius: 10px; text-align: center; font-size: 0.95rem; color: var(--muted); }
.early-exit p { margin: 0 0 10px; }
.early-exit button { margin: 0 6px; }

.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; }
.legend-items { display: grid; grid-template-columns: repeat(2, max-content); grid-auto-flow: column; grid-template-rows: repeat(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; }
.legend-item svg[viewBox="0 0 40 20"] { width: 34px; height: 16px; }
.lg-box { fill: #fffdf8; stroke: var(--line); stroke-width: 1; }
.lg-link { fill: none; stroke: var(--ink); stroke-width: 1.1; }
.lg-link.lg-broken { stroke: #b8afa3; 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-target { background: var(--sun-soft); border: 1.5px solid #e0b419; color: var(--ink); }
.lg-suggested { background: #fffdf8; border: 1.5px dashed var(--muted); }
.lg-mark { font-weight: 700; }
.lg-ok { color: var(--win); }
.lg-bad { color: #c0392b; }
.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: #fffdf8; 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: #fff; }
.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: #e0b419; stroke-width: 2; }
.am-ended rect { fill: #f4f1ea; }
.am-end-set_aside { opacity: 0.55; }
.am-moot, .am-link.am-moot, .am-arrowhead.am-moot { opacity: 0.35; }
.am-circle rect { stroke: #c0392b; stroke-width: 2; fill: #fbe9e6; }
.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: #c0392b; }
.am-end-set_aside text.am-note { fill: var(--muted); font-weight: 400; }
.am-q-dot { fill: var(--sun); stroke: #c99a06; 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 { display: inline; }
.am-removable:hover rect { fill: #ece8e1; stroke: #a69c90; }
.am-remove circle { fill: #7a6d63; stroke: #fff; stroke-width: 1.5; }
.am-box .am-remove text { font: 700 13px var(--serif); fill: #fff; }
.am-remove:hover circle { fill: #c0392b; }
body.busy .am-remove { display: none !important; }
.am-link { stroke: var(--ink); stroke-width: 1.2; fill: none; }
.am-arrowhead { fill: var(--ink); }
.am-link.am-broken { stroke: #b8afa3; stroke-dasharray: 5 4; }
.am-arrowhead.am-broken { fill: #b8afa3; }
.am-x { font: 700 15px var(--serif); fill: #c0392b; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.am-x-label { font: 600 11px var(--serif); fill: #c0392b; 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; }
.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;
}

/* Print just the certificate */
@media print {
  body { background: #fff; }
  .masthead, footer, #start, #debate, .end > .congrats, .end-actions, .rating { display: none !important; }
  .end { padding: 0; }
  .certificate { box-shadow: none; animation: none; max-width: none; }
  @page { size: landscape; margin: 12mm; }
}

/* ---------- 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; }
  #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-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; }
.site-nav a:hover, .site-nav a:focus-visible { background: var(--sun); color: var(--ink); }
.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; }
  .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; }
