/* =====================================================================
   The Daily Leak – a fictional newspaper (CTF challenge "adblocker")
   ===================================================================== */

:root {
  --navy: #0d2b4e;
  --navy-dark: #0a2240;
  --pale: #c9d6e6;
  --text: #16191d;
  --muted: #5d6670;
  --line: #e3e5e8;
  --paper: #ffffff;
  --page: #f2f1ed;
  --red: #d6281f;
  --yellow: #ffcf33;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, Consolas, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding: 48px 0 72px; /* room for the sticky ads */
  background: var(--page);
  color: var(--text);
  font: 16px/1.55 var(--sans);
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--navy-dark); color: var(--pale); font-size: 13px; }
.topbar-inner { display: flex; align-items: center; gap: 20px; min-height: 34px; }
#today { font-weight: 600; color: #fff; }
.topbar-links { margin-left: auto; display: flex; gap: 18px; }
.topbar-links a:hover { color: #fff; text-decoration: underline; }

/* ---------- Masthead ---------- */
.masthead { background: var(--paper); border-bottom: 1px solid var(--line); }
.masthead-inner { display: flex; align-items: center; gap: 24px; padding-top: 14px; padding-bottom: 14px; }
.logo { display: flex; align-items: center; gap: 12px; color: var(--navy); }
.logo-drop { width: 34px; height: 50px; }
.logo-text { font: 700 44px/1 var(--serif); letter-spacing: -0.02em; color: var(--navy); white-space: nowrap; }
.logo-the {
  display: block;
  margin: 0 0 2px 2px;
  font: italic 400 14px/1 var(--serif);
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--muted);
}
.tagline { margin: 14px 0 0; font: italic 15px var(--serif); color: var(--muted); }
.masthead-buttons { margin-left: auto; display: flex; gap: 10px; }
.btn { display: inline-block; padding: 9px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.btn-plus { background: var(--yellow); color: var(--navy); }
.btn-outline { border: 2px solid var(--navy); color: var(--navy); padding: 7px 16px; }
.btn:hover { filter: brightness(.95); }

/* ---------- Section menu ---------- */
.sections { background: var(--navy); }
.sections-inner { display: flex; overflow-x: auto; scrollbar-width: none; }
.sections-inner::-webkit-scrollbar { display: none; }
.sections a {
  padding: 12px 14px 10px;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.sections a:hover { background: rgba(255,255,255,.08); }
.sections a.active { border-bottom-color: var(--yellow); }

/* ---------- Breaking ---------- */
.ticker { background: var(--paper); border-bottom: 1px solid var(--line); }
.ticker-inner { display: flex; align-items: center; gap: 14px; min-height: 40px; }
.ticker-label {
  flex: none;
  background: var(--red);
  color: #fff;
  font: 800 12px/1 var(--sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 6px 9px;
  border-radius: 3px;
}
.ticker-window { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.marquee-track { display: flex; width: max-content; animation: slide 60s linear infinite; }
.marquee-track > span { padding-right: 56px; white-space: nowrap; }
.ticker .marquee-track > span { font-weight: 600; font-size: 14px; }
.ticker .marquee-track > span::before { content: "●"; color: var(--red); margin-right: 10px; font-size: 10px; vertical-align: 2px; }

/* ---------- Ad slots ---------- */
.slot { margin: 22px auto; }
.slot-label {
  display: block;
  margin-bottom: 5px;
  text-align: center;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #8a9099;
}
.slot-panorama { margin: 20px auto 22px; }

.stack { position: relative; margin: 0 auto; }
.stack-panorama { width: 100%; max-width: 980px; aspect-ratio: 980 / 240; container-type: inline-size; }
.stack-rect { width: 100%; max-width: 300px; height: 250px; }

.tile {
  position: absolute;
  inset: 0;
  isolation: isolate;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.14);
}
.tile-img { background: #0b1f3f; }
.tile-img img { width: 100%; height: 100%; object-fit: contain; }

.info-dot {
  position: absolute;
  top: 5px; right: 5px;
  z-index: 3;
  width: 18px; height: 18px;
  padding: 0;
  border: 1px solid rgba(0,0,0,.2);
  border-radius: 50%;
  background: rgba(255,255,255,.85);
  color: #1a73e8;
  font: italic 700 11px/16px Georgia, serif;
}

/* Turbo Cleaner */
.tile-cleaner {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 26px;
  padding: 0 36px;
  color: #fff;
  font-family: Tahoma, Verdana, var(--sans);
  background: linear-gradient(180deg, #4aa3ff 0%, #1f6fd1 55%, #0e4aa3 100%);
}
.tile-cleaner::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(90deg, transparent 0 38px, rgba(255,255,255,.07) 38px 40px);
}
.tc-icon {
  width: 124px; height: 124px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 68px;
  background: radial-gradient(circle at 35% 30%, #fff, #cfe6ff 60%, #8fbef5);
  box-shadow: 0 6px 18px rgba(0,0,0,.3), inset 0 -6px 12px rgba(0,0,0,.12);
  animation: wobble 2.4s ease-in-out infinite;
}
.tc-text strong { display: block; font-size: 28px; line-height: 1.15; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.tc-text span { display: block; margin-top: 8px; font-size: 15px; opacity: .92; }
.tc-meter { width: 170px; }
.tc-meter-bar { height: 22px; border: 2px solid #fff; border-radius: 4px; background: #0b2f6b; overflow: hidden; }
.tc-meter-fill { width: 99%; height: 100%; background: repeating-linear-gradient(90deg, #ff3b30 0 12px, #ff7a70 12px 14px); animation: blink .8s steps(2) infinite; }
.tc-meter span { display: block; margin-top: 6px; font-size: 13px; font-weight: 700; text-align: center; }
.tc-btn {
  padding: 16px 26px;
  border: 2px solid #1f6e1c;
  border-radius: 22px;
  color: #fff;
  font-size: 20px; font-weight: 800; font-style: italic;
  white-space: nowrap;
  text-shadow: 0 1px 1px rgba(0,0,0,.4);
  background: linear-gradient(#6ee36a, #2e9d2a);
  box-shadow: 0 4px 0 #1b5e18, 0 8px 18px rgba(0,0,0,.3);
  animation: pulse 1.1s ease-in-out infinite;
}

/* The prince */
.tile-prince {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 30px;
  padding: 0 44px;
  color: #3b2a10;
  font-family: Georgia, serif;
  background: radial-gradient(ellipse at 30% 40%, #fbf1d4 0%, #f0dca6 60%, #dcbf7a 100%);
  box-shadow: inset 0 0 0 8px #f7e7bd, inset 0 0 0 10px #a5813a;
}
.tp-seal {
  width: 118px; height: 118px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 54px;
  background: radial-gradient(circle at 35% 30%, #e0473a, #9c1b12 70%);
  box-shadow: 0 6px 14px rgba(80,20,0,.35), inset 0 -6px 10px rgba(0,0,0,.25);
  transform: rotate(-10deg);
}
.tp-letter em { font-size: 26px; }
.tp-letter p { margin: 6px 0 0; max-width: 540px; font-size: 17px; line-height: 1.45; }
.tp-btn {
  padding: 14px 22px;
  border: 2px solid #c9a24a;
  border-radius: 6px;
  background: #1d4d2b;
  color: #f7e7bd;
  font: 700 16px/1 var(--sans);
  letter-spacing: .06em;
  white-space: nowrap;
}

/* Guru */
.tile-guru {
  display: grid;
  grid-template-columns: 250px 1fr auto;
  align-items: center;
  gap: 30px;
  padding-right: 36px;
  color: #fff;
  background: linear-gradient(90deg, #000 0%, #1a0000 55%, #3d0000 100%);
}
.tg-photo {
  position: relative;
  height: 100%;
  display: grid; place-items: center;
  font-size: 104px;
  background: radial-gradient(circle at 50% 40%, #44506a, #141a26 70%);
}
.tg-photo::after {
  content: "➜";
  position: absolute; right: 6px; bottom: 16px;
  color: #ff1f1f;
  font-size: 64px;
  transform: rotate(-145deg);
  text-shadow: 0 2px 6px #000;
}
.tg-ring {
  position: absolute; left: 50%; top: 50%;
  width: 156px; height: 156px;
  border: 5px solid #ff1f1f;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.tg-kicker {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 3px;
  background: #ff1f1f;
  font: 800 12px/1 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.tg-text strong {
  display: block;
  margin: 10px 0 8px;
  color: #ffe100;
  font: 400 52px/1 Impact, "Arial Black", sans-serif;
  text-transform: uppercase;
}
.tg-text > span:last-child { font-size: 18px; }
.tg-text u { text-decoration-color: #ff1f1f; text-decoration-thickness: 3px; }
.tg-btn {
  padding: 16px 24px;
  border-radius: 4px;
  background: #ffe100;
  color: #000;
  font-size: 18px; font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 0 0 5px rgba(255,225,0,.25);
  animation: pulse 1s ease-in-out infinite;
}

/* jPhone */
.tile-jphone {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 26px;
  padding: 0 36px;
  color: #fff;
  background: radial-gradient(circle at 20% 50%, #ff6ec4 0%, #7873f5 60%, #3a1c71 100%);
}
.tile-jphone::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  opacity: .55;
  background-image:
    radial-gradient(#ffd60a 2px, transparent 3px),
    radial-gradient(#fff 2px, transparent 3px),
    radial-gradient(#4dffb8 2px, transparent 3px);
  background-size: 60px 60px, 90px 90px, 70px 70px;
  background-position: 0 0, 20px 35px, 45px 10px;
  animation: confetti 6s linear infinite;
}
.tj-gift { font-size: 96px; animation: bounce 1s ease-in-out infinite; }
.tj-text strong { display: block; font-size: 30px; font-weight: 900; line-height: 1.1; text-shadow: 0 3px 0 rgba(58,28,113,.6); }
.tj-text span { display: block; margin-top: 8px; font-size: 16px; }
.tj-timer { padding: 10px 14px; border-radius: 10px; background: rgba(0,0,0,.3); text-align: center; }
.tj-timer span { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.tj-timer b { color: #ffd60a; font: 800 32px/1.1 var(--mono); }
.tj-btn {
  padding: 18px 26px;
  border-radius: 999px;
  background: #ffd60a;
  color: #3a1c71;
  font-size: 20px; font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 6px 0 #c9a400;
  animation: shakebtn 2.5s ease-in-out infinite;
}

/* Ugly Christmas sweater */
.tile-sweater {
  display: grid;
  grid-template-columns: 220px 1fr auto auto;
  align-items: center;
  gap: 28px;
  padding-right: 36px;
  color: #fff;
  background-color: #a4161a;
}
.tile-sweater::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(135deg, rgba(255,255,255,.12) 25%, transparent 25%) -14px 0,
    linear-gradient(225deg, rgba(255,255,255,.12) 25%, transparent 25%) -14px 0,
    linear-gradient(315deg, rgba(255,255,255,.12) 25%, transparent 25%),
    linear-gradient(45deg, rgba(255,255,255,.12) 25%, transparent 25%);
  background-size: 28px 28px;
}
.ts-knit {
  height: 100%;
  display: grid; place-items: center;
  font-size: 96px;
  background:
    repeating-linear-gradient(90deg, #fff 0 10px, transparent 10px 20px) top / 100% 14px no-repeat,
    repeating-linear-gradient(90deg, #fff 0 10px, transparent 10px 20px) bottom / 100% 14px no-repeat,
    radial-gradient(circle, #1f8a4c, #0b5a2e 70%);
}
.ts-knit span { filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); animation: wobble 3s ease-in-out infinite; }
.ts-kicker {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 3px;
  background: #ffd60a;
  color: #6a040f;
  font: 800 12px/1 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.ts-text strong { display: block; margin: 10px 0 6px; font: 900 36px/1.05 Georgia, serif; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.ts-text > span:last-child { display: block; font-size: 16px; opacity: .95; }
.ts-price { text-align: center; }
.ts-price s { display: block; font-size: 16px; opacity: .75; }
.ts-price b { display: block; color: #ffd60a; font: 900 34px/1 var(--sans); }
.ts-btn {
  padding: 16px 26px;
  border-radius: 999px;
  background: #fff;
  color: #a4161a;
  font-size: 18px; font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 5px 0 #d9c8c8;
  animation: pulse 1.2s ease-in-out infinite;
}

/* Smart Christmas lights */
.tile-lights {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 26px;
  padding: 44px 40px 16px;
  color: #fff;
  background: radial-gradient(ellipse at 50% 120%, #1b2a5c 0%, #0b1026 65%);
}
.tl-bulbs {
  position: absolute; top: 0; left: 0; right: 0;
  height: 40px;
  display: flex; justify-content: space-around;
  padding: 0 12px;
}
.tl-bulbs::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 2px; background: #3d4a40; }
.tl-bulbs i {
  --c: #ff4d4d;
  position: relative;
  top: 13px;
  width: 13px; height: 19px;
  border-radius: 45% 45% 50% 50% / 35% 35% 65% 65%;
  background: var(--c);
  box-shadow: 0 0 14px 3px var(--c);
  transform: rotate(8deg);
  animation: bulb 1.4s steps(2) infinite;
}
.tl-bulbs i::before { content: ""; position: absolute; top: -5px; left: 3px; width: 7px; height: 6px; border-radius: 2px; background: #59646d; }
.tl-bulbs i:nth-child(even) { transform: rotate(-8deg); animation-delay: -.7s; }
.tl-bulbs i:nth-child(4n+2) { --c: #ffd60a; }
.tl-bulbs i:nth-child(4n+3) { --c: #39ff88; }
.tl-bulbs i:nth-child(4n+4) { --c: #4db5ff; }
.tl-bulbs i:nth-child(3n) { animation-delay: -.35s; }
.tl-text strong {
  display: block;
  font-size: 32px; font-weight: 900; line-height: 1.1;
  background: linear-gradient(90deg, #ff6b6b, #ffd60a, #39ff88, #5ab0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tl-text span { display: block; margin-top: 8px; font-size: 17px; color: #c9d6ff; }
.tl-login { padding: 10px 14px; border: 1px dashed rgba(255,255,255,.35); border-radius: 8px; text-align: center; }
.tl-login span { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.tl-login b { color: #39ff88; font: 700 18px var(--mono); }
.tl-btn {
  padding: 16px 22px;
  border-radius: 10px;
  background: linear-gradient(#39ff88, #12b85a);
  color: #062012;
  font-size: 16px; font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 0 22px rgba(57,255,136,.45);
  animation: pulse 1.3s ease-in-out infinite;
}

/* Narrower panorama */
@container (max-width: 860px) {
  .tc-meter, .tj-timer, .ts-price, .tl-login { display: none; }
  .tile-cleaner, .tile-jphone { grid-template-columns: auto 1fr auto; padding: 0 24px; gap: 18px; }
  .tile-guru { grid-template-columns: 180px 1fr auto; gap: 20px; }
  .tile-sweater { grid-template-columns: 160px 1fr auto; gap: 20px; padding-right: 24px; }
  .tile-lights { grid-template-columns: 1fr auto; gap: 18px; padding: 40px 24px 14px; }
  .tg-text strong { font-size: 38px; }
  .tc-text strong, .tj-text strong { font-size: 23px; }
  .ts-text strong { font-size: 28px; }
  .tl-text strong { font-size: 25px; }
  .tp-letter p { font-size: 15px; }
}
@container (max-width: 620px) {
  .tc-icon, .tj-gift, .tp-seal, .tg-photo, .ts-knit, .ts-kicker { display: none; }
  .tile-cleaner, .tile-jphone, .tile-prince, .tile-sweater, .tile-lights { grid-template-columns: 1fr; padding: 16px 20px; gap: 10px; align-content: center; }
  .tile-guru { grid-template-columns: 1fr; padding: 16px 20px; gap: 10px; align-content: center; }
  .tile-lights { padding-top: 34px; }
  .tc-text span, .tj-text span, .ts-text > span:last-child, .tl-text span { font-size: 14px; }
  .tc-btn, .tj-btn, .tg-btn, .tp-btn, .ts-btn, .tl-btn { justify-self: start; padding: 10px 16px; font-size: 15px; }
  .tg-text strong { font-size: 30px; margin: 6px 0; }
  .ts-text strong { font-size: 24px; margin: 0 0 4px; }
  .tl-text strong { font-size: 21px; }
  .tp-letter p { font-size: 14px; }
}

/* Sidebar ads */
.tile-onefactor, .tile-course, .tile-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
}
.tile-onefactor { background: linear-gradient(160deg, #ffffff 0%, #eaf3ff 100%); border: 1px solid #cfe0f5; color: #0b2f6b; }
.to-logo {
  width: 64px; height: 64px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: #ff5a1f;
  color: #fff;
  font: 900 40px/1 var(--sans);
  box-shadow: 0 6px 16px rgba(255,90,31,.35);
  transform: rotate(-6deg);
}
.tile-onefactor strong { font-size: 22px; }
.tile-onefactor p, .tile-course p, .tile-empty p { margin: 0; font-size: 14px; line-height: 1.4; }
.to-btn, .tco-btn {
  margin-top: 4px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800; font-size: 14px;
}
.to-btn { background: #ff5a1f; color: #fff; }
.tile-course { background: #071a12; color: #c8ffd9; font-family: var(--mono); }
.tco-term { color: #39ff88; font-size: 13px; }
.tile-course strong { font: 800 21px/1.2 var(--sans); color: #fff; }
.tco-btn { background: #39ff88; color: #071a12; font-family: var(--sans); }
.tile-empty { background: repeating-linear-gradient(45deg, #f7f7f5 0 14px, #efefec 14px 28px); color: #454b52; border: 2px dashed #c9ccd1; }
.te-icon { font-size: 46px; }
.tile-empty strong { font-size: 20px; }

/* Post-it (in the feed) */
.inline-tile.postit {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 22px 26px;
  border-radius: 6px;
  background: #23262b;
  color: #fff;
}
.postit-notes { display: flex; flex: none; }
.postit-notes span {
  width: 84px; height: 84px;
  margin-right: -14px;
  padding: 10px 8px;
  color: #2a2a2a;
  font: 14px/1.3 "Segoe Print", "Comic Sans MS", "Bradley Hand", cursive;
  box-shadow: 0 6px 12px rgba(0,0,0,.35);
}
.postit-notes span:nth-child(1) { background: #ffef75; transform: rotate(-7deg); }
.postit-notes span:nth-child(2) { background: #ff9ecb; transform: rotate(4deg); }
.postit-notes span:nth-child(3) { background: #9ff0b5; transform: rotate(-2deg); }
.postit-text { flex: 1; }
.postit-text strong { font-size: 24px; }
.postit-text p { margin: 4px 0 0; color: #c9ced6; }
.postit-btn { flex: none; padding: 12px 20px; border-radius: 6px; background: #ffef75; color: #23262b; font-weight: 800; }

/* Christmas e-card (in the article) */
.slot-story { margin: 26px 0; }
.slot-story .slot-label { font-family: var(--sans); }
.inline-tile.ecard {
  display: flex; align-items: center; gap: 20px;
  padding: 18px 22px;
  border: 7px solid transparent;
  border-image: repeating-linear-gradient(-45deg, #d62828 0 12px, #fff 12px 24px, #1d6f42 24px 36px, #fff 36px 48px) 7;
  background: #fffaf0;
  font-family: var(--sans);
}
.ecard-envelope { font-size: 54px; animation: wobble 2.6s ease-in-out infinite; }
.ecard-text { flex: 1; }
.ecard-text strong { display: block; color: #a4161a; font: 800 20px/1.25 var(--sans); }
.ecard-file { display: inline-block; margin-top: 8px; padding: 4px 10px; border: 1px solid #d6d9de; border-radius: 6px; background: #fff; font: 13px/1.4 var(--mono); }
.ecard-file em { color: #777; font-style: normal; }
.ecard-btn { flex: none; padding: 12px 18px; border-radius: 8px; background: #1d6f42; color: #fff; font: 800 15px/1 var(--sans); letter-spacing: .04em; }

/* Mystery USB (in the feed) */
.inline-tile.usbgift {
  display: flex; align-items: center; gap: 26px;
  padding: 22px 26px 22px 0;
  border-radius: 6px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(90deg, transparent 58px, #ffd60a 58px 76px, transparent 76px),
    repeating-linear-gradient(45deg, #b5121b 0 18px, #c92a2a 18px 36px);
}
.usb-box { flex: none; width: 134px; display: grid; place-items: center; font-size: 64px; animation: bounce 1.4s ease-in-out infinite; }
.usb-text { flex: 1; }
.usb-text strong { font-size: 24px; }
.usb-text p { margin: 4px 0 2px; color: #ffe3e3; }
.usb-text small { color: #ffc9c9; font-size: 12px; }
.usb-btn { flex: none; padding: 12px 20px; border-radius: 6px; background: #ffd60a; color: #6a040f; font-weight: 900; white-space: nowrap; }

/* Have I Been Naughty? (sidebar) */
.inline-tile.naughty {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 26px 20px 20px;
  overflow: hidden;
  border: 1px solid #f0d0d0;
  border-radius: 8px;
  background: #fff;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.inline-tile.naughty::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 10px;
  background: repeating-linear-gradient(-45deg, #d62828 0 10px, #fff 10px 20px);
}
.naughty-icon { font-size: 44px; animation: wobble 2.4s ease-in-out infinite; }
.inline-tile.naughty strong { color: #a4161a; font: 900 22px/1.15 var(--serif); }
.inline-tile.naughty p { margin: 0 0 6px; color: #444; font-size: 14px; line-height: 1.4; }
.naughty-form { display: grid; gap: 8px; width: 100%; }
.naughty-form input { min-width: 0; padding: 10px 12px; border: 2px solid #e3d5d5; border-radius: 8px; font: inherit; font-size: 14px; }
.naughty-form button { padding: 11px; border: 0; border-radius: 8px; background: #1d6f42; color: #fff; font-weight: 900; letter-spacing: .05em; }

/* ElfCam (sidebar, half page) */
.inline-tile.elfcam {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px 18px 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, #0a1f14, #04110a);
  color: #c9f5d6;
  font-size: 14px;
}
.elf-screen {
  position: relative;
  height: 190px;
  display: grid; place-items: center;
  overflow: hidden;
  border: 2px solid #1f5c3a;
  border-radius: 6px;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.25) 0 2px, transparent 2px 4px),
    radial-gradient(circle at 50% 45%, #3fbf6f, #0f3d22 70%);
}
.elf-face { font-size: 96px; filter: grayscale(1) brightness(1.15) sepia(1) hue-rotate(70deg) saturate(4); }
.elf-rec { position: absolute; top: 8px; left: 10px; color: #ff4d4d; font: 800 12px var(--mono); animation: blink 1s steps(2) infinite; }
.elf-time { position: absolute; right: 10px; bottom: 8px; color: #b8ffcf; font: 12px var(--mono); }
.inline-tile.elfcam strong { color: #fff; font: 900 26px/1.1 var(--sans); }
.inline-tile.elfcam p { margin: 0; line-height: 1.45; }
.inline-tile.elfcam ul { margin: 0; padding: 0; list-style: none; }
.inline-tile.elfcam li { padding: 4px 0; border-bottom: 1px solid rgba(201,245,214,.12); }
.inline-tile.elfcam li::before { content: "✔"; margin-right: 8px; color: #39ff88; }
.elf-btn { margin-top: 4px; padding: 12px; border-radius: 999px; background: #39ff88; color: #04110a; font-weight: 900; text-align: center; animation: pulse 1.2s ease-in-out infinite; }
.inline-tile.elfcam small { color: #7fa88d; font-size: 11px; text-align: center; }

/* ---------- Content ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
  padding: 28px;
  background: var(--paper);
  border-radius: 4px;
}
.kicker {
  display: inline-block;
  color: var(--red);
  font-size: 13px; font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.top-story h1 { margin: 6px 0 14px; font: 700 44px/1.08 var(--serif); letter-spacing: -0.01em; }
.lead { margin: 0 0 18px; font-size: 19px; font-weight: 600; line-height: 1.5; color: #23282e; }
.byline { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.byline b { display: block; }
.byline span:not(.avatar) { color: var(--muted); }
.avatar {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 700; font-size: 14px;
}
.hero-img { margin: 22px 0 20px; }
.hero-img svg { width: 100%; height: auto; border-radius: 4px; }
.hero-img figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.cursor { animation: blink 1s steps(2) infinite; }
.body-text { font: 18px/1.7 var(--serif); }
.body-text p { margin: 0 0 18px; }
.body-text h2 { margin: 30px 0 10px; font: 800 22px/1.3 var(--sans); }
.tips { margin: 0 0 20px; padding-left: 24px; }
.tips li { margin-bottom: 10px; }

.section-title, .side-title {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 14px;
  padding-top: 10px;
  border-top: 3px solid var(--navy);
  font: 800 14px/1.2 var(--sans);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.news-feed { margin-top: 40px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card h3 { margin: 4px 0 6px; font: 700 19px/1.22 var(--serif); }
.card h3 a:hover, .latest a:hover, .most-read a:hover { text-decoration: underline; }
.card-meta { margin: 0; font-size: 13px; color: var(--muted); }
.card-img {
  position: relative;
  aspect-ratio: 16 / 10;
  margin-bottom: 10px;
  display: grid; place-items: center;
  border-radius: 4px;
  overflow: hidden;
  font-size: 54px;
}
.card-img::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 2px, transparent 2px 9px);
}
.card-img span { filter: drop-shadow(0 6px 10px rgba(0,0,0,.3)); }
.img-phishing { background: linear-gradient(135deg, #0f766e, #134e4a); }
.img-coffee { background: linear-gradient(135deg, #a16207, #4a2c0b); }
.img-wifi { background: linear-gradient(135deg, #7c3aed, #3b0764); }
.img-sql { background: linear-gradient(135deg, #dc2626, #7f1d1d); }
.img-sports { background: linear-gradient(135deg, #16a34a, #14532d); }
.img-usb { background: linear-gradient(135deg, #ea580c, #7c2d12); }
.plus {
  display: inline-block;
  padding: 2px 6px;
  margin-right: 4px;
  border-radius: 3px;
  background: var(--yellow);
  color: var(--navy);
  font: 900 11px/1.3 var(--sans);
  letter-spacing: .06em;
  text-transform: uppercase;
  vertical-align: 3px;
}

/* Sidebar */
.side-box { margin-bottom: 30px; }
.weather-now { display: flex; align-items: center; gap: 12px; }
.weather-icon { font-size: 44px; }
.weather-temp { font: 700 48px/1 var(--serif); color: var(--navy); }
.weather p { margin: 8px 0 12px; font-size: 14px; color: #3b424a; }
.weather-forecast { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.weather-forecast li {
  flex: 1;
  padding: 8px 4px;
  border-radius: 6px;
  background: #f1f4f8;
  font-size: 14px; font-weight: 700;
  text-align: center;
}
.weather-forecast span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: pulse 1.4s ease-in-out infinite; }
.latest, .most-read { margin: 0; padding: 0; list-style: none; }
.latest li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.35; }
.latest time { flex: none; color: var(--red); font-weight: 700; font-size: 13px; padding-top: 1px; }
.most-read { counter-reset: most; }
.most-read li {
  counter-increment: most;
  display: flex; gap: 12px; align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font: 700 16px/1.3 var(--serif);
}
.most-read li::before { content: counter(most); flex: none; width: 20px; color: var(--navy); font: 900 22px/1 var(--sans); opacity: .35; }
.family-card { display: flex; gap: 12px; padding: 14px; border-radius: 8px; background: #fff8e6; border: 1px solid #f3e2b3; }
.family-icon { font-size: 34px; }
.family-card p { margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: #4a4a4a; }

/* Footer */
.footer { margin-top: 36px; padding: 34px 0 22px; background: var(--navy-dark); color: var(--pale); font-size: 14px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.footer h3 { margin: 0 0 8px; color: #fff; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.footer p { margin: 0; line-height: 1.6; }
.logo-small { display: block; margin-bottom: 8px; color: #fff; font-size: 30px; }
.footer-disclaimer { margin-top: 26px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12px; opacity: .75; }

/* =====================================================================
   AD LAYERS
   ===================================================================== */
.layer { position: fixed; font-family: var(--sans); color: #111; }
.layer-1, .layer-2, .layer-3, .layer-6 { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.box { position: relative; }
.close {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 5;
  width: 28px; height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.28);
  color: #fff;
  font-size: 14px; line-height: 28px;
  transition: transform .16s ease-out;
}

/* Layer 1: advent calendar */
.layer-1 { inset: 0; z-index: 10011; display: grid; place-items: center; padding: 16px; background: rgba(0,45,20,.2); }
.box-calendar {
  width: min(430px, 100%);
  padding: 22px 22px 18px;
  border: 3px solid #e9c46a;
  border-radius: 18px;
  color: #fff;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, #23955a 0%, #0b5a2e 55%, #063a1d 100%);
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  transform: translate(52%, -16%) rotate(2deg);
}
.box-calendar .close { background: rgba(255,255,255,.2); }
.calendar-title { margin: 0; color: #ffd60a; font: 900 28px/1.1 var(--serif); text-shadow: 0 3px 0 #063a1d; }
.calendar-sub { margin: 6px 0 14px; color: #d8f3dc; font-size: 14px; }
.doors { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
.door {
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid rgba(255,214,10,.6);
  border-radius: 8px;
  background: #b5121b;
  color: #ffd60a;
  font: 900 20px/1 var(--serif);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.22);
  transition: transform .15s;
}
.door:nth-child(3n+2) { background: #1d6f42; }
.door:nth-child(4n+3) { background: #f4ecd8; color: #b5121b; }
.door:hover { transform: rotate(-4deg) scale(1.06); }
.door.open { background: #fff8e1; border-style: dashed; color: #000; font-size: 24px; box-shadow: inset 0 3px 8px rgba(0,0,0,.25); }
.calendar-btn {
  margin-top: 16px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: #ffd60a;
  color: #063a1d;
  font-size: 15px; font-weight: 900;
  box-shadow: 0 5px 0 #b38f00;
  animation: bounce 1.2s ease-in-out infinite;
}

/* Layer 2: virus warning */
.layer-2 { inset: 0; z-index: 10010; display: grid; place-items: center; padding: 16px; background: rgba(90,0,0,.28); }
.box-virus {
  width: min(500px, 100%);
  overflow: hidden;
  border: 1px solid #b30000;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
  animation: redglow 1.2s ease-in-out infinite;
}
.virus-title {
  padding: 11px 48px 11px 14px;
  background: linear-gradient(#e0201b, #a80d0a);
  color: #fff;
  font-size: 14px; font-weight: 700;
  letter-spacing: .02em;
}
.box-virus .close { top: 5px; }
.virus-body { display: flex; align-items: center; gap: 16px; padding: 18px 20px 8px; }
.virus-shield { font-size: 54px; animation: blink 1s steps(2) infinite; }
.virus-body h2 { margin: 0 0 4px; color: #b30000; font-size: 24px; }
.virus-body p { margin: 0; color: #333; font-size: 15px; }
.virus-count { color: #d00; font-size: 18px; }
.virus-list { margin: 10px 20px; padding: 0; list-style: none; border: 1px solid #eee; border-radius: 4px; font: 13px/1.4 var(--mono); }
.virus-list li { display: flex; justify-content: space-between; padding: 6px 10px; border-bottom: 1px solid #f1f1f1; }
.virus-list li:last-child { border-bottom: 0; }
.virus-list em { color: #d00; font: 700 12px var(--sans); font-style: normal; text-transform: uppercase; }
.virus-progress { height: 14px; margin: 6px 20px 0; border-radius: 7px; background: #eee; overflow: hidden; }
.virus-progress-fill { width: 10%; height: 100%; background: repeating-linear-gradient(45deg, #2ecc40 0 10px, #25a635 10px 20px); transition: width .4s; }
.virus-path { margin: 6px 20px 0; color: #666; font: 12px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.virus-btn {
  display: block;
  width: calc(100% - 40px);
  margin: 14px 20px 20px;
  padding: 14px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(#ff3b30, #c4100a);
  color: #fff;
  font-size: 18px; font-weight: 800;
  letter-spacing: .03em;
  box-shadow: 0 5px 0 #8a0905;
  animation: pulse .9s ease-in-out infinite;
}

/* Layer 3: prize wheel */
.layer-3 { inset: 0; z-index: 10009; display: grid; place-items: center; padding: 16px; background: rgba(0,60,20,.22); }
.box-wheel {
  width: min(370px, 100%);
  padding: 22px 22px 16px;
  border-radius: 22px;
  color: #fff;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, #ff5d5d 0%, #c1121f 45%, #5c0a0f 100%);
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  transform: translate(-62%, -6%) rotate(-3deg);
}
.box-wheel .close { background: rgba(255,255,255,.22); }
.wheel-title { margin: 0; font-size: 30px; font-weight: 900; letter-spacing: .04em; text-shadow: 0 3px 0 #5c0a0f; }
.wheel-sub { margin: 4px 0 14px; font-size: 15px; }
.wheel-wrap { position: relative; width: 220px; height: 220px; margin: 0 auto; }
.wheel {
  position: absolute; inset: 0;
  border: 6px solid #ffd60a;
  border-radius: 50%;
  background: conic-gradient(#ff6b6b 0 45deg, #ffd60a 45deg 90deg, #52b788 90deg 135deg, #fff 135deg 180deg, #ff6b6b 180deg 225deg, #ffd60a 225deg 270deg, #52b788 270deg 315deg, #fff 315deg 360deg);
  box-shadow: 0 0 0 4px rgba(255,255,255,.2), 0 10px 30px rgba(0,0,0,.4);
  transition: transform 4.2s cubic-bezier(.12,.7,.1,1);
}
.wheel span {
  position: absolute; left: 50%; top: 50%;
  width: 98px; height: 18px;
  margin-top: -9px;
  padding-right: 6px;
  color: #3a0508;
  font-size: 12px; font-weight: 800; line-height: 18px;
  text-align: right;
  white-space: nowrap;
  transform-origin: 0 50%;
  transform: rotate(calc(var(--i) * 45deg - 67.5deg));
}
.wheel-pointer {
  position: absolute; top: -14px; left: 50%; z-index: 2;
  width: 0; height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 28px solid #fff;
  transform: translateX(-50%);
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.4));
}
.wheel-hub {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  width: 46px; height: 46px;
  margin: -23px 0 0 -23px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #ffd60a;
  color: #c1121f;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.wheel-btn {
  margin-top: 16px;
  padding: 13px 28px;
  border: 0;
  border-radius: 999px;
  background: #ffd60a;
  color: #5c0a0f;
  font-size: 18px; font-weight: 900;
  letter-spacing: .04em;
  box-shadow: 0 5px 0 #b38f00;
  animation: bounce 1.2s ease-in-out infinite;
}
.wheel-btn:disabled { opacity: .7; animation: none; cursor: default; }
.wheel-result { min-height: 22px; margin: 10px 0 0; font-size: 14px; }

/* Layer 4: cookies */
.layer-4 { inset: 0; z-index: 10008; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.16); }
.box-biscuit {
  width: min(940px, 100%);
  max-height: 62vh;
  overflow: auto;
  padding: 22px 28px 20px;
  border-radius: 18px 18px 0 0;
  background: #fff;
  box-shadow: 0 -20px 50px rgba(0,0,0,.25);
  font-size: 14px;
  animation: in-from-below .6s ease-out both;
}
.biscuit-head { display: flex; align-items: center; gap: 12px; }
.biscuit-icon { font-size: 34px; animation: wobble 3s ease-in-out infinite; }
.biscuit-head h2 { margin: 0; font-size: 22px; }
.box-biscuit > p { margin: 10px 0; color: #333; line-height: 1.55; }
.biscuit-partners summary { color: #1a5fb4; font-weight: 700; cursor: pointer; }
.biscuit-partners ul { columns: 3; margin: 8px 0 0; padding-left: 18px; color: #555; font-size: 13px; }
.biscuit-choices { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 14px 0; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle span { position: relative; width: 38px; height: 22px; border-radius: 11px; background: #22a447; }
.toggle span::after { content: ""; position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.biscuit-buttons { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.biscuit-yes { padding: 12px 22px; border: 0; border-radius: 8px; background: #22a447; color: #fff; font-weight: 800; font-size: 15px; }
.biscuit-yes-2 { background: #157a33; }
.biscuit-yes:disabled { opacity: .85; cursor: default; }
.biscuit-no { padding: 4px 8px; border: 0; background: none; color: #9aa0a6; font-size: 11px; transition: transform .16s ease-out; }

/* Layer 5: paywall */
.layer-5 {
  inset: 0; z-index: 10007;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0 16px 40px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.55) 30%, rgba(255,255,255,.96) 62%);
}
.box-gate {
  width: min(560px, 100%);
  padding: 26px 28px 20px;
  border-radius: 16px;
  background: var(--navy);
  color: #fff;
  text-align: center;
  box-shadow: 0 20px 50px rgba(13,43,78,.4);
}
.plus-big { font-size: 14px; padding: 4px 10px; }
.box-gate h2 { margin: 12px 0 6px; font: 700 26px/1.2 var(--serif); }
.box-gate > p { margin: 0; color: var(--pale); }
.gate-price { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin: 14px 0; }
.price-big { color: var(--yellow); font: 900 44px/1 var(--sans); }
.gate-btn { padding: 14px 34px; border: 0; border-radius: 999px; background: var(--yellow); color: var(--navy); font-size: 17px; font-weight: 900; }
.fineprint { margin: 12px 0 0; color: #8fa6c2; font-size: 11px; }

/* Layer 6: newsletter */
.layer-6 {
  inset: 0; z-index: 10006;
  display: grid; place-items: center;
  padding: 16px;
  background: rgba(10,20,35,.32);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.box-mailer {
  display: grid;
  grid-template-columns: 170px 1fr;
  width: min(580px, 100%);
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  transform: translate(40%, 20%) rotate(2deg);
}
.mailer-img { display: grid; place-items: center; font-size: 74px; background: linear-gradient(160deg, #ffcf33, #ff7a1a); }
.mailer-content { padding: 24px 24px 18px; }
.mailer-content h2 { margin: 0 0 6px; color: var(--navy); font: 700 26px/1.15 var(--serif); }
.mailer-content p { margin: 0 0 14px; color: #444; font-size: 14px; }
.mailer-form { display: flex; gap: 8px; }
.mailer-form input { flex: 1; min-width: 0; padding: 11px 12px; border: 2px solid #d5d9de; border-radius: 8px; font: inherit; }
.mailer-form button { padding: 11px 16px; border: 0; border-radius: 8px; background: var(--navy); color: #fff; font-weight: 800; }
.mailer-no { margin-top: 10px; padding: 0; border: 0; background: none; color: #8a9099; font-size: 12px; text-decoration: underline; }

/* Layer 7: Santa's email */
.layer-7 { top: 62px; right: 16px; z-index: 10005; width: min(340px, calc(100vw - 32px)); }
.box-santa {
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(0,0,0,.3), 0 0 0 1px rgba(0,0,0,.06);
  font-size: 13px;
  animation: in-from-above .5s .3s ease-out both;
}
.santa-head { padding: 8px 44px 8px 12px; background: #f1f3f4; color: #5f6368; font-size: 12px; font-weight: 600; }
.box-santa .close { top: 4px; right: 6px; width: 24px; height: 24px; background: rgba(0,0,0,.2); font-size: 12px; line-height: 24px; }
.santa-from { display: flex; align-items: center; gap: 10px; padding: 12px 14px 0; }
.santa-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #c1121f; font-size: 22px; }
.santa-from b { display: block; font-size: 14px; }
.santa-from span:not(.santa-avatar) { color: #5f6368; font-size: 12px; }
.santa-subject { margin: 10px 14px 4px; color: #c1121f; font-size: 14px; font-weight: 800; }
.box-santa > p:not(.santa-subject) { margin: 0 14px 12px; color: #333; line-height: 1.45; }
.santa-buttons { position: relative; display: flex; gap: 8px; padding: 0 14px 14px; }
.santa-buttons button { padding: 8px 12px; border: 1px solid #c9ced6; border-radius: 6px; background: #fff; color: #1a5fb4; font-size: 13px; font-weight: 700; transition: transform .16s ease-out; }
.santa-buttons .primary { border-color: #c1121f; background: #c1121f; color: #fff; }

/* Layer 8: permissions */
.layer-8 { top: 62px; left: 16px; z-index: 10005; width: min(330px, calc(100vw - 32px)); }
.box-perm {
  padding: 14px 16px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(0,0,0,.28), 0 0 0 1px rgba(0,0,0,.06);
  font-size: 14px;
  animation: in-from-above .5s ease-out both;
}
.perm-title { margin: 0 0 8px; }
.box-perm ul { margin: 0 0 12px; padding: 0; list-style: none; }
.box-perm li { padding: 3px 0; }
.perm-buttons { display: flex; justify-content: flex-end; gap: 8px; }
.perm-buttons button { padding: 8px 16px; border: 1px solid #c9ced6; border-radius: 6px; background: #fff; color: #1a5fb4; font-weight: 700; }
.perm-buttons .primary { border-color: #1a5fb4; background: #1a5fb4; color: #fff; }

/* Layer 9: sticky strips */
.layer-9a {
  top: 0; left: 0; right: 0; z-index: 10004;
  height: 48px;
  display: flex; align-items: center;
  border-bottom: 2px solid #ffd60a;
  background: linear-gradient(90deg, #0b3d1e 0%, #8b0f14 50%, #0b3d1e 100%);
  color: #ffd60a;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
.strip-marquee { flex: 1; overflow: hidden; }
.layer-9a .marquee-track { animation-duration: 26s; }
.layer-9a .marquee-track > span { font-size: 17px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.layer-9a .close { position: relative; top: auto; right: auto; flex: none; margin: 0 10px; background: rgba(255,255,255,.15); }
.layer-9b {
  left: 0; right: 0; bottom: 0; z-index: 10004;
  height: 72px;
  display: flex; align-items: center; justify-content: center; gap: 22px;
  padding: 0 16px;
  color: #fff;
  background: linear-gradient(90deg, #00b4db, #0083b0 40%, #6a00f4);
  box-shadow: 0 -6px 18px rgba(0,0,0,.25);
}
.ram-icon { font-size: 38px; animation: bounce 1s ease-in-out infinite; }
.ram-text strong { display: block; font-size: 22px; font-weight: 900; letter-spacing: .03em; text-transform: uppercase; }
.ram-text span { font-size: 13px; opacity: .9; }
.ram-meter { padding: 6px 12px; border-radius: 6px; background: rgba(0,0,0,.25); font: 700 15px var(--mono); }
.ram-meter b { color: #39ff88; }
.ram-btn {
  padding: 12px 22px;
  border-radius: 8px;
  background: #39ff88;
  color: #04261a;
  font-weight: 900;
  letter-spacing: .05em;
  animation: blink 1s steps(2) infinite;
}

/* Layer 10: towers */
.layer-10 { top: 120px; z-index: 10003; width: 160px; height: min(600px, calc(100vh - 210px)); }
.layer-10-l { left: 8px; }
.layer-10-r { right: 8px; }
.tower {
  position: relative;
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: space-around;
  padding: 26px 12px 16px;
  overflow: hidden;
  border-radius: 6px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
.tower-label { position: absolute; top: 6px; left: 0; right: 0; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.tower strong { font-size: 22px; line-height: 1.1; }
.tower p { margin: 0; font-size: 13px; line-height: 1.4; }
.tower-btn { padding: 10px 16px; border-radius: 999px; font-weight: 900; font-size: 14px; }
.tower-singles { background: linear-gradient(180deg, #ff4f8b, #b0006d); color: #fff; }
.tower-heart { font-size: 64px; animation: pulse 1s ease-in-out infinite; }
.tower-singles code { padding: 1px 4px; border-radius: 3px; background: rgba(0,0,0,.25); font-size: 12px; }
.tower-profiles { display: flex; gap: 4px; }
.tower-profiles span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.25); font-size: 22px; }
.tower-singles .tower-btn { background: #fff; color: #b0006d; }
.tower-crypto { background: linear-gradient(180deg, #06121f, #0b2d22); color: #d6ffe8; }
.crypto-name { color: #39ff88; font: 900 30px/1 var(--mono) !important; letter-spacing: .05em; }
.crypto-rate { color: #39ff88; font: 900 24px/1 var(--sans); animation: blink 1.2s steps(2) infinite; }
.crypto-chart { width: 120px; }
.tower-crypto .tower-btn { background: #39ff88; color: #06121f; }

/* Layer 11: video */
.layer-11 { right: 16px; bottom: 88px; z-index: 10002; width: min(340px, calc(100vw - 32px)); }
.box-vid { overflow: hidden; border-radius: 10px; background: #000; box-shadow: 0 14px 40px rgba(0,0,0,.45); }
.vid-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid; place-items: center;
  background: linear-gradient(120deg, #1d2b64, #f8cdda, #1d2b64);
  background-size: 300% 100%;
  animation: vidslide 5s ease-in-out infinite alternate;
}
.vid-live { position: absolute; top: 8px; left: 8px; padding: 2px 6px; border-radius: 3px; background: #e00; color: #fff; font-size: 11px; font-weight: 800; }
.vid-play {
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 24px;
  padding-left: 4px;
}
.vid-title { position: absolute; left: 10px; right: 10px; bottom: 14px; color: #fff; font-size: 13px; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.vid-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.3); }
.vid-progress div { height: 100%; background: #ffd60a; animation: vidprogress 12s linear infinite; }
.vid-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; color: #bbb; font-size: 12px; }
.vid-skip { padding: 6px 10px; border: 1px solid #555; border-radius: 4px; background: #222; color: #fff; font-size: 12px; }
.vid-skip:disabled { color: #999; cursor: default; }

/* Layer 12: sales chat */
.layer-12 { left: 16px; bottom: 88px; z-index: 10001; width: min(300px, calc(100vw - 32px)); }
.box-chat { overflow: hidden; border-radius: 14px; background: #fff; box-shadow: 0 14px 40px rgba(0,0,0,.3); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: linear-gradient(90deg, #5b21b6, #7c3aed); color: #fff; }
.chat-head b { display: block; font-size: 14px; }
.chat-head span:not(.chat-avatar) { font-size: 12px; opacity: .85; }
.chat-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #fff; font-size: 20px; }
.chat-messages { display: flex; flex-direction: column; gap: 6px; height: 150px; padding: 10px; overflow-y: auto; background: #f5f3ff; }
.msg { max-width: 85%; padding: 7px 11px; border-radius: 14px; font-size: 13px; line-height: 1.35; animation: in-from-below .25s ease-out both; }
.msg-them { align-self: flex-start; border-bottom-left-radius: 4px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.msg-me { align-self: flex-end; border-bottom-right-radius: 4px; background: #7c3aed; color: #fff; }
.msg-typing { display: flex; gap: 4px; padding: 10px 12px; }
.msg-typing i { width: 6px; height: 6px; border-radius: 50%; background: #a78bfa; animation: bounce .9s ease-in-out infinite; }
.msg-typing i:nth-child(2) { animation-delay: .15s; }
.msg-typing i:nth-child(3) { animation-delay: .3s; }
.chat-form { display: flex; border-top: 1px solid #eee; }
.chat-form input { flex: 1; min-width: 0; padding: 11px 12px; border: 0; font: inherit; font-size: 13px; outline: none; }
.chat-form button { padding: 0 14px; border: 0; background: none; color: #7c3aed; font-size: 18px; }

/* Layer 13: the sleigh flying past */
.layer-13 { top: 150px; left: 0; z-index: 10020; animation: sleigh-fly 20s linear -3s infinite; }
.sleigh { display: flex; align-items: center; animation: bounce 1.6s ease-in-out infinite; }
.sleigh-deer { font-size: 40px; letter-spacing: -8px; }
.sleigh-rope { width: 40px; height: 2px; background: #7a5a30; }
.sleigh-ride { position: relative; font-size: 50px; line-height: 1; }
.sleigh-ride span { position: absolute; left: 8px; top: -20px; font-size: 32px; }
.sleigh-banner {
  padding: 8px 18px;
  border: 3px solid #c1121f;
  border-radius: 4px;
  background: #fff;
  color: #c1121f;
  font: 900 16px/1.2 var(--sans);
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  transform: rotate(2deg);
}
.sleigh-banner small { display: block; color: #555; font-size: 11px; font-weight: 600; }

/* Layer 14: snow, on top of everything */
.layer-14 { inset: 0; z-index: 10030; overflow: hidden; pointer-events: none; }
.layer-14::before, .layer-14::after {
  content: "";
  position: absolute; left: 0; right: 0; top: -480px; bottom: 0;
  background-image:
    radial-gradient(circle at 40px 60px, #dfe9f7 0 3.3px, rgba(190,208,232,0) 5.3px),
    radial-gradient(circle at 173px 22px, #dfe9f7 0 2.8px, rgba(190,208,232,0) 4.8px),
    radial-gradient(circle at 108px 168px, #dfe9f7 0 3.9px, rgba(190,208,232,0) 5.9px),
    radial-gradient(circle at 217px 127px, #dfe9f7 0 2.2px, rgba(190,208,232,0) 4.2px),
    radial-gradient(circle at 15px 205px, #dfe9f7 0 2.8px, rgba(190,208,232,0) 4.8px),
    radial-gradient(circle at 151px 96px, #dfe9f7 0 2.2px, rgba(190,208,232,0) 4.2px);
  background-size: 240px 240px;
  animation: snowfall 16s linear infinite;
}
.layer-14::after {
  background-image:
    radial-gradient(circle at 33px 113px, #dfe9f7 0 2.2px, rgba(190,208,232,0) 4.2px),
    radial-gradient(circle at 122px 37px, #dfe9f7 0 2.2px, rgba(190,208,232,0) 4.2px),
    radial-gradient(circle at 79px 147px, #dfe9f7 0 1.7px, rgba(190,208,232,0) 3.7px);
  background-size: 160px 160px;
  background-position: 57px 0;
  animation-duration: 24s;
  opacity: .75;
}
.snow-tag {
  position: absolute; left: 50%; bottom: 82px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  color: #0b3d91;
  font-size: 12px; font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  pointer-events: auto;
  transform: translateX(-50%);
}

/* Toasts */
.toaster {
  position: fixed; top: 64px; left: 50%; z-index: 20000;
  width: min(420px, calc(100vw - 32px));
  display: grid; gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  padding: 11px 15px;
  border-radius: 10px;
  background: #15171a;
  color: #fff;
  font: 600 14px/1.4 var(--sans);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  animation: in-from-above .25s ease-out both;
  transition: opacity .3s, transform .3s;
}
.toast.out { opacity: 0; transform: translateY(-6px); }

.shake { animation: shake .45s ease-in-out !important; }

/* ---------- Animations ---------- */
@keyframes slide { to { transform: translateX(-50%); } }
@keyframes blink { 50% { opacity: .35; } }
@keyframes pulse { 50% { transform: scale(1.06); } }
@keyframes bounce { 50% { transform: translateY(-6px); } }
@keyframes wobble { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
@keyframes redglow { 50% { box-shadow: 0 30px 80px rgba(0,0,0,.45), 0 0 0 8px rgba(255,0,0,.25); } }
@keyframes shakebtn { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-6deg); } 88% { transform: rotate(6deg); } 92% { transform: rotate(-4deg); } 96% { transform: rotate(4deg); } }
@keyframes shake { 20% { translate: -10px 0; } 40% { translate: 10px 0; } 60% { translate: -6px 0; } 80% { translate: 6px 0; } }
@keyframes confetti { to { background-position: 0 60px, 20px 125px, 45px 80px; } }
@keyframes in-from-below { from { opacity: 0; transform: translateY(24px); } }
@keyframes in-from-above { from { opacity: 0; transform: translateY(-14px); } }
@keyframes vidslide { to { background-position: 100% 0; } }
@keyframes vidprogress { from { width: 0; } to { width: 100%; } }
@keyframes bulb { 50% { opacity: .35; box-shadow: none; } }
@keyframes snowfall { to { transform: translateY(480px); } }
@keyframes sleigh-fly { 0% { transform: translateX(-100%); } 55%, 100% { transform: translateX(100vw); } }

/* ---------- Smaller screens ---------- */
@media (max-width: 1100px) {
  .box-calendar { transform: translate(30%, -18%) rotate(2deg); }
  .box-wheel { transform: translate(-40%, -10%) rotate(-3deg); }
  .box-mailer { transform: translate(22%, 22%) rotate(2deg); }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; padding: 20px 16px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tagline, .topbar-weather { display: none; }
  .box-calendar { transform: translate(6%, -10%) rotate(2deg); }
  .box-wheel { transform: translate(-6%, -16%) rotate(-3deg); }
  .box-mailer { grid-template-columns: 1fr; transform: translate(4%, 18%) rotate(2deg); }
  .mailer-img { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 18px; }
  .ram-meter { display: none; }
}
@media (max-width: 760px) {
  .stack-panorama { aspect-ratio: auto; height: 210px; }
  .layer-10 { display: none; }
  .masthead-buttons .btn-outline, .topbar-links { display: none; }
  .logo-text { font-size: 34px; }
  .top-story h1 { font-size: 32px; }
  .card-grid { grid-template-columns: 1fr; }
  .biscuit-partners ul { columns: 2; }
  .inline-tile.postit, .inline-tile.ecard, .inline-tile.usbgift { flex-wrap: wrap; }
  .usb-box { display: none; }
  .inline-tile.usbgift { padding: 20px; background: repeating-linear-gradient(45deg, #b5121b 0 18px, #c92a2a 18px 36px); }
  .layer-13 { top: 110px; }
  .sleigh-deer { font-size: 30px; }
  .sleigh-ride { font-size: 38px; }
  .sleigh-banner { font-size: 13px; }
  .snow-tag { width: max-content; max-width: calc(100vw - 32px); white-space: normal; text-align: center; }
  .layer-9b { gap: 12px; }
  .ram-text strong { font-size: 16px; }
  .ram-text span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
