/* «Нарва сегодня» (/segodnya, core/segodnya.html, 2026-11-14). The head is a live sky: its colours by the hour (dawn,
   day, dusk, night), clouds that drift, rain or snow that falls, stars at night, the sun on its arc; the cards come up as
   they reach the screen (js/segodnya.js adds .in). Without motion for readers who asked their device for less. */

.sg-page { width: 100%; max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }

/* ===== The sky ===== */
.sg-hero { position: relative; overflow: hidden; border-radius: 26px; color: #fff; isolation: isolate;
  --top: #3b82f6; --mid: #60a5fa; --low: #bfdbfe; --glow: rgba(253, 224, 71, .55); --town: rgba(15, 23, 42, .35);
  background: linear-gradient(180deg, var(--top) 0%, var(--mid) 55%, var(--low) 100%);
  box-shadow: 0 18px 40px -18px color-mix(in srgb, var(--top) 70%, transparent); }
.sg-hero.sky-dawn { --top: #6d28d9; --mid: #f472b6; --low: #fdba74; --glow: rgba(254, 215, 170, .8); --town: rgba(49, 16, 72, .45); }
.sg-hero.sky-dusk { --top: #312e81; --mid: #c2410c; --low: #fb923c; --glow: rgba(251, 146, 60, .75); --town: rgba(30, 10, 40, .5); }
.sg-hero.sky-night { --top: #020617; --mid: #0f1d4a; --low: #1e3a8a; --glow: rgba(191, 219, 254, .25); --town: rgba(0, 0, 0, .55); }
.sg-hero.sky-day.wx-cloudy, .sg-hero.sky-day.wx-rain, .sg-hero.sky-day.wx-fog, .sg-hero.sky-day.wx-storm {
  --top: #475569; --mid: #64748b; --low: #94a3b8; --glow: rgba(255, 255, 255, .15); }
.sg-hero.sky-day.wx-snow { --top: #64748b; --mid: #94a3b8; --low: #cbd5e1; --glow: rgba(255, 255, 255, .3); }
.sg-hero.sky-day.wx-partly { --top: #2563eb; --mid: #60a5fa; --low: #cbd5e1; }
.sg-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.sg-glow { position: absolute; width: 340px; height: 340px; right: -90px; top: -120px; border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 65%); animation: sg-breathe 7s ease-in-out infinite; }
.sky-dawn .sg-glow, .sky-dusk .sg-glow { right: auto; left: -100px; top: auto; bottom: -160px; width: 420px; height: 420px; }
/* The town (core/_narva_skyline.html, deploy/narva_skyline.py): old Narva of the old site's logo at the border on the
   right, the housing on the left; cut from the left on narrow screens. Windows are lit at dusk and night. */
.sg-skyline { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 56px; fill: var(--town); }
.sg-windows { fill: #fde68a; opacity: 0; transition: opacity 1.5s; }
.sky-dusk .sg-windows { opacity: .55; } .sky-night .sg-windows { opacity: .85; } .sky-dawn .sg-windows { opacity: .3; }
.sg-windows rect:nth-child(5n) { animation: sg-window 14s steps(1) infinite; }
.sg-windows rect:nth-child(7n) { animation: sg-window 19s steps(1) -6s infinite; }
@keyframes sg-window { 0%, 70% { opacity: 1; } 71%, 100% { opacity: 0; } }
/* Clouds (core/segodnya.html #sg-cloud-a/b): soft SVG puffs, a lit top and a shaded belly in the colours of the hour
   and the weather; far ones small, pale and slow, near ones bigger and faster; they drift across the whole head. */
.sg-hero { --cl-top: #ffffff; --cl-mid: #f1f5f9; --cl-bot: #c7d2e0; }
.sg-hero.sky-dawn { --cl-top: #fdf2f8; --cl-mid: #f9c6d8; --cl-bot: #f59e7a; }
.sg-hero.sky-dusk { --cl-top: #ffe8d1; --cl-mid: #f6a96b; --cl-bot: #9a3412; }
.sg-hero.sky-night { --cl-top: #6b7a95; --cl-mid: #3c4a66; --cl-bot: #1c2740; }
.sg-hero.sky-day.wx-cloudy, .sg-hero.sky-day.wx-fog, .sg-hero.sky-day.wx-snow { --cl-top: #f1f5f9; --cl-mid: #d5dce6; --cl-bot: #98a6b9; }
.sg-hero.sky-day.wx-rain, .sg-hero.sky-day.wx-storm { --cl-top: #b6c0cd; --cl-mid: #8793a3; --cl-bot: #4b5565; }
.sg-hero.wx-rain:not(.sky-day), .sg-hero.wx-storm:not(.sky-day) { --cl-mid: color-mix(in srgb, var(--cl-mid) 60%, #334155); --cl-bot: color-mix(in srgb, var(--cl-bot) 55%, #111827); }
.sg-cl-top { stop-color: var(--cl-top); } .sg-cl-mid { stop-color: var(--cl-mid); } .sg-cl-bot { stop-color: var(--cl-bot); }
.sg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sg-cl { position: absolute; left: 0; right: 0; top: var(--top); height: 0; animation: sg-drift var(--d) linear var(--l) infinite;
  will-change: transform; }
.sg-cl svg { position: absolute; left: 0; top: 0; width: var(--w); height: auto; opacity: var(--o); transform: translateX(-100%); overflow: visible;
  filter: drop-shadow(0 6px 10px rgba(15, 23, 42, .12)); }
.sg-cl:not(.near) svg { filter: blur(1.2px); }
.sg-cl.near { z-index: 1; }
@keyframes sg-drift { from { transform: translateX(-5%); } to { transform: translateX(calc(100% + 260px)); } }
/* A grey day's veil of cloud along the top */
.sg-deck { position: absolute; left: -10%; right: -10%; top: -30px; height: 90px; opacity: .85; filter: blur(14px);
  background: radial-gradient(60% 70% at 15% 40%, var(--cl-mid), transparent 70%), radial-gradient(55% 80% at 50% 30%, var(--cl-top), transparent 70%),
    radial-gradient(60% 70% at 85% 45%, var(--cl-mid), transparent 70%); animation: sg-veil 40s ease-in-out infinite alternate; }
@keyframes sg-veil { to { transform: translateX(6%); } }
/* Fog: banks of mist that drift against each other, the town sinks in them */
.sg-fog { position: absolute; left: -50%; width: 200%; height: 55%; pointer-events: none; filter: blur(10px);
  background: radial-gradient(40% 50% at 25% 50%, rgba(241, 245, 249, .55), transparent 70%),
    radial-gradient(35% 45% at 70% 55%, rgba(241, 245, 249, .5), transparent 70%); animation: sg-fogmove 38s ease-in-out infinite alternate; }
.sg-fog.f1 { bottom: -12%; } .sg-fog.f2 { bottom: 14%; opacity: .7; animation-duration: 52s; animation-direction: alternate-reverse; }
.sg-fog.f3 { bottom: 38%; opacity: .45; animation-duration: 65s; }
.wx-fog .sg-skyline { opacity: .45; }
@keyframes sg-fogmove { from { transform: translateX(-12%); } to { transform: translateX(12%); } }
/* Rain: slanting streaks of different length and brightness; a storm flashes */
.sg-rain { position: absolute; inset: -20% -10% 0; transform: rotate(12deg); }
.sg-rain i { position: absolute; left: var(--x); top: -30px; width: 1.6px; height: var(--h); border-radius: 2px; opacity: var(--o);
  background: linear-gradient(transparent, rgba(226, 238, 255, .95)); animation: sg-fall var(--d) linear var(--l) infinite; }
@keyframes sg-fall { to { transform: translateY(520px); } }
.sg-flash { position: absolute; inset: 0; background: #f8fafc; opacity: 0; animation: sg-flash 9s linear infinite; z-index: 2; }
.sg-bolt { position: absolute; right: 22%; top: 0; width: 34px; height: 76px; fill: #fef9c3; opacity: 0; z-index: 2;
  filter: drop-shadow(0 0 10px #fde047); animation: sg-flash 9s linear infinite; }
@keyframes sg-flash { 0%, 88%, 90%, 93%, 100% { opacity: 0; } 89% { opacity: .75; } 91% { opacity: .35; } 92% { opacity: .6; } }
/* Snow: flakes of different size; the near ones bigger, a little blurred and quicker, all of them swaying */
.sg-snow { position: absolute; inset: 0; }
.sg-snow i { position: absolute; left: var(--x); top: -12px; width: var(--s); height: var(--s); border-radius: 50%; background: #fff; opacity: var(--o);
  box-shadow: 0 0 4px rgba(255, 255, 255, .6); animation: sg-flake var(--d) linear var(--l) infinite; }
.sg-snow i.near { filter: blur(1px); }
@keyframes sg-flake { 0% { transform: translate(0, 0); } 25% { transform: translate(var(--w), 110px); } 50% { transform: translate(0, 220px); }
  75% { transform: translate(calc(var(--w) * -1), 330px); } 100% { transform: translate(0, 440px); } }
/* Night: stars that twinkle each in its own time, now and then a falling star, the moon in its real phase */
.sg-starfield i { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: #fff;
  box-shadow: 0 0 calc(var(--s) * 2) rgba(255, 255, 255, .8); animation: sg-twinkle var(--d) ease-in-out var(--l) infinite alternate; }
.sg-shoot { position: absolute; left: 8%; top: 8%; width: 110px; height: 2px; border-radius: 2px; opacity: 0;
  background: linear-gradient(90deg, transparent, #fff); transform: rotate(18deg); animation: sg-shoot 11s ease-in 3s infinite; }
@keyframes sg-shoot { 0%, 92% { opacity: 0; transform: rotate(18deg) translateX(0); } 93% { opacity: 1; } 100% { opacity: 0; transform: rotate(18deg) translateX(260px); } }
.sg-moon { position: absolute; right: 22px; top: 18px; width: 54px; height: 54px; overflow: visible;
  filter: drop-shadow(0 0 calc(4px + var(--glow) * .22px) rgba(254, 243, 199, calc(.25 + var(--glow) * .006))); animation: sg-float 9s ease-in-out infinite; }
.sg-hero:not(.wx-clear):not(.wx-partly) .sg-moon { opacity: .35; filter: blur(1.5px); }  /* behind the clouds */
.sg-moonline { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 2px; font-size: 12px; opacity: .92; }
.sg-sun .sg-moonline svg { flex: 0 0 auto; width: 16px; height: 16px; }
/* A clear day: soft rays from the sun's corner */
.sg-rays-sky { position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; opacity: .35;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .55) 0 6deg, transparent 6deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 70%); mask: radial-gradient(circle, #000 20%, transparent 70%);
  animation: sg-spin 80s linear infinite; }
@keyframes sg-twinkle { from { opacity: .25; transform: scale(.7); } to { opacity: 1; transform: none; } }
@keyframes sg-breathe { 50% { transform: scale(1.08); opacity: .85; } }

.sg-hero-in { position: relative; padding: 14px 16px 54px; text-shadow: 0 1px 12px rgba(0, 0, 0, .18); }
.sg-hello { margin: 0; font-size: 13px; font-weight: 600; opacity: .9; }
.sg-hero h1 { margin: 0; font-size: 26px; line-height: 1.05; letter-spacing: -.5px; color: #fff; }
.sg-date { margin: 2px 0 0; font-size: 15px; opacity: .95; }
.sg-date span { font-weight: 700; }
.sg-holiday { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 8px 0 0; padding: 5px 12px 5px 7px;
  border-radius: 30px; background: rgba(255, 255, 255, .2); backdrop-filter: blur(6px); font-size: 15px;
  animation: sg-pop .6s .3s cubic-bezier(.2, 1.4, .4, 1) both; }
.sg-holiday small { font-size: 13px; opacity: .9; }
.sg-flag { width: 26px; height: 17px; border-radius: 3px; background: linear-gradient(#0072ce 0 33.4%, #000 0 66.7%, #fff 0);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); animation: sg-wave 2.4s ease-in-out infinite; transform-origin: left center; }
.sg-hol-mourning .sg-flag { box-shadow: 0 0 0 1px rgba(255, 255, 255, .5), inset 0 -3px 0 #000; }
@keyframes sg-wave { 50% { transform: skewY(-4deg) scaleX(.94); } }
@keyframes sg-pop { from { opacity: 0; transform: scale(.85); } }

.sg-now { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: #fff; }
.sg-now:hover { text-decoration: none; }
.sg-now .sg-wx { width: 48px; height: 48px; flex: 0 0 auto; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .2)); animation: sg-float 6s ease-in-out infinite; }
.sg-rays { transform-origin: 24px 24px; animation: sg-spin 30s linear infinite; }
@keyframes sg-spin { to { transform: rotate(360deg); } }
@keyframes sg-float { 50% { transform: translateY(-5px); } }
.sg-temp { font-size: 46px; font-weight: 800; line-height: 1; letter-spacing: -2px; }
.sg-temp b { font-weight: inherit; }
.sg-now-words b { display: block; font-size: 16px; }
.sg-now-words small { display: block; margin-top: 1px; font-size: 12.5px; line-height: 1.35; opacity: .92; }

/* The sun's arc: sunrise at the left, sunset at the right, the dot where the sun is now (js) */
.sg-sun { position: relative; margin: 4px auto 0; max-width: 230px; }
.sg-sun svg { display: block; width: 100%; height: auto; overflow: visible; }
.sg-arc { fill: none; stroke: rgba(255, 255, 255, .35); stroke-width: 2; stroke-dasharray: 3 6; }
.sg-arc-done { fill: none; stroke: #fde68a; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1000; stroke-dashoffset: 1000;
  transition: stroke-dashoffset 1.6s cubic-bezier(.3, .7, .2, 1); }
.sg-horizon { stroke: rgba(255, 255, 255, .35); stroke-width: 1.5; }
.sg-sundot { fill: #fde047; transition: transform 1.6s cubic-bezier(.3, .7, .2, 1); }
.sg-sunhalo { fill: rgba(253, 224, 71, .35); animation: sg-halo 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.sg-sun.is-night .sg-sundot { fill: #e2e8f0; }
.sg-sun.is-night .sg-sunhalo { fill: rgba(226, 232, 240, .2); }
@keyframes sg-halo { 50% { transform: scale(1.35); opacity: .5; } }
.sg-rise, .sg-set { position: absolute; bottom: -4px; font-size: 13px; font-weight: 700; line-height: 1.1; }
.sg-rise small, .sg-set small { display: block; font-size: 11px; font-weight: 500; opacity: .85; }
.sg-rise { right: calc(100% + 8px); text-align: right; } .sg-set { left: calc(100% + 8px); }
.sg-daylen { display: block; margin-top: 2px; text-align: center; font-size: 12px; opacity: .9; }

.sg-parts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.sg-parts li { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 5px 2px 5px; border-radius: 13px;
  background: rgba(255, 255, 255, .17); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .22); text-align: center; }
.sg-parts small { font-size: 11px; white-space: nowrap; opacity: .92; line-height: 1.15; }
.sg-parts .sg-wx { width: 24px; height: 24px; }
.sg-parts b { font-size: 15px; }
.sg-rainp { font-size: 11px; color: #dbeafe; }

/* ===== The cards ===== */
.sg-card { position: relative; padding: 18px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); }
.sg-card h2 { margin: 0 0 12px; font-size: 19px; color: var(--strong); }
.sg-h { display: flex; align-items: center; gap: 10px; }
.sg-h > a { margin-left: auto; font-size: 14px; font-weight: 600; white-space: nowrap; }
.sg-hi { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--c);
  box-shadow: 0 5px 12px color-mix(in srgb, var(--c) 40%, transparent); }
.sg-hi svg { width: 19px; height: 19px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sg-n { padding: 1px 9px; border-radius: 12px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c);
  font-style: normal; font-size: 14px; }
.js-sg .sg-card { opacity: 0; transform: translateY(26px) scale(.985); transition: opacity .6s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.js-sg .sg-card.in { opacity: 1; transform: none; }
.sg-empty { margin: 0; }


.sg-lead { position: relative; display: block; overflow: hidden; border-radius: 16px; background: var(--chip); color: var(--strong); }
.sg-lead:hover { text-decoration: none; }
.sg-lead-pic, .sg-lead picture, .sg-lead img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .6s ease; }
.sg-lead:hover img { transform: scale(1.04); }
.sg-lead-text { display: block; padding: 12px 14px; }
.sg-lead:has(img) .sg-lead-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 50px 14px 12px; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .82)); }
.sg-lead-text b { display: block; font-size: 19px; line-height: 1.25; }
.sg-lead-text small { display: block; margin-top: 4px; font-size: 13px; opacity: .85; }
.sg-row { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); color: var(--text); }
.sg-row:last-of-type { border-bottom: 0; }
.sg-row:hover { text-decoration: none; }
.sg-row:hover b { color: var(--link); }
.sg-row > span { flex: 1 1 auto; min-width: 0; }
.sg-row b { display: block; font-size: 15.5px; line-height: 1.3; color: var(--strong); }
.sg-row small { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); }
.sg-row-pic, .sg-row picture, .sg-row img { flex: 0 0 auto; width: 88px; height: 64px; border-radius: 12px; object-fit: cover; order: 2; }

.sg-scroll { display: flex; gap: 12px; margin: 0 -18px; padding: 2px 18px 6px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; overscroll-behavior-x: contain; }
.sg-scroll::-webkit-scrollbar { display: none; }
.sg-scroll > a { scroll-snap-align: start; flex: 0 0 auto; color: var(--text); }
.sg-scroll > a:hover { text-decoration: none; }
.sg-ev { width: 172px; }
.sg-ev-pic, .sg-sk-pic { position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 16px; background: var(--chip); }
.sg-ev-pic { height: 118px; background: linear-gradient(135deg, #db2777, #7c3aed); }
.sg-ev-pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.sg-ev:hover img, .sg-sk:hover img { transform: scale(1.06); }
.sg-ev-ic { font-size: 42px; }
.sg-ev-time { position: absolute; left: 8px; bottom: 8px; padding: 3px 9px; border-radius: 10px; background: rgba(0, 0, 0, .72);
  color: #fff; font-size: 13px; font-weight: 700; backdrop-filter: blur(4px); }
.sg-ev b, .sg-sk b { display: -webkit-box; margin-top: 8px; font-size: 14.5px; line-height: 1.3; color: var(--strong);
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sg-ev small, .sg-sk small { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.sg-sk { width: 140px; }
.sg-sk-pic { height: 120px; background: #fff; }
.sg-sk-pic img { width: 100%; height: 100%; object-fit: contain; padding: 8px; transition: transform .5s ease; }
.sg-sk-pic em { position: absolute; top: 7px; left: 7px; padding: 3px 8px; border-radius: 9px; background: #dc2626; color: #fff;
  font-style: normal; font-weight: 800; font-size: 13px; transform: rotate(-4deg); }
.sg-price { font-size: 15px; font-weight: 800; color: #dc2626; }
.sg-sk s { margin-left: 2px; }

/* Electricity by hours: bars grow from the floor when the card comes up, the hour now glows */
.sg-power-now { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.sg-power-now small { width: 100%; font-size: 13px; color: var(--muted); }
.sg-power-now b { font-size: 30px; color: var(--strong); line-height: 1.1; }
.sg-power-now i { font-size: 14px; font-style: normal; font-weight: 600; color: var(--muted); }
.sg-tag { padding: 2px 10px; border-radius: 10px; font-size: 13px; font-weight: 700; }
.sg-tag.ok { background: color-mix(in srgb, #16a34a 18%, transparent); color: #16a34a; }
.sg-tag.bad { background: color-mix(in srgb, #dc2626 16%, transparent); color: #dc2626; }
.sg-bars { display: flex; align-items: flex-end; gap: 3px; height: 92px; margin-top: 14px; }
.sg-bar { position: relative; flex: 1 1 0; height: var(--h); min-height: 4px; border-radius: 4px 4px 2px 2px; transform-origin: bottom;
  background: #f59e0b; }
.sg-bar.cheap { background: #22c55e; } .sg-bar.dear { background: #ef4444; }
.sg-bar.past { opacity: .35; }
.sg-bar.is-now { opacity: 1; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--strong); }
.sg-bar.is-now::after { content: "сейчас"; position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%);
  padding: 1px 6px; border-radius: 6px; background: var(--strong); color: var(--card); font-size: 10px; font-weight: 700; white-space: nowrap; }
.js-sg .sg-card .sg-bar { transform: scaleY(0); transition: transform .7s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i) * 25ms + .2s); }
.js-sg .sg-card.in .sg-bar { transform: none; }
.sg-bars-axis { display: flex; justify-content: space-between; margin-top: 4px; font-size: 11px; color: var(--muted); }
.sg-tip { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 0; padding: 10px 12px; border-radius: 14px; font-size: 14.5px; line-height: 1.4; }
.sg-tip.ok { background: color-mix(in srgb, #16a34a 12%, transparent); }
.sg-tip.bad { background: color-mix(in srgb, #dc2626 9%, transparent); }
.sg-power > small { display: block; margin-top: 8px; font-size: 12px; }
.sg-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-top: 14px; }
.sg-tile { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border-radius: 14px; background: var(--chip); color: var(--text); }
.sg-tile:hover { text-decoration: none; }
.sg-tile small { font-size: 12px; color: var(--muted); }
.sg-tile b { font-size: 18px; color: var(--strong); }
.sg-tile span { font-size: 12px; font-weight: 700; }
.sg-tile .down, .sg-power .down { color: #16a34a; } .sg-tile .up { color: #dc2626; }

.sg-big { margin: 0 0 6px; font-size: 16px; color: var(--text); }
.sg-big b { font-size: 34px; color: var(--strong); margin-right: 4px; }
.sg-job em { flex: 0 0 auto; padding: 4px 10px; border-radius: 10px; background: color-mix(in srgb, #2563eb 14%, transparent);
  color: #2563eb; font-style: normal; font-weight: 700; font-size: 13px; max-width: 45%; text-align: right; }
[data-tone="dark"] .sg-job em { color: #93c5fd; }

.sg-mk { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sg-mk a { position: relative; display: block; color: var(--text); }
.sg-mk a:hover { text-decoration: none; }
.sg-mk-pic, .sg-mk picture, .sg-mk img { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 14px; object-fit: cover; background: var(--chip); }
.sg-mk-t { display: -webkit-box; margin-top: 6px; font-size: 14px; line-height: 1.3; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sg-mk em { position: absolute; top: 8px; left: 8px; padding: 3px 9px; border-radius: 9px; background: rgba(0, 0, 0, .72);
  color: #fff; font-style: normal; font-size: 13px; font-weight: 700; }
.sg-add { display: block; margin-top: 12px; padding: 11px; border-radius: 14px; border: 1.5px dashed color-mix(in srgb, #f59e0b 60%, var(--line));
  text-align: center; font-weight: 700; color: var(--strong); }
.sg-add:hover { text-decoration: none; background: color-mix(in srgb, #f59e0b 10%, transparent); }

.sg-bubble { flex: 0 0 auto; position: relative; padding: 3px 10px; border-radius: 12px 12px 12px 3px; background: #10b981; color: #fff;
  font-style: normal; font-weight: 800; font-size: 13px; }
.sg-talk:first-of-type .sg-bubble { animation: sg-pulse 2.2s ease-in-out infinite; }
@keyframes sg-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .5); } 60% { box-shadow: 0 0 0 9px rgba(16, 185, 129, 0); } }
.sg-cotd { margin-top: 12px; padding: 14px; border-radius: 16px; background: color-mix(in srgb, #eab308 10%, var(--chip)); }
.sg-cotd > small { font-weight: 700; color: var(--muted); }
.sg-cotd-who { display: flex; align-items: center; gap: 8px; margin: 8px 0 6px; color: var(--strong); }
.sg-cotd-who .avatar, .sg-cotd-who img { width: 30px; height: 30px; border-radius: 50%; font-size: 13px; }
.sg-cotd-what { font-size: 15px; line-height: 1.5; }
.sg-cotd-what p { margin: 0 0 6px; }
.sg-cotd > a { font-size: 13.5px; }

.sg-past { margin: 0; padding: 0 0 0 4px; list-style: none; }
.sg-past li { position: relative; display: flex; gap: 14px; padding: 0 0 16px 18px; border-left: 2px solid color-mix(in srgb, #8b5cf6 40%, var(--line)); }
.sg-past li:last-child { padding-bottom: 2px; border-left-color: transparent; }
.sg-past li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: #8b5cf6;
  box-shadow: 0 0 0 4px color-mix(in srgb, #8b5cf6 22%, transparent); }
.sg-year { flex: 0 0 74px; line-height: 1.1; }
.sg-year b { display: block; font-size: 18px; color: var(--strong); }
.sg-year small { font-size: 12px; color: var(--muted); }
.sg-past a { font-size: 15px; line-height: 1.35; color: var(--text); }

.sg-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0 10px; text-align: center; }
.sg-share { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 23px; font-size: 16px; }

@media (min-width: 700px) {
  .sg-hero-in { padding: 22px 28px 78px; }
  .sg-skyline { height: auto; aspect-ratio: 1200 / 112; }  /* the whole town, its towers not cut */
  .sg-hero h1 { font-size: 34px; }
  .sg-mk { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sg-ev { width: 196px; } .sg-ev-pic { height: 132px; }
}
@media (max-width: 380px) {
  .sg-temp { font-size: 40px; }
  .sg-hero h1 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .sg-hero *, .sg-card, .sg-bar, .sg-bubble { animation: none !important; transition: none !important; }
  .js-sg .sg-card, .js-sg .sg-card .sg-bar { opacity: 1; transform: none; }
  .sg-rain, .sg-snow, .sg-flash, .sg-bolt, .sg-shoot { display: none; }
  .sg-cl { transform: translateX(calc((100% + 260px) * var(--p))); }
}
