/* מקדש מלך — מדור חכמי הקבלה + לוח ההילולות.
   נשען על style.css (לילה) ו-theme.css (יום) של עיצוב 1 ״ניצוצות״ ומוסיף רק את מה שמיוחד למדור.
   הרעיון: ״ומצדיקי הרבים ככוכבים״. כל חכם הוא כוכב, השלשלת היא קבוצת כוכבים, השנה היא גלגל.
   הגושים הכהים (.jewel: הרקיע, ההילולא, גלגל השנה) נשארים ספיר עמוק עם זהב גם במצב יום,
   כמו כרטיסי התרומה והכותרת התחתונה בדף הבית; כל השאר הוא זכוכית בהירה עם דיו ספיר. */

:root {
  --ck-line: rgba(246, 227, 161, .16);
  --ck-line2: rgba(246, 227, 161, .42);
  --ck-tint: rgba(246, 227, 161, .06);
  --ck-glass: linear-gradient(158deg, rgba(24, 38, 100, .5) 0%, rgba(8, 13, 40, .72) 60%, rgba(6, 10, 30, .78) 100%);
  --ck-field: rgba(4, 7, 22, .55);
  --ck-shadow: 0 40px 90px -44px rgba(0, 0, 0, .85), inset 0 1px 0 rgba(246, 227, 161, .12);
  --ck-shadow-s: 0 22px 44px -30px rgba(0, 0, 0, .8);
  --ck-lift: 0 30px 60px -28px rgba(0, 0, 0, .9), 0 0 50px -18px rgba(233, 196, 106, .5);
}
html[data-theme="day"] {
  --ck-line: rgba(31, 60, 192, .14);
  --ck-line2: rgba(31, 60, 192, .38);
  --ck-tint: rgba(31, 60, 192, .05);
  --ck-glass: linear-gradient(158deg, rgba(255, 255, 255, .94) 0%, rgba(250, 252, 255, .9) 60%, rgba(243, 247, 255, .92) 100%);
  --ck-field: rgba(255, 255, 255, .92);
  --ck-shadow: 0 44px 90px -48px rgba(24, 44, 130, .45), 0 10px 26px -16px rgba(24, 44, 130, .16), inset 0 1px 0 #fff;
  --ck-shadow-s: 0 20px 40px -28px rgba(24, 44, 130, .4), 0 4px 12px -8px rgba(24, 44, 130, .14);
  --ck-lift: 0 32px 60px -28px rgba(24, 44, 130, .55), 0 0 0 4px rgba(79, 134, 255, .1);
}

body.ck main { padding-bottom: clamp(3rem, 8vh, 6rem); }
body.ck .nav a[aria-current="page"] { opacity: 1; color: var(--gold1); }
body.ck .nav a[aria-current="page"]::after { transform: scaleX(1); }
.ck-sec { position: relative; padding: clamp(1.6rem, 4.5vh, 3.2rem) 0; }
.ck .wrap-col { align-items: stretch; }

/* reading progress (sage pages) */
.ck-progress { position: fixed; top: 0; right: 0; left: 0; height: 3px; z-index: 50; pointer-events: none; opacity: 0; transition: opacity .4s; }
.ck-progress.on { opacity: 1; }
.ck-progress i { display: block; height: 100%; transform-origin: right; transform: scaleX(var(--p, 0)); background: linear-gradient(to left, #b8862b, #fff3c8 50%, #e9c46a); box-shadow: 0 0 12px rgba(233, 196, 106, .8); }

/* ------------------------------------------------------------ jewel: deep sapphire block, gold inside, in both themes */
.jewel {
  position: relative; isolation: isolate; overflow: hidden; border-radius: 28px;
  background:
    radial-gradient(90% 80% at 88% 0%, rgba(58, 92, 220, .42), transparent 62%),
    radial-gradient(70% 80% at 0% 100%, rgba(34, 54, 160, .40), transparent 66%),
    linear-gradient(172deg, #0c1650 0%, #080f38 56%, #060a26 100%);
  box-shadow: 0 50px 100px -50px rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(246, 227, 161, .24), inset 0 0 90px rgba(70, 100, 220, .12);
}
.jewel::before {               /* a fine dust of fixed stars */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .8;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 22%, #f6e3a1, transparent 60%), radial-gradient(1px 1px at 31% 66%, #fff, transparent 60%),
    radial-gradient(1.4px 1.4px at 47% 12%, #e9c46a, transparent 60%), radial-gradient(1px 1px at 58% 48%, #cfe0ff, transparent 60%),
    radial-gradient(1.2px 1.2px at 73% 80%, #fff, transparent 60%), radial-gradient(1px 1px at 88% 30%, #e9c46a, transparent 60%),
    radial-gradient(1.4px 1.4px at 93% 68%, #f6e3a1, transparent 60%), radial-gradient(1px 1px at 6% 84%, #9fb6ff, transparent 60%),
    radial-gradient(1px 1px at 22% 44%, #fff, transparent 60%), radial-gradient(1.2px 1.2px at 66% 18%, #9fb6ff, transparent 60%);
  background-size: 310px 270px, 230px 250px, 370px 330px, 190px 210px, 290px 240px, 220px 320px, 400px 300px, 260px 220px, 170px 190px, 340px 270px;
}
html[data-theme="day"] .jewel {
  --ivory: #f4eeda; --muted: #c9cef0; --gold1: #f6e3a1; --gold2: #e9c46a; --gold3: #b8862b; --foil: var(--foil-gold);
  --ck-line: rgba(246, 227, 161, .2); --ck-line2: rgba(246, 227, 161, .5); --ck-tint: rgba(246, 227, 161, .08);
  color: var(--ivory);
  background:
    radial-gradient(90% 80% at 88% 0%, rgba(96, 140, 255, .5), transparent 62%),
    radial-gradient(70% 80% at 0% 100%, rgba(20, 34, 130, .55), transparent 66%),
    linear-gradient(168deg, #2a45bb 0%, #15248a 48%, #0d1760 100%);
  box-shadow: 0 44px 80px -44px rgba(16, 26, 94, .8), 0 12px 30px -18px rgba(16, 26, 94, .4), inset 0 0 0 1px rgba(233, 196, 106, .55), inset 0 0 90px rgba(120, 160, 255, .16);
}
html[data-theme="day"] .jewel .btn-ghost { color: var(--gold1); background: rgba(8, 14, 60, .35); box-shadow: inset 0 0 0 1px rgba(246, 227, 161, .5); }
html[data-theme="day"] .jewel .btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--gold1), 0 0 34px -10px rgba(246, 227, 161, .6); }
html[data-theme="day"] .jewel .eyebrow::before { box-shadow: 0 0 12px 2px rgba(233, 196, 106, .7); }

/* ------------------------------------------------------------ hero (hub + hilulot) */
.ck-hero { position: relative; padding: calc(var(--hdr) + clamp(1rem, 3.4vh, 2.4rem)) 0 clamp(1rem, 3vh, 2rem); }
.ck-hero-in { align-items: center !important; text-align: center; gap: 0 !important; }
.ck-hero .h1 { padding-block: .05em; font-size: clamp(2.9rem, 7.2vw, 5.7rem); }
.ck-hero .orn { margin: .3rem auto .8rem; }
.ck-verse { position: relative; max-width: 30em; font: 500 clamp(1.25rem, 2.3vw, 1.9rem)/1.5 var(--serif); color: var(--ivory); }
.ck-verse p::before { content: "״"; color: var(--gold2); margin-inline-end: .1em; }
.ck-verse p::after { content: "״"; color: var(--gold2); margin-inline-start: .02em; }
.ck-verse cite { display: block; margin-top: .45rem; font: 400 .82rem/1.2 var(--sans); letter-spacing: .22em; color: var(--muted); }
.ck-hero-lead { max-width: 39rem; margin-top: .8rem; color: var(--muted); opacity: 1; }
.ck-sky-wrap { display: block; margin-top: clamp(1.2rem, 3vh, 2rem); width: min(1440px, 100% - 2 * var(--gut)); }

/* ---- the sky */
.ck-sky { padding: 1.3rem 0 .7rem; }
.ck-sky::after { content: ""; position: absolute; inset: 22% -10% 12%; z-index: -1; pointer-events: none; transform: rotate(-4deg); background: radial-gradient(60% 50% at 50% 50%, rgba(140, 170, 255, .16), transparent 70%); filter: blur(10px); }
.ck-sky-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; padding: 0 clamp(1.1rem, 2.6vw, 2.2rem) .1rem; }
.ck-sky-title { font: 700 1.3rem/1.2 var(--serif); letter-spacing: .05em; color: var(--gold1); }
.ck-sky-legend { display: flex; flex-wrap: wrap; gap: .3rem 1.5rem; font-size: .82rem; color: var(--muted); }
.ck-sky-legend i { display: inline-block; width: 30px; vertical-align: middle; margin-inline-end: .55rem; border-top: 1.5px solid var(--gold2); }
.ck-sky-legend .lg-d { border-top-style: dashed; opacity: .75; }
.ck-sky-drag { display: none; color: var(--gold1); }
.ck-sky-scroll { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: rgba(246, 227, 161, .4) transparent; outline-offset: -4px; }
.ck-sky-svg { display: block; width: 100%; min-width: 1120px; height: auto; overflow: visible; }

.ck-eras path { fill: none; stroke: rgba(246, 227, 161, .34); stroke-width: 1; }
.ck-eras .dm { fill: #e9c46a; stroke: none; }
.ck-eras text { font: 700 17px var(--serif); letter-spacing: .05em; text-anchor: middle; fill: #f6e3a1; opacity: .92; }

.ln { fill: none; stroke: url(#ck-ln); stroke-width: 1.15; transition: opacity .45s, stroke-width .45s; }
.ln.s { opacity: .6; stroke-dasharray: 1; stroke-dashoffset: 1; animation: ckDraw 1.5s var(--ease) forwards; animation-delay: calc(.7s + var(--i) * .1s); }
.ln.d { opacity: 0; stroke-dasharray: 1.5 6.5; stroke-linecap: round; stroke-width: 1.4; animation: ckDots 1.2s ease forwards; animation-delay: calc(2s + var(--i) * .05s); }
@keyframes ckDraw { to { stroke-dashoffset: 0; } }
@keyframes ckDots { to { opacity: .5; } }
.mote { fill: #fff7d6; filter: drop-shadow(0 0 4px #f6e3a1) drop-shadow(0 0 10px rgba(233, 196, 106, .8)); transition: opacity .4s; }

.st { cursor: pointer; outline: none; transition: opacity .45s; }
.st > g { animation: ckPop 1s var(--ease) backwards; animation-delay: calc(.15s + var(--i) * .06s); }
@keyframes ckPop { from { opacity: 0; } }
.st-hit { fill: transparent; }
.st-halo { opacity: .62; animation: ckTwinkle 5s ease-in-out infinite; animation-delay: calc(var(--i) * -.83s); }
@keyframes ckTwinkle { 0%, 100% { opacity: .42; } 50% { opacity: .9; } }
.st-ray { fill: #fff3c8; transition: transform .6s var(--ease); filter: drop-shadow(0 0 5px rgba(246, 227, 161, .9)); }
.st-core { fill: #fff; }
.st-lbl { font: 500 15.5px var(--serif); text-anchor: middle; fill: #ece6d2; opacity: .9; paint-order: stroke; stroke: rgba(7, 12, 46, .82); stroke-width: 4.5px; stroke-linejoin: round; transition: fill .3s, opacity .3s; }
.st.m2 .st-lbl { font-size: 16.5px; font-weight: 700; }
.st.m3 .st-lbl { font-size: 20px; font-weight: 900; fill: #f6e3a1; }
.st:hover .st-ray, .st:focus-visible .st-ray, .st.on .st-ray { transform: rotate(45deg) scale(1.55); }
.st:hover .st-halo, .st:focus-visible .st-halo { opacity: 1 !important; }
.st:hover .st-lbl, .st:focus-visible .st-lbl { fill: #fff7d6; opacity: 1; }
.st:focus-visible .st-hit { stroke: #f6e3a1; stroke-width: 1.5; stroke-dasharray: 3 4; }
.ck-sky.has-focus .st:not(.on) { opacity: .26; }
.ck-sky.has-focus .ln:not(.on) { opacity: .08 !important; }
.ck-sky.has-focus .ln.on { opacity: 1 !important; stroke-width: 2.1; }
.ck-sky.has-focus .mote { opacity: 0; }
.st.is-out { opacity: .16; }

.ck-tip { position: absolute; z-index: 6; top: 0; left: 0; width: min(19rem, 80vw); padding: .95rem 1.15rem 1rem; border-radius: 16px; pointer-events: none; text-align: start; background: rgba(6, 10, 36, .95); border: 1px solid rgba(246, 227, 161, .5); box-shadow: 0 24px 60px -20px #000, 0 0 40px -14px rgba(233, 196, 106, .6); color: #f4eeda; }
.ck-tip[hidden] { display: none; }
.ck-tip b { display: block; font: 900 1.25rem/1.2 var(--serif); color: #f6e3a1; }
.ck-tip i { display: block; font-style: normal; font-size: .84rem; color: #c3c8ea; margin-top: .15rem; }
.ck-tip p { font-size: .88rem; line-height: 1.6; margin-top: .5rem; }
.ck-tip em { display: flex; align-items: center; gap: .4rem; font-style: normal; font-size: .82rem; color: #e9c46a; margin-top: .55rem; }
.ck-tip em .ico { width: 1rem; height: 1rem; }

/* ------------------------------------------------------------ candle (נר נשמה in a glass) */
/* The SVG is drawn in build.py (candle()). Its flame groups scale around the wick tip: the parent <g> is
   translated there, so transform-origin 0 0 (view-box) is the tip itself. */
.ck-candle { position: relative; display: inline-block; flex: none; font-size: 46px; width: 1.3em; height: 2.383em; }
.ck-candle.is-big { font-size: 70px; }
.ck-ner { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ck-ner .ck-fi, .ck-ner .ck-ff, .ck-ner .ck-core, .ck-ner .ck-halo { transform-box: view-box; transform-origin: 0 0; }
.ck-ner .ck-fi { opacity: 0; transform: scale(.04, .02); transition: opacity .5s, transform 1.15s cubic-bezier(.22, 1.45, .4, 1); }
.ck-ner .ck-lit { opacity: 0; transition: opacity 1.6s .15s; }
.ck-glow { position: absolute; left: 50.8%; top: 40%; width: 3.6em; height: 3.6em; margin: -1.8em 0 0 -1.8em; border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity 1.6s .1s;
  background: radial-gradient(closest-side, rgba(255, 210, 120, .46), rgba(255, 186, 80, .15) 45%, rgba(255, 170, 60, .04) 70%, transparent); }
.ck-candle.is-lit .ck-fi { opacity: 1; transform: none; }
.ck-candle.is-lit .ck-lit { opacity: 1; }
.ck-candle.is-lit .ck-ember { opacity: .9; }
.ck-candle.is-lit .ck-glow { opacity: 1; animation: ckGlow 3.8s ease-in-out infinite; }
.ck-candle.is-lit .ck-ff { animation: ckFl 3.2s ease-in-out infinite; }
.ck-candle.is-lit .ck-core { animation: ckCore 1.9s ease-in-out infinite; }
.ck-candle.is-lit .ck-halo { animation: ckHalo 3.7s ease-in-out infinite; }
.ck-candle.is-lit .ck-warm { animation: ckWarm 3.7s ease-in-out infinite; }
@keyframes ckFl { 0%, 100% { transform: rotate(0) scale(1, 1); } 18% { transform: rotate(-1.7deg) scale(.985, 1.035); } 37% { transform: rotate(1.1deg) scale(1.01, .975); } 56% { transform: rotate(-.6deg) scale(.99, 1.05); } 78% { transform: rotate(1.4deg) scale(1.012, .985); } }
@keyframes ckCore { 0%, 100% { transform: scale(1, 1); } 40% { transform: scale(.95, 1.07); } 70% { transform: scale(1.03, .96); } }
@keyframes ckHalo { 0%, 100% { opacity: .85; transform: scale(1); } 45% { opacity: 1; transform: scale(1.06); } 70% { opacity: .9; transform: scale(.98); } }
@keyframes ckWarm { 0%, 100% { opacity: .8; } 45% { opacity: 1; } 70% { opacity: .88; } }
@keyframes ckGlow { 0%, 100% { opacity: .84; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }

/* ------------------------------------------------------------ the coming hilula */
.ck-next { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); width: 100%; }
.ck-next-main { display: flex; align-items: center; gap: clamp(1.2rem, 3.4vw, 3rem); padding: clamp(1.5rem, 3.2vw, 3rem); }
.ck-next-txt { min-width: 0; }
.ck-next-txt .h2 { padding-block: .04em; }
.ck-next-aka { font: 500 1.12rem/1.5 var(--serif); color: var(--ivory); opacity: .92; }
.ck-next-date { margin-top: .7rem; font-size: .98rem; line-height: 1.7; color: var(--muted); }
.ck-next-date b { display: inline-block; margin-inline-end: .7rem; padding: .12rem .85rem; border-radius: 999px; font-weight: 700; color: #231503; background: linear-gradient(180deg, #fff3c8, #e2b653); }
.ck-next-date strong { color: var(--gold1); font-weight: 700; }
.ck-next-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.3rem; }
.ck-next-side { padding: clamp(1.4rem, 2.6vw, 2.4rem); border-inline-start: 1px solid var(--ck-line); background: rgba(3, 6, 26, .22); }
.ck-next-k { font-size: .8rem; letter-spacing: .22em; color: var(--gold2); margin-bottom: .5rem; }
.ck-next-list a { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: .9rem; padding: .62rem .2rem; text-decoration: none; border-bottom: 1px solid var(--ck-line); transition: transform .45s var(--ease), color .3s; }
.ck-next-list li:last-child a { border-bottom: 0; }
.ck-next-list a:hover, .ck-next-list a:focus-visible { transform: translateX(-.35rem); color: var(--gold1); }
.ck-next-list .d { font: 700 1rem/1.3 var(--serif); color: var(--gold1); white-space: nowrap; }
.ck-next-list .n { font: 500 1.02rem/1.35 var(--serif); }
.ck-next-list .w { font-size: .8rem; color: var(--muted); white-space: nowrap; }

/* ------------------------------------------------------------ all the sages */
.ck-all-head { text-align: center; display: flex; flex-direction: column; align-items: center; }
.ck-tools { display: flex; flex-direction: column; align-items: center; gap: .9rem; }
.ck-search { display: flex; align-items: center; gap: .7rem; width: min(100%, 34rem); padding: .2rem 1.2rem; border-radius: 999px; background: var(--ck-field); border: 1px solid var(--ck-line2); transition: border-color .3s, box-shadow .3s; }
.ck-search .ico { color: var(--gold2); }
.ck-search input { flex: 1; min-width: 0; padding: .7rem 0; border: 0; background: none; outline: none; font-size: 1rem; color: var(--ivory); }
.ck-search input::placeholder { color: var(--muted); opacity: .85; }
.ck-search input::-webkit-search-cancel-button { filter: grayscale(1) opacity(.6); cursor: pointer; }
.ck-search:focus-within { border-color: var(--gold2); box-shadow: 0 0 0 3px var(--ck-tint), 0 0 30px -8px var(--ck-line2); }
.ck-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; }
.ck-count { min-height: 1.4em; font-size: .86rem; color: var(--muted); }
.ck-empty { text-align: center; padding: 2rem 0; color: var(--muted); }
.ck-empty[hidden], .ck-era[hidden], .ck-item[hidden] { display: none; }

.ck-era { margin-top: clamp(.6rem, 2vh, 1.4rem); }
.ck-era-head { display: flex; align-items: baseline; gap: .6rem 1.1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.ck-era-head p { font-size: .86rem; letter-spacing: .06em; color: var(--muted); }
.ck-era-head i { flex: 1 1 4rem; align-self: center; height: 1px; background: linear-gradient(to left, var(--ck-line2), transparent); }
.ck-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(17.6rem, 100%), 1fr)); gap: 1.05rem; }
.ck-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .3rem; height: 100%; padding: 1.2rem 1.3rem 1.05rem; border-radius: 20px; text-decoration: none;
  background: var(--ck-glass); border: 1px solid var(--ck-line); box-shadow: var(--ck-shadow-s);
  transition: transform .55s var(--ease), border-color .4s, box-shadow .55s;
}
.ck-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 32%, var(--ck-tint) 46%, rgba(255, 255, 255, .13) 50%, var(--ck-tint) 54%, transparent 68%); background-size: 260% 100%; background-position: 130% 0; transition: background-position 1.1s var(--ease); }
.ck-card:hover, .ck-card:focus-visible { transform: translateY(-6px); border-color: var(--ck-line2); box-shadow: var(--ck-lift); }
.ck-card:hover::after, .ck-card:focus-visible::after { background-position: -30% 0; }
.ck-card-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .2rem; }
.ck-card-star { width: 1.05rem; height: 1.05rem; color: var(--gold2); transition: transform .8s var(--ease), filter .4s; }
.ck-card:hover .ck-card-star { transform: rotate(180deg) scale(1.3); filter: drop-shadow(0 0 6px var(--gold2)); }
.ck-card-years { font-size: .8rem; letter-spacing: .04em; color: var(--muted); }
.ck-card-name { font: 900 1.5rem/1.18 var(--serif); color: var(--gold1); }
.ck-card-aka { font: 500 1.02rem/1.35 var(--serif); color: var(--ivory); opacity: .88; }
.ck-card-sum { margin-top: .35rem; font-size: .9rem; line-height: 1.62; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ck-card-foot { margin-top: auto; padding-top: .8rem; display: flex; align-items: center; justify-content: space-between; gap: .4rem .8rem; flex-wrap: wrap; font-size: .8rem; }
.ck-card-hil { display: inline-flex; align-items: center; gap: .32rem; font-weight: 700; color: var(--gold1); }
.ck-card-hil .ico { width: 1.05rem; height: 1.05rem; color: var(--gold2); }
.ck-card-hil i { font-style: normal; font-weight: 700; }
.ck-card-hil i:not(:empty) { margin-inline-start: .35rem; padding: .05rem .6rem; border-radius: 999px; font-size: .72rem; color: #231503; background: linear-gradient(180deg, #fff3c8, #e2b653); }
.ck-card-places { color: var(--muted); }

/* ------------------------------------------------------------ a sage */
.sg-hero { position: relative; padding: calc(var(--hdr) + clamp(1.2rem, 4.5vh, 3rem)) 0 clamp(1.4rem, 3.4vh, 2.4rem); }
.sg-hero-in { align-items: center !important; text-align: center; gap: 0 !important; }
.sg-crumbs { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .2rem .55rem; margin-bottom: 1.5rem; font-size: .84rem; color: var(--muted); }
.sg-crumbs a { text-decoration: none; transition: color .3s; }
.sg-crumbs a:hover { color: var(--gold1); }
.sg-crumbs i { font-style: normal; opacity: .6; }
.sg-hero .eyebrow { margin-bottom: .3rem; font-size: .95rem; letter-spacing: .14em; }
.sg-name { font: 900 clamp(2.5rem, 6.6vw, 5.4rem)/1.08 var(--serif); padding-block: .06em; max-width: 14em; }
.sg-hero .orn { margin: .6rem auto .9rem; }
.sg-years { font: 500 clamp(1.05rem, 1.6vw, 1.32rem)/1.5 var(--serif); letter-spacing: .03em; color: var(--ivory); }
.sg-chain { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .9rem 1.3rem; margin-top: 1.7rem; width: min(100%, 66rem); }
.sg-chain-col { display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
.sg-chain-col.is-from { align-items: flex-end; text-align: end; }
.sg-chain-col.is-to { align-items: flex-start; text-align: start; }
.sg-chain-col.is-from .sg-chips { justify-content: flex-end; }
.sg-chain-col.is-to .sg-chips { justify-content: flex-start; }
.sg-chain-self::before, .sg-chain-self::after { content: ""; position: absolute; top: 50%; width: 1.1rem; height: 1px; background: var(--ck-line2); }
.sg-chain-self::before { right: 100%; }
.sg-chain-self::after { left: 100%; }
.sg-chain-k { flex: none; font-size: .78rem; letter-spacing: .2em; color: var(--gold2); }
.sg-chips { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.sg-chip { display: inline-flex; align-items: center; gap: .42rem; padding: .34rem .95rem; border-radius: 999px; font-size: .93rem; line-height: 1.4; text-decoration: none; color: var(--gold1); border: 1px solid var(--ck-line2); background: var(--ck-tint); transition: background .3s, box-shadow .4s, transform .4s var(--ease); }
.sg-chip .ico { width: .8rem; height: .8rem; color: var(--gold2); }
.sg-chip small { font-size: .78em; color: var(--muted); }
a.sg-chip:hover, a.sg-chip:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 24px -12px var(--ck-line2); background: var(--ck-line); }
.sg-chip.is-plain { color: var(--ivory); border: 1px dashed var(--ck-line2); background: none; opacity: .86; }
.sg-chain-self { position: relative; display: grid; place-items: center; width: 2.3rem; height: 2.3rem; flex: none; border-radius: 50%; color: #231503; background: radial-gradient(circle at 50% 30%, #fff3c8, #e2b653 62%, #b8862b); box-shadow: 0 0 26px 2px rgba(233, 196, 106, .55); }
.sg-chain-self .ico { width: 1.05rem; height: 1.05rem; }

.sg-grid { display: grid; grid-template-columns: minmax(0, 1fr) 21.5rem; align-items: start; gap: clamp(1.3rem, 2.8vw, 2.6rem); width: min(1240px, 100% - 2 * var(--gut)); }
.sg-paper { position: relative; padding: clamp(1.3rem, 3.6vw, 3.6rem); border-radius: 24px; background: var(--ck-glass); border: 1px solid var(--ck-line); box-shadow: var(--ck-shadow); }
.sg-paper::after { content: ""; position: absolute; inset: 11px; border-radius: 15px; pointer-events: none; opacity: .7;
  background:
    linear-gradient(var(--gold2), var(--gold2)) top right / 24px 1px no-repeat, linear-gradient(var(--gold2), var(--gold2)) top right / 1px 24px no-repeat,
    linear-gradient(var(--gold2), var(--gold2)) top left / 24px 1px no-repeat, linear-gradient(var(--gold2), var(--gold2)) top left / 1px 24px no-repeat,
    linear-gradient(var(--gold2), var(--gold2)) bottom right / 24px 1px no-repeat, linear-gradient(var(--gold2), var(--gold2)) bottom right / 1px 24px no-repeat,
    linear-gradient(var(--gold2), var(--gold2)) bottom left / 24px 1px no-repeat, linear-gradient(var(--gold2), var(--gold2)) bottom left / 1px 24px no-repeat; }
.sg-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1.4rem; padding-bottom: .95rem; margin-bottom: 1.7rem; border-bottom: 1px solid var(--ck-line); font-size: .84rem; color: var(--muted); }
.sg-body { font: 400 var(--read, 1.22rem)/1.95 var(--serif); color: var(--ivory); overflow-wrap: break-word; }
.sg-body > p + p, .sg-body > ul + p, .sg-body > blockquote + p { margin-top: 1.05em; }
.sg-body > p:first-of-type::first-letter { float: right; margin: .1em 0 0 .14em; font: 900 3.5em/.82 var(--serif); color: var(--gold1); text-shadow: 0 0 26px var(--ck-line2); }
.sg-quote { position: relative; margin: 2.1em 0; padding: 1.7em clamp(1rem, 4vw, 2.6em) 1.4em; text-align: center; border-radius: 18px; background: var(--ck-tint); border-block: 1px solid var(--ck-line2); }
.sg-quote .ico { position: absolute; top: -.7em; left: 50%; width: 1.3em; height: 1.3em; margin-left: -.65em; color: var(--gold2); filter: drop-shadow(0 0 8px var(--gold2)); }
.sg-quote p { font: 700 1.28em/1.62 var(--serif); background-image: var(--foil); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--gold1); animation: foil 11s linear infinite; }
.sg-quote cite { display: block; margin-top: .8em; font: 400 .72em/1.5 var(--sans); letter-spacing: .08em; color: var(--muted); }
.sg-list { margin: 1em 0; display: grid; gap: .55em; }
.sg-list li { position: relative; padding-inline-start: 1.5em; }
.sg-list li::before { content: ""; position: absolute; inset-inline-start: .25em; top: .82em; width: .42em; height: .42em; transform: rotate(45deg); background: var(--gold2); }
.sg-list strong { color: var(--gold1); font-weight: 700; }
.sg-note { margin-top: 1em; padding-inline-start: 1em; border-inline-start: 2px solid var(--ck-line2); font-size: .88em; line-height: 1.8; color: var(--muted); }
.sg-sources { margin-top: 2.3rem; padding-top: 1.1rem; border-top: 1px solid var(--ck-line); font: 400 .9rem/1.75 var(--sans); color: var(--muted); }
.sg-sources b { display: block; margin-bottom: .2rem; font-size: .76rem; font-weight: 500; letter-spacing: .22em; color: var(--gold2); }

.sg-side { position: sticky; top: var(--side-top, 5.4rem); display: flex; flex-direction: column; gap: 1.05rem; min-width: 0; }
.sg-box { padding: 1.15rem 1.25rem 1.2rem; border-radius: 18px; background: var(--ck-glass); border: 1px solid var(--ck-line); box-shadow: var(--ck-shadow-s); }
.sg-box-t { margin-bottom: .8rem; font: 500 .78rem/1.3 var(--sans); letter-spacing: .22em; color: var(--gold2); }
.sg-facts { display: grid; gap: .7rem; }
.sg-facts dt { font-size: .76rem; letter-spacing: .08em; color: var(--muted); }
.sg-facts dd { font: 500 1.04rem/1.5 var(--serif); color: var(--ivory); }
.sg-hil { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .15rem; padding: 1.5rem 1.2rem 1.2rem; border-radius: 22px; }
.sg-hil .ck-candle { margin-bottom: .5rem; }
.sg-hil-k { font-size: .78rem; letter-spacing: .24em; color: var(--gold2); }
.sg-hil-d { font: 900 2.2rem/1.2 var(--serif); padding-block: .04em; }
.sg-hil-n { font-size: .86rem; color: var(--muted); }
.sg-hil-next { min-height: 1.5em; margin: .3rem 0 .8rem; font-size: .9rem; line-height: 1.6; color: var(--ivory); }
.sg-hil-next b { color: var(--gold1); }
.sg-hil-lit { margin-top: .2rem; font: 500 1rem/1.5 var(--serif); color: var(--gold1); }
.sg-hil-lit[hidden], .sg-hil .btn[hidden] { display: none; }
.sg-hil-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1.1rem; margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--ck-line); width: 100%; }
.sg-hil-links a, .sg-hil-links button { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem 0; border: 0; background: none; cursor: pointer; font-size: .82rem; text-decoration: none; color: var(--muted); transition: color .3s; }
.sg-hil-links a:hover, .sg-hil-links button:hover { color: var(--gold1); }
.sg-hil-links .ico { width: 1rem; height: 1rem; }

/* every row of books stands on its own board: rows are --row tall (tallest book + room to lift), the boards repeat at that step */
.sg-shelf { --row: 170px; position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; padding: 0 6px; }
.sg-shelf::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, transparent 0 calc(var(--row) - 2px), var(--ck-line2) calc(var(--row) - 2px) var(--row));
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.sg-book { display: flex; align-items: flex-end; height: var(--row); padding: 0 2.5px 2px; }
.sg-spine { position: relative; display: grid; place-items: center; width: 38px; height: var(--h, 130px); border-radius: 3px 3px 1px 1px; text-decoration: none; transition: transform .5s var(--ease), box-shadow .5s;
  background: linear-gradient(90deg, rgba(0, 0, 0, .4), rgba(255, 255, 255, .16) 20%, rgba(255, 255, 255, 0) 42%, rgba(0, 0, 0, .34)), linear-gradient(180deg, var(--c));
  box-shadow: inset 0 15px 0 -13px rgba(233, 196, 106, .9), inset 0 -15px 0 -13px rgba(233, 196, 106, .9), inset 0 25px 0 -24px rgba(233, 196, 106, .6), inset 0 -25px 0 -24px rgba(233, 196, 106, .6), 0 8px 14px -8px rgba(0, 0, 0, .7); }
.sg-spine span { writing-mode: vertical-rl; max-height: calc(100% - 44px); overflow: hidden; white-space: nowrap; font: 700 .86rem/1 var(--serif); letter-spacing: .04em; color: #f6e3a1; }
.sg-spine:hover { transform: translateY(-4px); }
.sg-spine.is-link:hover, .sg-spine.is-link:focus-visible { transform: translateY(-10px); box-shadow: inset 0 15px 0 -13px #fff3c8, inset 0 -15px 0 -13px #fff3c8, inset 0 25px 0 -24px rgba(233, 196, 106, .6), inset 0 -25px 0 -24px rgba(233, 196, 106, .6), 0 20px 22px -12px rgba(0, 0, 0, .7), 0 0 22px -4px rgba(233, 196, 106, .6); }
.sg-spine.is-link:focus-visible { outline: 2px solid var(--gold1); outline-offset: 3px; }
.sg-spine .ico { position: absolute; bottom: 5px; left: 50%; width: 13px; height: 13px; margin-left: -6.5px; color: #f6e3a1; opacity: .9; }
.sg-shelf-hint { display: flex; align-items: center; gap: .4rem; margin-top: .8rem; font-size: .78rem; color: var(--muted); }
.sg-shelf-hint .ico { width: 1rem; height: 1rem; flex: none; color: var(--gold2); }

/* the portrait (only where a photo in the public domain was approved) */
.sg-portrait { position: relative; width: clamp(7.2rem, 12vw, 9.4rem); aspect-ratio: 4 / 5; margin: 0 auto 1.25rem; padding: 4px; border-radius: 50% 50% 14px 14px / 40% 40% 14px 14px;
  background: linear-gradient(160deg, #fff3c8, var(--gold2) 32%, var(--gold3) 64%, var(--gold1)); box-shadow: 0 24px 46px -24px rgba(0, 0, 0, .8), 0 0 56px -14px var(--gold2); }
.sg-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; border-radius: 50% 50% 11px 11px / 40% 40% 11px 11px; filter: grayscale(1) sepia(.2) contrast(1.06); }
.sg-portrait::after { content: ""; position: absolute; inset: 4px; border-radius: 50% 50% 11px 11px / 40% 40% 11px 11px; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 243, 200, .32), inset 0 -34px 40px -30px rgba(0, 0, 0, .5); }

/* additions woven into the Rav's text look like the rest of it; ?adds=1 marks them for review */
.show-adds .sg-add { background: color-mix(in srgb, var(--gold2) 24%, transparent); box-shadow: inset 0 -.1em 0 var(--gold2); border-radius: 3px; }

.sg-act-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.sg-act { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .7rem .2rem .6rem; border-radius: 12px; cursor: pointer; font-size: .78rem; text-align: center; text-decoration: none; color: var(--ivory); border: 1px solid var(--ck-line); background: var(--ck-tint); transition: border-color .3s, transform .4s var(--ease), color .3s; }
.sg-act .ico { width: 1.35rem; height: 1.35rem; color: var(--gold2); }
.sg-act:hover, .sg-act:focus-visible { border-color: var(--ck-line2); transform: translateY(-2px); color: var(--gold1); }
.sg-size { display: flex; align-items: center; gap: .5rem; margin-top: .85rem; padding-top: .8rem; border-top: 1px solid var(--ck-line); font-size: .84rem; color: var(--muted); }
.sg-size span { flex: 1; }
.sg-size button { width: 2.5rem; height: 2.2rem; border-radius: 10px; cursor: pointer; font: 700 1rem/1 var(--serif); color: var(--gold1); border: 1px solid var(--ck-line2); background: var(--ck-tint); transition: background .3s; }
.sg-size button:hover { background: var(--ck-line); }

.sg-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 1rem; margin-top: clamp(1.6rem, 4vh, 3rem); width: min(1240px, 100% - 2 * var(--gut)); }
.sg-nav-card { display: flex; flex-direction: column; gap: .15rem; padding: 1.1rem 1.4rem; border-radius: 18px; text-decoration: none; background: var(--ck-glass); border: 1px solid var(--ck-line); box-shadow: var(--ck-shadow-s); transition: transform .5s var(--ease), border-color .4s, box-shadow .5s; }
.sg-nav-card.is-next { text-align: end; }
.sg-nav-card.is-empty { visibility: hidden; }
.sg-nav-card small { font-size: .76rem; letter-spacing: .18em; color: var(--gold2); }
.sg-nav-card strong { font: 900 1.4rem/1.25 var(--serif); color: var(--gold1); }
.sg-nav-card span { font-size: .84rem; color: var(--muted); }
a.sg-nav-card:hover, a.sg-nav-card:focus-visible { border-color: var(--ck-line2); box-shadow: var(--ck-lift); }
a.sg-nav-card.is-prev:hover { transform: translateX(.4rem); }
a.sg-nav-card.is-next:hover { transform: translateX(-.4rem); }
.sg-nav-all { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; padding: .6rem 1.3rem; border-radius: 18px; font-size: .84rem; text-decoration: none; color: var(--muted); transition: color .3s; }
.sg-nav-all .ico { width: 1.4rem; height: 1.4rem; color: var(--gold2); transition: transform .8s var(--ease); }
.sg-nav-all:hover { color: var(--gold1); }
.sg-nav-all:hover .ico { transform: rotate(180deg) scale(1.2); }

/* ------------------------------------------------------------ hilulot */
.hl-hero { padding-bottom: 0; }
.hl-hero .ck-hero-in { margin-bottom: clamp(1.6rem, 4vh, 2.8rem); }
.hl-top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; width: 100%; }
.hl-ring { position: relative; width: 100%; max-width: 600px; margin-inline: auto; padding: clamp(.6rem, 2vw, 1.6rem); }
.hl-ring svg { display: block; width: 100%; height: auto; overflow: visible; }
.hl-ring:empty { aspect-ratio: 1; background: radial-gradient(closest-side, transparent 56%, rgba(246, 227, 161, .12) 57%, rgba(246, 227, 161, .12) 75%, transparent 76%); }
.rg-in { transform-origin: 0 0; animation: rgTurn 1.8s var(--ease) backwards; }
@keyframes rgTurn { from { transform: rotate(50deg); opacity: 0; } }
.rg-seg { fill: rgba(246, 227, 161, .035); stroke: rgba(246, 227, 161, .3); stroke-width: 1; cursor: pointer; transition: fill .35s; }
.rg-seg:hover, .rg-seg.on { fill: rgba(246, 227, 161, .16); }
.rg-seg.now { fill: rgba(246, 227, 161, .1); }
.rg-m { font: 500 15px var(--serif); text-anchor: middle; dominant-baseline: central; fill: #ece6d2; opacity: .78; pointer-events: none; }
.rg-m.now { font-weight: 900; font-size: 17px; fill: #f6e3a1; opacity: 1; }
.rg-past { fill: none; stroke: url(#rg-gold); stroke-width: 3; stroke-linecap: round; opacity: .9; }
.rg-hand { stroke: #fff3c8; stroke-width: 1.4; stroke-linecap: round; filter: drop-shadow(0 0 5px #f6e3a1); }
.rg-now { fill: #fff; filter: drop-shadow(0 0 6px #f6e3a1) drop-shadow(0 0 14px #e9c46a); }
.rg-st { cursor: pointer; outline: none; }
.rg-st .h { fill: url(#rg-halo); opacity: .6; transition: opacity .3s; }
.rg-st .r { fill: #fff3c8; transition: transform .5s var(--ease); filter: drop-shadow(0 0 4px rgba(246, 227, 161, .9)); }
.rg-st.past .r { fill: #b9a878; filter: none; }
.rg-st.past .h { opacity: .22; }
.rg-st.next .h { animation: ckTwinkle 2.2s ease-in-out infinite; }
.rg-st:hover .r, .rg-st.on .r { transform: rotate(45deg) scale(1.7); fill: #fff; }
.rg-st:hover .h, .rg-st.on .h { opacity: 1; }
.rg-c text { text-anchor: middle; fill: #f4eeda; font-family: var(--serif); }
.rg-c .c1 { font: 400 13px var(--sans); letter-spacing: .24em; fill: #e9c46a; }
.rg-c .c2 { font-weight: 900; font-size: 34px; fill: #f6e3a1; }
.rg-c .c3 { font-weight: 500; font-size: 17px; opacity: .9; }
.rg-disc { fill: rgba(4, 8, 30, .35); stroke: rgba(246, 227, 161, .2); }
.hl-now { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; padding: clamp(1.4rem, 3.2vw, 3rem); border-inline-start: 1px solid var(--ck-line); }
.hl-now .ck-candle { margin-bottom: .9rem; }
.hl-today { font-size: .95rem; color: var(--muted); margin-bottom: .9rem; }
.hl-today b { font: 700 1.15rem/1 var(--serif); color: var(--gold1); margin-inline-start: .3rem; }
.hl-now .h2 { padding-block: .04em; }

.hl-wrap { align-items: center !important; }
.hl-months { margin-bottom: .3rem; }
.hl-list { display: flex; flex-direction: column; gap: .55rem; width: min(100%, 56rem); }
.hl-month { display: flex; align-items: center; gap: 1rem; margin: 1.3rem .3rem .25rem; font: 700 1.3rem/1.2 var(--serif); color: var(--gold1); }
.hl-month:first-child { margin-top: .4rem; }
.hl-month::after { content: ""; flex: 1; height: 1px; background: linear-gradient(to left, var(--ck-line2), transparent); }
.hl-month small { font: 400 .82rem/1 var(--sans); letter-spacing: .08em; color: var(--muted); }
.hl-row[hidden], .hl-month[hidden] { display: none; }
.hl-row a { position: relative; display: grid; grid-template-columns: 5.4rem minmax(0, 1fr) auto 1.3rem; align-items: center; gap: 1.2rem; padding: .85rem 1.3rem .85rem 1.1rem; border-radius: 18px; text-decoration: none; background: var(--ck-glass); border: 1px solid var(--ck-line); box-shadow: var(--ck-shadow-s); transition: transform .5s var(--ease), border-color .4s, box-shadow .5s; }
.hl-row a:hover, .hl-row a:focus-visible { transform: translateX(-.4rem); border-color: var(--ck-line2); box-shadow: var(--ck-lift); }
.hl-date { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding-inline-end: 1.1rem; border-inline-end: 1px solid var(--ck-line2); }
.hl-date b { font: 900 1.85rem/1.05 var(--serif); color: var(--gold1); }
.hl-date i { font-style: normal; font-size: .84rem; color: var(--muted); white-space: nowrap; }
.hl-who strong { display: block; font: 700 1.24rem/1.3 var(--serif); color: var(--ivory); }
.hl-who small { display: block; font-size: .86rem; color: var(--muted); }
.hl-when { display: flex; flex-direction: column; align-items: flex-end; gap: .12rem; font-size: .84rem; line-height: 1.5; color: var(--muted); white-space: nowrap; }
.hl-when b { font-size: .92rem; color: var(--gold1); }
.hl-go { color: var(--gold2); opacity: .6; transition: opacity .3s, transform .5s var(--ease); }
.hl-row a:hover .hl-go { opacity: 1; transform: translateX(-4px); }
.hl-row.is-next a, .hl-row.is-today a { border-color: var(--gold2); box-shadow: var(--ck-lift); }
.hl-row.is-next .hl-when b, .hl-row.is-today .hl-when b { padding: .08rem .8rem; border-radius: 999px; color: #231503; background: linear-gradient(180deg, #fff3c8, #e2b653); }
.hl-foot { max-width: 44rem; text-align: center; font-size: .86rem; line-height: 1.7; color: var(--muted); }
.hl-undated { width: min(100%, 56rem); margin-top: .6rem; padding-top: 1.4rem; border-top: 1px solid var(--ck-line); text-align: center; }

/* ------------------------------------------------------------ day: the few things the tokens do not cover */
html[data-theme="day"] .ck-card:hover::after { background-image: linear-gradient(105deg, transparent 32%, rgba(79, 134, 255, .08) 46%, rgba(255, 255, 255, .9) 50%, rgba(79, 134, 255, .08) 54%, transparent 68%); }
html[data-theme="day"] .ck-progress i { background: linear-gradient(to left, #0f1e72, #4f86ff 50%, #1f3cc0); box-shadow: 0 0 10px rgba(79, 134, 255, .6); }
html[data-theme="day"] .sg-body > p:first-of-type::first-letter { text-shadow: none; }
html[data-theme="day"] .sg-quote .ico { filter: none; }
html[data-theme="day"] .sg-chain-self { color: #fff; background: linear-gradient(165deg, #2b46b8, #0f1a60); box-shadow: 0 10px 24px -8px rgba(31, 60, 192, .6); }
html[data-theme="day"] .ck-card-hil i:not(:empty) { color: #fff; background: linear-gradient(165deg, #2b46b8, #0f1a60); }
html[data-theme="day"] .hl-row.is-next .hl-when b, html[data-theme="day"] .hl-row.is-today .hl-when b { color: #fff; background: linear-gradient(165deg, #2b46b8, #0f1a60); }

/* ------------------------------------------------------------ narrower screens */
@media (max-width: 1180px) {
  .ck-sky-drag { display: inline; }
  .ck-sky-svg { width: 1180px; min-width: 0; }
}
@media (max-width: 1020px) {
  .sg-grid { grid-template-columns: minmax(0, 1fr); }
  .sg-side { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)); align-items: start; }
  .hl-top { grid-template-columns: minmax(0, 1fr); }
  .hl-now { align-items: center; text-align: center; border-inline-start: 0; border-top: 1px solid var(--ck-line); }
  .hl-now .ck-next-cta { justify-content: center; }
}
@media (max-width: 900px) {
  .ck-next { grid-template-columns: minmax(0, 1fr); }
  .ck-next-side { border-inline-start: 0; border-top: 1px solid var(--ck-line); }
  .ck-sky-wrap { width: 100%; }
  .ck-sky { border-radius: 0; }
  .jewel { border-radius: 22px; }
  .sg-paper { border-radius: 20px; }
}
@media (max-width: 640px) {
  .ck-next-main { flex-direction: column; text-align: center; }
  .ck-next-cta { justify-content: center; }
  .ck-next-date b { display: table; margin: 0 auto .5rem; }
  .sg-body { font-size: var(--read, 1.12rem); line-height: 1.85; }
  .rg-m { font-size: 25px; }
  .rg-m.now { font-size: 28px; }
  .rg-c .c1 { font-size: 20px; }
  .rg-c .c2 { font-size: 40px; }
  .rg-c .c3 { font-size: 25px; }
  .hl-ring { padding: 2.2rem 2.6rem 1.6rem; }
  .ck-candle.is-big { font-size: 54px; }
  .ck-sky-svg { width: 1060px; }
  .ck-chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; width: calc(100% + 2 * var(--gut)); margin-inline: calc(-1 * var(--gut)); padding-inline: var(--gut); }
  .ck-chips::-webkit-scrollbar { display: none; }
  .ck-chips .chip-btn { flex: none; }
  .sg-chain { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .sg-chain-col.is-from, .sg-chain-col.is-to { align-items: center; text-align: center; }
  .sg-chain-col .sg-chips { justify-content: center !important; }
  .sg-chain-col.is-empty, .sg-chain-self::before, .sg-chain-self::after { display: none; }
  .sg-nav { grid-template-columns: 1fr 1fr; }
  .sg-nav-all { grid-column: 1 / -1; grid-row: 2; flex-direction: row; }
  .sg-nav-card { padding: .9rem 1rem; }
  .sg-nav-card strong { font-size: 1.12rem; }
  .hl-row a { grid-template-columns: 4.1rem minmax(0, 1fr) 1.1rem; gap: .25rem .9rem; padding: .8rem .9rem; }
  .hl-date { padding-inline-end: .8rem; grid-row: 1 / span 2; }
  .hl-date b { font-size: 1.5rem; }
  .hl-when { grid-column: 2; grid-row: 2; flex-direction: row; align-items: center; justify-content: flex-start; gap: .5rem; }
  .hl-go { grid-row: 1 / span 2; }
  .hl-who strong { font-size: 1.1rem; }
}
@media (min-width: 760px) {
  .sg-body > p { text-align: justify; }
}

/* ------------------------------------------------------------ calm + print */
@media (prefers-reduced-motion: reduce) {
  .mote { display: none; }
  .ln.s { stroke-dashoffset: 0; }
  .ln.d { opacity: .5; }
  .ck-candle.is-lit .ck-ff, .ck-candle.is-lit .ck-core, .ck-candle.is-lit .ck-halo, .ck-candle.is-lit .ck-warm, .ck-candle.is-lit .ck-glow { animation: none; }
  .ck-ner .ck-fi { transition: opacity .4s; }
}
@media print {
  .hdr, .mnav, .ftr, .sky, .grain, .ck-progress, .preview-pill, .toast, .sg-side, .sg-nav, .sg-crumbs, .skip { display: none !important; }
  html, body { background: #fff !important; }
  body.ck { color: #000; --ivory: #000; --muted: #333; --gold1: #000; --gold2: #555; }
  .sg-hero { padding: 0 0 1rem; }
  .sg-name, .sg-quote p, .foil { -webkit-text-fill-color: #000 !important; background: none !important; animation: none !important; color: #000 !important; }
  .sg-grid { display: block; width: 100%; }
  .sg-paper { padding: 0; border: 0; box-shadow: none; background: none; }
  .sg-paper::after { display: none; }
  .sg-body { font-size: 12.5pt; line-height: 1.75; }
  .sg-add { background: none !important; box-shadow: none !important; }
  .sg-chip { border: 0; padding: 0 .4rem; }
  .sg-portrait { width: 3.4cm; padding: 0; background: none; box-shadow: none; }
  .sg-portrait::after { display: none; }
}

/* ------------------------------------------------------------ without JavaScript: only what works by itself is shown */
html:not(.js) .hl-top, html:not(.js) .ck-tools, html:not(.js) .ck-next-side, html:not(.js) .ck-tip, html:not(.js) .sg-acts,
html:not(.js) [data-candle-btn], html:not(.js) .sg-hil-links, html:not(.js) [data-ics-all], html:not(.js) .hl-months { display: none; }
html:not(.js) .ck-next { grid-template-columns: minmax(0, 1fr); }
