/*
Theme Name: The Gulag Lounge
Author: The Gulag Lounge
Description: Cinematic gaming-network theme for The Gulag Lounge, gateway to the Aether ecosystem. Styles and scripts are built from /src with Vite (see the repository README).
Version: 0.1.0
Requires at least: 6.5
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: tgl
*/

/* Official supplied brand assets; the existing layout and compiled design stay intact. */
:root {
  --accent: #2be4ff;
  --accent-core: #e2fcff;
}
.site-header .brand { flex-shrink: 0; }
.brand .brand__lockup { width: 190px; height: auto; max-width: 100%; object-fit: contain; }
.site-footer .brand .brand__lockup { width: 240px; }
.aether-brand__logo { width: min(280px, 100%); height: auto; margin-bottom: var(--space-5); }
#aether { --accent: #a3b8ff; --accent-core: #e3eaff; --glow: 0 0 24px rgb(163 184 255 / 0.35); }
.hero__poster img { filter: none; }

/* Photographic lighting plate behind the live, opaque WebGL cube.
   This is a ray-traced-style image, not a browser path tracer. */
.hero__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("assets/images/hero-backdrop.png") center 30% / cover no-repeat;
  pointer-events: none;
}
.hero__backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgb(5 7 12 / 0.38), transparent 65%),
    radial-gradient(85% 70% at 50% 42%, transparent 30%, rgb(7 7 12 / 0.38) 74%, rgb(5 5 9 / 0.72) 100%);
}
.hero__poster { z-index: 1; background: transparent; }
.hero__canvas { z-index: 1; mix-blend-mode: normal; }
.hero__vignette { z-index: 2; }

@media (max-width: 640px) {
  .site-header .brand .brand__lockup { width: 174px; }
}

/* Official rendered 3D loop: a lounge stage, overhead light and a solid focal cube. */
:root { --nav-h: 96px; }
.site-header { height: var(--nav-h); }
.brand-group { position: relative; flex-shrink: 0; }
.brand--animated { gap: 10px; }
.brand .brand__wordmark { width: 156px; height: auto; }
.brand__loop { position: relative; display: block; width: 64px; height: 64px; flex: 0 0 64px; overflow: hidden; border-radius: 12px; }
.brand .brand__loop img, .brand__loop video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.brand__loop video { opacity: 0; }
.brand__loop.is-loop-ready video { opacity: 1; }
.brand-motion-toggle { position: absolute; left: 48px; bottom: 0; width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 4px; color: var(--fg-muted); background: #0b0d16; cursor: pointer; font-size: 9px; padding: 0; }
.brand-motion-toggle[hidden] { display: none; }
.nav-menu { gap: clamp(.8rem, 1.4vw, 1.6rem); }
.hero--video { height: auto; }
.hero--video .hero__stage { position: relative; height: 100svh; min-height: 800px; max-height: 1100px; }
.hero--video .hero__backdrop { background-image: url("assets/images/lounge-background-v2.webp"); background-position: center; }
.hero--video .hero__backdrop::after { background: linear-gradient(90deg, rgb(5 7 12 / .72), rgb(5 7 12 / .22) 46%, rgb(5 7 12 / .08) 76%), linear-gradient(0deg, var(--ink), transparent 28%); }
.hero__spotlight { position: absolute; z-index: 1; left: 74%; top: 1%; width: 38%; height: 78%; translate: -50% 0; pointer-events: none; clip-path: polygon(48% 0, 52% 0, 100% 100%, 0 100%); background: linear-gradient(180deg, rgb(219 246 255 / .15), rgb(219 246 255 / .025) 70%, transparent); }
.hero__visual { position: absolute; z-index: 2; right: -5%; top: 9%; width: 62%; height: 86%; pointer-events: none; mask-image: linear-gradient(90deg, transparent, #000 17%, #000 83%, transparent); }
.hero__video-poster, .hero__cube-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__cube-video { opacity: 0; }
.hero__visual.is-loop-ready .hero__cube-video { opacity: 1; }
.hero--video .hero__vignette { z-index: 3; background: linear-gradient(0deg, var(--ink), transparent 24%), linear-gradient(90deg, rgb(7 7 12 / .12), transparent 60%); }
.hero--video .hero__grain { display: none; }
.hero--video .hero__content { z-index: 4; justify-content: center; padding: 100px 0 80px; }
.hero--video .hero__title { max-width: 10ch; width: min(520px, 46vw); font-size: clamp(3.5rem, 6.4vw, 6.7rem); }
.hero--video .hero__intro > .lede { max-width: min(38ch, 42vw); font-size: clamp(1.05rem, 1.5vw, 1.3rem); }
.hero--video .hero__hud { z-index: 4; font-size: .65rem; opacity: .7; }
.hero--video .hero__controls { z-index: 5; }
.hero--video .hero__scroll { z-index: 5; }
@media (max-width: 960px) {
  .nav-menu { gap: 0; }
  .hero--video .hero__stage { height: auto; min-height: 100svh; max-height: none; padding: 410px 0 100px; }
  .hero__visual { right: auto; left: -10%; top: 68px; width: 120%; height: 360px; }
  .hero__spotlight { left: 50%; top: 2%; height: 420px; width: 75%; }
  .hero--video .hero__backdrop { background-position: 74% center; }
  .hero--video .hero__content { position: relative; inset: auto; padding: 0; }
  .hero--video .hero__title { width: 100%; max-width: 11ch; font-size: clamp(3rem, 8.5vw, 4.7rem); }
  .hero--video .hero__intro > .lede { max-width: 38ch; font-size: 1.1rem; }
  .hero--video .hero__hud { display: none; }
}
@media (max-width: 640px) {
  :root { --nav-h: 88px; }
  .brand .brand__wordmark { width: 140px; }
  .brand__loop { width: 52px; height: 52px; flex-basis: 52px; }
  .brand-motion-toggle { left: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .brand__loop video, .hero__cube-video { display: none; }
}

/* The old scroll-outro belongs to the retired WebGL camera sequence. */
.hero--video .hero__outro { display: none; }
.hero--video .hero__visual {
  mask-image: linear-gradient(90deg, transparent, #000 17%, #000 83%, transparent), linear-gradient(180deg, transparent, #000 12%, #000 80%, transparent);
  mask-composite: intersect;
}
.hero--video .hero__spotlight { z-index: 3; top: 4%; width: 30%; height: 68%; opacity: .6; }
@media (max-width: 960px) {
  .hero--video .hero__backdrop::after { background: linear-gradient(180deg, rgb(7 7 12 / .15), rgb(7 7 12 / .35) 35%, rgb(7 7 12 / .87) 56%, var(--ink) 86%); }
  .hero--video .hero__spotlight { width: 70%; top: 2%; height: 380px; }
}

/* Keep the ceiling shaft restrained; the lounge image supplies its natural falloff. */
.hero--video .hero__spotlight { opacity: .32; }

/* Gaming lounge refinement: photographic fixture/beam, smaller uncropped focal cube.
   The supplied SVG has true transparency and includes its outlined slogan. */
.site-header .brand .brand__lockup { width: 230px; height: auto; }
.hero--video .hero__backdrop {
  background-image: url("assets/images/gaming-lounge-v6-4k.webp");
  background-position: calc(71.4% + 2.6vw) top;
}
.hero--video .hero__backdrop::after {
  background: linear-gradient(90deg, rgb(5 7 12 / .77), rgb(5 7 12 / .32) 43%, rgb(5 7 12 / .04) 68%), linear-gradient(0deg, var(--ink), transparent 24%);
}
/* The background contains the real fixture, soft light cone and floor reflection.
   Remove the synthetic hard-edged triangle instead of doubling the light source. */
.hero--video .hero__spotlight { display: none; }
.hero--video .hero__visual {
  left: 74%; right: auto; top: 18%; width: 42%; height: 48%;
  translate: -50% 0;
  mask-image: linear-gradient(90deg, transparent, #000 24%, #000 76%, transparent), linear-gradient(180deg, transparent, #000 20%, #000 76%, transparent);
}
@media (max-width: 960px) {
  .hero--video .hero__stage { padding-top: 365px; }
  .hero--video .hero__backdrop {
    background-size: auto 600px;
    background-position: calc(50% - 228px) top;
    background-color: var(--ink);
  }
  .hero--video .hero__backdrop::after {
    background: linear-gradient(180deg, transparent, rgb(7 7 12 / .15) 22%, rgb(7 7 12 / .87) 42%, var(--ink) 58%);
  }
  .hero--video .hero__visual { left: 50%; top: 135px; width: 90%; height: 210px; }
}
@media (max-width: 640px) {
  .site-header .brand .brand__lockup { width: 208px; }
}

/* The physical plinth and its contact shadow are part of the room photograph. */
/* Keep the original floor reflection from continuing underneath the new base. */
.hero--video .hero__video-poster, .hero--video .hero__cube-video {
  mask-image: linear-gradient(180deg, #000 79%, transparent 88%);
}

/* Scroll-driven CSS 3D layers. Static/editor fallback stays unchanged. */
.hero--video { --hero-progress: 0; --hero-x: 0; --hero-y: 0; }
.hero--video.has-scroll-depth .hero__stage { perspective: 1400px; perspective-origin: 74% 45%; }
.hero--video.has-scroll-depth .hero__backdrop {
  transform-origin: 74% 45%;
  transform: none; /* Room remains still at the owner request. */
}
.hero--video.has-scroll-depth .hero__visual {
  transform-origin: 50% 50%;
  transform: translate3d(calc(var(--hero-x) * 5px), calc(var(--hero-progress) * -8px), 0px) rotateX(calc(var(--hero-y) * -1deg)) rotateY(calc(var(--hero-x) * 1deg));
}
.hero--video.has-scroll-depth .hero__intro {
  transform: translate3d(0, calc(var(--hero-progress) * -65px), 0);
  opacity: calc(1 - var(--hero-progress) * .65);
}
.hero--video.has-scroll-depth .hero__intro:focus-within { transform: none; opacity: 1; }
.hero--video.has-scroll-depth .hero__scroll { opacity: max(0, calc(1 - var(--hero-progress) * 4)); }
@media (min-width: 961px) and (prefers-reduced-motion: no-preference) {
  .hero--video { height: 185svh; }
  .hero--video .hero__stage { position: sticky; top: 0; height: 100svh; min-height: 0; max-height: none; }
}
@media (max-width: 960px) {
  .hero--video.has-scroll-depth .hero__stage { perspective-origin: 50% 240px; }
  .hero--video.has-scroll-depth .hero__visual { transform: translate3d(0, calc(var(--hero-progress) * -5px), 0px); }
  .hero--video.has-scroll-depth .hero__backdrop { transform: none; }
  .hero--video.has-scroll-depth .hero__intro { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero--video.has-scroll-depth { height: auto; }
  .hero--video.has-scroll-depth .hero__stage { perspective: none; }
  .hero--video.has-scroll-depth .hero__visual,
  .hero--video.has-scroll-depth .hero__backdrop,
  .hero--video.has-scroll-depth .hero__intro { transform: none; opacity: 1; }
}

/* Keep photographic floor coordinates and cube framing in the same space.
   Fitting to height preserves the complete room on wide displays. */
.hero--video .hero__stage { container-type: size; }
.hero--video .hero__backdrop {
  background-image: url("assets/images/gaming-lounge-v8.webp");
  background-size: auto 100%;
  background-position: 71.4% top;
  background-color: var(--ink);
}
.hero--video .hero__visual {
  left: 71.4%; top: 20cqh; width: 66cqh; height: 48cqh;
}
.hero--video.has-scroll-depth .hero__visual {
  /* Only rotation remains: the floor-mounted plinth never follows the cube. */
  transform: rotateX(calc(var(--hero-y) * -.4deg)) rotateY(calc(var(--hero-x) * .4deg));
}
@media (max-width: 960px) {
  .hero--video .hero__stage { container-type: normal; }
  .hero--video .hero__backdrop { background-size: auto 600px; background-position: calc(50% - 228px) top; }
  .hero--video .hero__visual { left: 50%; top: 138px; width: 396px; height: 270px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero--video.has-scroll-depth .hero__visual { transform: none; }
}
/* On ultrawide screens the 16:9 room photo is stretched horizontally so the
   background still spans the full viewport width instead of feathering out. */
@media (min-aspect-ratio: 2/1) and (min-width: 961px) {
  .hero--video .hero__backdrop {
    background-size: cover;
    background-position: 71.4% top;
  }
}
.hero--video .hero__video-poster, .hero--video .hero__cube-video {
  mask-image: linear-gradient(180deg, #000 73%, transparent 80%);
}

/* Feather the baked video atmosphere around a solid cube core, rather than
   exposing the rectangular frame. Shared by the live loop and static poster. */
.hero--video .hero__visual {
  -webkit-mask-image: radial-gradient(ellipse 48% 48% at 50% 47%, #000 64%, rgb(0 0 0 / .92) 72%, transparent 100%);
  mask-image: radial-gradient(ellipse 48% 48% at 50% 47%, #000 64%, rgb(0 0 0 / .92) 72%, transparent 100%);
  mask-composite: add;
}
.hero--video .hero__video-poster, .hero--video .hero__cube-video {
  -webkit-mask-image: linear-gradient(180deg, #000 76%, transparent 79%);
  mask-image: linear-gradient(180deg, #000 76%, transparent 79%);
}

/* Broad, feathered cyan shaft from the existing ceiling fixture. Static CSS
   compositing only: no blur filter, additional image, or animation loop. */
.hero--video .hero__spotlight {
  display: block; z-index: 1; left: 71.4%; top: 6cqh;
  width: 120cqh; height: 65cqh; opacity: 1;
  translate: -50% 0; clip-path: none;
  background: conic-gradient(from 135deg at 50% 0%,
    transparent 0deg, rgb(43 228 255 / .025) 10deg,
    rgb(43 228 255 / .24) 30deg, rgb(130 235 255 / .28) 45deg,
    rgb(43 228 255 / .24) 60deg, rgb(43 228 255 / .025) 80deg,
    transparent 90deg 360deg);
  -webkit-mask-image: linear-gradient(#000, rgb(0 0 0 / .8) 35%, transparent);
  mask-image: linear-gradient(#000, rgb(0 0 0 / .8) 35%, transparent);
}
@media (max-width: 960px) {
  .hero--video .hero__spotlight { left: 50%; top: 36px; width: 680px; height: 340px; }
}

/* Supplied VP9 alpha carries the true cube silhouette; remove the opaque-video
   feathering. Retain a short floor-reflection fade for the photographed plinth. */
.hero--alpha .hero__visual {
  -webkit-mask-image: none;
  mask-image: none;
}
.hero--alpha .hero__video-poster, .hero--alpha .hero__cube-video {
  -webkit-mask-image: linear-gradient(180deg, #000 76%, transparent 79%);
  mask-image: linear-gradient(180deg, #000 76%, transparent 79%);
}
/* The poster and playing alpha video must never stack their translucent edges. */
.hero--alpha .hero__visual.is-loop-ready .hero__video-poster { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .hero--alpha .hero__visual.is-loop-ready .hero__video-poster { opacity: 1; }
}

/* Retain only the supplied glow close to the cube; the room supplies the beam. */
.hero--alpha .hero__visual {
  -webkit-mask-image: radial-gradient(ellipse 48% 48% at 50% 47%, #000 68%, rgb(0 0 0 / .9) 78%, transparent 100%);
  mask-image: radial-gradient(ellipse 48% 48% at 50% 47%, #000 68%, rgb(0 0 0 / .9) 78%, transparent 100%);
}
/* Follow the photographed floor and ceiling coordinates when cover crops an
   ultrawide room. The cyan source and plinth stay on the same vertical axis. */
@media (min-aspect-ratio: 2/1) and (min-width: 961px) {
  .hero--alpha .hero__visual { top: calc(33.54cqw - 39cqh); }
  .hero--alpha .hero__spotlight { top: 3.45cqw; height: 31cqw; }
}
/* Community expansion: scoped editorial pages using the existing TGL tokens. */
.tgl-content-page { --community-muted: #a9b2c2; }
.tgl-content-page .tgl-community-hero { padding-block: calc(var(--nav-h) + 5rem) 3.5rem; background: radial-gradient(ellipse at 90% 0, rgb(25 227 255 / .07), transparent 56%), var(--ink-2); border-bottom: 1px solid var(--line); }
.tgl-content-page .tgl-community-hero h1 { max-width: 19ch; font-size: clamp(2.8rem, 5vw, 5.2rem); line-height: 1.04; letter-spacing: -.055em; text-wrap: balance; }
.tgl-content-page .tgl-community-hero .lede { max-width: 66ch; color: var(--community-muted); }
.tgl-community-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; margin-top: 2.5rem; }
.tgl-community-nav a { padding-block: .65rem; color: var(--fg-muted); text-decoration: none; border-bottom: 2px solid transparent; font-size: .9rem; }
.tgl-community-nav a[aria-current], .tgl-community-nav a:hover { color: var(--accent); border-color: var(--accent); }
.tgl-help-route { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .6rem; margin: 1.5rem 0 0; padding: .7rem 1rem; color: var(--fg-muted); font-size: .92rem; background: rgb(25 227 255 / .05); border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: 8px; }
.tgl-help-route a { color: var(--accent); font-weight: 600; text-underline-offset: .2em; }
.tgl-community-body.entry-content { max-width: var(--container); padding-block: 4.5rem 5rem; color: var(--community-muted); }
.tgl-community-body > * + * { margin-top: 3.5rem; }
.tgl-community-body h2 { margin: 0 0 1.25rem; font-size: var(--step-3); line-height: 1.12; letter-spacing: -.035em; text-wrap: balance; }
.tgl-community-body h3 { margin: 0 0 .8rem; font-size: var(--step-1); line-height: 1.2; color: var(--fg); }
.tgl-community-body p + p { margin-top: 1rem; }
.tgl-community-body .wp-block-columns { margin-block: 0; gap: clamp(2rem, 5vw, 5rem); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tgl-community-body .wp-block-column { min-width: 0; padding: 0; background: transparent; border: 0; }
.tgl-community-body .wp-block-column > * + * { margin-top: 1rem; }
.tgl-community-body .wp-block-column > h2:first-child { margin-top: 0; }
.is-style-tgl-community-card { padding: 1.8rem; background: var(--surface, #11101a); border: 1px solid var(--line, #272733); border-radius: var(--radius, 4px); }
.is-style-tgl-community-card > * + * { margin-top: .85rem; }
.is-style-tgl-community-card h3 { color: var(--fg, #e4e7ee); }
.is-style-tgl-community-callout { padding: clamp(1.5rem, 4vw, 3rem); background: var(--surface-2, #171623); border-left: 2px solid var(--accent, #19e3ff); }
.is-style-tgl-community-callout > * + * { margin-top: 1.2rem; }
.tgl-activity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.75rem; }
.tgl-activity-grid > * { margin: 0; }
.tgl-content-page .tgl-card-kicker { font: 600 .75rem var(--font-hud); color: var(--accent); letter-spacing: .14em; text-transform: uppercase; }
.tgl-three-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.tgl-three-cards > * { margin: 0; }
.tgl-community-cta { border-top: 1px solid var(--line); padding-top: 3rem; }
.tgl-community-cta .btn { margin-top: 1.5rem; }
.tgl-support-panel { padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--line); border-top: 2px solid var(--accent); background: var(--surface); border-radius: var(--radius); }
.tgl-setup-note { padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.tgl-setup-note strong { color: var(--fg); }
.tgl-setup-note p { margin-top: .6rem; font-size: .95rem; }
.tgl-status-dot { display: inline-block; width: 7px; height: 7px; margin-right: .7rem; border-radius: 50%; background: var(--warn); vertical-align: middle; }
.tgl-support-form { margin-top: 1.5rem; }
.tgl-support-form fieldset { min-width: 0; padding: 0; border: 0; }
.tgl-support-form legend { width: 100%; margin-bottom: 1rem; font-weight: 600; color: var(--fg); }
.tgl-support-form legend span { float: right; color: var(--fg-muted); font: .75rem var(--font-hud); letter-spacing: .14em; }
.tgl-amount-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; }
.tgl-amount-options label { position: relative; cursor: pointer; }
.tgl-amount-options input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.tgl-amount-options span { display: grid; place-content: center; min-height: 50px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--fg); background: var(--ink-2); font-size: .95rem; }
.tgl-amount-options input:checked + span { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 700; }
.tgl-amount-options input:focus-visible + span { outline: 2px solid var(--accent-core); outline-offset: 3px; }
.tgl-form-field { margin-top: 1.3rem; }
.tgl-form-field label, .tgl-resource-controls > label { display: block; margin-bottom: .6rem; color: var(--fg); font-weight: 500; }
.tgl-form-field label span { color: var(--fg-muted); font-weight: 400; }
.tgl-form-field input, .tgl-form-field textarea, .tgl-resource-controls > input { width: 100%; min-height: 48px; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-2); color: var(--fg); font: inherit; }
.tgl-form-field textarea { resize: vertical; }
.tgl-form-field input[aria-invalid=true] { border-color: var(--danger); }
.tgl-field-help { margin-top: .5rem; font-size: .8rem; color: var(--community-muted); }
.tgl-support-total { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; margin-block: 1.75rem 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.tgl-support-total strong { color: var(--fg); }
.tgl-support-form .btn { width: 100%; justify-content: center; font-size: .8rem; letter-spacing: .08em; }
.tgl-support-form .btn:disabled { opacity: .55; cursor: wait; }
.tgl-text-button { display: block; margin: .9rem auto 0; padding: .5rem; background: transparent; border: 0; color: var(--fg-muted); font: inherit; font-size: .85rem; text-decoration: underline; cursor: pointer; }
.tgl-form-feedback { min-height: 4em; margin-top: 1rem; font-size: .85rem; color: var(--community-muted); }
.tgl-form-feedback.is-error { color: var(--warn); }
.tgl-resource-controls > input { max-width: 600px; }
.tgl-category-filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.tgl-category-filters button { min-height: 44px; padding: .65rem .95rem; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: var(--radius); font: inherit; font-size: .85rem; cursor: pointer; }
.tgl-category-filters button[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tgl-category-filters button:hover { border-color: var(--accent); }
.tgl-resource-summary { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 2rem; margin-block: 1.7rem; color: var(--community-muted); font-size: .9rem; }
.tgl-resource-summary [data-resource-count] { color: var(--fg); white-space: nowrap; }
.tgl-resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.tgl-resource-card { min-width: 0; display: flex; flex-direction: column; padding: 1.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.tgl-resource-card:hover, .tgl-resource-card:focus-within { border-color: var(--steel); }
.tgl-resource-card .tgl-resource-category { margin: 0 0 1rem; font: 600 .7rem var(--font-hud); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.tgl-resource-card h2 { margin: 0 0 .8rem; font-size: 1.3rem; }
.tgl-resource-card h2 a { color: var(--fg); text-decoration: none; }
.tgl-resource-card h2 a > span[aria-hidden] { margin-left: .5rem; color: var(--accent); }
.tgl-resource-card > p:not(.tgl-resource-category):not(.tgl-resource-domain) { font-size: .95rem; }
.tgl-resource-card .tgl-resource-domain { margin-top: auto; padding-top: 1.5rem; font: .75rem var(--font-hud); overflow-wrap: anywhere; color: var(--fg-muted); }
.tgl-resource-empty { padding: 3rem 1.5rem; text-align: center; border: 1px dashed var(--line); }
.tgl-resource-empty .btn { margin-top: 1rem; }
.tgl-directory-note { margin-top: 2rem; color: var(--community-muted); font-size: .85rem; max-width: 85ch; }
.tgl-resources [hidden], .tgl-support-form [hidden] { display: none !important; }
.tgl-content-page :is(input,textarea,button,a):focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.nav-menu > li { position: relative; }
.nav-menu .sub-menu { display: none; position: absolute; z-index: 10; top: 100%; left: -.8rem; min-width: 200px; margin: 0; padding: .75rem; list-style: none; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 24px rgb(0 0 0 / .3); }
.nav-menu > li:hover > .sub-menu, .nav-menu > li:focus-within > .sub-menu { display: grid; gap: .25rem; }
.nav-menu .sub-menu a { display: block; padding: .65rem; color: var(--fg); font-size: .8rem; }
.nav-menu .sub-menu a:hover { color: var(--accent); }
body.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }
body.admin-bar #wpadminbar { position: fixed; }
body.page-template-page-community-expansion .site-footer__social svg { width: 22px; height: 22px; }
.tgl-activity-grid > .wp-block-group__inner-container,
.tgl-three-cards > .wp-block-group__inner-container { display: contents; }
.tgl-activity-grid > .wp-block-group__inner-container > *,
.tgl-three-cards > .wp-block-group__inner-container > * { margin: 0; }
.tgl-community-body a.btn--primary { color: var(--accent-ink); }
.tgl-support-form fieldset { margin: 0; }
.is-style-tgl-community-card, .is-style-tgl-community-callout { color: var(--community-muted, #a9b2c2); }
.is-style-tgl-community-card h2, .is-style-tgl-community-card h3,
.is-style-tgl-community-callout h2, .is-style-tgl-community-callout h3 { color: var(--fg, #e4e7ee); }
@media (max-width: 1100px) {
  .tgl-resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .primary-nav.is-open { overflow-y: auto; }
  body.admin-bar .primary-nav { top: calc(var(--nav-h) + var(--wp-admin--admin-bar--height, 46px)); }
  .nav-menu .sub-menu { display: grid; position: static; margin: .25rem 0 1rem; padding: 0 0 0 1rem; border: 0; border-left: 1px solid var(--line); box-shadow: none; background: transparent; }
  .nav-menu .sub-menu a { font-size: .95rem; }
}
@media (max-width: 760px) {
  .tgl-content-page .tgl-community-hero { padding-top: calc(var(--nav-h) + 3rem); }
  .tgl-community-body .wp-block-columns, .tgl-activity-grid, .tgl-three-cards { grid-template-columns: 1fr; }
  .tgl-community-body.entry-content { padding-block: 3rem; }
  .tgl-community-body > * + * { margin-top: 2.75rem; }
}
@media (max-width: 520px) {
  .tgl-resource-grid { grid-template-columns: 1fr; }
  .tgl-amount-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* Aether Portal: page-scoped, authentic assets and existing brand typography. */
.aether-portal { --portal-accent:#a3b8ff; --portal-ice:#e3eaff; --portal-purple:#b79cff; --portal-line:#2b3046; color:#e3eaff; background:#0b0d16; }
.aether-portal *, .aether-portal *::before, .aether-portal *::after { box-sizing:border-box; }
.aether-portal [id] { scroll-margin-top:120px; }
.aether-portal h1, .aether-portal h2, .aether-portal h3 { color:var(--portal-ice); }
.aether-portal h2 { font-size:clamp(2.1rem,3.5vw,3.7rem); letter-spacing:-.04em; line-height:1.12; margin:0 0 1.4rem; }
.aether-portal h3 { font-size:1.35rem; line-height:1.3; }
.aether-portal p { color:#bdc3d4; line-height:1.75; }
.aether-portal em { color:var(--portal-accent); font-style:normal; }
.aether-portal .btn--primary { background:var(--portal-accent); border-color:var(--portal-accent); color:#111526; }
.aether-portal a:focus-visible, .aether-portal button:focus-visible, .aether-portal summary:focus-visible { outline:3px solid var(--portal-purple); outline-offset:5px; }
.portal-hero { position:relative; isolation:isolate; min-height:760px; min-height:min(920px,95svh); display:grid; align-items:center; overflow:hidden; background:#080a12; }
.portal-hero__media { position:absolute; top:0; bottom:0; left:32%; right:max(0px,calc((100vw - 2000px)/2)); z-index:-2; }
.portal-hero__media img, .portal-hero__media video { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; object-position:center; }
.portal-hero__media video { opacity:0; }
.portal-hero__media.is-loop-ready video { opacity:1; }
.portal-hero::before { content:''; position:absolute; inset:0; z-index:-1; background:linear-gradient(90deg,#080a12 0%,#080a12f0 28%,#080a1277 54%,#080a1210 78%),linear-gradient(0deg,#0b0d16 0%,transparent 27%); }
.portal-hero__inner { max-width:1800px; padding-block:clamp(4rem,6vw,7rem); }
.portal-hero__copy { max-width:650px; }
.portal-lockup { width:230px; max-width:70%; height:auto; display:block; margin-bottom:2rem; }
.portal-kicker { font-size:.7rem; font-weight:650; letter-spacing:.17em; line-height:1.6!important; color:var(--portal-accent)!important; text-transform:uppercase; margin:0 0 1.3rem; }
.portal-hero h1 { font-size:clamp(2.8rem,4.6vw,5.7rem); letter-spacing:-.055em; line-height:1.04; margin:0 0 1.8rem; }
.portal-lede { max-width:51ch; font-size:clamp(1rem,1.25vw,1.18rem); }
.portal-actions { display:flex; flex-wrap:wrap; align-items:center; gap:1rem; margin-top:2rem; }
.portal-note { font-size:.8rem; margin-top:1.3rem; color:#b7bfd4!important; }
.portal-nav { border-block:1px solid var(--portal-line); background:#0f1220; }
.portal-nav>.container { display:flex; flex-wrap:wrap; gap:1rem 2.3rem; padding-block:1.3rem; }
.portal-nav a { text-decoration:none; font-size:.8rem; font-weight:600; color:#c7cfe4; padding-block:.25rem; }
.portal-nav a:hover { color:#fff; }
.portal-band { padding-block:clamp(4rem,7vw,7.5rem); }
.portal-band--deep { background:#0e111d; border-block:1px solid #20263a; }
.portal-section-head { display:flex; justify-content:space-between; gap:3rem; align-items:flex-end; margin-bottom:3.5rem; }
.portal-section-head>div { flex:1; }
.portal-section-head>p { max-width:40ch; flex:1; margin-bottom:1.6rem; }
.portal-features { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3rem; }
.portal-features article { border-top:1px solid var(--portal-line); padding-top:1.5rem; min-width:0; }
.portal-features h3 { margin:1.7rem 0 1rem; }
.portal-features p { margin-bottom:1.8rem; }
.portal-number { color:var(--portal-accent); font-size:.8rem; font-variant-numeric:tabular-nums; }
.portal-status { display:inline-block; color:#c0d0ff; border:1px solid #46557f; background:#a3b8ff08; padding:.5rem .7rem; font-size:.69rem; font-weight:600; letter-spacing:.025em; line-height:1.5; }
.portal-status--planned { color:#d1c0ff; border-color:#514266; }
.portal-gallery__stage { margin:0; border:1px solid var(--portal-line); background:#080a12; box-shadow:0 25px 70px #0003; }
.portal-gallery__stage>a { display:block; width:100%; aspect-ratio:2752/1104; overflow:hidden; }
.portal-gallery__stage img { width:100%; height:100%; object-fit:contain; display:block; }
.portal-gallery figcaption { display:flex; justify-content:space-between; align-items:baseline; gap:1.5rem; padding:1.6rem 1.8rem; border-top:1px solid var(--portal-line); }
.portal-gallery figcaption strong { color:var(--portal-ice); white-space:nowrap; font-size:.95rem; }
.portal-gallery figcaption span { max-width:65ch; color:#bac2d6; font-size:.8rem; line-height:1.6; }
.portal-gallery__choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin-top:1.2rem; gap:1rem; }
.portal-gallery__choices[hidden] { display:none; }
.portal-gallery__choices button { display:flex; align-items:center; gap:1rem; padding:1.3rem; color:#bdc5db; background:#101423; border:1px solid var(--portal-line); cursor:pointer; text-align:left; font-size:.85rem; line-height:1.4; }
.portal-gallery__choices button span { color:var(--portal-accent); font-size:.7rem; }
.portal-gallery__choices button[aria-pressed=true] { color:#f0f3ff; border-color:var(--portal-accent); background:#1a2038; }
.portal-lightbox { width:min(96vw,1900px); max-width:96vw; max-height:94svh; color:var(--portal-ice); background:#0e111d; border:1px solid #6170a1; padding:1.4rem; overflow:auto; }
.portal-lightbox::backdrop { background:#03050beF; }
.portal-lightbox__bar { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.portal-lightbox h3 { margin:0; font-size:1.1rem; }
.portal-lightbox button { color:var(--portal-ice); border:1px solid #7c8bb9; background:#1b233a; padding:.65rem 1rem; cursor:pointer; }
.portal-lightbox img { display:block; width:100%; height:auto; max-height:73svh; object-fit:contain; }
.portal-lightbox p { font-size:.85rem; margin-top:1rem; }
.portal-alpha { display:grid; grid-template-columns:1.15fr 1fr; gap:clamp(2rem,6vw,7rem); align-items:center; }
.portal-alpha__access { padding:2rem 0 2rem 2.5rem; border-left:1px solid var(--portal-line); }
.portal-alpha__access .btn { margin-top:1.3rem; cursor:not-allowed; background:#8e9fc9; color:#101423; opacity:.8; }
.portal-alpha__access .portal-text-link { display:inline-flex; margin-top:.7rem; }
.portal-text-link { color:var(--portal-accent); align-items:center; gap:.6rem; text-underline-offset:5px; }
.portal-text-link svg { width:16px; height:16px; }
.portal-ledger { margin:0; }
.portal-ledger>div { display:grid; grid-template-columns:1fr 1.1fr; gap:4rem; padding:2rem 0; border-top:1px solid var(--portal-line); }
.portal-ledger dt { display:flex; flex-direction:column; align-items:flex-start; gap:.9rem; font-size:1.4rem; font-weight:600; }
.portal-ledger dd { margin:0; color:#bac2d6; line-height:1.75; }
.portal-update-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:2rem; }
.portal-update-list article { border-top:1px solid var(--portal-line); padding-top:1.5rem; }
.portal-update-list time { color:var(--portal-accent); font-size:.8rem; }
.portal-update-list h3 { margin:1rem 0; }.portal-update-list a { color:var(--portal-ice); text-underline-offset:4px; }
.portal-empty { border-left:2px solid var(--portal-accent); padding:1.5rem 2rem; background:#121725; }.portal-empty p { max-width:70ch; }
.portal-feedback { display:grid; grid-template-columns:1.2fr 1fr; align-items:center; gap:4rem; }.portal-feedback p { max-width:55ch; }.portal-feedback .portal-actions { margin-top:0; }
.portal-info { display:grid; grid-template-columns:.8fr 1.2fr; gap:5rem; }.portal-info>div>p { max-width:35ch; }
.portal-faq details { border-top:1px solid var(--portal-line); }.portal-faq details:last-child { border-bottom:1px solid var(--portal-line); }
.portal-faq summary { padding:1.5rem .5rem 1.5rem 0; font-size:1rem; font-weight:600; cursor:pointer; color:var(--portal-ice); }
.portal-faq details>p { margin:0 0 1.5rem; }.portal-faq details>a { display:inline-flex; margin-bottom:1.5rem; }.portal-faq a { color:#c0ceff; text-underline-offset:4px; }
.portal-sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip-path:inset(50%)!important; white-space:nowrap!important; border:0!important; }
@media(min-width:2200px) { .portal-hero__copy { max-width:740px; }.portal-hero h1 { font-size:6rem; }.portal-hero { min-height:960px; }.portal-hero::before { background:linear-gradient(90deg,#080a12 0%,#080a12e0 25%,#080a1260 52%,#080a1210 78%),linear-gradient(0deg,#0b0d16 0%,transparent 27%); } }
@media(max-width:1000px) { .portal-section-head { align-items:flex-start; gap:2rem; }.portal-features { gap:1.5rem; }.portal-features h3 { font-size:1.15rem; }.portal-ledger>div { gap:2rem; }.portal-info { gap:2rem; grid-template-columns:.7fr 1.3fr; }.portal-feedback { gap:2rem; }.portal-gallery figcaption { flex-direction:column; gap:.6rem; } }
@media(max-width:700px) { .portal-hero { min-height:760px; min-height:max(760px,95svh); align-items:end; }.portal-hero__inner { max-width:1800px; padding-block:4rem 3rem; }.portal-hero__copy { max-width:100%; }.portal-hero__media { inset:0; }.portal-hero__media img,.portal-hero__media video { object-position:center top; }.portal-hero::before { background:linear-gradient(0deg,#080a12 0%,#080a12ef 45%,#080a1288 80%,#080a1260); }.portal-lockup { width:190px; margin-bottom:2rem; }.portal-hero h1 { font-size:clamp(2.6rem,9vw,3.6rem); }.portal-kicker { letter-spacing:.12em; font-size:.65rem; }.portal-nav>.container { gap:.7rem 1.2rem; }.portal-nav a { font-size:.75rem; }.portal-section-head { flex-direction:column; gap:0; margin-bottom:2rem; }.portal-section-head>p { max-width:100%; }.portal-features,.portal-alpha,.portal-feedback,.portal-info { grid-template-columns:1fr; gap:2rem; }.portal-features { gap:2.5rem; }.portal-features h3 { font-size:1.4rem; }.portal-alpha__access { border-left:0; border-top:1px solid var(--portal-line); padding:2rem 0 0; }.portal-gallery figcaption { padding:1.2rem; }.portal-gallery figcaption strong { white-space:normal; }.portal-gallery__choices { grid-template-columns:1fr; gap:.6rem; }.portal-gallery__choices button { padding:1rem; }.portal-gallery__stage>a { aspect-ratio:auto; height:190px; }.portal-ledger>div { grid-template-columns:1fr; gap:1.2rem; }.portal-update-list { grid-template-columns:1fr; }.portal-empty { padding:1.5rem; }.portal-lightbox { padding:1rem; }.portal-lightbox__bar { align-items:flex-start; }.portal-lightbox h3 { max-width:60%; font-size:.95rem; }.portal-actions { gap:.8rem; }.portal-feedback .portal-actions { margin-top:.5rem; } }
@media(prefers-reduced-motion:reduce) { .aether-portal { scroll-behavior:auto; }.aether-portal *, .aether-portal *::before, .aether-portal *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }

/* Existing editor content retains its copy without the legacy narrow/wide wrapper mismatch. */
.aether-portal .entry-content { max-width:var(--container); }
.aether-portal .entry-content > p { max-width:70ch; }
.aether-portal .entry-content > .wp-block-columns,.aether-portal .entry-content > .alignwide { width:100%; max-width:100%; }
/* Keep the ultrawide hero copy clear of the existing animated mark. */
.aether-portal .portal-hero__inner { width:min(calc(100% - 2 * var(--gutter)),1800px); }
@media(max-width:700px) { .aether-portal .portal-hero__media { top:80px; bottom:auto; height:240px; } }
/* Explicit portal motion controls and separate mobile artwork/content zones. */
.portal-animation-controls { margin-top:1.5rem; }
.portal-animation-control { min-height:44px; padding:.65rem 1rem; border:1px solid #a3b8ff; background:#121a2e; color:#e3eaff; cursor:pointer; font:inherit; font-size:.85rem; }
.portal-animation-control[hidden] { display:none; }
.portal-animation-control:disabled { color:#c1c9df; cursor:default; border-color:#63708e; }
.portal-animation-controls .portal-note { margin:.7rem 0 0; }
@media(min-width:901px) { .portal-animation-data { display:none; } }
@media(max-width:900px), (pointer:coarse) {
 .aether-portal .portal-hero { display:block; min-height:0; padding-top:96px; }
 .aether-portal .portal-hero__media { position:relative; inset:auto; width:100%; height:clamp(200px,35vw,320px); z-index:0; }
 .aether-portal .portal-hero__inner { position:relative; padding-top:1.5rem; padding-bottom:3rem; }
 .aether-portal .portal-hero__media img,.aether-portal .portal-hero__media video { object-position:center; }
 .aether-portal .portal-lockup { margin-bottom:1.5rem; }
}
@media(max-width:900px), (pointer:coarse) {
 .aether-portal .portal-hero > .portal-animation-controls { width:calc(100% - 2 * var(--gutter)); margin:1rem auto 0; }
}
.portal-animation-controls[data-bandwidth-gated="true"] .portal-animation-data { display:block; }

/* Launch privacy controls and readable storage inventory. */
.broadcast__consent { padding:1.5rem clamp(1.4rem,3vw,3rem); border-bottom:1px solid #283044; }
.broadcast__consent p { max-width:80ch; margin:0 0 1rem; }
.broadcast__consent label { display:flex; align-items:flex-start; gap:.75rem; line-height:1.6; color:#d5dff4; cursor:pointer; }
.broadcast__consent input { flex:none; width:1.25rem; height:1.25rem; margin-top:.2rem; accent-color:#19d8ef; }
.broadcast__consent :focus-visible, [data-cookie-preferences]:focus-visible, .wp-block-table:focus-visible { outline:2px solid #19d8ef; outline-offset:4px; }
body.page .entry-content .wp-block-table { overflow-x:auto; margin-inline:0; }
body.page .entry-content .wp-block-table table { min-width:760px; }
body.page .entry-content .wp-block-table th, body.page .entry-content .wp-block-table td { vertical-align:top; overflow-wrap:anywhere; }
