/* Shared styles for the three cockpits. Colours checked for 4.5:1 text contrast in light and dark. */
:root {
  --evidence: #1f6b45;    /* 6.5:1 on white, 6.0:1 on --paper */
  --speculation: #6b3fa0; /* 7.4:1 on white, 6.8:1 on --paper */
  --simulated: #8a4b00;   /* 6.8:1 on white, 6.3:1 on --paper */
  --tint: #eef1f3;
}
@media (prefers-color-scheme: dark) {
  :root {
    --evidence: #7fd1a5;    /* 8.4:1 on --surface */
    --speculation: #c7a6f0; /* 7.4:1 on --surface */
    --simulated: #f0b35a;   /* 8.3:1 on --surface */
    --tint: #262f35;
  }
}

.cockpit-nav { border-bottom: 1px solid var(--line); background: var(--surface); }
.cockpit-nav ul {
  list-style: none; margin: 0 auto; padding: 0.5rem 1.25rem;
  max-width: 72rem; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem;
}
.cockpit-nav a { display: inline-block; padding: 0.6rem 0; min-height: 44px; }
.cockpit-nav a[aria-current="page"] { font-weight: 700; text-decoration-thickness: 3px; }

.wide { max-width: 72rem; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.lead { font-size: 1.15rem; max-width: 44rem; }
.kicker { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; color: var(--muted); margin: 0 0 0.25rem; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1rem 1.25rem; margin: 1rem 0; }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }

/* Labels that say in words what kind of statement something is */
.tag {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; border: 2px solid currentColor; border-radius: 3px;
  padding: 0.05rem 0.4rem; margin-right: 0.4rem; vertical-align: 0.1em;
}
.tag-evidence { color: var(--evidence); }
.tag-speculation { color: var(--speculation); }
.tag-simulated { color: var(--simulated); border-style: dashed; }
.tag-unexpected { color: var(--accent); }
.tag-neutral { color: var(--muted); }

/* Coverage indicator: bar plus the percentage in words */
.coverage { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; }
.coverage li { display: grid; grid-template-columns: 6.5rem 1fr 7.5rem; align-items: center; gap: 0.5rem; font-size: 0.95rem; }
.bar { height: 0.8rem; background: var(--tint); border: 1px solid var(--edge); border-radius: 2px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); }
@media (max-width: 30rem) { .coverage li { grid-template-columns: 5.5rem 1fr; } .coverage li .pct { grid-column: 2; } }

/* Findings */
.findings { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.finding { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 4px; padding: 0.9rem 1rem; }
.finding.is-simulated { border-left-style: dashed; border-left-color: var(--simulated); }
.finding p { margin: 0.35rem 0; }
.meta { color: var(--muted); font-size: 0.9rem; }
details summary { cursor: pointer; padding: 0.5rem 0; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
blockquote { margin: 0.5rem 0; padding: 0.25rem 0 0.25rem 0.9rem; border-left: 3px solid var(--edge); }
.sources { padding-left: 1.2rem; margin: 0.25rem 0; }
.sources li { margin: 0.4rem 0; }

/* Controls */
.controls { display: grid; gap: 1rem; }
.range-row { display: grid; grid-template-columns: 4rem 1fr 4rem; align-items: center; gap: 0.5rem; }
input[type="range"] { width: 100%; min-height: 44px; accent-color: var(--accent); }
.checks { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.checks label { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; }
.checks input { width: 1.25rem; height: 1.25rem; accent-color: var(--accent); }
.button-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.button-row button { min-height: 44px; }
button.secondary { background: var(--surface); color: var(--ink); border: 2px solid var(--edge); }
button[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 1px; }

figure { margin: 0; }
.pic img { display: block; width: 100%; height: auto; max-height: 60vh; object-fit: contain; background: var(--tint); }
.pic figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.35rem; }

.chart svg { display: block; width: 100%; height: auto; }
.chart text { fill: var(--ink); font: 0.75rem var(--sans); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) {
  .stop { animation: rise 0.4s ease-out both; }
  @keyframes rise { from { opacity: 0; transform: translateY(0.5rem); } to { opacity: 1; transform: none; } }
}

.button-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.5rem; }
.button-list button { width: 100%; text-align: left; min-height: 44px; background: var(--surface); color: var(--ink); border: 2px solid var(--edge); font-weight: 500; }
.answer-block { border-left: 4px solid currentColor; padding: 0.25rem 0 0.25rem 0.9rem; margin: 1rem 0; }
.answer-block > * { color: var(--ink); }
.answer-block.evidence { color: var(--evidence); }
.answer-block.speculation { color: var(--speculation); border-left-style: dotted; }
.answer-block.unknown { color: var(--muted); border-left-style: dashed; }
table { border-collapse: collapse; }
th, td { text-align: left; padding: 0.2rem 1rem 0.2rem 0; border-bottom: 1px solid var(--line); }
.finding, .panel, .sources, blockquote { overflow-wrap: anywhere; min-width: 0; }
.more { margin-top: 0.75rem; }
main.wide > section { margin-top: 2.5rem; }

/* Director 2127 live conversation */
.live-video { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--tint); border-radius: 4px; }
.transcript { list-style: none; padding: 0; margin: 0 0 1rem; max-height: 22rem; overflow-y: auto; display: grid; gap: 0.6rem; }
.transcript li { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 0.5rem 0.75rem; }
.transcript .who { display: block; font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.live-caption { margin: 0.5rem 0 0; padding: 0.5rem 0.75rem; background: var(--ink); color: var(--paper); border-radius: 4px; font-size: 1.05rem; line-height: 1.4; }
