:root {
    color-scheme: light dark;
    --bg: #f7f9fc;
    --surface: #ffffff;
    --surface-2: #eef4f7;
    --text: #17202a;
    --muted: #5b6b7a;
    --line: #d8e1e8;
    --brand: #0f766e;
    --brand-2: #2563eb;
    --accent: #b45309;
    --ok: #15803d;
    --shadow: 0 18px 50px rgba(15, 23, 42, .10);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #101418;
        --surface: #171d23;
        --surface-2: #202932;
        --text: #edf2f7;
        --muted: #a9b6c3;
        --line: #32404c;
        --shadow: 0 18px 50px rgba(0, 0, 0, .28);
    }
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto;
    height: 220px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(15, 118, 110, .10), transparent);
    z-index: -1;
}

a { color: inherit; text-decoration: none; }

.site-header,
.site-footer,
.section,
.hero,
.subhero {
    width: min(1160px, calc(100% - 32px));
    margin-inline: auto;
}

.site-header {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.brand span {
    display: grid;
    line-height: 1.15;
}

.brand strong {
    color: var(--brand);
}

.nav,
.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px 16px;
    color: var(--muted);
    font-size: .94rem;
}

.nav a {
    border-radius: 999px;
    padding: 7px 10px;
}

.nav a:hover {
    background: var(--surface-2);
}

.nav a:hover,
.site-footer a:hover {
    color: var(--brand);
}

.hero {
    min-height: calc(100vh - 160px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
    align-items: center;
    gap: 42px;
    padding: 44px 0 70px;
}

.hero-copy h1,
.subhero h1 {
    margin: 0;
    font-size: clamp(2.4rem, 7vw, 5.8rem);
    line-height: .94;
    letter-spacing: 0;
}

.hero-copy p,
.subhero p {
    max-width: 700px;
    color: var(--muted);
    font-size: 1.15rem;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.hero-actions.compact {
    margin-top: 18px;
}

.btn {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 18px;
    background: var(--surface);
    color: var(--text);
    font-weight: 750;
    cursor: pointer;
}

.btn.primary {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.btn:hover {
    transform: translateY(-1px);
}

.ip-panel,
.diagnostic-panel,
.ad-slot {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.ip-panel {
    padding: 26px;
}

.ip-panel > span {
    display: block;
    margin-bottom: 12px;
    color: var(--muted);
    font-weight: 700;
}

dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

dl div,
.result-list p,
.info-grid article {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--line);
    padding-top: 10px;
}

dt,
.info-grid span,
.tool-card p,
.ad-slot,
.result-list strong {
    color: var(--muted);
}

dd {
    margin: 0;
    text-align: right;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.section {
    padding: 56px 0;
}

.grid-section {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 32px;
    align-items: start;
}

h2 {
    margin: 0 0 20px;
    font-size: clamp(1.55rem, 4vw, 2.4rem);
    line-height: 1.1;
}

.info-grid,
.tool-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.info-grid article,
.tool-card {
    min-height: 120px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 18px;
}

.info-grid article {
    display: grid;
    align-content: space-between;
}

.info-grid strong,
.tool-card span {
    overflow-wrap: anywhere;
    font-size: 1.05rem;
}

.info-grid strong {
    line-height: 1.25;
}

.tool-card {
    transition: border-color .2s ease, transform .2s ease;
}

.tool-card:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
}

.tool-grid.small {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content {
    max-width: 880px;
}

.content p {
    color: var(--muted);
    font-size: 1.03rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.content table {
    display: block;
    overflow-x: auto;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 14px;
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--surface-2);
}

.subhero {
    padding: 58px 0 30px;
}

.tool-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    align-items: start;
}

.diagnostic-panel {
    padding: 24px;
}

.ad-slot {
    padding: 20px;
    box-shadow: none;
}

.ad-slot span {
    display: block;
    color: var(--text);
    font-weight: 800;
}

.lookup-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 800;
}

.lookup-form div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

input {
    min-height: 44px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 14px;
    background: var(--surface-2);
    color: var(--text);
}

.notice {
    border-left: 4px solid var(--accent);
    background: var(--surface-2);
    padding: 12px 14px;
}

.faq details {
    border-top: 1px solid var(--line);
    padding: 16px 0;
}

.faq summary {
    cursor: pointer;
    font-weight: 800;
}

.faq p {
    color: var(--muted);
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    border-top: 1px solid var(--line);
    padding: 34px 0 46px;
    color: var(--muted);
}

.site-footer strong {
    color: var(--text);
}

@media (max-width: 900px) {
    .site-header,
    .site-footer,
    .hero,
    .grid-section,
    .tool-layout {
        grid-template-columns: 1fr;
    }

    .site-header,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-header {
        gap: 14px;
        padding: 16px 0 8px;
    }

    .nav,
    .site-footer nav {
        justify-content: flex-start;
    }

    .nav {
        width: 100%;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        padding: 4px 0 8px;
        scrollbar-width: none;
    }

    .nav::-webkit-scrollbar {
        display: none;
    }

    .nav a {
        flex: 0 0 auto;
        border: 1px solid var(--line);
        background: var(--surface);
        white-space: nowrap;
    }

    .hero {
        min-height: auto;
        gap: 22px;
        padding: 24px 0 34px;
    }

    .hero-copy h1,
    .subhero h1 {
        font-size: clamp(2.35rem, 12vw, 4rem);
        line-height: 1;
    }

    .hero-copy p,
    .subhero p {
        font-size: 1rem;
    }

    .info-grid,
    .tool-grid,
    .tool-grid.small {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .site-header,
    .site-footer,
    .section,
    .hero,
    .subhero {
        width: min(100% - 22px, 1160px);
    }

    body {
        line-height: 1.55;
    }

    .brand {
        gap: 10px;
    }

    .brand img {
        width: 42px;
        height: 42px;
    }

    .brand span {
        font-size: .95rem;
    }

    .hero-copy h1 {
        max-width: 10ch;
    }

    .eyebrow {
        margin-bottom: 8px;
        font-size: .72rem;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 20px;
    }

    .btn {
        width: 100%;
        min-height: 48px;
        padding-inline: 14px;
    }

    .ip-panel,
    .diagnostic-panel,
    .ad-slot,
    .info-grid article,
    .tool-card {
        border-radius: 8px;
    }

    .ip-panel,
    .diagnostic-panel {
        padding: 18px;
    }

    .section {
        padding: 34px 0;
    }

    .grid-section {
        gap: 16px;
    }

    h2 {
        margin-bottom: 14px;
        font-size: 1.55rem;
    }

    .info-grid,
    .tool-grid,
    .tool-grid.small,
    .lookup-form div {
        grid-template-columns: 1fr;
    }

    .info-grid,
    .tool-grid {
        gap: 10px;
    }

    .info-grid article,
    .tool-card {
        min-height: auto;
        padding: 15px;
    }

    .tool-card p {
        margin: 8px 0 0;
    }

    dl div,
    .result-list p {
        display: grid;
        gap: 4px;
    }

    dd {
        text-align: left;
    }

    .lookup-form div {
        gap: 8px;
    }

    .content p {
        font-size: 1rem;
    }

    .site-footer {
        padding: 26px 0 34px;
    }

    th,
    td {
        padding: 10px;
        font-size: .92rem;
    }
}
