* { box-sizing: border-box; }

:root {
    --bg: #f6f7f9;
    --text: #17202a;
    --muted: #5f6b7a;
    --card: #ffffff;
    --border: #d8dee8;
    --accent: #0d6efd;
    --accent-dark: #0a58ca;
    --nav: #212529;
    --nav-hover: #343a40;
    --danger: #c62828;
    --good: #177245;
    --warn: #9a6700;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--nav);
    color: #ffffff;
}

.header-container {
    display: flex;
    width: min(1100px, calc(100% - 32px));
    min-height: 62px;
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.app-name {
    color: #adb5bd;
    font-size: 0.92rem;
}

.menu-toggle {
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 6px;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
    background: var(--nav-hover);
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
    display: block;
    width: 21px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.menu-icon {
    position: relative;
}

.menu-icon::before,
.menu-icon::after {
    position: absolute;
    left: 0;
    content: '';
}

.menu-icon::before { top: -7px; }
.menu-icon::after { top: 7px; }

.main-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: max(20px, calc((100% - 1100px) / 2 + 22px));
    width: min(330px, calc(100vw - 32px));
    max-height: calc(100vh - 88px);
    overflow-y: auto;
    border: 1px solid #343a40;
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: var(--nav);
    box-shadow: 0 8px 28px rgba(23, 32, 42, 0.06);
}

.main-menu.active {
    display: block;
}

.main-menu ul {
    margin: 0;
    padding: 8px;
    list-style: none;
}

.main-menu a,
.submenu-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    text-align: left;
    text-decoration: none;
}

.main-menu a:hover,
.main-menu a:focus-visible,
.submenu-toggle:hover,
.submenu-toggle:focus-visible {
    background: var(--nav-hover);
    outline: none;
}

.submenu-chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}

.menu-group.open > .submenu-toggle .submenu-chevron {
    transform: rotate(225deg);
}

.submenu {
    display: none;
    margin: 0 0 5px 12px !important;
    padding: 3px 0 3px 10px !important;
    border-left: 2px solid rgba(255, 255, 255, 0.28);
}

.menu-group.open .submenu {
    display: block;
}

.submenu a {
    font-size: 0.94rem;
}

.page {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
}

.hero {
    text-align: center;
    margin-bottom: 28px;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    color: var(--muted);
    font-weight: 700;
}

h1 {
    margin: 18px 0 10px;
    font-size: clamp(2.2rem, 6vw, 4.4rem);
    line-height: 1;
}

.hero p {
    max-width: 760px;
    margin: 0 auto 26px;
    color: var(--muted);
    font-size: 1.1rem;
}

.checker-form {
    max-width: 720px;
    margin: 0 auto;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.input-row {
    display: flex;
    gap: 10px;
}

input {
    flex: 1;
    padding: 15px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
}

button, .button-link {
    border: 0;
    border-radius: 12px;
    padding: 15px 18px;
    background: var(--accent);
    color: white;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

button:hover, .button-link:hover { background: var(--accent-dark); }

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

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 8px 28px rgba(23, 32, 42, 0.06);
}

.card h2 { margin-top: 0; }

.score {
    font-size: 4rem;
    font-weight: 900;
    color: var(--accent);
}

.score span {
    font-size: 1.4rem;
    color: var(--muted);
}

.candidate {
    font-size: 1.4rem;
    font-weight: 900;
}

.status { font-weight: 900; }
.status.good { color: var(--good); }
.status.warn { color: var(--warn); }
.status.bad { color: var(--danger); }
.status.manual { color: var(--muted); }

.api-card code {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    padding: 10px 12px;
    background: #eef1f5;
    border-radius: 10px;
}

.copy-btn {
    margin-left: 8px;
    padding: 10px 12px;
}

.disclaimer { margin-top: 18px; }
.error { border-color: #f3b2ac; }

@media (max-width: 760px) {
    .input-row, .results-grid {
        grid-template-columns: 1fr;
        display: grid;
    }
    .input-row { gap: 12px; }
    .app-name { display: none; }
}

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

.result-list {
    display: grid;
    gap: 12px;
}

.company-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
}

.company-row:first-child {
    border-top: 0;
}

.company-row strong {
    display: block;
    font-size: 1.05rem;
}

.company-row p {
    margin: 6px 0 0;
    color: var(--muted);
}

.company-meta {
    min-width: 160px;
    text-align: right;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.warn-box {
    border-left: 4px solid var(--warn);
}

@media (max-width: 720px) {
    .company-row {
        flex-direction: column;
    }

    .company-meta {
        min-width: 0;
        text-align: left;
    }
}
