/* ==============================================================================
   NATIONAL DAY - «اليوم الوطني», 20 November
   The occasion style (templates/nationalday + blocks/nationalday) is the fiction
   template copied as it is; this sheet only paints what is BEHIND it: a living Muscat
   scene (blocks/nationalday/Scene.php) and the flag bunting under the menu. Every rule
   sits under body.theme-nd, so the fiction style never sees any of it. The two yellow
   buttons (sign in, the poll) take the flag's colours (section 8).

   The scene follows the time in Muscat ([data-time] = dawn | day | dusk | night, set by
   Scene.php and kept current by nationalday.js): the sky, the colour of the land, the
   stars, the moon, the lit windows. The script also moves the layers with the
   pointer (--nd-px / --nd-py, -1..1) and draws the fireworks after dark.

   Sections: 1 page - 2 scene box - 3 times of day - 4 sky details - 5 land - 6 flag +
   incense - 7 bunting - 8 sign-in, poll, footer - 9 phone - 10 reduced motion
   ============================================================================== */

/* ------------------------------------------------------------------ 1. page */
/* The night under the page, where the original had a teal photo / video. */
body.theme-nd,
body.theme-nd.page-home {
	background: var(--nd-base, #06071a) !important;   /* the top of this hour's sky (section 8) */
	background-image: none !important;
}

body.theme-nd .flex-root {
	position: relative;
}

/* No z-index here: it would make .page a stacking context and trap every Bootstrap modal
   inside it (the sign-in modal lives in the header) under the backdrop Bootstrap appends to
   <body>. The scene comes before .page in the DOM, so .page still paints over it. */
body.theme-nd .page,
body.theme-nd .wrapper {
	position: relative;
	background: transparent;
}

/* The inner pages' title band: room for the city standing at its foot. site.css's dark
   ramp behind the title is not needed over the scene. */
.theme-nd .page-hero::before {
	background: none;
}

.theme-nd .page-hero-inner {
	padding-bottom: 110px;
}

/* ------------------------------------------------------------------ 2. scene box */
.theme-nd .nd-scene {
	position: absolute;
	inset: 0 0 auto 0;
	height: var(--nd-band, 360px);   /* the script sets it to the bottom of the title band */
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
	--nd-px: 0;
	--nd-py: 0;
}

.theme-nd .nd-scene.is-home {
	position: fixed;
	inset: 0;
	height: auto;
}

.theme-nd .nd-scene > * {
	position: absolute;
}

.theme-nd .nd-sky-layer,
.theme-nd .nd-glow,
.theme-nd .nd-stars,
.theme-nd .nd-fireworks,
.theme-nd .nd-tint {
	inset: 0;
}

.theme-nd .nd-fireworks {
	width: 100%;
	height: 100%;
}

.theme-nd .nd-sky-layer {
	opacity: 0;
	transition: opacity 2.5s ease;
}

/* ------------------------------------------------------------------ 3. times of day */
.theme-nd .nd-sky-layer.is-night {
	background:
		radial-gradient(90% 50% at 50% 102%, rgba(255, 150, 70, .30) 0%, rgba(220, 90, 60, .12) 45%, transparent 70%),
		linear-gradient(180deg, #06071a 0%, #150d2b 35%, #341a36 62%, #5e2c30 84%, #7c4630 100%);   /* the dusk, much darker */
}

.theme-nd .nd-sky-layer.is-dusk {
	background:
		radial-gradient(90% 55% at 50% 100%, rgba(255, 170, 90, .65) 0%, rgba(240, 110, 70, .25) 45%, transparent 70%),
		linear-gradient(180deg, #141633 0%, #3b2350 35%, #8a3b55 62%, #d96a4a 82%, #f2a65a 100%);
}

.theme-nd .nd-sky-layer.is-dawn {
	background:
		radial-gradient(90% 50% at 50% 100%, rgba(255, 214, 160, .6) 0%, transparent 65%),
		linear-gradient(180deg, #1d3557 0%, #4f6a93 40%, #c98f86 75%, #f4cfa0 100%);
}

/* the day: clear azure above, a warm haze at the horizon (dawn's horizon family). The
   home's white text reads through the tint and the tinted glass, not through a dull sky. */
.theme-nd .nd-sky-layer.is-day {
	background:
		radial-gradient(70% 45% at 78% 0%, rgba(255, 244, 210, .45), transparent 60%),
		linear-gradient(180deg, #1c5fa8 0%, #3f8fd0 38%, #8cc0e0 68%, #f0d9b0 90%, #f7e2bd 100%);
}

/* Inner pages have no tint and squeeze the sky into the title band: the blue stays deep
   down to the skyline, so the white title and crumbs read on it; the haze is at its foot. */
.theme-nd .is-page .nd-sky-layer.is-day {
	background:
		radial-gradient(60% 70% at 82% 0%, rgba(255, 244, 210, .28), transparent 60%),
		linear-gradient(180deg, #164a8c 0%, #1f5fa6 40%, #2b72b8 64%, #86b6dc 86%, #f0d9b0 100%);
}

.theme-nd [data-time="night"] .is-night,
.theme-nd [data-time="dusk"] .is-dusk,
.theme-nd [data-time="dawn"] .is-dawn,
.theme-nd [data-time="day"] .is-day {
	opacity: 1;
}

/* The land and the windows, per time. */
.theme-nd .nd-scene {
	--nd-c-far: rgba(44, 22, 44, .8);
	--nd-c-city: #130a1a;
	--nd-c-near: #0a040e;
	--nd-c-pole: #a08474;
	--nd-glow: .45;
	--nd-win: .95;
	--nd-stars: 1;
	--nd-moon: 1;
	--nd-clouds: 0;
	--nd-flag: .82;
}

.theme-nd .nd-scene[data-time="dusk"] {
	--nd-c-far: rgba(90, 44, 74, .7);
	--nd-c-city: #2a1630;
	--nd-c-near: #1a0c1f;
	--nd-c-pole: #b88f7c;
	--nd-win: .75;
	--nd-stars: .3;
	--nd-moon: .85;
	--nd-clouds: .45;
	--nd-flag: .95;
}

.theme-nd .nd-scene[data-time="dawn"] {
	--nd-c-far: rgba(93, 107, 138, .75);
	--nd-c-city: #343a58;
	--nd-c-near: #232740;
	--nd-c-pole: #b6b6c8;
	--nd-win: .35;
	--nd-stars: .15;
	--nd-moon: 0;
	--nd-clouds: .55;
	--nd-flag: 1;
}

/* by day the town stands in the haze: slate blue, the cool side of the same sky */
.theme-nd .nd-scene[data-time="day"] {
	--nd-c-far: rgba(120, 150, 185, .7);
	--nd-c-city: #3d5578;
	--nd-c-near: #24364f;
	--nd-c-pole: #e6edf5;
	--nd-win: 0;
	--nd-stars: 0;
	--nd-moon: 0;
	--nd-clouds: .9;
	--nd-flag: 1;
}

/* The home puts white text over the land (the six tiles, the footer): by day it stays one
   step darker there, so the words keep their contrast. */
.theme-nd .nd-scene.is-home[data-time="day"] {
	--nd-c-far: rgba(84, 112, 150, .75);
	--nd-c-city: #2c4263;
	--nd-c-near: #1a2940;
}

/* the flag glows keep the strength they always had at dawn and dusk */
.theme-nd .nd-scene[data-time="dawn"],
.theme-nd .nd-scene[data-time="dusk"],
.theme-nd .nd-scene[data-time="day"] {
	--nd-glow: 1.1;
}

/* ------------------------------------------------------------------ 4. sky details */
.theme-nd .nd-glow {
	background:
		radial-gradient(40% 45% at 85% 100%, rgba(209, 16, 43, .28), transparent 70%),
		radial-gradient(40% 45% at 15% 100%, rgba(0, 132, 61, .28), transparent 70%);
	opacity: calc(var(--nd-stars) * var(--nd-glow));
	transition: opacity 2.5s ease;
}

.theme-nd .nd-stars {
	opacity: var(--nd-stars);
	transition: opacity 2.5s ease;
	transform: translate3d(calc(var(--nd-px) * 2px), calc(var(--nd-py) * 1px), 0);
	-webkit-mask-image: linear-gradient(180deg, #000 0%, #000 50%, transparent 85%);
	mask-image: linear-gradient(180deg, #000 0%, #000 50%, transparent 85%);
}

.theme-nd .nd-stars,
.theme-nd .nd-stars::before,
.theme-nd .nd-stars::after {
	background-repeat: repeat;
}

.theme-nd .nd-stars {
	background-image:
		radial-gradient(1px 1px at 20px 30px, #fff 50%, transparent 51%),
		radial-gradient(1px 1px at 120px 80px, rgba(255, 255, 255, .8) 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 200px 20px, #fff 50%, transparent 51%),
		radial-gradient(1px 1px at 260px 140px, rgba(255, 255, 255, .7) 50%, transparent 51%),
		radial-gradient(1px 1px at 80px 190px, rgba(255, 255, 255, .6) 50%, transparent 51%);
	background-size: 300px 220px;
}

.theme-nd .nd-stars::before,
.theme-nd .nd-stars::after {
	content: '';
	position: absolute;
	inset: 0;
}

.theme-nd .nd-stars::before {
	background-image:
		radial-gradient(2px 2px at 60px 60px, #fff6d8 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 330px 120px, #fff 50%, transparent 51%),
		radial-gradient(2px 2px at 470px 40px, #fff6d8 50%, transparent 51%);
	background-size: 520px 260px;
	animation: nd-twinkle 4.5s ease-in-out infinite alternate;
}

.theme-nd .nd-stars::after {
	background-image:
		radial-gradient(1px 1px at 150px 100px, #fff 50%, transparent 51%),
		radial-gradient(1px 1px at 390px 30px, #fff 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 640px 160px, #d6f5ee 50%, transparent 51%);
	background-size: 700px 240px;
	animation: nd-twinkle 6s ease-in-out 1.5s infinite alternate;
}

@keyframes nd-twinkle {
	from { opacity: .25; }
	to { opacity: 1; }
}

/* The crescent (هلال), rising once when the page opens. Drawn as the lit edge of a disc:
   an inset shadow whose offset is a share of the size, so any size keeps the same shape. */
.theme-nd .nd-moon {
	--s: var(--nd-moon-size, 46px);
	top: 150px;
	right: 44%;
	width: var(--s);
	height: var(--s);
	border-radius: 50%;
	background: transparent;
	box-shadow: inset calc(var(--s) * -.26) calc(var(--s) * .08) 0 0 #f7efd9;
	filter: drop-shadow(0 0 6px rgba(255, 240, 200, .7)) drop-shadow(0 0 18px rgba(255, 230, 170, .3));
	opacity: var(--nd-moon);
	transform: translate3d(calc(var(--nd-px) * 3px), calc(var(--nd-py) * 2px), 0) rotate(-18deg);
	transition: opacity 2.5s ease;
	animation: nd-moonrise 3.5s cubic-bezier(.2, .7, .2, 1) both;
}

/* On the home: in the header between the last menu link and search (placed and sized
   by nationalday.js). */
.theme-nd .is-home .nd-moon {
	top: var(--nd-moon-top, auto);
	bottom: auto;
	left: var(--nd-moon-left, auto);
	right: auto;
	transform: rotate(-18deg);
	animation: none;
}

/* without the script (or when the menu is folded into the phone drawer): no moon */
.theme-nd .is-home:not([style*="--nd-moon-top"]) .nd-moon {
	display: none;
}

/* On inner pages the crescent is part of the title: just before its first word (the
   reading side), sized by the title's own font, so it follows it at every width. The
   sky's crescent is not drawn there. */
.theme-nd .is-page .nd-moon {
	display: none;
}

.theme-nd .page-hero-title::before {
	content: '';
	display: inline-block;
	width: .6em;
	height: .6em;
	margin-inline-end: .3em;
	vertical-align: .02em;
	border-radius: 50%;
	box-shadow: inset -.16em .05em 0 0 #f7efd9;
	filter: drop-shadow(0 0 6px rgba(255, 240, 200, .7));
	transform: rotate(-18deg);
}

/* the moon belongs to the evening: no crescent before the title at dawn or by day
   (follows the scene's time, so the test bar switches it live) */
body:has(.nd-scene[data-time="day"]) .page-hero-title::before,
body:has(.nd-scene[data-time="dawn"]) .page-hero-title::before {
	display: none;
}

@keyframes nd-moonrise {
	from { margin-top: 60px; opacity: 0; }
	to { margin-top: 0; }
}

/* Clouds by day (and a few, tinted, at dawn and dusk). */
.theme-nd .nd-clouds {
	inset: 0;
	opacity: var(--nd-clouds);
	transition: opacity 2.5s ease;
}

.theme-nd .nd-clouds i {
	position: absolute;
	display: block;
	width: 260px;
	height: 60px;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
	filter: blur(6px);
	animation: nd-drift 140s linear infinite;
}

.theme-nd .nd-clouds i::before {
	content: '';
	position: absolute;
	inset: -30px 40px 10px 60px;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
}

.theme-nd .nd-clouds i:nth-child(1) { top: 12%; animation-delay: -20s; }
.theme-nd .nd-clouds i:nth-child(2) { top: 26%; width: 340px; animation-duration: 190s; animation-delay: -110s; }
.theme-nd .nd-clouds i:nth-child(3) { top: 6%; width: 200px; animation-duration: 160s; animation-delay: -70s; }

.theme-nd [data-time="dusk"] .nd-clouds i,
.theme-nd [data-time="dusk"] .nd-clouds i::before {
	background: radial-gradient(closest-side, rgba(255, 180, 140, .5), rgba(255, 180, 140, 0));
}

@keyframes nd-drift {
	from { transform: translateX(-30vw); }
	to { transform: translateX(130vw); }
}

/* The home keeps a tint like the original's video overlay, so the white text on the glass
   cards reads in every phase (strongest by day). It fades out before the land. */
/* It runs down to the service tiles (they end ~85% down the screen) and sits UNDER the
   land, so the skyline keeps its colours. Dawn and day are bright at the horizon, where the
   tiles' white words are, so they get the most. */
.theme-nd .nd-tint {
	z-index: 0;
	background: linear-gradient(180deg, rgba(8, 8, 24, .35) 0%, rgba(16, 10, 28, .35) 45%, rgba(30, 10, 28, .45) 75%, rgba(30, 10, 28, .2) 92%);
	transition: background 2.5s ease;
}

.theme-nd [data-time="dusk"] .nd-tint {
	background: linear-gradient(180deg, rgba(10, 10, 30, .35) 0%, rgba(20, 12, 34, .35) 45%, rgba(40, 14, 36, .45) 75%, rgba(40, 14, 36, .2) 92%);
}

.theme-nd [data-time="dawn"] .nd-tint {
	background: linear-gradient(180deg, rgba(0, 25, 35, .55) 0%, rgba(0, 35, 48, .45) 45%, rgba(0, 35, 48, .55) 75%, rgba(0, 35, 48, .35) 92%);
}

/* by day the tint is the sky's own navy, lighter than dawn's: the glass carries the words */
.theme-nd [data-time="day"] .nd-tint {
	background: linear-gradient(180deg, rgba(8, 28, 62, .42) 0%, rgba(10, 34, 70, .30) 45%, rgba(10, 34, 70, .34) 75%, rgba(10, 34, 70, .22) 92%);
}

.theme-nd .is-home .nd-ground {
	z-index: 1;
}

/* The quiet map of Oman (home only, nationalday.js «the quiet map»): faint dots in the sky
   on the side of the news column, under the tint so the cards keep reading. Brightest at
   night; desktops only - on a phone it would sit right under the content. */
.theme-nd .nd-map {
	z-index: 0;
	top: 13vh;
	inset-inline-end: 3vw;
	width: min(34vw, 50vh);
	height: 66vh;
	opacity: .4;
	transition: opacity 2.5s ease;
}

.theme-nd [data-time="night"] .nd-map {
	opacity: .55;
}

.theme-nd [data-time="dusk"] .nd-map {
	opacity: .5;
}

@media (max-width: 991.98px) {
	.theme-nd .nd-map {
		display: none;
	}
}

/* the Riyam smoke would rise behind a service tile's words on the home */
.theme-nd .is-home .nd-smoke {
	display: none;
}

/* ------------------------------------------------------------------ 5. land */
.theme-nd .nd-ground {
	left: 0;
	right: 0;
	bottom: 0;
	height: 150px;
}

.theme-nd .is-home .nd-ground {
	height: 17vh;
	min-height: 120px;
}

.theme-nd .nd-land {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.theme-nd .nd-land g,
.theme-nd .nd-land path,
.theme-nd .nd-land rect {
	transition: fill 2.5s ease, opacity 2.5s ease;
}

.theme-nd .nd-far {
	fill: var(--nd-c-far);
	transform: translate(calc(var(--nd-px) * 5px), calc(var(--nd-py) * 2px));
}

.theme-nd .nd-city {
	fill: var(--nd-c-city);
	transform: translate(calc(var(--nd-px) * 11px), calc(var(--nd-py) * 4px));
}

.theme-nd .nd-near {
	fill: var(--nd-c-near);
	transform: translate(calc(var(--nd-px) * 20px), calc(var(--nd-py) * 6px));
}

.theme-nd .nd-win {
	fill: #f6c453;
	opacity: var(--nd-win);
	animation: nd-flicker 5s ease-in-out infinite alternate;
	animation-delay: var(--d, 0s);
}

@keyframes nd-flicker {
	0%, 70% { filter: none; }
	100% { filter: brightness(1.35); }
}

/* ------------------------------------------------------------------ 6. flag + incense */
.theme-nd .nd-flag-pole {
	fill: var(--nd-c-pole);
}

.theme-nd .nd-flag {
	opacity: var(--nd-flag);
	transition: opacity 2.5s ease;
}

.theme-nd .nd-flag-cloth {
	transform-box: fill-box;
	transform-origin: 0 0;
	animation: nd-wave 2.4s ease-in-out infinite;
}

@keyframes nd-wave {
	0% { transform: skewY(0deg) scaleX(1); }
	25% { transform: skewY(5deg) scaleX(.93); }
	50% { transform: skewY(1deg) scaleX(.98); }
	75% { transform: skewY(-4deg) scaleX(.94); }
	100% { transform: skewY(0deg) scaleX(1); }
}

.theme-nd .nd-burner {
	fill: var(--nd-c-city);
}

/* the embers glow after dark */
.theme-nd [data-time="night"] .nd-burner,
.theme-nd [data-time="dusk"] .nd-burner {
	filter: drop-shadow(0 -2px 3px rgba(255, 150, 60, .85));
}

/* Three wisps travel up their curls and fade. */
.theme-nd .nd-smoke path {
	fill: none;
	stroke: rgba(244, 236, 220, .8);
	stroke-width: 3.2;
	stroke-linecap: round;
	stroke-dasharray: 26 170;
	stroke-dashoffset: 196;
	animation: nd-wisp 7s linear infinite;
	filter: blur(.6px);
}

.theme-nd [data-time="day"] .nd-smoke path {
	stroke: rgba(255, 255, 255, .8);
}

.theme-nd .nd-smoke .nd-smoke-2 {
	animation-duration: 8.5s;
	animation-delay: -3s;
}

.theme-nd .nd-smoke .nd-smoke-3 {
	animation-duration: 6.2s;
	animation-delay: -5s;
	stroke-width: 2.4;
}

@keyframes nd-wisp {
	0% { stroke-dashoffset: 196; opacity: 0; }
	12% { opacity: 1; }
	80% { opacity: .7; }
	100% { stroke-dashoffset: -10; opacity: 0; }
}

/* ------------------------------------------------------------------ 7. bunting */
/* Red, white and green pennants strung under the menu, as on the streets in November. */
.theme-nd .nd-bunting {
	position: absolute;
	inset: 78px 0 auto 0;
	height: 52px;
	z-index: 2;
	background: url(../../../images/nationalday/bunting.svg) center top / auto 52px repeat-x;
	pointer-events: none;
	animation: nd-sway 6s ease-in-out infinite alternate;
	filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .35));
}

@keyframes nd-sway {
	from { transform: translateY(0); }
	to { transform: translateY(3px); }
}

/* ------------------------------------------------------------------ 8. sign-in, poll, footer */
/* The two yellow buttons of the original (sign in, the poll) are warm gold: the colour of
   the crescent and of the drone show, so the page reads as one night. Dark ink on gold
   (#1b1400 on #f0c45c: 11:1). A soft light sweeps across them now and then. */
.theme-nd {
	--nd-gold: #f0c45c;
	--nd-gold-hi: #fbe3a1;
	--nd-gold-deep: #c98f2c;
	--nd-gold-ink: #1b1400;
	--nd-gold-fill: linear-gradient(180deg, #fbe3a1 0%, #f0c45c 48%, #d9a640 100%);
	--nd-flag-line: linear-gradient(90deg, #c8102e 0 24%, #fff 24% 50%, #c8102e 50% 75%, #00843d 75% 100%);
}

.theme-nd #kt_header .btn.btn-warning {
	position: relative;
	overflow: hidden;
	border: 1px solid rgba(255, 236, 190, .7) !important;
	background: var(--nd-gold-fill) !important;
	color: var(--nd-gold-ink) !important;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 8px 22px -10px rgba(240, 196, 92, .9) !important;
	transition: filter .2s ease, box-shadow .2s ease;
}

.theme-nd #kt_header .btn.btn-warning:hover,
.theme-nd #kt_header .btn.btn-warning:focus-visible {
	filter: brightness(1.06);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 10px 26px -8px rgba(240, 196, 92, 1) !important;
}

.theme-nd #kt_header .btn.btn-warning .ic,
.theme-nd #kt_header .btn.btn-warning span {
	position: relative;
	z-index: 1;
	color: var(--nd-gold-ink) !important;
}

.theme-nd #kt_header .btn.btn-warning::after,
.theme-nd .poll-launcher::after,
.theme-nd .poll-submit:not(:disabled)::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .5) 50%, transparent 65%);
	transform: translateX(-130%);
	animation: nd-shine 6s ease-in-out infinite;
	pointer-events: none;
}

@keyframes nd-shine {
	0%, 75% { transform: translateX(-130%); }
	100% { transform: translateX(130%); }
}

/* the poll's tab on the screen edge */
.theme-nd .poll-launcher {
	background: var(--nd-gold-fill) !important;
	color: var(--nd-gold-ink);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 8px 20px -8px rgba(240, 196, 92, .9);
}

.theme-nd .poll-launcher:hover,
.theme-nd .poll-launcher:focus-visible,
.theme-nd .poll-dock.is-open .poll-launcher {
	filter: brightness(1.06);
}

.theme-nd .poll-launcher-icon,
.theme-nd .poll-launcher-text {
	position: relative;
	z-index: 1;
	color: var(--nd-gold-ink);
}

.theme-nd .poll-dot,
.theme-nd .poll-dot::after {
	background: var(--nd-gold-deep);
}

/* the card: a thin gold light along its top, gold accents inside */
.theme-nd .poll-card::before {
	content: '';
	position: absolute;
	inset: 0 0 auto 0;
	height: 3px;
	background: linear-gradient(90deg, transparent, var(--nd-gold) 20%, var(--nd-gold-hi) 50%, var(--nd-gold) 80%, transparent);
}

.theme-nd .poll-head-icon {
	background: var(--nd-gold-fill);
	color: var(--nd-gold-ink);
}

.theme-nd .poll-choice.is-picked .poll-choice-mark {
	border-color: var(--nd-gold);
}

.theme-nd .poll-choice-mark::after {
	background: var(--nd-gold);
}

.theme-nd .poll-submit {
	background: var(--nd-gold-fill);
	color: var(--nd-gold-ink);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
}

.theme-nd .poll-submit:not(:disabled):hover {
	filter: brightness(1.06);
}

.theme-nd .poll-submit.is-voting,
.theme-nd .poll-submit.is-success {
	box-shadow: none;
}

.theme-nd .poll-submit.is-success {
	background: #00a39a;
	color: #fff;
}

.theme-nd .poll-submit.is-voting::after,
.theme-nd .poll-submit.is-success::after {
	content: none;
}

/* results: the leading answer in gold, the reader's own choice in a paler gold */
.theme-nd .poll-result.is-top .poll-bar,
.theme-nd .poll.is-glass .poll-result.is-top .poll-bar {
	background: linear-gradient(90deg, var(--nd-gold-deep), var(--nd-gold));
}

.theme-nd .poll-result.is-mine .poll-bar {
	background: var(--nd-gold-hi);
}

/* The glass cards of the home (carousel, news column, the six tiles). The original glass is
   10% white with no edge: it vanished at night and washed out by day. Here each time of
   day has its own glass, tinted from that sky, with a thin light edge, so the card stands
   off the background and its white words read. The phase is read from the scene, as the
   title's crescent does; without :has() the night glass serves every phase. */
body.theme-nd {
	--nd-glass: rgba(26, 12, 38, .46);
	--nd-glass-line: rgba(255, 214, 190, .24);
	--nd-glass-shadow: 0 14px 34px -18px rgba(3, 4, 20, .8);
}

body.theme-nd:has(.nd-scene[data-time="day"]) {
	--nd-glass: rgba(14, 44, 84, .42);
	--nd-glass-line: rgba(255, 255, 255, .28);
	--nd-glass-shadow: 0 14px 34px -18px rgba(8, 28, 62, .7);
}

body.theme-nd:has(.nd-scene[data-time="dawn"]) {
	--nd-glass: rgba(30, 40, 72, .34);
	--nd-glass-line: rgba(255, 255, 255, .22);
	--nd-glass-shadow: 0 14px 34px -18px rgba(14, 20, 44, .7);
}

body.theme-nd:has(.nd-scene[data-time="dusk"]) {
	--nd-glass: rgba(36, 18, 48, .36);
	--nd-glass-line: rgba(255, 214, 190, .22);
	--nd-glass-shadow: 0 14px 34px -18px rgba(20, 8, 28, .75);
}

.theme-nd .adss-banner {
	background: var(--nd-glass) !important;
	border: 1px solid var(--nd-glass-line) !important;
	box-shadow: var(--nd-glass-shadow);
	/* no blur: the quiet map, the stars and the fireworks are meant to show through the
	   cards (a blur wipes the map's small dots out) */
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	transition: background-color 2.5s ease, border-color 2.5s ease;
}

/* the map shines through the tinted glass: a little brighter than under the old clear one */
.theme-nd .nd-map {
	opacity: .62;
}

.theme-nd [data-time="night"] .nd-map {
	opacity: .85;
}

.theme-nd [data-time="dusk"] .nd-map {
	opacity: .75;
}

/* The inner pages' footer keeps its own band and gains the flag line along its top and
   the town along its foot (assets/images/nationalday/footer-skyline.svg, generated with the
   scene). The home's footer already stands on the scene. */
/* The footer answers the header: the same sky as the title band at this time of day, in
   both colour modes, with the town along its foot in that hour's own colour (the svg is
   used as a mask, so one file serves the four times). The strip the rating card stands on
   is the body's colour (--nd-base = the top of this sky), so strip and footer are one band. */
body.theme-nd {
	--nd-base: #06071a;
	--nd-foot-sky: linear-gradient(180deg, #06071a 0%, #1c1030 28%, #4a2236 54%, #7c4630 82%, #8a5236 100%);
	--nd-foot-city: #110815;
}

body.theme-nd:has(.nd-scene[data-time="dusk"]) {
	--nd-base: #141633;
	--nd-foot-sky: linear-gradient(180deg, #141633 0%, #3b2350 40%, #8a3b55 74%, #d96a4a 100%);
	--nd-foot-city: #1a0c1f;
}

body.theme-nd:has(.nd-scene[data-time="dawn"]) {
	--nd-base: #1d3557;
	--nd-foot-sky: linear-gradient(180deg, #1d3557 0%, #4f6a93 46%, #c98f86 100%);
	--nd-foot-city: #232740;
}

body.theme-nd:has(.nd-scene[data-time="day"]) {
	--nd-base: #164a8c;
	--nd-foot-sky: linear-gradient(180deg, #164a8c 0%, #1f5fa6 40%, #2b72b8 70%, #86b6dc 100%);
	--nd-foot-city: #24364f;
}

.theme-nd .site-footer-band,
[data-bs-theme="dark"] .theme-nd .site-footer-band {
	position: relative;
	padding-top: 104px !important;   /* over the pt-5 utility: sky above the town, as in the header */
	background: var(--nd-base) var(--nd-foot-sky) 0 0 no-repeat padding-box;
}

/* Inner pages: the body shows only in the strip between the page and the footer, where the
   rating card stands - it is the page's own surface there, not a dark band. (The home's
   body is under the fixed scene and keeps the sky's colour.) */
body.theme-nd:not(.page-home) {
	background: var(--site-mist, #eff3f4) !important;
}

.theme-nd .site-footer-band::after {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--nd-foot-city);
	-webkit-mask: url(../../../images/nationalday/footer-skyline.svg) center bottom / auto 120px repeat-x;
	mask: url(../../../images/nationalday/footer-skyline.svg) center bottom / auto 120px repeat-x;
	pointer-events: none;
}

.theme-nd .site-footer-band > * {
	position: relative;
	z-index: 1;
}

/* On the home the footer stands on the scene: its chips take the glass of the hour, so
   they keep an edge and their words where the sky shows between the buildings. */
/* by day the sky behind them is pale where the page scrolls (phone, tablet): a denser chip */
body.theme-nd:has(.nd-scene[data-time="day"]) {
	--nd-chip: rgba(12, 38, 76, .86);
}

.theme-nd.page-home #kt_footer .foot-chip,
.theme-nd.page-home #kt_footer .foot-social {
	background: var(--nd-chip, var(--nd-glass));
	border-color: var(--nd-glass-line);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.theme-nd.page-home #kt_footer .foot-chip:hover,
.theme-nd.page-home #kt_footer .foot-social:hover {
	background: rgba(255, 255, 255, .22);
}

/* the flag's colours along the top edge of the footer */
.theme-nd .site-footer-band::before {
	content: '';
	position: absolute;
	inset: 0 0 auto 0;
	height: 4px;
	background: var(--nd-flag-line);
}

/* ------------------------------------------------------------------ 9. phone */
@media (max-width: 991.98px) {
	.theme-nd .nd-bunting {
		top: 60px;
		height: 40px;
		background-size: auto 40px;
	}
	/* the crumbs start below the bunting */
	.theme-nd .page-hero {
		padding-top: 40px;
	}
	.theme-nd .page-hero-inner {
		padding-bottom: 84px;
	}
	.theme-nd .is-page .nd-ground {
		height: 104px;
	}
	/* the home scrolls on a phone: a low skyline along the bottom edge only */
	.theme-nd .is-home .nd-ground {
		height: 15vh;
		min-height: 100px;
	}
}

/* ------------------------------------------------------------------ 9b. drone show + test bar */
/* The drone show's stage: a night veil over the page (the only thing ever drawn in front of
   the content), its canvas, and the Skip button. Below the welcome dialog. */
.theme-nd .nd-show-veil {
	position: fixed;
	inset: 0;
	z-index: 1060;
	/* the city the drones lift off from and the night (the stars are drawn by the script) */
	background:
		url(../../../images/nationalday/footer-skyline.svg) center bottom / auto 120px repeat-x,
		radial-gradient(70% 45% at 50% 100%, rgba(217, 164, 65, .22), transparent 70%),
		radial-gradient(90% 70% at 50% 40%, rgba(8, 40, 52, .8), rgba(2, 10, 15, .96) 70%),
		#020a0f;
	opacity: 0;
	transition: opacity .6s ease;
}

.theme-nd .nd-show-veil[hidden] {
	display: none;
}

.theme-nd .nd-show-veil.is-on {
	opacity: 1;
}

/* While the show plays (nationalday-show.js sets html.nd-show-on) it owns the screen: no page
   scrollbar, and the floating widgets that sit above every z-index (the chatbot launcher, the
   sign-language service, the Mind Rockets toolkit) step aside until it ends. */
html.nd-show-on {
	overflow: hidden;
}

html.nd-show-on :is(#chatbot-toggler, .chatbot-toggler, #DeafServicePlace, .DeafServicePlace, #mr-muiTool, .mr-muiTool) {
	visibility: hidden !important;
}

.theme-nd .nd-show {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.theme-nd .nd-show-skip {
	position: absolute;
	bottom: 28px;
	left: 50%;
	min-height: 40px;
	padding: 0 22px;
	border: 1px solid rgba(255, 255, 255, .3);
	border-radius: 999px;
	background: rgba(255, 255, 255, .08);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	transform: translateX(-50%);
	cursor: pointer;
	transition: background-color .2s ease;
}

.theme-nd .nd-show-skip:hover,
.theme-nd .nd-show-skip:focus-visible {
	background: rgba(255, 255, 255, .18);
}

.theme-nd .nd-show-skip:focus-visible {
	outline: 2px solid #f6d27a;
	outline-offset: 3px;
}

.theme-nd .nd-show-skip[hidden],
.theme-nd .nd-show-end[hidden] {
	display: none;
}

/* The sound button: a round twin of Skip in the stage's corner (the floating widgets are away
   while the show plays). It stays on the end card, for «watch again». */
.theme-nd .nd-show-sound {
	position: absolute;
	bottom: 28px;
	inset-inline-end: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .3);
	border-radius: 50%;
	background: rgba(255, 255, 255, .08);
	color: #fff;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease;
}

.theme-nd .nd-show-sound[hidden],
.theme-nd .nd-show-veil.is-intro :is(.nd-show-sound, .nd-show-skip, .nd-show-cap) {
	display: none;
}

.theme-nd .nd-show-sound .ic {
	width: 20px;
	height: 20px;
}

.theme-nd .nd-show-sound[aria-pressed="true"] {
	border-color: #f6d58a;
	color: #f6d58a;
}

.theme-nd .nd-show-sound[aria-pressed="true"] .is-off,
.theme-nd .nd-show-sound[aria-pressed="false"] .is-on {
	display: none;
}

.theme-nd .nd-show-sound:hover {
	background: rgba(255, 255, 255, .18);
}

.theme-nd .nd-show-sound:focus-visible {
	outline: 2px solid #f6d27a;
	outline-offset: 3px;
}

/* The welcome card (first visit): the ministry's greeting and one question - the show with
   sound or without. Nothing else on the stage until one is chosen. */
.theme-nd .nd-show-intro {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	opacity: 0;
	transition: opacity .45s ease;
}

.theme-nd .nd-show-intro[hidden] {
	display: none;
}

.theme-nd .nd-show-intro.is-on {
	opacity: 1;
}

.theme-nd .nd-show-intro-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	width: min(520px, 100%);
	padding: 32px 28px 28px;
	border: 1px solid rgba(246, 213, 138, .35);
	border-radius: 24px;
	background: rgba(6, 26, 34, .78);
	box-shadow: 0 24px 80px rgba(0, 0, 0, .5), 0 0 60px rgba(246, 213, 138, .08);
	text-align: center;
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	transform: translateY(10px);
	transition: transform .45s ease;
}

.theme-nd .nd-show-intro.is-on .nd-show-intro-card {
	transform: none;
}

.theme-nd .nd-show-intro-card img {
	width: 96px;
	height: auto;
	filter: drop-shadow(0 0 18px rgba(240, 196, 92, .45));
}

.theme-nd .nd-show-intro-title {
	margin: 6px 0 0;
	color: #fff;
	font-size: clamp(20px, 2.6vw, 26px);
	font-weight: 800;
	line-height: 1.45;
}

.theme-nd .nd-show-intro-text {
	margin: 0;
	color: #d6e0ea;
	font-size: 16px;
	line-height: 1.7;
}

.theme-nd .nd-show-intro-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	width: 100%;
	margin-top: 14px;
}

.theme-nd .nd-show-intro-actions button {
	display: inline-flex;
	flex: 1 1 200px;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 20px;
	border-radius: 999px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: filter .2s ease, background-color .2s ease;
}

.theme-nd .nd-show-intro-actions .ic {
	width: 18px;
	height: 18px;
	flex: none;
}

.theme-nd .nd-show-intro-actions [data-nd-intro="sound"] {
	border: 1px solid rgba(255, 236, 190, .7);
	background: var(--nd-gold-fill);
	color: var(--nd-gold-ink);
}

.theme-nd .nd-show-intro-actions [data-nd-intro="sound"]:hover {
	filter: brightness(1.06);
}

.theme-nd .nd-show-intro-actions [data-nd-intro="quiet"] {
	border: 1px solid rgba(255, 255, 255, .35);
	background: rgba(255, 255, 255, .08);
	color: #fff;
}

.theme-nd .nd-show-intro-actions [data-nd-intro="quiet"]:hover {
	background: rgba(255, 255, 255, .16);
}

.theme-nd .nd-show-intro-actions button:focus-visible {
	outline: 2px solid #f6d27a;
	outline-offset: 3px;
}

@media (max-width: 575.98px) {
	.theme-nd .nd-show-intro-card {
		padding: 26px 18px 20px;
	}

	.theme-nd .nd-show-sound {
		bottom: 26px;
		inset-inline-end: 16px;
	}
}

/* The caption: a lower third, short, fading and rising in. */
.theme-nd .nd-show-cap {
	position: absolute;
	left: 50%;
	bottom: 96px;
	width: min(760px, calc(100vw - 32px));
	margin: 0;
	color: #fff6e0;
	font-size: clamp(20px, 2.4vw, 30px);
	font-weight: 700;
	line-height: 1.4;
	text-align: center;
	text-shadow: 0 2px 18px rgba(0, 0, 0, .7), 0 0 30px rgba(255, 255, 255, .3);
	opacity: 0;
	transform: translate(-50%, 10px);
	transition: opacity .6s ease, transform .6s ease;
	pointer-events: none;
}

.theme-nd .nd-show-cap.is-on {
	opacity: 1;
	transform: translate(-50%, 0);
}

/* The end card, over the last of the fireworks. */
.theme-nd .nd-show-end {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 24px;
	text-align: center;
	opacity: 0;
	transition: opacity 1.2s ease;
}

.theme-nd .nd-show-end.is-on {
	opacity: 1;
}

.theme-nd .nd-show-end img {
	width: clamp(200px, 62vw, 300px);
	height: auto;
	filter: drop-shadow(0 0 22px rgba(240, 196, 92, .45));
}

.theme-nd .nd-show-end-title {
	margin: 6px 0 0;
	color: #fff;
	font-size: clamp(30px, 4.6vw, 54px);
	font-weight: 800;
	line-height: 1.25;
	text-shadow: 0 0 34px rgba(255, 255, 255, .35);
}

.theme-nd .nd-show-end-date {
	margin: 0;
	color: #fbe3a1;
	font-size: clamp(15px, 1.6vw, 19px);
	font-weight: 600;
}

/* the show's hero face once loaded: the title in gold lettering, a thin divider with diamonds
   under it (the same line the show draws under «نبض واحد») */
.theme-nd .nd-show-veil.has-hero-font .nd-show-end-title {
	font-family: "NDMessiri", inherit;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(180deg, #ffffff, #c9d6e0);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	text-shadow: none;
	filter: drop-shadow(0 0 18px rgba(255, 255, 255, .35));
}

.theme-nd .nd-show-end-date {
	position: relative;
	padding-top: 14px;
	letter-spacing: .04em;
}

.theme-nd .nd-show-end-date::before {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	width: min(240px, 60vw);
	height: 1.5px;
	transform: translateX(-50%);
	background: linear-gradient(90deg, transparent, #f6d58a 18%, #f6d58a 82%, transparent);
}

.theme-nd .nd-show-end-date::after {
	content: "";
	position: absolute;
	top: -3px;
	left: 50%;
	width: 7px;
	height: 7px;
	background: #f6d58a;
	transform: translateX(-50%) rotate(45deg);
}

.theme-nd .nd-show-end-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 18px;
}

.theme-nd .nd-show-end-actions button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 46px;
	padding: 0 24px;
	border-radius: 999px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: filter .2s ease, background-color .2s ease;
}

.theme-nd .nd-show-end-actions .ic {
	width: 18px;
	height: 18px;
}

.theme-nd .nd-show-end-actions [data-nd-end-enter] {
	border: 1px solid rgba(255, 236, 190, .7);
	background: var(--nd-gold-fill);
	color: var(--nd-gold-ink);
}

.theme-nd .nd-show-end-actions [data-nd-end-enter]:hover {
	filter: brightness(1.06);
}

.theme-nd .nd-show-end-actions [data-nd-end-again] {
	border: 1px solid rgba(255, 255, 255, .35);
	background: rgba(255, 255, 255, .08);
	color: #fff;
}

.theme-nd .nd-show-end-actions [data-nd-end-again]:hover {
	background: rgba(255, 255, 255, .16);
}

.theme-nd .nd-show-end-actions button:focus-visible {
	outline: 2px solid #f6d27a;
	outline-offset: 3px;
}

[dir="rtl"] .theme-nd .nd-show-end-actions [data-nd-end-enter] .ic {
	transform: scaleX(-1);
}

@media (max-width: 575.98px) {
	.theme-nd .nd-show-cap {
		bottom: 88px;
	}
}

/* The test bar (signed-in panel users, or any browser opened once with ?ndtest=1): try
   each time of day, see the greeting again. */
.theme-nd .nd-testbar[hidden] {
	display: none;
}

.theme-nd .nd-testbar {
	position: fixed;
	bottom: 16px;
	left: 50%;
	z-index: 1035;
	display: flex;
	gap: 4px;
	padding: 5px;
	border: 1px solid rgba(255, 255, 255, .18);
	border-radius: 999px;
	background: rgba(2, 13, 18, .82);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
	transform: translateX(-50%);
}

.theme-nd .nd-testbar button {
	min-height: 32px;
	padding: 0 12px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: rgba(255, 255, 255, .85);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

.theme-nd .nd-testbar button:hover {
	background: rgba(255, 255, 255, .1);
	color: #fff;
}

.theme-nd .nd-testbar button[aria-pressed="true"] {
	background: #f6d27a;
	color: #1b1400;
}

.theme-nd .nd-testbar [data-nd-show-again] {
	margin-inline-start: 4px;
	background: var(--nd-gold-fill);
	color: var(--nd-gold-ink);
}

.theme-nd .nd-testbar button:focus-visible {
	outline: 2px solid #f6d27a;
	outline-offset: 2px;
}

@media (max-width: 575.98px) {
	.theme-nd .nd-testbar {
		bottom: 10px;
		max-width: calc(100vw - 20px);
		overflow-x: auto;
	}
	.theme-nd .nd-testbar button {
		padding: 0 9px;
		font-size: 12px;
	}
}

/* ------------------------------------------------------------------ 10. reduced motion */
@media (prefers-reduced-motion: reduce) {
	.theme-nd .nd-scene *,
	.theme-nd .nd-scene *::before,
	.theme-nd .nd-scene *::after,
	.theme-nd .nd-bunting,
	.theme-nd #kt_header .btn.btn-warning::after,
	.theme-nd .poll-launcher::after,
	.theme-nd .poll-submit::after {
		animation: none !important;
	}
	.theme-nd .nd-smoke {
		display: none;
	}
	.theme-nd .nd-fireworks {
		display: none;
	}
}
