/* howiseleanordoing.com — main.css
   Plain CSS only. No frameworks, no build step. */

:root {
  --bg: #fdfbf7;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #205f9e;
  --ticker-border: #1a1a1a;
  --comment-bg: #fff3c4;
  --banner-bg: #ffd23f;
  --ticker-speed: 55px; /* pixels per second; JS sets duration from track width */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.4;
}

/* --- sample-data banner -------------------------------------------------- */

.synthetic-banner {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--banner-bg);
  color: #1a1a1a;
  text-align: center;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.5rem;
  border-bottom: 2px solid #1a1a1a;
}

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

.site-header {
  text-align: center;
  padding: 2.5rem 1rem 1rem;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: normal;
}

.site-header h1 a { color: inherit; text-decoration: none; }

.current-date {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.site-footer {
  max-width: 46rem;
  margin: 3rem auto 4rem;
  padding: 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

/* --- giant day arrow ------------------------------------------------------ */

.day-arrow {
  position: fixed;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 0;
  height: 0;
  padding: 0;
  background: none;
  border: none;
  border-top: clamp(1.6rem, 4vw, 2.6rem) solid transparent;
  border-bottom: clamp(1.6rem, 4vw, 2.6rem) solid transparent;
  border-right: clamp(2.2rem, 5.5vw, 3.6rem) solid var(--ink);
  cursor: pointer;
  opacity: 0.55;
}

.day-arrow:hover, .day-arrow:focus-visible { opacity: 1; }
.day-arrow[disabled] { opacity: 0.12; cursor: default; }

@media (prefers-reduced-motion: no-preference) {
  .ticker-section:first-of-type { min-height: 62vh; }
}

/* --- ticker sections -------------------------------------------------------
   One section per post. Earlier posts first; scroll down for later posts
   from the same day. */

.tickers { scroll-snap-type: y proximity; }

.ticker-section {
  min-height: 78vh;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0;
}

.ticker-section + .ticker-section { border-top: 1px dashed #c9c4b8; }

.ticker-meta {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 0.9rem;
  padding: 0 4.2rem; /* keep clear of the fixed day arrow */
}

.ticker {
  overflow: hidden;
  white-space: nowrap;
  padding-left: 3.6rem; /* rest position starts clear of the day arrow */
  border-top: 2px solid var(--ticker-border);
  border-bottom: 2px solid var(--ticker-border);
  background: #ffffff;
  padding: 1.1rem 0;
}

.ticker-track {
  display: inline-block;
  white-space: nowrap;
  animation-name: ticker-scroll;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.ticker:hover .ticker-track,
.ticker:focus-within .ticker-track { animation-play-state: paused; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* --- one datum in the ticker ---------------------------------------------- */

.datum {
  display: inline-block;
  margin: 0 1.6rem;
  font-size: clamp(1.25rem, 3vw, 1.9rem);
  cursor: pointer;
  border-bottom: 2px dotted transparent;
}

.datum:hover, .datum:focus-visible {
  border-bottom-color: var(--accent);
  outline: none;
}

.datum-label { color: var(--muted); font-size: 0.72em; margin-right: 0.35em; }
.datum-value { font-weight: bold; }
.datum-detail { color: var(--muted); font-size: 0.6em; margin-left: 0.5em; }

.datum-comment {
  font-size: 0.6em;
  background: var(--comment-bg);
  border: 1px solid #e0d18a;
  border-radius: 0.4em;
  padding: 0.1em 0.5em;
  margin-left: 0.6em;
  vertical-align: middle;
  white-space: normal;
}

/* --- source images ---------------------------------------------------------- */

.sources {
  text-align: center;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.sources img {
  max-width: 9rem;
  max-height: 9rem;
  margin: 0.4rem;
  border: 1px solid #d8d2c4;
}

/* --- empty state ------------------------------------------------------------- */

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 6rem 1rem;
  font-size: 1.2rem;
}

/* --- question dialog ---------------------------------------------------------- */

.question-dialog {
  border: 2px solid var(--ink);
  border-radius: 0.4rem;
  max-width: 32rem;
  width: calc(100% - 2rem);
  padding: 1.25rem 1.5rem;
  font-family: inherit;
}

.question-dialog::backdrop { background: rgba(0, 0, 0, 0.35); }

.question-dialog h2 { margin: 0 0 0.25rem; font-size: 1.2rem; }
.question-context { color: var(--muted); margin: 0 0 1rem; }

.question-dialog label { display: block; font-size: 0.9rem; margin: 0.75rem 0 0.25rem; }
.question-dialog textarea, .question-dialog input {
  width: 100%;
  font: inherit;
  padding: 0.45rem;
  border: 1px solid #b9b2a2;
  border-radius: 0.25rem;
}

.question-status { min-height: 1.2em; color: var(--muted); font-size: 0.9rem; }
.question-status.error { color: #a33; }

.question-actions { display: flex; gap: 0.75rem; margin-top: 0.75rem; }
.question-actions button {
  font: inherit;
  padding: 0.45rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 0.25rem;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}
.question-actions button#question-cancel { background: none; color: var(--ink); }

.noscript-note { text-align: center; padding: 3rem 1rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .ticker { white-space: normal; }
}
