:root { --bg: #f6f7f9; --card: #fff; --ink: #1d232b; --muted: #66707c; --line: #dde1e6;
        --accent: #2457c5; --ok: #1d7a46; --warn: #9a6200; --bad: #b3261e; }
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
main { max-width: 960px; margin: 0 auto; padding: 12px; }
h1 { font-size: 1.4rem; margin: .4rem 0 .8rem; } h2 { font-size: 1.1rem; margin: 0 0 .6rem; }
a { color: var(--accent); } small, .muted { color: var(--muted); }
header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
         padding: 8px 12px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; }
header nav { display: flex; gap: 4px; overflow-x: auto; }
header nav a { padding: 8px 10px; border-radius: 8px; text-decoration: none; white-space: nowrap; }
header nav a.here { background: #e7eefb; font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 0 0 12px; }
.narrow { max-width: 380px; margin: 10vh auto; }
.banner { margin: 0; padding: 8px 12px; text-align: center; font-weight: 600; }
.banner.warn { background: #fff4d6; color: var(--warn); } .banner.bad { background: #fde7e5; color: var(--bad); }
.flash { padding: 10px 12px; border-radius: 8px; background: #e3f4ea; color: var(--ok); }
.flash.bad { background: #fde7e5; color: var(--bad); }
label { display: block; margin: 0 0 8px; font-weight: 600; font-size: .95rem; }
input, select, textarea, button, .button { font: inherit; }
input[type=text], input[type=password], input[type=search], input[type=number], select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
textarea { resize: vertical; }
button, .button { display: inline-block; min-height: 44px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 8px;
                  background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
button.link { border: 0; background: none; color: var(--accent); min-height: 44px; padding: 8px 10px; }
form.inline { display: inline; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.filters, .inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters label, .inline-form label { flex: 1 1 180px; margin: 0; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: start; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr.bad td, tr.full td { color: var(--bad); }
.scroll { overflow-x: auto; }
.clip { max-width: 28ch; overflow-wrap: anywhere; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; list-style: none; padding: 0; margin: 0; }
.tiles a { display: block; padding: 10px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); }
.tiles strong { display: block; font-size: 1.4rem; } .tiles span { color: var(--muted); font-size: .9rem; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.list a { display: flex; gap: 12px; align-items: center; padding: 12px; color: var(--ink); text-decoration: none; }
.list .main { flex: 1; min-width: 0; } .list .main span { display: block; color: var(--muted); font-size: .9rem; }
.score { display: inline-block; min-width: 2.4em; padding: 4px 6px; border-radius: 8px; background: #e7eefb; color: var(--accent);
         font-weight: 700; text-align: center; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #eef0f3; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.events { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.events li { padding: 4px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.events li.error { color: var(--bad); } .events li.warn { color: var(--warn); }
.pager { display: flex; gap: 12px; justify-content: center; align-items: center; margin: 12px 0; }
.pager a { display: inline-block; padding: 12px 14px; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 60vh; overflow-y: auto; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #f1f3f5; padding: 10px; border-radius: 8px; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0 0 10px; }
dt { font-weight: 600; } dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  main { padding: 8px; } .list a { flex-wrap: wrap; } .list .tag { flex-basis: 100%; white-space: normal; }
  dl { grid-template-columns: 1fr; } dt { margin-top: 6px; }
}
