/*
Theme Name: SmartScopeClub
Description: Cinematic, editorial theme for SmartScopeClub — night skies, national parks, smart-telescope astronomy. Token-driven light/dark theming, WCAG 2.2 AA.
Version: 2.9.1
Author: SmartScopeClub
License: GPL-2.0-or-later
Text Domain: smartscopedaily
*/

/* =========================================================
   1. DESIGN TOKENS — single source of truth
   ========================================================= */

:root {
	/* type */
	--font-display: "Fraunces", Georgia, serif;
	--font-body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
	--text-xs: 0.75rem;      /* 12 */
	--text-sm: 0.875rem;     /* 14 */
	--text-base: 1rem;       /* 16 */
	--text-lg: 1.125rem;     /* 18 */
	--text-xl: 1.375rem;     /* 22 */
	--text-2xl: clamp(1.6rem, 3.5vw, 2.1rem);
	--text-3xl: clamp(2rem, 5vw, 3rem);
	--text-hero: clamp(2.4rem, 6.5vw, 4.2rem);
	--leading-tight: 1.15;
	--leading-body: 1.65;
	--weight-body: 400;
	--weight-med: 500;
	--weight-bold: 650;

	/* spacing scale */
	--space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
	--space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 72px;

	/* radius */
	--radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px; --radius-pill: 999px;

	/* motion */
	--ease-out: cubic-bezier(.22, .8, .36, 1);
	--dur-fast: 140ms; --dur-med: 260ms; --dur-slow: 480ms;

	/* elevation */
	--shadow-1: 0 1px 3px rgba(2, 6, 16, .25);
	--shadow-2: 0 6px 22px rgba(2, 6, 16, .35);

	/* layout */
	--content-w: 1360px;
	--narrow-w: 800px;
}

/* dark = hero experience (default): indigo-violet night + starlight gold */
:root, :root[data-theme="dark"] {
	color-scheme: dark;
	--bg: #0b0c1a;
	--bg-deep: #060711;
	--surface: #12142a;
	--surface-2: #1a1c38;
	--text: #ecebf4;
	--text-muted: #aaacc8;
	--text-faint: #7c7fa1;
	--accent: #3b82f6;             /* vibrant NASA-family blue */
	--accent-strong: #4c8dff;
	--accent-ink: #ffffff;         /* text on accent */
	--accent-deep: #0b3d91;        /* official NASA insignia blue: buttons, logo */
	--accent-deep-strong: #1652bd;
	--border: #262a4d;
	--scrim: linear-gradient(180deg, rgba(6,7,17,0) 30%, rgba(6,7,17,.82) 88%);
	--ok: #7fdba0; --ok-bg: #12331f;
	--warn: #f2cc7b; --warn-bg: #3a2d10;
	--bad: #f29a9a; --bad-bg: #3c1519;
	--star: #4c8dff;
}

:root[data-theme="light"] {
	color-scheme: light;
	--bg: #faf8f3;
	--bg-deep: #f0ecdf;
	--surface: #ffffff;
	--surface-2: #f3efe4;
	--text: #201d2e;
	--text-muted: #4e4a63;
	--text-faint: #6c6884;
	--accent: #0b3d91;
	--accent-strong: #08316f;
	--accent-deep: #0b3d91;
	--accent-deep-strong: #08316f;
	--accent-ink: #ffffff;
	--border: #e0dcec;
	--scrim: linear-gradient(180deg, rgba(18,15,30,.05) 30%, rgba(18,15,30,.74) 90%);
	--ok: #1c7a43; --ok-bg: #e2f5e9;
	--warn: #8a6410; --warn-bg: #faf0d7;
	--bad: #a83232; --bad-bg: #fbe7e7;
	--shadow-1: 0 1px 3px rgba(32, 29, 46, .10);
	--shadow-2: 0 8px 26px rgba(32, 29, 46, .14);
	--star: #0b3d91;
}

/* =========================================================
   2. BASE
   ========================================================= */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* .bleed uses 100vw, which includes the scrollbar gutter on Windows —
   clip (not hidden: it would break position:sticky) kills the sideways scroll. */
html, body { overflow-x: clip; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: var(--text-base);
	font-weight: var(--weight-body);
	line-height: var(--leading-body);
	transition: background var(--dur-med) var(--ease-out), color var(--dur-med) var(--ease-out);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: var(--weight-bold);
	line-height: var(--leading-tight);
	color: var(--text);
	margin: 0 0 var(--space-3);
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); margin-top: var(--space-7); }
h3 { font-size: var(--text-xl); margin-top: var(--space-5); }
p { margin: 0 0 var(--space-4); }

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-radius: var(--radius-sm);
}

.skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 100;
	background: var(--accent); color: var(--accent-ink);
	padding: var(--space-3) var(--space-5); border-radius: 0 0 var(--radius-md) 0;
	font-weight: var(--weight-med); text-decoration: none;
}
.skip-link:focus { left: 0; }

.wrap { max-width: var(--content-w); margin: 0 auto; padding: 0 var(--space-5); }
/* Full-bleed breakout: lets a child of .wrap span the whole viewport. */
.bleed { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
/* Heroes sit flush against the menu bar — cancel main's top padding. */
.hero.bleed, .park-hero.bleed, article > .park-hero.bleed:first-child { margin-top: calc(-1 * var(--space-6)); }
.wrap--narrow { max-width: var(--narrow-w); }
main.wrap { padding-top: var(--space-6); padding-bottom: var(--space-8); }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* =========================================================
   3. APP SHELL
   ========================================================= */

.site-header {
	position: sticky; top: 0; z-index: 20;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
}
.site-header .wrap {
	display: flex; align-items: center; gap: var(--space-5);
	min-height: 60px; flex-wrap: wrap; padding-top: var(--space-2); padding-bottom: var(--space-2);
}
.site-title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; margin: 0; }
.site-title a {
	color: var(--text); text-decoration: none;
	display: inline-flex; align-items: center; gap: 10px;
	background: var(--bg-deep); border: 1px solid var(--border);
	border-radius: var(--radius-md); padding: 5px 14px 5px 7px;
}
.site-title a:hover { border-color: var(--accent); color: var(--text); }
/* no space inside the wordmark — gap only separates mark from text */
.site-wordmark span { color: var(--accent); }
.site-logo { display: block; }

.footer-brand { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-4); }
.footer-brand img { display: block; }
.footer-brand strong { font-family: var(--font-display); font-size: var(--text-xl); color: var(--text); }
.footer-brand strong span { color: var(--accent); }
.site-nav { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-left: auto; }
.site-nav a {
	color: var(--text-muted); text-decoration: none;
	font-size: var(--text-sm); font-weight: var(--weight-med);
	padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
	min-height: 44px; display: inline-flex; align-items: center;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }

/* hamburger — hidden on desktop, standard 3-bar on mobile */
.nav-toggle {
	display: none;
	background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--radius-md); cursor: pointer;
	min-width: 44px; min-height: 44px;
	flex-direction: column; align-items: center; justify-content: center; gap: 5px;
	margin-left: auto;
}
.nav-toggle span {
	display: block; width: 20px; height: 2px; border-radius: 1px;
	background: var(--text); transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast);
}
.nav-toggle:hover { border-color: var(--accent); }
.site-header--open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header--open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header--open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
	.nav-toggle { display: inline-flex; }
	.site-nav { display: none; }
	.site-header--open .site-nav {
		display: flex; flex-direction: column; align-items: stretch;
		flex-basis: 100%; margin-left: 0; gap: 2px;
		padding: var(--space-3) 0 var(--space-2);
		border-top: 1px solid var(--border);
	}
	.site-header--open .site-nav a { padding: var(--space-3) var(--space-2); font-size: var(--text-base); }
}

.site-footer {
	border-top: 1px solid var(--border);
	background: var(--bg-deep);
	padding: var(--space-7) 0;
	color: var(--text-faint); font-size: var(--text-sm);
}
.site-footer .attribution { margin-top: var(--space-4); font-size: var(--text-xs); line-height: 1.7; }
.footer-legal { margin-top: var(--space-3); display: flex; gap: var(--space-3); align-items: center; }
.footer-legal a { color: var(--text-muted); text-decoration: none; }
.footer-legal a:hover { color: var(--text); text-decoration: underline; }

/* =========================================================
   4. COMPONENTS
   ========================================================= */

/* hero */
.hero {
	position: relative; overflow: hidden;
	min-height: min(72vh, 640px);
	display: flex; align-items: flex-end;
	background: var(--bg-deep);
}
.hero__img { position: absolute; inset: 0; }
.hero__img img { width: 100%; height: 100%; object-fit: cover; }
.hero__img::after { content: ""; position: absolute; inset: 0; background: var(--scrim); }
.hero__content { position: relative; z-index: 1; width: 100%; padding: var(--space-8) var(--space-5) var(--space-7); }
.hero h1 { font-size: var(--text-hero); color: #fff; max-width: 15ch; margin-bottom: var(--space-3); }
.hero p { color: #e6ecf5; font-size: var(--text-lg); max-width: 46ch; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.hero .btn { margin-top: var(--space-3); }
.hero__credit { position: absolute; right: var(--space-4); bottom: var(--space-2); z-index: 1; color: rgba(255,255,255,.55); font-size: var(--text-xs); }

/* buttons */
.btn {
	display: inline-flex; align-items: center; gap: var(--space-2);
	background: var(--accent-deep); color: var(--accent-ink);
	border: 0; border-radius: var(--radius-md); cursor: pointer;
	font-family: var(--font-body); font-size: var(--text-base); font-weight: var(--weight-med);
	padding: 0 var(--space-5); min-height: 46px;
	text-decoration: none;
	transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast);
}
.btn:hover { background: var(--accent-deep-strong); color: var(--accent-ink); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--accent); }

/* cards + grids */
.grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid--wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.card {
	background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--radius-lg); overflow: hidden;
	box-shadow: var(--shadow-1);
	transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
	display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.card__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--surface-2); }
/* Absolutely positioned so a portrait image can never stretch the box. */
.card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* No-image state: an intentional starry night, not a void. */
.media-placeholder {
	position: absolute; inset: 0;
	background:
		radial-gradient(1.5px 1.5px at 18% 30%, var(--star) 50%, transparent 51%),
		radial-gradient(1px 1px at 62% 18%, var(--star) 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 81% 55%, var(--star) 50%, transparent 51%),
		radial-gradient(1px 1px at 38% 68%, var(--star) 50%, transparent 51%),
		radial-gradient(1px 1px at 72% 82%, var(--star) 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 8% 78%, var(--star) 50%, transparent 51%),
		radial-gradient(1px 1px at 48% 42%, var(--star) 50%, transparent 51%),
		radial-gradient(1px 1px at 90% 12%, var(--star) 50%, transparent 51%),
		linear-gradient(180deg, var(--bg-deep) 0%, var(--surface-2) 100%);
	opacity: .9;
}
.card__media .badge { position: absolute; top: var(--space-3); left: var(--space-3); }
.card__body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.card__title { font-size: var(--text-lg); margin: 0; }
.card__title a { color: var(--text); text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; } /* whole-card click */
.card { position: relative; }
.card__meta { color: var(--text-faint); font-size: var(--text-sm); margin: 0; }

/* badges + chips */
.badge {
	display: inline-flex; align-items: center; gap: 5px;
	background: var(--ok-bg); color: var(--ok);
	border-radius: var(--radius-pill);
	font-size: var(--text-xs); font-weight: var(--weight-med);
	padding: 4px 10px; letter-spacing: .02em;
}
.badge--info { background: var(--surface-2); color: var(--text-muted); }
.chip {
	display: inline-flex; align-items: center; gap: 6px;
	background: var(--surface-2); color: var(--text-muted);
	border: 1px solid var(--border); border-radius: var(--radius-pill);
	font-size: var(--text-sm); padding: 6px 14px; min-height: 36px;
}

/* section headers */
.section-head { display: flex; align-items: baseline; gap: var(--space-4); margin: var(--space-8) 0 var(--space-5); flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head .more { margin-left: auto; font-size: var(--text-sm); font-weight: var(--weight-med); text-decoration: none; }
.section-head .kicker { display: block; color: var(--accent); font-family: var(--font-body); font-size: var(--text-xs); font-weight: var(--weight-bold); text-transform: uppercase; letter-spacing: .12em; margin-bottom: var(--space-2); }

/* article/prose */
.entry-meta { color: var(--text-faint); font-size: var(--text-sm); }
article.hentry img { border-radius: var(--radius-lg); }

/* scopes roster */
.scope-disclaimer {
	background: var(--surface); border: 1px solid var(--border);
	border-left: 4px solid var(--accent); border-radius: var(--radius-md);
	padding: var(--space-4) var(--space-5); margin: var(--space-5) 0;
	max-width: 72ch; line-height: 1.6;
}
.scope-disclaimer strong { display: block; margin-bottom: var(--space-1); }
.scope-list { display: flex; flex-direction: column; gap: var(--space-5); margin: var(--space-5) 0; }
.scope-card {
	display: grid; grid-template-columns: minmax(220px, 340px) 1fr;
	background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-1);
}
.scope-card__media { background: #fff; display: flex; align-items: center; justify-content: center; padding: var(--space-4); }
.scope-card__media img { max-height: 300px; width: auto; object-fit: contain; border-radius: 0; }
.scope-card__body { padding: var(--space-5); min-width: 0; }
.scope-card__head { display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.scope-card__make { color: var(--text-faint); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .1em; margin: 0; }
.scope-card__head h2 { margin: 0; font-size: var(--text-xl); }
.scope-card__tagline { color: var(--text-muted); font-size: var(--text-sm); margin: 2px 0 0; }
.scope-card__price { text-align: right; }
.scope-card__price span { font-size: var(--text-lg); font-weight: var(--weight-bold); color: var(--accent); display: block; }
.scope-badge { font-style: normal; font-size: var(--text-xs); border-radius: var(--radius-pill); padding: 2px 10px; }
.scope-badge--warn { background: var(--warn-bg); color: var(--warn); }
.scope-badge--info { background: var(--surface-2); color: var(--text-muted); }
.scope-specs {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: var(--space-2) var(--space-4); margin: var(--space-4) 0;
	padding: var(--space-3) var(--space-4); background: var(--surface-2); border-radius: var(--radius-md);
}
.scope-specs div { min-width: 0; }
.scope-specs dt { color: var(--text-faint); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .06em; }
.scope-specs dd { margin: 0; font-size: var(--text-sm); }
.scope-card__bestfor { font-size: var(--text-sm); margin-bottom: var(--space-2); }
.scope-card__note { color: var(--warn); font-size: var(--text-sm); background: var(--warn-bg); border-radius: var(--radius-md); padding: var(--space-2) var(--space-3); }
.scope-card__actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-3); }
@media (max-width: 700px) {
	.scope-card { grid-template-columns: 1fr; }
	.scope-card__media img { max-height: 220px; }
	.scope-card__price { text-align: left; }
}

/* article figures + footnotes (long-form learning content) */
.article-figure { margin: var(--space-6) 0; }
.article-figure img, .article-figure svg { width: 100%; height: auto; border-radius: var(--radius-lg); background: var(--surface); }
.article-figure figcaption { color: var(--text-faint); font-size: var(--text-sm); margin-top: var(--space-2); line-height: 1.5; }
sup.fn a { text-decoration: none; font-weight: var(--weight-bold); font-size: 0.75em; }
.footnotes { font-size: var(--text-sm); color: var(--text-muted); padding-left: 1.2em; }
.footnotes li { margin-bottom: var(--space-2); }
.prose table, article.hentry table { border-collapse: collapse; width: 100%; font-size: var(--text-sm); }
.prose th, .prose td, article.hentry th, article.hentry td { border: 1px solid var(--border); padding: var(--space-2) var(--space-3); text-align: left; }
.prose th, article.hentry th { background: var(--surface-2); }
.prose { max-width: 68ch; }

/* reserved ad slots — bounded, labeled, collapse when empty */
.ad-slot {
	border: 1px dashed var(--border); border-radius: var(--radius-md);
	background: var(--surface);
	display: flex; align-items: center; justify-content: center;
	min-height: 120px; position: relative;
	color: var(--text-faint); font-size: var(--text-xs);
}
.ad-slot::before {
	content: "Advertisement"; position: absolute; top: 6px; left: 10px;
	font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint);
}
.ad-slot:empty { display: none; } /* graceful no-ad state (placeholder text counts as content in dev) */
.ad-slot--infeed { grid-column: 1 / -1; min-height: 100px; }
.ad-slot--inarticle { margin: var(--space-6) 0; }

/* skeletons + empty states */
.skeleton { background: linear-gradient(100deg, var(--surface-2) 40%, var(--surface) 50%, var(--surface-2) 60%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-md); }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty-state { text-align: center; color: var(--text-muted); padding: var(--space-8) var(--space-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }

/* =========================================================
   5. FEATURE BLOCKS (engine panel, community, forms)
   ========================================================= */

.ssc-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); margin: var(--space-5) 0; }
.ssc-panel--unavailable { color: var(--text-muted); font-style: italic; }
.ssc-panel__stats { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-2); }
.ssc-stat { background: var(--surface-2); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); flex: 1 1 180px; font-size: var(--text-sm); }
.ssc-stat span { display: block; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 2px; }
.ssc-panel__heading { font-size: var(--text-base); margin: var(--space-4) 0 var(--space-2); }
.ssc-targets { list-style: none; margin: 0; padding: 0; }
.ssc-targets li { border-bottom: 1px solid var(--border); font-size: var(--text-sm); }
.ssc-targets li:last-child { border-bottom: 0; }
.ssc-target { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; }
.ssc-target__main { display: flex; flex-direction: column; gap: 1px; min-width: 0; margin-right: auto; }
.ssc-target__main strong { font-size: var(--text-base); color: var(--text); }
.ssc-target__sub { color: var(--text-faint); font-size: var(--text-xs); text-transform: capitalize; }
.ssc-target__alt {
	color: var(--accent); font-weight: var(--weight-bold); font-size: var(--text-lg);
	font-variant-numeric: tabular-nums; text-align: right; min-width: 52px; flex-shrink: 0;
}
.ssc-target__alt small { display: block; color: var(--text-faint); font-size: 10px; font-weight: 400; text-transform: uppercase; letter-spacing: .08em; }
.ssc-badge { background: var(--ok-bg); color: var(--ok); border-radius: var(--radius-pill); font-size: var(--text-xs); padding: 3px 10px; white-space: nowrap; flex-shrink: 0; }
.ssc-note { color: var(--text-muted); font-size: var(--text-xs); }
.ssc-weather { background: var(--surface-2); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); margin-top: var(--space-3); font-size: var(--text-sm); }
.ssc-weather--na { color: var(--text-muted); font-style: italic; }
.ssc-attribution { color: var(--text-faint); font-size: var(--text-xs); margin-top: var(--space-3); }

.ssc-potd { margin: 0; }
.ssc-potd img { border-radius: var(--radius-lg); }
.ssc-potd figcaption { color: var(--text-muted); font-size: var(--text-sm); margin-top: var(--space-2); }

.ssc-submission-form, .ssc-subscribe {
	background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--radius-lg); padding: var(--space-5); margin: var(--space-5) 0;
}
.ssc-submission-form label, .ssc-subscribe label { font-weight: var(--weight-med); font-size: var(--text-sm); }
.ssc-submission-form input[type=text], .ssc-submission-form input[type=email],
.ssc-submission-form input[type=url], .ssc-submission-form textarea,
.ssc-submission-form select,
.ssc-subscribe input[type=email], .sky-controls input, .sky-controls select,
.sky-picker input, .sky-picker select {
	width: 100%; background: var(--bg); color: var(--text);
	border: 1px solid var(--border); border-radius: var(--radius-md);
	padding: 10px 12px; font-size: var(--text-base); font-family: var(--font-body);
	min-height: 44px; margin-top: var(--space-1);
}
.ssc-submission-form button, .ssc-subscribe button {
	margin-top: var(--space-3);
	background: var(--accent-deep); color: var(--accent-ink);
	border: 0; border-radius: var(--radius-md); cursor: pointer;
	font-family: var(--font-body); font-size: var(--text-base); font-weight: var(--weight-med);
	padding: 0 var(--space-5); min-height: 46px;
}
.ssc-submission-form button:hover, .ssc-subscribe button:hover {
	background: var(--accent-deep-strong); color: var(--accent-ink);
}
.ssc-notice { border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); margin: var(--space-3) 0; font-size: var(--text-sm); }
.ssc-notice--ok { background: var(--ok-bg); color: var(--ok); }
.ssc-notice--error { background: var(--bad-bg); color: var(--bad); }
.ssc-disclosure { color: var(--text-faint); font-size: var(--text-xs); display: block; }
.ssc-video iframe { max-width: 100%; border-radius: var(--radius-lg); border: 0; }

/* sky tonight controls */
.sky-controls { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: end; margin: var(--space-5) 0; }
.sky-controls > div { flex: 1 1 200px; }
.sky-controls .btn { flex: 0 0 auto; }
.sky-status { color: var(--text-muted); font-size: var(--text-sm); min-height: 1.4em; }

/* full-bleed cover hero for park + article detail pages.
   The hero itself is sticky: pinned with a negative top so that once you
   scroll past it, its bottom ~150px (real image + the full title block)
   stays visible under the site header. 210px = 60px header + 150px sliver. */
.park-hero {
	position: sticky;
	top: calc(210px - min(58vh, 560px));
	z-index: 15;
	overflow: hidden;
	background: var(--bg-deep);
}
.park-hero img { width: 100%; height: min(58vh, 560px); object-fit: cover; display: block; }
.park-hero::after { content: ""; position: absolute; inset: 0; background: var(--scrim); pointer-events: none; }
.park-hero__title { position: absolute; left: 0; right: 0; bottom: var(--space-4); z-index: 1; }
.park-hero__title h1 { color: #fff; margin: 0; font-size: var(--text-3xl); }
.park-hero__title .entry-meta { color: rgba(255,255,255,.88); text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.park-hero__credit { position: absolute; right: var(--space-3); top: var(--space-3); z-index: 1; color: rgba(255,255,255,.6); font-size: var(--text-xs); }

/* stargazing spot cards on park pages */
.spot-grid {
	display: grid; gap: var(--space-4);
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	margin: var(--space-5) 0;
}
.spot-card {
	background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5);
	display: flex; flex-direction: column;
}
.spot-card h3 { font-size: var(--text-lg); margin: 0 0 var(--space-2); }
.spot-card p { color: var(--text-muted); font-size: var(--text-sm); margin: 0 0 var(--space-3); flex: 1; }
.spot-card__link { font-size: var(--text-sm); font-weight: var(--weight-med); text-decoration: none; }

/* archive date controls (trip planning) */
.archive-controls { display: flex; gap: var(--space-4); flex-wrap: wrap; align-items: end; margin-bottom: var(--space-5); }
.archive-controls label { font-size: var(--text-sm); font-weight: var(--weight-med); color: var(--text-muted); }
.archive-controls input[type=date] {
	display: block; background: var(--surface); color: var(--text);
	border: 1px solid var(--border); border-radius: var(--radius-md);
	padding: 8px 12px; min-height: 44px; margin-top: var(--space-1);
	font-family: var(--font-body); font-size: var(--text-sm);
}
.archive-controls .note { color: var(--text-faint); font-size: var(--text-xs); flex-basis: 100%; margin: 0; }

@media (max-width: 640px) {
	.hero { min-height: 60vh; }
	.section-head { margin-top: var(--space-7); }
	main.wrap { padding-top: var(--space-5); }
}

/* gear cards + detail */
.gear-cat { margin-top: var(--space-6); }
.gear-card .badge { align-self: flex-start; margin-bottom: var(--space-1); }
.gear-card h4.card__title { font-size: var(--text-lg); margin: 0; }
.gear-card__why { color: var(--text-muted); font-size: var(--text-sm); flex: 1; margin: 0 0 var(--space-3); }
.gear-card__buy { font-size: var(--text-sm); font-weight: var(--weight-med); text-decoration: none; position: relative; z-index: 1; }
.gear-detail { max-width: var(--narrow-w); }
.gear-detail .badge { margin-bottom: var(--space-2); display: inline-flex; }

/* gear product images */
.gear-card__media { background: #fff; aspect-ratio: 4 / 3; }
.gear-card__media img { object-fit: contain !important; padding: var(--space-3); }
.gear-detail__media { margin: var(--space-5) 0; background: #fff; border-radius: var(--radius-lg); padding: var(--space-4); }
.gear-detail__media img { max-height: 380px; width: auto; margin: 0 auto; border-radius: 0; }
.gear-detail__media figcaption { color: var(--text-faint); font-size: var(--text-xs); margin-top: var(--space-2); text-align: center; }

/* API page code sample */
.api-code {
	background: var(--bg-deep); border: 1px solid var(--border);
	border-radius: var(--radius-md); padding: var(--space-4) var(--space-5);
	margin: var(--space-4) 0; overflow-x: auto;
	font-size: var(--text-sm); line-height: 1.6; color: var(--text);
}
.api-code code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }

/* async engine panels: instant paint, spinner until the engine answers */
.ssc-panel--loading {
	display: flex; align-items: center; gap: var(--space-3);
	background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--radius-lg); padding: var(--space-5); margin: var(--space-5) 0;
	color: var(--text-muted); font-size: var(--text-sm); min-height: 90px;
}
.ssc-spinner {
	width: 26px; height: 26px; flex: none; border-radius: 50%;
	border: 3px solid color-mix(in srgb, var(--accent) 25%, transparent);
	border-top-color: var(--accent);
	animation: ssc-panel-spin .8s linear infinite;
}
@keyframes ssc-panel-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
	.ssc-spinner { animation-duration: 1.6s; }
}

/* week-ahead outlook strip */
.ssc-outlook { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); margin: var(--space-5) 0; }
.ssc-outlook__strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: var(--space-3); }
.ssc-outlook__night {
	background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md);
	padding: var(--space-3); display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
}
.ssc-outlook__night--today { border-color: var(--accent); }
.ssc-outlook__day { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); font-weight: var(--weight-bold); }
.ssc-outlook__moon { font-size: var(--text-lg); }
.ssc-outlook__moon em { font-style: normal; font-size: var(--text-sm); color: var(--text-muted); }
.ssc-outlook__dark { font-size: var(--text-sm); color: var(--text); }
.ssc-outlook__wx { font-size: var(--text-xs); border-radius: var(--radius-pill); padding: 2px 9px; }
.ssc-outlook__wx--promising { background: var(--ok-bg); color: var(--ok); }
.ssc-outlook__wx--marginal { background: var(--warn-bg); color: var(--warn); }
.ssc-outlook__wx--poor { background: var(--bad-bg); color: var(--bad); }
.ssc-outlook__wx--na { background: var(--surface); color: var(--text-faint); }

/* video cards + single */
.video-card .card__media { aspect-ratio: 16 / 9; }
.video-card__play {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
	font-size: 40px; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.7);
	background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.45));
	pointer-events: none;
}
.video-single .ssc-video { margin: var(--space-5) 0; }
.ssc-video { position: relative; }
.ssc-video iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: var(--radius-lg); border: 0; display: block; }

/* community gallery */
.ssc-gallery__filters { display: flex; gap: var(--space-2); flex-wrap: wrap; margin: var(--space-4) 0 var(--space-5); }
.chip--active { border-color: var(--accent); color: var(--accent); }
