/* Tokens and patterns follow the release console (farsight-release-console web/styles.css). */
:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #16181d;
  --muted: #636b7c;
  --line: #d9dde5;
  --ok: #177a33;
  --ok-bg: #e6f4ea;
  --wait: #946200;
  --wait-bg: #fff4d6;
  --bad: #c62828;
  --bad-bg: #fdecec;
  --chip: #eef0f4;
  --accent: #3b5bdb;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --panel: #171a21;
    --ink: #e6e8ee;
    --muted: #949bab;
    --line: #2b303b;
    --ok: #4cc26b;
    --ok-bg: #12291a;
    --wait: #e2b34a;
    --wait-bg: #2e2412;
    --bad: #ff6b6b;
    --bad-bg: #331616;
    --chip: #222733;
    --accent: #7c93ff;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.muted { color: var(--muted); }
.center { text-align: center; padding: 48px 16px; }
.signin { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }

.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 16px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.chip { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 10px; color: var(--muted); background: var(--chip); }
.chip:empty { display: none; }
.chip.warn { color: var(--wait); background: var(--wait-bg); }
.updated { font-size: 12px; color: var(--muted); white-space: nowrap; }
.who { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.btn {
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 5px 10px; font: inherit; cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.small { padding: 2px 8px; font-size: 12px; }

.answer { margin: 12px 18px 0; }
.answer h1 { margin: 0; font-size: 18px; }
.answer p { margin: 2px 0 0; color: var(--muted); }
.banner { margin-top: 6px !important; padding: 6px 10px; border-radius: 6px; color: var(--wait) !important; background: var(--wait-bg); }

.grid {
  margin: 10px 16px 0; width: calc(100% - 32px); border-collapse: separate; border-spacing: 0; table-layout: fixed;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
.grid th, .grid td { border-bottom: 1px solid var(--line); padding: 5px 10px; white-space: nowrap; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid th { font-size: 12px; color: var(--muted); font-weight: 600; }
.grid th.svc-h { width: 170px; }
.grid th.v-h { width: 110px; }
.grid td.cell, .grid th + th + th { border-left: 1px solid var(--line); }
.grid tr.row { cursor: pointer; }
.grid tr.row:hover td, .grid tr.row:focus td { background: var(--chip); outline: none; }
.grid td.svc { font-weight: 600; }

.tile { display: inline-block; min-width: 82px; text-align: center; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 4px; margin-right: 8px; }
.tile.ok { color: var(--ok); background: var(--ok-bg); }
.tile.warn { color: var(--wait); background: var(--wait-bg); }
.tile.bad { color: var(--bad); background: var(--bad-bg); }
.tile.muted { color: var(--muted); background: var(--chip); }
.note { font-size: 12px; color: var(--muted); }
.verdict { font-size: 12px; font-weight: 700; }
.verdict.ok { color: var(--ok); }
.verdict.warn { color: var(--wait); }
.verdict.bad { color: var(--bad); }
.hint { margin: 8px 18px; font-size: 12px; color: var(--muted); }

dialog { width: min(820px, calc(100vw - 32px)); max-height: 80vh; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
dialog h2 { margin: 0 0 6px; font-size: 16px; }
dialog h3 { margin: 14px 0 4px; font-size: 13px; display: flex; align-items: center; gap: 10px; }
dialog h3 .tile { margin-right: 0; }
dialog p { margin: 4px 0; font-size: 13px; }
.facts { margin: 0; padding-left: 18px; font-size: 13px; }
.facts li { margin: 3px 0; overflow-wrap: anywhere; }
.facts li.good::marker { content: "✓  "; color: var(--ok); }
.facts li.gap::marker { content: "✗  "; color: var(--bad); }
.modal-foot { display: flex; justify-content: flex-end; margin-top: 12px; }

@media (max-width: 900px) {
  .note { display: none; }
  .grid th.svc-h { width: 130px; }
}
@media (max-width: 640px) {
  .top { flex-wrap: wrap; }
  .grid { margin: 10px 8px 0; width: calc(100% - 16px); }
  .grid th.v-h, .grid td:nth-child(2) { display: none; }
  .grid th, .grid td { padding: 5px 6px; }
  .tile { min-width: 0; margin-right: 0; }
}
