/* Timeline (module timeline): app skin. Rules moved verbatim from styles.css (C1); the variables are the app identity, posture themes re-map the shell only. */
/* P9 scheme tokens: light = the colours these rules always used, dark = the shell's dark surfaces. */
:root {
  --timeline-surface: #fff;
}
[data-scheme="dark"] {
  --timeline-surface: #1a1e23;
}
.module-body[data-module="timeline"] {
  --app-font: "Inter", "Open Sans", Arial, sans-serif;
  --app-accent: #3b5bdb;
  --app-bg: #f8f9fa;
  --app-surface: #ffffff;
  --app-radius: 6px;
}

/* ---------- Timeline ---------- */
.timeline-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
.timeline-main { min-width: 0; }
.timeline-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.event-list { list-style: none; margin: 0; padding: 0; }
.event { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; }
.event-rail { display: flex; flex-direction: column; align-items: center; }
.event-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); margin-top: 18px; box-shadow: 0 0 0 4px var(--bg); z-index: 1; }
.event-rail::after { content: ""; flex: 1; width: 1px; background: var(--border); margin: 4px 0; }
.event:last-child .event-rail::after { display: none; }
.event.inject .event-dot { background: var(--danger); }
.event.control .event-dot { background: var(--brand); }
.event.comms .event-dot { background: #8ab4ff; }
.event.ops .event-dot { background: var(--warn); }
.event.identity .event-dot { background: #c792ea; }
.event-card { margin-bottom: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.event.inject .event-card { border-left: 2px solid var(--danger); }
.event-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.event-type { font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.event-time { font-family: var(--font-mono); font-size: 10px; color: var(--accent); }
.event-card h3 { font-size: 13px; margin: 3px 0 3px; }
.event-card p { font-size: 11.5px; color: var(--muted); }
.timeline-side { display: flex; flex-direction: column; gap: 12px; }

@media (max-width: 1180px) {
  .timeline-layout { grid-template-columns: minmax(0, 1fr);  }
  .timeline-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));  }
}
@media (max-width: 720px) {
  .timeline-side { grid-template-columns: 1fr;  }
}
.event-card { background: var(--timeline-surface); }
.event-dot { box-shadow: 0 0 0 4px var(--bg); }

/* --- C11 Timeline: director note form (server mode) and the server-mode-only note */
.module-body[data-module="timeline"] .timeline-note { display: grid; gap: 6px; margin: 0 0 14px; }
.module-body[data-module="timeline"] .timeline-note label { font-size: 12px; color: var(--muted); }
.module-body[data-module="timeline"] .timeline-note-row { display: flex; gap: 8px; align-items: flex-start; }
.module-body[data-module="timeline"] .timeline-note textarea { flex: 1; min-width: 0; resize: vertical; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; }
.module-body[data-module="timeline"] .timeline-server-note { margin: 0 0 14px; font-size: 12px; color: var(--muted); }
@media (max-width: 720px) { .module-body[data-module="timeline"] .timeline-note-row { flex-direction: column; align-items: stretch; } }

/* P9 dark scheme: the module tokens above, the shell's dark surfaces */
[data-scheme="dark"] .module-body[data-module="timeline"] {
  --app-accent: #7899f8;
  --app-bg: #232324;
  --app-surface: #1a1e23;
}
