:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #1c2330;
  --ink-2: #4a5568;
  --muted: #6b7686;
  --line: #e2e6ec;
  --accent: #2457c5;
  --accent-ink: #ffffff;
  --good: #1f7a4d;
  --warn: #9a6200;
  --bad: #b42318;
  --good-bg: #e8f5ee;
  --warn-bg: #fff4e0;
  --bad-bg: #fdecea;
  --info-bg: #eaf1fd;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
code { font: 0.82rem/1.4 ui-monospace, Consolas, monospace; background: #f0f2f5; padding: 1px 5px; border-radius: 4px; word-break: break-all; }
h1 { font-size: 1.6rem; margin: 0 0 0.6rem; }
h2 { font-size: 1.15rem; margin: 0 0 0.6rem; }
h3 { font-size: 0.95rem; margin: 1rem 0 0.4rem; color: var(--ink-2); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.top { background: var(--surface); border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.top-inner { display: flex; align-items: center; gap: 24px; min-height: 58px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
nav a { color: var(--ink-2); text-decoration: none; padding: 6px 12px; border-radius: 6px; }
nav a.on, nav a:hover { background: var(--info-bg); color: var(--accent); }
.logout { margin-left: auto; }
.linklike { background: none; border: 0; color: var(--ink-2); cursor: pointer; font: inherit; padding: 0; }
.linklike:hover { text-decoration: underline; }
.foot { color: var(--muted); font-size: 0.82rem; padding-top: 24px; padding-bottom: 32px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.narrow { max-width: 420px; margin: 40px auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.grid > .card { margin-bottom: 0; }
.grid > .card.wide { grid-column: 1 / -1; }
.grid + .card, .grid + .grid, table.list + .grid { margin-top: 18px; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.lead { font-size: 1.05rem; margin: 0.2rem 0 0.8rem; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between h1, .row-between h2 { margin-bottom: 0.4rem; }

input, select, textarea { font: inherit; color: inherit; border: 1px solid #c9d0da; border-radius: 7px; padding: 8px 10px; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
label { display: block; font-weight: 600; font-size: 0.9rem; }
label input, label select, label textarea { margin-top: 4px; font-weight: 400; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
label.check input { width: auto; margin: 0; }
.stack { display: grid; gap: 12px; }
button, .button { font: inherit; font-weight: 600; border: 1px solid #c9d0da; background: #fff; color: var(--ink); padding: 8px 16px; border-radius: 7px; cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .button:hover { border-color: var(--accent); }
button.primary, .button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button:disabled { opacity: 0.7; cursor: progress; }
form.inline { display: inline-block; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.check-form { display: flex; gap: 10px; }
.check-form input[name=site] { font-size: 1.1rem; padding: 10px 12px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters input { flex: 2 1 200px; width: auto; }
.filters select { flex: 1 1 150px; width: auto; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; display: flex; flex-direction: column; }
.tile .num { font-size: 2rem; font-weight: 700; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.tile .lbl { color: var(--muted); font-size: 0.86rem; }

.flash { border-radius: 8px; padding: 10px 14px; margin: 0 0 16px; }
.flash-ok { background: var(--good-bg); color: var(--good); }
.flash-info { background: var(--info-bg); color: #1d3f86; }
.flash-error { background: var(--bad-bg); color: var(--bad); }

.summary { border-left: 6px solid var(--muted); }
.summary-hot { border-left-color: var(--bad); }
.summary-warm { border-left-color: var(--warn); }
.summary-ok { border-left-color: var(--good); }
.summary h1 { font-size: 1.8rem; }
.tag { font-size: 0.75rem; font-weight: 600; background: #eef1f5; color: var(--ink-2); border-radius: 99px; padding: 2px 10px; vertical-align: middle; white-space: nowrap; }
.tag-stop { background: var(--bad-bg); color: var(--bad); }
.pill { display: inline-block; font-size: 0.82rem; font-weight: 600; border-radius: 99px; padding: 2px 10px; text-decoration: none; white-space: nowrap; }
.pill.hot { background: var(--bad-bg); color: var(--bad); }
.pill.warm { background: var(--warn-bg); color: var(--warn); }
.pill.ok { background: var(--good-bg); color: var(--good); }
.pill.muted { background: #eef1f5; color: var(--ink-2); }
.good { color: var(--good); font-weight: 600; }
.warn { color: var(--warn); font-weight: 600; }
.bad { color: var(--bad); font-weight: 600; }

table.list { width: 100%; border-collapse: collapse; background: var(--surface); }
table.list th { text-align: left; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); border-bottom: 1px solid var(--line); padding: 8px 10px; }
table.list td { border-bottom: 1px solid var(--line); padding: 9px 10px; vertical-align: top; }
table.list.compact td { padding: 6px 8px; font-size: 0.9rem; }
body > main > table.list { border: 1px solid var(--line); border-radius: var(--radius); }
td.notes { max-width: 280px; color: var(--ink-2); font-size: 0.9rem; white-space: pre-line; }
td.actions-cell { white-space: nowrap; }
td.actions-cell form { margin: 2px 0; }
form.reset input { width: 150px; padding: 6px 8px; }
form.reset button, td.actions-cell button { padding: 5px 10px; font-size: 0.86rem; }

ul.evidence, ul.plain, ul.checks { list-style: none; padding: 0; margin: 0; }
ul.evidence li, ul.plain li, ul.checks li { padding: 5px 0; border-bottom: 1px dashed var(--line); }
ul.evidence li:last-child, ul.plain li:last-child, ul.checks li:last-child { border-bottom: 0; }
ul.checks li::before { display: inline-block; width: 1.4em; font-weight: 700; content: "•"; color: var(--muted); }
ul.checks li.yes::before { content: "✓"; color: var(--good); }
ul.checks li.no::before { content: "✗"; color: var(--bad); }
ul.checks li.warn::before { content: "!"; color: var(--warn); }

.email-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 18px; align-items: start; }
.copybox { white-space: pre-wrap; font: 0.98rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: #fafbfc; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin: 0; }
.copybox.one-line { font-weight: 600; }
.casl { background: #fffdf5; border-color: #f0e2b8; position: sticky; top: 16px; }
.casl li { margin-bottom: 8px; }

@media (max-width: 760px) {
  .email-layout { grid-template-columns: 1fr; }
  .check-form { flex-direction: column; }
  table.list { display: block; overflow-x: auto; }
}
