:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: #23352f; background: #f4f5f1; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
[hidden] { display: none !important; }
a { color: #24644d; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, input, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid #659b81; outline-offset: 4px; }
.wrap { max-width: 1100px; margin: 0 auto; padding-inline: 32px; }
.topbar { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid #dde2d9; }
.brand { display: flex; align-items: center; gap: 12px; color: #23352f; font-weight: 650; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #244f3e; color: #fff; font-size: 14px; letter-spacing: .03em; }
nav { display: flex; gap: 24px; font-size: 14px; }
nav a { color: #727d72; padding-block: 12px; }
nav a[aria-current="page"] { color: #244f3e; font-weight: 650; }
.intro { padding: 62px 0 32px; }
.eyebrow { color: #687b66; font-size: 11px; font-weight: 700; letter-spacing: .16em; margin: 0 0 16px; }
h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.25; letter-spacing: -.04em; font-weight: 650; margin: 0 0 18px; }
h2 { font-size: 17px; line-height: 1.45; font-weight: 650; margin: 0; }
.lead { color: #6a766d; font-size: 15px; line-height: 1.9; margin: 0; max-width: 720px; }
.panel { background: #fff; border: 1px solid #e0e5dc; border-radius: 16px; padding: 28px; }
.query-panel { margin-bottom: 24px; }
.query-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.input-group { flex: 1 1 300px; min-width: 0; }
label { display: block; color: #56644e; font-size: 12px; font-weight: 600; margin-bottom: 9px; }
input { width: 100%; min-height: 46px; border: 1px solid #d7dfd2; border-radius: 8px; padding: 11px 13px; background: #fbfcf9; color: #23352f; font-size: 14px; }
input::placeholder { color: #90998c; }
button { min-height: 46px; border: 1px solid #244f3e; border-radius: 8px; padding: 11px 18px; background: #244f3e; color: #fff; cursor: pointer; font-size: 13px; font-weight: 600; }
button:hover { background: #31644e; border-color: #31644e; }
button:disabled { opacity: .5; cursor: wait; }
button.secondary { background: #fff; border-color: #d7dfd2; color: #435c48; }
button.secondary:hover { background: #f1f5ed; }
.feedback { color: #6b7768; font-size: 13px; line-height: 1.8; margin: 16px 0 0; min-height: 24px; overflow-wrap: anywhere; }
.feedback.error { color: #a63b30; }
.feedback.success { color: #24644d; }
.result-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.badge { display: inline-flex; flex-shrink: 0; align-items: center; gap: 6px; font-size: 11px; padding: 6px 10px; border-radius: 6px; background: #edf5e9; color: #2b6645; }
.badge.blocked { background: #fcf0ed; color: #a63b30; }
.badge.neutral { background: #f0f3ec; color: #6e7968; }
.ip-address { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: clamp(18px, 3.5vw, 29px); line-height: 1.5; letter-spacing: -.04em; margin: 28px 0; overflow-wrap: anywhere; }
.info-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 20px; margin: 0 0 28px; }
.info-grid .wide { grid-column: 1 / -1; }
dt { color: #7f8b79; font-size: 11px; margin-bottom: 8px; }
dd { margin: 0; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.small-note, .muted { color: #798573; font-size: 12px; line-height: 1.8; }
.small-note { margin: 12px 0 0; overflow-wrap: anywhere; }
.api-card { margin-top: 24px; }
.api-card .eyebrow { margin-bottom: 10px; }
.api-card h2 { margin-bottom: 20px; }
.endpoint { display: grid; grid-template-columns: 1fr auto; gap: 8px; border-bottom: 1px solid #edf0e8; padding: 17px 0; font-size: 12px; }
.endpoint code { grid-column: 1; color: #566b51; font-size: 12px; }
.endpoint > span:last-child { grid-column: 2; grid-row: 1 / 3; align-self: center; }
.boolean-legend { margin-top: 24px; }
.boolean-legend p { display: flex; gap: 14px; font-size: 11px; line-height: 1.8; color: #7a8574; }
.boolean-legend code { min-width: 35px; color: #3e6547; }
.raw-card { grid-column: 1 / -1; }
pre { margin: 22px 0 0; padding: 22px; background: #f5f7f1; border: 1px solid #e9ede2; border-radius: 10px; color: #4a6048; line-height: 1.8; font-size: 12px; max-height: 560px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.footer { display: flex; justify-content: space-between; gap: 24px; margin-block: 32px; font-size: 11px; color: #8c9585; line-height: 1.8; }
.admin-wrap { max-width: 940px; }
.admin-wrap > .feedback { margin: 0 0 18px; }
.login-panel { max-width: 440px; }
.login-panel form { margin-top: 24px; }
.login-panel button { width: 100%; margin-top: 16px; }
.dashboard-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.rule-form-panel { margin-bottom: 24px; }
.rule-form-panel h2 { margin-bottom: 22px; }
.text-button { min-height: 36px; border: none; background: transparent; color: #476445; padding: 6px 10px; }
.text-button:hover { background: #edf2e8; border-color: transparent; }
.text-button.danger { color: #a24c40; }
.rule-list { list-style: none; padding: 0; margin: 18px 0 0; }
.rule-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 17px; border-top: 1px solid #edf0e8; }
.rule-name { display: block; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.rule-actions { display: flex; gap: 4px; flex-shrink: 0; }
.empty-state { padding-block: 24px; color: #798573; font-size: 13px; line-height: 1.9; }
@media (max-width: 720px) {
    .wrap { padding-inline: 20px; }
    .topbar { min-height: 80px; gap: 12px; }
    .brand { font-size: 13px; gap: 8px; }
    .brand-mark { width: 30px; height: 30px; border-radius: 8px; }
    nav { gap: 14px; font-size: 12px; }
    .intro { padding-top: 40px; }
    .panel { padding: 22px; }
    .result-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .query-form .input-group { flex-basis: 100%; }
    .query-form > button { flex: 1 1 auto; }
    .footer { flex-direction: column; gap: 8px; }
    .card-heading { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: no-preference) {
    button, a { transition: background-color .15s ease, color .15s ease; }
}
