/* Cartoon design ("Saturday Morning"). Copied from kUInetic's demo/cartoon.html; deliberately NOT Leon Editorial.
   First block: the only rules this page needs from that demo's fonts.css and system.css (kept so nothing else is pulled in).
   Second block: the page's own stylesheet, unchanged except that the demo site's header is gone. */
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(./inter-latin.woff2) format('woff2');
}
:root, :root[data-theme='light'] {
  --bg: #ffffff; --surface: #ffffff; --fg: #000000; --muted: #666666; --border: #e4e4e2;
  --accent: #e4f222; --accent-ink: #000000; --accent-text: #000000;
  --shadow-float: 0 20px 48px rgb(8 9 10 / 0.10);
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv01' on, 'ss03' on, 'zero' on;
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { margin: 0; font-weight: 510; }
p { margin: 0; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
.kui-replay-fab {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 60; width: 52px; height: 52px; padding: 0; border: none; border-radius: 50%;
  background: var(--fg); color: var(--bg); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-float);
}
.kui-replay-fab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kui-show-code-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  align-self: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  color: var(--accent);
  background: var(--accent-ink);
  /* A ring, not a hard edge: on a surface that is itself solid `--accent-ink` (a dark-theme card,
     a black caption bar) a same-colour fill would have no visible boundary of its own — only the
     label would show. The ring is a fixed blend of the pair rather than either endpoint, so it
     stays visible against a black backdrop, a yellow one, or anything between. */
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--accent-ink));
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  flex: none;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.kui-show-code-toggle:hover,
.kui-show-code-toggle:focus-visible {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
  filter: none;
}
.kui-has-toggle { flex-direction: column; align-items: flex-start; gap: 0.7rem; }
figure .kui-show-code-toggle { margin: 0; }

/* The one addition: the way back to the Designs hub, in the demo header's old spot. */
.back-link {
  position: absolute; top: 0.9rem; left: clamp(1rem, 3.5vw, 3.5rem); z-index: 3;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.85rem;
  background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink);
  font: 700 0.8rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; text-decoration: none;
}
.back-link:hover { background: var(--sun); }
.back-link:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---------- the page's own stylesheet ---------- */
/* Sunday funnies: flat saturated fields, black gutters, thick outlines, hard shadows with no blur.
   Nothing soft on this page. Every section is one colour and the type is rounded and fat. */
:root {
  --ink: #111111; --paper: #fffbe6; --sun: #ffd400; --amber: #ffae00; --tomato: #ff3d1f;
  --pink: #ff4fa3; --sky: #1fc2ff; --lime: #b8f000; --grape: #7a2cff; --mint: #00d68f;
  --toon: 'Arial Rounded MT Bold', 'Arial Black', Inter, system-ui, sans-serif;
  --line: clamp(4px, 0.45vw, 6px);
  --drop: clamp(6px, 0.8vw, 12px);
}
body { background: var(--ink); }
main { overflow-x: clip; }


.scene {
  position: relative; padding: clamp(3.5rem, 7vw, 7rem) clamp(1rem, 3.5vw, 3.5rem);
  background-color: var(--field); color: var(--ink);
  border-top: clamp(8px, 1vw, 14px) solid var(--ink);
  background-image: radial-gradient(rgb(0 0 0 / 0.13) 22%, transparent 24%);
  background-size: 14px 14px;
}
.scene-wrap { max-width: 1500px; margin-inline: auto; }

.toon {
  font-family: var(--toon); font-weight: 700; text-transform: uppercase; line-height: 0.92;
  letter-spacing: 0; color: var(--fill, var(--paper));
  -webkit-text-stroke: 0.07em var(--ink); paint-order: stroke fill;
  text-shadow: 0.075em 0.085em 0 var(--ink);
}
.scene h2.toon { font-size: clamp(3rem, 9.5vw, 9rem); }

.head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1.25rem 2.5rem; margin-bottom: clamp(2.25rem, 5vw, 4.5rem); }
.head h2 { flex: 1 1 100%; }

/* A speech balloon. The tail is two stacked triangles so it keeps the outline. */
.balloon {
  position: relative; max-width: 32rem; padding: 1rem 1.4rem; background: var(--paper); color: var(--ink);
  border: var(--line) solid var(--ink); border-radius: 1.6rem;
  font-family: var(--toon); font-size: clamp(1.05rem, 1.7vw, 1.4rem); line-height: 1.25;
}
.balloon::before, .balloon::after { content: ''; position: absolute; left: 2.2rem; width: 0; height: 0; border-style: solid; }
.balloon::before { bottom: -1.5rem; border-width: 1.5rem 1.2rem 0 0; border-color: var(--ink) transparent transparent; }
.balloon::after { bottom: -0.85rem; margin-left: var(--line); border-width: 1rem 0.75rem 0 0; border-color: var(--paper) transparent transparent; }

/* A panel is a hard black frame and a colour. Art with a white ground multiplies into the colour. */
.panel {
  position: relative; margin: 0; overflow: clip; background: var(--c, var(--paper));
  border: var(--line) solid var(--ink); box-shadow: var(--drop) var(--drop) 0 var(--ink);
}
.panel img { display: block; width: 100%; height: 100%; object-fit: cover; }
.panel.is-ink img { mix-blend-mode: multiply; }
.tag {
  position: absolute; left: 0; top: 0; z-index: 1; padding: 0.3rem 0.7rem; background: var(--ink); color: var(--sun);
  font: 700 clamp(0.72rem, 1.15vw, 1rem) ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* 01 Hero */
.hero { --field: var(--sun); border-top: 0; overflow: clip; padding-top: clamp(6rem, 8vw, 7.5rem); background-image: none; }
.rays {
  position: absolute; left: 50%; top: 42%; width: 240vmax; height: 240vmax; margin: -120vmax 0 0 -120vmax;
  background: repeating-conic-gradient(var(--sun) 0 11.25deg, var(--amber) 11.25deg 22.5deg);
  transform-origin: center;
}
.hero .scene-wrap { position: relative; }
.hero-stage { display: grid; gap: clamp(1rem, 2vw, 2rem); grid-template-columns: repeat(12, minmax(0, 1fr)); }
.hero h1 { grid-column: 1 / 10; grid-row: 1; z-index: 2; font-size: clamp(3.7rem, 11.6vw, 12rem); --fill: var(--paper); }
.hero h1 > span { display: block; }
.hero h1 > span + span { --fill: var(--tomato); color: var(--tomato); margin-left: 0.35em; }
.hero-a { grid-column: 9 / 13; grid-row: 1 / 3; align-self: center; z-index: 1; }
.hero-b { grid-column: 1 / 5; grid-row: 2; z-index: 1; }
.hero-c { grid-column: 5 / 9; grid-row: 2; align-self: end; z-index: 1; }
.hero-tilt-a { rotate: 3deg; } .hero-tilt-b { rotate: -2.5deg; } .hero-tilt-c { rotate: 2deg; }
.hero-a .panel, .hero-b .panel { aspect-ratio: 1; }
.hero-c .panel { aspect-ratio: 1200 / 964; }
.hero-foot { grid-column: 1 / -1; grid-row: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2rem; margin-top: 1.75rem; }

/* 02 The dial */
.dial { --field: var(--tomato); }
.dial h2.toon { --fill: var(--sun); }
.dial-rows { display: grid; gap: clamp(1.5rem, 3vw, 2.75rem); }
.dial-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(0.9rem, 2vw, 2rem); }
.dial-row .panel { aspect-ratio: 1; }
/* The moving edge must not show the panel behind it, so the art overhangs the frame. */
.dial-row .panel img { width: calc(100% + 32px); height: calc(100% + 32px); margin: -16px; max-width: none; }

/* 03 Stickers */
.stickers { --field: var(--sky); }
.sticker-wall { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(0.75rem, 1.5vw, 1.5rem); align-items: center; }
.slap { grid-column: span 3; }
.slap:nth-child(1) { rotate: -5deg; } .slap:nth-child(2) { rotate: 4deg; grid-column: span 4; }
.slap:nth-child(3) { rotate: -2deg; } .slap:nth-child(4) { rotate: 3deg; grid-column: span 2; }
.slap:nth-child(5) { rotate: 5deg; grid-column: span 4; } .slap:nth-child(6) { rotate: -4deg; grid-column: span 4; }
.slap:nth-child(7) { rotate: 2deg; grid-column: span 4; }
.sticker {
  display: block; padding: clamp(0.5rem, 1vw, 0.9rem); background: #fff;
  border: var(--line) solid var(--ink); border-radius: clamp(1rem, 2vw, 2rem); box-shadow: var(--drop) var(--drop) 0 var(--ink);
}
.sticker img { display: block; width: 100%; height: auto; border-radius: clamp(0.5rem, 1.2vw, 1.25rem); }
/* A poked sticker grows, so it has to come up over the one that follows it in the grid. */
.slap:hover { z-index: 1; }
.sticker-wall {
  --kui-confetti-size: 13px; --kui-confetti-c1: var(--tomato); --kui-confetti-c2: var(--sun); --kui-confetti-c3: var(--pink);
  --kui-confetti-c4: var(--mint); --kui-confetti-c5: var(--grape);
}
.poke-row { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.75rem; }
.poke-row .big-btn:not(.is-active) { background: var(--paper); color: var(--ink); -webkit-text-stroke: 0; }

/* 04 Cels on TV */
.tvs { --field: var(--pink); }
.tvs h2.toon { --fill: var(--sun); }
.tv-row { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 2rem); align-items: end; }
.tv {
  position: relative; padding: clamp(0.6rem, 1.2vw, 1.1rem); padding-bottom: clamp(1.8rem, 3vw, 2.75rem);
  background: var(--tv, var(--sun)); border: var(--line) solid var(--ink); border-radius: clamp(1rem, 2vw, 2rem);
  box-shadow: var(--drop) var(--drop) 0 var(--ink);
}
.tv::before, .tv::after {
  content: ''; position: absolute; bottom: clamp(0.4rem, 0.7vw, 0.7rem); width: clamp(0.8rem, 1.3vw, 1.25rem); aspect-ratio: 1;
  border: 3px solid var(--ink); border-radius: 50%; background: var(--paper);
}
.tv::before { right: clamp(0.75rem, 1.6vw, 1.5rem); } .tv::after { right: clamp(2.2rem, 3.8vw, 3.75rem); }
.tv video { display: block; width: 100%; height: auto; border: var(--line) solid var(--ink); border-radius: clamp(0.5rem, 1.1vw, 1rem); background: var(--ink); }
.tv-wide { grid-column: span 4; } .tv-square { grid-column: span 3; }

/* 05 Trail */
.trail { --field: var(--lime); padding: 0; }
.trail-field {
  position: relative; display: grid; place-items: center; min-height: min(86vh, 54rem); text-align: center;
  padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 3.5vw, 3.5rem);
  --kui-trail-width: clamp(130px, 15vw, 230px); --kui-trail-height: clamp(130px, 15vw, 230px);
}
.trail-field [data-kui-trail-layer] img { border: var(--line) solid var(--ink); border-radius: 1.5rem; box-shadow: 8px 8px 0 var(--ink); }
.trail-field h2.toon { font-size: clamp(3.4rem, 13vw, 14rem); --fill: var(--pink); }
.trail-foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1rem 1.5rem; margin-top: 2.25rem; }
.trail-sources { display: none; }
/* No pointer to follow: the same stickers sit in a row instead. */
@media (hover: none), (pointer: coarse) {
  .trail-sources { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin-top: 2rem; }
  .trail-sources img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border: var(--line) solid var(--ink); border-radius: 1rem; }
}

/* 06 Fat panel */
.fat { --field: var(--grape); }
.fat h2.toon { --fill: var(--lime); }
.fat .balloon { --ink: #111; }
.fat-row { min-height: clamp(26rem, 46vw, 42rem); gap: clamp(0.5rem, 1vw, 1rem); }
.cel {
  position: relative; display: block; overflow: clip; color: var(--ink); text-decoration: none;
  border: var(--line) solid var(--ink); background: var(--paper); box-shadow: var(--drop) var(--drop) 0 var(--ink);
  min-height: 15rem;
}
.cel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cel strong {
  position: absolute; left: 0; top: 0; z-index: 1; padding: 0.35rem 0.5rem; background: var(--sun);
  border-right: var(--line) solid var(--ink); border-bottom: var(--line) solid var(--ink);
  font-family: var(--toon); font-size: clamp(0.8rem, 1.4vw, 1.3rem); text-transform: uppercase; white-space: nowrap;
}
.cel [data-kui-expand-content] {
  position: absolute; right: 0.75rem; bottom: 0.75rem; z-index: 1; max-width: 18rem; padding: 0.5rem 0.8rem;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 1rem; font-family: var(--toon); font-size: 1rem; line-height: 1.2;
}

/* 07 Toy box */
.toys { --field: var(--mint); }
.toys h2.toon { --fill: var(--sun); }
.toy-floor { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.toy-shelf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 2.25rem); }
.toy { display: grid; gap: 0.75rem; }
.toy .panel { aspect-ratio: 1; }
.big-btn {
  padding: 0.75rem 1rem; background: var(--tomato); color: var(--paper); cursor: pointer;
  border: var(--line) solid var(--ink); border-radius: 999px; box-shadow: 5px 5px 0 var(--ink);
  font-family: var(--toon); font-size: clamp(1rem, 1.6vw, 1.35rem); text-transform: uppercase;
  -webkit-text-stroke: 0.05em var(--ink); paint-order: stroke fill;
}
.toy-box { justify-self: center; display: grid; place-items: center; width: min(100%, 26rem); aspect-ratio: 1; }
.toy-cube { --kui-cube-size: clamp(150px, 19vw, 270px); width: var(--kui-cube-size); height: var(--kui-cube-size); }
.toy-cube > div { background-size: cover; background-position: center; border: var(--line) solid var(--ink); }

/* 08 The end */
.end { --field: var(--ink); color: var(--paper); background-image: none; padding-block: clamp(3rem, 6vw, 5rem); }
.iris {
  position: relative; overflow: clip; display: grid; justify-items: center; gap: 1.75rem; text-align: center;
  padding: clamp(3.5rem, 8vw, 7rem) 1.25rem; background: var(--sun);
}
.iris .rays { top: 50%; }
.iris > :not(.rays) { position: relative; }
.iris h2.toon { font-size: clamp(4.5rem, 19vw, 17rem); --fill: var(--tomato); }
.iris p { max-width: 36rem; min-height: 3.2em; color: var(--ink); font-family: var(--toon); font-size: clamp(1.15rem, 2vw, 1.6rem); line-height: 1.25; }
.end-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1rem 1.5rem; }
.hooray {
  --kui-confetti-size: 13px; --kui-confetti-c1: var(--tomato); --kui-confetti-c2: var(--sky); --kui-confetti-c3: var(--pink);
  --kui-confetti-c4: var(--mint); --kui-confetti-c5: var(--grape);
  font-size: clamp(1.3rem, 3vw, 2.4rem); padding: 1rem 2rem; position: relative;
}

@media (max-width: 900px) {
  .hero-stage { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .hero h1 { grid-column: 1 / -1; grid-row: auto; font-size: clamp(2.9rem, 15.5vw, 9rem); }
  .hero h1 > span + span { margin-left: 0; }
  .hero-a { grid-column: 1 / -1; grid-row: auto; width: 82%; justify-self: center; }
  .hero-b { grid-column: 1 / 4; grid-row: auto; } .hero-c { grid-column: 4 / -1; grid-row: auto; align-self: center; }
  .hero-foot { grid-row: auto; }
  .dial-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slap, .slap:nth-child(n) { grid-column: span 6; }
  .slap:nth-child(2), .slap:nth-child(5) { grid-column: 1 / -1; }
  .tv-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tv-wide { grid-column: 1 / -1; } .tv-square { grid-column: span 1; }
  .toy-floor { grid-template-columns: minmax(0, 1fr); }
  .toy-box { order: -1; width: min(100%, 17rem); }
  .toy-cube { --kui-cube-size: 150px; }
}
