/* Jameson · the sun in the name

   In every "Jameson" beside the mark, the o is a small sun, drawn the old way, as on old maps and in the heraldry: a
   gold disc the size of the letter, and about it, joined to it, eight straight rays with eight wavy ones between them
   (a "sun in splendour"). Its rays turn very slowly, the straight and the wavy flickering by turns. The o is still
   there, unseen, so the name reads, copies and pastes as "Jameson". It holds still when the visitor has asked for
   reduced motion. (The moon in the mark itself is drawn by brand.js.) */
.sun-o {
  position: relative; display: inline-block;
  width: 0.84em; height: 0.84em; margin: 0 0.07em 0 0.03em; vertical-align: -0.1em;
}
.sun-o-t { position: absolute; inset: 0; overflow: hidden; color: transparent; }
.sun-o svg { display: block; width: 100%; height: 100%; overflow: visible; }
.sun-disc, .sun-ray-s, .sun-ray-w { fill: var(--gold, #e2bd6b); }
@media (prefers-reduced-motion: no-preference) {
  .sun-rays, .sun-ray-s, .sun-ray-w { transform-box: view-box; transform-origin: 12px 12px; }
  .sun-rays { animation: sun-turn 60s linear infinite; }
  .sun-ray-s, .sun-ray-w { animation: sun-flicker 4.8s ease-in-out infinite alternate; }
  .sun-ray-w { animation-delay: -4.8s; }   /* the wavy ones reach out as the straight ones draw in, and back */
}
@keyframes sun-turn { to { transform: rotate(360deg); } }
@keyframes sun-flicker { from { transform: scale(0.88); opacity: 0.66; } to { transform: scale(1); opacity: 1; } }

/* the tiny arrow brand.js puts just before the mark at the top of each page, pointing at the moon while it shows the
   live phase. It sits level with the moon (which is above the middle of the mark: its centre is 6/64 of the mark up)
   and nudges toward it, slowly; still under reduced motion. */
.moon-arrow {
  flex: none; position: relative; top: -2.8px;
  width: 6px; height: 9px; margin-right: -10px; overflow: visible;
  fill: none; stroke: var(--gold, #e2bd6b); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.qbar-home .moon-arrow { top: -2.1px; width: 5px; height: 7px; margin-right: -5px; }
@media (prefers-reduced-motion: no-preference) {
  .moon-arrow { animation: moon-point 1.4s ease-in-out infinite alternate; }
}
@keyframes moon-point { from { transform: translateX(-2px); opacity: 0.6; } to { transform: translateX(1px); opacity: 1; } }

/* and its twin for the sun: a tiny arrow just above the o, pointing down at it and nudging toward it in the same slow
   rhythm (brand.js adds it at the top of each page only); still under reduced motion */
.sun-o .sun-arrow {
  position: absolute; left: 50%; bottom: calc(100% + 3px);
  width: 9px; height: 5.4px; margin-left: -4.5px; overflow: visible;
  fill: none; stroke: var(--gold, #e2bd6b); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.qbar-home .sun-o .sun-arrow { width: 7px; height: 4.2px; margin-left: -3.5px; bottom: calc(100% + 2px); }
@media (prefers-reduced-motion: no-preference) {
  .sun-arrow { animation: sun-point 1.4s ease-in-out infinite alternate; }
}
@keyframes sun-point { from { transform: translateY(-2px); opacity: 0.6; } to { transform: translateY(1px); opacity: 1; } }

/* the sun, moused over (brand.js): it swells out of the name and comes forward as an engraving comes up on it, an old
   face and all, and its light is drawn plainly about it, in one gold and nothing else: a glory of fine lines, short
   beaded rods and a ring of fine dots (so that the whole is the old sign of the sun, ☉), and beyond the ring, long
   needles, the points of its straight rays, running on across the page, with thin waves of light rippling out
   between them. They are drawn on one canvas laid over the whole page, sharp: as
   light on a dark page (screen), as ink on a light one (multiply). The sun that grows is a copy set above the rays;
   the one in the name hides behind it and still takes the pointer, over the whole of the grown sun's face. Under
   reduced motion nothing grows or turns: the rays only fade in. */
.sun-flare, .sun-flare-sun { position: fixed; z-index: 998; left: 0; top: 0; pointer-events: none; }
.sun-flare { width: 100%; height: 100%; mix-blend-mode: screen; }
.sun-flare.on-light { mix-blend-mode: multiply; }
.sun-flare.still, .moon-night.still { opacity: 0; transition: opacity 0.28s ease-out; }
.sun-flare.still.in, .moon-night.still.in { opacity: 1; }
.sun-flare-sun { display: block; overflow: visible; }
.sun-o .sun-arrow { transition: opacity 0.2s; }
.sun-o.flaring > svg:not(.sun-arrow) { visibility: hidden; }
.sun-o.flaring::after { content: ""; position: absolute; inset: -1.05em; border-radius: 50%; }
.sun-o.flaring .sun-arrow { animation: none; opacity: 0; }

/* and the moon, moused over (brand.js): night falls. One sharp canvas over the page dims and cools it (dusk, on a light
   page) and carries the stars, the moon's glow and its corona; it lies beneath the sun's rays, so the two can cross.
   The moon that grows is a copy set above it, over the mark's own, which fades out beneath. */
.moon-night, .moon-night-moon { position: fixed; left: 0; top: 0; pointer-events: none; }
.moon-night { z-index: 997; width: 100%; height: 100%; }
.moon-night-moon { z-index: 998; display: block; overflow: visible; }

/* the moon's and the sun's dials: brand.js draws each out of the moon or the sun when it is tapped. They share a strip
   just below the logo, the moon's first and the sun's beside it, and on a phone they halve the width to fit side by
   side. In the page's own colours, so they match every theme; only the light on the sun's ring keeps its own. */
.sky-live { cursor: pointer; }   /* the moon, its arrow and the sun: brand.js marks them once they open a dial */
.sky-stage {
  position: fixed; z-index: 1000; left: 0; right: 0;
  display: flex; justify-content: center; align-items: flex-start; gap: 10px; padding: 0 16px;
  pointer-events: none;
}
.sky-stage.low { align-items: flex-end; }
.sky-dial {
  pointer-events: auto; box-sizing: border-box; container-type: inline-size;
  width: min(320px, calc(100vw - 32px)); max-height: max(260px, var(--room, 80vh)); overflow: auto; overscroll-behavior: contain;
  padding: 8px 12px 12px; border: 1px solid var(--hair-2, rgba(236, 230, 214, 0.22)); border-radius: 14px;
  background: var(--surface, #111816); color: var(--ink-2, #c4bdaa);
  box-shadow: 0 24px 54px -26px rgb(0 0 0 / 0.75);
  font-family: var(--font-ui, "IBM Plex Sans Condensed", system-ui, sans-serif); font-size: 0.8rem; line-height: 1.38; letter-spacing: 0.02em;
  scrollbar-width: thin;
}
.sky-stage.two .sky-dial { width: min(320px, calc((100vw - 42px) / 2)); }
.sky-dial b { font-weight: 600; color: var(--gold-ink, #ecca80); }
.sky-head { display: flex; align-items: center; gap: 6px; min-height: 30px; }
.sky-title { flex: 1; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-ink, #ecca80); }
.sky-back, .sky-x { font: inherit; color: var(--muted, #8f978f); background: none; cursor: pointer; }
.sky-back { padding: 2px 9px; border: 1px solid var(--hair-2, rgba(236, 230, 214, 0.22)); border-radius: 999px; font-size: 0.7rem; white-space: nowrap; }
.sky-back[hidden] { display: none; }
.sky-x { display: grid; place-items: center; width: 28px; height: 28px; margin-right: -6px; padding: 0; border: 0; border-radius: 50%; }
.sky-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
@media (hover: hover) { .sky-back:hover, .sky-x:hover { color: var(--gold-ink, #ecca80); border-color: var(--gold, #e2bd6b); } }
.sky-face {
  display: block; width: 100%; max-width: 236px; height: auto; aspect-ratio: 1; margin: 2px auto 0; overflow: visible;
  touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; border-radius: 50%;
}
.sky-face.turning { cursor: grabbing; }
.sky-face:focus-visible { outline: 2px solid var(--gold, #e2bd6b); outline-offset: 2px; }
.sky-face:focus:not(:focus-visible) { outline: none; }   /* a tap focuses it too, but only the keyboard's focus is shown */
.sky-face text { text-anchor: middle; dominant-baseline: central; font-family: inherit; }
/* the sun's ring, coloured by the light: the same in every theme, as the sky is */
.sky-day, .sky-gold, .sky-dusk, .sky-blue, .sky-naut, .sky-astro, .sky-night { fill: none; stroke-width: 14; }
.sky-day { stroke: #f1d98e; }
.sky-gold { stroke: #e3a24c; }
.sky-dusk { stroke: #8d78b4; }
.sky-blue { stroke: #4467b4; }
.sky-naut { stroke: #2d4078; }
.sky-astro { stroke: #1f2a55; }
.sky-night { stroke: #131a35; }
.sky-moonup { fill: none; stroke: #cdd5e2; stroke-width: 3; stroke-linecap: round; opacity: 0.85; }
.sky-sundot { fill: var(--gold, #e2bd6b); stroke: var(--surface, #111816); stroke-width: 2; }
.sky-sundot.down { opacity: 0.5; }
/* the moon's ring: the month on the page's own track, darkest around the new moon, brightest around the full */
.sky-track { fill: none; stroke: var(--hair-2, rgba(236, 230, 214, 0.22)); stroke-width: 14; }
.sky-dark { fill: none; stroke: #0c1124; stroke-width: 14; }
.sky-bright { fill: none; stroke: #e9e1c6; stroke-width: 14; opacity: 0.55; }
.sky-mdim { fill: var(--muted, #8f978f); fill-opacity: 0.38; stroke: var(--muted, #8f978f); stroke-width: 0.7; stroke-opacity: 0.6; }
.sky-mbig { fill-opacity: 0.22; stroke-width: 1; }
.sky-mlit { fill: #f3ecd6; stroke: var(--muted, #8f978f); stroke-width: 0.6; stroke-opacity: 0.5; stroke-linejoin: round; }
.sky-tick { stroke: var(--muted, #8f978f); stroke-width: 1; opacity: 0.7; }
.sky-pin { fill: var(--gold, #e2bd6b); }
.sky-lab { font-size: 9.5px; fill: var(--muted, #8f978f); letter-spacing: 0.04em; }
.sky-part { font-size: 8px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; fill: var(--gold-ink, #ecca80); }
.sky-big { font-size: 20px; font-weight: 600; fill: var(--ink, #ede6d3); }
.sky-small { font-size: 9px; fill: var(--muted, #8f978f); }
.sky-dial .sky-zodiac text { paint-order: stroke fill; stroke: var(--surface, #111816); stroke-width: 2px; stroke-linejoin: round; }
.sky-dial .sky-zodiac-glyph { font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols", serif; font-size: 22px; fill: var(--gold-ink, #ecca80); }
.sky-dial .sky-zodiac-name { font-size: 9px; fill: var(--ink, #ede6d3); }
.sky-when { margin: 2px 0 0; text-align: center; font-size: 0.72rem; color: var(--muted, #8f978f); font-variant-numeric: tabular-nums; }
.sky-key { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 3px 8px; margin: 6px 0 8px; font-size: 0.66rem; color: var(--muted, #8f978f); }
.sky-key span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.sky-key i { width: 8px; height: 8px; flex: none; border-radius: 50%; }
.k-day { background: #f1d98e; } .k-gold { background: #e3a24c; } .k-blue { background: #4467b4; } .k-night { background: #131a35; }
.k-moon { background: #cdd5e2; } .k-dark { background: #0c1124; box-shadow: 0 0 0 1px var(--hair-2, rgba(236, 230, 214, 0.22)); } .k-bright { background: #e9e1c6; }
.sky-dial .sky-rows {
  padding: 2px 10px;
  border: 1px solid var(--hair, rgba(236, 230, 214, 0.1)); border-radius: 10px;
  background: var(--bg-2, rgba(0, 0, 0, 0.18));
}
.sky-dial .sky-row { display: block; margin: 0; padding: 6px 0; overflow-wrap: anywhere; }
.sky-dial .sky-rows > .sky-row, .sky-dial .sky-rows > .sky-pair { border-top: 1px solid var(--hair, rgba(236, 230, 214, 0.1)); }
.sky-dial .sky-rows > :first-child, .sky-dial .sky-rows > .sky-dial-summary + * { border-top: 0; }
.sky-dial .sky-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sky-dial .sky-pair .sky-k { display: block; margin-right: 0; }
.sky-k {
  margin-right: 7px; font-family: var(--font-mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted, #8f978f);
}
.sky-k:empty { display: none; }
.sky-dial-summary { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sky-sign { font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols", "Noto Sans Symbols 2", serif; color: var(--gold-ink, #ecca80); }
.sky-where {
  margin: 8px 0 0; padding-top: 7px; border-top: 1px solid var(--hair, rgba(236, 230, 214, 0.1));
  font-size: 0.68rem; color: var(--muted, #8f978f);
}
/* a dial half a phone wide: tighter padding and stacked pairs if needed */
@container (max-width: 250px) {
  .sky-dial .sky-rows { padding: 2px 8px; }
  .sky-dial .sky-pair { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sky-dial .sky-pair .sky-row + .sky-row { border-top: 1px solid var(--hair, rgba(236, 230, 214, 0.1)); }
  .sky-back { padding: 1px 7px; }
}
