
:root {
  color-scheme: light dark;
  --bg: #f5f6f8; --card: #ffffff; --text: #16181d; --muted: #5b6270; --line: #e1e4e9;
  --accent: #2f5bea; --accent-text: #ffffff;
  --ok: #137a37; --ok-bg: #e7f5ec; --fail: #b42318; --fail-bg: #fdecea; --warn: #855600; --warn-bg: #fff5dc;
  --radius: 12px;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101216; --card: #191c22; --text: #e7e9ec; --muted: #9ba2ad; --line: #2b2f37;
    --accent: #7090ff; --accent-text: #0b0d12;
    --ok: #4fcb7c; --ok-bg: #11281a; --fail: #ff7d70; --fail-bg: #2d1513; --warn: #f2c063; --warn-bg: #2b2311;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); }
h1, h2, h3 { line-height: 1.25; }
a { color: var(--accent); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 32px; border-bottom: 1px solid var(--line); background: var(--card); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand p { margin: 0; font-size: 14px; }
.logo { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: 20px; }
h1 { font-size: 20px; margin: 0; }
main { max-width: 1160px; margin: 0 auto; padding: 28px 32px 40px; display: grid; gap: 40px; }
.section-title { font-size: 17px; margin: 0 0 12px; }
.section-lead { margin: -6px 0 14px; font-size: 14px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row .section-title { margin-bottom: 12px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 14px; align-content: start; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-head h2 { font-size: 17px; margin: 0; }
.card-head p { margin: 2px 0 0; font-size: 14px; }
.badge { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge.on { color: var(--ok); background: var(--ok-bg); }
.badge.off { color: var(--muted); border: 1px solid var(--line); }
.muted { color: var(--muted); }
.info { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; font-size: 14px; }
.info dt { color: var(--muted); }
.info dd { margin: 0; overflow-wrap: anywhere; }
.field { display: grid; gap: 4px; }
.field-label { font-weight: 600; font-size: 14px; }
.hint { color: var(--muted); font-size: 13px; }
.small-text { font-size: 14px; margin: 0; }
input[type=text], input[type=password], select { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); width: 100%; }
input[type=file] { font: inherit; font-size: 14px; color: var(--muted); }
input:focus-visible, select:focus-visible, button:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
button { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
button:hover { border-color: var(--muted); }
button:disabled { opacity: 0.6; cursor: progress; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
button.danger { color: var(--fail); }
button.small { padding: 4px 10px; font-size: 13px; }
.result { border-radius: 8px; padding: 10px 12px; margin: 0; }
.result.ok { background: var(--ok-bg); }
.result.fail { background: var(--fail-bg); color: var(--fail); }
.result-message { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.result.ok .result-message { color: var(--ok); }
.checks { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; font-size: 14px; color: var(--text); }
.checks li { overflow-wrap: anywhere; }
.checks .mark { display: inline-block; width: 1.3em; font-weight: 700; }
.checks li.ok .mark { color: var(--ok); }
.checks li.fail .mark { color: var(--fail); }
.note { margin: 6px 0 0; font-size: 14px; color: var(--text); }
.warn { background: var(--warn-bg); color: var(--warn); padding: 8px 12px; border-radius: 8px; margin: 0; font-size: 14px; }
.help summary { cursor: pointer; color: var(--accent); font-size: 14px; font-weight: 600; }
.help ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.tool-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }
.tool-group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.tool-group h3 { font-size: 15px; margin: 0 0 8px; }
.tools { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tools li { display: flex; align-items: center; gap: 8px; }
.tools code { flex: 1; min-width: 0; }
.tag { font-size: 12px; padding: 1px 8px; border-radius: 999px; color: var(--muted); border: 1px solid var(--line); }
.tag.write { color: var(--warn); background: var(--warn-bg); border-color: transparent; }
.changed { font-size: 12px; color: var(--muted); }
.toggle { min-width: 92px; padding: 3px 10px; font-size: 13px; border-color: transparent; }
.toggle.allow { color: var(--ok); background: var(--ok-bg); }
.toggle.deny { color: var(--fail); background: var(--fail-bg); }
table.activity { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; }
.activity th, .activity td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.activity th { color: var(--muted); font-weight: 600; }
.activity tr:last-child td { border-bottom: 0; }
.activity td.ok { color: var(--ok); }
.activity td.fail { color: var(--fail); overflow-wrap: anywhere; }
.activity .num { text-align: right; white-space: nowrap; }
footer { text-align: center; padding: 0 32px 32px; font-size: 13px; }
.message { max-width: 560px; margin: 16vh auto; text-align: center; padding: 0 24px; display: block; }
.message .logo { margin: 0 auto 16px; }
.message p { color: var(--muted); }
a.button { display: inline-block; font-size: 14px; font-weight: 600; padding: 10px 18px; border-radius: 8px; text-decoration: none; }
a.button.primary { background: var(--accent); color: var(--accent-text); }
.session { display: flex; align-items: center; gap: 12px; font-size: 14px; }
