/* MagicBucket.pro — pop-art comic site.
   No scripts, no cookies, nothing loaded from third-party servers.
   Each chapter page sets a theme class on <body> (theme-drop, theme-trick, ...). */

@font-face {
  font-family: "Bangers";
  src: url(fonts/bangers-latin.woff2) format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #16171f;
  --paper: #fffdf6;
  --cream: #f3f1e5;
  --yellow: #ffe14d;
  --red: #e8322b;
  --blue: #1d5fc9;
  --muted: #4c4f5e;
  --comic: "Bangers", "Impact", "Arial Black", sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* theme defaults (overridden per chapter) */
  --bg: linear-gradient(160deg, #fff6d8, #ffe9a6);
  --dot: rgba(232, 50, 43, .16);
  --dot-size: 16px;
  --accent: var(--red);
  --accent-ink: #fff;
  --title: var(--yellow);
  --on-bg: var(--ink);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font: 18px/1.6 var(--text);
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    radial-gradient(circle, var(--dot) 26%, transparent 28%),
    var(--bg);
  background-size: var(--dot-size) var(--dot-size), 100% 100%;
  background-attachment: fixed, fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; }

a { color: var(--blue); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; box-shadow: 0 0 0 7px var(--ink); }

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--yellow);
  color: var(--ink);
  border: 3px solid var(--ink);
  font-weight: 700;
}
.skip:focus { top: 12px; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ------------------------------------------------------------ top bar */

.bar {
  position: relative;
  z-index: 5;
  background: var(--paper);
  border-bottom: 4px solid var(--ink);
}

.bar-in {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px 20px;
  flex-wrap: wrap;
}

.brand { display: block; line-height: 0; transition: transform .12s; }
.brand img { display: block; width: auto; height: 46px; }
.brand:hover { transform: rotate(-1.5deg) scale(1.03); }
@media (max-width: 420px) { .brand img { height: 38px; } }

.chapters {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chapters a {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font: 1.15rem/1 var(--comic);
  text-decoration: none;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform .12s;
}
.chapters a:hover { transform: translate(-1px, -2px) rotate(-6deg); }
.chapters a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }

.chapters-nav { display: flex; align-items: center; gap: 8px; }
.bar-next { display: block; width: 52px; height: 34px; transition: transform .12s; }
.bar-next svg { display: block; width: 100%; height: 100%; overflow: visible; }
.bar-next .sh { fill: var(--ink); }
.bar-next .fg { fill: var(--accent); stroke: var(--ink); stroke-width: 3px; stroke-linejoin: round; }
.bar-next:hover { transform: translateX(5px); }

.bar-cta { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.bar-cta .login { font-weight: 700; color: var(--ink); }

@media (max-width: 760px) {
  .chapters-nav { order: 3; width: 100%; justify-content: space-between; }
  .bar-cta { gap: 8px; }
  .bar-cta .btn { padding: 6px 10px; font-size: 1rem; }
}

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-block;
  padding: 9px 18px 7px;
  font: 1.2rem/1.1 var(--comic);
  letter-spacing: .04em;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform .1s, box-shadow .1s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-hot { background: var(--red); color: #fff; }
.btn-big { font-size: 1.6rem; padding: 12px 26px 9px; }

/* ------------------------------------------------------------ layout */

main { flex: 1; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.center { margin-left: auto; margin-right: auto; }
.last { margin-bottom: 46px; }
.mt { margin-top: 16px !important; }

/* ------------------------------------------------------------ comic elements */

.panel {
  position: relative;
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 6px;
  box-shadow: 8px 8px 0 var(--ink);
  padding: 22px 24px;
  margin: 0 0 30px;
}
.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }

.panel h2, .panel h3 {
  font: 1.9rem/1.05 var(--comic);
  letter-spacing: .03em;
  margin: 0 0 10px;
}
.panel h3 { font-size: 1.45rem; }

.panel.tilt-l { transform: rotate(-.6deg); }
.panel.tilt-r { transform: rotate(.6deg); }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 30px; align-items: start; }
@media (max-width: 820px) {
  .grid2 { grid-template-columns: 1fr; }
  .panel.tilt-l, .panel.tilt-r { transform: none; }
}

/* narration box (yellow caption, Lichtenstein style) */
.caption {
  display: inline-block;
  background: var(--yellow);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  padding: 12px 16px;
  font-size: 1.12rem;
  line-height: 1.5;
  margin: 0;
  max-width: 720px;
  color: var(--ink);
}

/* speech bubble */
.bubble {
  position: relative;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 28px;
  padding: 16px 22px;
  margin: 0 0 34px;
}
.bubble p { margin: 0; }
.bubble::after {
  content: "";
  position: absolute;
  left: 46px;
  bottom: -26px;
  width: 30px;
  height: 26px;
  background: #fff;
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  transform: skewX(-25deg);
}
.bubble::before {
  content: "";
  position: absolute;
  left: 44px;
  bottom: -3px;
  width: 36px;
  height: 6px;
  background: #fff;
  z-index: 1;
}

/* starburst label */
.pow {
  display: inline-grid;
  place-items: center;
  min-width: 92px;
  aspect-ratio: 1;
  padding: 18px;
  font: 1.05rem/1 var(--comic);
  letter-spacing: .05em;
  color: var(--ink);
  background: var(--yellow);
  clip-path: polygon(50% 0, 61% 26%, 90% 10%, 76% 38%, 100% 50%, 76% 62%, 90% 90%, 61% 74%, 50% 100%, 39% 74%, 10% 90%, 24% 62%, 0 50%, 24% 38%, 10% 10%, 39% 26%);
  filter: drop-shadow(3px 3px 0 var(--ink));
  vertical-align: middle;
}

/* honesty labels (as on rozlicz.org: target / example) */
.tag {
  display: inline-block;
  font: .95rem/1 var(--comic);
  letter-spacing: .08em;
  padding: 4px 8px 3px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: #fff;
  vertical-align: .15em;
  white-space: nowrap;
}
.tag-target { background: #ffd6d2; }
.tag-example { background: #d8ecff; }

/* comic title */
.comic-title {
  font: clamp(2.5rem, 6.4vw, 4.8rem)/.98 var(--comic);
  letter-spacing: .025em;
  color: var(--title);
  text-shadow:
    -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 2px 2px 0 var(--ink),
    0 -2px 0 var(--ink), 0 2px 0 var(--ink), -2px 0 0 var(--ink), 2px 0 0 var(--ink),
    6px 6px 0 var(--ink);
  margin: 0 0 18px;
}

.section-title { font-size: clamp(2rem, 4.6vw, 3.2rem); margin-top: 44px; }

.kicker {
  display: inline-block;
  font: 1.15rem/1 var(--comic);
  letter-spacing: .08em;
  background: var(--ink);
  color: #fff;
  padding: 6px 10px 4px;
  transform: rotate(-2deg);
  margin: 0 0 14px;
}

/* tables inside panels */
.panel table { width: 100%; border-collapse: collapse; font-size: .96rem; margin: 6px 0 4px; }
.panel th, .panel td { border: 2px solid var(--ink); padding: 7px 10px; text-align: left; vertical-align: top; }
.panel th { background: #f1ede0; font-weight: 700; }
.table-scroll { overflow-x: auto; }

.receipt td:first-child { white-space: nowrap; font-weight: 700; }
.ok { color: #157a37; font-weight: 700; }
.no { color: #b3261e; font-weight: 700; }
.mid { color: #8a5d00; font-weight: 700; }

.status-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.status-row li { border: 2px solid var(--ink); border-radius: 999px; padding: 2px 12px; background: #fff; font-weight: 700; font-size: .95rem; }
.status-row .s-ok { background: #c9f2d6; }
.status-row .s-mid { background: #ffe7a3; }
.status-row .s-no { background: #ffd2cc; }

/* numbered comic steps */
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.steps > li { counter-increment: s; position: relative; padding: 0 0 16px 58px; min-height: 60px; }
.steps > li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: -2px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font: 1.4rem/1 var(--comic);
  background: var(--accent);
  color: var(--accent-ink);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 2px 2px 0 var(--ink);
}
.steps > li:last-child { padding-bottom: 0; }

.checks { list-style: none; margin: 0; padding: 0; }
.checks li { position: relative; padding-left: 32px; margin: 0 0 8px; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .3em;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border: 2px solid var(--ink);
  clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 76%, 20% 100%, 30% 60%, 0 38%, 38% 35%);
}

/* "what it means for you" */
.so-what {
  position: relative;
  margin: 10px 0 40px;
  padding: 26px 26px 22px 120px;
  background: var(--yellow);
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
}
.so-what h2 { font: 1.7rem/1 var(--comic); letter-spacing: .04em; margin: 0 0 8px; }
.so-what p { margin: 0; font-size: 1.12rem; }
.so-what::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 86px;
  height: 90px;
  margin-top: -45px;
  background: url(img/bucket.webp) center / contain no-repeat;
  transform: rotate(-8deg);
}
@media (max-width: 600px) {
  .so-what { padding: 96px 18px 18px; }
  .so-what::before { top: 12px; left: 18px; margin-top: 0; width: 66px; height: 70px; }
}

/* ------------------------------------------------------------ chapter hero */

.ch-hero {
  position: relative;
  padding: 34px 0 30px;
  overflow: hidden;
}
.ch-hero::before {
  content: "";
  position: absolute;
  inset: -40% -10%;
  background: repeating-conic-gradient(from 0deg at 30% 50%, rgba(255, 255, 255, .16) 0 5deg, transparent 5deg 14deg);
  pointer-events: none;
}
.ch-hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 26px 40px;
  align-items: center;
}
.ch-card {
  margin: 0;
  justify-self: center;
  transform: rotate(-2.5deg);
}
.ch-card img {
  display: block;
  border: 5px solid var(--ink);
  border-radius: 16px;
  box-shadow: 10px 10px 0 var(--ink);
  background: var(--ink);
}
.ch-head { color: var(--on-bg); }
@media (max-width: 820px) {
  .ch-hero .wrap { grid-template-columns: 1fr; }
  .ch-card { max-width: 340px; }
}

.chapter-body { padding: 10px 0 20px; }

/* ------------------------------------------------------------ next-chapter arrow */

.next-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 30px;
  align-items: center;
  margin: 10px 0 46px;
}
.next-arrow {
  position: relative;
  display: block;
  min-height: 150px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .15s;
}
.next-arrow svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.next-arrow .sh { fill: var(--ink); }
.next-arrow .fg { fill: var(--accent); stroke: var(--ink); stroke-width: 5px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.next-arrow .lbl {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 150px;
  padding: 30px 31% 26px 6%;
  font: clamp(1.35rem, 2.9vw, 2.1rem)/1.02 var(--comic);
  letter-spacing: .03em;
  color: var(--accent-ink);
  text-shadow: var(--lbl-shadow, 2px 2px 0 var(--ink));
}
.next-arrow .lbl small {
  display: block;
  font-size: .55em;
  letter-spacing: .1em;
  margin-bottom: 4px;
  color: var(--accent-ink);
}
.next-arrow:hover { transform: translateX(10px) rotate(-.6deg); }
.next-arrow:hover .fg { animation: wobble .5s ease-in-out; }
.next-thumb img {
  display: block;
  width: 170px;
  border: 4px solid var(--ink);
  border-radius: 12px;
  box-shadow: 6px 6px 0 var(--ink);
  transform: rotate(3deg);
}
.prev-link {
  grid-column: 1 / -1;
  font-weight: 700;
  color: var(--on-bg);
}
.prev-link a { color: inherit; }
@keyframes wobble { 50% { transform: translateX(6px); } }
@media (max-width: 600px) {
  .next-nav { grid-template-columns: 1fr; }
  .next-thumb { display: none; }
}

/* ------------------------------------------------------------ home: two comic sheets lying on top of each other */

.hero {
  position: relative;
  overflow: hidden;
  padding: 92px 16px clamp(44px, 6vw, 84px);
  background:
    radial-gradient(circle, rgba(232, 50, 43, .85) 30%, transparent 32%) 0 0 / 18px 18px,
    #fff3c4;
  --star: polygon(54% 0.2%, 61.7% 17%, 75.5% 13%, 78.2% 26%, 95.2% 28.5%, 82.5% 44%, 92.9% 53.4%, 85.8% 62.7%, 90.3% 77.8%, 72% 75.9%, 69.7% 91.5%, 56.5% 85.4%, 46% 99.8%, 38.3% 83%, 25% 86.2%, 21.1% 74.6%, 6.6% 70.6%, 17.5% 56%, 5.1% 46.4%, 15.1% 37.6%, 8.8% 21.6%, 28% 24.1%, 31.5% 11.2%, 43.5% 14.6%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: repeating-conic-gradient(from 0deg at 38% 34%, #ffd23a 0 8deg, #fff1a8 8deg 16deg);
  -webkit-mask: radial-gradient(circle at 38% 34%, #000 0 26%, transparent 58%);
  mask: radial-gradient(circle at 38% 34%, #000 0 26%, transparent 58%);
  pointer-events: none;
}

.sheets {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 63fr) minmax(0, 37fr);
  grid-template-areas: "logo arrow" "map map";
  align-items: center;
}

/* a sheet of comic paper: ink edge, hard shadow, slightly turned */
.sheet {
  position: relative;
  background: #f6f3e6;
  border: 5px solid var(--ink);
  border-radius: 3px;
  box-shadow: 12px 12px 0 var(--ink);
}

.sheet-logo {
  grid-area: logo;
  z-index: 2;
  margin: 0 0 0 1%;
  font-size: inherit;
  transform: rotate(-2.2deg);
  background: var(--cream);
}
.logo-art { position: relative; display: block; }
.logo-art img { display: block; width: 100%; height: auto; }

/* the lower sheet: its blank top margin slides under the logo sheet, so no artwork is covered */
.sheet-map {
  grid-area: map;
  z-index: 1;
  justify-self: end;
  width: 93%;
  margin-top: -64px;
  padding: 94px 22px 22px;
  transform: rotate(1.4deg);
}

.comic-map { position: relative; }
.comic-map img { display: block; width: 100%; }
.comic-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.comic-map polygon { fill: transparent; stroke: transparent; stroke-width: 8px; stroke-linejoin: round; transition: fill .15s; }
.comic-map a:hover polygon, .comic-map a:focus-visible polygon { fill: rgba(255, 255, 255, .16); stroke: var(--yellow); }
.comic-map a:focus { outline: none; }
.comic-map a:focus-visible polygon { stroke-width: 12px; }

/* start arrow: no label, it nods to be clicked */
.start-arrow {
  grid-area: arrow;
  justify-self: center;
  display: block;
  width: min(80%, 240px);
  aspect-ratio: 220 / 140;
  animation: nod 2.6s ease-in-out infinite;
  transform-origin: 20% 50%;
}
.start-arrow svg { display: block; width: 100%; height: 100%; overflow: visible; }
.start-arrow .sh { fill: var(--ink); }
.start-arrow .fg { fill: var(--red); stroke: var(--ink); stroke-width: 7px; stroke-linejoin: round; }
.start-arrow:hover { animation-play-state: paused; }
.start-arrow:hover .fg { fill: #ff4a3d; }
.start-arrow:focus-visible { outline-offset: 8px; }
@keyframes nod {
  0%, 46%, 100% { transform: translateX(0) rotate(0); }
  10% { transform: translateX(16px) rotate(-5deg); }
  20% { transform: translateX(0) rotate(3deg); }
  30% { transform: translateX(10px) rotate(-3deg); }
  38% { transform: translateX(0) rotate(1deg); }
}

/* top corners: LOG IN button (left) and a GET TEST ACCESS burst (right) */
.hero-login {
  position: absolute;
  z-index: 3;
  top: 20px;
  left: max(16px, calc(50% - 620px));
  font-size: 1.55rem;
  padding: 10px 22px 8px;
  background: #fff;
  transform: rotate(-3deg);
}
.hero-login:hover { transform: rotate(-3deg) translate(-2px, -2px); }

.hero-burst {
  position: absolute;
  z-index: 3;
  top: 4px;
  right: max(10px, calc(50% - 630px));
  width: 232px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  text-decoration: none;
  filter: drop-shadow(5px 5px 0 var(--ink));
  transform: rotate(8deg);
  transition: transform .15s;
}
.hero-burst::before, .hero-burst::after {
  content: "";
  position: absolute;
  clip-path: var(--star);
}
.hero-burst::before { inset: 0; background: var(--ink); }
.hero-burst::after { inset: 8px; background: radial-gradient(circle, #fffbd0 0 30%, #ffe14d 55%, #ffb12e 100%); }
.hero-burst span {
  position: relative;
  z-index: 1;
  font: 2.15rem/.9 var(--comic);
  letter-spacing: .03em;
  text-align: center;
  color: var(--red);
  text-shadow:
    -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 2px 2px 0 var(--ink),
    0 -2px 0 var(--ink), 0 2px 0 var(--ink), -2px 0 0 var(--ink), 2px 0 0 var(--ink);
  transform: rotate(-6deg);
}
.hero-burst:hover { transform: rotate(2deg) scale(1.07); }

@media (max-width: 760px) {
  .hero { padding-top: 128px; }
  .sheets { grid-template-columns: minmax(0, 1fr) 84px; }
  .sheet { border-width: 4px; box-shadow: 7px 7px 0 var(--ink); }
  .sheet-logo { margin: 0; transform: rotate(-1.6deg); }
  .sheet-map { width: 100%; margin-top: -24px; padding: 40px 10px 10px; transform: rotate(1deg); }
  .start-arrow { width: 74px; }
  .hero-login { top: 16px; left: 14px; }
  .hero-login { font-size: 1.2rem; padding: 8px 14px 6px; }
  .hero-burst { width: 138px; top: 0; right: 4px; }
  .hero-burst span { font-size: 1.3rem; }
}

/* ------------------------------------------------------------ form */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.field label, .field legend { display: block; font-weight: 700; margin: 0 0 4px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .9rem; }
.field input[type=text], .field input[type=email], .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 9px 11px;
  border: 3px solid var(--ink);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--accent); outline-offset: 1px; box-shadow: none; }
.field fieldset { border: 0; margin: 0; padding: 0; }
.field .opts { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.field .opts label { font-weight: 400; display: inline-flex; gap: 6px; align-items: center; }
.field input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
.req { color: #b3261e; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .92rem; color: var(--muted); margin: 14px 0 0; }
.form-submit { margin: 20px 0 0; }

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin: 28px 0 0; }
.hero-cta.cta-left { justify-content: flex-start; margin-bottom: 46px; }

/* ------------------------------------------------------------ legal / plain pages */

.doc { padding: 34px 0 40px; }
.doc .panel { padding: 28px 30px; }
.doc h1 { font: clamp(2.2rem, 5vw, 3.2rem)/1 var(--comic); letter-spacing: .03em; margin: 0 0 6px; }
.doc h2 { font: 1.6rem/1.1 var(--comic); letter-spacing: .03em; margin: 30px 0 8px; }
.doc .meta { color: var(--muted); margin: 0 0 20px; }
.doc ol, .doc ul { padding-left: 1.4em; }
.doc li { margin: 0 0 6px; }
.doc .summary { background: #fff7cf; border: 3px solid var(--ink); padding: 14px 18px; margin: 0 0 24px; }
.doc .summary h2 { margin-top: 0; }

/* ------------------------------------------------------------ footer */

.foot {
  background: var(--ink);
  color: #e9e6da;
  border-top: 4px solid var(--ink);
  font-size: .95rem;
  line-height: 1.55;
}
.foot-in { max-width: 1080px; margin: 0 auto; padding: 28px 16px 34px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 20px 34px; }
.foot a { color: #fff; }
.foot h2 { font: 1.25rem/1 var(--comic); letter-spacing: .06em; color: var(--yellow); margin: 0 0 8px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 0 0 4px; }
.foot p { margin: 0 0 8px; }
.foot .fine { grid-column: 1 / -1; border-top: 1px solid #3a3c4a; padding-top: 14px; color: #b9b6aa; font-size: .88rem; }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ themes (colours follow each title card) */

.theme-drop {
  --bg: linear-gradient(115deg, #1b58c4 0 52%, #e2342b 52% 100%);
  --dot: rgba(255, 255, 255, .13);
  --accent: #e8322b;
  --accent-ink: #fff;
  --title: #ffe14d;
  --on-bg: #fff;
}
.theme-trick {
  --bg: radial-gradient(120% 90% at 70% 30%, #6a32a3, #3a175f 70%);
  --dot: rgba(255, 210, 90, .12);
  --accent: #f5c542;
  --accent-ink: var(--ink);
  --title: #ffd84d;
  --on-bg: #fff;
}
.theme-fishy {
  --bg: radial-gradient(120% 100% at 30% 20%, #ffe066, #ffbf1f 70%);
  --dot: rgba(232, 110, 20, .22);
  --accent: #1d8fd8;
  --accent-ink: #fff;
  --title: #47b6f5;
  --on-bg: var(--ink);
}
.theme-cold {
  --bg: linear-gradient(180deg, #d9f2fe, #8fd0f2);
  --dot: rgba(255, 255, 255, .55);
  --accent: #1f6fb8;
  --accent-ink: #fff;
  --title: #fff;
  --on-bg: var(--ink);
}
.theme-abra {
  --bg: radial-gradient(120% 100% at 50% 0%, #ff8a1f, #e3341c 65%, #b8200f);
  --dot: rgba(255, 214, 58, .22);
  --accent: #ffd23a;
  --accent-ink: var(--ink);
  --title: #ffd23a;
  --on-bg: #fff;
}
.theme-believe {
  --bg: radial-gradient(120% 100% at 50% 20%, #24376b, #111a35 70%);
  --dot: rgba(240, 196, 80, .12);
  --accent: #f0c450;
  --accent-ink: var(--ink);
  --title: #ffe9a8;
  --on-bg: #fff;
}
.theme-fish {
  --bg: linear-gradient(115deg, #ff8a1e 0 22%, #13a7b8 22% 100%);
  --dot: rgba(255, 255, 255, .14);
  --accent: #ff8a1e;
  --accent-ink: var(--ink);
  --title: #9ff3ff;
  --on-bg: #fff;
}
.theme-plain {
  --bg: linear-gradient(180deg, #f8f4e6, #efe9d3);
  --dot: rgba(22, 23, 31, .05);
  --accent: #1d5fc9;
  --accent-ink: #fff;
  --title: var(--yellow);
  --on-bg: var(--ink);
}

/* dark text on a light arrow: no dark drop shadow (it would make the label unreadable) */
.theme-trick, .theme-abra, .theme-believe, .theme-fish { --lbl-shadow: none; }

/* light-background chapters: dark text next to the title card */
.theme-fishy .ch-head, .theme-cold .ch-head, .theme-plain .ch-head { color: var(--ink); }

/* ------------------------------------------------------------ motion */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  body { background: #fff; }
  .bar, .foot, .next-nav, .skip { display: none; }
  .panel { box-shadow: none; }
}
