:root {
    color-scheme: light;
    --blue: #1f6fb2;
    --blue-dark: #15527f;
    --blue-soft: #f8fbff;
    --blue-line: #d8e5f2;
    --button: #2f80d8;
    --button-hover: #1f6fb2;
    --text: #444;
    --muted: #777;
    --line: #ddd;
    --page-bg: #f4f4f4;
    --surface: #fff;
    --success: #2d7d22;
    --success-bg: #efffed;
    --success-line: #6ac45b;
    --warning: #946100;
    --warning-bg: #fff8e5;
    --warning-line: #f5a623;
    --danger: #b52b27;
    --danger-bg: #fff0f0;
    --danger-line: #d9534f;
    font-family: Tahoma, Arial, Helvetica, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text);
    font-family: Tahoma, Arial, Helvetica, sans-serif;
    line-height: 1.75;
}

a {
    color: var(--blue);
}

.header {
    background: var(--blue);
    color: #fff;
    border-bottom: 4px solid var(--blue-dark);
}

.header-inner,
.page,
.footer {
    width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.header-inner {
    padding: 22px 0;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    line-height: 1.2;
    direction: ltr;
    text-align: left;
}

.logo span {
    color: #cde8ff;
}

.nav {
    margin-top: 14px;
    direction: ltr;
    text-align: left;
}

.nav a {
    color: #fff;
    text-decoration: none;
    margin-right: 18px;
    font-size: 14px;
}

.nav a:hover {
    text-decoration: underline;
}

.page {
    display: flex;
    gap: 22px;
    align-items: flex-start;
    direction: ltr;
    margin-top: 22px;
    margin-bottom: 22px;
}

.content {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 26px;
    flex: 1;
    min-width: 0;
    direction: ltr;
}

.sidebar {
    width: 250px;
    flex: 0 0 250px;
    direction: ltr;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    color: #246fa8;
    font-size: 28px;
    line-height: 1.45;
    margin-bottom: 10px;
}

h2 {
    color: #246fa8;
    font-size: 23px;
    line-height: 1.35;
    margin-bottom: 5px;
    direction: ltr;
    text-align: left;
}

h3 {
    color: #1f75bd;
    font-size: 16px;
    margin: 0 0 14px;
}

.lead {
    color: #555;
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 22px;
}

.whois-panel {
    background: #fff;
    border: 1px solid #2f80ed;
    border-radius: 3px;
    margin-bottom: 22px;
}

.whois-panel-title {
    background: #4f91e8;
    color: #fff;
    padding: 13px 18px;
    font-size: 15px;
    font-weight: bold;
}

.whois-form-box {
    padding: 18px;
}

.search label {
    display: block;
    color: #555;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 9px;
}

.search-row {
    display: flex;
    gap: 10px;
}

input[type="text"] {
    width: 100%;
    min-width: 0;
    flex: 1;
    border: 1px solid #999;
    border-radius: 3px;
    background: #fff;
    padding: 8px 10px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 28px;
    direction: ltr;
    text-align: left;
}

.btn,
button {
    background: var(--button);
    color: #fff;
    border: 1px solid #2f80ed;
    border-radius: 3px;
    padding: 0 22px;
    font-size: 16px;
    cursor: pointer;
    white-space: nowrap;
}

.btn:hover,
button:hover {
    background: var(--button-hover);
}

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

.box-title {
    background: var(--button);
    color: #fff;
    padding: 11px 14px;
    font-size: 15px;
    font-weight: bold;
}

.box-body {
    padding: 14px;
    font-size: 14px;
    line-height: 1.65;
}

.box-body a {
    display: block;
    color: #1f75bd;
    text-decoration: none;
    margin-bottom: 10px;
}

.box-body a:hover {
    text-decoration: underline;
}

.error-msg,
.success-msg,
.warning-msg,
.result-head,
.empty-state,
.raw {
    margin-top: 18px;
    border-radius: 4px;
}

.error-msg {
    background: var(--danger-bg);
    border: 1px solid var(--danger-line);
    color: var(--danger);
    padding: 15px;
}

.message-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 6px;
}

.error-msg p {
    margin-bottom: 8px;
}

.message-link {
    display: inline-block;
    color: var(--danger);
    font-weight: bold;
    margin-bottom: 10px;
    overflow-wrap: anywhere;
}

.message-details {
    margin-top: 8px;
}

.message-details summary {
    cursor: pointer;
    font-weight: bold;
}

.message-details div {
    margin-top: 8px;
    direction: ltr;
    text-align: left;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(217, 83, 79, 0.3);
    border-radius: 4px;
    padding: 10px;
    overflow-wrap: anywhere;
}

.message-details a {
    color: inherit;
    display: inline-block;
    direction: ltr;
    font-weight: bold;
    unicode-bidi: embed;
}

.result-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    border: 1px solid var(--blue-line);
    background: var(--blue-soft);
    padding: 18px;
}

.eyebrow {
    color: #1f75bd;
    font-size: 13px;
    font-weight: bold;
    margin: 0 0 4px;
}

.fetched {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 0;
}

.badge,
.chip {
    display: inline-block;
    border-radius: 12px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: bold;
    line-height: 1.4;
}

.badge-good,
.metric-good {
    background: var(--success-bg);
    color: var(--success);
    border-color: var(--success-line);
}

.badge-warning,
.metric-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: var(--warning-line);
}

.badge-danger,
.metric-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: var(--danger-line);
}

.badge-muted,
.metric-muted {
    background: #f7f7f7;
    color: var(--muted);
}

.metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.metric {
    border: 1px solid var(--blue-line);
    background: var(--blue-soft);
    border-radius: 4px;
    padding: 15px;
    min-height: 138px;
}

.metric span,
.metric small {
    display: block;
}

.metric span {
    color: var(--muted);
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 8px;
}

.metric strong {
    display: block;
    color: #1f75bd;
    font-size: 20px;
    line-height: 1.35;
    margin-bottom: 8px;
    overflow-wrap: break-word;
}

.metric-good strong,
.metric-warning strong,
.metric-danger strong,
.metric-muted strong {
    color: inherit;
}

.metric small {
    color: inherit;
    opacity: 0.88;
    line-height: 1.55;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 18px;
}

.facts {
    margin: 0;
}

.facts div {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 12px;
    padding: 9px 0;
    border-top: 1px solid var(--line);
}

.facts div:first-child {
    border-top: 0;
}

dt {
    color: var(--muted);
    font-weight: bold;
}

dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    background: #e8f3ff;
    color: #1f75bd;
    direction: ltr;
}

.list {
    margin: 0;
    padding: 0 0 0 20px;
}

.list li {
    margin-bottom: 8px;
    overflow-wrap: anywhere;
}

.empty,
.empty-state p {
    color: var(--muted);
    margin-bottom: 0;
}

.empty-state {
    border: 1px solid var(--blue-line);
    background: var(--blue-soft);
    padding: 18px;
}

.raw {
    border: 1px solid var(--line);
    background: #fff;
    overflow: hidden;
}

.raw summary {
    cursor: pointer;
    font-weight: bold;
    padding: 14px 18px;
}

.raw pre {
    direction: ltr;
    text-align: left;
    white-space: pre-wrap;
    overflow-x: auto;
    margin: 0;
    padding: 12px;
    border-top: 1px solid var(--line);
    background: #f7f7f7;
    color: #333;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.6;
}

.footer {
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    margin-bottom: 40px;
}

@media (max-width: 1000px) {
    .header-inner,
    .page,
    .footer {
        width: auto;
        margin-left: 12px;
        margin-right: 12px;
    }

    .page {
        display: block;
    }

    .sidebar {
        width: auto;
        margin-top: 18px;
    }
}

@media (max-width: 720px) {
    .content {
        padding: 18px;
    }

    .search-row,
    .result-head,
    .metrics,
    .details-grid {
        display: block;
    }

    .search-row input {
        margin-bottom: 10px;
    }

    .search-row .btn {
        width: 100%;
        min-height: 44px;
    }

    input[type="text"] {
        font-size: 20px;
    }

    .metric,
    .panel {
        margin-top: 12px;
    }

    .facts div {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}
