/*
 * Syncrota Interactive Wheel
 * Based on Syncrota source material associated with Universal Truth School / Santos Bonacci.
 * Interactive implementation © 2026 Imran Ali.
 * Syncrota / Universal Truth School source materials remain the property of their respective owner(s).
 * No ownership of third-party source material is claimed.
 */


/* Celestial symbol calibration. Negative = up, positive = down.
   Start from a neutral baseline. Per-symbol and per-context hooks remain here so
   any correction proven necessary on a real device can be made deliberately. */
:root{
 --wheel-hover-border:#3B82F6;
 --wheel-selected-border:#3B82F6;
 --wheel-hover-border-width:2;
 --wheel-selected-border-width:3;
 --planet-legend-weight:500;--planet-legend-venus-mars-weight:500;

 /* Global glyph calibration — applies everywhere unless a context overrides it. */
 --symbol-sun-y:0px;--symbol-moon-y:0px;--symbol-mercury-y:0px;--symbol-venus-y:0px;
 --symbol-mars-y:0px;--symbol-jupiter-y:0px;--symbol-saturn-y:0px;

 /* Context calibration — all neutral by default. */
 --planet-legend-symbol-y:0px;
 --details-symbol-y:0px;
 --terms-symbol-y:0px;
 --wheel-layer-symbol-y:0px;
 --tooltip-symbol-y:0px;
 --zodiac-inline-y:0px;
 --tooltip-zodiac-y:0px;

 font-family:Inter,Segoe UI,Arial,sans-serif;color:#1f2937;background:#f5f6f8
}
*{box-sizing:border-box} body{margin:0}
header{padding:14px 20px;background:#fff;border-bottom:1px solid #ddd;display:flex;gap:18px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.header-copy{display:flex;gap:18px;align-items:center;flex-wrap:wrap}
.header-brand{display:flex;gap:18px;align-items:center;flex-wrap:wrap}
.uts-brand{display:none}
.project-attribution{margin:10px 0 2px;padding:10px 2px 2px;border-top:1px solid #e5e7eb;color:#6b7280;font-size:10px;line-height:1.45}
.project-attribution-brand{margin-bottom:3px;color:#374151;font-size:11px;font-weight:800;letter-spacing:.12em}
.project-attribution-small{margin-top:3px;font-size:9px}
header h1{margin:0;font-size:20px} header span{font-size:13px;color:#6b7280}
.theme-switcher{display:inline-flex;align-items:center;gap:2px;padding:2px;border:1px solid #d1d5db;border-radius:9px;background:#f3f4f6}
.theme-switcher button{border:0;border-radius:6px;background:transparent;color:#4b5563;padding:5px 8px;font:600 10px/1.2 Inter,Segoe UI,Arial,sans-serif;cursor:pointer}
.theme-switcher button[aria-pressed="true"]{background:#fff;color:#111827;box-shadow:0 1px 3px rgba(0,0,0,.14)}
main{display:grid;grid-template-columns:minmax(720px,1fr) 400px;height:calc(100vh - 58px);min-height:0;overflow:hidden}
#wheelWrap{position:relative;height:100%;min-height:0;overflow:hidden;background:#fafafa}
#wheel{width:100%;height:100%;min-height:0;display:block;cursor:grab;touch-action:none} #wheel:active{cursor:grabbing}
.panel{background:#fff;border-left:1px solid #ddd;padding:11px 12px;height:100%;min-height:0;overflow:auto}
.panel h2{margin:0 0 2px;font-size:18px}.sub{font-size:11px;color:#6b7280;margin-bottom:6px}#details{margin-bottom:8px}
.card{border:1px solid #e1e4e8;border-radius:8px;padding:8px 9px;margin:6px 0;font-size:12px;line-height:1.3}.card h3{font-size:10px;text-transform:uppercase;letter-spacing:.04em;color:#6b7280;margin:0 0 5px}
.value{font-size:14px;font-weight:600}.small{font-size:10px;color:#6b7280}
.chips{display:flex;gap:4px;flex-wrap:wrap}.chip{border:1px solid #d1d5db;border-radius:999px;padding:2px 6px;background:#fafafa;font-size:10px}
#breadcrumb{position:absolute;left:14px;top:14px;z-index:2;background:rgba(255,255,255,.95);border:1px solid #ddd;border-radius:8px;padding:8px 10px;font-size:12px}
#hint{position:static;background:#f8fafc;border:1px solid #e1e4e8;border-radius:7px;padding:6px 8px;margin:0 0 7px;font-size:10px;line-height:1.3;color:#555}
.arc{stroke:#fff;stroke-width:1;cursor:pointer}.arc:hover{filter:brightness(.95)}.arc.selected{stroke:#fff;stroke-width:1}
.signArc{stroke:#fff;stroke-width:2;cursor:pointer}.signArc:hover{filter:brightness(.95)}
.label{pointer-events:none;text-anchor:middle;dominant-baseline:middle;fill:#222}
.signLabel{font-size:24px;font-weight:700}.ringLabel{font-size:9px}.degreeLabel{font-size:8px}
.centerTitle{font-weight:700;text-anchor:middle}.centerSub{font-size:11px;fill:#666;text-anchor:middle}
.placeholder{fill:#f3f4f6}
/* Responsive layout: desktop keeps the existing two-pane view; compact devices use a wheel-first mobile sheet. */
.panel-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
#closeDetailsBtn{display:none;border:0;background:transparent;color:#374151;font-size:30px;line-height:1;padding:0 2px;cursor:pointer}
#legendInfoBtn{display:none;position:absolute;right:8px;top:8px;z-index:4;border:1px solid #cfd4dc;border-radius:8px;background:#2563eb;color:#fff;padding:6px 9px;font:600 10px/1.2 Inter,Segoe UI,Arial,sans-serif;box-shadow:0 2px 8px rgba(0,0,0,.16);cursor:pointer}
#resetWheelBtn{position:absolute;left:8px;bottom:8px;z-index:4;border:1px solid #cfd4dc;border-radius:8px;background:rgba(255,255,255,.95);color:#374151;padding:6px 9px;font:600 10px/1.2 Inter,Segoe UI,Arial,sans-serif;box-shadow:0 2px 8px rgba(0,0,0,.12);cursor:pointer}

@media(max-width:900px){
 body{height:100dvh;min-height:100dvh;display:flex;flex-direction:column;overflow:hidden;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
 header{flex:0 0 auto;padding:9px 12px;gap:6px 10px;flex-wrap:nowrap}
 .header-copy{min-width:0;gap:6px 12px}
 .header-brand{min-width:0;gap:6px 12px}
 header h1{font-size:17px;white-space:nowrap}
 header span{font-size:11px}
 .theme-switcher{flex:none}
 .theme-switcher button{padding:4px 6px;font-size:9px}
 main{display:block;flex:1 1 auto;width:100%;height:auto;min-height:0;overflow:hidden}
 #wheelWrap{width:100%;height:100%;min-height:0;overflow:hidden}
 #wheel{width:100%;height:100%;min-height:0}
 #breadcrumb{left:8px;top:8px;max-width:calc(100% - 118px);padding:6px 8px;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 #legendInfoBtn{display:block}
 .panel{position:fixed;left:0;right:0;bottom:0;z-index:5000;height:auto;max-height:62dvh;min-height:0;overflow:auto;border-left:0;border-top:1px solid #cfd4dc;border-radius:16px 16px 0 0;padding:10px 12px calc(14px + env(safe-area-inset-bottom));box-shadow:0 -10px 32px rgba(0,0,0,.22);transform:translateY(calc(100% + 24px));transition:transform .22s ease;background:#fff;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
 .panel.mobile-open{transform:translateY(0)}
 .panel-title-row{position:sticky;top:-10px;z-index:2;margin:-10px -12px 0;padding:10px 12px 5px;background:#fff;border-radius:16px 16px 0 0}
 #closeDetailsBtn{display:block;flex:0 0 auto;min-width:36px;min-height:36px;margin:-4px -2px 0 0}
 .panel h2{font-size:17px;padding-top:2px}
 .sub{font-size:11px;margin-bottom:5px}
 #details{margin-bottom:6px}
 #hint{font-size:10px}
 .card{font-size:12px}

}

@media(max-width:520px){
 .panel{max-height:66dvh}
 header span{display:none}
 .detail-grid{grid-template-columns:1fr}
 .detail-grid .wide{grid-column:auto}
}

@media(max-width:900px) and (orientation:landscape){
 header{padding-top:6px;padding-bottom:6px}
 .panel{top:0;bottom:0;left:auto;width:min(460px,48vw);height:100dvh;max-height:none;border-radius:16px 0 0 16px;border-left:1px solid #cfd4dc;border-top:0;transform:translateX(calc(100% + 24px));transition:transform .22s ease}
 .panel.mobile-open{transform:translateX(0)}
 .panel-title-row{border-radius:16px 0 0 0}
}

@media(min-width:901px) and (max-width:1100px){
 main{grid-template-columns:minmax(0,1fr) 360px}
 .panel .zodiac-legend .zodiac-grid>div>span:first-child{font-size:21px}
 .panel .zodiac-badge .zodiac-glyph{font-size:21px!important}
 #details .info-value>span[style*="Segoe UI Symbol"]{font-size:21px!important}
}




.calibration-panel{background:#161b22;color:#f0f3f6;border:1px solid #3b4657;border-radius:8px;padding:7px 9px;margin:7px 0;font-size:10px;line-height:1.3;box-sizing:border-box}
.calibration-panel b{display:block;margin-bottom:3px;color:#fff}.calibration-panel .small{color:#c9d1d9}.calibration-panel .cal-row{color:#f0f3f6}
.cal-row{display:flex;align-items:center;gap:5px;margin:2px 0}
.cal-dot{width:8px;height:8px;border-radius:50%;display:inline-block;flex:0 0 auto}
.cal-ok{background:#63c174}.cal-working{background:#d8aa45}.cal-pending{background:#9aa4b2}
.arc-pending{stroke-dasharray:2.5 2.5!important;opacity:.58}
.arc-working{stroke-dasharray:5 2!important}
.zodiac-grid{display:grid;grid-template-columns:1fr 1fr;column-gap:10px;row-gap:3px;font-size:10px}
.zodiac-grid div{display:flex;align-items:center;gap:7px}
.zodiac-grid span{font-size:16px;line-height:1;width:19px;text-align:center}

/* Zodiac sign rows have their own spacing, independent from the planet legend. */
.zodiac-legend .zodiac-grid:not(.celestial-grid){row-gap:3px}
@media(max-width:900px){
 .zodiac-legend .zodiac-grid:not(.celestial-grid){row-gap:7px}
 .zodiac-legend .zodiac-grid:not(.celestial-grid)>div{min-height:0}
}

/* Shared planet badge box. Geometry lives in CSS; JavaScript supplies semantics only. */
.celestial-badge{
 --symbol-y-base:0px;--symbol-y-context:0px;
 display:inline-flex;align-items:center;justify-content:center;
 width:25px;min-width:25px;max-width:25px;height:22px;padding:0;
 box-sizing:border-box;border:1px solid rgba(0,0,0,.38);border-radius:5px;
 font-family:"Segoe UI Symbol","Noto Sans Symbols 2","Arial Unicode MS",sans-serif;
 font-size:18px;font-weight:900;line-height:1;color:#000;text-shadow:0 0 .35px #000
}
.celestial-badge .celestial-glyph{
 display:inline-flex;align-items:center;justify-content:center;
 width:100%!important;height:100%;font-size:inherit!important;line-height:1;
 transform:translateY(calc(var(--symbol-y-base) + var(--symbol-y-context)))
}
.celestial-sun{--symbol-y-base:var(--symbol-sun-y);background:#FFD31A}
.celestial-moon{--symbol-y-base:var(--symbol-moon-y);background:#22B5D4}
.celestial-mercury{--symbol-y-base:var(--symbol-mercury-y);background:#F47A55}
.celestial-venus{--symbol-y-base:var(--symbol-venus-y);background:#3DB84A}
.celestial-mars{--symbol-y-base:var(--symbol-mars-y);background:#D92F55}
.celestial-jupiter{--symbol-y-base:var(--symbol-jupiter-y);background:#3F69B1}
.celestial-saturn{--symbol-y-base:var(--symbol-saturn-y);background:#73508D}
.zodiac-inline-symbol{display:inline-block;font-family:"Segoe UI Symbol","Noto Sans Symbols 2","Arial Unicode MS",sans-serif;font-size:18px;font-weight:700;line-height:1;transform:translateY(var(--zodiac-inline-y))}

/* Context hooks. Keep these neutral until a genuine context-specific correction is required. */
.planet-symbol-legend .celestial-badge{--symbol-y-context:var(--planet-legend-symbol-y);font-size:17px;font-weight:var(--planet-legend-weight)}
.planet-symbol-legend .celestial-venus,.planet-symbol-legend .celestial-mars{font-size:19px;font-weight:var(--planet-legend-venus-mars-weight)}
#details .celestial-badge{--symbol-y-context:var(--details-symbol-y)}
#details .terms-info .celestial-badge{--symbol-y-context:var(--terms-symbol-y)}


/* Info-pane / tooltip layout.
   Tooltip symbols use their own classes so shared Zodiac/planet badge rules cannot override them. */
#wheelTooltip{position:fixed;z-index:9999;display:none;max-width:380px;padding:8px 10px;border-radius:7px;background:#111820;color:#fff;border:1px solid #4a5568;font-size:12px;line-height:1.4;pointer-events:none;box-shadow:0 4px 14px rgba(0,0,0,.28);white-space:normal}
.degree-tooltip{display:grid;gap:5px}
.degree-tooltip-title{font-size:14px;font-weight:800;line-height:1.2;color:#fff;padding-bottom:5px;border-bottom:1px solid rgba(255,255,255,.18)}
.degree-tooltip-primary{display:grid;gap:2px;margin:2px 0 3px;padding:6px 7px;border-radius:5px;background:rgba(255,255,255,.08);line-height:1.35}
.degree-tooltip-row{display:grid;grid-template-columns:105px minmax(0,1fr);gap:8px;align-items:start}
.degree-tooltip-label{color:#93c5fd;font-weight:700}
.degree-tooltip-value{color:#f8fafc;font-weight:400}
.degree-tooltip-medical{color:#fde68a;font-weight:600;line-height:1.4}
.degree-tooltip-celestial,.degree-tooltip-term{display:inline-flex;align-items:center;gap:5px;min-width:0}
.degree-tooltip-terms{display:flex;align-items:center;flex-wrap:wrap;gap:4px 6px}
.degree-tooltip-term-name{color:#cbd5e1}
.degree-tooltip-term-separator{color:#64748b}

/* Structured tooltip shared by all wheel layers except the enhanced outer-degree tooltip. */
.layer-tooltip{display:grid;gap:8px}
.layer-tooltip-title{font-size:14px;font-weight:800;line-height:1.2;color:#fff;padding-bottom:6px;margin-bottom:1px;border-bottom:1px solid rgba(255,255,255,.18)}
.layer-tooltip-row{display:grid;grid-template-columns:92px minmax(0,1fr);column-gap:10px;align-items:center}
.layer-tooltip-label{color:#93c5fd;font-weight:700}
.layer-tooltip-value{color:#f8fafc;font-weight:400}
.layer-tooltip-symbol-value{display:inline-flex;align-items:center;gap:6px;min-width:0}

/* Tooltip-only Zodiac symbols — larger and purple, including title + Dodecatemoria. */
#wheelTooltip .tooltip-zodiac-symbol{
 display:inline-block;
 font-family:"Segoe UI Symbol","Noto Sans Symbols 2","Arial Unicode MS",sans-serif;
 font-size:21px;
 font-weight:700;
 line-height:1;
 color:#a78bfa;
 transform:translateY(var(--tooltip-zodiac-y));
 margin-right:2px
}

/* Tooltip-only planet badges — intentionally independent of .celestial-badge. */
#wheelTooltip .tooltip-planet-badge{
 display:inline-flex;
 align-items:center;
 justify-content:center;
 flex:0 0 16px;
 width:16px;
 height:16px;
 min-width:16px;
 min-height:16px;
 max-width:16px;
 max-height:16px;
 padding:0;
 margin:0;
 box-sizing:border-box;
 border:1px solid rgba(0,0,0,.38);
 border-radius:4px;
 color:#000;
 font-family:"Segoe UI Symbol","Noto Sans Symbols 2","Arial Unicode MS",sans-serif;
 font-size:11px;
 font-weight:600;
 line-height:1;
 text-shadow:0 0 .35px #000;
 vertical-align:middle
}
#wheelTooltip .tooltip-planet-glyph{
 display:inline-flex;
 align-items:center;
 justify-content:center;
 width:100%;
 height:100%;
 font-size:11px;
 line-height:1;
 transform:translateY(calc(var(--symbol-y-base,0px) + var(--tooltip-symbol-y)))
}
#wheelTooltip .tooltip-planet-sun{--symbol-y-base:var(--symbol-sun-y);background:#FFD31A}
#wheelTooltip .tooltip-planet-moon{--symbol-y-base:var(--symbol-moon-y);background:#22B5D4}
#wheelTooltip .tooltip-planet-mercury{--symbol-y-base:var(--symbol-mercury-y);background:#F47A55}
#wheelTooltip .tooltip-planet-venus{--symbol-y-base:var(--symbol-venus-y);background:#3DB84A}
#wheelTooltip .tooltip-planet-mars{--symbol-y-base:var(--symbol-mars-y);background:#D92F55}
#wheelTooltip .tooltip-planet-jupiter{--symbol-y-base:var(--symbol-jupiter-y);background:#3F69B1}
#wheelTooltip .tooltip-planet-saturn{--symbol-y-base:var(--symbol-saturn-y);background:#73508D}
#wheelTooltip .tooltip-planet-venus .tooltip-planet-glyph,
#wheelTooltip .tooltip-planet-mars .tooltip-planet-glyph{font-size:12px}

#wheelTooltip.show{display:block}
@media(max-width:700px){#wheelTooltip{font-size:13px;max-width:78vw;padding:9px 11px}}

.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:3px 12px;align-items:start}
.detail-grid>div{min-width:0}
.detail-grid .wide{grid-column:1/-1}

.info-table{
 display:grid;
 grid-template-columns:minmax(105px,40%) minmax(0,1fr);
 gap:5px 10px;
 align-items:start
}
.info-table .info-label{font-weight:700;min-width:0}
.info-table .info-value{min-width:0;overflow-wrap:anywhere}
.condition-rings-legend .info-table{grid-template-columns:minmax(0,15fr) minmax(0,85fr);}

.layer-order{display:grid;gap:3px}
.layer-order-row{
 display:grid;
 grid-template-columns:22px minmax(105px,1.05fr) minmax(125px,1fr);
 gap:7px;
 align-items:center;
 padding:4px 5px;
 border:1px solid #e5e7eb;
 border-radius:5px;
 background:#fafafa
}
.layer-order-row.layer-order-header{font-weight:700;background:#f3f4f6}
.layer-order-index{font-size:9px;color:#6b7280;text-align:center}
.layer-order-name{font-size:10px;line-height:1.2}
.layer-order-example{font-size:10px;line-height:1.2;min-width:0}

/* Wheel Layer legend has fixed badge/glyph geometry and no inherited glyph transform/stroke. */
.wheel-layer-legend{
 --wheel-symbol-badge-width:22px;
 --wheel-symbol-badge-height:24px;
 --wheel-symbol-font-size:16px;

}
.wheel-layer-legend .layer-order-example .celestial-badge,
.wheel-layer-legend .layer-order-example .zodiac-badge{
 display:inline-flex;align-items:center;justify-content:center;
 width:var(--wheel-symbol-badge-width);min-width:var(--wheel-symbol-badge-width);max-width:var(--wheel-symbol-badge-width);
 height:var(--wheel-symbol-badge-height);min-height:var(--wheel-symbol-badge-height);max-height:var(--wheel-symbol-badge-height);
 padding:0;margin:0;box-sizing:border-box;border-radius:5px;vertical-align:middle;flex:none
}
.wheel-layer-legend .layer-order-example .celestial-badge .celestial-glyph,
.wheel-layer-legend .layer-order-example .zodiac-badge .zodiac-glyph{
 display:inline-flex;align-items:center;justify-content:center;
 width:100%!important;height:100%!important;
 font-size:21px!important;
 font-weight:700;line-height:1!important;text-align:center;
 -webkit-text-stroke:0!important;
 text-shadow:none
}
/* Wheel-layer legend uses the same calibration pipeline as every other HTML badge. */
.wheel-layer-legend .layer-order-example .celestial-badge{--symbol-y-context:var(--wheel-layer-symbol-y)}
.layer-badge{display:inline-flex;align-items:center;justify-content:center;min-height:22px;min-width:25px;max-width:100%;padding:2px 6px;border:1px solid rgba(0,0,0,.28);border-radius:5px;box-sizing:border-box;font-weight:700;line-height:1.05;text-align:center}
.wheel-layer-legend .terms-badge{width:28px;height:24px;min-width:28px;min-height:24px;padding:0}
.layer-example-note{display:block;margin-top:3px;font-size:var(--fs-legend-note,9px);color:#6b7280;line-height:1.2}
@media(max-width:520px){.layer-order-row{grid-template-columns:20px minmax(92px,.9fr) minmax(110px,1.1fr);gap:5px}.layer-order-name,.layer-order-example{font-size:9px}}

@media(max-width:430px){.detail-grid{grid-template-columns:1fr}}

/* Collapsible common guide / legend sections.
   Selected-segment data cards are intentionally not collapsible. */
.common-collapsible>.common-section-toggle{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:8px;
 width:100%;
 margin:0;
 padding:0;
 border:0;
 background:transparent;
 color:inherit;
 font:inherit;
 text-align:left;
 cursor:pointer
}
.common-collapsible>.common-section-toggle .common-section-title{
 font-size:inherit;
 font-weight:700;
 line-height:1.2
}
.common-collapsible>.common-section-toggle .common-section-chevron{
 flex:none;
 font-size:12px;
 line-height:1;
 color:#6b7280;
 transition:transform .15s ease
}
.common-collapsible.is-collapsed>.common-section-toggle .common-section-chevron{transform:rotate(-90deg)}
.common-collapsible>.common-section-content{margin-top:7px}
.common-collapsible.is-collapsed>.common-section-content{display:none}
.common-collapsible.calibration-panel>.common-section-toggle{font-weight:700}


/* Primary info-pane sections: Detailed, Overview and Legends share the same visual hierarchy. */
.info-pane-section{border:1px solid #d7dce2;border-radius:8px;padding:8px 9px;margin:6px 0 8px;background:#fff;font-size:12px;line-height:1.3;box-sizing:border-box}
.info-pane-section>.common-section-toggle{margin:0;align-items:flex-start}
.info-pane-section>.common-section-toggle .common-section-heading{display:grid;gap:2px;min-width:0}
.info-pane-section>.common-section-toggle .common-section-title{font-size:16px;font-weight:700;line-height:1.15}
.info-pane-section>.common-section-toggle .common-section-subtitle{font-size:11px;font-weight:500;line-height:1.25;color:#6b7280}
.info-pane-section>.common-section-toggle .common-section-chevron{margin-top:3px}
.info-pane-section>.common-section-content{margin-top:7px}
.info-pane-section>.common-section-content>.card:first-child{margin-top:0}
.info-pane-section>.common-section-content>.card:last-child{margin-bottom:0}
.info-pane-section>.common-section-content>.calibration-panel:last-child{margin-bottom:0}

/* Detailed remains dynamic; Legends wraps the static reference legends. */
.dynamic-info-section,.legends-section{background:#fff}
