/* UseThis — shared shell for the static pages (compliance, rankings, changelog).
 * Same palette as app/css/app.css; deliberately small and framework-free.
 * Used by: app/pages/*.html, generated app/best/*.html, generated changelog.html.
 */

:root {
  --page:#f9f9f7; --surface:#fcfcfb; --ink:#0b0b0b; --ink-2:#52514e; --muted:#898781;
  --hairline:#e1e0d9;
  --accent:#2a78d6; --accent-deep:#1c5cab; --accent-wash:#cde2fb; --accent-wash2:#f3f8fe;
  --good-text:#006300; --warn-bg:#fdf1d4; --warn-ink:#8a5a00; --critical:#d03b3b;
  --bar-bg:#0b0b0b; --bar-ink:#cfcdc6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page:#0d0d0d; --surface:#1a1a19; --ink:#ffffff; --ink-2:#b8b6b0; --muted:#8a8880;
    --hairline:#2e2e2c;
    --accent:#5ea0ea; --accent-deep:#9cc6f4; --accent-wash:#16304d; --accent-wash2:#13212f;
    --good-text:#6fe06f; --warn-bg:#3a2d10; --warn-ink:#ffd483; --critical:#f06a6a;
    --bar-bg:#000000; --bar-ink:#b8b6b0;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--page); color: var(--ink); min-height: 100dvh;
  display: flex; flex-direction: column;
}
button { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }
a { color: var(--accent-deep); }
[hidden] { display: none !important; }

/* ---------- chrome ---------- */
.sitebar {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  background: var(--bar-bg); color: var(--bar-ink); font-size: 11.5px; padding: 7px 20px;
}
.sitebar a { color: #fff; font-weight: 600; }
.sitenav {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--surface); border-bottom: 1px solid var(--hairline); padding: 13px 20px;
}
.sitenav .logo { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.sitenav .logo em { color: var(--accent); font-style: normal; }
.sitenav .links { display: flex; gap: 16px; flex-wrap: wrap; }
.sitenav .links a {
  font-size: 13.5px; font-weight: 600; color: var(--ink-2); text-decoration: none;
  padding-bottom: 3px; border-bottom: 2.5px solid transparent;
}
.sitenav .links a.on { color: var(--accent-deep); border-bottom-color: var(--accent); }

main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 26px 20px 44px; }
main.wide { max-width: 1000px; }

.bc { font-size: 11px; color: var(--muted); }
h1 { font-size: 27px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 8px; }
h2 { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; margin: 24px 0 7px; }
p, li { font-size: 14.5px; color: var(--ink-2); line-height: 1.62; }
p + p { margin-top: 10px; }
ul, ol { margin: 8px 0 0 20px; }
li { margin-bottom: 6px; }
strong, b { color: var(--ink); font-weight: 700; }
.lede { font-size: 15.5px; color: var(--ink); }
.stamp { font-size: 11.5px; color: var(--muted); margin-top: 6px; }

.callout {
  background: var(--accent-wash2); border: 1px solid var(--hairline); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 13px 15px; margin: 16px 0;
}
.callout p, .callout li { font-size: 13.5px; }
/* an inline "report an error" button has to read as a link, because it is one */
main button[data-report], .disclosure button[data-report] {
  color: var(--accent-deep); font-size: inherit; font-weight: inherit;
  text-decoration: underline; text-underline-offset: 2px;
}
.disclosure {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 10px;
  padding: 11px 14px; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; margin-bottom: 16px;
}
.disclosure b { color: var(--ink); }

/* ---------- rankings ---------- */
.cattabs { display: flex; gap: 7px; flex-wrap: wrap; margin: 14px 0 18px; }
.chip {
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--hairline); border-radius: 99px; padding: 7px 13px; text-decoration: none;
}
.chip.on { background: var(--ink); color: var(--page); border-color: var(--ink); }

.ranklist { border: 1px solid var(--hairline); border-radius: 14px; overflow: hidden; background: var(--surface); }
.rank { display: flex; gap: 13px; padding: 14px 16px; border-bottom: 1px solid var(--hairline); align-items: flex-start; }
.rank:last-child { border-bottom: none; }
.rank .rk { font-size: 15px; font-weight: 800; color: var(--muted); min-width: 20px; padding-top: 1px; }
.rank .body { flex: 1; min-width: 0; }
.rank .nm { font-size: 14.5px; font-weight: 750; color: var(--ink); }
.rank .iss { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.rank .why { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; line-height: 1.5; }
.rank .ctx { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.rank .verified { font-size: 10.5px; color: var(--muted); margin-top: 6px; }
.rank .right { text-align: right; flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.rank .rate { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; color: var(--good-text); white-space: nowrap; }
.rank .rate small { font-size: 11px; font-weight: 700; color: var(--muted); display: block; }
.rank .cta {
  font-size: 12px; font-weight: 700; color: var(--accent-deep); background: var(--accent-wash);
  border-radius: 9px; padding: 8px 12px; text-decoration: none; white-space: nowrap;
}
.tag {
  display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  border-radius: 99px; padding: 2px 7px; margin-left: 6px; vertical-align: 1px;
  background: var(--warn-bg); color: var(--warn-ink);
}
.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 12px; margin-top: 16px; }
.catcard {
  display: block; background: var(--surface); border: 1px solid var(--hairline); border-radius: 13px;
  padding: 13px 15px; text-decoration: none;
}
.catcard .t { font-size: 14.5px; font-weight: 750; color: var(--ink); }
.catcard .s { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.45; }

/* ---------- changelog ---------- */
.clog { border-left: 2px solid var(--hairline); margin-top: 18px; }
.centry { padding: 0 0 16px 16px; position: relative; }
.centry::before {
  content: ""; position: absolute; left: -5px; top: 6px; width: 8px; height: 8px;
  border-radius: 99px; background: var(--accent);
}
.centry .d { font-size: 11.5px; font-weight: 750; color: var(--muted); letter-spacing: .03em; }
.centry .s { font-size: 14px; color: var(--ink); font-weight: 600; line-height: 1.5; margin-top: 2px; }
.centry .f { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* ---------- footer ---------- */
.sitefoot {
  background: var(--surface); border-top: 1px solid var(--hairline);
  padding: 20px 20px 30px; font-size: 11.5px; color: var(--muted);
}
.sitefoot .inner { max-width: 1000px; margin: 0 auto; }
.sitefoot .links { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.sitefoot .links a, .sitefoot .links button {
  font-size: 12px; font-weight: 650; color: var(--ink-2);
  text-decoration: underline; text-underline-offset: 2px;
}
.sitefoot p { font-size: 11.5px; color: var(--muted); max-width: 900px; line-height: 1.55; }

/* ---------- report dialog ---------- */
.rp-wrap {
  position: fixed; inset: 0; z-index: 40; background: rgba(11,11,11,.45);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.rp-box {
  background: var(--page); border-radius: 16px; width: 100%; max-width: 460px;
  max-height: 92dvh; overflow-y: auto; border: 1px solid var(--hairline);
}
.rp-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px 12px;
  border-bottom: 1px solid var(--hairline); background: var(--surface); border-radius: 16px 16px 0 0;
}
.rp-head h4 { font-size: 16px; font-weight: 800; flex: 1; }
.rp-head .x { font-size: 19px; color: var(--muted); line-height: 1; padding: 2px 4px; }
.rp-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.rp-body .lab { font-size: 12.5px; font-weight: 750; color: var(--ink); }
.rp-body .help { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.rp-body textarea, .rp-body input {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 11px;
  padding: 10px 12px; font-size: 14px; font-family: inherit; color: inherit; outline: none; width: 100%;
}
.rp-body textarea { min-height: 110px; resize: vertical; }
.rp-body textarea:focus, .rp-body input:focus { border-color: var(--accent); }
.rp-body .cnt { font-size: 10.5px; color: var(--muted); text-align: right; }
.rp-body .err { font-size: 11.5px; color: var(--critical); }
.rp-body .ok {
  background: var(--accent-wash); color: var(--accent-deep); border-radius: 12px;
  padding: 14px; font-size: 13px; font-weight: 650; line-height: 1.5;
}
.rp-send {
  background: var(--accent); color: #fff; border-radius: 12px; text-align: center;
  font-size: 14.5px; font-weight: 800; padding: 12px; width: 100%; margin-top: 4px;
}
.rp-send:disabled { opacity: .5; }
