/* Day Ahead: styles. Brand colors are the CSS variables below. */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --ink: #0b1f33;
  --muted: #5b6b7b;
  --line: #e4e1d8;
  --accent: #f5a524;
  --accent-ink: #0b1f33;
  --link: #0a4d8c;
  --notice-bg: #fff4d6;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --measure: 680px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1520;
    --surface: #101e2d;
    --ink: #e9eef3;
    --muted: #91a1b2;
    --line: #223244;
    --link: #7db8f0;
    --notice-bg: #3a2f10;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--font);
}

a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 20px; }

.muted { color: var(--muted); }
.small { font-size: 14px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-weight: 800; font-size: 20px; letter-spacing: -0.02em;
}
.logo-bg { fill: #0b1f33; }
.logo-line { stroke: var(--accent); }
.nav { display: flex; gap: 18px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
.nav a:hover { color: var(--ink); }

/* Page headings */
.issue-head { padding: 36px 0 8px; }
.issue-head h1 { margin: 0 0 6px; font-size: 28px; line-height: 1.2; letter-spacing: -0.02em; }
.eyebrow {
  margin: 0 0 6px; font-size: 12px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before {
  content: ""; display: inline-block; width: 18px; height: 3px;
  background: var(--accent); margin-right: 8px; vertical-align: middle; border-radius: 2px;
}

/* Issue */
.issue-section { margin-top: 32px; }
.issue-section h2 {
  margin: 0 0 4px; padding-bottom: 8px; font-size: 13px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  border-bottom: 2px solid var(--accent);
}
.item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item h3 { margin: 0 0 4px; font-size: 18px; line-height: 1.35; }
.item h3 a { color: var(--ink); text-decoration: none; }
.item h3 a:hover { color: var(--link); text-decoration: underline; }
.item .meta { font-size: 14px; font-weight: 400; color: var(--muted); }
.item p { margin: 0; color: var(--ink); }

.notice {
  margin: 20px 0 0; padding: 10px 14px; border-radius: 6px;
  background: var(--notice-bg); font-size: 14px;
}

.subscribe {
  margin: 40px 0 8px; padding: 18px 20px; border: 1px solid var(--line);
  border-left: 4px solid var(--accent); border-radius: 6px; background: var(--surface);
}
.subscribe p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

.more { margin: 24px 0 0; }
.pager { display: flex; justify-content: space-between; margin: 32px 0 0; font-size: 15px; }

/* Archive */
.archive-list { list-style: none; margin: 16px 0 0; padding: 0; }
.archive-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.archive-list .meta { margin-left: 8px; font-size: 13px; color: var(--muted); }

/* Prose */
.prose h2 { margin-top: 32px; font-size: 20px; }
.prose ul { padding-left: 22px; }

/* Ask / search */
.ask { margin: 20px 0 8px; }
.ask textarea {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; resize: vertical;
}
.ask textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.ask-actions { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.ask button {
  padding: 10px 22px; font: inherit; font-weight: 700; cursor: pointer;
  color: var(--accent-ink); background: var(--accent); border: 0; border-radius: 8px;
}
.ask button:disabled { opacity: 0.6; cursor: progress; }
.cf-turnstile { margin-top: 12px; }

.answer { margin: 28px 0 20px; }
.answer h2 {
  margin: 20px 0 8px; font-size: 13px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
}
#answer-text p { margin: 0 0 12px; }
.cite {
  display: inline-block; min-width: 1.5em; padding: 0 5px; margin: 0 1px;
  font-size: 12px; font-weight: 700; text-align: center; text-decoration: none;
  color: var(--accent-ink); background: var(--accent); border-radius: 4px; vertical-align: 1px;
}
.sources { padding-left: 24px; }
.sources li { margin-bottom: 8px; }
.sources .meta { display: block; font-size: 14px; color: var(--muted); }
.sources li:target { background: var(--notice-bg); }

.error { color: #b3261e; }
@media (prefers-color-scheme: dark) { .error { color: #f2b8b5; } }

/* Footer */
.site-footer { margin-top: 64px; padding: 24px 0 48px; border-top: 1px solid var(--line); font-size: 14px; }
.site-footer p { margin: 0 0 6px; }

@media (max-width: 480px) {
  body { font-size: 16px; }
  .issue-head h1 { font-size: 24px; }
}
