:root {
    --bg: #f7f8f4;
    --ink: var(--suite-ink);
    --muted: var(--suite-sub);
    --line: var(--suite-line);
    --card: var(--suite-panel);
    --brand: var(--suite-accent);
    --brand-2: var(--suite-gold);
    --brand-soft: rgba(231, 247, 244, .86);
    --shadow: var(--suite-shadow);
    --rq-panel: var(--gm-panel, rgba(255, 255, 255, .88));
    --rq-panel-strong: var(--gm-panel-strong, rgba(255, 255, 255, .96));
    --rq-panel-soft: var(--gm-panel-soft, rgba(248, 250, 252, .84));
    --rq-control: var(--gm-control, rgba(255, 255, 255, .86));
    --rq-control-hover: var(--gm-control-hover, #f0faf8);
    --rq-accent-soft: var(--gm-accent-soft, rgba(231, 247, 244, .78));
    --rq-radius: 12px;
    --radius: var(--rq-radius);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: var(--suite-font);
    background:
        radial-gradient(circle at 10% -8%, rgba(15, 118, 110, .18), transparent 30rem),
        radial-gradient(circle at 92% 8%, rgba(183, 121, 31, .16), transparent 28rem),
        linear-gradient(135deg, #f7f8f4 0%, #eef1f4 42%, #e7efe9 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(15, 23, 42, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, .03) 1px, transparent 1px);
    background-size: 30px 30px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .85), transparent 88%);
}

a {
    color: inherit;
}

.page {
    position: relative;
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 42px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 14px;
    align-items: stretch;
    margin-bottom: 14px;
}

.hero-main,
.source-panel,
.search-panel,
.result-card,
.empty-card {
    border: 1px solid var(--line);
    background: var(--rq-panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.hero-main {
    overflow: hidden;
    position: relative;
    min-height: 168px;
    padding: 20px;
    border-radius: 16px;
}

.hero-main::after {
    content: none;
}

.eyebrow {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
    padding: 5px 9px;
    border: 1px solid rgba(15, 118, 110, .2);
    border-radius: 999px;
    color: var(--suite-accent-strong);
    background: var(--rq-accent-soft);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
}

h1 {
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: 760px;
    font-size: clamp(24px, 2.8vw, 32px);
    line-height: 1.18;
    letter-spacing: 0;
}

.hero-text {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.source-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 16px;
    padding: 18px;
}

.source-panel h2,
.section-title {
    margin: 0 0 14px;
    font-size: 17px;
}

.source-list {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.source-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--line);
    color: var(--muted);
    font-size: 13px;
}

.source-list strong {
    color: var(--ink);
    font-weight: 700;
    white-space: nowrap;
}

.search-panel {
    margin-bottom: 24px;
    padding: 22px;
    border-radius: 30px;
}

.search-form {
    display: grid;
    grid-template-columns: 1.3fr repeat(4, minmax(130px, .42fr)) auto;
    gap: 12px;
    align-items: end;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.check-option {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 15px;
    color: var(--ink);
    background: var(--rq-control);
}

.check-option input {
    width: 16px;
    min-height: 16px;
    margin: 0;
    accent-color: var(--suite-accent);
}

input,
select,
button {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 15px;
    font: inherit;
}

input,
select {
    width: 100%;
    padding: 0 14px;
    color: var(--ink);
    background: var(--rq-control);
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input:focus,
select:focus {
    border-color: var(--suite-accent);
    background: var(--rq-control);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, .12);
}

button {
    cursor: pointer;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(136, 151, 170, .24);
    border-radius: 8px;
    color: var(--suite-accent-strong);
    background: var(--rq-accent-soft);
    font-weight: 850;
    letter-spacing: 0;
    box-shadow: none;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}

button:hover {
    border-color: rgba(15, 118, 110, .34);
    background: var(--rq-control-hover);
    color: var(--suite-accent-strong);
    transform: translateY(-1px);
}

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

.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 16px;
}

.stat {
    padding: 10px 13px;
    border: 1px solid var(--suite-line);
    border-radius: 999px;
    color: var(--suite-accent-strong);
    background: var(--rq-accent-soft);
    font-size: 13px;
    font-weight: 800;
}

.alert {
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid rgba(182, 90, 42, .25);
    border-radius: 16px;
    color: #783714;
    background: rgba(255, 245, 229, .84);
}

.results {
    display: grid;
    gap: 14px;
}

.result-card {
    overflow: hidden;
    border-radius: var(--radius);
    animation: rise .35s ease both;
}

.result-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.result-title {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.result-title h3 {
    margin: 0;
    font-size: 20px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border-radius: 999px;
    color: var(--brand);
    background: var(--brand-soft);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.id-badge {
    color: #7d3a18;
    background: rgba(255, 219, 185, .8);
}

.matched {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.gm-panel {
    display: grid;
    gap: 10px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--rq-panel-soft);
}

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

.gm-copy {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(136, 151, 170, .24);
    border-radius: 8px;
    color: var(--suite-accent-strong);
    background: var(--rq-control);
    box-shadow: none;
    font-size: 13px;
    letter-spacing: 0;
}

.gm-copy:hover {
    border-color: rgba(15, 118, 110, .34);
    background: var(--rq-control-hover);
    box-shadow: none;
}

.gm-copy.copied {
    border-color: rgba(15, 118, 110, .42);
    color: var(--suite-accent-strong);
    background: var(--rq-accent-soft);
}

.gm-command {
    display: block;
    overflow-x: auto;
    padding: 10px 12px;
    border: 1px solid var(--suite-line);
    border-radius: 12px;
    color: var(--suite-ink);
    background: var(--rq-control);
    font-family: "Cascadia Code", "Consolas", monospace;
    font-size: 13px;
    white-space: nowrap;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    padding: 16px 20px 18px;
}

.summary-item,
.detail-item {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--rq-panel-soft);
}

.field-label {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.field-value {
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.55;
}

details {
    border-top: 1px solid var(--line);
    background: transparent;
}

summary {
    cursor: pointer;
    padding: 13px 20px;
    color: var(--suite-accent-strong);
    font-weight: 900;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    padding: 0 20px 20px;
}

.empty-card {
    padding: 24px;
    border-radius: var(--radius);
    color: var(--muted);
    line-height: 1.8;
}

.empty-card strong {
    color: var(--ink);
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 980px) {
    .hero,
    .search-form {
        grid-template-columns: 1fr;
    }

    .hero-main {
        min-height: auto;
    }
}

@media (max-width: 640px) {
    .page {
        width: min(100% - 20px, 1120px);
        padding-top: 12px;
    }

    .hero-main,
    .source-panel,
    .search-panel {
        border-radius: 22px;
        padding: 18px;
    }

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