/* USradioguy Lab layout - "observatory plate" design, Nov 2026
   Fonts: Newsreader (serif, captions & readings), Inter (interface),
   both SIL Open Font License, bundled in ./fonts */
@font-face { font-family: 'Newsreader'; font-weight: 300; font-style: normal; font-display: swap; src: url('fonts/newsreader-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Newsreader'; font-weight: 400; font-style: normal; font-display: swap; src: url('fonts/newsreader-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Newsreader'; font-weight: 300; font-style: italic; font-display: swap; src: url('fonts/newsreader-latin-300-italic.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 300; font-display: swap; src: url('fonts/inter-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('fonts/inter-latin-600-normal.woff2') format('woff2'); }

:root
{
	--plate: #070A14;
	--night: #10142B;
	--night-2: #161B38;
	--line: rgba(134, 168, 255, 0.14);
	--line-strong: rgba(134, 168, 255, 0.32);
	--starlight: #E6E8F2;
	--graphite: #8C92AB;
	--rayleigh: #86A8FF;
	--oxygen: #5FD3C6;
	--sodium: #F0B35A;
	--hydrogen: #F07A8A;
	--serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
	--sans: 'Inter', 'Segoe UI', system-ui, sans-serif;
	--gutter: clamp(16px, 3vw, 40px);
	--radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body
{
	margin: 0;
	background: var(--plate);
	color: var(--starlight);
	font: 400 15px/1.55 var(--sans);
	font-feature-settings: 'tnum' 1, 'cv11' 1;   /* numbers line up in columns */
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
/* a faint, fixed field of stars - drawn once, never animated */
body::before
{
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient(1px 1px at 12% 18%, rgba(230,232,242,.55), transparent 60%),
		radial-gradient(1px 1px at 78% 9%, rgba(230,232,242,.4), transparent 60%),
		radial-gradient(1px 1px at 64% 72%, rgba(230,232,242,.35), transparent 60%),
		radial-gradient(1px 1px at 33% 84%, rgba(230,232,242,.3), transparent 60%),
		radial-gradient(1px 1px at 91% 46%, rgba(230,232,242,.45), transparent 60%),
		radial-gradient(1px 1px at 4% 61%, rgba(230,232,242,.3), transparent 60%),
		radial-gradient(1.5px 1.5px at 52% 31%, rgba(134,168,255,.5), transparent 60%),
		radial-gradient(ellipse 70% 55% at 72% 30%, rgba(40, 56, 130, .28), transparent 70%);
}
a { color: var(--rayleigh); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--starlight); }
:focus-visible { outline: 2px solid var(--rayleigh); outline-offset: 3px; border-radius: 3px; }
button { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--night); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--graphite); }

/* ---------------- masthead ---------------- */
.masthead
{
	display: flex;
	align-items: center;
	gap: 28px;
	padding: 14px var(--gutter);
	border-bottom: 1px solid var(--line);
	position: sticky;
	top: 0;
	z-index: 20;
	background: rgba(7, 10, 20, .86);
	backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--starlight); text-decoration: none; }
.brand img { height: 42px; width: auto; }
.brand span { font: 400 19px/1.1 var(--serif); }
.brand small { display: block; font: 400 12px/1.4 var(--sans); color: var(--graphite); }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; min-width: 0; }
.nav a
{
	color: var(--graphite);
	text-decoration: none;
	padding: 7px 12px;
	border-radius: 999px;
	font-weight: 500;
	font-size: 14px;
}
.nav a:hover { color: var(--starlight); }
.nav a[aria-current="page"] { color: var(--starlight); background: var(--night-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.clocks { display: flex; gap: 18px; padding-left: 18px; border-left: 1px solid var(--line); }
.clocks div { display: flex; flex-direction: column; align-items: flex-end; }
.clock-label { font-size: 11px; color: var(--graphite); }
.clocks time { font: 300 18px/1.1 var(--serif); letter-spacing: .02em; }

main { flex: 1; padding: 0 var(--gutter) 48px; outline: none; }

/* ---------------- shared type ---------------- */
.display { font: 300 clamp(34px, 4.6vw, 62px)/1.04 var(--serif); letter-spacing: -.01em; margin: 0; }
.h2 { font: 300 30px/1.15 var(--serif); margin: 0 0 6px; }
.h3 { font: 400 20px/1.2 var(--serif); margin: 0 0 4px; }
.lede { color: var(--graphite); font-size: 16px; max-width: 46ch; margin: 14px 0 0; }
.caption { font: italic 300 15px/1.4 var(--serif); color: var(--graphite); }
.reading { font: 300 52px/1 var(--serif); }
.reading small { font: 400 16px var(--sans); color: var(--graphite); margin-left: 4px; }

/* ---------------- controls ---------------- */
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--night); box-shadow: inset 0 0 0 1px var(--line); }
.seg button
{
	border: 0;
	background: none;
	padding: 7px 16px;
	border-radius: 999px;
	color: var(--graphite);
	font-weight: 500;
	font-size: 14px;
	cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--starlight); color: var(--plate); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button
{
	border: 1px solid var(--line-strong);
	background: none;
	border-radius: 999px;
	padding: 6px 14px;
	color: var(--starlight);
	font-size: 14px;
	cursor: pointer;
}
.chips button:hover { border-color: var(--rayleigh); }
.chips button[aria-pressed="true"] { border-color: var(--rayleigh); background: rgba(134,168,255,.14); }
.btn
{
	display: inline-flex;
	align-items: center;
	gap: 10px;
	border: 0;
	border-radius: 999px;
	padding: 10px 20px;
	background: var(--rayleigh);
	color: var(--plate);
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	text-decoration: none;
}
.btn:hover { background: var(--starlight); color: var(--plate); }
.btn.ghost { background: none; color: var(--starlight); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--rayleigh); }
.btn svg { width: 14px; height: 14px; fill: currentColor; }

/* ---------------- timeline scrubber ---------------- */
.timeline { margin-top: 26px; }
.timeline-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.timeline-head .when { font: 400 20px/1.2 var(--serif); }
.track { position: relative; height: 38px; cursor: pointer; touch-action: none; }
.track .ticks { position: absolute; inset: 10px 0 10px; display: flex; gap: 2px; }
.track .ticks i { flex: 1; background: var(--line-strong); border-radius: 1px; transition: background .15s; }
.track .ticks i.loaded { background: rgba(134,168,255,.45); }
.track .ticks i.on { background: var(--starlight); }
.track .hours { display: flex; justify-content: space-between; font-size: 12px; color: var(--graphite); }
.track:focus-visible { outline-offset: 6px; }

/* ---------------- hero (overview) ---------------- */
.hero
{
	display: grid;
	grid-template-columns: minmax(300px, 5fr) minmax(0, 7fr);
	gap: clamp(24px, 4vw, 64px);
	align-items: center;
	padding: clamp(24px, 4vw, 56px) 0 clamp(24px, 3vw, 40px);
	border-bottom: 1px solid var(--line);
}
.hero-copy .seg { margin-top: 26px; }
.hero-copy .chips { margin-top: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.status-line { margin-top: 18px; font-size: 14px; color: var(--graphite); display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--graphite); flex: none; }
.dot.ok { background: var(--oxygen); box-shadow: 0 0 10px var(--oxygen); }
.dot.warn { background: var(--sodium); box-shadow: 0 0 10px var(--sodium); }
.dot.bad { background: var(--hydrogen); }

/* the plate: Earth inside a measurement ring */
.plate { position: relative; width: min(100%, 760px); aspect-ratio: 1; margin-left: auto; }
.plate .disk
{
	position: absolute;
	inset: 7%;
	border-radius: 50%;
	overflow: hidden;
	background: radial-gradient(circle at 45% 40%, #1a2350, #070a14 70%);
	box-shadow: 0 0 80px rgba(60, 90, 200, .25);
}
.plate .disk img, .plate .disk video
{
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
	transform: scale(1.012);   /* trims the thin black edge of full-disk images */
	opacity: 0;
	transition: opacity .5s ease;
}
.plate .disk img.show, .plate .disk video.show { opacity: 1; }
.plate .ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.plate .ring .r { fill: none; stroke: var(--line-strong); stroke-width: .6; }
.plate .ring .tick { stroke: rgba(134,168,255,.5); stroke-width: .5; }
.plate .ring .tick.major { stroke: var(--starlight); stroke-width: .7; }
.plate .ring text { fill: var(--graphite); font: 400 2.4px var(--sans); }
.plate .ring .draw { stroke-dasharray: 300; stroke-dashoffset: 300; animation: draw 1.6s cubic-bezier(.3,.7,.2,1) .2s forwards; }
.plate .annot { position: absolute; font-size: 12.5px; color: var(--graphite); line-height: 1.35; }
.plate .annot strong { display: block; color: var(--starlight); font-weight: 500; }
.plate .annot.tl { left: 0; top: 2%; }
.plate .annot.br { right: 0; bottom: 2%; text-align: right; }
.plate .loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: italic 300 16px var(--serif); color: var(--graphite); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.plate.intro .disk { animation: fadeIn 1.4s ease .1s both; }
@keyframes fadeIn { from { opacity: 0; transform: scale(.985); } }

/* ---------------- "right now" panels ---------------- */
.now { display: grid; grid-template-columns: 1.15fr 1.4fr 1.2fr .95fr; gap: 0; margin-top: 8px; }
.now > section { padding: 26px 26px 10px 0; }
.now > section + section { padding-left: 26px; border-left: 1px solid var(--line); }
.now .h3 { margin-bottom: 14px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 16px 0 0; font-size: 14px; }
.facts dt { color: var(--graphite); }
.facts dd { margin: 0; text-align: right; }
.forecast-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; }
.forecast-mini b { display: block; font-weight: 500; }
.forecast-mini span { color: var(--graphite); }
.media { border-radius: var(--radius); overflow: hidden; background: var(--night); aspect-ratio: 4 / 3; }
.media video, .media img { width: 100%; height: 100%; object-fit: cover; }
.media + .caption { margin-top: 8px; }
.rx { width: 100%; border-collapse: collapse; font-size: 14px; }
.rx th { text-align: left; font-weight: 400; color: var(--graphite); padding: 0 0 8px; }
.rx td { padding: 10px 0; border-top: 1px solid var(--line); vertical-align: top; }
.rx td:not(:first-child), .rx th:not(:first-child) { text-align: right; }
.rx .sat { display: flex; align-items: center; gap: 8px; }
.rx .sat small { display: block; color: var(--graphite); }
.sun { width: 100%; max-width: 240px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #1b0f08; box-shadow: 0 0 60px rgba(240, 179, 90, .18); }
.sun img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------- page header (inner pages) ---------------- */
.page-head { padding: clamp(28px, 4vw, 48px) 0 22px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.page-head .display { font-size: clamp(32px, 3.6vw, 48px); }

/* ---------------- imagery browser ---------------- */
.browser { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 36px; align-items: start; }
.catalog { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; padding-right: 6px; }
.catalog details { border-bottom: 1px solid var(--line); }
.catalog summary { cursor: pointer; padding: 12px 0; font: 400 18px var(--serif); list-style: none; display: flex; justify-content: space-between; }
.catalog summary::-webkit-details-marker { display: none; }
.catalog summary span { color: var(--graphite); font: 400 13px var(--sans); }
.catalog ul { list-style: none; margin: 0 0 12px; padding: 0; }
.catalog li a { display: block; padding: 5px 10px; margin-left: -10px; border-radius: 4px; color: var(--graphite); text-decoration: none; font-size: 14px; }
.catalog li a:hover { color: var(--starlight); background: var(--night); }
.catalog li a[aria-current="true"] { color: var(--starlight); background: var(--night-2); box-shadow: inset 2px 0 0 var(--rayleigh); }
.viewer-frame { position: relative; background: var(--night); border-radius: var(--radius); overflow: hidden; min-height: 320px; display: grid; place-items: center; }
.viewer-frame img, .viewer-frame video { max-height: 78vh; width: auto; margin: 0 auto; }
.viewer-frame .loading { position: absolute; font: italic 300 16px var(--serif); color: var(--graphite); }
.viewer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; }
.viewer-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.empty { padding: 60px 20px; text-align: center; color: var(--graphite); font: italic 300 18px var(--serif); }
.mobile-picker { display: none; }

/* ---------------- thumbnail tiles ---------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 22px 16px; }
.tile { color: var(--starlight); text-decoration: none; min-width: 0; }
.tile .thumb { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--night); box-shadow: inset 0 0 0 1px var(--line); }
.tile .thumb img, .tile .thumb video { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.tile:hover .thumb img, .tile:hover .thumb video { transform: scale(1.04); }
.tile .thumb.none img { display: none; }
.tile .thumb.none::after { content: "No image yet"; display: grid; place-items: center; height: 100%; color: var(--graphite); font: italic 300 14px var(--serif); }
.tile-title { display: block; margin-top: 8px; font-size: 14px; line-height: 1.35; }
.tile-note { display: block; font-size: 12px; color: var(--oxygen); }
.viewer-head .viewer-meta { margin-bottom: 0; }
.discussion { margin-top: 22px; max-width: 62ch; color: var(--graphite); }
.discussion p { margin: 0 0 10px; }
.chips .muted { font-size: 12px; margin-left: 2px; }

/* ---------------- EMWIN bulletins (expanding buttons) ---------------- */
.accordion { display: flex; flex-direction: column; gap: 10px; max-width: 980px; }
.acc { border-radius: 10px; background: var(--night); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s; }
.acc.open { box-shadow: inset 0 0 0 1px var(--line-strong); }
.acc h2 { margin: 0; font: inherit; }
.acc-btn { width: 100%; display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: none; border: 0; border-radius: 10px; text-align: left; cursor: pointer; color: var(--starlight); }
.acc-btn:hover:not([disabled]) { background: var(--night-2); }
.acc-title { flex: 1; font: 400 19px/1.3 var(--serif); }
.acc-count { font-size: 13px; color: var(--rayleigh); white-space: nowrap; }
.acc-chev { width: 14px; height: 14px; flex: none; fill: none; stroke: var(--graphite); stroke-width: 1.6; transition: transform .2s ease; }
.acc.open .acc-chev { transform: rotate(180deg); stroke: var(--starlight); }
.acc.none .acc-btn { cursor: default; color: var(--graphite); }
.acc.none .acc-count { color: var(--graphite); }
.acc.none .acc-chev { visibility: hidden; }
.acc-panel { padding: 4px 20px 20px; border-top: 1px solid var(--line); }
.reader-nav { display: flex; align-items: center; gap: 12px; font-size: 14px; margin: 14px 0 16px; flex-wrap: wrap; }
.reader-nav .btn { padding: 7px 14px; }
.reader-nav .btn[disabled] { opacity: .35; cursor: default; }
.bulletin { max-width: 72ch; white-space: pre-line; font-size: 15px; line-height: 1.6; margin-top: 14px; }
.bulletin p { margin: 0 0 14px; }
.bulletin .b-head { font: 400 17px/1.4 var(--serif); color: var(--graphite); }
@media (max-width: 520px) { .acc-btn { padding: 14px 14px; gap: 10px; } .acc-title { font-size: 17px; } .acc-panel { padding: 2px 14px 16px; } }

/* ---------------- grids (space weather) ---------------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 28px 24px; }
.gallery a { color: var(--starlight); text-decoration: none; }
.gallery .media { aspect-ratio: 1; }
.gallery .media img { transition: transform .4s ease; }
.gallery a:hover .media img { transform: scale(1.03); }
.gallery .h3 { margin-top: 10px; font-size: 17px; }

/* ---------------- weather page ---------------- */
.wx { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 1.6fr); gap: 48px; }
.wx .reading { font-size: 88px; }
.week { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 0; margin-top: 30px; border-top: 1px solid var(--line); }
.week > div { padding: 14px 14px 14px 0; border-bottom: 1px solid var(--line); }
.week .day { font: 400 17px var(--serif); }
.week .temps { font-size: 20px; margin: 4px 0; }
.week .temps span { color: var(--graphite); font-size: 15px; }
.week .pop { font-size: 13px; color: var(--graphite); }
.bar { height: 3px; background: var(--line); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--rayleigh); }

/* ---------------- receivers page ---------------- */
.receivers { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0; }
.receivers > section { padding: 0 32px 24px 0; }
.receivers > section + section { padding-left: 32px; border-left: 1px solid var(--line); }
.big-readings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 18px 0; }
.big-readings div { border-top: 1px solid var(--line); padding-top: 10px; }
.big-readings span { display: block; font-size: 13px; color: var(--graphite); }
.big-readings b { font: 300 34px/1.1 var(--serif); }
.spark { width: 100%; height: 70px; display: block; }
.spark path.l { fill: none; stroke: var(--rayleigh); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.spark path.a { fill: rgba(134,168,255,.1); }

.foot { padding: 22px var(--gutter) 30px; border-top: 1px solid var(--line); color: var(--graphite); font-size: 13px; }
.foot p { margin: 0; max-width: 90ch; }

/* ---------------- responsive ---------------- */
@media (max-width: 1100px)
{
	.now { grid-template-columns: 1fr 1fr; }
	.now > section:nth-child(3) { padding-left: 0; border-left: 0; }
	.now > section:nth-child(n+3) { border-top: 1px solid var(--line); }
	.clocks { display: none; }
}
@media (max-width: 820px)
{
	.masthead { flex-wrap: wrap; gap: 10px; }
	.nav { margin-left: -12px; flex: 1 1 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
	.nav a { flex: none; padding: 7px 10px; }
	.brand img { height: 34px; }
	.hero { grid-template-columns: 1fr; }
	.plate { margin: 0 auto; order: -1; }
	.now { grid-template-columns: 1fr; }
	.now > section, .now > section + section { padding: 22px 0 8px; border-left: 0; border-top: 1px solid var(--line); }
	.browser { grid-template-columns: 1fr; }
	.catalog { display: none; }
	.mobile-picker { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
	.mobile-picker select { background: var(--night); color: var(--starlight); border: 1px solid var(--line-strong); border-radius: 8px; padding: 9px 12px; font: inherit; max-width: 100%; }
	.wx { grid-template-columns: 1fr; }
	.receivers > section, .receivers > section + section { padding: 22px 0; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 520px)
{
	body { font-size: 14px; }
	.hero { padding-top: 16px; }
	.plate .annot { display: none; }
	.plate .ring text { display: none; }
	.reading { font-size: 44px; }
	.wx .reading { font-size: 64px; }
	.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
	.big-readings b { font-size: 26px; }
	.rx td, .rx th { font-size: 13px; }
	.hero-actions .btn { flex: 1 1 auto; justify-content: center; }
	.timeline-head .when { font-size: 17px; }
}
/* grid and flex children may shrink below their content, so nothing pushes the page wider than the screen */
.hero > *, .now > *, .wx > *, .receivers > *, .browser > *, .gallery > * { min-width: 0; }
body { overflow-x: clip; }

@media (prefers-reduced-motion: reduce)
{
	*, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
