:root {
    color-scheme: light;
    --bg: #eef4ff;
    --card: rgba(255, 255, 255, 0.9);
    --card-strong: rgba(255, 255, 255, 0.97);
    --text: #172033;
    --muted: #657086;
    --line: rgba(119, 139, 176, 0.24);
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --good: #15803d;
    --good-soft: #e8f7ed;
    --bad: #b42318;
    --bad-soft: #fff0ee;
    --pending: #8a5b00;
    --pending-soft: #fff6df;
    --shadow: 0 16px 44px rgba(24, 39, 75, 0.12);
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --bg: #0b1220;
        --card: rgba(17, 27, 45, 0.94);
        --card-strong: rgba(20, 31, 51, 0.98);
        --text: #eef3fb;
        --muted: #adb8ca;
        --line: rgba(171, 191, 226, 0.18);
        --accent: #7aa2ff;
        --accent-hover: #9bb8ff;
        --good: #6fda92;
        --good-soft: #163925;
        --bad: #ff9189;
        --bad-soft: #45201f;
        --pending: #ffd16b;
        --pending-soft: #433617;
        --shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
    }
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}


::selection {
    color: #ffffff;
    background: var(--accent);
}

button,
input,
select,
textarea {
    color-scheme: inherit;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 16%, rgba(255, 130, 175, 0.28), transparent 30%),
        radial-gradient(circle at 87% 18%, rgba(84, 210, 255, 0.28), transparent 32%),
        radial-gradient(circle at 78% 84%, rgba(170, 111, 255, 0.22), transparent 34%),
        radial-gradient(circle at 16% 82%, rgba(255, 213, 91, 0.24), transparent 32%),
        linear-gradient(135deg, #f7faff 0%, #eef5ff 48%, #f9f4ff 100%);
}

@media (prefers-color-scheme: dark) {
    body {
        background:
            radial-gradient(circle at 12% 16%, rgba(182, 58, 123, 0.18), transparent 31%),
            radial-gradient(circle at 87% 18%, rgba(34, 134, 207, 0.16), transparent 33%),
            radial-gradient(circle at 78% 84%, rgba(113, 64, 184, 0.15), transparent 35%),
            radial-gradient(circle at 16% 82%, rgba(184, 125, 39, 0.14), transparent 33%),
            linear-gradient(135deg, #0a111e 0%, #0d1727 52%, #111424 100%);
    }
}

.wrap {
    width: min(1080px, calc(100% - 28px));
    margin: 0 auto;
    padding: 38px 0 56px;
}

header {
    margin-bottom: 26px;
}

h1 {
    margin: 0 0 10px;
    color: #2563eb;
    font-size: clamp(2.35rem, 7vw, 4.6rem);
    line-height: 0.95;
    letter-spacing: -0.065em;
}

@media (prefers-color-scheme: dark) {
    h1 {
        color: #7aa2ff;
    }
}

.lead {
    margin: 0;
    max-width: 760px;
    color: var(--muted);
    font-size: 1.05rem;
    font-weight: 520;
}

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

.card {
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.card.full {
    grid-column: 1 / -1;
}

.card h2 {
    margin: 0;
    padding: 18px 20px;
    font-size: 1.05rem;
    background: var(--card-strong);
    border-bottom: 1px solid var(--line);
}

.rows {
    padding: 4px 20px 10px;
}

.row {
    display: grid;
    grid-template-columns: minmax(140px, 0.8fr) minmax(0, 1.6fr);
    align-items: start;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.row:last-child {
    border-bottom: 0;
}

.label {
    color: var(--muted);
}

.value {
    min-width: 0;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.ip-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.status.pending {
    color: var(--pending);
    background: var(--pending-soft);
}

.status.good {
    color: var(--good);
    background: var(--good-soft);
}

.status.bad {
    color: var(--bad);
    background: var(--bad-soft);
}

button.copy {
    border: 1px solid rgba(72, 104, 180, 0.24);
    background: rgba(255, 255, 255, 0.72);
    color: var(--accent);
    border-radius: 9px;
    padding: 5px 9px;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

button.copy:hover:not(:disabled) {
    color: var(--accent-hover);
    background: rgba(255, 255, 255, 0.95);
}

button.copy:disabled {
    opacity: 0.45;
    cursor: default;
}

button.copy:focus-visible,
a:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
    outline-offset: 3px;
}

@media (prefers-color-scheme: dark) {
    button.copy {
        background: rgba(34, 49, 75, 0.9);
    }

    button.copy:hover:not(:disabled) {
        background: rgba(45, 64, 96, 0.98);
    }
}

.ua {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.83rem;
    font-weight: 500;
    line-height: 1.45;
}

.note {
    margin-top: 18px;
    padding: 14px 16px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--card);
    box-shadow: 0 10px 28px rgba(24, 39, 75, 0.08);
}

.note a {
    color: var(--accent);
    font-weight: 650;
}

noscript {
    display: block;
    padding: 14px 16px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: var(--bad-soft);
    color: var(--bad);
}

@media (max-width: 760px) {
    .wrap {
        padding-top: 26px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .card.full {
        grid-column: auto;
    }

    .row {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}

/* Share widget */
.share-section {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    margin: 28px 0 6px;
    text-align: right;
}

.share-widget {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.share-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 7px 17px 7px 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--card-strong);
    color: var(--text);
    box-shadow: 0 13px 34px rgba(24, 39, 75, 0.13);
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.share-main:hover {
    border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
}

.share-main-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    background: var(--accent);
    color: #ffffff;
}

.share-main-icon {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.share-menu {
    position: absolute;
    right: 0;
    left: auto;
    bottom: calc(100% + 13px);
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: calc(100vw - 28px);
    padding: 13px 17px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--card-strong);
    box-shadow: 0 18px 44px rgba(24, 39, 75, 0.2);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(9px) scale(0.97);
    transform-origin: right bottom;
    transition:
        opacity 150ms ease,
        transform 150ms ease,
        visibility 150ms ease;
}

.share-widget.is-open .share-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.share-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #050505;
    color: #ffffff;
    text-decoration: none;
    font: inherit;
    font-size: 1.32rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition:
        transform 140ms ease,
        background 140ms ease;
}

.share-mini:hover {
    background: #1b1b1b;
    color: #ffffff;
    transform: translateY(-2px);
}

.share-facebook {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
}

.share-instagram {
    font-size: 2rem;
    font-weight: 500;
}

.share-tiktok {
    font-size: 1.8rem;
}

.share-linkedin {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.05rem;
    letter-spacing: -0.04em;
}

.share-status {
    min-height: 1.35em;
    margin-top: 7px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 650;
}

.share-main:focus-visible,
.share-mini:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
    outline-offset: 3px;
}

@media (prefers-color-scheme: dark) {
    .share-main,
    .share-menu {
        box-shadow: 0 17px 42px rgba(0, 0, 0, 0.36);
    }
}

@media (max-width: 560px) {
    .share-section {
        justify-content: flex-end;
    }

    .share-menu {
        right: 0;
        left: auto;
        gap: 8px;
        max-width: calc(100vw - 28px);
        padding: 10px 12px;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .share-mini {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
        font-size: 1.16rem;
    }

    .share-facebook {
        font-size: 1.55rem;
    }

    .share-instagram {
        font-size: 1.75rem;
    }

    .share-tiktok {
        font-size: 1.55rem;
    }

    .share-linkedin {
        font-size: 0.95rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .share-menu,
    .share-mini {
        transition: none;
    }
}

/* Primary navigation */
.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.site-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--card);
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 720;
}

.site-nav-link:hover {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
}

.site-nav-link.is-active {
    color: #ffffff;
    border-color: var(--accent);
    background: var(--accent);
}

/* Manual IP lookup */
.lookup-search-card {
    margin-bottom: 18px;
}

.lookup-form {
    padding: 20px;
}

.lookup-label {
    display: block;
    margin-bottom: 9px;
    color: var(--text);
    font-weight: 720;
}

.lookup-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.lookup-input {
    width: 100%;
    min-width: 0;
    height: 50px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    background: var(--card-strong);
    color: var(--text);
    font: inherit;
    font-size: 1rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.lookup-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

.lookup-submit {
    min-height: 50px;
    padding: 0 20px;
    border: 1px solid var(--accent);
    border-radius: 12px;
    background: var(--accent);
    color: #ffffff;
    font: inherit;
    font-weight: 760;
    cursor: pointer;
}

.lookup-submit:hover {
    border-color: var(--accent-hover);
    background: var(--accent-hover);
}

.lookup-help {
    margin: 11px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.lookup-honeypot {
    position: fixed !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.lookup-alert {
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--card);
    font-weight: 650;
    line-height: 1.45;
}

.lookup-alert-error {
    color: var(--bad);
    border-color: color-mix(in srgb, var(--bad) 28%, var(--line));
    background: var(--bad-soft);
}

.lookup-results {
    margin-top: 18px;
}

.lookup-results-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 15px;
    padding: 0 2px;
}

.lookup-results-header h2 {
    margin: 2px 0 0;
    overflow-wrap: anywhere;
    font-size: clamp(1.35rem, 4vw, 2rem);
}

.lookup-eyebrow {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 760;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.lookup-version {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.83rem;
    font-weight: 800;
    white-space: nowrap;
}

.lookup-results-grid {
    align-items: start;
}

.lookup-results-grid .card {
    height: 100%;
}

@media (max-width: 680px) {
    .lookup-control {
        grid-template-columns: 1fr;
    }

    .lookup-submit {
        width: 100%;
    }

    .lookup-results-header {
        flex-direction: column;
        gap: 8px;
    }
}

/* Privacy-preserving approximate OpenStreetMap card */
.lookup-map-card {
    height: auto !important;
}

.lookup-map-content {
    padding: 20px;
}

.lookup-map-privacy {
    margin: 0 0 14px;
    color: var(--text);
    font-weight: 680;
    line-height: 1.5;
}

.lookup-map-load {
    min-height: 46px;
    padding: 0 17px;
    border: 1px solid var(--accent);
    border-radius: 12px;
    background: var(--accent);
    color: #ffffff;
    font: inherit;
    font-weight: 760;
    cursor: pointer;
}

.lookup-map-load:hover {
    border-color: var(--accent-hover);
    background: var(--accent-hover);
}

.lookup-map-third-party-note,
.lookup-map-attribution {
    margin: 11px 0 0;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

.lookup-map-attribution a {
    color: var(--accent);
    font-weight: 680;
}

.lookup-map-frame-wrap {
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--card-strong);
}

.lookup-map-frame {
    display: block;
    width: 100%;
    height: clamp(320px, 52vw, 520px);
    border: 0;
}

@media (max-width: 560px) {
    .lookup-map-load {
        width: 100%;
    }

    .lookup-map-frame {
        height: 360px;
    }
}

/* Main-page one-minute refresh protection */
.refresh-notice {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--text);
    line-height: 1.45;
}

.refresh-notice strong {
    color: var(--accent);
}

.refresh-notice span {
    color: var(--muted);
}

/* IP & DNS lookup */
.lookup-submit:disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

.lookup-alert-info {
    color: var(--text);
    border-color: color-mix(in srgb, var(--accent) 25%, var(--line));
    background: var(--accent-soft);
}

.dns-records-card {
    height: auto !important;
}

.dns-table-wrap {
    width: 100%;
    overflow-x: auto;
    padding: 0 20px 20px;
}

.dns-record-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    table-layout: auto;
}

.dns-record-table th,
.dns-record-table td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.dns-record-table th {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dns-record-table tbody tr:last-child td {
    border-bottom: 0;
}

.dns-type {
    display: inline-flex;
    min-width: 58px;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 850;
}

.dns-name,
.dns-value {
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.dns-value {
    color: var(--text);
    font-weight: 680;
}

.dns-ttl {
    color: var(--muted);
    white-space: nowrap;
}

.dns-scope {
    display: inline-flex;
    margin-left: 6px;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--bad-soft);
    color: var(--bad);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.dns-empty {
    margin: 0;
    padding: 20px;
    color: var(--muted);
    line-height: 1.5;
}

.lookup-inline-note {
    margin: 16px 0 0;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--card);
    color: var(--muted);
    line-height: 1.5;
}

.resolved-addresses {
    margin-top: 26px;
}

.resolved-addresses > h3 {
    margin: 0 0 14px;
    font-size: clamp(1.15rem, 3vw, 1.5rem);
}

.resolved-address-block {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
}

.resolved-address-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 13px;
    padding: 0 2px;
}

.resolved-address-header h4 {
    margin: 0;
    color: var(--text);
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: clamp(1rem, 3vw, 1.3rem);
}

@media (max-width: 680px) {
    .resolved-address-header {
        flex-direction: column;
        gap: 8px;
    }
}

