.hero-glass-panel {
    position: relative;
    height: 520px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s;
    background: #000;
  }
  .hero-glass-panel:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), inset 0 0 0 1px rgba(255, 210, 74, 0.4);
    z-index: 50;
  }
  .hero-glass-panel .glass-bg {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    transition: transform 1s, filter 0.4s;
    filter: brightness(0.6) saturate(1.2);
  }
  .hero-glass-panel:hover .glass-bg {
    transform: scale(1.05); filter: brightness(0.8) saturate(1.3);
  }
  .hero-glass-panel .glass-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
  }
  .hero-glass-panel .glass-content {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 40px; z-index: 2;
  }
  
  /* Add support for the popout hover effects inside the modal */
  .exp-popout .card-body { position: absolute; inset: 0; border-radius: 8px; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); background: #0b0a08; border: 1px solid rgba(255,255,255,0.16); display: flex; flex-direction: column; overflow: hidden; }
  .exp-popout:hover .card-body { top: -80px; bottom: -80px; left: -20px; right: -20px; box-shadow: 0 40px 80px rgba(0,0,0,0.9), 0 0 0 1px #FFD24A; z-index: 50; }
  .exp-popout .back-content { overflow-y: auto !important; }
  
  /* Missing BG IMG styles that she used inline in layers.html */
  .exp-popout .card-body::before { content: ""; position: absolute; inset: 0; background: var(--bg-img) center / cover no-repeat; z-index: 0; opacity: 0.6; transition: opacity 0.3s; }
  .exp-popout:hover .card-body::before { opacity: 0.2; }
  
  .myth-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
  @media (max-width: 900px) { .myth-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 600px) { .myth-grid { grid-template-columns: 1fr; } }
  .myth-grid .integrated-card { background: #0b0a08; border: 1px solid rgba(255,255,255,0.16); border-left: 3px solid rgba(255,210,74,.36); display: block; padding: 20px; text-decoration: none; border-radius: 8px; color: white; transition: background 0.3s; }
  .myth-grid .integrated-card:hover { background: #171410; }

  .exp-section-label {
    margin: 60px 0 20px;
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 850;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .myth-story-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    margin-bottom: 60px;
  }

  .myth-story-grid-single,
  .myth-theory-grid-single {
    grid-template-columns: minmax(0, 1fr);
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
  }

  .myth-story-card {
    position: relative;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow: hidden;
    cursor: default;
    transform-style: preserve-3d;
    border: 1px solid rgba(255,255,255,0.14);
    border-top: 3px solid rgba(255,210,74,0.75);
    border-radius: 10px;
    background:
      linear-gradient(180deg, rgba(255,210,74,0.13) 0%, rgba(255,210,74,0.02) 32%, transparent 60%),
      linear-gradient(180deg, #17140f 0%, #080706 100%);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 20px 46px rgba(0,0,0,0.35);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  }

  .myth-story-card:hover,
  .myth-story-card:focus {
    transform: translateY(-5px);
    border-color: rgba(255,210,74,0.55);
    outline: none;
    box-shadow: 0 30px 70px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,210,74,0.2);
  }

  .myth-story-card::after {
    content: "More";
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 20px;
    color: rgba(255,210,74,0.82);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: opacity 0.22s ease;
  }

  .myth-story-card:hover::after,
  .myth-story-card:focus::after {
    opacity: 0;
  }

  .myth-card-kicker,
  .myth-card-action,
  .myth-theory-card span {
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .myth-story-card h3 {
    margin: 18px 0 14px;
    color: #fff;
    font-family: var(--font-serif);
    font-size: clamp(1.45rem, 2vw, 2rem);
    line-height: 1.08;
  }

  .myth-story-card > .myth-card-kicker,
  .myth-story-card > h3,
  .myth-story-card > p {
    transition: opacity 0.24s ease, transform 0.28s ease;
  }

  .myth-story-card:hover > .myth-card-kicker,
  .myth-story-card:hover > h3,
  .myth-story-card:hover > p,
  .myth-story-card:focus > .myth-card-kicker,
  .myth-story-card:focus > h3,
  .myth-story-card:focus > p {
    opacity: 0;
    transform: rotateY(-14deg) translateX(-10px);
  }

  .myth-story-card p {
    margin: 0;
    color: rgba(255,255,255,0.72);
    font-size: 0.96rem;
    line-height: 1.55;
  }

  .myth-story-card p strong {
    color: rgba(255,255,255,0.94);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .myth-card-back {
    position: absolute;
    inset: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: rotateY(14deg) translateX(10px);
    transition: opacity 0.24s ease, transform 0.28s ease;
    pointer-events: none;
  }

  .myth-story-card:hover .myth-card-back,
  .myth-story-card:focus .myth-card-back,
  .myth-story-card:focus-within .myth-card-back {
    opacity: 1;
    transform: rotateY(0) translateX(0);
  }

  .myth-card-back strong {
    display: block;
    margin-bottom: 16px;
    color: rgba(255,255,255,0.92);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .myth-card-back span {
    display: block;
    padding: 14px 16px;
    border: 1px solid rgba(255,210,74,0.22);
    border-left: 3px solid rgba(255,210,74,0.62);
    border-radius: 6px;
    background: rgba(255,255,255,0.035);
    color: rgba(255,255,255,0.82);
    font-size: 0.92rem;
    line-height: 1.48;
  }

  .myth-card-action {
    display: inline-flex;
    align-self: flex-start;
    margin-top: 22px;
    padding: 8px 10px;
    border: 1px solid rgba(255,210,74,0.32);
    border-radius: 4px;
    background: rgba(255,210,74,0.08);
  }

  .myth-theory-card .myth-card-action {
    margin-top: auto;
  }

  .myth-theory-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    margin: 24px 0 60px;
  }

  .myth-theory-card {
    display: flex;
    flex-direction: column;
    min-height: 250px;
    padding: 22px;
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 8px;
    background:
      radial-gradient(circle at top right, rgba(255,210,74,0.08), transparent 45%),
      #0b0a08;
    color: #fff;
    text-decoration: none;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  }

  .myth-theory-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255,210,74,0.62);
    background: #16130d;
  }

  .myth-theory-card h3 {
    margin: 18px 0 12px;
    color: #fff;
    font-family: var(--font-serif);
    font-size: 1.45rem;
    line-height: 1.12;
  }

  .myth-theory-card p {
    margin: 0;
    color: rgba(255,255,255,0.72);
    font-size: 0.94rem;
    line-height: 1.55;
  }

  @media (max-width: 1100px) {
    .myth-story-grid,
    .myth-theory-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (max-width: 620px) {
    .myth-story-grid,
    .myth-theory-grid {
      grid-template-columns: 1fr;
    }
  }

  /* modal card grids: 4-up inside the fullscreen modals */
  /* width:100% — the base .paths-grid margin:0 auto stops flex-stretch and
     collapses the grid to intrinsic width inside the flex-column modal */
  .fullscreen-modal .paths-grid { width: 100%; max-width: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
  @media (max-width: 900px) { .fullscreen-modal .paths-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 600px) { .fullscreen-modal .paths-grid { grid-template-columns: 1fr; } }

  /* overlay pinned to viewport so scrolled modal content stays covered */
  .fullscreen-modal .modal-overlay { position: fixed; inset: 0; }

  /* engine modal: header above the engine, scrollable, styled close */
  #global-engine-modal .engine-container { flex-direction: column; gap: 40px; width: 100%; max-width: 1000px; padding: 40px 20px; }
  #global-engine-modal .close-engine { position: fixed; top: 30px; right: 40px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: #fff; font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.1em; padding: 12px 24px; border-radius: 30px; cursor: pointer; z-index: 10; transition: background 0.3s, color 0.3s; }
  #global-engine-modal .close-engine:hover { background: var(--gold); color: #0b0a08; border-color: var(--gold); }
  /* own header classes — .mission-header belongs to the site hero banner and
     drags its ::before image along */
  #global-engine-modal .engine-header { text-align: center; }
  #global-engine-modal .engine-kicker { font-family: var(--font-mono); color: var(--gold); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.2em; font-weight: 800; display: inline-block; }
  #global-engine-modal .engine-header h2 { font-family: var(--font-serif); font-size: 3rem; margin: 10px 0; background: linear-gradient(180deg, #ffffff, #d8cfc0); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
  /* inline action engine inside level modals (from exp-action-engine.html) */
  .inline-engine { width: 100%; margin-top: 100px; }
  .inline-engine-header { text-align: center; margin-bottom: 60px; }
  .inline-engine-kicker { font-family: var(--font-mono); color: var(--gold); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.2em; font-weight: 800; display: inline-block; }
  .inline-engine-kicker::after { content: ''; display: block; width: 100%; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); margin-top: 8px; }
  .inline-engine-header h2 { font-family: var(--font-serif); font-size: 3rem; margin: 20px 0 10px; line-height: 1.1; background: linear-gradient(180deg, #ffffff, #d8cfc0); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
  .inline-engine-subtitle { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto; line-height: 1.6; }
  @media (max-width: 900px) { .inline-engine .action-engine { grid-template-columns: 1fr; gap: 40px; } .inline-engine .flow-connector { display: none; } }

  .exp-info-card {
    width: 100%;
    margin: 80px 0 20px;
    padding: 40px;
    border: 1px solid rgba(255,210,74,0.28);
    border-radius: 8px;
    background: #0b0a08;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  }
  .exp-info-kicker {
    display: block;
    margin-bottom: 14px;
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }
  .exp-info-card h3 {
    margin: 0 0 18px;
    color: #fff;
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.08;
  }
  .exp-info-card p {
    max-width: 880px;
    margin: 0 0 18px;
    color: rgba(255,255,255,0.72);
    font-size: 1rem;
    line-height: 1.65;
  }
  .exp-quote-panel {
    padding: 28px;
    border-left: 3px solid var(--gold);
    background: rgba(255,210,74,0.07);
    color: #fff;
    font-family: var(--font-serif);
    font-size: clamp(1.45rem, 3vw, 2.7rem);
    line-height: 1.15;
  }
  .exp-footnote {
    display: block;
    margin-top: 12px;
    color: rgba(255,255,255,0.62);
    font-family: var(--font-mono);
    font-size: 0.82rem;
  }
  .exp-table {
    width: 100%;
    border-collapse: collapse;
    color: rgba(255,255,255,0.82);
    font-size: 0.95rem;
  }
  .exp-table th {
    padding: 12px;
    border-bottom: 1px solid rgba(255,210,74,0.32);
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-align: left;
    text-transform: uppercase;
  }
  .exp-table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    vertical-align: top;
  }
  .exp-pill-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
  }
  .exp-pill {
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
  }
  .exp-pill strong {
    display: block;
    margin-bottom: 8px;
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  .exp-pill span {
    color: rgba(255,255,255,0.78);
    line-height: 1.5;
  }
  @media (max-width: 800px) {
    .exp-info-card { padding: 28px 20px; }
    .exp-pill-grid { grid-template-columns: 1fr; }
  }

  .level-one-motivation {
    display: grid;
    grid-template-columns: minmax(260px, 0.82fr) minmax(420px, 1.18fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
    width: 100%;
    margin: 10px 0 64px;
    padding: clamp(26px, 4vw, 44px);
    border: 1px solid rgba(255,210,74,0.26);
    border-radius: 8px;
    background:
      radial-gradient(circle at 76% 30%, rgba(255,210,74,0.14), transparent 30%),
      linear-gradient(135deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018));
    box-shadow: 0 22px 70px rgba(0,0,0,0.38);
  }
  .level-one-motivation-copy h3 {
    margin: 0 0 18px;
    color: #fff;
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.04;
  }
  .level-one-motivation-copy p {
    max-width: 520px;
    margin: 0;
    color: rgba(255,255,255,0.74);
    font-size: 1rem;
    line-height: 1.65;
  }
  .motivation-map {
    position: relative;
    min-height: 520px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    background:
      linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px),
      rgba(5,5,4,0.72);
    background-size: 42px 42px;
    overflow: hidden;
  }
  .map-ring {
    position: absolute;
    left: 50%;
    top: 49%;
    width: min(66%, 430px);
    aspect-ratio: 1;
    border: 1px solid rgba(255,210,74,0.44);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: inset 0 0 40px rgba(255,210,74,0.08), 0 0 40px rgba(255,210,74,0.08);
  }
  .map-axis {
    position: absolute;
    left: 50%;
    top: 49%;
    background: linear-gradient(90deg, transparent, rgba(255,210,74,0.36), transparent);
    transform: translate(-50%, -50%);
  }
  .map-axis-horizontal {
    width: 76%;
    height: 1px;
  }
  .map-axis-vertical {
    width: 1px;
    height: 72%;
    background: linear-gradient(180deg, transparent, rgba(255,210,74,0.32), transparent);
  }
  .map-node {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 116px;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid rgba(255,210,74,0.38);
    border-radius: 8px;
    background: rgba(11,10,8,0.9);
    color: rgba(255,255,255,0.9);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.25;
    text-align: center;
    text-transform: uppercase;
    box-shadow: 0 14px 32px rgba(0,0,0,0.34);
  }
  .map-center {
    left: 50%;
    top: 49%;
    min-width: 172px;
    min-height: 78px;
    border-color: var(--gold);
    background: linear-gradient(180deg, rgba(255,210,74,0.18), rgba(11,10,8,0.94));
    color: #fff;
    font-family: var(--font-serif);
    font-size: clamp(1.45rem, 3vw, 2.45rem);
    letter-spacing: 0;
    text-transform: none;
    transform: translate(-50%, -50%);
  }
  .map-good { left: 5%; top: 12%; }
  .map-questioning { left: 50%; top: 18%; transform: translateX(-50%); }
  .map-values { left: 50%; top: 66%; transform: translateX(-50%); }
  .map-experience { left: 6%; top: 50%; transform: translateY(-50%); }
  .map-data { right: 5%; top: 14%; }
  .map-service-left { left: 14%; bottom: 19%; }
  .map-service-right { right: 9%; top: 52%; transform: translateY(-50%); }
  .map-support { left: 50%; bottom: 10%; min-width: 236px; transform: translateX(-50%); }
  .map-foundation {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 20px;
    color: rgba(255,255,255,0.56);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.09em;
    line-height: 1.5;
    text-align: center;
    text-transform: uppercase;
  }
  .map-foundation span {
    color: rgba(255,210,74,0.72);
  }
  @media (max-width: 980px) {
    .level-one-motivation {
      grid-template-columns: 1fr;
    }
    .level-one-motivation-copy p {
      max-width: 760px;
    }
  }
  @media (max-width: 680px) {
    .motivation-map {
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px;
      min-height: 0;
      padding: 18px;
      background: rgba(5,5,4,0.72);
    }
    .map-ring,
    .map-axis {
      display: none;
    }
    .map-node,
    .map-center,
    .map-good,
    .map-questioning,
    .map-values,
    .map-experience,
    .map-data,
    .map-service-left,
    .map-service-right,
    .map-support,
    .map-foundation {
      position: static;
      width: 100%;
      min-width: 0;
      min-height: 0;
      transform: none;
    }
    .map-center {
      order: -1;
      min-height: 64px;
    }
    .map-foundation {
      margin-top: 8px;
    }
  }


/* Hint for clickability */
.myth-theory-card {
  position: relative;
}
.myth-theory-card::after {
  content: "Click to explore →";
  display: block;
  margin-top: 25px;
  font-family: 'Space Mono', monospace, var(--font-mono);
  font-size: 0.75rem;
  color: #FFD24A;
  opacity: 0.6;
  transition: opacity 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.myth-theory-card:hover::after {
  opacity: 1;
}

/* Ensure mobile layout for engine if needed globally */
@media (max-width: 800px) {
  .myth-grid {
    grid-template-columns: 1fr;
  }
}


/* Engine Cut Fixes for Mobile */
@media (max-width: 800px) {
  .inline-engine {
    padding: 40px 20px !important;
  }
  
  .back-engine {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
  
  /* Fix bounding box issues with rotated SVGs */
  .action-engine .flow-connector,
  .back-engine .engine-flow {
    transform: rotate(90deg);
    width: 100px !important;
    height: 100px !important;
    margin: 10px auto !important;
    overflow: visible;
  }
  
  .action-engine .flow-svg,
  .back-engine .engine-svg {
    width: 100px !important;
    height: 100px !important;
  }
  
  .glass-card {
    padding: 24px !important;
  }
}


/* Fix myth card back clipping */
.myth-card-back {
  overflow-y: auto !important;
  scrollbar-width: thin;
  padding-bottom: 20px;
}
.myth-card-back::-webkit-scrollbar {
  width: 4px;
}
.myth-card-back::-webkit-scrollbar-thumb {
  background: rgba(255, 210, 74, 0.5);
  border-radius: 4px;
}

/* Fix action engine upper clipping */
.action-engine {
  padding-top: 20px; /* Ensure top shadows/borders aren't clipped */
}

@media (max-width: 800px) {
  /* Let the SVG breathe so it's not cut off */
  .action-engine .flow-connector,
  .back-engine .engine-flow {
    width: 100% !important;
    height: auto !important;
    min-height: 100px;
  }
  
  .action-engine .flow-svg,
  .back-engine .engine-svg {
    width: 100px !important;
    height: 200px !important;
    max-width: 100%;
  }
}


/* Fix modal clipping for tall content */
#global-engine-modal,
[id^="global-engine-modal"] {
  align-items: flex-start !important;
  overflow-y: auto !important;
  padding-top: 60px !important;
  padding-bottom: 60px !important;
}
.modal-content-area {
  margin: 0 auto !important; /* ONLY horizontal center, fixes top-clipping scroll bug */
}

/* Mobile responsive timeline override */
@media (max-width: 800px) {
  .timeline-spine {
    left: 20px !important;
    transform: none !important;
  }
  
  .timeline-step {
    display: block !important;
    position: relative;
    padding-left: 60px !important;
    margin-bottom: 40px !important;
  }
  
  .t-number {
    left: 20px !important;
    top: 24px !important;
    transform: translateX(-50%) !important; 
  }
  
  .t-content {
    width: 100% !important;
    margin: 0 !important;
    padding: 24px !important;
  }
  
  /* Hide the horizontal connector lines on mobile */
  .t-content::after {
    display: none !important;
  }
  
  /* Override the even/odd text alignment */
  .timeline-step:nth-child(even) .t-content,
  .timeline-step:nth-child(odd) .t-content,
  .t-content {
    text-align: left !important;
  }
}
