

/* =========================================================
   SECTION 01 — GLOBAL RESET & BASE STYLING
   ========================================================= */

* { box-sizing: border-box; }

:root {
    /* Global palette */
    --cathedral-black: #0b0b0b;

    /* Layout */
    --label-width: 200px;
    --time-marker-offset: 0px;
    --show-diagonal-index: none;

    /* CATHEDRAL: time spine bounds/anchors (JS updates these) */
    --time-marker-top: 0px;
    --time-marker-left: calc(100% - var(--label-width) - 20px + var(--time-marker-offset));
    --now-label-age-top: 0px;

    /* UI system */
    --ui-radius: 10px;
    --ui-h: 34px;
    --ui-pad-x: 12px;
    --ui-bg: rgba(255, 255, 255, 0.06);
    --ui-bg-hover: rgba(255, 255, 255, 0.10);
    --ui-border: rgba(255, 255, 255, 0.22);
    --ui-border-hover: rgba(255, 255, 255, 0.36);
    --ui-accent: #d4af37;
}



html, body {
    margin: 0;
    width: 100%;
    height: 100%;
    background: var(--cathedral-black);
    color: #fff;
    font-family: Arial, sans-serif;

    /* CATHEDRAL LAW: NO SCROLLBARS (anything that exceeds viewport must be clipped) */
    overflow: hidden;
}



/* =========================================================
   SECTION 02.1 — TOP MENU BAR (PRIMARY CONTROL BEAM)
   ========================================================= */

#topMenu {
    width: 100%;
    min-width: 1200px;
    background: linear-gradient(#151515, #0f0f0f);
    border-bottom: 2px solid #333;
    padding: 10px 24px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;   /* ✅ centers the middle column vertically in the row */
    gap: 24px;

    /* CATHEDRAL: top controls must always be click-topmost */
    position: relative;
    z-index: 999;
}


.uiPill{
  height: var(--ui-h);
  padding: 0 var(--ui-pad-x);
  border-radius: var(--ui-radius);
  border: 1px solid var(--ui-border);
  background: var(--ui-bg);
  color: #fff;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  line-height: 1;
  white-space: nowrap;
  user-select: none;
}

/* Crisis button: arrows stay white, only the word "Crisis" changes */
#prevCrisisBtn, #nextCrisisBtn {
  color: #ffffff;
}

.crisisText {
  color: #ffffff;        /* default = white (no JS flash) */
  font-weight: 700;
  transition: color 120ms ease;
}

#prevCrisisBtn:hover .crisisText,
#nextCrisisBtn:hover .crisisText{
  color: #dc2626;        /* hover = red */
}



button.uiPill{ cursor: pointer; }

button.uiPill:hover{
  background: var(--ui-bg-hover);
  border-color: var(--ui-border-hover);
}

button.uiPill:active{
  transform: translateY(1px);
}

/* ---- TITLE BLOCK ---- */
#menuTitle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
	align-self: start;

}
#menuTitle .mainTitle {
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 0.5px;
}
#menuTitle .subTitle {
    font-size: 16px;
    opacity: 0.75;
}


/* ---- SLIDER BLOCK ---- *//* =========================================================
   CATHEDRAL — SLIDER & CONTROL ALTAR (RESTORED)
   ---------------------------------------------------------
   Law:
   • uiPill is the single control skin
   • REV/FWD are INLINE with nav buttons (no separate row)
   • Pause is translucent red/green via class toggle
   ========================================================= */

#menuSlider{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  align-self: center;
}

/* Header row */
#sliderHeaderRow{
  width: 100%;
  max-width: 800px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2px;
}

/* Status group: yrs/sec • DATE • Reset */
#topSliderRow{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* yrs/sec + date readout typography */
#speedInfo{
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  opacity: 0.95;
}

/* CATHEDRAL LAW: dateBoxText inherits uiPill shape; we only tint it by phase */
#menuSlider #dateBoxText {
    --phase-rgb: 255,255,255;

    background: rgba(var(--phase-rgb), 0.16);
    border: 1px solid rgba(var(--phase-rgb), 0.65);
    box-shadow: 0 0 14px rgba(var(--phase-rgb), 0.14);

    height: 34px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;

    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.08em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;

    /* CATHEDRAL: allow floating label without affecting layout */
    position: relative;
    overflow: visible;
}

/* CATHEDRAL: Period label ABOVE the date pill (absolute, zero layout impact) */
#menuSlider #dateBoxText::before{
    content: attr(data-turning);
    position: absolute;
    left: 50%;
    top: -7px;
    transform: translate(-50%, -100%);

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;

    color: rgb(var(--phase-rgb));
    text-shadow:
      0 1px 2px rgba(0,0,0,0.95),
      0 0 10px rgba(0,0,0,0.75);

    pointer-events: none;
    white-space: nowrap;
}




/* Reset accent */
#resetBtn{
  border-color: rgba(212,175,55,0.55);
}

#resetBtn:hover{
  background: rgba(212,175,55,0.18);
  border-color: rgba(212,175,55,0.80);
}

/* Slider rail */
.sliderRail{
  position: relative;
  width: 100%;
  max-width: 800px;
}

#speedSlider{ width: 100%; }

/* 0 mark behind slider */
.sliderZeroMark{
  position: absolute;
  left: calc(50% + 2px);
  top: 50%;
  width: 4px;
  height: 26px;
  background: white;
  opacity: 0.9;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border-radius: 2px;
}

/* REV/FWD + nav buttons — ONE LINE */
#controlBeamRow{
  width: 100%;
  max-width: 800px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;

  margin-top: 2px;
}

#controlBeamRow .dirTag{
  pointer-events: none;
}

/* Direction tags (small pill) */
.dirTag{
  height: 22px;
  padding: 0 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.92;
}

.dirTag.rev{
  background: rgba(220,38,38,0.16);
  border-color: rgba(220,38,38,0.55);
  color: rgba(255,210,210,0.95);
}

.dirTag.fwd{
  background: rgba(34,197,94,0.16);
  border-color: rgba(34,197,94,0.55);
  color: rgba(210,255,230,0.95);
}

/* Control Button Row */
#controlRow{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.controlBtn{
  font-size: 14px;
}

/* Pause button: translucent red when running, green when paused */
#pauseBtn{
  min-width: 86px; /* keeps Play/Pause same width */
  background: rgba(220,38,38,0.18);
  border-color: rgba(220,38,38,0.55);
}


#pauseBtn:hover{
  background: rgba(220,38,38,0.26);
  border-color: rgba(220,38,38,0.75);
}

#pauseBtn.paused{
  background: rgba(34,197,94,0.18);
  border-color: rgba(34,197,94,0.55);
}

#pauseBtn.paused:hover{
  background: rgba(34,197,94,0.26);
  border-color: rgba(34,197,94,0.75);
}



/* ---- CHECKBOX TOGGLES ---- */
#menuFuture {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;

    /* keep it visually “part of” the slider block */
    width: 100%;
    max-width: 800px;

    /* allow wrap if viewport gets tight */
    flex-wrap: wrap;

    padding-top: 6px;
    font-size: 14px;
    margin-right: 0;
}


/* ---- INPUT MENU PANEL (Date / Time / Location / GO) ---- */
#menuDate{
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-top: 6px;
  align-self: start;

  /* CATHEDRAL: match timeline right inset (topMenu is 24px, timeline is 20px) */
  transform: translateX(4px);
}

#dateBoxOuter{
  width: var(--label-width);    /* aligns left edge to NOW line */
  padding: 10px;
  border-radius: var(--ui-radius);
  border: 1px solid var(--ui-border);
  background: rgba(0,0,0,0.22);
  backdrop-filter: blur(4px);

  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;         /* makes children full width */
}

/* Uniform field styling */
#dateBoxInput,
#timeBoxInput,
#locationBoxInput{
  width: 100%;
  height: var(--ui-h);
  padding: 0 var(--ui-pad-x);
  border-radius: var(--ui-radius);
  border: 1px solid var(--ui-border);
  background: rgba(255,255,255,0.04);
  color: #fff;

  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

#dateBoxInput:focus,
#timeBoxInput:focus,
#locationBoxInput:focus{
  outline: none;
  border-color: rgba(212,175,55,0.70);
  box-shadow: 0 0 0 2px rgba(212,175,55,0.14);
}

#timeBoxInput:disabled,
#locationBoxInput:disabled{
  opacity: 0.60;
}

/* GO button: thin + full width at bottom */
.dateGoBtn{
  width: 100%;
  height: 24px;                 /* thin strip */
  padding: 0;
  border-radius: calc(var(--ui-radius) - 2px);

  background: rgba(212,175,55,0.14);
  border: 1px solid rgba(212,175,55,0.55);
  color: #fff;

  cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.18em;
  font-size: 12px;
  text-transform: uppercase;
}

.dateGoBtn:hover{
  background: rgba(212,175,55,0.22);
  border-color: rgba(212,175,55,0.80);
}


.dateGoBtn:hover {
    background: #333;
}

.zodiacGlyph {
    font-family: "Segoe UI Symbol", "Noto Sans Symbols", "Symbola", "Apple Symbols", "DejaVu Sans", sans-serif;
    font-weight: normal;
}

.elementGlyph{
    font-family: "Segoe UI Symbol", "Noto Sans Symbols", "Symbola", "Apple Symbols", "DejaVu Sans", sans-serif;
    font-weight: 700;

    /* CATHEDRAL: glyphs must NEVER steal clicks from their button */
    pointer-events: none;
}




/* =========================================================
   SECTION 04A — TIMELINE NAVE (TIME × AGE × ARCHETYPES)
   ---------------------------------------------------------
   This section establishes the canonical spatial relationship
   between:
   • Linear Time (horizontal scroll — screwSVG)
   • Generational Archetypes (fixed — labelSVG)
   ========================================================= */

#timelineWrap {
    width: 100%;
    padding: 0 20px;
    position: relative;
    height: 650px;     /* ⬅ MUST exceed screwSVG height */
    overflow: visible;
}

#screwSVG {
    width: calc(100% - 40px);
    height: var(--screw-svg-height, 100vh); /* fallback if var missing */
    min-height: 100vh;                      /* never shorter than screen */
    position: absolute;
    top: 0;                 /* 🔑 Canon owns the top pad now */
    left: 20px;
    z-index: 0;

    /* CATHEDRAL: do NOT let SVG steal clicks from the HUD */
    pointer-events: none;
}

/* CATHEDRAL: no SVG content may intercept UI clicks */
#screwSVG * { pointer-events: none !important; }


/* ---------------------------------------------------------
   ARCHETYPE LABELS — Fixed overlay
   --------------------------------------------------------- */
#labelSVG {
    position: absolute;
    top: 20px;
    right: 20px;
    height: 180px;

    /* authoritative width */
    width: var(--label-width);

    z-index: 2;
    overflow: hidden;
}


/* ---------------------------------------------------------
   TIME MARKER — GLOBAL TIME SPINE (confined to viz area)
   --------------------------------------------------------- */
#timeMarker{
  position: fixed;
  top: var(--time-marker-top);   /* CATHEDRAL: below top menu */
  bottom: 0;
  left: var(--time-marker-left);

  width: 0.5px;
  background: rgba(255,255,255,0.90);

  z-index: 5;
  pointer-events: none;
}

/* subtle “cap” so the line feels intentionally terminated */
#timeMarker::after{
  content:"";
  position:absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 2px;
  background: rgba(255,255,255,0.85);
}

/* ---------------------------------------------------------
   NOW LABEL — lives in the element/age band (not at viewport bottom)
   --------------------------------------------------------- */
#nowLabelAge{
  position: fixed;
  left: var(--time-marker-left);
  top: var(--now-label-age-top);
  transform: translate(-50%, -50%);

  /* CATHEDRAL: no pill — only readable text */
  padding: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;

  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;

  /* “black feather” */
  text-shadow:
    0 1px 2px rgba(0,0,0,0.95),
    0 0 6px rgba(0,0,0,0.95),
    0 0 14px rgba(0,0,0,0.80),
    0 0 24px rgba(0,0,0,0.55);

  z-index: 6;
  pointer-events: none;
}



/* ---------------------------------------------------------
   PHASE TICKS — 20-year ticks pointing INTO label box
   --------------------------------------------------------- */
#phaseTicks {
    position: absolute;
    top: 0;

    /* MUST align with timeMarker */
    right: 180px;

    height: 180px;
    width: 12px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    z-index: 3;
    pointer-events: none;
}

#diagonalIndex {
    display: var(--show-diagonal-index);
}


/* =========================================================
   SECTION 04A.1 — REFERENCE PANEL (OUTSIDE SCREW, SCROLL-TIED)
   ---------------------------------------------------------
   Visual scaffold only.
   • Not inside SVG (no clipping)
   • Moves horizontally with scrollX
   • Lives near / under astro wheel
   ========================================================= */

#referencePanel {
    position: absolute;

    top: 280px;
    left: 20px;
    right: 20px;

    height: 765px;
    overflow: hidden;

    /* 🔒 BLACK SCRIM — prevents bleed under astro wheel */
        background: var(--cathedral-black);

    /* =====================================================
       VERTICAL VEIL (FINAL POSITION)
       -----------------------------------------------------
       • Solid black to the left
       • Hard veil at 550px
       • 50px feather (550 → 600)
       ===================================================== */

    -webkit-mask-image: linear-gradient(
        to right,
        rgba(0,0,0,0) 0px,
        rgba(0,0,0,0) 550px,
        rgba(0,0,0,1) 600px
    );
    mask-image: linear-gradient(
        to right,
        rgba(0,0,0,0) 0px,
        rgba(0,0,0,0) 550px,
        rgba(0,0,0,1) 600px
    );

    pointer-events: none;
    z-index: 1;
}


#referenceImage {
    position: absolute;
    top: 0;
    left: 0;

    /* Preserve aspect ratio — NO SQUISH */
    height: 774px;
    width: auto;

    /* Lighter, clearer reference */
    opacity: 0.6;

    /* Slight lift without overpowering geometry */
    filter: brightness(1.08) contrast(1.05);

    /* Keep pixels clean during transforms */
    transform: translate3d(0,0,0);
    will-change: transform;

    /* DEBUG (remove when satisfied) */
    border: 2px solid red;
}

#referencePanel {
    z-index: 1;
}

#astroContainer {
    z-index: 2;
}

#labelSVG {
    z-index: 3;
}

/* =========================================================
   SECTION 05A — ASTRO SANCTUARY (OVERLAY MODE)
   ---------------------------------------------------------
   Visually anchored to timeline, not document flow
   ========================================================= */

#astroContainer {
    position: absolute;
    top: 260px;
    left: 00px;

    width: 600px;
    height: 600px;

    z-index: 1;
    pointer-events: auto;   /* allow HUD clicks */
}

/* canvas itself stays “non-interactive” */
#astroWheel {
    pointer-events: none;
}

/* ---------------------------------------------------------
   ASTRO HUD — centered date + planet toggles (inside wheel)
   --------------------------------------------------------- */

#astroHUD {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    z-index: 5;
    pointer-events: auto;
}

#astroDateText {
    border: none;            /* no border */
    background: transparent; /* no box */
    padding: 0;

    font-size: 26px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;

    text-shadow: 0 2px 6px rgba(0,0,0,0.75);
    white-space: nowrap;
}

#astroPlanetToggles {
    display: flex;
    gap: 8px;
}

/* smaller buttons inside wheel */
#astroPlanetToggles .toggleBtn {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;

    background-color: rgba(140, 0, 0, 0.35);   /* OFF = translucent red */
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    transition: background-color 0.15s ease, filter 0.15s ease;
}

#astroPlanetToggles .toggleBtn.active {
    background-color: rgba(0, 140, 0, 0.35);   /* ON = translucent green */
    border-color: rgba(140, 255, 140, 0.45);
}

#astroPlanetToggles .toggleBtn:hover {
    filter: brightness(1.15);
}


#astroWheel {
    width: 100%;
    height: 100%;
}



	