/* Active category tab background effects - design preview (Matt 2026-11-01).
   Only applies when <html data-catfx="1..30"> is set by js/catnav-fx.js, which only
   happens when /menu is opened with ?fx. Design 0 (no attribute) = the live look, untouched.
   Each effect's final state lives on .active; keyframes only describe the "from" side or a
   loop, so reduced-motion (animations off) still lands on the right resting look. */

html[data-catfx] .cat-nav a { position: relative; isolation: isolate; overflow: hidden; transition: color .25s, background-color .25s, box-shadow .25s; }
html[data-catfx] .cat-nav a::before,
html[data-catfx] .cat-nav a::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  pointer-events: none; opacity: 0; transition: opacity .3s, transform .35s cubic-bezier(.2,.8,.2,1), clip-path .35s;
}
html[data-catfx] .cat-nav a.active { background: none; }
html[data-catfx] .cat-nav a.active::before { opacity: 1; }


/* 1 Gold fill - solid, fades in */
html[data-catfx="1"] .cat-nav a.active { color: var(--ink); }
html[data-catfx="1"] .cat-nav a.active .cat-ico { stroke: var(--ink); }
html[data-catfx="1"] .cat-nav a::before { background: var(--gold); }

/* 2 Gold sweep - a lighter band rolls through a gold gradient */
html[data-catfx="2"] .cat-nav a.active { color: var(--ink); }
html[data-catfx="2"] .cat-nav a.active .cat-ico { stroke: var(--ink); }
html[data-catfx="2"] .cat-nav a::before { background: linear-gradient(110deg, var(--gold) 0%, var(--gold) 35%, color-mix(in srgb, var(--gold) 55%, #fff) 50%, var(--gold) 65%, var(--gold) 100%); background-size: 250% 100%; }
html[data-catfx="2"] .cat-nav a.active::before { animation: cfx-pan 2.8s linear infinite; }

/* 3 Sunset - static gold to coral gradient */
html[data-catfx="3"] .cat-nav a.active { color: #fff; }
html[data-catfx="3"] .cat-nav a.active .cat-ico { stroke: #fff; }
html[data-catfx="3"] .cat-nav a::before { background: linear-gradient(135deg, var(--gold), var(--coral)); }

/* 4 Breathing glow - soft inner gold glow that swells and settles */
html[data-catfx="4"] .cat-nav a.active { color: var(--paper); }
html[data-catfx="4"] .cat-nav a::before { background: color-mix(in srgb, var(--gold) 12%, transparent); box-shadow: inset 0 0 14px color-mix(in srgb, var(--gold) 55%, transparent); }
html[data-catfx="4"] .cat-nav a.active::before { animation: cfx-breathe 2.6s ease-in-out infinite; }

/* 5 Pulse - tinted surface that gently pulses opacity */
html[data-catfx="5"] .cat-nav a.active { color: var(--paper); }
html[data-catfx="5"] .cat-nav a::before { background: color-mix(in srgb, var(--gold) 30%, transparent); }
html[data-catfx="5"] .cat-nav a.active::before { animation: cfx-pulse 1.6s ease-in-out infinite; }

/* 6 Pop - the fill springs in with a little overshoot */
html[data-catfx="6"] .cat-nav a.active { color: var(--paper); }
html[data-catfx="6"] .cat-nav a::before { background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--gold); }
html[data-catfx="6"] .cat-nav a.active::before { animation: cfx-pop .45s cubic-bezier(.3,1.6,.5,1) both; }

/* 7 Shimmer - surface fill with a glint that passes every few seconds */
html[data-catfx="7"] .cat-nav a.active { color: var(--paper); }
html[data-catfx="7"] .cat-nav a::before { background: var(--surface-2); }
html[data-catfx="7"] .cat-nav a::after { background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--gold) 45%, transparent) 50%, transparent 70%); background-size: 300% 100%; background-repeat: no-repeat; }
html[data-catfx="7"] .cat-nav a.active::after { opacity: 1; animation: cfx-glint 3s ease-in-out infinite; }

/* 8 Slide in - fill grows in from the left */
html[data-catfx="8"] .cat-nav a.active { color: var(--ink); }
html[data-catfx="8"] .cat-nav a.active .cat-ico { stroke: var(--ink); }
html[data-catfx="8"] .cat-nav a::before { background: var(--gold); transform: scaleX(0); transform-origin: left; opacity: 1; }
html[data-catfx="8"] .cat-nav a.active::before { transform: scaleX(1); }

/* 9 Rise - fill rises from the bottom edge */
html[data-catfx="9"] .cat-nav a.active { color: var(--ink); }
html[data-catfx="9"] .cat-nav a.active .cat-ico { stroke: var(--ink); }
html[data-catfx="9"] .cat-nav a::before { background: var(--gold); transform: scaleY(0); transform-origin: bottom; opacity: 1; }
html[data-catfx="9"] .cat-nav a.active::before { transform: scaleY(1); }

/* 10 Bloom - radial gold blooms out from the center */
html[data-catfx="10"] .cat-nav a.active { color: var(--paper); }
html[data-catfx="10"] .cat-nav a::before { background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--gold) 55%, transparent), color-mix(in srgb, var(--gold) 8%, transparent) 75%); transform: scale(.2); }
html[data-catfx="10"] .cat-nav a.active::before { transform: scale(1); }

/* 11 Spin ring - rotating gold/coral ring around a surface fill */
html[data-catfx="11"] .cat-nav a.active { color: var(--paper); }
html[data-catfx="11"] .cat-nav a::before { inset: -60%; border-radius: 0; background: conic-gradient(var(--gold), var(--coral), transparent 40%, var(--gold) 70%, var(--gold)); z-index: -2; }
html[data-catfx="11"] .cat-nav a::after { inset: 2px; border-radius: 8px; background: var(--ink); }
html[data-catfx="11"] .cat-nav a.active::before { animation: cfx-spin 3s linear infinite; }
html[data-catfx="11"] .cat-nav a.active::after { opacity: 1; }

/* 12 Neon - thin gold outline with a faint flicker */
html[data-catfx="12"] .cat-nav a.active { color: var(--gold); }
html[data-catfx="12"] .cat-nav a::before { box-shadow: inset 0 0 0 1.5px var(--gold), inset 0 0 12px color-mix(in srgb, var(--gold) 40%, transparent); }
html[data-catfx="12"] .cat-nav a.active::before { animation: cfx-flicker 4s linear infinite; }

/* 13 Ripple - rings expand out from the center and fade */
html[data-catfx="13"] .cat-nav a.active { color: var(--paper); }
html[data-catfx="13"] .cat-nav a::before { background: var(--surface-2); }
html[data-catfx="13"] .cat-nav a::after { inset: auto; left: 50%; top: 50%; width: 120%; aspect-ratio: 1; border-radius: 50%; translate: -50% -50%; background: radial-gradient(circle, transparent 40%, color-mix(in srgb, var(--gold) 50%, transparent) 55%, transparent 70%); }
html[data-catfx="13"] .cat-nav a.active::after { animation: cfx-ripple 2s ease-out infinite; }

/* 14 Aurora - slow drifting gold / coral / terracotta wash */
html[data-catfx="14"] .cat-nav a.active { color: var(--paper); }
html[data-catfx="14"] .cat-nav a::before { background: radial-gradient(60% 90% at 20% 30%, color-mix(in srgb, var(--gold) 55%, transparent), transparent), radial-gradient(60% 90% at 80% 70%, color-mix(in srgb, var(--coral) 45%, transparent), transparent), var(--surface-2); background-size: 200% 200%; }
html[data-catfx="14"] .cat-nav a.active::before { animation: cfx-drift 6s ease-in-out infinite alternate; }

/* 15 Glass - frosted pane with a top highlight */
html[data-catfx="15"] .cat-nav a.active { color: var(--paper); }
html[data-catfx="15"] .cat-nav a::before { background: linear-gradient(to bottom, rgba(255,255,255,.28), rgba(255,255,255,.06) 55%, rgba(255,255,255,.1)); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 0 0 1px rgba(255,255,255,.14); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* 16 Ember - warm gradient rising from the bottom with a flicker */
html[data-catfx="16"] .cat-nav a.active { color: var(--paper); }
html[data-catfx="16"] .cat-nav a::before { background: linear-gradient(to top, color-mix(in srgb, var(--coral) 60%, transparent), color-mix(in srgb, var(--gold) 25%, transparent) 60%, transparent); background-size: 100% 180%; background-position: 0 100%; }
html[data-catfx="16"] .cat-nav a.active::before { animation: cfx-ember 1.8s ease-in-out infinite alternate; }

/* 17 Inverted - solid paper fill, ink text */
html[data-catfx="17"] .cat-nav a.active { color: var(--ink); }
html[data-catfx="17"] .cat-nav a.active .cat-ico { stroke: var(--gold); }
html[data-catfx="17"] .cat-nav a::before { background: var(--paper); }

/* 18 Bar to fill - a gold underline grows up into a full tint */
html[data-catfx="18"] .cat-nav a.active { color: var(--paper); }
html[data-catfx="18"] .cat-nav a::before { background: linear-gradient(var(--gold), var(--gold)) bottom / 100% 3px no-repeat, color-mix(in srgb, var(--gold) 20%, transparent); }
html[data-catfx="18"] .cat-nav a.active::before { animation: cfx-bar .55s cubic-bezier(.2,.8,.2,1) both; }

/* 19 Stripes - slow moving diagonal stripes */
html[data-catfx="19"] .cat-nav a.active { color: var(--paper); }
html[data-catfx="19"] .cat-nav a::before { background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--gold) 30%, transparent) 0 6px, color-mix(in srgb, var(--gold) 12%, transparent) 6px 12px); background-size: 34px 34px; }
html[data-catfx="19"] .cat-nav a.active::before { animation: cfx-stripes 1.2s linear infinite; }

/* 20 Focus fade - fill fades in from a blur */
html[data-catfx="20"] .cat-nav a.active { color: var(--paper); }
html[data-catfx="20"] .cat-nav a::before { background: color-mix(in srgb, var(--gold) 26%, transparent); }
html[data-catfx="20"] .cat-nav a.active::before { animation: cfx-unblur .5s ease-out both; }

/* 21 Spotlight - a light pool from above that sways a little */
html[data-catfx="21"] .cat-nav a.active { color: var(--paper); }
html[data-catfx="21"] .cat-nav a::before { background: radial-gradient(70% 110% at 50% -10%, color-mix(in srgb, var(--gold) 60%, transparent), transparent 75%); background-size: 160% 100%; background-position: 50% 0; }
html[data-catfx="21"] .cat-nav a.active::before { animation: cfx-sway 3.5s ease-in-out infinite alternate; }

/* 22 Frame corners - TV-board price-frame corners snap in */
html[data-catfx="22"] .cat-nav a.active { color: var(--paper); }
html[data-catfx="22"] .cat-nav a::before {
  border-radius: 0;
  background: linear-gradient(var(--gold),var(--gold)) left top / 12px 2px no-repeat, linear-gradient(var(--gold),var(--gold)) left top / 2px 12px no-repeat,
              linear-gradient(var(--gold),var(--gold)) right top / 12px 2px no-repeat, linear-gradient(var(--gold),var(--gold)) right top / 2px 12px no-repeat,
              linear-gradient(var(--gold),var(--gold)) left bottom / 12px 2px no-repeat, linear-gradient(var(--gold),var(--gold)) left bottom / 2px 12px no-repeat,
              linear-gradient(var(--gold),var(--gold)) right bottom / 12px 2px no-repeat, linear-gradient(var(--gold),var(--gold)) right bottom / 2px 12px no-repeat,
              color-mix(in srgb, var(--gold) 10%, transparent);
}
html[data-catfx="22"] .cat-nav a.active::before { animation: cfx-frame .35s cubic-bezier(.2,.8,.2,1) both; }

/* 23 Halftone - drifting dot pattern */
html[data-catfx="23"] .cat-nav a.active { color: var(--paper); }
html[data-catfx="23"] .cat-nav a::before { background: radial-gradient(color-mix(in srgb, var(--gold) 55%, transparent) 1.2px, transparent 1.6px) 0 0 / 7px 7px, color-mix(in srgb, var(--gold) 8%, transparent); }
html[data-catfx="23"] .cat-nav a.active::before { animation: cfx-dots 3s linear infinite; }

/* 24 Gradient border - gold to coral outline, soft tint inside */
html[data-catfx="24"] .cat-nav a.active { color: var(--paper); }
html[data-catfx="24"] .cat-nav a::before { background: linear-gradient(135deg, var(--gold), var(--coral)); }
html[data-catfx="24"] .cat-nav a::after { inset: 2px; border-radius: 8px; background: linear-gradient(color-mix(in srgb, var(--gold) 12%, transparent), color-mix(in srgb, var(--gold) 12%, transparent)), var(--ink); }
html[data-catfx="24"] .cat-nav a.active::after { opacity: 1; }

/* 25 Heartbeat - double-beat scale on the fill */
html[data-catfx="25"] .cat-nav a.active { color: var(--ink); }
html[data-catfx="25"] .cat-nav a.active .cat-ico { stroke: var(--ink); }
html[data-catfx="25"] .cat-nav a::before { background: var(--coral); }
html[data-catfx="25"] .cat-nav a.active::before { animation: cfx-beat 1.6s ease-in-out infinite; }

/* 26 Diagonal wipe - fill wipes in on a slant */
html[data-catfx="26"] .cat-nav a.active { color: var(--ink); }
html[data-catfx="26"] .cat-nav a.active .cat-ico { stroke: var(--ink); }
html[data-catfx="26"] .cat-nav a::before { background: var(--gold); opacity: 1; clip-path: polygon(0 0, 0 0, -30% 100%, -30% 100%); }
html[data-catfx="26"] .cat-nav a.active::before { clip-path: polygon(0 0, 130% 0, 100% 100%, -30% 100%); }

/* 27 Blob - a liquid gold shape that slowly morphs */
html[data-catfx="27"] .cat-nav a.active { color: var(--paper); }
html[data-catfx="27"] .cat-nav a::before { inset: 3px 6px; background: color-mix(in srgb, var(--gold) 40%, transparent); border-radius: 40% 60% 55% 45% / 55% 45% 60% 40%; }
html[data-catfx="27"] .cat-nav a.active::before { animation: cfx-blob 4s ease-in-out infinite alternate; }

/* 28 Curtain - two halves meet in the middle */
html[data-catfx="28"] .cat-nav a.active { color: var(--ink); }
html[data-catfx="28"] .cat-nav a.active .cat-ico { stroke: var(--ink); }
html[data-catfx="28"] .cat-nav a::before, html[data-catfx="28"] .cat-nav a::after { background: var(--gold); opacity: 1; transform: scaleX(0); }
html[data-catfx="28"] .cat-nav a::before { right: 50%; border-radius: 10px 0 0 10px; transform-origin: left; }
html[data-catfx="28"] .cat-nav a::after { left: 50%; border-radius: 0 10px 10px 0; transform-origin: right; }
html[data-catfx="28"] .cat-nav a.active::before, html[data-catfx="28"] .cat-nav a.active::after { transform: scaleX(1); }

/* 29 Color cycle - fill slowly cycles gold, coral, terracotta */
html[data-catfx="29"] .cat-nav a.active { color: #fff; }
html[data-catfx="29"] .cat-nav a.active .cat-ico { stroke: #fff; }
html[data-catfx="29"] .cat-nav a::before { background: linear-gradient(90deg, var(--gold), var(--coral), #c4562f, var(--gold), var(--coral)); background-size: 400% 100%; }
html[data-catfx="29"] .cat-nav a.active::before { animation: cfx-pan 8s linear infinite; }

/* 30 Sparkle - a tint with little twinkling specks */
html[data-catfx="30"] .cat-nav a.active { color: var(--paper); }
html[data-catfx="30"] .cat-nav a::before { background: color-mix(in srgb, var(--gold) 16%, transparent); }
html[data-catfx="30"] .cat-nav a::after {
  background: radial-gradient(circle at 18% 28%, var(--gold) 0 1.4px, transparent 2px), radial-gradient(circle at 78% 22%, var(--gold) 0 1.2px, transparent 1.8px),
              radial-gradient(circle at 86% 74%, var(--gold) 0 1.5px, transparent 2.1px), radial-gradient(circle at 30% 80%, var(--gold) 0 1.1px, transparent 1.7px),
              radial-gradient(circle at 55% 12%, var(--gold) 0 1px, transparent 1.6px);
}
html[data-catfx="30"] .cat-nav a.active::after { opacity: 1; animation: cfx-twinkle 1.8s ease-in-out infinite; }

/* Keyframes */
@keyframes cfx-pan { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@keyframes cfx-breathe { 0%,100% { box-shadow: inset 0 0 6px color-mix(in srgb, var(--gold) 35%, transparent); } 50% { box-shadow: inset 0 0 18px color-mix(in srgb, var(--gold) 75%, transparent); } }
@keyframes cfx-pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes cfx-pop { from { transform: scale(.6); opacity: 0; } }
@keyframes cfx-glint { 0% { background-position: 150% 0; } 60%,100% { background-position: -50% 0; } }
@keyframes cfx-spin { to { transform: rotate(360deg); } }
@keyframes cfx-flicker { 0%,18%,22%,62%,64%,100% { opacity: 1; } 20%,63% { opacity: .35; } }
@keyframes cfx-ripple { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
@keyframes cfx-drift { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
@keyframes cfx-ember { from { background-position: 0 100%; } to { background-position: 0 70%; } }
@keyframes cfx-bar { from { background-size: 100% 3px, 100% 0; } 50% { background-size: 100% 3px, 100% 0; } }
@keyframes cfx-stripes { to { background-position: 34px 0; } }
@keyframes cfx-unblur { from { filter: blur(8px); opacity: 0; transform: scale(1.15); } }
@keyframes cfx-sway { from { background-position: 30% 0; } to { background-position: 70% 0; } }
@keyframes cfx-frame { from { transform: scale(1.25); opacity: 0; } }
@keyframes cfx-dots { to { background-position: 7px 7px, 0 0; } }
@keyframes cfx-beat { 0%,40%,100% { transform: scale(1); } 10% { transform: scale(.92); } 20% { transform: scale(1); } 30% { transform: scale(.94); } }
@keyframes cfx-blob { 0% { border-radius: 40% 60% 55% 45% / 55% 45% 60% 40%; } 50% { border-radius: 60% 40% 45% 55% / 40% 60% 45% 55%; } 100% { border-radius: 50% 50% 35% 65% / 60% 40% 55% 45%; } }
@keyframes cfx-twinkle { 0%,100% { opacity: 1; } 50% { opacity: .2; } }

@media (prefers-reduced-motion: reduce) {
  html[data-catfx] .cat-nav a, html[data-catfx] .cat-nav a::before, html[data-catfx] .cat-nav a::after { animation: none !important; transition: none !important; }
}

/* The switcher itself: floats above the theme toggle (bottom-left). Prev / name / next. */
.catfx-sw { position: fixed; left: 10px; bottom: calc(48px + var(--safe-b, 0px)); z-index: 151; display: inline-flex; align-items: center; gap: 2px; height: 34px; padding: 0 4px; border-radius: 999px; border: 1px solid var(--card-border); background: var(--ink); color: var(--paper); box-shadow: 0 4px 14px rgba(0,0,0,.22); font: 700 .62rem var(--font-display, sans-serif); letter-spacing: .06em; text-transform: uppercase; }
.catfx-sw button { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; height: 28px; border-radius: 999px; }
.catfx-sw .cfs-arr { width: 28px; font-size: .9rem; color: var(--gold); }
.catfx-sw .cfs-name { padding: 0 8px; min-width: 150px; white-space: nowrap; }
.catfx-sw button:hover { background: var(--surface-2); }
body.reviewing .catfx-sw { display: none; }

/* Switcher = small edge tab like the homepage category tab (Matt 2026-11-02): flush left, gold, just the number.
   Tap = next, shift-click = back; arrows hidden. */
.catfx-sw { left: 0; top: calc(env(safe-area-inset-top, 0px) + 128px); bottom: auto; height: 22px; padding: 0; gap: 0; border: 0; border-radius: 0 999px 999px 0; background: var(--cta-gold, #dec99f); box-shadow: none; opacity: .6; }
.catfx-sw:hover, .catfx-sw:focus-within { opacity: .9; }
.catfx-sw .cfs-arr { display: none; }
.catfx-sw .cfs-name { height: 22px; min-width: 20px; padding: 0 7px 0 5px; color: var(--cta-gold-fg, #1a1204); font: 700 .6rem/1 var(--font-display, Inter), system-ui, sans-serif; letter-spacing: .06em; }
.catfx-sw button:hover { background: none; }
