:root {
    color-scheme: dark light;
    --bg: oklch(98% 0.004 250);
    --ink: oklch(17% 0.018 250);
    --muted: oklch(45% 0.02 250);
    --line: oklch(88% 0.012 250);
    --panel: oklch(100% 0 0);
    --panel-soft: oklch(95.5% 0.011 250);
    --night: oklch(12% 0.018 245);
    --night-2: oklch(16% 0.022 245);
    --cyan: oklch(74% 0.16 230);
    --blue: oklch(60% 0.2 255);
    --green: oklch(62% 0.17 150);
    --red: oklch(63% 0.23 28);
    --shadow: 0 8px 18px oklch(20% 0.02 250 / 0.08);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
}

a {
    color: oklch(56% 0.23 257);
}

.topbar {
    background: oklch(8% 0.014 245);
    color: white;
}

.topbar__inner {
    width: min(1120px, calc(100% - 32px));
    height: 112px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 48px;
    padding-top: 34px;
}

.brand {
    color: oklch(88% 0.16 96);
    text-decoration: none;
    font-size: 29px;
    line-height: 1;
    letter-spacing: 0;
    flex: 0 0 auto;
}

.nav {
    display: flex;
    gap: 34px;
    align-items: center;
    flex-wrap: wrap;
    flex: 1;
}

.nav__link {
    color: white;
    text-decoration: none;
    font-size: 14px;
    line-height: 24px;
}

.nav__link--active {
    color: var(--cyan);
}

.nav__link span {
    color: red;
    font-size: 12px;
    margin-left: 1px;
}

.topbar__note {
    color: red;
    font-weight: 800;
    font-size: 28px;
    white-space: nowrap;
}

.search-band {
    background: var(--night);
    min-height: 520px;
    display: grid;
    place-items: start center;
    padding: 92px 16px 210px;
}

.search-panel {
    width: min(700px, 100%);
    text-align: center;
}

.search-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 18px;
    margin-bottom: 18px;
}

.pin {
    width: 18px;
    height: 18px;
    border: 3px solid oklch(78% 0.01 250);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    position: relative;
}

.pin::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: oklch(78% 0.01 250);
    top: 3px;
    left: 3px;
}

.search-form {
    display: grid;
    gap: 16px;
    justify-items: center;
}

.search-form input {
    width: 100%;
    height: 60px;
    border: 1px solid var(--cyan);
    background: oklch(9% 0.018 245);
    color: var(--cyan);
    border-radius: 8px;
    font-size: 26px;
    text-align: center;
    outline: none;
}

.search-form input:focus {
    border-color: oklch(82% 0.16 225);
    box-shadow: 0 0 0 3px oklch(74% 0.16 230 / 0.18);
}

.search-form button,
.ghost-button {
    min-width: 100px;
    height: 40px;
    border: 1px solid var(--cyan);
    color: var(--cyan);
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 650;
}

.search-form button:hover,
.ghost-button:hover {
    background: oklch(74% 0.16 230 / 0.1);
}

.status-text {
    min-height: 22px;
    color: oklch(78% 0.018 245);
    font-size: 14px;
}

.result-wrap {
    width: min(1120px, calc(100% - 32px));
    margin: -240px auto 56px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 20px;
    align-items: start;
}

.result-card,
.side-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.result-card__head {
    min-height: 54px;
    background: linear-gradient(90deg, oklch(92% 0.035 250), oklch(97% 0.012 285));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 16px;
}

.result-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), oklch(82% 0.18 95));
}

.ghost-button {
    min-width: 80px;
    height: 28px;
    border-color: oklch(58% 0.24 262);
    color: oklch(52% 0.24 262);
    background: white;
    font-size: 12px;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.result-table th,
.result-table td {
    min-height: 48px;
    padding: 15px 18px;
    border-top: 1px solid var(--line);
    font-size: 14px;
    vertical-align: middle;
}

.result-table th {
    width: 220px;
    text-align: center;
    font-weight: 500;
    background: oklch(98% 0.002 250);
    border-right: 1px solid var(--line);
}

.result-table tr:nth-child(even) td,
.result-table tr:nth-child(even) th {
    background: var(--panel-soft);
}

.result-table td {
    text-align: center;
    overflow-wrap: anywhere;
}

.tag,
.pill,
.flag {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    background: var(--green);
    margin-right: 8px;
}

.flag {
    background: var(--red);
}

.pill {
    margin: 0;
    min-height: 26px;
    background: oklch(56% 0.18 154);
}

.side-panel {
    padding: 18px;
    display: grid;
    gap: 18px;
}

.side-panel h2 {
    margin: 0 0 8px;
    font-size: 16px;
}

.side-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.source-list {
    margin: 0;
    display: grid;
    gap: 10px;
}

.source-list div {
    display: grid;
    gap: 3px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.source-list dt {
    font-size: 13px;
    font-weight: 750;
}

.source-list dd {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.api-box {
    display: grid;
    gap: 6px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.api-box span {
    font-size: 13px;
    font-weight: 750;
}

.api-box code {
    display: block;
    color: oklch(43% 0.19 257);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.empty-state {
    padding: 24px;
    color: var(--muted);
}

@media (max-width: 900px) {
    .topbar__inner {
        height: auto;
        min-height: 126px;
        align-items: flex-start;
        gap: 18px;
        flex-wrap: wrap;
        padding: 24px 0;
    }

    .nav {
        order: 3;
        width: 100%;
        gap: 16px 22px;
    }

    .topbar__note {
        margin-left: auto;
        font-size: 20px;
    }

    .search-band {
        padding-top: 68px;
    }

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

@media (max-width: 620px) {
    .topbar__inner,
    .result-wrap {
        width: min(100% - 20px, 1120px);
    }

    .search-form input {
        height: 54px;
        font-size: 21px;
    }

    .result-card__head {
        align-items: stretch;
        flex-direction: column;
    }

    .ghost-button {
        width: 100%;
    }

    .result-table,
    .result-table tbody,
    .result-table tr,
    .result-table th,
    .result-table td {
        display: block;
        width: 100%;
    }

    .result-table th {
        text-align: left;
        border-right: 0;
        padding-bottom: 6px;
    }

    .result-table td {
        text-align: left;
        padding-top: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
