/* Rules / Legal hub and document pages */

body[data-page="rules"] {
    background-color: #0A0F14;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(74, 143, 229, 0.12) 0%, transparent 55%),
        linear-gradient(180deg, #0A0F14 0%, #0D1219 100%);
    font-family: 'Inter', sans-serif;
    color: #E8EDF3;
    font-size: 14px;
    line-height: 1.4;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

body[data-page="rules"] .site-footer {
    margin-top: auto;
    background-color: #080C11;
    border-top-color: rgba(255, 255, 255, 0.06);
}

body[data-page="rules"] .site-footer-nav a.site-footer-link--active {
    color: #6EB0FF;
}

body[data-page="rules"] ::selection {
    background: rgba(74, 143, 229, 0.35);
    color: #fff;
}

.rules-page {
    flex: 1;
    min-height: calc(100vh - 120px);
    padding: 1.5rem 1rem 3rem;
}

.rules-container {
    max-width: 820px;
    margin: 0 auto;
}

.rules-container--doc {
    max-width: 720px;
}

.rules-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    font-size: 12px;
    color: #7E8D9F;
}

.rules-breadcrumb a {
    color: #9AA8BA;
    text-decoration: none;
    transition: color 0.15s ease;
}

.rules-breadcrumb a:hover {
    color: #4A8FE5;
}

.rules-breadcrumb span:last-child {
    color: #B8C5D6;
}

.rules-hero {
    margin-bottom: 2rem;
    padding: 1.25rem 1.35rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(74, 143, 229, 0.1) 0%, rgba(19, 25, 35, 0.85) 100%);
    border: 1px solid rgba(74, 143, 229, 0.2);
}

.rules-hero__title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: #F0F4F8;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.rules-hero__lead {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #B8C5D6;
    max-width: 52ch;
}

.rules-section {
    margin-bottom: 2rem;
}

.rules-section:last-child {
    margin-bottom: 0;
}

.rules-section__head {
    margin-bottom: 0.75rem;
}

.rules-section__title {
    margin: 0 0 0.25rem;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.55px;
    text-transform: uppercase;
    color: #6EB0FF;
}

.rules-section__desc {
    margin: 0;
    font-size: 13px;
    color: #9AA8BA;
}

.rules-doc-cards {
    display: grid;
    gap: 0.65rem;
}

.rules-doc-card {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    background: linear-gradient(145deg, rgba(22, 30, 42, 0.98) 0%, rgba(15, 20, 28, 0.98) 100%);
    border: 1px solid rgba(74, 143, 229, 0.18);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.rules-doc-card:hover {
    background: linear-gradient(145deg, rgba(30, 42, 58, 0.98) 0%, rgba(20, 28, 40, 0.98) 100%);
    border-color: rgba(74, 143, 229, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.rules-doc-card__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(74, 143, 229, 0.18);
    border: 1px solid rgba(74, 143, 229, 0.25);
    font-size: 17px;
    line-height: 1;
}

.rules-doc-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 1;
}

.rules-doc-card__title {
    font-size: 14px;
    font-weight: 600;
    color: #F0F4F8;
    line-height: 1.35;
}

.rules-doc-card__desc {
    font-size: 12px;
    line-height: 1.45;
    color: #9AA8BA;
}

.rules-doc-card__arrow {
    flex-shrink: 0;
    align-self: center;
    font-size: 16px;
    color: #6EB0FF;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.rules-doc-card:hover .rules-doc-card__arrow {
    opacity: 1;
    transform: translateX(0);
}

.rules-doc-header {
    margin-bottom: 1.25rem;
    padding: 1.1rem 1.25rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(74, 143, 229, 0.08) 0%, rgba(19, 25, 35, 0.9) 100%);
    border: 1px solid rgba(74, 143, 229, 0.18);
}

.rules-doc-header__section {
    margin: 0 0 0.35rem;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #6EB0FF;
}

.rules-doc-header__title {
    margin: 0;
    font-size: clamp(1.35rem, 3.5vw, 1.75rem);
    font-weight: 700;
    color: #F0F4F8;
    line-height: 1.25;
}

.rules-doc-panel {
    padding: 1.35rem 1.4rem;
    border-radius: 14px;
    background: rgba(16, 22, 31, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.rules-doc-body {
    font-size: 14px;
    line-height: 1.7;
    color: #C5D0DE;
}

.rules-doc-body h2 {
    margin: 1.75rem 0 0.65rem;
    font-size: 15px;
    font-weight: 600;
    color: #F0F4F8;
}

.rules-doc-body h2:first-child {
    margin-top: 0;
}

.rules-doc-body p {
    margin: 0 0 0.85rem;
}

.rules-doc-body ul {
    margin: 0 0 0.95rem;
    padding-left: 1.25rem;
}

.rules-doc-body li {
    margin-bottom: 0.4rem;
    color: #B8C5D6;
}

.rules-doc-body li::marker {
    color: #4A8FE5;
}

.rules-doc-body a {
    color: #6EB0FF;
    text-decoration: none;
    font-weight: 500;
}

.rules-doc-body a:hover {
    color: #8EC4FF;
    text-decoration: underline;
}

.rules-doc-meta {
    margin: 0 0 1.15rem !important;
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    background: rgba(74, 143, 229, 0.12);
    border: 1px solid rgba(74, 143, 229, 0.28);
    font-size: 12px;
    color: #9EC8F5 !important;
}

.rules-doc-nav {
    margin-top: 1.5rem;
}

.rules-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.9rem;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #B8D0FF;
    text-decoration: none;
    background: rgba(74, 143, 229, 0.1);
    border: 1px solid rgba(74, 143, 229, 0.22);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.rules-back-link:hover {
    color: #fff;
    background: rgba(74, 143, 229, 0.18);
    border-color: rgba(74, 143, 229, 0.4);
}

@media (max-width: 600px) {
    .rules-page {
        padding-top: 1rem;
    }

    .rules-hero,
    .rules-doc-header,
    .rules-doc-panel {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .rules-doc-card__arrow {
        opacity: 0.7;
        transform: translateX(0);
    }
}
