:root {
  /* Exact tokens from the app's own DarkColorScheme (ui/theme/Color.kt). Moose's brand is
     the night sky — this page commits to that dark identity regardless of system theme. */
  --ink: #0b1220;
  --panel: #141f33;
  --panel-2: #0f1729;
  --line: #263351;
  --frost: #f4f6fb;
  --frost-dim: #8c97ad;
  --green: #4ce0a0;
  --teal: #35c7c1;
  --violet: #b088f9;
  --pink: #e8a0d8;
  --amber: #ffb74d;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--frost);
  font-family: "Manrope", system-ui, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
img { max-width: 100%; display: block; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.display { font-family: "Unbounded", "Manrope", sans-serif; }

.shell { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.article-shell { max-width: 700px; margin: 0 auto; padding: 0 24px; }

/* nav */
nav.top {
  display: flex; align-items: center; gap: 12px;
  padding: 24px; max-width: 1080px; margin: 0 auto;
}
nav.top .brand-link { display: flex; align-items: center; gap: 12px; text-decoration: none; }
nav.top img { width: 32px; height: 32px; border-radius: 8px; }
nav.top .brand { font-family: "Unbounded", sans-serif; font-weight: 600; font-size: 1rem; color: var(--frost); }
nav.top .nav-links { margin-left: auto; display: flex; align-items: center; gap: 22px; }
nav.top .nav-links a { color: var(--frost-dim); font-weight: 600; font-size: 0.92rem; text-decoration: none; }
nav.top .nav-links a:hover, nav.top .nav-links a[aria-current="page"] { color: var(--green); }
nav.top .download-badge { margin-left: 20px; height: 40px; width: auto; display: block; }
@media (max-width: 480px) { nav.top .download-badge { margin-left: 12px; height: 34px; } }
nav.top .download-badge img { height: 100%; width: auto; border-radius: 0; }

/* blog index */
.blog-hero { padding: 20px 0 50px; }
.blog-hero .kicker {
  font-family: "JetBrains Mono", monospace; font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--green); margin-bottom: 14px;
}
.blog-hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; margin: 0 0 14px; text-wrap: balance; }
.blog-hero p { color: var(--frost-dim); max-width: 56ch; font-size: 1.05rem; }

.post-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; margin-bottom: 90px;
}
@media (max-width: 700px) { .post-grid { grid-template-columns: 1fr; } }
.post-card {
  background: var(--panel); padding: 30px 28px; display: flex; flex-direction: column; gap: 14px;
  text-decoration: none; transition: background 0.15s ease;
}
.post-card:hover { background: var(--panel-2); }
.post-card:hover h2 { color: var(--green); }
.post-card .cat {
  display: inline-flex; align-self: flex-start;
  font-family: "JetBrains Mono", monospace; font-size: 0.66rem; letter-spacing: 0.04em;
  padding: 4px 10px; border-radius: 6px;
}
.cat.science { background: rgba(76,224,160,0.14); color: var(--green); }
.cat.data { background: rgba(53,199,193,0.16); color: var(--teal); }
.cat.travel { background: rgba(176,136,249,0.16); color: var(--violet); }
.cat.gear { background: rgba(232,160,216,0.16); color: var(--pink); }
.cat.tips { background: rgba(255,183,77,0.16); color: var(--amber); }
.post-card h2 { font-family: "Unbounded", sans-serif; font-weight: 500; font-size: 1.2rem; margin: 0; text-wrap: balance; transition: color 0.15s ease; }
.post-card p.excerpt { color: var(--frost-dim); font-size: 0.92rem; margin: 0; flex-grow: 1; }
.post-card .meta { font-family: "JetBrains Mono", monospace; font-size: 0.72rem; color: var(--frost-dim); }

/* article */
.article-header { padding: 40px 0 20px; }
.article-header .cat { display: inline-block; font-family: "JetBrains Mono", monospace; font-size: 0.68rem; letter-spacing: 0.04em; padding: 4px 10px; border-radius: 6px; margin-bottom: 18px; }
.article-header h1 { font-size: clamp(1.8rem, 4.4vw, 2.6rem); font-weight: 700; line-height: 1.12; margin: 0 0 16px; text-wrap: balance; }
.article-header .meta { font-family: "JetBrains Mono", monospace; font-size: 0.78rem; color: var(--frost-dim); }

article { padding: 10px 0 60px; font-size: 1.05rem; }
article h2 { font-family: "Unbounded", sans-serif; font-weight: 500; font-size: 1.4rem; margin: 42px 0 16px; text-wrap: balance; }
article h3 { font-family: "Unbounded", sans-serif; font-weight: 500; font-size: 1.12rem; margin: 30px 0 12px; }
article p { color: var(--frost-dim); margin: 0 0 20px; }
article strong { color: var(--frost); }
article ul, article ol { color: var(--frost-dim); padding-left: 1.3em; margin: 0 0 20px; }
article li { margin-bottom: 10px; }
article li::marker { color: var(--green); }
article li strong { color: var(--frost); }

.callout {
  border: 1px solid var(--line); border-left: 3px solid var(--green);
  background: var(--panel); border-radius: 0 12px 12px 0;
  padding: 18px 22px; margin: 30px 0; font-size: 0.95rem; color: var(--frost-dim);
}
.callout strong { color: var(--frost); }

.data-table { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 24px 0; background: var(--panel); }
.data-row { display: grid; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 0.88rem; }
.data-row:last-child { border-bottom: none; }
.data-row.head { background: var(--panel-2); font-family: "JetBrains Mono", monospace; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--frost-dim); }
.data-row div:first-child { color: var(--frost); font-weight: 600; }
.data-row div { color: var(--frost-dim); }

.app-cta {
  border: 1px solid var(--line); border-radius: 18px;
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  padding: 30px 28px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  margin: 40px 0 10px;
}
.app-cta img { width: 44px; height: 44px; border-radius: 11px; }
.app-cta .txt { flex: 1; min-width: 200px; }
.app-cta .txt strong { display: block; font-family: "Unbounded", sans-serif; font-size: 1rem; margin-bottom: 4px; color: var(--frost); }
.app-cta .txt span { font-size: 0.88rem; color: var(--frost-dim); }
.app-cta a.btn {
  font-weight: 700; font-size: 0.88rem; background: var(--green); color: #04120d;
  padding: 11px 20px; border-radius: 100px; text-decoration: none; white-space: nowrap;
}

.post-nav { display: flex; justify-content: space-between; gap: 16px; padding: 30px 0 70px; border-top: 1px solid var(--line); margin-top: 20px; flex-wrap: wrap; }
.post-nav a { font-size: 0.9rem; color: var(--frost-dim); }
.post-nav a:hover { color: var(--green); }

footer.site { border-top: 1px solid var(--line); padding: 30px 0; }
footer.site .shell { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.82rem; color: var(--frost-dim); }
footer.site a { color: var(--frost-dim); }
footer.site a:hover { color: var(--green); }

/* breadcrumbs + lede */
.breadcrumbs { font-family: "JetBrains Mono", monospace; font-size: 0.72rem; color: var(--frost-dim); padding-top: 24px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.breadcrumbs a { color: var(--frost-dim); }
.breadcrumbs a:hover { color: var(--green); }
.article-header .lede { color: var(--frost-dim); font-size: 1.1rem; margin: 0 0 18px; }

/* key takeaways: a plain summary list near the top for skimmers and answer engines */
.tldr {
  border: 1px solid var(--line); background: var(--panel); border-radius: 14px;
  padding: 20px 24px 6px; margin: 10px 0 30px;
}
.tldr .label { font-family: "JetBrains Mono", monospace; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); margin-bottom: 10px; }
.tldr ul { margin-bottom: 14px; }
.tldr li { margin-bottom: 8px; font-size: 0.97rem; }

/* table of contents */
.toc { border-left: 2px solid var(--line); padding: 4px 0 4px 18px; margin: 0 0 34px; }
.toc .label { font-family: "JetBrains Mono", monospace; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--frost-dim); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 1.2em; font-size: 0.93rem; }
.toc li { margin-bottom: 4px; }
.toc a { color: var(--frost-dim); }
.toc a:hover { color: var(--green); }
article h2[id], article h3[id] { scroll-margin-top: 20px; }

/* real tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); margin: 24px 0; }
article table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
article caption { caption-side: bottom; text-align: left; padding: 10px 16px; font-size: 0.8rem; color: var(--frost-dim); border-top: 1px solid var(--line); }
article th, article td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
article thead th { background: var(--panel-2); font-family: "JetBrains Mono", monospace; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--frost-dim); font-weight: 500; }
article tbody tr:last-child td { border-bottom: none; }
article td { color: var(--frost-dim); }
article td:first-child { color: var(--frost); font-weight: 600; }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 600; color: var(--frost); list-style: none; display: flex; justify-content: space-between; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--green); font-family: "JetBrains Mono", monospace; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 20px; margin-bottom: 16px; }

/* related reading + sources */
.related { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 26px; }
.related h2 { margin-top: 0; font-size: 1.1rem; }
.related ul { list-style: none; padding: 0; }
.related li { margin-bottom: 14px; }
.related li a { font-weight: 600; }
.related li span { display: block; font-size: 0.9rem; color: var(--frost-dim); }
.sources { font-size: 0.85rem; }
.sources li { margin-bottom: 6px; }

/* figures + charts */
figure { margin: 30px 0; }
figure img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
figcaption { font-size: 0.82rem; color: var(--frost-dim); margin-top: 10px; line-height: 1.55; }
figcaption a { color: var(--frost-dim); text-decoration: underline; }
.chart { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 16px 14px 14px; }
.chart svg { width: 100%; height: auto; display: block; font-family: "JetBrains Mono", monospace; }
.chart .grid line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.chart .baseline { stroke: var(--frost-dim); stroke-width: 1; opacity: 0.6; }
.chart .axis-y text { fill: var(--frost-dim); font-size: 11px; text-anchor: end; }
.chart .axis-x text { fill: var(--frost-dim); font-size: 11px; text-anchor: middle; }
.chart .monthly { fill: none; stroke: var(--green); stroke-width: 1; opacity: 0.35; }
.chart .smoothed { fill: none; stroke: var(--green); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .marker circle { fill: var(--green); stroke: var(--panel); stroke-width: 2; }
.chart .label text { fill: var(--frost); font-size: 11.5px; }
.chart .spectrum { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
.chart .line-mark { stroke-width: 2; stroke-dasharray: 4 4; }
.key { display: inline-block; width: 18px; height: 0; vertical-align: middle; margin-right: 6px; border-top: 3px solid var(--green); }
.key-monthly { border-top-width: 1px; opacity: 0.5; }
.references { border-top: 1px solid var(--line); margin-top: 34px; padding-top: 22px; }
.references h2 { margin-top: 0; font-size: 1rem; }
.references ol { font-size: 0.85rem; }
.references li { margin-bottom: 6px; word-break: break-word; }
.references a { color: var(--frost-dim); text-decoration: underline; }
.references a:hover { color: var(--green); }
.news-flag { display: inline-flex; gap: 8px; align-items: center; }
.news-flag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.updated-note { font-size: 0.85rem; color: var(--frost-dim); border: 1px dashed var(--line); border-radius: 10px; padding: 10px 14px; margin: 0 0 26px; }
.updated-note ul { margin: 8px 0; }
.updated-note li { margin-bottom: 3px; }
.post-grid > .post-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.table-wrap .table-note { margin: 0; padding: 10px 16px; font-size: 0.8rem; color: var(--frost-dim); border-top: 1px solid var(--line); }

/* featured product (affiliate) */
.featured-product { margin: 36px 0; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(160deg, var(--panel), var(--panel-2)); padding: 22px; position: relative; overflow: hidden; }
.featured-product::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--green), var(--teal), var(--violet)); }
.fp-label { font-family: "JetBrains Mono", monospace; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); margin-bottom: 14px; }
.fp-grid { display: grid; grid-template-columns: 190px 1fr; gap: 22px; align-items: start; }
@media (max-width: 600px) { .fp-grid { grid-template-columns: 1fr; } }
.fp-img { display: block; background: #fff; border-radius: 12px; overflow: hidden; aspect-ratio: 1; }
.fp-img img { display: block; width: 100%; height: 100%; object-fit: cover; border: 0; border-radius: 0; }
article .fp-body h3 { margin: 0 0 8px; font-size: 1.15rem; }
article .fp-body p { font-size: 0.95rem; margin: 0 0 12px; }
article .fp-body ul { font-size: 0.93rem; margin: 0 0 16px; }
article .fp-body li { margin-bottom: 6px; }
.fp-btn { display: inline-block; font-weight: 700; font-size: 0.9rem; background: var(--green); color: #04120d; padding: 11px 20px; border-radius: 100px; text-decoration: none; }
.fp-btn:hover { text-decoration: none; background: #6ff0b8; }
article .fp-body .fp-note { font-size: 0.78rem; margin: 12px 0 0; }
.fp-img.fit img { object-fit: contain; padding: 14px; }

/* data tables in older posts: real columns (2- or 3-column), stacked rows on phones */
.data-row { grid-template-columns: 1fr 1.4fr; align-items: start; }
.data-row:has(> :nth-child(3)) { grid-template-columns: 0.45fr 1fr 1.6fr; }
@media (max-width: 560px) {
  .data-row, .data-row:has(> :nth-child(3)) { grid-template-columns: 1fr; gap: 2px; }
  .data-row.head { display: none; }
}

/* monthly Kp chart */
.chart .bar-obs { fill: var(--green); }
.chart .bar-fc { fill: rgba(53,199,193,0.22); stroke: var(--teal); stroke-width: 1.5; }
.chart .g1line { stroke: var(--amber); stroke-width: 1.5; stroke-dasharray: 6 4; }
.chart .g1label { fill: var(--amber); font-size: 11px; }
.chart .today { stroke: var(--frost-dim); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .todaylabel { fill: var(--frost-dim); font-size: 11px; }
.chart .moon-new { fill: #0b1220; stroke: var(--frost); stroke-width: 1.5; }
.chart .moon-ring { fill: none; stroke: var(--frost); stroke-width: 1.5; }
.chart .moon-lit, .chart .moon-full { fill: var(--frost); }
.key-obs { border-top: 0; width: 12px; height: 12px; border-radius: 3px; background: var(--green); }
.key-fc { border-top: 0; width: 12px; height: 12px; border-radius: 3px; background: rgba(53,199,193,0.22); box-shadow: inset 0 0 0 1.5px var(--teal); }

/* small phones: drop the wordmark so logo + nav links + badge fit on one line */
@media (max-width: 520px) {
  nav.top .brand { display: none; }
  nav.top .nav-links { gap: 16px; }
}

/* accessibility: links inside running text are underlined, not identified by color alone */
article p a, article li a, article td a, .table-note a, .intro a, .tip a, .info-card a,
.cams-footer-note a, .checklist a, .cams-hero p a, .callout a {
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.toc a, .related li a { text-decoration: none; }
.toc a:hover, .related li a:hover { text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* shared site footer (same markup on every page) */
footer.site .shell { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
footer.site .fbrand { display: flex; align-items: center; gap: 10px; font-family: "Unbounded", sans-serif; font-weight: 600; font-size: 0.95rem; color: var(--frost); text-decoration: none; }
footer.site .fbrand img { width: 26px; height: 26px; border-radius: 7px; }
footer.site .flinks { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.88rem; }
footer.site .flinks a { color: var(--frost-dim); text-decoration: none; }
footer.site .flinks a:hover { color: var(--green); }
footer.site .copy { width: 100%; font-size: 0.8rem; color: var(--frost-dim); padding-top: 20px; margin-top: 8px; border-top: 1px solid var(--line); }

nav.top .nav-links a { white-space: nowrap; }

/* Phones: 16px side gutter (half the previous 32px, which included the browser default body margin). */
@media (max-width: 560px) {
  .shell, .article-shell { padding-left: 16px; padding-right: 16px; }
  nav.top { padding: 18px 16px; }
}
