/* The hero sky (oa/hero_sky.py, templates/hero_sky/, static/js/hero-sky.js; research/hero-sky/RULES.md).
   The art slot sits where .ed-wheel sat: on desktop the right side, partly off the canvas; on a phone behind the
   text at 0.55 opacity. Its size is fixed (aspect-ratio 1, absolutely placed), so nothing ever shifts. Only the sky
   moves (markers by transform, once a minute, at true rates); the only animation is OD2's faint shimmer on true
   stars, by opacity, and none at all under reduced motion. Colours are tokens here; the hero's base stays night. */
.hs-art {
  --hs-gold: #C9A45C; --hs-paper: #f2ece0; --hs-star: #f6f1e3; --hs-lit: #f8f3e6; --hs-dark: #2a3050;
  --hs-day: #2E4A78; --hs-golden: #3D3446; --hs-blue: #27305B; --hs-nautical: #1D2447; --hs-astronomical: #171C37;
  --hs-night: #12162B;
  --hs-tint: transparent;
  position: absolute; right: -120px; top: 50%; width: min(760px, 70vw); aspect-ratio: 1; translate: 0 -50%;
  pointer-events: none; z-index: 0; border-radius: 50%;
  background: radial-gradient(closest-side, var(--hs-tint) 0%, transparent 100%);
}
.hs-art.hs-l0 { display: none; }
.hs-art svg { display: block; width: 100%; height: 100%; overflow: visible; }
/* E2: the light tint of the town's sky (four moods from the six bands), on the art slot only */
.hs-m-predawn { --hs-tint: rgba(60, 74, 140, .30); }
.hs-m-golden { --hs-tint: rgba(201, 140, 70, .20); }
.hs-m-day { --hs-tint: rgba(110, 150, 210, .20); }
.hs-m-night { --hs-tint: transparent; }

/* both layers */
.hs-svg text { font: 600 17px system-ui, -apple-system, "Segoe UI", "Noto Sans", "Noto Sans Devanagari", sans-serif; }
.hs-ring { fill: none; stroke: rgba(201, 164, 92, .26); stroke-width: 1; }
.hs-cmp { fill: rgba(242, 236, 224, .62); text-anchor: middle; }
.hs-star { fill: var(--hs-star); }
.hs-moon .hs-mdark { fill: var(--hs-dark); stroke: rgba(246, 241, 227, .6); stroke-width: 1; }
.hs-moon .hs-mlit { fill: var(--hs-lit); }

/* L1: the sidereal wheel turned to the town's horizon */
.hs-alt { fill: rgba(201, 164, 92, .07); }
.hs-tick { fill: none; stroke: rgba(201, 164, 92, .3); stroke-width: 1; }
.hs-t0 { fill: none; stroke: rgba(201, 164, 92, .75); stroke-width: 2; }
.hs-below { fill: rgba(5, 7, 16, .28); }
.hs-hz { fill: none; stroke: rgba(242, 236, 224, .4); stroke-width: 1; stroke-dasharray: 2 7; }
.hs-gm circle { fill: #d8d2c4; stroke: rgba(10, 14, 28, .6); stroke-width: 1; }
.hs-gm text { fill: rgba(242, 236, 224, .85); font-size: 15px; }
.hs-g-sun circle { fill: #F2C46B; }
.hs-g-mars circle { fill: #D2775A; }
.hs-g-mercury circle { fill: #9FC7A6; }
.hs-g-jupiter circle { fill: #E8CF8A; }
.hs-g-venus circle { fill: #F4F1EA; }
.hs-g-saturn circle { fill: #9DAACB; }
.hs-gm.hs-node circle { fill: none; stroke: rgba(242, 236, 224, .75); stroke-width: 1.4; }   /* points, not bodies */
.hs-gm.hs-rx circle { stroke: rgba(242, 236, 224, .9); stroke-width: 1.4; stroke-dasharray: 2 2; }
/* L4 accent (career: Saturn and Jupiter): the page's grahas lit with a ring, the other markers dimmed */
.hs-acc .hs-gm { opacity: .38; }
.hs-acc .hs-gm.hs-on { opacity: 1; }
.hs-gm.hs-on .hs-halo { fill: none; stroke: var(--hs-gold); stroke-width: 1.5; stroke-dasharray: none; }
.hs-gm.hs-on text { fill: var(--hs-paper); font-size: 17px; }

/* L2: the town's all-sky disc */
.hs-disc { fill: var(--hs-night); stroke: rgba(201, 164, 92, .45); stroke-width: 1.5; }
.hs-b-day .hs-disc { fill: var(--hs-day); }
.hs-b-golden .hs-disc { fill: var(--hs-golden); }
.hs-b-blue .hs-disc { fill: var(--hs-blue); }
.hs-b-nautical .hs-disc { fill: var(--hs-nautical); }
.hs-b-astronomical .hs-disc { fill: var(--hs-astronomical); }
.hs-ecl { fill: none; stroke: rgba(201, 164, 92, .55); stroke-width: 1.2; }
.hs-lg { fill: var(--hs-gold); }
.hs-sun { fill: #F2C46B; stroke: rgba(242, 196, 107, .35); stroke-width: 6; }
.hs-pl circle { fill: #e9e3d4; }
.hs-pl text { fill: rgba(242, 236, 224, .85); font-size: 15px; }
.hs-pl.hs-g-mars circle { fill: #D2775A; }
.hs-pl.hs-g-mercury circle { fill: #9FC7A6; }
.hs-pl.hs-g-jupiter circle { fill: #E8CF8A; }
.hs-pl.hs-g-saturn circle { fill: #9DAACB; }

/* the page's fact line (an L4 accent), the honesty caption and the ask card */
.hs-fact { position: relative; z-index: 1; margin: 18px 0 0; max-width: 62ch; font-size: 1rem; line-height: 1.55;
  color: #f2ece0; }
.hs-fact + .hs-cap { margin-top: 6px; }
.hs-cap { position: relative; z-index: 1; margin: 18px 0 0; max-width: 62ch; font-size: .84rem; line-height: 1.5;
  color: rgba(242, 236, 224, .72); }
.hs-cap-end, .hs-ask-short { display: none; }
.hs-ask { position: relative; z-index: 2; display: flex; gap: 14px; align-items: flex-start; margin: 22px 0 0;
  max-width: 620px; background: #ede6d8; color: #1E1E24; border-radius: 8px; padding: 18px 20px;
  border-left: 4px solid #C9A45C; box-shadow: 0 18px 40px rgba(0, 0, 0, .3); }
.hs-ask[hidden] { display: none; }
.hs-ask-pin { flex: none; width: 24px; height: 24px; fill: #9A4426; margin-top: 2px; }
.hs-ask-h { margin: 0 0 4px; font-size: 1.15rem; font-weight: 600; color: #9A4426; }
.hs-ask-p { margin: 0 0 12px; color: #3b3a40; }
.hs-ask-btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hs-ask-btns button { font: inherit; cursor: pointer; border-radius: 999px; padding: 9px 18px; min-height: 44px; }
.hs-ask-yes { background: #9A4426; color: #fff; border: 1px solid #9A4426; }
.hs-ask-yes:hover { background: #7f3519; }
.hs-ask-city { background: rgba(255, 255, 255, .5); color: #1E1E24; border: 1px solid rgba(30, 30, 36, .3); }
.hs-ask-no { background: none; border: 0; color: #6d665a; text-decoration: underline; }
.hs-ask-small { margin: 10px 0 0; font-size: .86rem; color: #6d665a; }

/* owner, 24 Oct 2026: text stays clear of the sky; the art fades out toward the text column */
.hs-art { -webkit-mask-image: var(--hs-fade); mask-image: var(--hs-fade); }
@media (min-width: 721px) { .hs-art { --hs-fade: linear-gradient(to right, transparent 0, #0002 24%, #000 54%); } }
/* phones, 375 px first: faint, low; graha names give way to dots; the caption keeps the town, the band and the source;
   the ask card is one row until a tap (.hs-asked), so a page's first field stays on the first screen */
@media (max-width: 720px) {
  /* low, fading upward: the heading and the lead stay on clear night */
  .hs-art { right: auto; left: 50%; top: auto; bottom: -14%; width: min(560px, 135vw); translate: -50% 0; opacity: .55;
    --hs-fade: linear-gradient(to bottom, transparent 0, #0004 30%, #000 62%); }
  .hs-gm text, .hs-pl text, .hs-gm.hs-node, .hs-cap-b, .hs-cap-n { display: none; }
  .hs-cap-end { display: inline; }
  .hs-fact { margin-top: 12px; font-size: .95rem; line-height: 1.5; }
  .hs-cap { margin-top: 10px; }
  .hs-ask { align-items: center; gap: 8px; margin-top: 14px; padding: 6px 8px; border-left-width: 3px; }
  .hs-ask-pin { width: 20px; height: 20px; margin: 0; }
  .hs-ask-h, .hs-ask-p, .hs-ask-wide, .hs-ask:not(.hs-asked) .hs-ask-city, .hs-ask:not(.hs-asked) .hs-ask-small {
    display: none; }
  .hs-ask-short { display: inline; }
  .hs-ask-btns { gap: 4px 6px; }
  .hs-ask-btns button { padding: 8px 12px; font-size: .9rem; }
  .hs-ask-btns .hs-ask-no { padding: 8px 4px; }
  .hs-ask-small { margin-top: 6px; }
}

/* OD2 / D10: the faint shimmer, true stars only (.hs-sh is set only on a live sky), opacity only */
@media (prefers-reduced-motion: no-preference) {
  .hs-sh .hs-star.d0 { animation: hs-d0 4.3s ease-in-out infinite alternate; }
  .hs-sh .hs-star.d1 { animation: hs-d1 4.3s ease-in-out infinite alternate; }
  .hs-sh .hs-star.d2 { animation: hs-d2 4.3s ease-in-out infinite alternate; }
  .hs-sh .hs-star.p0 { animation-duration: 3.7s; } .hs-sh .hs-star.p1 { animation-duration: 4.3s; }
  .hs-sh .hs-star.p2 { animation-duration: 4.9s; } .hs-sh .hs-star.p3 { animation-duration: 5.5s; }
  .hs-sh .hs-star.p4 { animation-duration: 6.1s; } .hs-sh .hs-star.p5 { animation-duration: 6.7s; }
  .hs-sh .hs-star.q1 { animation-delay: -1.1s; } .hs-sh .hs-star.q2 { animation-delay: -2.3s; }
  .hs-sh .hs-star.q3 { animation-delay: -3.4s; }
  /* (0,4,0): above the d0-d2 rules' (0,3,0), whose "animation" shorthand would set it back to running */
  .hs-art.hs-paused .hs-sh .hs-star, .hs-art.hs-still .hs-sh .hs-star { animation-play-state: paused; }
  .hs-disc { transition: fill 2s ease; }                  /* A2: the band change crossfades over 2 s */
}
@keyframes hs-d0 { from { opacity: 1; } to { opacity: .9; } }
@keyframes hs-d1 { from { opacity: 1; } to { opacity: .84; } }
@keyframes hs-d2 { from { opacity: 1; } to { opacity: .78; } }
@media (prefers-reduced-motion: reduce) {
  .hs-star { animation: none !important; }
  .hs-disc { transition: none !important; }
}
