:root {
  --bg: #f6f5f1;
  --card: #ffffff;
  --ink: #1b1a17;
  --muted: #6b675f;
  --line: #e4e1d9;
  --accent: #0e6b5b;
  --accent-soft: #e2f1ed;
  --warn: #9a6200;
  --warn-soft: #fbf0d9;
  --bad: #a8321f;
  --bad-soft: #fbe6e1;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 24px; padding-bottom: 64px; }
h1 { font-size: 24px; margin: 0 0 4px; letter-spacing: -0.01em; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
a { color: var(--accent); }
.small { font-size: 13px; }

.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-row { display: flex; align-items: center; gap: 20px; height: 58px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.mark { width: 16px; height: 16px; border-radius: 4px; background: var(--accent); box-shadow: 6px 6px 0 -2px var(--accent-soft); }
.tabs { display: flex; gap: 4px; margin-left: 12px; flex: 1; }
.tabs button {
  border: 0; background: none; padding: 8px 12px; border-radius: 8px; cursor: pointer;
  font: inherit; color: var(--muted);
}
.tabs button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.balance {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 14px;
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.badge { font-size: 11px; font-weight: 650; padding: 2px 8px; border-radius: 999px; letter-spacing: 0.03em; text-transform: uppercase; }
.badge.live { background: var(--accent-soft); color: var(--accent); }
.badge.demo { background: var(--warn-soft); color: var(--warn); }

.notice { background: var(--warn-soft); color: #5c3b00; border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; font-size: 14px; }
.error { background: var(--bad-soft); color: var(--bad); border-radius: 8px; padding: 10px 12px; margin: 12px 0; font-size: 14px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 760px) {
  .grid2, .grid4 { grid-template-columns: 1fr; }
  .top-row { gap: 8px; height: auto; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .brand { flex: 1; }
  .tabs { order: 3; flex-basis: 100%; margin-left: 0; overflow-x: auto; }
}

label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
label .hint { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="url"], input[type="email"], input[type="password"], textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px;
  font: inherit; background: #fff; color: var(--ink);
}
textarea { resize: vertical; min-height: 96px; font-size: 14px; }
input:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.field { margin-bottom: 14px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spread { justify-content: space-between; }

.btn {
  border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 8px;
  padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer;
}
.btn.ghost { background: #fff; color: var(--accent); }
.btn.plain { border-color: var(--line); background: #fff; color: var(--ink); font-weight: 500; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.engines { display: flex; gap: 8px; flex-wrap: wrap; }
.engine { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 11px; cursor: pointer; font-weight: 500; font-size: 14px; margin: 0; }
.engine input { accent-color: var(--accent); }
.engine .hint { font-weight: 400; }

.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .n { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.stat .l { font-size: 13px; color: var(--muted); }

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

.cell { border: 0; border-radius: 6px; padding: 4px 9px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.cell.yes { background: var(--accent-soft); color: var(--accent); }
.cell.no { background: #efede8; color: var(--muted); }
.cell.err { background: var(--bad-soft); color: var(--bad); }
.cell.wait { background: none; color: var(--muted); font-weight: 400; cursor: default; }

.bar { display: grid; grid-template-columns: 150px 1fr 48px; gap: 10px; align-items: center; margin-bottom: 7px; font-size: 14px; }
.bar .track { height: 8px; background: #efede8; border-radius: 999px; overflow: hidden; }
.bar .fill { height: 100%; background: #b9b4a8; border-radius: 999px; }
.bar.self .fill { background: var(--accent); }
.bar.wide { grid-template-columns: 190px 1fr 40px; }
.bar.self .name { font-weight: 650; }
.bar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

.score { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.score .big { font-size: 56px; font-weight: 750; letter-spacing: -0.03em; line-height: 1; }
.score .big small { font-size: 18px; color: var(--muted); font-weight: 500; }
.pillars { flex: 1; min-width: 260px; }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; }
.dot.pass { background: var(--accent); }
.dot.warn { background: #d99a1c; }
.dot.fail { background: var(--bad); }
.check { padding: 10px 0; border-bottom: 1px solid var(--line); }
.check:last-child { border-bottom: 0; }
.check .fix { margin: 4px 0 0 17px; font-size: 14px; }
.check .detail { margin-left: 17px; font-size: 13px; color: var(--muted); }
ol.fixes { margin: 0; padding-left: 20px; }
ol.fixes li { margin-bottom: 8px; }
.quote { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 10px 14px; border-radius: 0 8px 8px 0; margin-bottom: 10px; }

.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.list-plain li:last-child { border-bottom: 0; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { background: #efede8; border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.chip.self { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.drawer { position: fixed; inset: 0; background: rgba(27, 26, 23, 0.4); z-index: 20; display: flex; justify-content: flex-end; }
.drawer[hidden] { display: none; }
.drawer-panel { background: var(--card); width: min(620px, 100%); height: 100%; overflow-y: auto; padding: 24px; position: relative; }
.close { position: absolute; top: 12px; right: 14px; border: 0; background: none; font-size: 26px; cursor: pointer; color: var(--muted); line-height: 1; }
pre.answer { white-space: pre-wrap; word-wrap: break-word; font: 14px/1.55 system-ui, sans-serif; background: var(--bg); border-radius: 8px; padding: 14px; margin: 0 0 16px; }
.signed-out #tab-checker, .signed-out #tab-audit, .signed-out #tab-credits, .signed-out .tabs,
.signed-out .balance, .signed-out #signout, .signed-out #notice, .signed-out #mode { display: none; }
#auth { margin: 24px auto; }
.landing { display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; align-items: start; }
.landing h1 { font-size: 34px; line-height: 1.15; margin-bottom: 12px; }
.landing .lead { font-size: 17px; color: var(--muted); }
.landing ul.points { padding-left: 20px; margin: 0 0 20px; }
.landing ul.points li { margin-bottom: 8px; }
@media (max-width: 760px) { .landing { grid-template-columns: 1fr; } .landing h1 { font-size: 26px; } }
.foot { display: flex; gap: 18px; padding-top: 8px; padding-bottom: 28px; font-size: 13px; }
.foot a { color: var(--muted); }
.legal { max-width: 760px; padding-top: 28px; padding-bottom: 56px; }
.legal h2 { margin-top: 24px; font-size: 18px; }
code.key { display: block; background: var(--bg); border-radius: 8px; padding: 10px 12px; word-break: break-all; margin: 8px 0; font-size: 13px; }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .packs { grid-template-columns: 1fr; } .bar { grid-template-columns: 110px 1fr 44px; } }
.pack { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.pack .price { font-size: 22px; font-weight: 700; }
