  :root {
    --bg: #f6f7f9; --panel: #fff; --text: #16191d; --muted: #667085; --line: #e3e6ea;
    --accent: #2b59ff; --accent-weak: #e8eeff; --mark: #ffe066; --code: #f1f3f6; --ok: #138a4b;
  }
  @media (prefers-color-scheme: dark) {
    :root { --bg: #0f1216; --panel: #171b21; --text: #e8ebef; --muted: #8a94a3; --line: #272d36;
            --accent: #7b9bff; --accent-weak: #1e2740; --mark: #7a5f00; --code: #1d222a; --ok: #3ddc84; }
  }
  * { box-sizing: border-box; }
  [hidden] { display: none !important; }
  body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
  header { padding: 28px 16px 8px; max-width: 980px; margin: 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
  h1 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
  h1 span { color: var(--accent); }
  .sub { color: var(--muted); margin: 2px 0 0; font-size: 14px; }
  main { max-width: 980px; margin: 0 auto; padding: 0 16px 48px; }
  .stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
  .stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; min-width: 120px; }
  .stat b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
  .stat small { color: var(--muted); }
  form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
  .row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
  input, select, button { font: inherit; color: inherit; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 10px 12px; }
  input[type=search] { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; width: 100%; }
  input:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
  button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; cursor: pointer; padding-inline: 22px; }
  button:disabled { opacity: .5; cursor: default; }
  .meta { color: var(--muted); font-size: 13px; margin: 16px 0 8px; min-height: 20px; }
  .err { color: #d92d20; }
  .hit { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
  .hit-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
  .hit a.url { color: var(--accent); text-decoration: none; word-break: break-all; font-weight: 600; }
  .hit a.url:hover { text-decoration: underline; }
  .badge { font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--accent-weak); color: var(--accent); font-weight: 600; text-transform: uppercase; }
  .badge.dom { background: #e6f6ec; color: var(--ok); }
  @media (prefers-color-scheme: dark) { .badge.dom { background: #12301f; } }
  .count { color: var(--muted); font-size: 12px; margin-left: auto; }
  .hit button.open { font: inherit; font-size: 11px; cursor: pointer; background: none; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 7px; white-space: nowrap; }
  .hit button.open:hover { color: var(--accent); border-color: var(--accent); }
  .snip { margin: 8px 0 0; padding: 8px 10px; background: var(--code); border-radius: 6px; overflow-x: auto; white-space: pre-wrap; word-break: break-all;
          font: 12.5px/1.5 ui-monospace, "Cascadia Code", Consolas, monospace; }
  mark { background: var(--mark); color: inherit; border-radius: 2px; padding: 0 1px; }
  .pager { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
  .techs { margin-top: 28px; }
  .techs h2 { font-size: 14px; color: var(--muted); font-weight: 600; margin: 0 0 8px; }
  .techs h3 { font-size: 12px; color: var(--muted); font-weight: 600; margin: 14px 0 6px; text-transform: uppercase; letter-spacing: .04em; }
  .tech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  .tech { cursor: pointer; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; color: inherit; }
  .tech:hover { border-color: var(--accent); }
  .tech b { display: block; font-size: 14px; }
  .tech small { color: var(--muted); font-size: 12px; }
  .top { margin-top: 28px; }
  .top h2 { font-size: 14px; color: var(--muted); font-weight: 600; margin: 0 0 8px; }
  .chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .chip { cursor: pointer; background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 3px 11px; font-size: 13px; }
  .chip:hover { border-color: var(--accent); }
  .chip em { color: var(--muted); font-style: normal; margin-left: 4px; }
  dialog { width: min(1100px, 94vw); height: 86vh; border: 1px solid var(--line); border-radius: 12px; padding: 0; background: var(--panel); color: var(--text); }
  dialog::backdrop { background: rgba(0,0,0,.5); }
  .dlg { display: flex; flex-direction: column; height: 100%; }
  .dlg-head { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .dlg-head .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
  .src { flex: 1; margin: 0; padding: 12px 14px; overflow: auto; white-space: pre-wrap; word-break: break-all;
         font: 12.5px/1.55 ui-monospace, "Cascadia Code", Consolas, monospace; }
  .empty { text-align: center; color: var(--muted); padding: 40px 0; }
  nav { display: flex; gap: 4px; margin: 14px 0 4px; border-bottom: 1px solid var(--line); }
  nav button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--muted); font-weight: 600; cursor: pointer; padding: 8px 14px; }
  nav button[aria-selected=true] { color: var(--accent); border-bottom-color: var(--accent); }
  table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 14px; }
  th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); }
  th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
  td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
  tr:last-child td { border-bottom: 0; }
  tr.dom-row { cursor: pointer; } tr.dom-row:hover td { background: var(--accent-weak); }
  tr.pages td { background: var(--code); padding: 6px 12px 10px 28px; }
  .pg { display: flex; gap: 8px; align-items: baseline; padding: 2px 0; font-size: 13px; }
  .pg a { color: var(--accent); text-decoration: none; word-break: break-all; } .pg a:hover { text-decoration: underline; }
  .pg small { color: var(--muted); margin-left: auto; white-space: nowrap; }
  .bar { height: 12px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0 6px; }
  .bar i { display: block; height: 100%; background: var(--accent); transition: width .4s; }
  .bar.done i { background: var(--ok); }
  .err-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
  .err-list span { background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; font-size: 13px; }
  .st-ok { color: var(--ok); } .st-err { color: #d92d20; }
  h2.sec { font-size: 14px; color: var(--muted); font-weight: 600; margin: 22px 0 8px; }
  .scroll-x { overflow-x: auto; }
  .grow { flex: 1; min-width: 200px; }
  .linkbtn { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 6px 4px; font-size: 13px; }
  .linkbtn:hover { color: var(--text); text-decoration: underline; }
  dialog.login { width: min(420px, 92vw); height: fit-content; padding: 22px; }
  dialog.login h2 { margin: 0 0 4px; font-size: 18px; }
  dialog.login p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
  dialog.login form { display: flex; flex-direction: column; gap: 10px; }
  dialog.login input { width: 100%; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
  dialog.login .fields { display: flex; flex-direction: column; gap: 10px; }
  dialog.login #login-user, dialog.login #login-pass { font-family: inherit; }
  dialog.login .linkbtn { align-self: center; }
