/* LaneScout Mail Guard — the dashboard. Same tokens as lanescout.io (site/*.html). */
:root {
  --bg: #ffffff; --ink: #0f172a; --muted: #5b6472; --line: #e6e9ef; --card: #f7f9fc; --brand: #1d4ed8; --brand-ink: #ffffff;
  --clear: #0f8a4d; --caution: #b8860b; --caution-bg: #fdf6e7; --high: #c1121f; --high-bg: #fdecee; --focus: #93b4ff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1020; --ink: #e8ecf5; --muted: #9aa4b6; --line: #1e2740; --card: #121a30; --brand: #5b8cff; --brand-ink: #0b1020;
    --clear: #34c77b; --caution: #e0b54a; --caution-bg: #2a2410; --high: #ff6b76; --high-bg: #2b1216; --focus: #5b8cff;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1020; --ink: #e8ecf5; --muted: #9aa4b6; --line: #1e2740; --card: #121a30; --brand: #5b8cff; --brand-ink: #0b1020;
  --clear: #34c77b; --caution: #e0b54a; --caution-bg: #2a2410; --high: #ff6b76; --high-bg: #2b1216; --focus: #5b8cff;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
a { color: var(--brand); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.top { border-bottom: 1px solid var(--line); }
.top__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 17px; }
.who { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; min-width: 0; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foot { color: var(--muted); font-size: 13px; padding-top: 24px; padding-bottom: 48px; border-top: 1px solid var(--line); margin-top: 40px; }
.foot a { color: var(--muted); }

h1 { font-size: 26px; letter-spacing: -0.02em; margin: 28px 0 6px; line-height: 1.2; }
h2 { font-size: 18px; margin: 28px 0 10px; }
h3 { font-size: 15px; margin: 0 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.lede { color: var(--muted); margin: 0 0 18px; max-width: 70ch; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 12px 0; }
.card--narrow { max-width: 440px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 720px) { .grid { grid-template-columns: 1fr; } }
.stat b { display: block; font-size: 26px; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 13px; }

label { display: block; font-weight: 600; font-size: 13.5px; margin: 12px 0 4px; }
input[type="text"], input[type="email"], input[type="number"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px;
}
textarea { min-height: 96px; resize: vertical; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 700; cursor: pointer;
  background: var(--brand); color: var(--brand-ink); border: 1px solid var(--brand); border-radius: 9px; padding: 9px 16px;
}
.btn[disabled] { opacity: 0.55; cursor: default; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--danger { background: transparent; color: var(--high); border-color: var(--high); }
.btn--small { padding: 5px 10px; font-size: 13px; font-weight: 600; }
.actions { display: flex; gap: 6px; flex-wrap: nowrap; }
.row input, .row select { flex: 1 1 240px; width: auto; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; text-decoration: underline; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 18px 0 8px; overflow-x: auto; }
.tabs a { padding: 9px 12px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 600; font-size: 14px; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }

.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 700; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.chip { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px; border: 1px solid currentColor; white-space: nowrap; }
.chip--high { color: var(--high); background: var(--high-bg); }
.chip--caution { color: var(--caution); background: var(--caution-bg); }
.chip--ok { color: var(--clear); }
.chip--wait { color: var(--muted); }

.finding { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--caution); border-radius: 10px; padding: 12px 16px; margin: 10px 0; }
.finding--high { border-left-color: var(--high); }
.finding__head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.finding__subject { font-weight: 700; overflow-wrap: anywhere; }
.finding__meta { color: var(--muted); font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.finding ul { margin: 8px 0 0; padding-left: 18px; }
.finding li { margin: 4px 0; }
.facts { margin-top: 8px; font-size: 13px; }
.facts dt { font-weight: 700; margin-top: 6px; }
.facts dd { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
details summary { cursor: pointer; color: var(--brand); font-size: 13px; margin-top: 8px; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 10px 0 0; }
.steps li { counter-increment: s; position: relative; padding-left: 34px; margin: 12px 0; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.copy { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.copy code { font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--bg); border: 1px solid var(--line);
  border-radius: 6px; padding: 5px 8px; overflow-wrap: anywhere; min-width: 0; }

.notice { border-radius: 10px; padding: 10px 14px; margin: 12px 0; border: 1px solid var(--line); background: var(--card); }
.notice--ok { border-color: var(--clear); }
.notice--bad { border-color: var(--high); background: var(--high-bg); }
.notice--warn { border-color: var(--caution); background: var(--caution-bg); }

.bars { display: flex; align-items: flex-end; gap: 2px; height: 48px; margin-top: 10px; }
.bars i { flex: 1; background: var(--line); border-radius: 2px 2px 0 0; min-height: 2px; }
.bars i.hit { background: var(--caution); }
.empty { color: var(--muted); padding: 18px 0; }

/* The analyst and the team */
.analyst { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); }
.analyst__label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.analyst p { margin: 4px 0 0; }
.analyst ol { margin: 6px 0 0; padding-left: 20px; }
.answer { margin-top: 8px; font-size: 13px; font-weight: 600; }
.answer--genuine { color: var(--clear); }
.answer--not_genuine { color: var(--high); }
.quote { font-style: italic; }
.toggle { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.toggle input { margin-top: 4px; }
.ask__log { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.bubble { max-width: 85%; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble--me { align-self: flex-end; background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.bubble--ai { align-self: flex-start; background: var(--bg); }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.card > h2:first-child { margin-top: 0; }
.picker td:first-child { width: 36px; }
.narrow { max-width: 560px; }
code.big { font-size: 18px; letter-spacing: 1px; word-break: break-all; }

/* The Overview: what needs someone, then what was caught */
.allclear { color: var(--clear); font-weight: 600; margin: 4px 0 8px; }
.attn-list, .catches { list-style: none; padding: 0; margin: 8px 0; }
.attn { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--caution); border-radius: 10px; padding: 10px 14px; margin: 8px 0; overflow-wrap: anywhere; }
.attn--bad { border-left-color: var(--high); }
.attn__list { margin: 8px 0 0; padding-left: 18px; }
.attn__list li { margin: 4px 0; }
.catch { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.catch > .small { grid-column: 2; }
.catch__text { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.catch__text:hover { text-decoration: underline; }

/* Phones: no horizontal scroll — tabs scroll on their own, tables become stacked cards. */
@media (max-width: 600px) {
  h1 { font-size: 22px; }
  .tabs { margin-left: -16px; margin-right: -16px; padding: 0 16px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tablewrap { overflow-x: visible; }
  table, thead, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tbody tr { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; margin: 10px 0; }
  td { border: 0; padding: 5px 0; overflow-wrap: anywhere; }
  td.num { text-align: left; }
  td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
  .actions { flex-wrap: wrap; }
  .catch { grid-template-columns: 1fr; }
  .catch > .small { grid-column: 1; }
  .bubble { max-width: 100%; }
}
