/* ESBvaktin — Site-wide styles
 *
 * Design: independent, trustworthy, data-first.
 * Dark mode via prefers-color-scheme.
 */

:root {
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --text: #1a1a2e;
  --text-secondary: #555;
  --border: #e0e0e0;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --green: #16a34a;
  --yellow: #ca8a04;
  --orange: #ea580c;
  --red: #dc2626;
  --grey: #6b7280;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --max-width: 800px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --bg-alt: #1e293b;
    --text: #e2e8f0;
    --text-secondary: #94a3b8;
    --border: #334155;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --green: #22c55e;
    --yellow: #eab308;
    --orange: #f97316;
    --red: #ef4444;
    --grey: #9ca3af;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  }
}

/* ── Reset ──────────────────────────────────────────────────────────── */

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img { max-width: 100%; height: auto; }

/* ── Header ─────────────────────────────────────────────────────────── */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-logo:hover { color: var(--accent); text-decoration: none; }

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
}

.nav-links a {
  color: var(--text-secondary);
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
}

.nav-links a[aria-current="page"] {
  font-weight: 600;
}

/* ── Main ───────────────────────────────────────────────────────────── */

.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem;
}

.site-main h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem;
}

.site-main h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}

.site-main h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}

/* ── Footer ─────────────────────────────────────────────────────────── */

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
}

.footer-links a {
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--text);
}

/* ── Home page ──────────────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 2rem 0 3rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.hero-cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.15s;
}

.hero-cta:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.feature-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.feature-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.feature-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ── Report page ────────────────────────────────────────────────────── */

.report-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.report-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.report-source {
  font-weight: 500;
}

.report-summary {
  font-size: 1.05rem;
  color: var(--text-secondary);
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 0;
  line-height: 1.6;
}

.report-verdicts {
  margin-bottom: 2rem;
}

.verdict-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.report-claims > h2 {
  margin-bottom: 1rem;
}

.report-claim {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.report-claim-header {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.report-quote {
  margin: 0.75rem 0;
  padding: 0.6rem 1rem;
  border-left: 3px solid var(--accent);
  font-style: italic;
  color: var(--text-secondary);
  background: transparent;
}

.report-explanation {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.report-context {
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
}

.report-context summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.report-context summary:hover {
  color: var(--text);
}

.report-context p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.report-claim-text {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.report-evidence {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.report-evidence-contra {
  border-top: none;
  padding-top: 0;
  margin-top: 0.25rem;
}

.evidence-link {
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.8rem;
  padding: 0.1rem 0.3rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--accent);
  white-space: nowrap;
}

.evidence-link:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-color: var(--accent);
}

.evidence-ref {
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.8rem;
  padding: 0.1rem 0.3rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-secondary);
  cursor: help;
}

/* Evidence links in explanation text (inline) */
.report-explanation a,
.report-context a {
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.85em;
  padding: 0.05rem 0.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
}

.report-explanation a:hover,
.report-context a:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-color: var(--accent);
}

/* ── Reports index ──────────────────────────────────────────────────── */

.reports-list {
  list-style: none;
  padding: 0;
  margin-top: 1.5rem;
}

.reports-list li {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

.reports-list li:first-child {
  border-top: 1px solid var(--border);
}

.reports-list a {
  font-weight: 500;
  font-size: 1.05rem;
}

.reports-list time {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.report-claim-count {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ── Verdict pills (shared with claim tracker) ──────────────────────── */

.ct-verdict-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.verdict-supported { background: var(--green); color: #fff; }
.verdict-partial { background: var(--yellow); color: #000; }
.verdict-unsupported { background: var(--orange); color: #fff; }
.verdict-misleading { background: var(--red); color: #fff; }
.verdict-unverifiable { background: var(--grey); color: #fff; }

.ct-category-tag {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .site-nav { padding: 0.5rem 0.75rem; }
  .nav-links { gap: 0.75rem; font-size: 0.8rem; }
  .hero h1 { font-size: 1.8rem; }
  .site-main h1 { font-size: 1.6rem; }
  .site-main { padding: 1.5rem 0.75rem; }
}
