/* Holiday themes: the decorations holiday.js puts up. Everything here is decoration only: no clicks, gone when
   printing, still with "reduce motion", and the corners stay clear on small screens. */
.hol-strip, .hol-hang, .hol-corner, .hol-fall, .hol-cap { pointer-events: none; user-select: none; }

/* the garland, hanging just under the header */
.hol-strip { position: absolute; left: 0; right: 0; top: 100%; height: 34px; overflow: hidden; z-index: 1; filter: drop-shadow(0 2px 2px rgb(0 0 0 / .18)); }
.hol-strip svg { display: block; }
.hol-bulb { animation: hol-glow 2.4s ease-in-out infinite; }
@keyframes hol-glow { 0%, 100% { opacity: 1; filter: drop-shadow(0 0 4px var(--c)); } 50% { opacity: .55; filter: none; } }
.hol-tw { animation: hol-tw 3s ease-in-out infinite; }
@keyframes hol-tw { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.hol-flame { animation: hol-flame .5s steps(2) infinite; }
@keyframes hol-flame { 50% { opacity: .55; } }
.hol-ticker { display: flex; width: max-content; height: 20px; align-items: center; background: #0d1b12; color: #4ade80; font: 600 12px/20px Consolas, "Courier New", monospace;
  letter-spacing: .12em; animation: hol-scroll 90s linear infinite; box-shadow: inset 0 -2px 0 rgb(74 222 128 / .35); }
.hol-pi .hol-ticker { background: #2e1065; color: #e9d5ff; box-shadow: inset 0 -2px 0 #fbbf24; }
.hol-ticker span { padding-right: 2em; white-space: nowrap; }
@keyframes hol-scroll { to { transform: translateX(-50%); } }

/* something on the garland: the elf swings, the spider drops, the disco ball turns */
.hol-hang { position: absolute; top: calc(100% + 1px); right: 9%; z-index: 2; transform-origin: 50% 0; }
.hol-hang svg { display: block; }
.hol-hang-christmas { width: 54px; animation: hol-swing 4.5s ease-in-out infinite; }
.hol-hang-halloween { width: 26px; right: 22%; animation: hol-drop 7s ease-in-out infinite; }
.hol-hang-newyear { width: 44px; right: 16%; animation: hol-swing 6s ease-in-out infinite; }
@keyframes hol-swing { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes hol-drop { 0%, 100% { transform: translateY(-36px); } 50% { transform: translateY(0); } }

/* characters in the bottom corners, peeking in from the edges */
.hol-corner { position: fixed; bottom: 0; z-index: 20; width: 104px; opacity: .97; filter: drop-shadow(0 4px 6px rgb(0 0 0 / .18)); }
.hol-corner svg { display: block; width: 100%; height: auto; }
.hol-left { left: 6px; animation: hol-bob 5s ease-in-out infinite; }
.hol-right { right: 6px; animation: hol-bob 5s ease-in-out -2.5s infinite; }
@keyframes hol-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.hol-halloween .hol-right { animation: hol-float 4s ease-in-out infinite; }
@keyframes hol-float { 0%, 100% { transform: translateY(0); opacity: .97; } 50% { transform: translateY(-10px); opacity: .8; } }
.hol-glow { filter: drop-shadow(0 0 5px #ffb300); animation: hol-flicker 1.8s ease-in-out infinite; }
@keyframes hol-flicker { 0%, 100% { opacity: 1; } 40% { opacity: .75; } 60% { opacity: .95; } }
.hol-twinkle { animation: hol-tw 1.6s ease-in-out infinite; }
.hol-burst { transform-origin: 40px 40px; transform-box: view-box; animation: hol-pop 2.6s ease-out infinite; }
@keyframes hol-pop { 0% { transform: scale(.2); opacity: 0; } 30% { opacity: 1; } 80% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.05); opacity: 0; } }
.hol-wave { animation: hol-wave 3s ease-in-out infinite; transform-origin: 0 50%; transform-box: fill-box; }
@keyframes hol-wave { 0%, 100% { transform: skewY(0); } 50% { transform: skewY(-2deg); } }
.hol-saber { filter: drop-shadow(0 0 4px var(--glow)) drop-shadow(0 0 9px var(--glow)); animation: hol-hum 1.4s ease-in-out infinite; }
@keyframes hol-hum { 50% { opacity: .85; } }
.hol-coin { transform-origin: 32px 32px; transform-box: view-box; animation: hol-spin 1.6s linear infinite; }
@keyframes hol-spin { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.15); } }
.hol-blink { animation: hol-blink 1s steps(1) infinite; }
@keyframes hol-blink { 50% { opacity: 0; } }
.hol-steam { animation: hol-rise 2.2s ease-in-out infinite; }
@keyframes hol-rise { 0% { transform: translateY(2px); opacity: 0; } 50% { opacity: .9; } 100% { transform: translateY(-4px); opacity: 0; } }
.hol-bolt { animation: hol-flash 3s steps(1) infinite; }
@keyframes hol-flash { 0%, 6%, 12% { opacity: 1; } 3%, 9% { opacity: .2; } }

/* falling snow, leaves, confetti… over the page but under the header */
.hol-fall { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 19; }

/* snow on the headings */
.hol-cap { position: absolute; height: 12px; z-index: 1; border-radius: 10px 10px 4px 4px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 16' preserveAspectRatio='none'%3E%3Cpath d='M0 16V9C3 4 8 3 12 5 15 1 22 0 26 4 30 2 36 2 39 5 43 1 50 1 54 4 58 2 64 2 67 5 71 2 77 3 80 8V16C77 13 75 16 72 14 69 17 66 13 62 15 59 16 57 13 53 15 50 17 47 13 43 14 40 16 37 13 33 15 30 17 27 13 23 14 20 16 17 13 13 15 9 16 6 13 3 15Z' fill='%23fff'/%3E%3Cpath d='M0 13C4 12 8 14 12 12S20 13 26 12 36 14 40 12 50 13 54 12 64 14 68 12 76 13 80 12V16C77 13 75 16 72 14 69 17 66 13 62 15 59 16 57 13 53 15 50 17 47 13 43 14 40 16 37 13 33 15 30 17 27 13 23 14 20 16 17 13 13 15 9 16 6 13 3 15L0 16Z' fill='%23dbe7f3'/%3E%3C/svg%3E") repeat-x;
  background-size: 80px 100%; filter: drop-shadow(0 1px 1.5px rgb(60 90 130 / .35)); }

/* or a snow bank at the letters' feet */
.hol-cap.hol-bank { border-radius: 14px 14px 3px 3px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 24' preserveAspectRatio='none'%3E%3Cpath d='M0 24V15C6 8 15 6 23 11 31 3 45 2 53 9 61 4 73 3 81 10 89 4 101 3 109 9 114 7 118 9 120 12V24Z' fill='%23fff'/%3E%3Cpath d='M0 24V19C20 16 40 21 60 18S100 17 120 20V24Z' fill='%23dbe7f3'/%3E%3Cpath d='M23 11C27 9 31 10 33 12M53 9C57 7 61 8 63 10M81 10C85 8 89 9 91 11' stroke='%23e8f0f8' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") repeat-x;
  background-size: 120px 100%; filter: drop-shadow(0 1px 1.5px rgb(60 90 130 / .45)) drop-shadow(0 3px 4px rgb(60 90 130 / .18)); }

/* tables get a striped border in the holiday's colors */
.hol .table-wrap, .hol main table:not(.table-wrap table) { border: 4px solid transparent; border-image: var(--hol-stripe) 4; }
.hol main table:not(.table-wrap table) { border-collapse: separate; border-spacing: 0; }
.hol-t-candy { --hol-stripe: repeating-linear-gradient(45deg, #c62828 0 7px, #fff 7px 14px, #2e7d32 14px 21px, #fff 21px 28px); }
.hol-t-autumn { --hol-stripe: repeating-linear-gradient(45deg, #e65100 0 8px, #f9a825 8px 16px, #8d6e63 16px 24px); }
.hol-t-halloween { --hol-stripe: repeating-linear-gradient(45deg, #ef6c00 0 8px, #212121 8px 16px); }
.hol-t-gold { --hol-stripe: repeating-linear-gradient(45deg, #f9a825 0 6px, #fff3c4 6px 10px, #b0bec5 10px 16px); }
.hol-t-love { --hol-stripe: repeating-linear-gradient(45deg, #e53935 0 6px, #fce4ec 6px 12px, #f48fb1 12px 18px); }
.hol-t-green { --hol-stripe: repeating-linear-gradient(45deg, #2e7d32 0 7px, #fff 7px 12px, #f9a825 12px 15px, #fff 15px 20px); }
.hol-t-pastel { --hol-stripe: repeating-linear-gradient(45deg, #f48fb1 0 7px, #81d4fa 7px 14px, #fff59d 14px 21px, #c5e1a5 21px 28px); }
.hol-t-usa { --hol-stripe: repeating-linear-gradient(45deg, #b22234 0 7px, #fff 7px 12px, #3c3b6e 12px 19px, #fff 19px 24px); }
.hol-t-juneteenth { --hol-stripe: repeating-linear-gradient(45deg, #1e40af 0 7px, #fff 7px 11px, #c62828 11px 18px, #fff 18px 22px); }
.hol-t-calm { --hol-stripe: linear-gradient(90deg, #90a4ae, #cfd8dc, #90a4ae); }
.hol-t-navy { --hol-stripe: repeating-linear-gradient(45deg, #1e3a8a 0 8px, #fbbf24 8px 11px); }
.hol-t-pi { --hol-stripe: repeating-linear-gradient(45deg, #7c3aed 0 8px, #fbbf24 8px 12px, #d84315 12px 20px); }
.hol-t-bricks { --hol-stripe: repeating-linear-gradient(90deg, #c0702a 0 14px, #6d3a12 14px 16px); }
.hol-t-space { --hol-stripe: linear-gradient(90deg, #3b82f6, #0b1026 45%, #0b1026 55%, #ef4444); }
.hol-t-towel { --hol-stripe: repeating-linear-gradient(90deg, #43a047 0 10px, #ffb300 10px 20px, #ef5350 20px 30px, #26a69a 30px 40px); }
.hol-t-rope { --hol-stripe: repeating-linear-gradient(45deg, #a1683a 0 5px, #c48a52 5px 10px); }
.hol-t-code { --hol-stripe: repeating-linear-gradient(90deg, #4ade80 0 6px, #0d1b12 6px 10px); }
.hol-t-flames { --hol-stripe: linear-gradient(90deg, #f59e0b, #ef4444, #f59e0b); }

/* Settings → Holiday themes: behind the text (under the words, cards and pictures; the page's own background stays
   under it), still instead of moving, and the corner characters' size */
.hol-strip.hol-back, .hol-hang.hol-back, .hol-corner.hol-back, .hol-fall.hol-back, .hol-cap.hol-back { z-index: -1; }
.hol-still, .hol-still * { animation: none !important; }
/* Menus on top (the default): an open drop-down sits over the garland and the hanging character */
.hol-menu-top .sb-list, .hol-menu-top .site-header .sub { z-index: 5; }
.hol-menu-top .site-header .nav { z-index: 5; }
.hol-corner.hol-size-s { width: 76px; }
.hol-corner.hol-size-l { width: 144px; }

/* the snowman on the website is a link to the hidden game: always clickable, so always in front */
.hol-corner.hol-play { pointer-events: auto; cursor: pointer; z-index: 21; }
.hol-play:hover, .hol-play:focus-visible { transform: translateY(-6px) rotate(-3deg); animation-play-state: paused; }
.hol-play:focus-visible { outline: 3px solid #fff; outline-offset: 4px; border-radius: 12px; }
.hol-play-tip { position: absolute; bottom: 100%; left: 50%; transform: translateX(-30%); margin-bottom: 6px; padding: 4px 10px; border-radius: 99px; white-space: nowrap;
  background: #fff; color: #111; font: 700 13px/1.3 system-ui, sans-serif; box-shadow: 0 4px 12px rgb(0 0 0 / .2); opacity: 0; transition: opacity .2s; }
.hol-play:hover .hol-play-tip, .hol-play:focus-visible .hol-play-tip { opacity: 1; }

/* the greeting in the website's top bar */
.hol-greet { font-weight: 700; color: #fff; padding: 2px 10px; border-radius: 99px; background: color-mix(in srgb, var(--hol-1) 75%, transparent);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .2); }

@media (max-width: 860px) { .hol-corner, .hol-hang { display: none; } .hol-strip { height: 26px; } }
@media (prefers-reduced-motion: reduce) { .hol *, .hol-strip *, .hol-corner, .hol-corner *, .hol-hang { animation: none !important; } }
@media print { .hol-strip, .hol-hang, .hol-corner, .hol-fall, .hol-cap, .hol-greet { display: none !important; } .hol .table-wrap, .hol table { border-image: none !important; } }
.hol-greet-play { color: #fff !important; text-decoration: underline; pointer-events: auto; }
