/* ── Overview detail page ──
 *
 * Rich card styles matching the tracker subpages:
 * - Entity cards mirror et-* patterns from entity-tracker.css
 * - Article cards mirror dt-* patterns from discourse-tracker.css
 * - Claim cards mirror ct-* patterns from claim-tracker.css
 * - Reuses shared classes: report-bar-seg, verdict-*, ct-verdict-pill,
 *   ct-category-tag, et-type-badge, et-attr-*, dt-source-badge
 */

.od-overview {
  max-width: 900px;
}

.od-back {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
}

.od-back:hover {
  text-decoration: underline;
}

.od-header {
  margin-bottom: 1rem;
}

.od-title {
  font-size: 1.75rem;
  margin: 0;
}

/* ══════════════════════════════════════════════════════════════════
   Section separators & kicker labels
   ══════════════════════════════════════════════════════════════════ */

.od-section {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

.od-section-label {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.25rem;
}

/* ══════════════════════════════════════════════════════════════════
   Editorial — lead section, collapsed after 2 paragraphs
   ══════════════════════════════════════════════════════════════════ */

.od-editorial {
  margin-bottom: 1.5rem;
  line-height: 1.7;
  font-size: 1rem;
}

.od-editorial h1,
.od-editorial h2,
.od-editorial h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.od-editorial h1 { font-size: 1.4rem; }
.od-editorial h2 { font-size: 1.2rem; }
.od-editorial p  { margin: 0 0 1rem; }

.od-ai-disclosure {
  font-size: 0.8rem;
  color: var(--text-muted, #999);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.od-editorial-more {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}

.od-editorial-expanded .od-editorial-more {
  max-height: 4000px;
  transition: max-height 0.5s ease-in;
}

.od-editorial-toggle {
  display: inline-block;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font);
}

.od-editorial-toggle:hover {
  text-decoration: underline;
}

/* ══════════════════════════════════════════════════════════════════
   Snapshot strip — stats + verdict bar + top topics inline
   ══════════════════════════════════════════════════════════════════ */

.od-snapshot {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.od-snapshot-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.od-stat-block {
  display: flex;
  flex-direction: column;
}

.od-stat-heading {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.od-stat-num {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.od-snapshot-verdicts {
  /* verdict bar inside snapshot */
}

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

/* Top 3 topics mini-bars */

.od-snapshot-topics {
  display: grid;
  gap: 0.35rem;
}

.od-snapshot-topic {
  display: grid;
  grid-template-columns: 9rem 1fr 2rem;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
}

.od-snapshot-topic-label {
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--accent);
}

.od-snapshot-topic-track {
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.od-snapshot-topic-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}

.od-snapshot-topic-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
}

/* ══════════════════════════════════════════════════════════════════
   Key facts — well-supported claims with caveats ("Vissir þú?")
   ══════════════════════════════════════════════════════════════════ */

.od-key-facts {
  margin-bottom: 2rem;
}

.od-key-facts h2 {
  font-size: 1.15rem;
  margin: 0 0 0.25rem;
}

.od-key-facts-intro {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  line-height: 1.4;
}

/* ── Fact card ── */

.od-fact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green, #22c55e);
  border-radius: 0 8px 8px 0;
  overflow: hidden;
  margin-bottom: 0.5rem;
  transition: border-color var(--transition);
}

/* ── Clickable header ── */

.od-fact-header {
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  user-select: none;
}

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

.od-fact-header-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.3rem;
}

.od-fact-type-badge {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--bg-alt, var(--bg));
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.od-fact-text {
  margin: 0;
  line-height: 1.5;
  font-size: 0.93rem;
  font-weight: 500;
}

.od-fact-header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.35rem;
}

.od-fact-card .ct-expand-icon {
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: transform var(--transition);
}

.od-fact-expanded .ct-expand-icon {
  transform: rotate(90deg);
}

.od-fact-card .ct-confidence {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.od-fact-card .ct-confidence-bar {
  display: inline-block;
  height: 4px;
  background: var(--green, #22c55e);
  border-radius: 2px;
  min-width: 2px;
  max-width: 60px;
}

/* ── Expandable details ── */

.od-fact-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
}

.od-fact-expanded .od-fact-details {
  max-height: 1200px;
  transition: max-height 0.3s ease-in;
}

.od-fact-detail {
  padding: 0 0.9rem 0.65rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.od-fact-detail:first-child {
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
}

.od-fact-detail strong {
  color: var(--text);
}

.od-fact-detail a {
  color: var(--accent);
  text-decoration: none;
}

.od-fact-detail a:hover {
  text-decoration: underline;
}

/* Caveat callout — slightly different background to draw attention */

.od-fact-caveat {
  background: var(--bg-alt, var(--bg));
  margin: 0 0.5rem 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  border-left: 2px solid var(--yellow, hsl(45, 80%, 50%));
}

/* Deep links */

.od-fact-deeplink a {
  font-size: 0.85rem;
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════════
   Topic activity — horizontal bar chart
   ══════════════════════════════════════════════════════════════════ */

.od-topics {
  margin-bottom: 1.5rem;
}

.od-topics h2 {
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
}

.od-topic-bars {
  display: grid;
  gap: 0.4rem;
}

.od-topic-row {
  display: grid;
  grid-template-columns: 11rem 1fr 2.5rem;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
}

.od-topic-row:hover .od-topic-label {
  text-decoration: underline;
}

.od-topic-label {
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--accent);
}

.od-topic-bar-track {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.od-topic-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s;
}

.od-topic-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
}

/* ══════════════════════════════════════════════════════════════════
   Misleading claims callout
   ══════════════════════════════════════════════════════════════════ */

.od-claims-alert {
  padding: 0.55rem 0.8rem;
  background: color-mix(in srgb, var(--verdict-misleading, #7c3aed) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--verdict-misleading, #7c3aed) 25%, transparent);
  border-radius: var(--radius-sm, 4px);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

/* ══════════════════════════════════════════════════════════════════
   Top claims — rich cards matching Fullyrðingar tracker
   ══════════════════════════════════════════════════════════════════ */

.od-top-claims {
  margin-bottom: 2rem;
}

.od-top-claims h2 {
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
}

/* ── Claim cards — expandable, mirrors ct-card from Fullyrðingar ─── */

.od-claims-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.od-claim-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), background var(--transition);
}

.od-claim-card.ct-card--focused {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.od-claim-card .ct-card-header {
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  user-select: none;
}

.od-claim-card .ct-card-header:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.od-claim-card .ct-card-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.od-claim-card .ct-claim-text {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.4;
  font-weight: 500;
}

.od-claim-card .ct-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.35rem;
}

.od-claim-card .ct-sighting-count {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.od-claim-card .ct-confidence {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.od-claim-card .ct-confidence-bar {
  display: inline-block;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  min-width: 2px;
  max-width: 60px;
}

/* ── Expand / collapse ─────────────────────────────────────────── */

.od-claim-card .ct-expand-icon {
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: transform var(--transition);
}

.od-claim-card.ct-expanded .ct-expand-icon {
  transform: rotate(90deg);
}

.od-claim-card .ct-card-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
}

.od-claim-card.ct-expanded .ct-card-details {
  max-height: 1200px;
  transition: max-height 0.3s ease-in;
}

.od-claim-card .ct-detail {
  padding: 0 0.9rem 0.65rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.od-claim-card .ct-detail:first-child {
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
}

.od-claim-card .ct-detail strong {
  color: var(--text);
}

.od-claim-card .ct-english {
  font-style: italic;
  font-size: 0.85rem;
}

/* ── Sightings list inside expanded card ──────────────────────── */

.od-claim-card .ct-sighting-list {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.od-claim-card .ct-sighting-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.3rem 0.5rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.od-claim-card .ct-sighting-item a {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  word-break: break-word;
}

.od-claim-card .ct-sighting-item a:hover {
  text-decoration: underline;
}

.od-claim-card .ct-sighting-meta {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* ── Deep link to Fullyrðingar ────────────────────────────────── */

.od-claim-deeplink {
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
}

.od-claim-deeplink a {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}

.od-claim-deeplink a:hover {
  text-decoration: underline;
}

/* ══════════════════════════════════════════════════════════════════
   Active entities — compact cards
   ══════════════════════════════════════════════════════════════════ */

.od-entities {
  margin-bottom: 2rem;
}

.od-entities h2 {
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
}

.od-entity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.6rem;
}

.od-entity-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-left: 2px solid hsl(var(--stance-hue, 60), var(--stance-sat, 10%), 45%);
  background: var(--surface);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}

.od-entity-card:hover {
  border-color: var(--accent);
  border-left-color: var(--accent);
}

/* Top row: Name + stance label */

.od-entity-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.od-entity-name {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.od-stance-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: hsl(var(--stance-hue, 60), var(--stance-sat, 10%), 40%);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Role */

.od-entity-role {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

/* Stats row */

.od-entity-stats {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.od-entity-stat {
  font-size: 0.76rem;
  color: var(--text-muted);
  background: var(--bg-alt, var(--bg));
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
}

.od-entity-topics {
  font-size: 0.72rem;
  color: var(--text-secondary);
  background: none;
  padding: 0;
}

/* ══════════════════════════════════════════════════════════════════
   Articles grid — rich cards matching Umræðan tracker
   ══════════════════════════════════════════════════════════════════ */

.od-articles {
  margin-bottom: 2rem;
}

.od-articles h2 {
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
}

.od-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.6rem;
}

.od-article-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.od-article-card:hover {
  border-color: var(--accent);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* Source badge + date row */

.od-article-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.od-article-top time {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.od-article-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.35;
}

.od-article-author {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Summary — 3-line clamp (mirrors dt-card-summary) */

.od-article-summary {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Verdict bar — taller bar matching dt-verdict-bar */

.od-article-verdict-bar {
  display: flex;
  width: 100%;
  height: 1.1rem;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.15rem;
}

.od-article-verdict-bar .report-bar-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
}

.od-article-stats {
  display: flex;
  gap: 0.75rem;
  font-size: 0.8rem;
}

.od-article-claims {
  color: var(--accent);
  font-weight: 500;
}

.od-article-participants {
  color: var(--text-muted);
}

.od-article-speakers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.od-article-speaker {
  display: inline-block;
  padding: 0.05rem 0.35rem;
  background: var(--bg-alt, var(--bg));
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Category tags row */

.od-article-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.1rem;
}

.od-article-cat-tag {
  font-size: 0.65rem;
}

/* Althingi source badge colour */
.source-althingi { background: #3d6b9e; color: #fff; }

/* ── Dark mode adjustments ── */

@media (prefers-color-scheme: dark) {
  .od-stance-label {
    color: hsl(var(--stance-hue, 60), var(--stance-sat, 10%), 65%);
  }

  .od-entity-card {
    border-left-color: hsl(var(--stance-hue, 60), var(--stance-sat, 10%), 55%);
  }

  .od-entity-card:hover {
    border-left-color: var(--accent);
  }

  .od-fact-caveat {
    border-left-color: hsl(45, 70%, 40%);
  }
}

/* ── Responsive ── */

@media (max-width: 600px) {
  .od-entity-grid,
  .od-articles-grid {
    grid-template-columns: 1fr;
  }

  .od-snapshot-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .od-snapshot-stats .od-stat-block:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .od-snapshot-topic {
    grid-template-columns: 7rem 1fr 2rem;
  }

  .od-topic-row {
    grid-template-columns: 8rem 1fr 2.5rem;
  }
}
