/* Shared site chrome: header, footer, cookie banner, legal pages.
 * The chrome (header/footer/cookie) uses FIXED brand values so it looks IDENTICAL
 * on every page (immune to the /chart theme switcher). Legal pages use var fallbacks. */
:root{
  --bg:#04050e; --gold:#e8c468; --text:#e9eaf6; --muted:#8b93b8;
  --line:rgba(150,160,220,.16);
  --f-display:"Cinzel",serif; --f-body:"EB Garamond",serif; --f-ui:"Inter",system-ui,sans-serif;
}

/* ---- header (fixed brand look) ---- */
.site-header{position:sticky; top:0; z-index:50; background:rgba(8,9,18,.72); backdrop-filter:blur(12px);
  border-bottom:1px solid rgba(150,160,220,.16); font-family:"Inter",system-ui,sans-serif;}
.site-header .sh-inner{max-width:1100px; margin:0 auto; padding:14px 24px; display:flex; align-items:center; justify-content:space-between;}
.site-header .sh-logo{font-family:"Cinzel",serif; letter-spacing:.14em; font-size:14px; color:#e9eaf6; text-decoration:none;}
.site-header .sh-logo b{color:#e8c468; font-weight:600;}
.site-header nav{display:flex; align-items:center; gap:18px;}
.site-header nav a{font-size:13px; color:#8b93b8; letter-spacing:.04em; text-decoration:none; transition:color .15s; margin:0;}
.site-header nav a:hover{color:#e9eaf6;}
.site-header nav a.cta{padding:8px 16px; border-radius:999px; border:1px solid rgba(150,160,220,.16); color:#e8c468; margin:0; display:inline-block;}
.site-header nav a.cta:hover{border-color:rgba(232,196,104,.5);}
.site-header nav .soon{font-size:13px; color:#6b7298; letter-spacing:.04em; cursor:default;}
.site-header nav .m-item{position:relative;}
.site-header nav .m-item::after{content:''; position:absolute; top:100%; left:0; right:0; height:12px;}
.site-header nav .m-link{font-size:13px; color:#8b93b8; letter-spacing:.04em; cursor:pointer; display:inline-flex; align-items:center; gap:5px; text-decoration:none;}
.site-header nav .m-item:hover .m-link{color:#e9eaf6;}
.site-header nav .m-caret{font-style:normal; font-size:9px; opacity:.7;}
.site-header nav .m-sub{position:absolute; top:calc(100% + 10px); left:0; min-width:190px; background:rgba(14,16,30,.98);
  border:1px solid rgba(150,160,220,.18); border-radius:12px; padding:8px; display:none; flex-direction:column; gap:2px; box-shadow:0 14px 36px rgba(0,0,0,.5);}
.site-header nav .m-item:hover .m-sub{display:flex;}
.site-header nav .m-sub a, .site-header nav .m-sub .soon{display:block; padding:8px 11px; border-radius:8px; font-size:13px; color:#aeb4d0; margin:0; letter-spacing:.02em;}
.site-header nav .m-sub a:hover{background:rgba(255,255,255,.05); color:#e8c468;}
/* ---- mobile hamburger + drawer ---- */
.site-header .sh-burger{display:none; flex-direction:column; gap:5px; width:38px; height:38px; padding:9px; background:none; border:0; cursor:pointer; align-items:center; justify-content:center;}
.site-header .sh-burger span{display:block; width:20px; height:2px; background:#e9eaf6; border-radius:2px; transition:transform .25s, opacity .2s;}
body.menu-open .sh-burger span:nth-child(1){transform:translateY(7px) rotate(45deg);}
body.menu-open .sh-burger span:nth-child(2){opacity:0;}
body.menu-open .sh-burger span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}
.sh-scrim{position:fixed; inset:0; z-index:55; background:rgba(2,3,8,.6); backdrop-filter:blur(2px); opacity:0; visibility:hidden; transition:opacity .25s, visibility .25s;}
body.menu-open .sh-scrim{opacity:1; visibility:visible;}
.sh-drawer{position:fixed; top:0; right:0; bottom:0; z-index:56; width:min(82vw,320px); background:rgba(10,12,24,.98);
  border-left:1px solid rgba(150,160,220,.18); padding:78px 22px 28px; transform:translateX(100%);
  transition:transform .28s cubic-bezier(.4,0,.2,1); overflow-y:auto; font-family:"Inter",system-ui,sans-serif;}
body.menu-open .sh-drawer{transform:translateX(0);}
body.menu-open{overflow:hidden;} /* scroll-lock behind the open drawer */
.sh-drawer nav{display:flex; flex-direction:column; align-items:stretch; gap:0;}
.sh-drawer nav a, .sh-drawer nav .m-link, .sh-drawer nav .soon{display:block; padding:9px 10px; font-size:14.5px; color:#c3c7e0; text-decoration:none; letter-spacing:.03em;}
.sh-drawer nav a:hover{background:rgba(255,255,255,.05); color:#e8c468;}
.sh-drawer nav .soon{color:#6b7298;}
.sh-drawer nav .m-item .m-link{font-weight:500; color:#e9eaf6;}
/* horizontal divider under EVERY entry (top-level and sub) */
.sh-drawer nav a:not(.cta), .sh-drawer nav .soon, .sh-drawer nav .m-link{border-bottom:1px solid rgba(150,160,220,.12);}
.sh-drawer nav .m-item{position:static;}
/* sub-menu: indent + bullet on each child, NO vertical line */
.sh-drawer nav .m-sub{position:static; display:flex; flex-direction:column; min-width:0; margin:0; padding:0; background:none; border:0; box-shadow:none;}
.sh-drawer nav .m-subitem{font-size:13.5px; color:#aeb4d0; padding:8px 10px 8px 24px; position:relative;}
.sh-drawer nav .m-subitem::before{content:''; position:absolute; left:10px; top:50%; width:5px; height:5px; margin-top:-2.5px; border-radius:50%; background:rgba(174,180,208,.6);}
.sh-drawer nav a.m-subitem:hover::before{background:#e8c468;}
.sh-drawer nav a.cta{color:#e8c468; border:1px solid rgba(232,196,104,.4); border-radius:8px; text-align:center; margin-top:14px;}
.sh-drawer nav .m-caret{display:none;}
@media(max-width:760px){
  .site-header nav#site-nav{display:none;}
  .site-header .sh-burger{display:flex;}
}

/* ---- footer (fixed brand look) ---- */
.site-footer{border-top:1px solid rgba(150,160,220,.16); padding:36px 24px 28px; margin-top:64px;
  background:rgba(6,7,14,.5); font-family:"Inter",system-ui,sans-serif;}
.site-footer .sf-wrap{max-width:1000px; margin:0 auto; display:flex; flex-wrap:wrap; gap:18px 40px; justify-content:space-between; align-items:flex-start;}
.site-footer .sf-brand{font-family:"Cinzel",serif; letter-spacing:.12em; font-size:14px; color:#e9eaf6;}
.site-footer .sf-brand b{color:#e8c468;}
.site-footer .sf-brand small{display:block; font-family:"EB Garamond",serif; font-style:italic; color:#8b93b8; font-size:13px; margin-top:6px; letter-spacing:0;}
.site-footer nav{display:flex; flex-wrap:wrap; gap:8px 20px;}
.site-footer nav a{font-size:13px; color:#8b93b8; text-decoration:none;}
.site-footer nav a:hover{color:#e8c468;}
.site-footer .sf-copy{width:100%; text-align:center; margin-top:24px; color:#8b93b8; font-size:11.5px; letter-spacing:.04em; opacity:.8;}

/* ---- cookie banner ---- */
.cookie-bar{position:fixed; left:50%; bottom:18px; transform:translateX(-50%); z-index:54; /* below drawer(56)/scrim(55) */
  width:calc(100% - 36px); max-width:720px; background:rgba(14,16,30,.97); border:1px solid rgba(150,160,220,.2);
  border-radius:14px; padding:16px 18px; display:flex; gap:16px; align-items:center; flex-wrap:wrap;
  box-shadow:0 12px 40px rgba(0,0,0,.5); font-family:"Inter",system-ui,sans-serif;}
.cookie-bar p{margin:0; flex:1; min-width:220px; font-size:13px; color:#c3c7e0; line-height:1.5;}
.cookie-bar p a{color:#e8c468;}
.cookie-bar .ck-btns{display:flex; gap:10px;}
.cookie-bar button{font-family:"Cinzel",serif; letter-spacing:.06em; font-size:12px; padding:9px 16px; border-radius:999px; cursor:pointer; border:1px solid rgba(150,160,220,.16);}
.cookie-bar .ck-ok{background:linear-gradient(135deg,#f0d488,#e8c468); color:#1a1606; border:none;}
.cookie-bar .ck-no{background:none; color:#e9eaf6;}

/* ---- legal pages ---- */
.legal{max-width:760px; margin:0 auto; padding:48px 24px 10px;}
.legal h1{font-family:var(--f-display); font-weight:600; font-size:clamp(26px,5vw,36px); color:var(--text); margin:0 0 8px;}
.legal .updated{color:var(--muted); font-size:13px;}
.legal .draft{display:inline-block; font-size:11.5px; color:var(--gold); border:1px solid rgba(232,196,104,.3); border-radius:999px; padding:3px 10px; margin:14px 0 8px;}
.legal h2{font-family:var(--f-display); font-weight:500; font-size:18px; color:var(--gold); margin:30px 0 10px; letter-spacing:.03em;}
.legal p,.legal li{font-family:var(--f-body); font-size:17px; line-height:1.65; color:#d2d5e6;}
.legal ul{padding-left:20px;} .legal li{margin-bottom:6px;}
.legal a{color:var(--gold);} .legal strong{color:var(--text);}

/* language switcher (header + mobile drawer) */
.sh-lang{margin-left:14px; font-size:11px; letter-spacing:.12em; color:var(--muted, #9a9aae); white-space:nowrap;}
.sh-lang a{color:inherit; text-decoration:none; opacity:.75;}
.sh-lang a:hover{opacity:1; color:var(--gold, #e8c468);}
.sh-lang b{color:var(--gold, #e8c468); font-weight:600;}
.sh-drawer .sh-lang{display:block; margin:18px 0 0; padding:0 4px;}

/* embedded mode (html.ak-embed, set by i18n.js on ?embed=1): the host page provides header, footer and cookie notice */
html.ak-embed .site-header,html.ak-embed .site-footer,html.ak-embed .cookie-bar,html.ak-embed .sh-scrim,html.ak-embed .sh-drawer,html.ak-embed .theme-float{display:none !important;}
html.ak-embed body{padding-top:0 !important;}
/* the frame is as tall as the content, not as the window */
html.ak-embed:not(.ak-fill),html.ak-embed:not(.ak-fill) body{min-height:0 !important;height:auto !important;}
/* inside the site the reading opens with the title only, in the look of the site's hero titles, and stays close to the header */
html.ak-embed main.wrap{padding-top:8px !important;}
html.ak-embed main.wrap > .intro{display:block !important;margin:44px 0 20px;}
html.ak-embed main.wrap > .intro .eyebrow,html.ak-embed main.wrap > .intro p{display:none;}
html.ak-embed main.wrap > .intro h1{font-family:"Lora",Georgia,serif;font-weight:400;font-size:clamp(32px,4.4vw,60px);line-height:1.06;letter-spacing:-.03em;color:#F4F2EC;margin:0;}
html.ak-embed main.wrap > .intro h1 em{font-style:italic;color:#E8C468;}
/* free reading inside the site: no form while the host hands over the birth data (ak-wait); a dialog when it has none (ak-ask) */
html.ak-chart:not(.ak-ask):not(.ak-done) main.wrap > .card{display:none !important;}
.ak-wait-note{display:none;text-align:center;font-family:"Lora",Georgia,serif;font-style:italic;font-size:19px;color:#cfd2ea;margin:26px 0 0;}
html.ak-wait .ak-wait-note{display:block;animation:ak-fade .5s ease both;}
/* loader: the Tree of Life lights up node by node while the sky is calculated */
.ak-loader{display:block;width:92px;height:auto;margin:6px auto 18px;overflow:visible;}
.ak-loader line{stroke:rgba(232,196,104,.28);stroke-width:1.2;}
.ak-loader circle{fill:#0b0d1a;stroke:#e8c468;stroke-width:1.4;animation:ak-node 2.2s ease-in-out infinite;transform-box:fill-box;transform-origin:center;}
@keyframes ak-node{0%,100%{fill:#0b0d1a;filter:none;transform:scale(1);}18%{fill:#e8c468;filter:drop-shadow(0 0 6px rgba(232,196,104,.9));transform:scale(1.18);}40%{fill:#0b0d1a;filter:none;transform:scale(1);}}
@keyframes ak-fade{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:none;}}
/* while waiting the chart is drawn out of sight; when ready it comes in: wheel and tree first, the reading after */
html.ak-wait #tree-section,html.ak-wait #result{opacity:0;pointer-events:none;}
html.ak-wait main.wrap{min-height:520px;}
html.ak-done #tree-section{animation:ak-reveal 1.1s cubic-bezier(.2,.7,.2,1) both;}
html.ak-done #result{animation:ak-fade .9s ease .5s both;}
/* #tree-section is centred with translateX(-50%) (chart.html): the animation must keep that shift */
@keyframes ak-reveal{from{opacity:0;transform:translateX(-50%) translateY(26px) scale(.965);filter:blur(6px);}to{opacity:1;transform:translateX(-50%);filter:none;}}
@media (prefers-reduced-motion:reduce){.ak-loader circle,html.ak-done #tree-section,html.ak-done #result,html.ak-wait .ak-wait-note{animation:none;}}
html.ak-ask main.wrap{min-height:540px;}
/* the veil lives inside main.wrap, so the title and the dialog (same stacking context) stay above it */
html.ak-ask main.wrap::before{content:"";position:fixed;inset:0;z-index:0;background:rgba(5,6,14,.55);backdrop-filter:blur(3px);}
html.ak-ask main.wrap > .intro{position:relative;z-index:3;}
html.ak-ask main.wrap > .card{position:relative;z-index:3;max-width:520px;margin:30px auto 0;box-shadow:0 30px 90px rgba(0,0,0,.65),0 0 0 1px rgba(232,196,104,.25);}
.ak-ask-title{display:none;grid-column:1/-1;text-align:center;font-family:"Lora",Georgia,serif;font-size:20px;color:#F4F2EC;margin:2px 0 6px;}
html.ak-ask .ak-ask-title{display:block;}
/* chart on the page: the heading block takes two rows (title on one line; label, note and "recalculate" on the next) */
html.ak-done main.wrap > .intro{margin:44px 0 10px;}
html.ak-done main.wrap > .intro h1{font-size:clamp(26px,3.2vw,44px);}
html.ak-done main.wrap > .intro h1 br{display:none;}
html.ak-done main.wrap > .intro h1 em::before{content:" ";}
html.ak-embed .tv-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px 18px;}
html.ak-embed .tv-head .sub{display:none;}
html.ak-embed .tv-head .eyebrow{font-size:12px;letter-spacing:.22em;line-height:1.6;}
/* "recalculate" as a small round icon */
html.ak-embed .tv-head .recalc{margin-top:0;width:34px;height:34px;padding:0;font-size:0;line-height:0;display:inline-flex;align-items:center;justify-content:center;flex:none;}
html.ak-embed .tv-head .recalc::before{content:"\21BB";font-size:17px;line-height:1;}
/* reading form on phones (iOS gives date/time fields a width of their own): keep them inside their box */
.natal .field{min-width:0;overflow:hidden;}
.natal input[type=date],.natal input[type=time]{display:block;box-sizing:border-box;min-width:0;max-width:100%;-webkit-appearance:none;appearance:none;text-align:left;}
.natal input::-webkit-date-and-time-value{text-align:left;}
/* Tree of Life board inside the site: the site header gives brand and account, the board keeps only its tools */
html.ak-fill #topbar .actions{display:none !important;}
html.ak-fill #topbar{padding:0 16px; background:rgba(8,9,18,.55);}
html.ak-fill .ak-back{font-family:"Cinzel",serif; font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:#8b93b8; text-decoration:none; white-space:nowrap; margin-right:6px;}
html.ak-fill .ak-back:hover{color:#e8c468;}
@media (max-width:979px){ html.ak-fill .ak-back span{display:none;} }
