/* Rocheport Times: Night Sky (modules/night-sky). Loaded on the night sky
 * page only. A printed newspaper star map: black on white, Times, hairline
 * rules, no boxes, radii, shadows or gradients. EVERY COLOUR IS A THEME
 * TOKEN, so Terminal's root-level token flip repaints the chart green on
 * black and Rainbow inherits the Classic look; no html[data-rt-theme]
 * selector appears here on purpose. */

.rt-sky {
	--sky-ink: var(--wp--preset--color--contrast, #000);
	--sky-ground: var(--wp--preset--color--base, #fff);
	--sky-muted: var(--wp--preset--color--muted, #555);
	--sky-rule: var(--wp--preset--color--border, #bbb);
	--sky-link: var(--wp--preset--color--clay-dark, #14387f);
	font-family: "Times New Roman", Times, "Nimbus Roman", serif;
	color: var(--sky-ink);
}
.rt-sky [hidden] {
	display: none !important;
}
.rt-sky a {
	color: var(--sky-link);
}
.rt-sky__dek {
	font-size: 1.0625rem;
	line-height: 1.45;
	color: var(--sky-muted);
	margin: 0 0 1.25rem;
	max-width: 40rem;
}

/* ---------- layout: one column on the phone, two content-sized columns wide */
.rt-sky__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.75rem;
}
@media (min-width: 960px) {
	.rt-sky__grid {
		grid-template-columns: minmax(0, 36rem) minmax(18rem, 25rem);
		justify-content: start;
		align-items: start;
		gap: 3rem;
	}
}

/* ---------- the chart ---------------------------------------------------- */
.rt-sky__chart {
	margin: 0;
	min-width: 0;
}
/* Hide the chart only when scripting is really off. Hiding it until the
   script ran (a .rt-sky--nojs class) shifted the list down on the phone
   when the chart appeared: Lighthouse CLS 0.41. The square SVG reserves
   its own space, so with JS on nothing moves. */
@media (scripting: none) {
	.rt-sky__chart {
		display: none;
	}
}
.rt-sky__svg {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	cursor: crosshair;
}
.rt-sky__svg text {
	font-family: "Times New Roman", Times, "Nimbus Roman", serif;
}
.rt-sky__rim {
	fill: none;
	stroke: var(--sky-ink);
	stroke-width: 1.4;
}
.rt-sky__ring {
	fill: none;
	stroke: var(--sky-rule);
	stroke-width: 0.6;
	stroke-dasharray: 2 4;
}
.rt-sky__tick {
	stroke: var(--sky-ink);
	stroke-width: 1;
}
.rt-sky__lines path {
	fill: none;
	stroke: var(--sky-muted);
	stroke-width: 0.7;
	stroke-opacity: 0.7;
	stroke-linejoin: round;
}
.rt-sky__hi-lines path {
	fill: none;
	stroke: var(--sky-link);
	stroke-width: 1.8;
}
.rt-sky__stars circle {
	fill: var(--sky-ink);
	stroke: var(--sky-ground); /* the printed map's white gap around each star */
	stroke-width: 1;
	paint-order: stroke;
}
/* Every label is placed by placeLabels() in night-sky.js (text-anchor
   start, box measured, collisions avoided), so none sets text-anchor. */
.rt-sky__clabel {
	fill: var(--sky-muted);
	font-style: italic;
	letter-spacing: 0.04em;
}
.rt-sky__zlabel {
	fill: var(--sky-muted);
	font-style: italic;
}
.rt-sky__slabel,
.rt-sky__plabel {
	fill: var(--sky-ink);
	font-style: italic;
	paint-order: stroke;
	stroke: var(--sky-ground);
	stroke-width: 3px;
	stroke-linejoin: round;
}
.rt-sky__planet circle {
	fill: var(--sky-ground);
	stroke: var(--sky-ink);
	stroke-width: 1.6;
}
.rt-sky__planet path {
	stroke: var(--sky-ink);
	stroke-width: 1.6;
}
.rt-sky__sun circle {
	fill: var(--sky-ground);
	stroke: var(--sky-ink);
	stroke-width: 1.6;
}
.rt-sky__sun .rt-sky__dot {
	fill: var(--sky-ink);
	stroke: none;
}
.rt-sky__moon-dark {
	fill: var(--sky-ink);
}
.rt-sky__moon-lit {
	fill: var(--sky-ground);
}
.rt-sky__moon-rim {
	fill: none;
	stroke: var(--sky-ink);
	stroke-width: 1.4;
}
.rt-sky__zen path {
	stroke: var(--sky-ink);
	stroke-width: 1;
}
.rt-sky__compass text {
	fill: var(--sky-ink);
	text-anchor: middle;
	letter-spacing: 0.08em;
}
.rt-sky__hi {
	fill: none;
	stroke: var(--sky-link);
	stroke-width: 1.8;
}

/* ---------- caption, slider, Now ---------------------------------------- */
.rt-sky__cap {
	margin-top: 0.75rem;
}
.rt-sky__daynote {
	font-style: italic;
	color: var(--sky-muted);
	margin: 0 0 0.4rem;
}
.rt-sky__time {
	font-size: 1.1875rem;
	line-height: 1.3;
	margin: 0 0 0.25rem;
	min-height: 2.6em; /* reserved: filled by the script, two lines on a phone */
}
.rt-sky__slide {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.rt-sky__lbl {
	font-size: 0.6875rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}
.rt-sky__range {
	flex: 1 1 auto;
	min-width: 0;
	height: 44px;
	margin: 0;
	background: transparent;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}
.rt-sky__range:focus-visible {
	outline: 2px solid var(--sky-link);
	outline-offset: 2px;
}
.rt-sky__range::-webkit-slider-runnable-track {
	height: 1px;
	background: var(--sky-ink);
	border: 0;
}
.rt-sky__range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 12px;
	height: 28px;
	margin-top: -14px;
	background: var(--sky-ink);
	border: 0;
	border-radius: 0;
}
.rt-sky__range::-moz-range-track {
	height: 1px;
	background: var(--sky-ink);
	border: 0;
}
.rt-sky__range::-moz-range-thumb {
	width: 12px;
	height: 28px;
	background: var(--sky-ink);
	border: 0;
	border-radius: 0;
}
.rt-sky__now {
	min-height: 44px;
	min-width: 44px;
	padding: 0 1rem;
	font: inherit;
	font-size: 1rem;
	color: var(--sky-ink);
	background: var(--sky-ground);
	border: 1px solid var(--sky-ink);
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
}
.rt-sky__now:hover {
	text-decoration: underline;
}
.rt-sky__now:focus-visible {
	outline: 2px solid var(--sky-link);
	outline-offset: 2px;
}
.rt-sky__ends {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	font-size: 0.8125rem;
	color: var(--sky-muted);
	margin: 0 0 0.6rem;
	min-height: 1.4em;
}
.rt-sky__pick {
	border-top: 1px solid var(--sky-rule);
	padding-top: 0.5rem;
	margin: 0 0 0.4rem;
	font-style: italic;
	min-height: 2.6em;
}
.rt-sky__key {
	font-size: 0.8125rem;
	line-height: 1.4;
	color: var(--sky-muted);
	margin: 0;
}

/* "Point at the sky": shown by night-sky.js on phones and tablets only. */
.rt-sky__point-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 0.75rem;
	margin: 0 0 0.75rem;
}
.rt-sky__point-note {
	font-size: 0.875rem;
	font-style: italic;
	color: var(--sky-muted);
}

/* ---------- Up tonight: a plain ruled list ------------------------------ */
.rt-sky__tonight {
	min-width: 0;
}
.rt-sky__h2 {
	font-size: 1.5rem;
	font-weight: 400;
	line-height: 1.15;
	margin: 0 0 0.2rem;
}
.rt-sky__when {
	color: var(--sky-muted);
	font-size: 0.9375rem;
	margin: 0 0 0.9rem;
}
.rt-sky__h3 {
	font-size: 0.6875rem;
	font-weight: 400;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	border-bottom: 1px solid var(--sky-ink);
	padding-bottom: 4px;
	margin: 1.1rem 0 0;
}
.rt-sky__list {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 1rem;
	line-height: 1.4;
}
.rt-sky__list li {
	border-bottom: 1px solid var(--sky-rule);
	padding: 0.45rem 0;
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.25rem 1rem;
	flex-wrap: wrap;
}
.rt-sky__list li.rt-sky__line,
.rt-sky__list li.rt-sky__none {
	display: block;
}
.rt-sky__list strong {
	font-weight: 700;
}
.rt-sky__v {
	text-align: right;
}
.rt-sky__note {
	display: block;
	font-size: 0.8125rem;
	font-style: italic;
	color: var(--sky-muted);
}
.rt-sky__nojs {
	font-style: italic;
	color: var(--sky-muted);
}
.rt-sky__credit {
	margin: 2rem 0 0;
	padding-top: 0.5rem;
	border-top: 1px solid var(--sky-rule);
	font-size: 0.8125rem;
	line-height: 1.4;
	color: var(--sky-muted);
	max-width: 48rem;
}

/* The page template's main column (templates/page-night-sky.html). */
.rt-sky-page {
	padding-top: var(--wp--preset--spacing--40);
	padding-bottom: var(--wp--preset--spacing--50);
}
.rt-sky-page__kicker {
	font-size: 0.6875rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	margin: 0 0 0.25rem;
}
.rt-sky-page__kicker a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}
.rt-sky-page__kicker a:hover,
.rt-sky-page__kicker a:focus-visible {
	text-decoration: underline;
}
@media (max-width: 640px) {
	.rt-sky-page {
		padding-top: var(--wp--preset--spacing--30);
		padding-bottom: var(--wp--preset--spacing--30);
	}
}
