:root {
    color-scheme: light;
    --page: #f6f7f6;
    --surface: #fff;
    --ink: #1c2927;
    --muted: #586961;
    --line: #d5ded8;
    --deep: #133c35;
    --teal: #146653;
    --critical: #9c3029;
    font: 15px/1.5 Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: var(--page); color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .52; }
:focus-visible { outline: 3px solid #33836f; outline-offset: 3px; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 10; padding: 8px 14px; background: white; color: var(--ink); }
.mast { background: var(--deep); color: white; }
.mast-inner, .content { max-width: 1220px; padding-inline: clamp(18px, 4.2vw, 62px); margin: auto; }
.mast-inner { min-height: 63px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; gap: 11px; align-items: center; font-size: 18px; font-weight: 650; letter-spacing: -.045em; }
.brand-mark { position: relative; width: 24px; height: 24px; display: grid; place-items: center; border: 1.5px solid #95c4b5; border-radius: 50%; }
.brand-mark b { border: 1.5px solid #aad1c3; width: 14px; height: 14px; border-radius: 50%; }
.brand-mark i { position: absolute; width: 5px; height: 5px; background: #e2eee6; border-radius: 50%; }
.mast-actions, .page-actions, .pager, .form-actions, .run-line { display: flex; align-items: center; gap: 8px; }
.content { padding-block: clamp(26px, 4.5vw, 54px) 56px; }
.page-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(30px, 3.7vw, 46px); font-weight: 650; letter-spacing: -.055em; line-height: 1.11; }
h2 { font-size: 18px; letter-spacing: -.028em; line-height: 1.3; }
.page-title p { margin-top: 7px; color: var(--muted); font-size: 13px; }
.btn { border: 1px solid #bccbc1; background: white; border-radius: 7px; padding: 9px 14px; font-size: 14px; line-height: 20px; font-weight: 600; }
.btn:hover:not(:disabled) { background: #eef4ef; border-color: #819a8b; }
.btn.primary, .btn.check { color: white; background: var(--teal); border-color: var(--teal); }
.btn.primary:hover:not(:disabled), .btn.check:hover:not(:disabled) { background: #104e41; }
.btn.primary span { margin-right: 3px; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.subtle { color: #e6f4ec; background: transparent; border-color: #54766a; font-size: 12px; padding: 5px 10px; }
.btn.subtle:hover:not(:disabled) { background: #31554b; color: white; }
.mast-actions form { margin: 0; }
.login-page {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 63px);
    min-height: calc(100svh - 63px);
    padding: 32px 16px;
}
.login-card {
    width: min(100%, 410px);
    padding: clamp(24px, 5vw, 36px);
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 8px 30px rgba(19, 60, 53, .06);
}
.login-card h1 { font-size: clamp(29px, 5vw, 36px); margin-bottom: 24px; }
.login-card .field { margin: 16px 0 5px; }
.login-card input:not([type=hidden]) { width: 100%; min-height: 44px; font-size: 16px; }
.login-card .btn { width: 100%; margin-top: 24px; min-height: 44px; }
.btn.text-btn { color: var(--teal); background: transparent; border-color: transparent; }
.counts { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding-block: 18px; margin-bottom: 14px; }
.counts > div { padding-inline: clamp(12px, 2.3vw, 30px); }
.counts > div + div { border-left: 1px solid var(--line); }
.counts span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 550; }
.counts strong { display: block; font-variant-numeric: tabular-nums; font-size: clamp(26px, 3vw, 34px); letter-spacing: -.04em; line-height: 1.2; font-weight: 600; margin-top: 3px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #8a938d; flex: 0 0 auto; }
.dot.ok { background: #39795a; }
.dot.blocked { background: #b64138; }
.dot.unknown { background: #ad7823; }
.run { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px clamp(14px, 2vw, 24px); border: 1px solid #cbdcd1; background: #edf4ef; border-radius: 9px; }
.run-line { gap: 10px; flex-wrap: wrap; }
.run h2 { font-size: 16px; }
.run-copy p { color: #4d6458; font-size: 13px; margin-top: 4px; }
.run .btn { flex-shrink: 0; }
.pill, .verdict { display: inline-flex; align-items: center; border-radius: 4px; padding: 2px 8px; line-height: 19px; font-size: 12px; font-weight: 600; }
.pill { background: #dfe9e0; color: #394f40; }
.pill.working { color: #255d76; background: #d9eaf3; }
.pill.bad { color: #8b3328; background: #f7dbd6; }
.pill.caution { color: #74531b; background: #f6e8c6; }
.table-actions { display: flex; align-items: flex-end; gap: 12px; margin: 25px 0 12px; flex-wrap: wrap; }
.search-wrap { position: relative; flex: 1 1 210px; align-self: flex-end; }
input:not([type=checkbox]), select, textarea { border: 1px solid #bac8be; padding: 8px 11px; border-radius: 6px; background: white; min-width: 0; }
.search-wrap input { width: 100%; padding-left: 36px; }
.magnifier { position: absolute; left: 13px; top: 50%; transform: translateY(-60%); width: 12px; height: 12px; border: 1.6px solid #697c6d; border-radius: 50%; pointer-events: none; }
.magnifier::after { content: ""; position: absolute; width: 6px; height: 1.6px; background: #697c6d; right: -5px; bottom: -2px; transform: rotate(45deg); }
.filter { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.filter select { color: var(--ink); max-width: 190px; padding-block: 10px; }
.data-surface { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.table-scroll { position: relative; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; text-align: left; }
th { color: var(--muted); background: #f5f7f5; font-size: 12px; line-height: 1.45; font-weight: 650; }
td, th { padding: 12px 13px; border-bottom: 1px solid #e4e9e4; vertical-align: middle; }
th:first-child, td:first-child { padding-left: 21px; }
td:first-child { font-weight: 600; overflow-wrap: anywhere; min-width: 150px; }
td:nth-child(2) { overflow-wrap: anywhere; max-width: 180px; }
td:last-child { text-align: right; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcf9; }
.zone { font-size: 10px; font-weight: 600; color: #67776c; }
.verdict { gap: 5px; white-space: nowrap; }
.verdict.ok { color: #28603f; background: #e7f2e8; }
.verdict.blocked { color: #98362c; background: #fae9e5; }
.verdict.unknown { color: #815a19; background: #f9efda; }
.time-cell { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.manage-link { border: 0; border-radius: 3px; color: var(--teal); background: transparent; padding: 5px 3px; font-size: 12px; font-weight: 650; }
.manage-link:hover { text-decoration: underline; }
.empty { padding: 36px 18px; text-align: center; color: var(--muted); }
.empty h2 { font-size: 16px; color: var(--ink); }
.empty p { margin-top: 6px; font-size: 13px; }
.table-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 19px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.notice, .alert-panel { border: 1px solid #b6d0c0; background: #edf7f0; padding: 12px 16px; border-radius: 7px; margin-bottom: 14px; font-size: 13px; overflow-wrap: anywhere; }
.notice.warning { border-color: #d3b985; background: #fff5df; color: #6f511c; }
.alert-panel { background: #fff0eb; border-color: #e7b0a6; color: #7f3128; display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.alert-panel h2 { font-size: 15px; }
.alert-panel ul { margin: 4px 0 0; padding-left: 18px; max-height: 140px; overflow: auto; }
dialog { background: white; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 0; width: min(94vw, 470px); max-height: 88vh; }
dialog::backdrop { background: rgb(20 35 29 / 45%); }
.dialog-body { padding: clamp(17px, 3.2vw, 27px); }
.dialog-title { display: flex; justify-content: space-between; align-items: start; gap: 10px; margin-bottom: 20px; }
.dialog-title h2 { font-size: 22px; }
.close { border: 0; background: transparent; font: 23px/1.1 system-ui,sans-serif; padding: 1px 5px; border-radius: 3px; color: var(--muted); }
.field { display: grid; gap: 5px; font-size: 13px; font-weight: 600; margin-top: 13px; }
.field input, .field select, .field textarea { width: 100%; font-weight: 400; }
textarea { resize: vertical; }
.hint, .selected-domain { font-size: 13px; margin-top: 7px; color: var(--muted); }
.selected-domain { font-size: 17px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.form-actions { justify-content: flex-end; margin-top: 17px; }
.form-error { color: var(--critical); background: #fff0ed; border: 1px solid #e9bbb1; border-radius: 5px; padding: 8px; margin-top: 14px; font-size: 13px; }
.group-list { list-style: none; padding: 0; margin: 18px 0 0; max-height: min(45vh, 240px); overflow: auto; }
.group-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-top: 1px solid var(--line); padding: 9px 0; }
.group-list li span { overflow-wrap: anywhere; }
.group-count { font-size: 12px; color: var(--muted); margin-left: 6px; }
.danger { color: var(--critical); border-color: #d8b3ad; }
.btn.danger:hover:not(:disabled) { background: #ffefeb; border-color: #ba7d70; }
.confirm-box { margin-top: 12px; background: #fff3ef; padding: 12px; border: 1px solid #e7b7ac; border-radius: 7px; }
.confirm-box p { font-size: 13px; }
.domain-delete { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
@media (max-width: 760px) {
    .content { padding-top: 25px; }
    .table-actions { gap: 8px; }
    .table-actions .search-wrap { flex-basis: 100%; }
    .filter { display: grid; gap: 3px; }
    .counts { grid-template-columns: repeat(2, 1fr); padding: 0; }
    .counts > div { padding: 12px 15px; }
    .counts > div:nth-child(3) { border-left: none; }
    .counts > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 580px) {
    .page-title { align-items: flex-start; flex-direction: column; gap: 14px; }
    .run { align-items: flex-start; flex-direction: column; gap: 12px; }
    .table-actions .filter { flex: 1 1 130px; }
    .filter select { max-width: 100%; }
    .data-surface table { min-width: 645px; }
    .table-foot { flex-wrap: wrap; padding: 11px; }
    .mast-inner, .content { padding-inline: 14px; }
}
@media (max-width: 380px) {
    .mast-inner { flex-wrap: wrap; gap: 6px 12px; padding-block: 10px; }
    .mast-actions { margin-left: auto; }
}
