:root {
  --bg: #f6f7f9; --card: #fff; --text: #1c2330; --muted: #667085; --line: #e3e6eb; --accent: #2f6fed;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #12151b; --card: #1b2029; --text: #e6e9ef; --muted: #98a2b3; --line: #2c333f; --accent: #6b9bff; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
header { background: var(--card); border-bottom: 1px solid var(--line); margin-bottom: 20px; }
header .bar { max-width: 1100px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 28px; min-height: 52px; }
header form { margin-left: auto; }
.brand { font-weight: 700; font-size: 16px; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand span { color: var(--muted); font-weight: 400; }
nav { display: flex; gap: 22px; align-self: stretch; }
nav a { display: flex; align-items: center; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
nav a:hover { color: var(--text); }
nav a[aria-current] { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
.page-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
h1 { font-size: 20px; margin: 0; }
@media (max-width: 560px) {
  header .bar { flex-wrap: wrap; gap: 0 18px; padding-top: 8px; }
  nav { order: 3; width: 100%; min-height: 40px; gap: 18px; overflow-x: auto; scrollbar-width: none; }
}
h2 { font-size: 16px; margin: 0; }
main { max-width: 1100px; margin: 0 auto; padding: 0 16px 40px; }
section { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.note { color: var(--muted); font-size: 13px; }
.error { color: #c0392b; }
button, .button { font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 7px; padding: 5px 11px; cursor: pointer; text-decoration: none; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs .on { background: var(--accent); border-color: var(--accent); color: #fff; }
.totals { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 6px; }
.totals b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; }
.totals i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart text { fill: var(--muted); font-size: 11px; }
.chart .grid { stroke: var(--line); }
.chart .guide { stroke: var(--muted); stroke-dasharray: 3 3; }
.chart path { fill: none; stroke-width: 1.8; }
.legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 18px; margin-top: 10px; font-size: 13px; }
.legend div { display: flex; gap: 8px; align-items: center; }
.legend i { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.legend span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend em { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.tip { position: fixed; pointer-events: none; background: var(--card); border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; font-size: 12.5px; box-shadow: 0 4px 14px rgba(0,0,0,.18); max-width: 300px; z-index: 5; }
.tip b { display: block; margin-bottom: 3px; }
.tip div { display: flex; gap: 6px; align-items: center; }
.tip i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.tip span { flex: 1; }
.tip em { font-style: normal; font-variant-numeric: tabular-nums; margin-left: 12px; }
.signin { max-width: 420px; margin: 14vh auto 0; text-align: center; }
.signin .button { display: inline-block; margin: 14px 0; padding: 9px 18px; background: var(--accent); border-color: var(--accent); color: #fff; }
h3 { font-size: 14px; margin: 14px 0 6px; }
h4 { font-size: 13px; margin: 10px 0 2px; color: var(--muted); font-weight: 600; }
.lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 24px; }
.lists .legend { grid-template-columns: 1fr; }
.bars { display: grid; gap: 9px; margin-top: 8px; font-size: 13px; }
.bars > div > div:first-child { display: flex; gap: 10px; }
.bars span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars em { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bars .track { height: 8px; margin-top: 3px; border-radius: 4px; background: var(--bg); overflow: hidden; }
.bars .track b { display: block; height: 100%; border-radius: 4px; }
.bars h5 { margin: 8px 0 -2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.bars h5:first-child { margin-top: 0; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; font-size: 13px; }
.filters select, .filters input { font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px; }
.filters input { flex: 1; min-width: 180px; }
.table-wrap { overflow-x: auto; }
.issues { width: 100%; border-collapse: collapse; font-size: 13px; }
.issues th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.issues td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.issues tbody tr { cursor: pointer; }
.issues tbody tr:hover, .issues tr.open { background: var(--bg); }
.issues .excerpt { min-width: 260px; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.description { white-space: pre-wrap; overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 2px 14px; margin: 4px 0; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.files { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.shot { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.shot img { max-height: 320px; max-width: 220px; border: 1px solid var(--line); border-radius: 8px; }
.textfile { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.textfile pre { flex-basis: 100%; max-height: 480px; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 10px; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
footer { max-width: 1100px; margin: 0 auto; padding: 0 16px 32px; display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; }
footer a { color: var(--muted); }
.prose { max-width: 760px; }
.prose h1, .prose h2, .prose h3 { margin: 1.1em 0 .4em; line-height: 1.25; }
.prose h1:first-child, .prose h2:first-child { margin-top: 0; }
.prose li { margin: 3px 0; }
.prose blockquote { margin: 10px 0; padding: 2px 14px; border-left: 3px solid var(--line); color: var(--muted); }
.prose a, .agree a { color: var(--accent); }
.agree { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.agree label { display: flex; gap: 9px; align-items: flex-start; }
.agree input { margin-top: 4px; }
.agree button { background: var(--accent); border-color: var(--accent); color: #fff; padding: 7px 16px; }
.manifest { max-height: 560px; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 10px; font-size: 12px; }
#detail .button { display: inline-block; margin: 6px 0 4px; }

/* API tokens */
.secret { user-select: all; overflow-wrap: anywhere; white-space: pre-wrap; }
.token-form { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.token-form label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 260px; }
.token-form input { font: inherit; padding: 6px 8px; }
