:root {
    --brand: #FF1845;
    --brand-dark: #d70f36;
    --brand-soft: #fff1f4;
    --ink: #10141c;
    --muted: #6b7280;
    --line: #e6e8ee;
    --bg: #f6f7fb;
    --ok: #0f9d58;
    --ok-soft: #eaf7ef;
    --bad: #d93025;
    --bad-soft: #fdecea;
    --radius: 14px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 40px 20px;
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wrap { max-width: 880px; margin: 0 auto; }

.head { margin-bottom: 26px; }
.head h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; }
.head p { margin: 0; color: var(--muted); }

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 18px;
}

.tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }

.tab {
    flex: 1 1 240px;
    text-align: left;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.tab:hover { border-color: #c9cdd8; }
.tab.is-on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.tab strong { display: block; font-size: 14.5px; }
.tab span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.endpoint {
    display: flex; align-items: center; gap: 10px;
    background: #0f1420; color: #e8ecf5;
    border-radius: 10px; padding: 10px 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px;
    margin-bottom: 20px; overflow-x: auto;
}
.endpoint b { background: var(--brand); border-radius: 5px; padding: 2px 8px; font-size: 11px; letter-spacing: .04em; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }

.field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; }
.field label i { font-style: normal; color: var(--brand); }
.field input {
    width: 100%; padding: 10px 12px;
    border: 1px solid var(--line); border-radius: 9px;
    font: inherit; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px;
    transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field.is-bad input { border-color: var(--bad); }
.field .hint { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }
.field.is-bad .hint { color: var(--bad); }

.actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

.btn {
    padding: 11px 20px; border-radius: 10px; border: 1px solid transparent;
    font: inherit; font-weight: 600; cursor: pointer;
    background: var(--brand); color: #fff;
    transition: background .15s, opacity .15s;
}
.btn:hover { background: var(--brand-dark); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn--ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { background: #f3f4f8; }

.spin {
    width: 15px; height: 15px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,.45); border-top-color: #fff;
    display: inline-block; vertical-align: -2px; margin-right: 8px;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.result { display: none; }
.result.is-on { display: block; animation: rise .25s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.verdict {
    display: flex; align-items: center; gap: 12px;
    border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px;
}
.verdict.ok  { background: var(--ok-soft);  border: 1px solid #bfe5cd; }
.verdict.bad { background: var(--bad-soft); border: 1px solid #f5c6c2; }
.verdict .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.verdict.ok .dot  { background: var(--ok); }
.verdict.bad .dot { background: var(--bad); }
.verdict strong { display: block; font-size: 15px; }
.verdict span { color: var(--muted); font-size: 13px; }

table.data { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
table.data th, table.data td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
table.data th { width: 130px; color: var(--muted); font-weight: 600; }
table.data td { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-word; }
table.data tr:last-child th, table.data tr:last-child td { border-bottom: 0; }

details.raw summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 6px 0; }
details.raw pre {
    background: #0f1420; color: #e8ecf5; border-radius: 10px;
    padding: 14px; overflow-x: auto; font-size: 12.5px; margin: 8px 0 0;
}

.note { font-size: 13px; color: var(--muted); margin: 0; }
.note b { color: var(--ink); }

.foot { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 26px; }
.foot a { color: var(--brand); }
