/* Claudette hub — mobile-first, light/dark aware. No JS framework, no build step. */
:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #1c2128;
  --muted: #6a737d;
  --line: #e2e6ea;
  --accent: #2f6feb;
  --shadow: 0 1px 3px rgba(20, 30, 50, .08);
  --pending: #2f6feb;
  --complete: #1a7f37;
  --failed: #cf222e;
  --review: #bf8700;
  --nothing: #8b949e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117; --card: #161b22; --ink: #e6edf3; --muted: #9198a1;
    --line: #2a313a; --accent: #4d8bff; --shadow: none;
    --pending: #4d8bff; --complete: #3fb950; --failed: #f85149;
    --review: #d29922; --nothing: #6e7681;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 16px; background: var(--card);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 18px; }
.topbar nav { display: flex; gap: 4px; margin-left: auto; }
.topbar nav a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px;
  padding: 6px 10px; border-radius: 8px;
}
.topbar nav a.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

main { max-width: 820px; margin: 0 auto; padding: 16px 16px 40px; }
h1 { font-size: 22px; margin: 8px 0 4px; }
h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 26px 0 10px; }
.muted { color: var(--muted); font-size: 14px; }
.ok { color: var(--complete); font-weight: 600; }
code { background: color-mix(in srgb, var(--ink) 8%, transparent); padding: 1px 5px; border-radius: 5px; font-size: 13px; }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.tiles.small { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
.tile {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--nothing);
  border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow);
}
.tile .num { font-size: 26px; font-weight: 700; line-height: 1.1; }
.tile .lbl { font-size: 13px; color: var(--muted); margin-top: 2px; word-break: break-word; }
.tile .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.tile.status-pending { border-left-color: var(--pending); }
.tile.status-complete { border-left-color: var(--complete); }
.tile.status-failed { border-left-color: var(--failed); }
.tile.status-needs_review { border-left-color: var(--review); }
.tile.status-nothing { border-left-color: var(--nothing); }

/* Cards */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin: 10px 0; box-shadow: var(--shadow);
}
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.card-head .action { font-size: 15px; }
.card-head .client { color: var(--muted); font-size: 14px; }
.card-head .when { margin-left: auto; color: var(--muted); font-size: 12px; }

/* Badges */
.badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .02em;
  padding: 2px 8px; border-radius: 999px; color: #fff; background: var(--nothing);
  text-transform: uppercase;
}
.badge.warn { background: var(--review); }
.badge.status-pending { background: var(--pending); }
.badge.status-complete { background: var(--complete); }
.badge.status-failed { background: var(--failed); }
.badge.status-needs_review { background: var(--review); }
.badge.status-nothing { background: var(--nothing); }

/* Findings list */
.finding .items { list-style: none; margin: 10px 0 0; padding: 0; }
.finding .items li { padding: 6px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; }
.finding .items .subj { font-size: 14px; }
.finding .items .meta { font-size: 12px; color: var(--muted); }
.finding .items .more { color: var(--muted); font-size: 13px; }

/* Runs */
.runs { list-style: none; margin: 0; padding: 0; }
.run .line { font-size: 14px; margin-top: 6px; color: var(--ink); word-break: break-word; }
.run .line .k {
  display: inline-block; min-width: 34px; margin-right: 6px; font-size: 11px;
  font-weight: 700; color: var(--muted); text-transform: uppercase;
}
.run .line.note { color: var(--muted); font-style: italic; }
.run .thread { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--accent); text-decoration: none; }
.more-link { color: var(--accent); text-decoration: none; font-weight: 600; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.filters select, .filters input, .filters button {
  font: inherit; font-size: 14px; padding: 8px 10px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
.filters input[type=search] { flex: 1 1 180px; min-width: 140px; }
.filters button { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.filters .clear { color: var(--muted); font-size: 13px; text-decoration: none; }

/* Runbook docs */
.doc-card summary { cursor: pointer; font-size: 15px; }
.doc { white-space: pre; overflow-x: auto; font-size: 12px; line-height: 1.45; margin: 12px 0 0; }
.md { margin-top: 10px; overflow-x: auto; }
.md table { border-collapse: collapse; width: 100%; font-size: 14px; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.md code { font-size: 13px; }
.md pre { background: color-mix(in srgb, var(--ink) 6%, transparent); padding: 10px; border-radius: 8px; overflow-x: auto; }

.foot { max-width: 820px; margin: 0 auto; padding: 16px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }
