/*
 * Thoth.School guest visual experience — v14-style implementation.
 * Scope: guest users only after guestwow.js adds body.thothgw-enabled.
 * Stored Moodle Page activity content is not modified.
 */

:root {
  --thothgw-gold: #c9a84c;
  --thothgw-gold-light: #e8c96a;
  --thothgw-gold-dim: #8a6e2e;
  --thothgw-cyan: #00d4d4;
  --thothgw-cyan-dim: #007a7a;
  --thothgw-ink: #0a0e1a;
  --thothgw-ink-2: #0f1525;
  --thothgw-ink-3: #151d30;
  --thothgw-ink-4: #1c2640;
  --thothgw-surface: #1e2b42;
  --thothgw-text: #c8d4e8;
  --thothgw-text-dim: #7a8fa8;
  --thothgw-white: #f0f4ff;
}

@keyframes thothgwStarDrift {
  0% { background-position:0 0, 0 0, 0 0; }
  100% { background-position:260px 180px, -280px 210px, 160px -240px; }
}

@keyframes thothgwGridFlow {
  to { background-position:0 180px, 180px 0; }
}

@keyframes thothgwIntroOut {
  0%, 72% { opacity:1; visibility:visible; }
  100% { opacity:0; visibility:hidden; pointer-events:none; }
}

@keyframes thothgwLaserDraw {
  to { stroke-dashoffset:0; }
}

@keyframes thothgwLaserFade {
  to { opacity:0; }
}

@keyframes thothgwFloat {
  0%, 100% { transform:translateY(0); }
  50% { transform:translateY(-12px); }
}

@keyframes thothgwPulseGlow {
  0%, 100% { box-shadow:0 0 0 rgba(201,168,76,0); }
  50% { box-shadow:0 0 24px rgba(201,168,76,.42), 0 0 36px rgba(0,212,212,.14); }
}

@keyframes thothgwGlyphRise {
  0% { opacity:0; transform:translateY(40px) rotate(-8deg); }
  18% { opacity:1; }
  100% { opacity:0; transform:translateY(-110vh) rotate(18deg); }
}

@keyframes thothgwFadeUp {
  from { opacity:0; transform:translateY(24px); }
  to { opacity:1; transform:translateY(0); }
}

@keyframes thothgwPanelScan {
  0% { transform:translateX(-120%); opacity:0; }
  25% { opacity:.45; }
  60% { opacity:.25; }
  100% { transform:translateX(140%); opacity:0; }
}

body.userguest.thothgw-enabled {
  background:var(--thothgw-ink) !important;
  color:var(--thothgw-text) !important;
  font-family:Outfit, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x:hidden;
}

/* Preserve Moodle hidden states. */
body.userguest.thothgw-enabled .hidden,
body.userguest.thothgw-enabled .d-none,
body.userguest.thothgw-enabled [hidden],
body.userguest.thothgw-enabled [style*="display: none"],
body.userguest.thothgw-enabled [style*="display:none"] {
  display:none !important;
  visibility:hidden !important;
}

/* Hide old logo artwork for guest-only redesigned presentation. */
body.userguest.thothgw-enabled img[src*="Thoth-logo"],
body.userguest.thothgw-enabled img[src*="Thoth-logo-t"],
body.userguest.thothgw-enabled .logo img,
body.userguest.thothgw-enabled .navbar-brand img,
body.userguest.thothgw-enabled #header1 .logo img,
body.userguest.thothgw-enabled #header2 .logo img {
  opacity:0 !important;
  visibility:hidden !important;
  max-width:0 !important;
  max-height:0 !important;
}

/* v14-style replacement brand overlay. */
body.userguest.thothgw-enabled .thothgw-brand {
  position:fixed;
  top:14px;
  left:34px;
  z-index:10050;
  display:flex;
  align-items:center;
  gap:.75rem;
  text-decoration:none !important;
  pointer-events:auto;
}

body.userguest.thothgw-enabled .thothgw-brand-mark {
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,var(--thothgw-gold),var(--thothgw-gold-dim));
  clip-path:polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%);
  animation:thothgwPulseGlow 4s ease-in-out infinite;
}

body.userguest.thothgw-enabled .thothgw-brand-mark img {
  width:34px;
  height:34px;
  display:block;
}

body.userguest.thothgw-enabled .thothgw-brand-word {
  font-family:Georgia, "Times New Roman", serif;
  color:var(--thothgw-white);
  font-size:1.04rem;
  font-weight:700;
  letter-spacing:.08em;
  text-shadow:0 0 18px rgba(201,168,76,.25);
}

body.userguest.thothgw-enabled .thothgw-brand-word span {
  color:var(--thothgw-gold);
}

/* Ambient v14 background. */
body.userguest.thothgw-enabled .thothgw-vfx {
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  overflow:hidden;
  background:
    radial-gradient(ellipse 70% 60% at 60% 40%, rgba(0,212,212,.065) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(201,168,76,.085) 0%, transparent 50%),
    url("pix/hero-poster.svg"),
    linear-gradient(160deg,var(--thothgw-ink) 0%, var(--thothgw-ink-2) 42%, #0c1220 100%);
  background-size:auto, auto, cover, auto;
  background-position:center;
}

body.userguest.thothgw-enabled .thothgw-vfx::before {
  content:"";
  position:absolute;
  inset:0;
  opacity:.50;
  background:
    radial-gradient(circle at 8% 22%,rgba(255,255,255,.65) 0 1px,transparent 2px),
    radial-gradient(circle at 42% 18%,rgba(0,212,212,.72) 0 1px,transparent 2px),
    radial-gradient(circle at 83% 28%,rgba(201,168,76,.75) 0 1px,transparent 2px);
  background-size:180px 140px,260px 180px,320px 240px;
  animation:thothgwStarDrift 42s linear infinite;
}

body.userguest.thothgw-enabled .thothgw-vfx::after {
  content:"";
  position:absolute;
  inset:0;
  opacity:.22;
  background-image:
    linear-gradient(rgba(201,168,76,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,.045) 1px, transparent 1px);
  background-size:60px 60px;
  mask-image:radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 70%);
  animation:thothgwGridFlow 34s linear infinite;
}

body.userguest.thothgw-enabled .thothgw-glyph {
  position:absolute;
  color:rgba(201,168,76,.70);
  font-family:Georgia,"Times New Roman",serif;
  text-shadow:0 0 14px rgba(201,168,76,.66);
  font-size:22px;
  animation:thothgwGlyphRise linear infinite;
}

body.userguest.thothgw-enabled .thothgw-eye {
  position:fixed;
  right:7vw;
  top:15vh;
  z-index:1;
  width:min(410px,31vw);
  opacity:.52;
  pointer-events:none;
  filter:drop-shadow(0 0 12px rgba(0,212,212,.52));
  animation:thothgwFloat 14s ease-in-out infinite;
}

body.userguest.thothgw-enabled .thothgw-pyramid {
  position:fixed;
  right:7vw;
  bottom:12vh;
  z-index:1;
  width:min(390px,32vw);
  opacity:.42;
  pointer-events:none;
  filter:drop-shadow(0 0 20px rgba(201,168,76,.34));
  animation:thothgwFloat 16s ease-in-out infinite reverse;
}

/* Keep Moodle shell above ambience. */
body.userguest.thothgw-enabled #page-wrapper,
body.userguest.thothgw-enabled #page,
body.userguest.thothgw-enabled #page-content,
body.userguest.thothgw-enabled #region-main,
body.userguest.thothgw-enabled [role="main"],
body.userguest.thothgw-enabled header,
body.userguest.thothgw-enabled nav,
body.userguest.thothgw-enabled footer {
  position:relative;
  z-index:2;
}

body.userguest.thothgw-enabled #page,
body.userguest.thothgw-enabled #page-wrapper {
  background:transparent !important;
}

/* Top navigation v14 recolor. */
body.userguest.thothgw-enabled header,
body.userguest.thothgw-enabled .navbar,
body.userguest.thothgw-enabled .navbar.fixed-top,
body.userguest.thothgw-enabled .header-main,
body.userguest.thothgw-enabled #header1,
body.userguest.thothgw-enabled #header2,
body.userguest.thothgw-enabled .navbar-inner,
body.userguest.thothgw-enabled .navbar-header {
  background:rgba(10,14,26,.90) !important;
  background-color:rgba(10,14,26,.90) !important;
  backdrop-filter:blur(20px);
  border-bottom:1px solid rgba(201,168,76,.18) !important;
  box-shadow:0 16px 46px rgba(0,0,0,.28) !important;
}

body.userguest.thothgw-enabled .navbar a,
body.userguest.thothgw-enabled header a,
body.userguest.thothgw-enabled .nav-link,
body.userguest.thothgw-enabled .navbar-nav .nav-link,
body.userguest.thothgw-enabled .navbar .dropdown-toggle {
  color:var(--thothgw-text-dim) !important;
  text-transform:uppercase;
  letter-spacing:.06em;
  font-weight:600;
  transition:color .2s ease, background .2s ease, border-color .2s ease;
}

body.userguest.thothgw-enabled .navbar a:hover,
body.userguest.thothgw-enabled header a:hover,
body.userguest.thothgw-enabled .nav-link:hover,
body.userguest.thothgw-enabled .navbar .dropdown-toggle:hover,
body.userguest.thothgw-enabled .navbar a:focus,
body.userguest.thothgw-enabled header a:focus {
  color:var(--thothgw-gold) !important;
}

body.userguest.thothgw-enabled .thothgw-open > .dropdown-menu,
body.userguest.thothgw-enabled .dropdown:hover > .dropdown-menu,
body.userguest.thothgw-enabled .dropdown:focus-within > .dropdown-menu,
body.userguest.thothgw-enabled .nav-item.dropdown:hover > .dropdown-menu,
body.userguest.thothgw-enabled .nav-item.dropdown:focus-within > .dropdown-menu,
body.userguest.thothgw-enabled li.dropdown:hover > .dropdown-menu,
body.userguest.thothgw-enabled li.dropdown:focus-within > .dropdown-menu {
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  pointer-events:auto !important;
}

body.userguest.thothgw-enabled .navbar .dropdown-menu,
body.userguest.thothgw-enabled header .dropdown-menu,
body.userguest.thothgw-enabled .dropdown-menu {
  padding:10px !important;
  border:1px solid rgba(201,168,76,.24) !important;
  border-radius:0 !important;
  background:var(--thothgw-ink-2) !important;
  background-color:var(--thothgw-ink-2) !important;
  backdrop-filter:blur(20px);
  box-shadow:0 18px 45px rgba(0,0,0,.42), 0 0 28px rgba(0,212,212,.08) !important;
}

body.userguest.thothgw-enabled .navbar .dropdown-menu a,
body.userguest.thothgw-enabled header .dropdown-menu a,
body.userguest.thothgw-enabled .dropdown-menu a {
  color:var(--thothgw-text-dim) !important;
  background:transparent !important;
  border-left:2px solid transparent !important;
  border-radius:0 !important;
  padding:.62rem 1.1rem !important;
}

body.userguest.thothgw-enabled .navbar .dropdown-menu a:hover,
body.userguest.thothgw-enabled .navbar .dropdown-menu a:focus,
body.userguest.thothgw-enabled header .dropdown-menu a:hover,
body.userguest.thothgw-enabled header .dropdown-menu a:focus,
body.userguest.thothgw-enabled .dropdown-menu a:hover,
body.userguest.thothgw-enabled .dropdown-menu a:focus {
  color:var(--thothgw-gold) !important;
  background:rgba(201,168,76,.065) !important;
  border-left-color:var(--thothgw-gold) !important;
}

/* Main content shell. */
body.userguest.thothgw-enabled .thoth-home-isolated,
body.userguest.thothgw-enabled #region-main,
body.userguest.thothgw-enabled #page-content [role="main"] {
  background:linear-gradient(135deg, rgba(15,21,37,.92), rgba(10,14,26,.86)) !important;
  border:1px solid rgba(201,168,76,.16) !important;
  border-radius:0 !important;
  box-shadow:0 22px 58px rgba(0,0,0,.32), inset 0 0 28px rgba(0,212,212,.035) !important;
  backdrop-filter:blur(10px);
  overflow:hidden;
}

/* Force Moodle/Page Activity text visible over dark redesign. */
body.userguest.thothgw-enabled #region-main,
body.userguest.thothgw-enabled #region-main p,
body.userguest.thothgw-enabled #region-main li,
body.userguest.thothgw-enabled #region-main div,
body.userguest.thothgw-enabled #region-main span,
body.userguest.thothgw-enabled #region-main td,
body.userguest.thothgw-enabled #region-main th,
body.userguest.thothgw-enabled #region-main label,
body.userguest.thothgw-enabled .activity,
body.userguest.thothgw-enabled .activity p,
body.userguest.thothgw-enabled .activity li,
body.userguest.thothgw-enabled .activity div,
body.userguest.thothgw-enabled .activity span,
body.userguest.thothgw-enabled .no-overflow,
body.userguest.thothgw-enabled .no-overflow * {
  color:var(--thothgw-text) !important;
}

body.userguest.thothgw-enabled #region-main h1,
body.userguest.thothgw-enabled #region-main h2,
body.userguest.thothgw-enabled #region-main h3,
body.userguest.thothgw-enabled #region-main h4,
body.userguest.thothgw-enabled .thoth-home-isolated h1,
body.userguest.thothgw-enabled .thoth-home-isolated h2,
body.userguest.thothgw-enabled .thoth-home-isolated h3,
body.userguest.thothgw-enabled .activity h1,
body.userguest.thothgw-enabled .activity h2,
body.userguest.thothgw-enabled .activity h3,
body.userguest.thothgw-enabled .activity h4 {
  color:var(--thothgw-white) !important;
  font-family:Georgia, "Times New Roman", serif;
  text-shadow:0 0 18px rgba(201,168,76,.20);
}

body.userguest.thothgw-enabled #region-main h2 em,
body.userguest.thothgw-enabled #region-main h1 em,
body.userguest.thothgw-enabled #region-main strong {
  color:var(--thothgw-gold-light) !important;
}

body.userguest.thothgw-enabled #region-main a,
body.userguest.thothgw-enabled .thoth-home-isolated a,
body.userguest.thothgw-enabled .activity a,
body.userguest.thothgw-enabled footer a {
  color:var(--thothgw-cyan) !important;
}

body.userguest.thothgw-enabled #region-main a:hover,
body.userguest.thothgw-enabled .activity a:hover {
  color:var(--thothgw-gold) !important;
}

/* Neutralize bright/black inline legacy fragments inside public content. */
body.userguest.thothgw-enabled #region-main [style*="color: black"],
body.userguest.thothgw-enabled #region-main [style*="color:#000"],
body.userguest.thothgw-enabled #region-main [style*="color: #000"],
body.userguest.thothgw-enabled #region-main [style*="color: rgb(0"],
body.userguest.thothgw-enabled .activity [style*="color: black"],
body.userguest.thothgw-enabled .activity [style*="color:#000"],
body.userguest.thothgw-enabled .activity [style*="color: #000"],
body.userguest.thothgw-enabled .activity [style*="color: rgb(0"] {
  color:var(--thothgw-text) !important;
}

/* Page Activity ambience without changing stored content. */
body.userguest.thothgw-enabled .thothgw-page-aura {
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:0;
  overflow:hidden;
}

body.userguest.thothgw-enabled .thothgw-page-aura::before {
  content:"";
  position:absolute;
  top:0;
  left:0;
  width:38%;
  height:100%;
  background:linear-gradient(90deg, transparent, rgba(201,168,76,.08), transparent);
  animation:thothgwPanelScan 9s ease-in-out infinite;
}

body.userguest.thothgw-enabled .thothgw-page-aura::after {
  content:attr(data-symbol);
  position:absolute;
  right:34px;
  top:28px;
  font-family:Georgia, "Times New Roman", serif;
  font-size:clamp(52px,8vw,128px);
  line-height:1;
  color:rgba(201,168,76,.08);
  text-shadow:0 0 34px rgba(0,212,212,.10);
}

body.userguest.thothgw-enabled #region-main > *,
body.userguest.thothgw-enabled #page-content [role="main"] > * {
  position:relative;
  z-index:1;
}

body.userguest.thothgw-enabled .thothgw-content-reveal {
  animation:thothgwFadeUp .75s ease both;
}

/* Buttons and cards: v14 angular style. */
body.userguest.thothgw-enabled #region-main .btn,
body.userguest.thothgw-enabled #region-main a[style*="background"],
body.userguest.thothgw-enabled .thoth-home-isolated a[style*="background"],
body.userguest.thothgw-enabled .activity a[style*="background"] {
  border-radius:0 !important;
  border:1px solid rgba(201,168,76,.40) !important;
  background:linear-gradient(135deg, var(--thothgw-gold), var(--thothgw-gold-dim)) !important;
  color:var(--thothgw-ink) !important;
  font-weight:700 !important;
  clip-path:polygon(8px 0%,100% 0%,calc(100% - 8px) 100%,0% 100%);
  box-shadow:0 8px 30px rgba(201,168,76,.16) !important;
}

body.userguest.thothgw-enabled footer,
body.userguest.thothgw-enabled #page-footer {
  background:var(--thothgw-ink) !important;
  border-top:1px solid rgba(201,168,76,.12) !important;
  color:var(--thothgw-text-dim) !important;
}

/* Intro splash rebuilt around the v14 mark. */
body.userguest.thothgw-enabled .thothgw-intro {
  position:fixed;
  inset:0;
  z-index:99999;
  pointer-events:none;
  background:
    radial-gradient(circle at 62% 45%, rgba(0,212,212,.13), transparent 32%),
    radial-gradient(circle at 48% 58%, rgba(201,168,76,.15), transparent 36%),
    linear-gradient(135deg,#050812,#0f1525 55%,#050812);
  animation:thothgwIntroOut 7s ease forwards;
}

body.userguest.thothgw-enabled .thothgw-intro svg {
  width:100%;
  height:100%;
}

body.userguest.thothgw-enabled .thothgw-intro .laser {
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round;
  stroke-dasharray:360;
  stroke-dashoffset:360;
  filter:drop-shadow(0 0 10px rgba(0,212,212,.72));
  animation:thothgwLaserDraw 2.4s ease forwards .35s, thothgwLaserFade 1.35s ease forwards 5.2s;
}

body.userguest.thothgw-enabled .thothgw-intro .gold {
  stroke:var(--thothgw-gold);
  stroke-width:2.4;
  animation-delay:1.1s,5.25s;
}

body.userguest.thothgw-enabled .thothgw-intro .cyan {
  stroke:var(--thothgw-cyan);
  stroke-width:3;
}

body.userguest.thothgw-enabled .thothgw-intro .title {
  font-family:Georgia, "Times New Roman", serif;
  font-size:clamp(38px,5.4vw,82px);
  fill:var(--thothgw-white);
  text-anchor:middle;
  filter:drop-shadow(0 0 18px rgba(201,168,76,.65));
}

body.userguest.thothgw-enabled .thothgw-intro .subtitle {
  font-family:system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size:28px;
  letter-spacing:.26em;
  fill:var(--thothgw-cyan);
  text-anchor:middle;
  filter:drop-shadow(0 0 14px rgba(0,212,212,.35));
}

body.userguest.thothgw-enabled .thothgw-intro .intro-mark {
  filter:drop-shadow(0 0 22px rgba(201,168,76,.55)) drop-shadow(0 0 26px rgba(0,212,212,.20));
  animation:thothgwFloat 5.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  body.userguest.thothgw-enabled *,
  body.userguest.thothgw-enabled *::before,
  body.userguest.thothgw-enabled *::after {
    animation:none !important;
    transition:none !important;
  }

  body.userguest.thothgw-enabled .thothgw-intro {
    display:none !important;
  }
}

@media (max-width:900px) {
  body.userguest.thothgw-enabled .thothgw-brand {
    left:16px;
    top:10px;
  }

  body.userguest.thothgw-enabled .thothgw-brand-word {
    font-size:.86rem;
  }

  body.userguest.thothgw-enabled .thothgw-eye,
  body.userguest.thothgw-enabled .thothgw-pyramid {
    width:68vw;
    right:-18vw;
    opacity:.28;
  }

  body.userguest.thothgw-enabled #region-main {
    border-left:none !important;
    border-right:none !important;
  }
}

/* STEP-12C V14 FORCE LAYER START */

/* Eliminate remaining white Adaptable/Moodle guest containers. */
body.userguest.thothgw-enabled,
body.userguest.thothgw-enabled #page,
body.userguest.thothgw-enabled #page-wrapper,
body.userguest.thothgw-enabled #page-content,
body.userguest.thothgw-enabled #region-main-box,
body.userguest.thothgw-enabled #region-main,
body.userguest.thothgw-enabled .main-inner,
body.userguest.thothgw-enabled .course-content,
body.userguest.thothgw-enabled .sitetopic,
body.userguest.thothgw-enabled .course-section,
body.userguest.thothgw-enabled .section,
body.userguest.thothgw-enabled .content,
body.userguest.thothgw-enabled .card,
body.userguest.thothgw-enabled .card-body,
body.userguest.thothgw-enabled .generalbox,
body.userguest.thothgw-enabled .box,
body.userguest.thothgw-enabled .activity,
body.userguest.thothgw-enabled .activity-item,
body.userguest.thothgw-enabled .activityinstance,
body.userguest.thothgw-enabled .no-overflow {
  background-color: transparent !important;
}

body.userguest.thothgw-enabled #region-main,
body.userguest.thothgw-enabled #page-content [role="main"],
body.userguest.thothgw-enabled .thoth-home-isolated {
  background:
    linear-gradient(135deg, rgba(15,21,37,.96), rgba(10,14,26,.92)),
    radial-gradient(circle at 90% 10%, rgba(0,212,212,.10), transparent 32%),
    radial-gradient(circle at 5% 90%, rgba(201,168,76,.14), transparent 36%) !important;
  color: var(--thothgw-text) !important;
  border: 1px solid rgba(201,168,76,.28) !important;
  box-shadow:
    0 26px 70px rgba(0,0,0,.46),
    inset 0 0 0 1px rgba(255,255,255,.025),
    inset 0 0 42px rgba(0,212,212,.045) !important;
}

/* Stronger text readability for homepage + Page activities. */
body.userguest.thothgw-enabled #region-main,
body.userguest.thothgw-enabled #region-main *,
body.userguest.thothgw-enabled #page-content [role="main"],
body.userguest.thothgw-enabled #page-content [role="main"] *,
body.userguest.thothgw-enabled .activity,
body.userguest.thothgw-enabled .activity *,
body.userguest.thothgw-enabled .no-overflow,
body.userguest.thothgw-enabled .no-overflow * {
  color: var(--thothgw-text) !important;
}

body.userguest.thothgw-enabled #region-main h1,
body.userguest.thothgw-enabled #region-main h2,
body.userguest.thothgw-enabled #region-main h3,
body.userguest.thothgw-enabled #region-main h4,
body.userguest.thothgw-enabled #page-content [role="main"] h1,
body.userguest.thothgw-enabled #page-content [role="main"] h2,
body.userguest.thothgw-enabled #page-content [role="main"] h3,
body.userguest.thothgw-enabled #page-content [role="main"] h4,
body.userguest.thothgw-enabled .activity h1,
body.userguest.thothgw-enabled .activity h2,
body.userguest.thothgw-enabled .activity h3,
body.userguest.thothgw-enabled .activity h4 {
  color: var(--thothgw-gold-light) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  letter-spacing: .015em;
  text-shadow:
    0 0 12px rgba(201,168,76,.34),
    0 0 30px rgba(0,212,212,.10) !important;
}

body.userguest.thothgw-enabled #region-main h1::after,
body.userguest.thothgw-enabled #region-main h2::after,
body.userguest.thothgw-enabled .activity h1::after,
body.userguest.thothgw-enabled .activity h2::after {
  content: "";
  display: block;
  width: min(180px, 42%);
  height: 1px;
  margin-top: .45rem;
  background: linear-gradient(90deg, var(--thothgw-gold), transparent);
  box-shadow: 0 0 12px rgba(201,168,76,.44);
}

/* Force old inline white boxes/cards into v14 dark glass. */
body.userguest.thothgw-enabled [style*="background:white"],
body.userguest.thothgw-enabled [style*="background: white"],
body.userguest.thothgw-enabled [style*="background-color:white"],
body.userguest.thothgw-enabled [style*="background-color: white"],
body.userguest.thothgw-enabled [style*="background:#fff"],
body.userguest.thothgw-enabled [style*="background: #fff"],
body.userguest.thothgw-enabled [style*="background-color:#fff"],
body.userguest.thothgw-enabled [style*="background-color: #fff"],
body.userguest.thothgw-enabled .bg-white,
body.userguest.thothgw-enabled .bg-light {
  background: rgba(15,21,37,.82) !important;
  background-color: rgba(15,21,37,.82) !important;
  color: var(--thothgw-text) !important;
  border-color: rgba(201,168,76,.18) !important;
}

/* Stronger v14 navigation override. */
body.userguest.thothgw-enabled #above-header,
body.userguest.thothgw-enabled #header1,
body.userguest.thothgw-enabled #header2,
body.userguest.thothgw-enabled #page-header,
body.userguest.thothgw-enabled #adaptable-page-header-wrapper,
body.userguest.thothgw-enabled #adaptable-page-header,
body.userguest.thothgw-enabled .header-main,
body.userguest.thothgw-enabled .navbar,
body.userguest.thothgw-enabled .navbar-light,
body.userguest.thothgw-enabled .navbar-expand,
body.userguest.thothgw-enabled .navbar-expand-lg,
body.userguest.thothgw-enabled .navbar-header,
body.userguest.thothgw-enabled .navbar-inner,
body.userguest.thothgw-enabled nav[role="navigation"] {
  background: rgba(10,14,26,.96) !important;
  background-color: rgba(10,14,26,.96) !important;
  color: var(--thothgw-text) !important;
  border-color: rgba(201,168,76,.22) !important;
  box-shadow: 0 14px 46px rgba(0,0,0,.42), inset 0 -1px 0 rgba(201,168,76,.16) !important;
}

body.userguest.thothgw-enabled .navbar *,
body.userguest.thothgw-enabled header *,
body.userguest.thothgw-enabled nav[role="navigation"] * {
  border-color: rgba(201,168,76,.18) !important;
}

body.userguest.thothgw-enabled .navbar a,
body.userguest.thothgw-enabled .navbar-light .navbar-nav .nav-link,
body.userguest.thothgw-enabled .navbar-nav .nav-link,
body.userguest.thothgw-enabled .dropdown-toggle,
body.userguest.thothgw-enabled header a,
body.userguest.thothgw-enabled nav[role="navigation"] a {
  color: var(--thothgw-text-dim) !important;
  background: transparent !important;
}

body.userguest.thothgw-enabled .navbar a:hover,
body.userguest.thothgw-enabled .navbar-light .navbar-nav .nav-link:hover,
body.userguest.thothgw-enabled .navbar-nav .nav-link:hover,
body.userguest.thothgw-enabled .dropdown-toggle:hover,
body.userguest.thothgw-enabled header a:hover,
body.userguest.thothgw-enabled nav[role="navigation"] a:hover,
body.userguest.thothgw-enabled .navbar a:focus,
body.userguest.thothgw-enabled header a:focus {
  color: var(--thothgw-gold-light) !important;
  background: rgba(201,168,76,.065) !important;
}

/* Restore visible animation and shapes inside Page Activity shell. */
body.userguest.thothgw-enabled #region-main::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 35%, rgba(201,168,76,.10) 45%, transparent 58%),
    radial-gradient(circle at 86% 22%, rgba(0,212,212,.18), transparent 28%),
    radial-gradient(circle at 10% 88%, rgba(201,168,76,.16), transparent 34%);
  opacity: .75;
  animation: thothgwPanelScan 10s ease-in-out infinite;
}

body.userguest.thothgw-enabled #region-main::after {
  content: "𓂀";
  position: absolute;
  right: 28px;
  top: 20px;
  z-index: 0;
  pointer-events: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(68px, 12vw, 160px);
  line-height: 1;
  color: rgba(201,168,76,.13);
  text-shadow: 0 0 34px rgba(0,212,212,.12);
  animation: thothgwFloat 12s ease-in-out infinite;
}

body.userguest.thothgw-enabled .thothgw-page-aura {
  opacity: 1 !important;
  mix-blend-mode: screen;
}

body.userguest.thothgw-enabled .thothgw-page-aura::before {
  background: linear-gradient(90deg, transparent, rgba(201,168,76,.22), rgba(0,212,212,.10), transparent) !important;
  animation-duration: 8s !important;
}

body.userguest.thothgw-enabled .thothgw-page-aura::after {
  color: rgba(201,168,76,.16) !important;
}

/* Ensure actual content stays above animations. */
body.userguest.thothgw-enabled #region-main > :not(.thothgw-page-aura),
body.userguest.thothgw-enabled #region-main .course-content,
body.userguest.thothgw-enabled #region-main .activity,
body.userguest.thothgw-enabled #region-main .no-overflow,
body.userguest.thothgw-enabled #region-main .content {
  position: relative;
  z-index: 2;
}

/* Intro triangle animation restored. */
@keyframes thothgwIntroTriangleBuild {
  0% { opacity: 0; transform: scale(.72) rotate(-2deg); }
  35% { opacity: .95; transform: scale(1.04) rotate(0deg); }
  68% { opacity: .7; transform: scale(.98) rotate(0deg); }
  100% { opacity: .28; transform: scale(1.12) rotate(0deg); }
}

@keyframes thothgwIntroTriangleTrace {
  to { stroke-dashoffset: 0; }
}

body.userguest.thothgw-enabled .thothgw-intro .gate,
body.userguest.thothgw-enabled .thothgw-intro .tri-core {
  transform-origin: 1330px 258px;
  animation: thothgwIntroTriangleBuild 5.8s ease forwards !important;
}

body.userguest.thothgw-enabled .thothgw-intro .tri-line {
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: thothgwIntroTriangleTrace 2.7s ease forwards 1.2s !important;
}

/* STEP-12C V14 FORCE LAYER END */

/* STEP-12C PAGE SHARDS START */
@keyframes thothgwShardDrift {
  0%, 100% { transform: translate3d(0,0,0) rotate(var(--r)); opacity: .35; }
  50% { transform: translate3d(10px,-16px,0) rotate(calc(var(--r) + 7deg)); opacity: .82; }
}

body.userguest.thothgw-enabled .thothgw-page-shards {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

body.userguest.thothgw-enabled .thothgw-page-shards span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 72px;
  height: 72px;
  opacity: .48;
  clip-path: polygon(50% 0%, 100% 86%, 0% 86%);
  border: 1px solid rgba(201,168,76,.34);
  background: linear-gradient(135deg, rgba(201,168,76,.10), rgba(0,212,212,.06));
  filter: drop-shadow(0 0 12px rgba(201,168,76,.18));
  animation: thothgwShardDrift 9s ease-in-out infinite;
}

body.userguest.thothgw-enabled .thothgw-page-shards span:nth-child(2) { animation-delay: -2s; }
body.userguest.thothgw-enabled .thothgw-page-shards span:nth-child(3) { animation-delay: -4s; }
body.userguest.thothgw-enabled .thothgw-page-shards span:nth-child(4) { animation-delay: -6s; }
/* STEP-12C PAGE SHARDS END */

/* STEP-12D SEAMLESS V14 SHELL START */

/*
  Purpose:
  - Remove remaining white Adaptable homepage/navigation surfaces.
  - Make homepage and Page activities share one seamless v14 dark background.
  - Reduce oversized public title text relative to the new mark.
  - Preserve guest-only behavior and hidden Moodle elements.
*/

html:has(body.userguest.thothgw-enabled),
body.userguest.thothgw-enabled {
  background: #0a0e1a !important;
  background-color: #0a0e1a !important;
}

/* Deep neutralization of Adaptable/Moodle white guest surfaces. */
body.userguest.thothgw-enabled #page-wrapper,
body.userguest.thothgw-enabled #page,
body.userguest.thothgw-enabled #page-content,
body.userguest.thothgw-enabled #region-main-box,
body.userguest.thothgw-enabled #region-main,
body.userguest.thothgw-enabled #region-main > div,
body.userguest.thothgw-enabled #region-main .region-main-content,
body.userguest.thothgw-enabled .main-inner,
body.userguest.thothgw-enabled .container,
body.userguest.thothgw-enabled .container-fluid,
body.userguest.thothgw-enabled .course-content,
body.userguest.thothgw-enabled .course-content ul,
body.userguest.thothgw-enabled .course-section,
body.userguest.thothgw-enabled .sitetopic,
body.userguest.thothgw-enabled .section,
body.userguest.thothgw-enabled .summary,
body.userguest.thothgw-enabled .content,
body.userguest.thothgw-enabled .card,
body.userguest.thothgw-enabled .card-body,
body.userguest.thothgw-enabled .generalbox,
body.userguest.thothgw-enabled .box,
body.userguest.thothgw-enabled .activity,
body.userguest.thothgw-enabled .activity-item,
body.userguest.thothgw-enabled .activityinstance,
body.userguest.thothgw-enabled .no-overflow,
body.userguest.thothgw-enabled .modtype_page,
body.userguest.thothgw-enabled .coursebox,
body.userguest.thothgw-enabled .frontpage-course-list-all,
body.userguest.thothgw-enabled #frontpage-course-list,
body.userguest.thothgw-enabled #frontpage-category-names,
body.userguest.thothgw-enabled #site-news-forum,
body.userguest.thothgw-enabled .forumpost,
body.userguest.thothgw-enabled .block,
body.userguest.thothgw-enabled .block .content {
  background: transparent !important;
  background-color: transparent !important;
}

/* One seamless global canvas behind everything. */
body.userguest.thothgw-enabled::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(ellipse 78% 65% at 68% 32%, rgba(0,212,212,.105) 0%, transparent 58%),
    radial-gradient(ellipse 54% 48% at 18% 78%, rgba(201,168,76,.13) 0%, transparent 54%),
    radial-gradient(ellipse 42% 42% at 88% 82%, rgba(0,122,122,.09) 0%, transparent 52%),
    linear-gradient(160deg, #0a0e1a 0%, #0f1525 48%, #0a0e1a 100%) !important;
}

body.userguest.thothgw-enabled::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .22;
  background-image:
    linear-gradient(rgba(201,168,76,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,.045) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 88% 82% at 50% 48%, black 0%, transparent 74%);
}

/* Make VFX layer blend seamlessly rather than looking like a separate area. */
body.userguest.thothgw-enabled .thothgw-vfx {
  background:
    radial-gradient(ellipse 70% 60% at 62% 36%, rgba(0,212,212,.075) 0%, transparent 60%),
    radial-gradient(ellipse 55% 55% at 18% 82%, rgba(201,168,76,.09) 0%, transparent 56%),
    linear-gradient(160deg, rgba(10,14,26,.45) 0%, rgba(15,21,37,.34) 48%, rgba(10,14,26,.45) 100%) !important;
}

/* Homepage/content shell: dark glass, not white block. */
body.userguest.thothgw-enabled #region-main,
body.userguest.thothgw-enabled #page-content [role="main"] {
  background:
    linear-gradient(135deg, rgba(15,21,37,.84), rgba(10,14,26,.78)) !important;
  background-color: rgba(10,14,26,.78) !important;
  border: 1px solid rgba(201,168,76,.24) !important;
  box-shadow:
    0 26px 70px rgba(0,0,0,.34),
    inset 0 0 0 1px rgba(255,255,255,.025),
    inset 0 0 48px rgba(0,212,212,.035) !important;
}

/* Override inline old white homepage blocks while keeping content visible. */
body.userguest.thothgw-enabled [style*="background"],
body.userguest.thothgw-enabled [style*="background-color"] {
  background-color: transparent !important;
}

body.userguest.thothgw-enabled #region-main [style*="background"],
body.userguest.thothgw-enabled #region-main [style*="background-color"],
body.userguest.thothgw-enabled #page-content [role="main"] [style*="background"],
body.userguest.thothgw-enabled #page-content [role="main"] [style*="background-color"] {
  background: transparent !important;
  background-color: transparent !important;
}

/* Strong text visibility after neutralizing white backgrounds. */
body.userguest.thothgw-enabled #region-main,
body.userguest.thothgw-enabled #region-main *,
body.userguest.thothgw-enabled #page-content [role="main"],
body.userguest.thothgw-enabled #page-content [role="main"] * {
  color: var(--thothgw-text) !important;
}

body.userguest.thothgw-enabled #region-main h1,
body.userguest.thothgw-enabled #region-main h2,
body.userguest.thothgw-enabled #region-main h3,
body.userguest.thothgw-enabled #page-content [role="main"] h1,
body.userguest.thothgw-enabled #page-content [role="main"] h2,
body.userguest.thothgw-enabled #page-content [role="main"] h3 {
  color: var(--thothgw-gold-light) !important;
}

/* Reduce oversized public title relative to new logo/mark. */
body.userguest.thothgw-enabled #region-main h1,
body.userguest.thothgw-enabled #page-content [role="main"] h1,
body.userguest.thothgw-enabled .thoth-home-isolated h1,
body.userguest.thothgw-enabled .sitetopic h1,
body.userguest.thothgw-enabled .course-content h1 {
  font-size: clamp(1.75rem, 3.1vw, 3.15rem) !important;
  line-height: 1.08 !important;
  max-width: 980px;
}

body.userguest.thothgw-enabled #region-main h1:has(span),
body.userguest.thothgw-enabled #region-main h1:first-child {
  font-size: clamp(1.65rem, 2.9vw, 3rem) !important;
}

/* Replacement brand wordmark should remain compact. */
body.userguest.thothgw-enabled .thothgw-brand-word {
  font-size: clamp(.86rem, 1.15vw, 1.05rem) !important;
  line-height: 1 !important;
}

body.userguest.thothgw-enabled .thothgw-brand-mark {
  width: 40px !important;
  height: 40px !important;
}

body.userguest.thothgw-enabled .thothgw-brand-mark img {
  width: 32px !important;
  height: 32px !important;
}

/* Aggressive v14 nav shell override. */
body.userguest.thothgw-enabled #above-header,
body.userguest.thothgw-enabled #header1,
body.userguest.thothgw-enabled #header2,
body.userguest.thothgw-enabled #page-header,
body.userguest.thothgw-enabled #adaptable-page-header-wrapper,
body.userguest.thothgw-enabled #adaptable-page-header,
body.userguest.thothgw-enabled #main-navbar,
body.userguest.thothgw-enabled #main-navbar *,
body.userguest.thothgw-enabled .header-main,
body.userguest.thothgw-enabled .navbar,
body.userguest.thothgw-enabled .navbar *,
body.userguest.thothgw-enabled .navbar-light,
body.userguest.thothgw-enabled .navbar-light *,
body.userguest.thothgw-enabled .navbar-expand,
body.userguest.thothgw-enabled .navbar-expand *,
body.userguest.thothgw-enabled .navbar-expand-lg,
body.userguest.thothgw-enabled .navbar-expand-lg *,
body.userguest.thothgw-enabled .navbar-header,
body.userguest.thothgw-enabled .navbar-inner,
body.userguest.thothgw-enabled nav[role="navigation"],
body.userguest.thothgw-enabled nav[role="navigation"] *,
body.userguest.thothgw-enabled .topmenus,
body.userguest.thothgw-enabled .topmenus *,
body.userguest.thothgw-enabled .btco-hover-menu,
body.userguest.thothgw-enabled .btco-hover-menu *,
body.userguest.thothgw-enabled .navbar-nav,
body.userguest.thothgw-enabled .navbar-nav * {
  background-color: rgba(10,14,26,.96) !important;
  background-image: none !important;
}

/* Re-allow dropdown surfaces to have their own dark panels. */
body.userguest.thothgw-enabled .dropdown-menu,
body.userguest.thothgw-enabled .dropdown-menu * {
  background-color: #0f1525 !important;
}

body.userguest.thothgw-enabled .navbar,
body.userguest.thothgw-enabled #main-navbar,
body.userguest.thothgw-enabled nav[role="navigation"] {
  border-bottom: 1px solid rgba(201,168,76,.24) !important;
  box-shadow:
    0 14px 46px rgba(0,0,0,.46),
    inset 0 -1px 0 rgba(201,168,76,.16) !important;
}

body.userguest.thothgw-enabled .navbar a,
body.userguest.thothgw-enabled .navbar-light .navbar-nav .nav-link,
body.userguest.thothgw-enabled .navbar-nav .nav-link,
body.userguest.thothgw-enabled .dropdown-toggle,
body.userguest.thothgw-enabled header a,
body.userguest.thothgw-enabled nav[role="navigation"] a,
body.userguest.thothgw-enabled .topmenus a,
body.userguest.thothgw-enabled .btco-hover-menu a {
  color: var(--thothgw-text-dim) !important;
  background: transparent !important;
}

body.userguest.thothgw-enabled .navbar a:hover,
body.userguest.thothgw-enabled .navbar-light .navbar-nav .nav-link:hover,
body.userguest.thothgw-enabled .navbar-nav .nav-link:hover,
body.userguest.thothgw-enabled .dropdown-toggle:hover,
body.userguest.thothgw-enabled header a:hover,
body.userguest.thothgw-enabled nav[role="navigation"] a:hover,
body.userguest.thothgw-enabled .topmenus a:hover,
body.userguest.thothgw-enabled .btco-hover-menu a:hover {
  color: var(--thothgw-gold-light) !important;
  background: rgba(201,168,76,.075) !important;
}

/* Remove visual seams between header, page, content, footer. */
body.userguest.thothgw-enabled .container,
body.userguest.thothgw-enabled .container-fluid {
  box-shadow: none !important;
}

body.userguest.thothgw-enabled footer,
body.userguest.thothgw-enabled #page-footer,
body.userguest.thothgw-enabled #page-footer *,
body.userguest.thothgw-enabled .footer-main,
body.userguest.thothgw-enabled .footer-main * {
  background-color: rgba(10,14,26,.94) !important;
  background-image: none !important;
  color: var(--thothgw-text-dim) !important;
}

/* STEP-12D SEAMLESS V14 SHELL END */

/* STEP-12D4 HOMEPAGE INLINE WHITE PANEL OVERRIDE START
   Purpose:
   - Override old inline white homepage label panels.
   - Keep text visible.
   - Reduce oversized Adaptable header title.
   - Add v14-style animated content geometry.
   - Do NOT modify Moodle stored text/content.
*/

/* Shrink the large Adaptable public header title. */
body.userguest.thothgw-enabled #headertitle,
body.userguest.thothgw-enabled #headertitle h1,
body.userguest.thothgw-enabled #headertitle #sitetitle {
  font-size: clamp(0.92rem, 1.25vw, 1.35rem) !important;
  line-height: 1.08 !important;
  letter-spacing: 0.025em !important;
  max-width: min(620px, 64vw) !important;
  color: var(--thothgw-gold-light) !important;
  text-shadow: 0 0 14px rgba(201,168,76,.28), 0 0 28px rgba(0,212,212,.08) !important;
}

body.userguest.thothgw-enabled #headertitle h1 {
  margin: 0 !important;
  padding: 0 !important;
}

/* Homepage Moodle label shell should become a dark v14 stage. */
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label,
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label .activity-item,
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label .activity-grid,
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label .activity-altcontent,
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label .no-overflow {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--thothgw-text) !important;
}

/* Override exact old inline white panels in the homepage label. */
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label [style*="background:rgba(255,255,255"],
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label [style*="background: rgba(255,255,255"],
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label [style*="background:#ffffff"],
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label [style*="background: #ffffff"],
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label [style*="background:white"],
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label [style*="background: white"] {
  background:
    radial-gradient(circle at 92% 12%, rgba(0,212,212,.12), transparent 32%),
    radial-gradient(circle at 8% 84%, rgba(201,168,76,.14), transparent 36%),
    linear-gradient(135deg, rgba(15,21,37,.94), rgba(10,14,26,.88)) !important;
  background-color: rgba(10,14,26,.90) !important;
  color: var(--thothgw-text) !important;
  border-color: rgba(201,168,76,.28) !important;
  box-shadow:
    0 24px 68px rgba(0,0,0,.34),
    inset 0 0 0 1px rgba(255,255,255,.03),
    inset 0 0 44px rgba(0,212,212,.045) !important;
}

/* Override old dark-blue inline text colors inside the homepage label. */
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label [style*="color:#0b1f3a"],
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label [style*="color: #0b1f3a"],
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label [style*="color:#123b63"],
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label [style*="color: #123b63"],
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label [style*="color:#243447"],
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label [style*="color: #243447"] {
  color: var(--thothgw-text) !important;
}

/* Preserve gold/yellow accents, but make them richer and closer to v14. */
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label [style*="color:#b68b00"],
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label [style*="color: #b68b00"] {
  color: var(--thothgw-gold-light) !important;
}

/* Homepage inline card panels that were pure white. */
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label div[style*="border:1px solid #ddd"][style*="background:#ffffff"],
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label div[style*="border:1px solid #ddd"][style*="background: #ffffff"] {
  background:
    linear-gradient(135deg, rgba(20,29,48,.86), rgba(10,14,26,.78)) !important;
  color: var(--thothgw-text) !important;
  border: 1px solid rgba(201,168,76,.25) !important;
  box-shadow: inset 0 0 28px rgba(0,212,212,.035), 0 18px 42px rgba(0,0,0,.24) !important;
}

/* Gold headings for homepage content sections. */
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label h1,
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label h2,
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label h3,
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label h4,
body.userguest.thothgw-enabled.path-mod-page #region-main h1,
body.userguest.thothgw-enabled.path-mod-page #region-main h2,
body.userguest.thothgw-enabled.path-mod-page #region-main h3,
body.userguest.thothgw-enabled.path-mod-page #region-main h4 {
  color: var(--thothgw-gold-light) !important;
  text-shadow: 0 0 16px rgba(201,168,76,.26), 0 0 34px rgba(0,212,212,.08) !important;
}

/* V14 animated content geometry layer. */
@keyframes thothgwContentRay {
  0% { transform: translateX(-130%) skewX(-18deg); opacity: 0; }
  20% { opacity: .55; }
  55% { opacity: .28; }
  100% { transform: translateX(145%) skewX(-18deg); opacity: 0; }
}

@keyframes thothgwContentShard {
  0%, 100% { transform: translate3d(0,0,0) rotate(var(--r, 0deg)); opacity: .28; }
  50% { transform: translate3d(10px,-16px,0) rotate(calc(var(--r, 0deg) + 8deg)); opacity: .72; }
}

@keyframes thothgwContentOrbit {
  to { transform: rotate(360deg); }
}

body.userguest.thothgw-enabled .thothgw-content-magic {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

body.userguest.thothgw-enabled .thothgw-content-magic::before {
  content: "";
  position: absolute;
  top: -10%;
  left: 0;
  width: 42%;
  height: 120%;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,.17), rgba(0,212,212,.08), transparent);
  animation: thothgwContentRay 9s ease-in-out infinite;
}

body.userguest.thothgw-enabled .thothgw-content-magic::after {
  content: "𓂀";
  position: absolute;
  right: clamp(18px, 4vw, 54px);
  top: clamp(18px, 4vw, 52px);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(72px, 11vw, 160px);
  color: rgba(201,168,76,.12);
  text-shadow: 0 0 34px rgba(201,168,76,.18), 0 0 48px rgba(0,212,212,.10);
  animation: thothgwFloat 13s ease-in-out infinite;
}

body.userguest.thothgw-enabled .thothgw-magic-shard {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s, 62px);
  height: var(--s, 62px);
  clip-path: polygon(50% 0%, 100% 86%, 0% 86%);
  border: 1px solid rgba(201,168,76,.34);
  background: linear-gradient(135deg, rgba(201,168,76,.12), rgba(0,212,212,.07));
  filter: drop-shadow(0 0 14px rgba(201,168,76,.18));
  opacity: .42;
  animation: thothgwContentShard var(--d, 10s) ease-in-out infinite;
}

body.userguest.thothgw-enabled .thothgw-magic-orbit {
  position: absolute;
  width: clamp(160px, 20vw, 320px);
  height: clamp(160px, 20vw, 320px);
  left: -86px;
  bottom: -98px;
  border: 1px solid rgba(201,168,76,.14);
  border-radius: 50%;
  box-shadow: inset 0 0 24px rgba(0,212,212,.07), 0 0 28px rgba(201,168,76,.09);
  animation: thothgwContentOrbit 36s linear infinite;
}

body.userguest.thothgw-enabled .thothgw-magic-orbit::before,
body.userguest.thothgw-enabled .thothgw-magic-orbit::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(0,212,212,.13);
  border-radius: 50%;
}

body.userguest.thothgw-enabled .thothgw-magic-orbit::after {
  inset: 36%;
  border-color: rgba(201,168,76,.16);
}

/* Ensure content stays above animation layer. */
body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label .activity-altcontent,
body.userguest.thothgw-enabled.path-mod-page #region-main {
  position: relative !important;
  isolation: isolate;
}

body.userguest.thothgw-enabled.pagelayout-frontpage .activity.label.modtype_label .activity-altcontent > :not(.thothgw-content-magic),
body.userguest.thothgw-enabled.path-mod-page #region-main > :not(.thothgw-content-magic) {
  position: relative;
  z-index: 2;
}

/* STEP-12D4 HOMEPAGE INLINE WHITE PANEL OVERRIDE END */
