/* Homepage puzzles, placement D: a box under the configurator, energized by a charge from the logo,
   with one tab per puzzle. Site tokens only. */
.pzh-frame { display: block; width: 100%; height: 640px; border: 0; background: transparent; color-scheme: dark; transition: height .25s ease; }

/* Solved: the footer's Join us earns the moment */
.pzh-earned-btn { box-shadow: 0 0 0 1px #33ff6640, 0 0 30px #33ff66a6, 0 0 60px #33ff664d !important; }

/* No double-tap zoom over the box: quick repeated taps inside a puzzle must all reach it. */
.pzh-charge, .pzh-frame { touch-action: manipulation; }
.pzh-charge { position: relative; z-index: 1; display: grid; grid-template-rows: 0fr; transition: grid-template-rows .7s cubic-bezier(.2, .8, .2, 1); }
.pzh-charge.on { grid-template-rows: 1fr; }
.pzh-cclip { min-height: 0; overflow: hidden; }
.pzh-cbox { scroll-margin-top: 96px; margin-top: 18px; background: #040605; border: 1px solid var(--phosphor-500); box-shadow: 0 0 0 1px #33ff6610, 0 0 40px #33ff6614; position: relative; }
.pzh-cbar { width: 100%; display: flex; align-items: center; gap: 16px; padding: 0 20px; min-height: 52px; background: none; border: 0; color: var(--fg-2); cursor: pointer; text-align: left; font: 10px var(--font-mono); letter-spacing: .2em; text-transform: uppercase; }
.pzh-cbar:hover { background: #33ff6608; }
.pzh-cbar:focus-visible { outline: 1px solid var(--phosphor-100); outline-offset: -4px; }
.pzh-cdot { position: relative; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--phosphor-300); box-shadow: 0 0 6px var(--phosphor-300); }
.pzh-clabel { color: var(--fg-1); white-space: nowrap; }
.pzh-cteaser { flex: 1; min-width: 0; font: 400 19px/1.2 var(--font-display); letter-spacing: 0; text-transform: none; color: var(--phosphor-100); }
.pzh-cteaser em { color: var(--phosphor-200); }
.pzh-cact { color: var(--phosphor-300); white-space: nowrap; border: 1px solid var(--phosphor-500); padding: 8px 12px; }
.pzh-cbar:hover .pzh-cact { border-color: var(--phosphor-300); color: var(--phosphor-100); }
.pzh-cbox.open .pzh-cbar { border-bottom: 1px solid var(--rule-2); }
.pzh-cpanel { padding: 18px 20px 4px; }
/* Pulse until opened: border breathes, the dot sends rings out */
.pzh-cbox.pulse { animation: pzh-breathe 2.4s ease-in-out infinite; }
.pzh-cbox.pulse .pzh-cdot::after { content: ''; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid var(--phosphor-300); animation: pzh-ring 2.4s ease-out infinite; }
.pzh-cbox.arrive { animation: pzh-arrive .9s ease-out, pzh-breathe 2.4s ease-in-out .9s infinite; }
@keyframes pzh-breathe { 0%, 100% { border-color: var(--phosphor-500); box-shadow: 0 0 0 1px #33ff6610, 0 0 30px #33ff6614; } 50% { border-color: var(--phosphor-300); box-shadow: 0 0 0 1px #33ff6655, 0 0 34px #33ff6659, 0 0 70px #33ff6626; } }
@keyframes pzh-ring { 0% { transform: scale(1); opacity: .9; } 70%, 100% { transform: scale(3.4); opacity: 0; } }
@keyframes pzh-arrive { 0% { border-color: var(--phosphor-100); box-shadow: 0 0 0 1px #d8ffe2, 0 0 60px #33ff66b3, 0 0 120px #33ff6659; } 100% { border-color: var(--phosphor-500); box-shadow: 0 0 0 1px #33ff6610, 0 0 30px #33ff6614; } }
/* The wire overlay */
.pzh-wire { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 60; pointer-events: none; overflow: visible; }
.pzh-wire path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.pzh-wire .after { stroke: var(--phosphor-500); stroke-width: 1; opacity: .7; }
.pzh-wire .trail { stroke: var(--phosphor-300); stroke-width: 2; filter: drop-shadow(0 0 4px #33ff66) drop-shadow(0 0 10px #33ff6699); }
.pzh-wire .head { fill: var(--phosphor-100); filter: drop-shadow(0 0 4px #d8ffe2) drop-shadow(0 0 10px #33ff66); }
.pzh-wire .halo { fill: #33ff6633; }
.pzh-wire.fade { transition: opacity 1.1s ease; opacity: 0; }
.pzh-wm-flash { animation: pzh-wm 1.7s ease-out; }
@keyframes pzh-wm { 0% { filter: drop-shadow(0 0 6px #33ff6666); } 12% { filter: brightness(1.5) drop-shadow(0 0 14px #33ff66) drop-shadow(0 0 30px #33ff6699); } 100% { filter: drop-shadow(0 0 6px #33ff6666); } }
@media (max-width: 760px) {
  .pzh-cbar { flex-wrap: wrap; gap: 6px 12px; padding: 12px 14px; }
  .pzh-cteaser { order: 3; flex-basis: 100%; font-size: 18px; }
  .pzh-cact { margin-left: auto; padding: 6px 10px; }
  .pzh-cpanel { padding: 12px 12px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pzh-charge { transition: none; }
  .pzh-cbox.pulse, .pzh-cbox.arrive { animation: none; border-color: var(--phosphor-300); box-shadow: 0 0 0 1px #33ff6655, 0 0 34px #33ff6659; }
  .pzh-cbox.pulse .pzh-cdot::after { animation: none; display: none; }
}

.pzh-charge.instant { transition: none; }

/* Open: one header row with the puzzle tabs and Close; the dot lights once a puzzle is solved. */
.pzh-ohead { display: flex; align-items: stretch; min-height: 52px; border-bottom: 1px solid var(--rule-2); }
.pzh-ohead[hidden] { display: none; }
.pzh-ohead > .pzh-cdot { align-self: center; margin: 0 6px 0 20px; }
.pzh-oname { align-self: center; padding: 0 12px; font: 10px var(--font-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--fg-1); }
.pzh-tabs { display: flex; min-width: 0; margin-left: 8px; }
.pzh-tabs [role=tab] { position: relative; display: flex; align-items: center; gap: 9px; padding: 0 18px; background: none; border: 0; border-left: 1px solid var(--rule-2); color: var(--fg-3); font: 10px var(--font-mono); letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; cursor: pointer; }
.pzh-tabs [role=tab]:last-child { border-right: 1px solid var(--rule-2); }
.pzh-tabs [role=tab]:hover { color: var(--fg-1); background: #33ff6606; }
.pzh-tabs [role=tab]:focus-visible { outline: 1px solid var(--phosphor-300); outline-offset: -5px; }
.pzh-tabs [aria-selected="true"] { color: var(--phosphor-100); background: #33ff660a; }
.pzh-tabs [aria-selected="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--phosphor-300); box-shadow: 0 0 8px var(--phosphor-300); }
.pzh-tdot { width: 7px; height: 7px; flex: none; border-radius: 50%; border: 1px solid var(--fg-4); }
.pzh-tabs .solved .pzh-tdot { background: var(--phosphor-300); border-color: var(--phosphor-300); box-shadow: 0 0 6px var(--phosphor-300); }
.pzh-close { align-self: center; margin: 0 20px 0 auto; padding: 8px 12px; background: none; border: 1px solid var(--phosphor-500); color: var(--phosphor-300); font: 10px var(--font-mono); letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; cursor: pointer; }
.pzh-close:hover { border-color: var(--phosphor-300); color: var(--phosphor-100); }
.pzh-close:focus-visible { outline: 1px solid var(--phosphor-100); outline-offset: 3px; }
@media (max-width: 760px) {
  .pzh-ohead > .pzh-cdot { display: none; }
  .pzh-tabs { flex: 1; margin: 0; }
  .pzh-tabs [role=tab] { flex: 1 1 0; justify-content: center; gap: 6px; padding: 0 6px; min-height: 48px; letter-spacing: .06em; }
  .pzh-tabs [role=tab]:first-child { border-left: 0; }
  .pzh-close { margin: 0 4px; width: 44px; height: 44px; padding: 0; }
  .pzh-close-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
@media (max-width: 380px) {
  .pzh-tabs [role=tab] { min-width: 0; gap: 4px; padding: 0 3px; font-size: 9px; letter-spacing: .02em; }
  .pzh-tdot { width: 5px; height: 5px; }
  .pzh-close { width: 40px; margin: 0 2px; }
}
@media (prefers-reduced-motion: reduce) { .pzh-frame { transition: none; } }
/* Below the configurator's open dropdown (its body is z-index 2); out of the way while the window is maximized or shut down. */
.aran-hero--full .pzh-charge { visibility: hidden; }
.configurator-closed .pzh-charge { display: none; }

/* Probe for the small viewport height (home.js posts it to each puzzle frame). */
.pzh-svh { position: fixed; top: 0; left: 0; width: 0; height: 100vh; height: 100svh; visibility: hidden; pointer-events: none; }
/* Short landscape phone: while the box is open, the site header scrolls away instead of sticking over the board. */
@media (orientation: landscape) and (max-height: 500px) {
  body:has(.pzh-cbox.open) .aran-header { position: relative; }
}
