/* powerdate site styles. Colors are tokens so light and dark mode swap in one place. */

:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #6b6a65;
  --grid: #e1e0d9;
  --rule: #c3c2b7;
  --border: rgba(11, 11, 11, 0.1);
  --accent: #2a78d6;
  --range: #9ec5f4;
  --link: #256abf;
  --button: #256abf;
  --flag: #fab219;
  --flag-wash: rgba(250, 178, 25, 0.12);
  --code-bg: #f0efec;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --ink: #f0efec;
    --ink-2: #c3c2b7;
    --muted: #9c9a93;
    --grid: #2c2c2a;
    --rule: #383835;
    --border: rgba(255, 255, 255, 0.1);
    --accent: #3987e5;
    --range: #184f95;
    --link: #6da7ec;
    --button: #256abf;
    --flag-wash: rgba(250, 178, 25, 0.1);
    --code-bg: #262624;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
}

a {
  color: var(--link);
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 640px) {
  .wrap { padding: 0 24px; }
}

.muted { color: var(--muted); font-weight: 400; }
.small { font-size: 14px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  z-index: 20;
}

.skip:focus { top: 8px; }

/* ---------- header and footer ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
  font-size: 19px;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: 15px;
}

.site-header nav a {
  color: var(--ink-2);
  text-decoration: none;
}

.site-header nav a:hover { color: var(--ink); text-decoration: underline; }

.site-footer {
  margin-top: 72px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 15px;
  color: var(--ink-2);
}

.site-footer p { margin: 0 0 6px; max-width: 680px; }

/* ---------- home page ---------- */

.hero { padding-top: 48px; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 18px;
  max-width: 760px;
  font-size: clamp(32px, 6vw, 52px);
  letter-spacing: -0.025em;
}

.lede {
  max-width: 680px;
  margin: 0 0 32px;
  font-size: 19px;
  color: var(--ink-2);
}

.lede strong { color: var(--ink); }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  max-width: 680px;
}

.stat {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.stat-value {
  font-size: 30px;
  font-weight: 650;
  line-height: 1.1;
  margin-bottom: 6px;
}

.stat-label { font-size: 15px; color: var(--ink-2); line-height: 1.45; }

.footnote {
  max-width: 680px;
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.cite {
  font-size: 0.85em;
  text-decoration: none;
}

.section { padding-top: 56px; }

.section > h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.section-intro {
  max-width: 680px;
  margin: -4px 0 20px;
  color: var(--ink-2);
}

/* ---------- forecast card ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 16px;
}

@media (min-width: 640px) {
  .card { padding: 28px 32px; }
}

.card + .card { margin-top: 20px; }

.kicker {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--ink-2);
}

.forecast h3 {
  margin: 0 0 4px;
  font-size: 24px;
}

.meta {
  margin: 0 0 20px;
  font-size: 15px;
  color: var(--ink-2);
}

.meta a { white-space: nowrap; }

.answer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--grid);
  border-bottom: 1px solid var(--grid);
}

@media (min-width: 640px) {
  .answer {
    grid-template-columns: 1.3fr 1fr 1.2fr;
    align-items: end;
  }
}

.answer-label {
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 2px;
}

.answer-value {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.25;
}

.answer-item.main .answer-value {
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* ---------- forecast timeline (positions come from the build script) ---------- */

.timeline { margin: 24px 0 8px; }

.tl-row + .tl-row { margin-top: 10px; }

.tl-label {
  font-size: 15px;
  font-weight: 600;
}

.tl-track {
  position: relative;
  height: 58px;
  background-image: linear-gradient(to right, var(--grid) 1px, transparent 1px);
  background-size: calc(100% / var(--years)) 100%;
  border-right: 1px solid var(--grid);
}

.tl-range {
  position: absolute;
  top: 50%;
  height: 8px;
  margin-top: -4px;
  border-radius: 4px;
  background: var(--range);
}

.tl-range.open-end { border-radius: 4px 0 0 4px; }

.tl-range.fuzzy {
  border-radius: 0 4px 4px 0;
  background: linear-gradient(to right, var(--range), transparent);
}

.tl-dot,
.tl-target {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  z-index: 1;
}

.tl-dot {
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--surface);
  z-index: 2;
}

.tl-target {
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: var(--surface);
  transform: rotate(45deg);
}

/* Bigger invisible hit area, so the marks are easy to hover and tap. */
.tl-dot::before,
.tl-target::before {
  content: "";
  position: absolute;
  inset: -8px;
}

.tl-range[tabindex] { cursor: default; }

.tl-today {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px solid var(--muted);
}

.tl-note {
  position: absolute;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  color: var(--ink-2);
  transform: translateX(-50%);
  padding: 1px 3px;
  background: var(--surface);
  z-index: 3;
}

.tl-note.above { top: 4px; }
.tl-note.below { bottom: 4px; }
.tl-note.end { transform: translateX(calc(-100% + 7px)); }
.tl-note.strong { color: var(--ink); font-weight: 650; font-size: 14px; }

.tl-axis {
  position: relative;
  height: 20px;
  margin-top: 4px;
}

.tl-year {
  position: absolute;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  transform: translateX(-50%);
}

.tl-year.first { transform: none; }
.tl-year.last { transform: translateX(-100%); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-2);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.key { display: inline-block; flex: none; }
.key-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.key-range { width: 22px; height: 8px; border-radius: 4px; background: var(--range); }
.key-target {
  width: 9px;
  height: 9px;
  margin: 0 2px;
  border: 2px solid var(--ink);
  border-radius: 1px;
  transform: rotate(45deg);
}
.key-today { width: 1px; height: 14px; background: var(--muted); }

.tip {
  position: fixed;
  z-index: 30;
  max-width: 260px;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--page);
  font-size: 13px;
  line-height: 1.4;
  pointer-events: none;
}

/* ---------- tables ---------- */

.table-wrap {
  overflow-x: auto;
  margin: 16px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th, td {
  padding: 8px 12px 8px 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--grid);
}

th {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  border-bottom-color: var(--rule);
}

td { font-variant-numeric: tabular-nums; }

table.record { min-width: 760px; }

.signpost {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--page);
  border: 1px solid var(--border);
  font-size: 15px;
}

.signpost-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin: 20px 0 0;
  font-size: 15px;
}

.button {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 8px;
  background: var(--button);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.button:hover { filter: brightness(1.08); text-decoration: none; }

/* ---------- filings ---------- */

.filings {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.filing {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 12px 16px;
  border-top: 1px solid var(--grid);
  font-size: 15px;
}

.filing:first-child { border-top: 0; }

@media (min-width: 640px) {
  .filing {
    grid-template-columns: 112px 1fr;
    gap: 16px;
    padding: 12px 20px;
  }
}

.filing time {
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.filing a {
  color: var(--ink);
  text-decoration-color: var(--rule);
  overflow-wrap: anywhere;
}

.filing a:hover { text-decoration-color: currentColor; }

.filing-meta {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.filing.flagged { background: var(--flag-wash); }

.flag {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 600;
}

.flag-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--flag);
  color: #0b0b0b;
  font-size: 12px;
  font-weight: 800;
}

/* ---------- method ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
}

.steps li {
  counter-increment: step;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}

.steps h3 { margin: 0 0 6px; font-size: 18px; }
.steps p { margin: 0; font-size: 15px; color: var(--ink-2); }

.note {
  max-width: 720px;
  margin: 20px 0 0;
  font-size: 15px;
  color: var(--ink-2);
}

.note strong { color: var(--ink); }

/* ---------- report pages ---------- */

.back {
  margin: 28px 0 0;
  font-size: 15px;
}

.back a { text-decoration: none; }

.prose {
  max-width: 760px;
}

.prose h1 {
  margin: 20px 0 12px;
  font-size: clamp(28px, 5vw, 38px);
  letter-spacing: -0.02em;
}

.prose h2 {
  margin: 44px 0 12px;
  font-size: 24px;
}

.prose h3 { margin: 28px 0 8px; font-size: 19px; }

.prose p,
.prose li { color: var(--ink); }

.prose li + li { margin-top: 6px; }

.prose hr {
  border: 0;
  border-top: 1px solid var(--grid);
  margin: 28px 0;
}

.prose code,
.prose kbd {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--code-bg);
}

.prose ol li[id] { overflow-wrap: anywhere; }

.prose ol li:target {
  background: var(--flag-wash);
  border-radius: 4px;
}

.since > h2 { font-size: 22px; }
