/* Styling matched to kasperjunge.com (inspected computed styles):
   IBM Plex Mono, #fafafa bg, #1a1a1a text, #666 muted, underlined dark content links. */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --green: #5a8f2e;
}

body {
  background: #fafafa;
  color: #1a1a1a;
  font-family: "IBM Plex Mono", monospace;
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
}

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 60px 24px;
}

/* Nav */
nav {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 60px;
}

nav a {
  font-size: 14px;
  color: #666;
  text-decoration: none;
}

nav .logo {
  color: #1a1a1a;
  margin-right: auto;
}

nav .logo span { color: inherit; }

nav a:hover { color: var(--green); }

/* Type */
h1 { font-size: 28px; font-weight: 600; line-height: 1.7; margin: 0 0 16px; }
h2 { font-size: 20px; font-weight: 600; margin: 40px 0 12px; }
h3 { font-size: 15px; font-weight: 600; margin: 24px 0 8px; }

p { margin: 0 0 16px; }

/* Links: hover-only wobble underline (see block at end of file). */
a { color: #1a1a1a; text-decoration: none; }
a:hover { color: var(--green); }

.subhead { color: #666; margin: 0 0 24px; }

.label {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #666;
  margin: 48px 0 4px;
}

.label + h2 { margin-top: 4px; }

.muted { color: #666; }

/* Stats */
.stats { margin: 24px 0; }
.stats div { margin: 0 0 12px; }
.stats span { color: #666; }

.sources { font-size: 13px; color: #666; margin-top: 64px; }
.sources p { margin: 0 0 4px; }
.sources a { color: #666; }
sup { font-size: 11px; }
sup a { color: #666; text-decoration: none; }

/* Quote */
blockquote {
  margin: 40px 0;
  padding-left: 16px;
  border-left: 2px solid #e0e0e0;
  font-style: italic;
}

/* Lists */
ul.signals { padding-left: 22px; margin: 16px 0; }
ul.signals li { margin: 0 0 12px; }

ol.phases { padding-left: 22px; margin: 16px 0; }
ol.phases li { margin: 0 0 16px; }
ol.phases strong { display: block; }

/* CTA */
.cta { margin: 56px 0 0; }
.cta h2 { margin-top: 0; }

/* Posts list (matches reference blog page: no bullets, block dates) */
ul.posts { list-style: none; padding: 0; margin: 24px 0; }
ul.posts li { margin: 0 0 24px; }
ul.posts a { font-size: 16px; }
ul.posts a:hover { color: var(--green); }
ul.posts .date { display: block; font-size: 13px; color: #666; margin-top: 4px; }

/* Article */
article .date { font-size: 13px; color: #666; margin-bottom: 32px; }

/* Article bio */
.bio {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
  font-size: 14px;
  color: #666;
}

/* Footer */
footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid #e0e0e0;
  font-size: 13px;
  color: #666;
}

footer a { color: #666; }
footer a:hover { color: var(--green); }

/* ============================================================
   Animation layer — added July 2026
   ============================================================ */

/* Green text selection */
::selection { background: var(--green); color: #fafafa; }
::-moz-selection { background: var(--green); color: #fafafa; }

/* Reading progress bar — pinned to top of viewport, width driven by main.js */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--green);
  z-index: 100;
  pointer-events: none;
  transition: width 100ms linear;
}

/* Wobble underline on hover — content links + nav links (logo excluded) */
.container a:not(.logo),
nav a:not(.logo) {
  display: inline-block;
  position: relative;
  padding-bottom: 6px;
  transition: color 200ms ease;
}
.container a:not(.logo)::after,
nav a:not(.logo)::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 6px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 6' preserveAspectRatio='none'><path d='M 0 3 C 8 5, 16 1, 24 3 S 40 5, 48 3 S 64 1, 72 3 S 88 5, 100 3' stroke='%235a8f2e' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 700ms cubic-bezier(.2, .8, .2, 1);
}
.container a:not(.logo):hover::after,
nav a:not(.logo):hover::after {
  transform: scaleX(1);
}

/* Reduced-motion: skip the animation, keep the effects functional */
@media (prefers-reduced-motion: reduce) {
  .container a:not(.logo)::after,
  nav a:not(.logo)::after {
    transition: none;
  }
  .reading-progress { transition: none; }
}

/* ============================================================
   Harvest monitor — added November 2026
   ============================================================ */

.crumbs { font-size: 13px; color: #666; margin: 0 0 8px; }
.crumbs a { color: #666; }
.small { font-size: 13px; }

/* Season timeline: reuses ol.phases, marks the current phase */
ol.timeline li { color: #666; }
ol.timeline li strong { color: #1a1a1a; }
ol.timeline li.now strong { color: var(--green); }
ol.timeline .here { font-weight: 400; font-size: 13px; }

/* Status dots */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.dot.amber { background: #d9a21b; }
.dot.grey { background: #b5b5b5; }
.dot.orange { background: #cf6a2b; }
.dot.low { background: var(--green); }
.stats.status div { margin-bottom: 16px; }
.stats.status strong { display: block; }

/* Impact markers */
.plus { color: var(--green); }
.minus { color: #b5541f; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 16px 0 24px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.5; }
th { text-align: left; font-weight: 600; color: #666; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; padding: 8px 10px 8px 0; border-bottom: 1px solid #1a1a1a; }
td { padding: 10px 10px 10px 0; border-bottom: 1px solid #e0e0e0; vertical-align: top; }
tr.highlight td { background: #f1f5ec; }
td sup { line-height: 0; }

/* Collapsible detail */
details { margin: 16px 0 24px; border-top: 1px solid #e0e0e0; border-bottom: 1px solid #e0e0e0; }
summary { cursor: pointer; padding: 12px 0; font-weight: 600; }
summary:hover { color: var(--green); }

/* Callouts (wildcard / our reading) */
p.note { border-left: 2px solid var(--green); padding-left: 16px; }
p.note .tag { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--green); margin-right: 6px; }

/* Nav fits 3 links on phones: logo on its own line */
nav a { white-space: nowrap; }
@media (max-width: 480px) {
  nav { flex-wrap: wrap; gap: 4px 18px; }
  nav .logo { flex-basis: 100%; margin-bottom: 4px; }
}

/* Harvest monitor — components (v2) */
.hm-toc { position: sticky; top: 0; z-index: 10; display: flex; gap: 4px 16px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; background: #fafafa; border-top: 1px solid #e0e0e0; border-bottom: 1px solid #e0e0e0; padding: 8px 0 2px; margin: 24px 0 8px; font-size: 13px; }
.hm-toc a { color: #666; white-space: nowrap; flex: none; }
.hm section { scroll-margin-top: 56px; }

.timeline-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 20px 0 8px; }
.phase { position: relative; border: 1px solid #e0e0e0; padding: 12px 10px; font-size: 12px; line-height: 1.5; background: #fff; }
.phase .when { display: block; color: #666; text-transform: uppercase; letter-spacing: 1px; font-size: 11px; }
.phase strong { display: block; margin: 2px 0 6px; font-size: 13px; line-height: 1.35; }
.phase .decides { display: block; color: #666; }
.phase.now { border-color: var(--green); background: #f1f5ec; }
.phase.now strong { color: var(--green); }
.phase .here { position: absolute; top: -10px; left: 8px; background: var(--green); color: #fafafa; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; padding: 1px 6px; }

.status-grid, .context-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 8px; }
.price-grid, .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.hm-card { border: 1px solid #e0e0e0; background: #fff; padding: 14px; font-size: 13px; line-height: 1.6; }
.hm-card .card-label { display: block; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #666; margin-bottom: 4px; }
.hm-card .card-label.plus { color: var(--green); }
.hm-card .card-label.minus { color: #b5541f; }
.hm-card .sub-label { margin-top: 16px; padding-top: 12px; border-top: 1px dashed #e0e0e0; color: var(--green); }
.hm-card .card-value { display: block; font-size: 18px; font-weight: 600; margin: 2px 0 6px; }
.hm-card .card-sub { display: block; }
.hm-card .card-normal { display: block; margin-top: 10px; padding-top: 8px; border-top: 1px dashed #e0e0e0; color: #666; }
.hm-card ul.signals { padding-left: 18px; margin: 8px 0 0; }
.hm-card ul.signals li { margin-bottom: 8px; }
.price-big { display: block; font-size: 26px; font-weight: 600; margin: 4px 0; }
.price-big small { font-size: 13px; font-weight: 400; color: #666; }

@media (max-width: 640px) {
  .timeline-grid, .status-grid, .context-grid, .price-grid, .two-col { grid-template-columns: 1fr; }
  .phase.now { margin-top: 6px; }
}

/* Harvest monitor — v3 tweaks */
.hm h2 { margin-top: 56px; }
.hm #stage h2 { margin-top: 32px; }

/* In-page navbar: clearly a bar */
.hm-toc { align-items: center; gap: 6px; padding: 8px 10px; background: #fff; border: 1px solid #1a1a1a; box-shadow: 0 2px 0 #1a1a1a; margin: 28px 0 8px; }
.hm-toc .toc-label { flex: none; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #fafafa; background: #1a1a1a; padding: 2px 8px; margin-right: 6px; }
.hm-toc a { padding: 2px 8px 2px; border: 1px solid transparent; color: #1a1a1a; }
.hm-toc a:hover { border-color: var(--green); color: var(--green); }
.hm-toc a::after { display: none; }
.container .hm-toc a { padding-bottom: 2px; }

/* Back to top */
.back-to-top { position: fixed; right: 20px; bottom: 20px; z-index: 20; font-size: 13px; color: #fafafa !important; background: #1a1a1a; padding: 8px 12px; text-decoration: none; opacity: 0; pointer-events: none; transition: opacity 200ms ease; }
.back-to-top.show { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--green); }

/* Footnote links: black and underlined, no wobble */
.container sup a, .hm sup a { display: inline; padding: 0; color: #1a1a1a; text-decoration: underline; text-underline-offset: 2px; }
.container sup a::after { display: none; }
.container sup a:hover { color: var(--green); }
.hm-toc { flex-wrap: wrap; overflow: visible; }
@media (max-width: 640px) {
  .hm-toc { flex-wrap: nowrap; overflow-x: auto; }
}
.hm-toc { gap: 2px; }
.hm-toc a, .container .hm-toc a { padding: 2px 6px; }
.hm-toc { font-size: 12.5px; }
