:root {
    --bg: #f5f6f8;
    --card: #ffffff;
    --text: #1d2330;
    --muted: #6b7280;
    --border: #e2e5ea;
    --accent: #1a8fc4;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #14171c;
        --card: #1d2128;
        --text: #e8eaee;
        --muted: #9aa1ad;
        --border: #2d323b;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, 'Open Sans', sans-serif;
}

main {
    max-width: 760px;
    margin: 0 auto;
    padding: 40px 16px;
}

header {
    text-align: center;
    margin-bottom: 32px;
}

.addresses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 640px) {
    .addresses {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    min-width: 0;
}

.card h2 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent);
}

.card .value {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 3.2em;
}

.ip {
    font: 600 20px/1.3 ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    overflow-wrap: anywhere;
}

.hostname,
.muted {
    color: var(--muted);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.details {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 8px 20px;
    margin: 24px 0 0;
    padding: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.details dt {
    color: var(--muted);
}

.details dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.details .ua {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 13px;
}

@media (max-width: 640px) {
    .details {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .details dd {
        margin-bottom: 10px;
    }
}

footer {
    margin-top: 24px;
    color: var(--muted);
    font-size: 14px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

footer code {
    white-space: nowrap;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 6px;
}

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