/* Windows Event Log Triage Tool — styles
   Dark palette and type taken from mylesagnew.com's dark theme so the tool
   looks like part of the same family. No external resources: fonts are local
   and fall back to system fonts if a browser blocks them (e.g. some file:// cases). */

@font-face { font-family: 'Inter'; src: url('/fonts/inter-v20-latin-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-v20-latin-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('/fonts/playfair-display-v40-latin-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

/* Light palette (default). Dark palette below. */
:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --bg2: #eceff4;
  --surface: #ffffff;
  --surface2: #f6f7fa;
  --input-bg: #ffffff;
  --text: #191a1f;
  --muted: #5a6070;
  --border: rgba(15, 20, 35, 0.12);
  --border-strong: rgba(15, 20, 35, 0.24);
  --accent: #1f6fe0;
  --accent-soft: rgba(31, 111, 224, 0.10);
  --accent-text: #0b56bf;
  --accent-hover: #3f86ea;
  --accent-line: rgba(31, 111, 224, 0.40);
  --on-accent: #ffffff;
  --link-hover: #00316f;
  --nav-bg: rgba(248, 248, 250, 0.92);
  --track: rgba(15, 20, 35, 0.035);

  /* Severity = investigative priority. Each colour is always paired with a text label. */
  --sev-info: #5a6070;  --sev-info-bg: rgba(90, 96, 112, 0.10);
  --sev-low: #0a7a9c;   --sev-low-bg: rgba(10, 122, 156, 0.10);
  --sev-med: #9a6200;   --sev-med-bg: rgba(201, 135, 0, 0.13);
  --sev-high: #c0291c;  --sev-high-bg: rgba(192, 41, 28, 0.09);
  --ok: #1b7f4b;        --ok-bg: rgba(27, 127, 75, 0.10);
  --ok-line: rgba(27, 127, 75, 0.35); --med-line: rgba(154, 98, 0, 0.35); --high-line: rgba(192, 41, 28, 0.40);

  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --mono: ui-monospace, 'Cascadia Mono', 'Consolas', 'SFMono-Regular', Menlo, monospace;
  --radius: 10px;
  --wrap: 1120px;
}

/* Dark palette: the visitor chose dark with the toggle (/theme.js sets data-theme),
   or their device is in dark mode and they have not forced light. Keep both identical. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0f14;
  --bg2: #11141b;
  --surface: #151821;
  --surface2: #1b1f2a;
  --input-bg: #1d212c;
  --text: #e6e8ee;
  --muted: #a3a9b8;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --accent: #4d9bff;
  --accent-soft: rgba(77, 155, 255, 0.14);
  --accent-text: #9ec5ff;
  --accent-hover: #73b1ff;
  --accent-line: rgba(77, 155, 255, 0.45);
  --on-accent: #06101f;
  --link-hover: #ffffff;
  --nav-bg: rgba(12, 14, 20, 0.92);
  --track: rgba(255, 255, 255, 0.025);
  --sev-info: #a3a9b8;  --sev-info-bg: rgba(163, 169, 184, 0.12);
  --sev-low: #5cc8e6;   --sev-low-bg: rgba(92, 200, 230, 0.12);
  --sev-med: #e9b03b;   --sev-med-bg: rgba(233, 176, 59, 0.13);
  --sev-high: #ff7a6e;  --sev-high-bg: rgba(255, 122, 110, 0.13);
  --ok: #4cc98a;        --ok-bg: rgba(76, 201, 138, 0.12);
  --ok-line: rgba(76, 201, 138, 0.35); --med-line: rgba(233, 176, 59, 0.40); --high-line: rgba(255, 122, 110, 0.50);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d0f14;
    --bg2: #11141b;
    --surface: #151821;
    --surface2: #1b1f2a;
    --input-bg: #1d212c;
    --text: #e6e8ee;
    --muted: #a3a9b8;
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.18);
    --accent: #4d9bff;
    --accent-soft: rgba(77, 155, 255, 0.14);
    --accent-text: #9ec5ff;
    --accent-hover: #73b1ff;
    --accent-line: rgba(77, 155, 255, 0.45);
    --on-accent: #06101f;
    --link-hover: #ffffff;
    --nav-bg: rgba(12, 14, 20, 0.92);
    --track: rgba(255, 255, 255, 0.025);
    --sev-info: #a3a9b8;  --sev-info-bg: rgba(163, 169, 184, 0.12);
    --sev-low: #5cc8e6;   --sev-low-bg: rgba(92, 200, 230, 0.12);
    --sev-med: #e9b03b;   --sev-med-bg: rgba(233, 176, 59, 0.13);
    --sev-high: #ff7a6e;  --sev-high-bg: rgba(255, 122, 110, 0.13);
    --ok: #4cc98a;        --ok-bg: rgba(76, 201, 138, 0.12);
    --ok-line: rgba(76, 201, 138, 0.35); --med-line: rgba(233, 176, 59, 0.40); --high-line: rgba(255, 122, 110, 0.50);
  }
}


* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
section[id], h3[id] { scroll-margin-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

a { color: var(--accent-text); }
a:hover { color: var(--link-hover); }
code { font-family: var(--mono); font-size: 0.9em; background: var(--surface2); padding: 0.1em 0.35em; border-radius: 4px; }
.mono { font-family: var(--mono); font-size: 0.92em; word-break: break-all; }
.muted { color: var(--muted); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--on-accent); padding: 0.6rem 1rem; z-index: 100; font-weight: 600; }
.skip-link:focus { left: 1rem; top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Site nav (mylesagnew.com markup; /nav-mobile.css adds the burger) ----------
   This page has its own light/dark palette and does not load /theme.css (its tokens would clash),
   so the nav is styled here. /theme.js still adds the site's light/dark toggle button. */
nav {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  padding: 1rem 2rem; background: var(--nav-bg); backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50;
}
.nav-logo { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.05em; color: var(--text); text-decoration: none; }
.nav-logo span { color: var(--accent); }
.nav-links { list-style: none; display: flex; gap: 1.4rem; flex-wrap: wrap; margin: 0; padding: 0; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.82rem; letter-spacing: 0.02em; }
.nav-links a:hover { color: var(--text); }
.nav-cta { color: var(--accent-text) !important; border: 1px solid var(--accent-line); border-radius: 6px; padding: 0.35rem 0.8rem; }
.nav-cta:hover { background: var(--accent-soft); }
.jump-links { font-size: 0.9rem; color: var(--muted); margin: 1rem 0 0; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }

main { max-width: var(--wrap); margin: 0 auto; padding: 0 16px 3rem; }

/* ---------- Hero ---------- */
.hero { padding: 2.5rem 0 1.5rem; }
.eyebrow { color: var(--accent-text); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 0.5rem; font-weight: 600; }
h1, h2 { font-family: var(--serif); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 0.75rem; }
h2 { font-size: 1.6rem; margin: 0 0 0.75rem; }
h3 { font-size: 1.1rem; margin: 0 0 0.75rem; font-weight: 600; }
h4 { font-size: 1.05rem; margin: 0; font-weight: 600; }
h5 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 1.1rem 0 0.35rem; font-weight: 600; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 52rem; margin: 0 0 1.5rem; }

.notice { display: flex; gap: 0.85rem; align-items: flex-start; border-radius: var(--radius); padding: 0.9rem 1.1rem; margin: 0 0 0.75rem; border: 1px solid; }
.notice p { margin: 0; }
.notice-icon { width: 22px; height: 22px; flex: none; margin-top: 2px; fill: currentColor; }
.notice-privacy { background: var(--ok-bg); border-color: var(--ok-line); }
.notice-privacy .notice-icon { color: var(--ok); }
.notice-disclaimer { background: var(--sev-med-bg); border-color: var(--med-line); }
.notice-disclaimer .notice-icon { color: var(--sev-med); }

/* ---------- Panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; margin: 0 0 1.25rem; }
.panel .panel { background: var(--surface2); }
.help { color: var(--muted); font-size: 0.92rem; margin: 0.4rem 0 0.9rem; }
.empty { color: var(--muted); margin: 0; }
.empty p { margin: 0 0 0.4rem; }
.empty strong { color: var(--text); }

/* ---------- Upload ---------- */
.upload-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.25rem; }
@media (max-width: 760px) { .upload-grid { grid-template-columns: 1fr; } }

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: 190px; padding: 1.5rem; border: 2px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--bg2); cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
/* The real file input is visually hidden; show its keyboard focus on the drop zone. */
.upload-grid div:has(> #file-input:focus-visible) > .dropzone { outline: 3px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.dropzone-icon { width: 40px; height: 40px; fill: var(--accent); margin-bottom: 0.5rem; }
.dropzone-title { font-size: 1.15rem; font-weight: 600; }
.dropzone-hint { color: var(--muted); font-size: 0.9rem; }

.demo-box { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; }
.demo-box h3 { margin-bottom: 0.25rem; }
.demo-buttons { display: flex; flex-direction: column; gap: 0.5rem; }
.sample-downloads { margin: 0.75rem 0 0; }
.demo-script { margin-top: 0.9rem; font-size: 0.92rem; }
.demo-script summary { cursor: pointer; color: var(--accent-text); }
.demo-script ol { padding-left: 1.2rem; margin: 0.6rem 0 0; }
.demo-script li { margin-bottom: 0.4rem; }

/* ---------- Buttons & form fields ---------- */
.btn {
  font: inherit; font-weight: 600; font-size: 0.95rem; color: var(--on-accent); background: var(--accent);
  border: 1px solid var(--accent); border-radius: 8px; padding: 0.6rem 1rem; cursor: pointer; text-align: center;
}
.btn:hover { background: var(--accent-hover); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface2); }
.btn-small { font-size: 0.85rem; padding: 0.4rem 0.75rem; background: transparent; color: var(--accent-text); border-color: var(--accent-line); }
.btn-small:hover { background: var(--accent-soft); color: var(--link-hover); }

.field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.field label { font-size: 0.88rem; font-weight: 600; }
.field input, .field select {
  font: inherit; font-size: 0.95rem; color: var(--text); background: var(--input-bg);
  border: 1px solid var(--border-strong); border-radius: 8px; padding: 0.5rem 0.65rem; width: 100%;
}
.field input[aria-invalid="true"] { border-color: var(--sev-high); }
.field-help { font-size: 0.78rem; color: var(--muted); }
.field-actions { justify-content: flex-end; }
.form-error { color: var(--sev-high); font-weight: 600; margin: 0.5rem 0 0; }

.threshold-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.85rem; margin-bottom: 0.75rem; }

/* ---------- Load status ---------- */
.load-status { margin-top: 1.25rem; border-radius: var(--radius); padding: 1rem 1.15rem; border: 1px solid var(--border); background: var(--bg2); }
.load-status p { margin: 0 0 0.4rem; }
.load-status ul { margin: 0.25rem 0 0.5rem; padding-left: 1.2rem; }
.load-status.is-ok { border-color: var(--ok-line); }
.load-status.is-warn { border-color: var(--med-line); }
.load-status.is-error { border-color: var(--high-line); background: var(--sev-high-bg); }
.status-title { font-weight: 600; font-size: 1.05rem; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.is-ok .status-title::before { content: '\2713'; color: var(--ok); }
.is-warn .status-title::before { content: '!'; color: var(--sev-med); font-weight: 700; }
.is-error .status-title::before { content: '\2715'; color: var(--sev-high); }
.label { font-weight: 600; }
.status-facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; margin: 0.5rem 0; font-size: 0.93rem; }
.status-facts dt { color: var(--muted); }
.status-facts dd { margin: 0; word-break: break-word; }
@media (max-width: 560px) { .status-facts { grid-template-columns: 1fr; } .status-facts dd { margin-bottom: 0.4rem; } }

.demo-badge { display: inline-block; background: var(--sev-med-bg); color: var(--sev-med); border: 1px solid currentColor; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; border-radius: 999px; padding: 0.2rem 0.7rem; }
.demo-badge-inline { font-size: 0.72rem; }

/* ---------- Results ---------- */
.results { margin-top: 2rem; }
.results-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.results-head h2 { margin: 0; }
.key-lesson { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 0.75rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; font-weight: 600; margin: 1rem 0 1.25rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.85rem; }
.card { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 0.85rem 1rem; min-width: 0; }
.card-label { margin: 0; font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.card-value { margin: 0.2rem 0 0; font-size: 1.35rem; font-weight: 600; word-break: break-all; line-height: 1.3; }
.card-sub { margin: 0.15rem 0 0; font-size: 0.85rem; color: var(--muted); }

.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 860px) { .chart-grid { grid-template-columns: 1fr; } }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; max-width: 100%; }
.data-table, .bar-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.data-table th, .data-table td, .bar-table th, .bar-table td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table thead th, .bar-table thead th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; }
.data-table tbody th, .bar-table tbody th { font-weight: 600; }
.num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pct { color: var(--muted); font-size: 0.85em; }

.bar-col { width: 45%; }
.bar-table td.bar-col { vertical-align: middle; }
.bar { display: block; height: 12px; background: var(--bg2); border-radius: 6px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.bar-fill.is-flagged { background: var(--sev-med); }
.flag-tag { display: inline-block; white-space: nowrap; word-break: normal; margin-left: 0.5rem; font-family: var(--sans); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: var(--sev-med); border: 1px solid currentColor; border-radius: 4px; padding: 0 0.3rem; }

.contrib { list-style: none; margin: 0; padding: 0; }
.score-label { font-weight: 600; }
.score-minor { color: var(--sev-low); }
.score-elevated { color: var(--sev-med); }
.score-high { color: var(--sev-high); }

.status-pill { display: inline-block; font-size: 0.78rem; font-weight: 600; border-radius: 999px; padding: 0.05rem 0.55rem; border: 1px solid; }
.status-pill.is-ran { color: var(--ok); }
.status-pill.is-limited { color: var(--sev-med); }
.status-pill.is-skipped { color: var(--muted); }
.cov-note { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 0.2rem; }

.explorer-scroll { max-height: 520px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.info-cell { word-break: break-word; min-width: 16rem; }
.result-count { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.6rem; }

.raw-protocols { margin-top: 1rem; }
.raw-protocols summary { cursor: pointer; color: var(--accent-text); }

/* ---------- Alerts ---------- */
.alerts { display: flex; flex-direction: column; gap: 0.9rem; }
.alert { background: var(--surface2); border: 1px solid var(--border); border-left: 5px solid var(--sev-info); border-radius: 8px; padding: 1rem 1.15rem; }
.alert.sev-low { border-left-color: var(--sev-low); }
.alert.sev-medium { border-left-color: var(--sev-med); }
.alert.sev-high { border-left-color: var(--sev-high); }
.alert-head { display: flex; align-items: center; gap: 0.6rem 0.85rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.rule-tag { color: var(--muted); font-size: 0.82rem; }

.sev-badge { display: inline-block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; border-radius: 999px; padding: 0.15rem 0.6rem; border: 1px solid currentColor; }
.sev-badge.sev-informational { color: var(--sev-info); background: var(--sev-info-bg); }
.sev-badge.sev-low { color: var(--sev-low); background: var(--sev-low-bg); }
.sev-badge.sev-medium { color: var(--sev-med); background: var(--sev-med-bg); }
.sev-badge.sev-high { color: var(--sev-high); background: var(--sev-high-bg); }

.alert-facts, .evidence { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 0; font-size: 0.93rem; }
.alert-facts dt, .evidence dt { color: var(--muted); }
.alert-facts dd, .evidence dd { margin: 0; word-break: break-word; }
@media (max-width: 560px) {
  .alert-facts, .evidence { grid-template-columns: 1fr; }
  .alert-facts dd, .evidence dd { margin-bottom: 0.45rem; }
}
.alert-details { margin-top: 0.8rem; border-top: 1px solid var(--border); padding-top: 0.6rem; }
.alert-details summary { cursor: pointer; color: var(--accent-text); font-weight: 600; font-size: 0.93rem; }
.alert-details p, .alert-details ul, .alert-details ol { margin: 0; font-size: 0.94rem; }
.alert-details ul, .alert-details ol { padding-left: 1.3rem; }
.sev-reason { margin-top: 1rem !important; color: var(--muted); font-size: 0.85rem !important; }
.alert-actions { margin-top: 0.85rem; }

/* ---------- Education sections ---------- */
.prose { font-size: 1rem; }
.prose p, .prose li { max-width: 60rem; }
.steps { padding-left: 1.4rem; }
.steps li { margin-bottom: 0.5rem; }
.prose ul li { margin-bottom: 0.35rem; }

/* ---------- Footer (site style) ---------- */
.page-disclaimer { max-width: var(--wrap); margin: 0 auto; padding: 0 16px 2rem; color: var(--muted); font-size: 0.85rem; text-align: center; }
footer {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 2rem; background: var(--bg2); border-top: 1px solid var(--border);
  font-size: 0.72rem; color: var(--muted); letter-spacing: 0.02em;
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent-text); }
.noscript { max-width: var(--wrap); margin: 0 auto 2rem; padding: 1rem; color: var(--sev-med); text-align: center; }

@media (max-width: 560px) {
  .panel { padding: 1.05rem; }
  .nav-links { gap: 0.25rem 0.9rem; }
}

/* ---------- Additions for the Windows Event Log Triage Tool ---------- */
kbd { font-family: var(--mono); font-size: 0.85em; background: var(--surface2); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0.05em 0.4em; }
.code-block { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 0.9rem 1rem; overflow-x: auto; margin: 0.5rem 0 1rem; }
.code-block code { background: none; padding: 0; font-size: 0.85rem; white-space: pre; }
.prose h3 { margin-top: 1.5rem; }

.check { display: flex; gap: 0.55rem; align-items: flex-start; font-size: 0.92rem; margin: 0 0 0.75rem; cursor: pointer; }
.check input { margin-top: 0.3rem; accent-color: var(--accent); }

.card.is-alert .card-value { color: var(--sev-high); }
.sev-counts { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.35rem; }

.alert-summary { margin: 0 0 0.75rem; }
.alert-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; font-size: 0.86rem; color: var(--muted); margin: 0 0 0.6rem; }
.alert-meta strong { color: var(--text); font-weight: 600; }
.evidence dd { white-space: pre-line; }
.alert-sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0.9rem 1.5rem; margin-top: 0.4rem; }
.alert-sections h5 { margin-top: 0.6rem; }
.related-events { margin-top: 0.75rem; }

/* Hour-of-day chart */
.hours { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; align-items: end; height: 140px; padding-top: 0.5rem; }
.hour { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; border-radius: 4px 4px 0 0; position: relative; background: var(--track); border-bottom: 2px solid var(--border-strong); }
.hour.is-off { background: repeating-linear-gradient(135deg, rgba(233, 176, 59, 0.10) 0 4px, transparent 4px 9px); border-bottom-color: rgba(233, 176, 59, 0.5); }
.hour-bar { display: block; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 0; }
.hour.has-findings .hour-bar { background: var(--sev-med); }
.hour-labels { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; font-size: 0.7rem; color: var(--muted); text-align: center; margin-top: 0.3rem; font-variant-numeric: tabular-nums; }
.hour-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; font-size: 0.82rem; color: var(--muted); margin-top: 0.6rem; }
.swatch { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 2px; vertical-align: -0.1rem; margin-right: 0.35rem; }
.swatch-bar { background: var(--accent); }
.swatch-flag { background: var(--sev-med); }
.swatch-off { background: repeating-linear-gradient(135deg, var(--med-line) 0 3px, transparent 3px 6px); }
@media (max-width: 560px) { .hour-labels span:nth-child(odd) { visibility: hidden; } }

/* Timeline */
.event-table td { padding: 0.35rem 0.55rem; font-size: 0.85rem; }
.event-table thead th { position: sticky; top: 0; background: var(--surface2); z-index: 1; }
.event-table tr.is-flagged td:first-child { box-shadow: inset 3px 0 0 var(--sev-med); }
.event-table .time-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.event-table td.mono { word-break: normal; overflow-wrap: anywhere; min-width: 7rem; }
.event-table .detail-cell { word-break: break-word; min-width: 14rem; }
.event-id-btn { font: inherit; font-weight: 600; color: var(--accent-text); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.event-id-btn:hover { color: var(--link-hover); }
.event-message { white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: 0.78rem; background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; padding: 0.6rem 0.75rem; margin: 0.3rem 0; max-height: 320px; overflow: auto; }
.tag { display: inline-block; font-size: 0.72rem; font-weight: 600; color: var(--sev-med); border: 1px solid currentColor; border-radius: 4px; padding: 0 0.3rem; margin-left: 0.35rem; white-space: nowrap; }
.show-more { margin-top: 0.75rem; }

/* ---------- Light/dark toggle (button injected into the nav by /theme.js) ---------- */
.theme-toggle-li { display: flex; align-items: center; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0; margin: 0; background: transparent;
  border: 1px solid var(--border-strong); border-radius: 8px; color: var(--muted); cursor: pointer; font: inherit;
}
.theme-toggle:hover { color: var(--accent-text); border-color: var(--accent-line); }
.theme-toggle-icon { font-size: 1.05rem; line-height: 1; }
@media (max-width: 768px) { .theme-toggle-li { padding: 0.6rem 1.5rem; } }
