:root {
    --primary: #ffb11a;
    --primary-hover: #e69f15;
    --accent-green: #00c087;
    --bg-dark: #0e1116;
    --bg-card: #1e2329;
    --bg-card-hover: #2b3139;
    --text-main: #ffffff;
    --text-muted: #c9d1d9;
    --border: #2b3139;
    --container-w: 1140px;
    --radius: 16px;
}

/* --- GLOBAL RESET --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-dark);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-align: center;
    line-height: 1;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary);
    color: #000;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    background-color: rgba(255, 255, 255, 0.05);
}

.btn-sm {
    padding: 9px 14px;
    font-size: 13px;
    border-radius: 12px;
}

.btn-cta {
    font-weight: 600;
}

.btn-full {
    width: 100%;
    display: flex;
}

/* --- BREADCRUMBS --- */
.breadcrumbs {
    font-size: 14px;
    color: var(--text-muted);
    margin: 30px 0;
}

.breadcrumbs a:hover {
    color: var(--primary);
}

/* --- HEADER --- */
.header {
    background: var(--bg-dark);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 0;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: 800;
    font-size: 42px;
    letter-spacing: -0.5px;
}

.logo img {
    height: 36px;
    width: auto;
    margin-right: 10px;
}

.logo-text_1 {
    color: #ffffff;
}

.logo-text_2 {
    color: var(--primary);
}

.nav a {
    color: var(--text-muted);
    margin-left: 24px;
    font-size: 15px;
    font-weight: 500;
}

.nav a:hover {
    color: var(--primary);
}

/* Burger Menu Icon */
.burger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    cursor: pointer;
}

.burger span {
    width: 100%;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: 0.3s;
}

/* --- HERO SECTION (Common) --- */
.hero {
    padding: 80px 20px 60px;
    text-align: center;
}

.hero h1 {
    font-size: 42px;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 800;
}

.subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 780px;
    margin: 0 auto 26px;
}

.hero-tags {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-tags span {
    background: rgba(255, 177, 26, 0.1);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(255, 177, 26, 0.2);
}

.hero-actions {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* --- TOP RATING CARDS (Common) --- */
.top-rating {
    padding: 40px 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 34px;
}

.section-header h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-muted);
}

.section-note {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-muted);
    opacity: 0.85;
}

.rating-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rating-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: grid;
    grid-template-columns: 320px 1fr 180px;
    gap: 18px;
    align-items: center;
    transition: transform 0.2s, border-color 0.2s;
}

.rating-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.rating-rank {
    font-size: 24px;
    font-weight: 900;
    color: var(--text-muted);
    width: auto;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.rating-item:first-child .rating-rank {
    color: var(--primary);
}

.rating-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rating-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rating-name h3 {
    font-size: 20px;
    margin: 0;
}

.exch-logo {
    width: 100px;
    height: 40px;
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    width: fit-content;
}

.best-badge {
    background: rgba(0, 192, 135, 0.15);
    color: var(--accent-green);
}

.simple-badge {
    background: rgba(132, 142, 156, 0.15);
    color: var(--text-muted);
}

.rating-features {
    padding: 0 22px;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
}

.rating-features ul {
    display: grid;
    gap: 10px;
}

.rating-features li {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 14px;
    align-items: baseline;
    font-size: 14px;
    color: var(--text-muted);
}

.feat-label {
    color: var(--text-muted);
    opacity: 0.95;
}

.feat-val {
    color: var(--text-main);
    font-weight: 700;
}

.rating-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.rating-actions .btn {
    width: 100%;
}

.center-link {
    text-align: center;
    margin-top: 30px;
}

.text-link {
    color: var(--primary);
    font-weight: 600;
    border-bottom: 1px dashed var(--primary);
}

.text-link:hover {
    border-bottom-style: solid;
}

/* --- SCENARIO LIST (Common) --- */
.scenario-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.scenario-item {
    background: linear-gradient(180deg, rgba(30, 35, 41, 0.95) 0%, rgba(30, 35, 41, 0.7) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 16px;
    align-items: start;
    transition: transform 0.2s, border-color 0.2s;
}

.scenario-item:hover {
    border-color: rgba(255, 177, 26, 0.55);
    transform: translateY(-2px);
}

.scenario-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 22px;
    background: rgba(255, 177, 26, 0.10);
    border: 1px solid rgba(255, 177, 26, 0.22);
    color: var(--primary);
}

.scenario-content h3 {
    font-size: 16px;
    line-height: 1.35;
    margin-bottom: 8px;
}

.scenario-content p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin: 20px 0;
}

.scenario-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.scenario-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 600;
}

.scenario-links a:hover {
    border-color: rgba(255, 177, 26, 0.55);
    color: var(--primary);
}

/* --- FAQ (Common) --- */
.faq {
    padding: 60px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.faq h2 {
    text-align: center;
    margin-bottom: 30px;
}

.faq-grid details {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-grid summary {
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-main);
}

.faq-grid summary::-webkit-details-marker {
    display: none;
}

.faq-grid summary::after {
    content: '+';
    font-size: 24px;
    font-weight: 300;
    color: var(--primary);
    transition: transform 0.3s;
}

.faq-grid details[open] summary::after {
    transform: rotate(45deg);
}

.faq-content {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

/* --- FOOTER --- */
.footer {
    background: #090b0e;
    padding: 60px 0 40px;
    margin-top: 60px;
    border-top: 1px solid var(--border);
}

.footer-top {
    display: flex;
    justify-content: space-around;
}

.footer-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.footer-logo {
    width: auto;
    height: 60px;
    margin-bottom: 20px;
    opacity: 0.8;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-nav a {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-nav a:hover {
    color: var(--primary);
}

.footer-bottom .note {
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0.75;
    max-width: 900px;
    margin: 0 auto 18px;
    line-height: 1.5;
}

.footer-bottom .note a {
    color: var(--text-main);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
}

.footer-bottom .note a:hover {
    border-bottom-style: solid;
}

.footer-bottom .copyright {
    font-size: 13px;
    color: #b8c2cc;
}

/* --- MEDIA QUERIES (Global & Layouts) --- */

@media (max-width: 900px) {

    /* Rating Card Mobile */
    .rating-item {
        grid-template-columns: 1fr;
        gap: 14px;
        align-items: stretch;
        position: relative;
    }

    .rating-rank {
        position: absolute;
        top: 18px;
        right: 18px;
        font-size: 28px;
    }

    .rating-features {
        border: none;
        padding: 14px;
        background: rgba(255, 255, 255, 0.02);
        border-radius: 12px;
    }

    .rating-features li {
        grid-template-columns: 160px 1fr;
    }

    .rating-actions {
        flex-direction: row;
        width: 100%;
    }

    .rating-actions .btn {
        flex: 1;
    }

    /* Scenario Mobile */
    .scenario-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    /* Header/Menu Mobile */
    .header-flex {
        position: relative;
    }

    .burger {
        display: flex;
    }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        padding: 14px 0;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    }

    .nav a {
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 14px 20px;
        font-size: 18px;
        font-weight: 700;
        min-height: 48px;
        line-height: 1.2;
        letter-spacing: 0.2px;
    }

    .nav a:active {
        background: rgba(255, 255, 255, 0.04);
    }

    #menu-toggle:checked~.nav {
        display: block;
    }

    #menu-toggle:checked+.burger span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    #menu-toggle:checked+.burger span:nth-child(2) {
        opacity: 0;
    }

    #menu-toggle:checked+.burger span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Hero Mobile */
    .hero {
        padding: 20px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .subtitle {
        font-size: 16px;
    }

    /* Footer Mobile */
    .footer-nav {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 520px) {
    .rating-actions {
        flex-direction: column;
    }

    .rating-features li {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .feat-label {
        font-size: 12px;
        opacity: 0.85;
    }
}

/* ===== FIX: global score-circle обратно в круг (для всех страниц) ===== */
.score-circle {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 177, 26, 0.55);
    background: rgba(255, 177, 26, 0.08);
}

.score-val {
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
    color: var(--text-main);
}

.score-max {
    font-size: 12px;
    margin-top: -6px;
    color: var(--text-muted);
}