/* The home hero: two rings. Monochrome line art, no gold.
   Type: the dial, the readout headings and the hero heading are set in Source Han Serif SemiBold, cut down to each
   language's own few hundred glyphs (20–40 KB, renamed per the OFL; tools/build_dial_font.py). A page downloads only
   its own language's face. Heavy enough to stay solid on black at small sizes. Sentences stay in the site's sans.
   No code fonts, no tracked capitals; served from our own domain (CSP font-src 'self').
   SVG text scales with the dial (about 0.75× on a laptop, 0.34× on a phone), so the phone sizes below are set apart. */
@font-face { font-family: "TwinSky Dial Serif zh-CN"; src: url("fonts/twinsky-dial-serif-zh-CN.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "TwinSky Dial Serif zh-TW"; src: url("fonts/twinsky-dial-serif-zh-TW.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "TwinSky Dial Serif ja"; src: url("fonts/twinsky-dial-serif-ja.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "TwinSky Dial Serif ko"; src: url("fonts/twinsky-dial-serif-ko.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "TwinSky Dial Serif en"; src: url("fonts/twinsky-dial-serif-en.woff2") format("woff2"); font-weight: 600; font-display: swap; }
:root { --dual-serif: "TwinSky Dial Serif zh-CN", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", STSong, SimSun, Georgia, serif; --dual-halo: #000; }
html[lang="zh-TW"] { --dual-serif: "TwinSky Dial Serif zh-TW", "Songti TC", "Noto Serif CJK TC", PMingLiU, Georgia, serif; }
html[lang="ja"] { --dual-serif: "TwinSky Dial Serif ja", "Hiragino Mincho ProN", "Noto Serif CJK JP", "Yu Mincho", Georgia, serif; }
html[lang="ko"] { --dual-serif: "TwinSky Dial Serif ko", AppleMyungjo, "Noto Serif CJK KR", Batang, Georgia, serif; }
html[lang="en"] { --dual-serif: "TwinSky Dial Serif en", Georgia, "Times New Roman", "Apple Symbols", "Segoe UI Symbol", serif; }
html[data-theme="light"] { --dual-halo: var(--product-base, #fff); }
.dual-hero { position: absolute; inset: 0; display: grid; place-items: center start; padding: 72px 0 24px 5vw; pointer-events: none; }
.dual-rings { width: min(calc(100svh - 150px), 56vw); height: auto; overflow: visible; color: #f5f5f7; pointer-events: auto; }
.dual-rings text { fill: currentColor; font-family: var(--dual-serif); font-weight: 600; text-anchor: middle; dominant-baseline: central; }
.dual-rings .labels { pointer-events: none; }
.dual-rings .ring { fill: none; stroke: currentColor; stroke-width: 1; opacity: .14; }
.dual-rings .ring.strong { opacity: .3; }
.dual-rings .divider { stroke: currentColor; stroke-width: 1; opacity: .14; }
/* Outer: the branches lead; the 24 terms are ticks, long for the 12 节, short for the 12 气. */
.dual-rings .branch { font-size: 30px; opacity: .5; }
.dual-rings .branch.now { opacity: 1; }
.dual-rings .term-tick { stroke: currentColor; stroke-width: 1.2; opacity: .3; }
.dual-rings .term-tick.jie { opacity: .55; }
.dual-rings .term-progress { fill: none; stroke: currentColor; stroke-width: 3; opacity: .9; stroke-linecap: round; }
.dual-rings .term-name { font-size: 22px; text-anchor: start; paint-order: stroke; stroke: var(--dual-halo); stroke-width: 6px; stroke-linejoin: round; }
.dual-rings .term-name.is-peek { opacity: .75; text-anchor: middle; }
.dual-rings .term-hit { fill: transparent; pointer-events: all; cursor: default; }
/* Inner: the signs lead; star lines sit in their own band above the names; the 27 nakshatras are ticks. */
.dual-rings .rasi { font-size: 22px; opacity: .5; }
.dual-rings .rasi.now { opacity: 1; }
.dual-rings .star-lines { fill: none; stroke: currentColor; stroke-width: .8; opacity: .22; }
.dual-rings .star-dot { fill: currentColor; opacity: .4; }
.dual-rings .rasi-art.now .star-lines { opacity: .8; }
.dual-rings .rasi-art.now .star-dot { opacity: 1; }
.dual-rings .nak { stroke: currentColor; stroke-width: 1; opacity: .26; }
.dual-rings .nak-arc { fill: none; stroke: currentColor; stroke-width: 4; opacity: .6; stroke-linecap: round; }
/* The ayanamsa between the rings: a dotted arc with its name on it. */
.dual-rings .shift-arc { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-dasharray: 1 5; stroke-linecap: round; opacity: .7; }
.dual-rings .shift-end { stroke: currentColor; stroke-width: 1.2; opacity: .7; }
.dual-rings .shift-label { font-size: 15px; opacity: .8; paint-order: stroke; stroke: var(--dual-halo); stroke-width: 8px; stroke-linejoin: round; }
/* The moment: the needle to the Sun on the edge; the Moon on its own track. */
.dual-rings .now-line { stroke: currentColor; stroke-width: 1.2; opacity: .6; }
.dual-rings .sun { fill: #fff; filter: url(#dual-glow); }
.dual-rings .moon { fill: #000; stroke: #fff; stroke-width: 1.4; }
.dual-rings .moon-fill { fill: #fff; }
.dual-rings .center-pillar { font-size: 92px; letter-spacing: .04em; }
.dual-rings .center-sub { font-size: 22px; opacity: .62; }
/* English: animal names on the outer ring, sign glyphs on the inner, two centre lines; Korean: short syllables. */
.dual-rings[data-lang="en"] .branch { font-size: 22px; }
.dual-rings[data-lang="en"] .rasi { font-size: 30px; font-weight: 400; }
.dual-rings[data-lang="en"] .center-sub { font-size: 20px; }
.dual-rings[data-lang="en"] .center-sub.is-peek, .dual-rings .term-name.is-peek { opacity: .75; }
.dual-rings[data-lang="ja"] .rasi { font-size: 19px; }
/* Border beam: runs round the edge while the rings spin in, then fades away. */
.dual-rings .beam { fill: none; stroke: url(#dual-beam); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 160 2800; animation: dual-beam 3s linear 1; transition: opacity 1.2s ease; }
.dual-rings.is-settled .beam { opacity: 0; }
@keyframes dual-beam { to { stroke-dashoffset: -2960; } }
/* Sparkles in the background. */
.dual-rings .sparkle { fill: currentColor; animation: dual-twinkle 3.6s ease-in-out infinite; }
@keyframes dual-twinkle { 0%, 100% { opacity: .08; } 50% { opacity: .7; } }
/* Words blur in once the needle settles. */
.dual-rings .reveal { opacity: 0; filter: blur(6px); transition: opacity .9s ease, filter .9s ease; }
.dual-rings.is-settled .reveal { opacity: 1; filter: blur(0); }
.dual-rings.is-settled .term-name.is-peek { opacity: .75; }
.dual-today { pointer-events: auto; }
html[data-theme="light"] .dual-rings { color: var(--product-text); }
html[data-theme="light"] .dual-rings .sun { fill: var(--product-text); }
html[data-theme="light"] .dual-rings .moon { fill: var(--product-base, #fff); stroke: var(--product-text); }
html[data-theme="light"] .dual-rings .moon-fill { fill: var(--product-text); }
@media (prefers-reduced-motion: reduce) {
  .dual-rings .beam { display: none; }
  .dual-rings .sparkle { animation: none; }
  .dual-rings .reveal, .hero-dual .dual-readouts { transition: none; }
}
@media (max-width: 760px) {
  .dual-hero { position: relative; inset: auto; place-items: center; padding: 0; }
  .dual-rings { width: min(100%, 420px); }
  /* About 0.34× here: these give 10–14 px on screen. */
  .dual-rings .branch { font-size: 40px; }
  .dual-rings .rasi { font-size: 30px; }
  .dual-rings .term-name { font-size: 30px; stroke-width: 8px; }
  .dual-rings .shift-label { font-size: 28px; stroke-width: 10px; }
  .dual-rings .center-pillar { font-size: 104px; }
  .dual-rings .center-sub { font-size: 32px; }
  .dual-rings[data-lang="en"] .branch { font-size: 30px; }
  .dual-rings[data-lang="en"] .rasi { font-size: 40px; }
  .dual-rings[data-lang="en"] .center-sub { font-size: 30px; }
  .dual-rings[data-lang="ja"] .rasi { font-size: 26px; }
  .dual-rings .rasi-art { opacity: .7; }
  /* The old hero pulls its heading 40px up over the art; the dial needs its bottom edge clear. */
  .hero.hero-dual { padding-top: 96px; }
  .hero-dual .hero-action { margin-top: 18px; }
}
/* Watch-face complications on the right: what the dial reads, in words. */
.hero-dual .dual-readouts { position: absolute; z-index: 3; top: 15svh; right: 6vw; display: grid; gap: 14px; width: min(340px, 30vw); opacity: 0; filter: blur(4px); transform: translateY(6px); transition: opacity .9s ease .3s, filter .9s ease .3s, transform .9s ease .3s; }
.hero-dual .dual-readouts.is-on { opacity: 1; filter: blur(0); transform: none; }
/* No glass cards: three lines of an almanac, a hairline between them. */
.hero-dual .dual-readouts { gap: 0; }
.dual-readouts .readout { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; align-items: center; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.12); }
.dual-readouts .readout:first-child { border-top: 0; padding-top: 0; }
.hero-dual .hero-action h1 { font-family: var(--dual-serif); font-weight: 600; letter-spacing: .01em; }
.dual-readouts .readout svg { width: 48px; height: 48px; transform: rotate(-90deg); }
.dual-readouts .readout-track { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 2; }
.dual-readouts .readout-fill { fill: none; stroke: #f5f5f7; stroke-width: 2.4; stroke-linecap: round; }
.dual-readouts .readout-angle { fill: none; stroke: #f5f5f7; stroke-width: 2; stroke-linecap: round; }
.dual-readouts .readout:last-of-type svg { transform: none; }
.dual-readouts strong { display: block; color: #f5f5f7; font-family: var(--dual-serif); font-size: 20px; font-weight: 600; }
.dual-readouts span { display: block; margin-top: 5px; color: rgba(245,245,247,.66); font-size: 13px; line-height: 1.6; }
.dual-readouts i { font-family: Georgia, var(--dual-serif); font-style: italic; }
.dual-today { justify-self: start; margin: 14px 0 0 64px; padding: 0; border: 0; background: none; color: #f5f5f7; font: inherit; font-size: 15px; pointer-events: auto; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: rgba(245,245,247,.35); cursor: pointer; }
.dual-today:hover { text-decoration-color: #f5f5f7; }
html[data-theme="light"] .dual-readouts .readout { border-color: var(--product-line); }
html[data-theme="light"] :is(.dual-readouts strong, .dual-today) { color: var(--product-text); }
html[data-theme="light"] .dual-readouts span { color: var(--product-secondary); }
html[data-theme="light"] .dual-readouts :is(.readout-fill, .readout-angle) { stroke: var(--product-text); }
html[data-theme="light"] .dual-readouts .readout-track { stroke: var(--product-line); }
@media (max-width: 760px) {
  .hero-dual .dual-readouts { position: relative; top: auto; right: auto; width: calc(100% - 40px); margin: 6px auto 18px; order: 2; }
  .dual-readouts .readout { padding: 12px 0; }
}
