/* Saturday-morning cartoon: ink outlines, hard offset shadows, clown-suit primaries. */
:root {
  --sky: #7fd3f7;
  --paper: #fff8e7;
  --ink: #1b1530;
  --yellow: #ffd23f;
  --blue: #2f8fe0;
  --red: #ef3b36;
  --orange: #ff8a3d;
  --green: #3ccf6e;
  --muted: #4b4466;
  --text: #1b1530;
  --slot: #ffe9a8;
  --dots: rgba(27, 21, 48, 0.12);
  --stroke: 4px;
  --pop: 6px 6px 0 var(--ink);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sky: #1f2a6b;
    --paper: #2a2350;
    --ink: #0b0818;
    --muted: #c9c2ef;
    --text: #f4f0ff;
    --slot: #3a3170;
    --dots: rgba(255, 255, 255, 0.08);
  }
}

:root[data-theme="dark"] {
  --sky: #1f2a6b;
  --paper: #2a2350;
  --ink: #0b0818;
  --muted: #c9c2ef;
  --text: #f4f0ff;
  --slot: #3a3170;
  --dots: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; }

html { overflow-x: clip; }

body {
  margin: 0;
  color: var(--text);
  background-color: var(--sky);
  background-image: radial-gradient(var(--dots) 1.6px, transparent 1.8px);
  background-size: 14px 14px;
  font: 700 18px/1.55 Nunito, system-ui, sans-serif;
  overflow-x: clip;
}

a { color: inherit; }
img { display: block; max-width: 100%; }

h1, h2, h3, .btn, .burst, .tag, .plan-flag, .ticker, .logo-word {
  font-family: "Luckiest Guy", "Arial Black", sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
}
h1, h2, h3 { margin: 0; line-height: 1; }
h2 { font-size: clamp(2rem, 5vw, 3rem); color: var(--yellow); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--ink); margin-bottom: 20px; }

section { max-width: 1180px; margin: 0 auto; padding: 56px 16px; }

/* Ticker */
.ticker { background: var(--red); color: #fff; border-bottom: var(--stroke) solid var(--ink); overflow: hidden; white-space: nowrap; font-size: 20px; padding: 6px 0; }
.ticker span { display: inline-block; padding-left: 100%; animation: tick 18s linear infinite; }
@keyframes tick { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .ticker span { animation: none; padding-left: 16px; } }

/* Nav */
.nav { display: flex; align-items: center; gap: 24px; max-width: 1180px; margin: 16px auto 0; padding: 10px 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-nose { width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff8b87 0 18%, var(--red) 20%); border: var(--stroke) solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.logo-word { font-size: 24px; line-height: 0.9; color: #fff; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
.nav-links { display: flex; gap: 6px; margin-left: auto; }
.nav-links a, .cart { text-decoration: none; font-weight: 900; background: var(--paper); border: 3px solid var(--ink); border-radius: 999px; padding: 6px 14px; box-shadow: 3px 3px 0 var(--ink); font-size: 16px; }
.nav-links a:hover, .cart:hover { background: var(--yellow); color: var(--ink); }
.cart b { background: var(--red); color: #fff; border-radius: 999px; padding: 0 7px; margin-left: 4px; }

/* Shared pieces */
.card, .panel { background: var(--paper); border: var(--stroke) solid var(--ink); border-radius: 22px; box-shadow: var(--pop); }
.panel { background: #e0e0dc; overflow: hidden; }
.panel img { width: 100%; height: 100%; object-fit: contain; }
.slot { display: grid; place-items: center; text-align: center; background: var(--slot); color: var(--muted); border: var(--stroke) dashed var(--ink); border-radius: 18px; font-weight: 900; font-size: 15px; }

.btn { display: inline-block; font-size: 24px; text-decoration: none; padding: 12px 28px 8px; border: var(--stroke) solid var(--ink); border-radius: 16px; background: var(--yellow); color: var(--ink); box-shadow: var(--pop); transition: transform 0.1s, box-shadow 0.1s; }
.btn:hover { transform: translate(2px, 2px); box-shadow: 4px 4px 0 var(--ink); }
.btn-red { background: var(--red); color: #fff; }
.btn:disabled { background: #cfc8b8; color: #4b4466; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; margin-top: 8px; }
.fine { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.center { text-align: center; }

/* Hero */
.hero { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding-top: 32px; }
.rays { position: absolute; inset: -40px -200px; z-index: -1; background: repeating-conic-gradient(from 0deg at 72% 50%, rgba(255, 255, 255, 0.28) 0 10deg, transparent 10deg 20deg); pointer-events: none; }
.kicker { display: inline-block; background: var(--paper); border: 3px solid var(--ink); border-radius: 12px; padding: 4px 14px; box-shadow: 3px 3px 0 var(--ink); margin: 0 0 18px; transform: rotate(-2deg); }
.hero h1 { font-size: clamp(3.2rem, 9vw, 6.2rem); color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 6px 6px 0 var(--ink); }
.hero h1 span { color: var(--yellow); }
.lede { font-size: 20px; max-width: 30em; background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; padding: 16px 20px; box-shadow: 4px 4px 0 var(--ink); margin: 22px 0 26px; }

.hero-art { position: relative; }
.tv-hero { transform: rotate(1.5deg); background: var(--red); padding: 24px 24px 14px; }
.tv-hero .screen { aspect-ratio: 4 / 3; }
.tv-hero figcaption { font-size: 26px; }
.screen-art { position: relative; overflow: hidden; background: #e0e0dc; }
.screen-art img { width: 100%; height: 100%; object-fit: contain; }
.play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--yellow); color: var(--ink); border: var(--stroke) solid var(--ink); border-radius: 999px; padding: 10px 22px 6px; font-family: "Luckiest Guy", sans-serif; font-size: 22px; box-shadow: 4px 4px 0 var(--ink); white-space: nowrap; }
.play::before { content: "▶ "; color: var(--red); }
.burst { position: absolute; right: -18px; bottom: 6%; margin: 0; width: 150px; height: 150px; display: grid; place-items: center; text-align: center; background: var(--yellow); color: var(--red); font-size: 30px; line-height: 0.9; transform: rotate(12deg);
  clip-path: polygon(50% 0, 61% 18%, 82% 8%, 80% 30%, 100% 34%, 86% 50%, 100% 66%, 80% 70%, 82% 92%, 61% 82%, 50% 100%, 39% 82%, 18% 92%, 20% 70%, 0 66%, 14% 50%, 0 34%, 20% 30%, 18% 8%, 39% 18%);
  filter: drop-shadow(0 0 0 var(--ink)); }
.burst span { -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; }

/* Worries */
.worries { text-align: center; }
.worries ul { list-style: none; padding: 0; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.worries li { background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; padding: 10px 18px; box-shadow: 4px 4px 0 var(--ink); }
.worries li:nth-child(odd) { transform: rotate(-2deg); }
.worries li:nth-child(even) { transform: rotate(2deg); }
.worries-answer { font-size: 22px; font-weight: 900; margin: 26px 0 0; color: #fff; text-shadow: 2px 2px 0 var(--ink); }

/* Buy */
.buy { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.gallery { display: grid; gap: 14px; }
.panel-main { aspect-ratio: 4 / 5; }
.thumbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.thumb { aspect-ratio: 1; border-radius: 14px; font-size: 12px; box-shadow: 3px 3px 0 var(--ink); }
.thumb.is-on { outline: 4px solid var(--red); outline-offset: 2px; }
.buybox { padding: 26px; }
.tag { display: inline-block; margin: 0 0 10px; background: var(--red); color: #fff; border: 3px solid var(--ink); border-radius: 10px; padding: 4px 12px 0; font-size: 18px; transform: rotate(-3deg); }
.buybox h2 { color: var(--blue); margin-bottom: 4px; }
.sub { margin: 0 0 8px; color: var(--muted); }
.price { font-family: "Luckiest Guy", sans-serif; font-size: 40px; margin: 6px 0 16px; text-decoration: line-through; text-decoration-thickness: 4px; text-decoration-color: var(--red); }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
legend { font-weight: 900; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips label { position: relative; background: var(--paper); border: 3px solid var(--ink); border-radius: 12px; padding: 8px 16px; font-weight: 900; color: var(--muted); }
.chips input { position: absolute; opacity: 0; }
.chips label:has(input:checked) { background: var(--yellow); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }

/* TVs */
.tv-section { text-align: center; }
.note { margin: -8px 0 24px; font-size: 15px; color: var(--text); }
.tvs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 52px 28px; }
.tvs-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 52px; }
.tv { margin: 0; background: var(--orange); border: var(--stroke) solid var(--ink); border-radius: 30px; padding: 18px 18px 12px; box-shadow: var(--pop); position: relative; }
.tv::before, .tv::after { content: ""; position: absolute; top: -30px; width: 4px; height: 34px; background: var(--ink); }
.tv::before { left: 40%; transform: rotate(-24deg); }
.tv::after { right: 40%; transform: rotate(24deg); }
.tv:nth-child(2) { background: var(--green); }
.tv:nth-child(3) { background: var(--blue); }
.tv-wide:nth-child(1) { background: var(--yellow); }
.tv-wide:nth-child(2) { background: var(--red); }
.screen { aspect-ratio: 16 / 9; display: grid; place-items: center; background: #1b1530; color: #b8b2d6; border: var(--stroke) solid var(--ink); border-radius: 22px / 30px; font-weight: 900; box-shadow: inset 0 0 30px rgba(127, 211, 247, 0.35); }
.tv figcaption { font-family: "Luckiest Guy", sans-serif; font-size: 22px; margin-top: 10px; color: #fff; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.steps li { background: var(--paper); border: var(--stroke) solid var(--ink); border-radius: 22px; padding: 22px; box-shadow: var(--pop); font-size: 20px; font-weight: 900; }
.steps b { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 12px; border-radius: 50%; background: var(--red); color: #fff; border: var(--stroke) solid var(--ink); font-family: "Luckiest Guy", sans-serif; font-size: 30px; font-weight: 400; padding-top: 4px; }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: start; }
.plan { padding: 24px; position: relative; }
.plan h3 { font-size: 28px; color: var(--blue); }
.plan-price { font-family: "Luckiest Guy", sans-serif; font-size: 40px; margin: 8px 0 12px; }
.plan-price small { font-size: 18px; color: var(--muted); }
.plan ul { margin: 0; padding-left: 20px; }
.plan-hot { background: var(--yellow); color: var(--ink); transform: rotate(-1.5deg); }
.plan-hot .plan-price small { color: var(--ink); }
.plan-flag { position: absolute; top: -18px; right: 16px; margin: 0; background: var(--red); color: #fff; border: 3px solid var(--ink); border-radius: 10px; padding: 4px 12px 0; font-size: 18px; }

/* Accessories */
.acc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.acc { padding: 14px; text-align: center; }
.acc-img { aspect-ratio: 1; margin-bottom: 12px; }
.acc h3 { font-size: 20px; color: var(--blue); }
.acc p { margin: 4px 0 10px; font-weight: 900; }
.acc button { width: 100%; padding: 8px; font: 900 16px Nunito, sans-serif; border: 3px solid var(--ink); border-radius: 12px; background: #cfc8b8; color: #4b4466; cursor: not-allowed; }

/* Help */
.help { max-width: 860px; }
details { background: var(--paper); border: var(--stroke) solid var(--ink); border-radius: 18px; box-shadow: 4px 4px 0 var(--ink); margin-bottom: 14px; padding: 0 20px; }
summary { cursor: pointer; padding: 16px 0; font-weight: 900; font-size: 19px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::after { content: "+"; font-family: "Luckiest Guy", sans-serif; font-size: 26px; color: var(--red); line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin: 0 0 18px; color: var(--muted); }

/* Footer */
.footer { margin-top: 40px; background: var(--ink); color: #e9e4ff; border-top: var(--stroke) solid var(--ink); padding: 40px 16px 28px; }
.footer-cols { max-width: 1180px; margin: 0 auto 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.footer h4 { font-family: "Luckiest Guy", sans-serif; font-weight: 400; color: var(--yellow); font-size: 20px; margin: 0 0 8px; }
.footer-cols a { display: block; text-decoration: none; color: #c9c2ef; font-size: 16px; margin-bottom: 4px; }
.legal { max-width: 1180px; margin: 0 auto 6px; font-size: 13px; font-weight: 500; color: #a9a2cf; }

@media (max-width: 880px) {
  .nav { flex-wrap: wrap; }
  .nav-links { display: none; }
  .cart { margin-left: auto; }
  .hero, .buy { grid-template-columns: minmax(0, 1fr); }
  .rays { inset: -40px -16px; }
  .burst { right: -6px; width: 118px; height: 118px; font-size: 24px; }
  .tvs, .tvs-2, .steps, .plans { grid-template-columns: minmax(0, 1fr); }
  .acc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-cols { grid-template-columns: minmax(0, 1fr); }
  .plan-hot { transform: none; }
}
