/* Rules page */

.rules-page {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rules-hero {
    position: relative;
    min-height: 265px;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    border: 1px solid #465469;
    border-radius: 10px;
    background:
        radial-gradient(
            circle at 84% 35%,
            rgba(211, 83, 83, .18),
            transparent 32%
        ),
        linear-gradient(
            145deg,
            rgba(29, 48, 65, .99),
            rgba(15, 29, 42, .99)
        );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .045),
        0 7px 24px rgba(0, 0, 0, .18);
}

.rules-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .09;
    background:
        url("/assets/images/header-bg.png")
        center / cover no-repeat;
}

.rules-hero__content {
    position: relative;
    z-index: 2;
    align-self: center;
    padding: 1.8rem 2rem;
}

.rules-hero__eyebrow {
    display: block;
    color: #dc7777;
    font-size: .55rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.rules-hero h1 {
    margin: .35rem 0 0;
    color: #fff;
    font-size: clamp(1.8rem, 3.5vw, 2.9rem);
    font-weight: 900;
    letter-spacing: -.04em;
    line-height: 1;
}

.rules-hero__content > p {
    max-width: 700px;
    margin: .72rem 0 0;
    color: #98aab6;
    font-size: .73rem;
    font-weight: 700;
    line-height: 1.6;
}

.rules-hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 1.2rem;
}

.rules-hero__stats > div {
    min-width: 120px;
    padding: .62rem .75rem;
    border: 1px solid #3b566a;
    border-radius: 7px;
    background: rgba(5, 22, 35, .47);
}

.rules-hero__stats strong {
    display: block;
    color: #fff;
    font-size: .9rem;
    font-weight: 900;
}

.rules-hero__stats span {
    display: block;
    margin-top: .12rem;
    color: #718898;
    font-size: .43rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.rules-hero__visual {
    position: relative;
    z-index: 2;
    min-height: 265px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rules-hero__ring {
    position: absolute;
    width: 215px;
    height: 215px;
    border: 1px solid rgba(217, 105, 105, .2);
    border-radius: 50%;
    background: rgba(217, 105, 105, .04);
}

.rules-hero__shield {
    position: relative;
    z-index: 2;
    width: 98px;
    height: 112px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #d76565;
    border-radius: 45px 45px 55px 55px;
    background:
        linear-gradient(
            145deg,
            rgba(197, 78, 78, .28),
            rgba(85, 28, 35, .4)
        );
    box-shadow:
        0 10px 18px rgba(0, 0, 0, .3),
        0 0 22px rgba(211, 83, 83, .18);
}

.rules-hero__shield span {
    color: #ffd2d2;
    font-size: 2.5rem;
    font-weight: 900;
}

.rules-hero__label {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    z-index: 3;
    min-width: 165px;
    padding: .65rem .7rem;
    border: 1px solid #76434b;
    border-radius: 7px;
    background: rgba(5, 22, 35, .88);
    backdrop-filter: blur(7px);
}

.rules-hero__label span {
    display: block;
    color: #966b72;
    font-size: .42rem;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.rules-hero__label strong {
    display: block;
    margin-top: .12rem;
    color: #eda0a0;
    font-size: .58rem;
    font-weight: 900;
}

/* Category navigation */

.rules-category-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
}

.rules-category-nav a {
    min-width: 0;
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .65rem .75rem;
    border: 1px solid #344f63;
    border-radius: 7px;
    background: rgba(20, 38, 53, .9);
    text-decoration: none;
    transition:
        transform .15s ease,
        border-color .15s ease,
        background .15s ease;
}

.rules-category-nav a:hover {
    transform: translateY(-2px);
    border-color: #5084a1;
    background: rgba(43, 111, 146, .13);
}

.rules-category-nav__number {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #3d708b;
    border-radius: 6px;
    background: rgba(47, 145, 193, .09);
    color: #6ebfe5;
    font-size: .53rem;
    font-weight: 900;
}

.rules-category-nav a > span:last-child {
    min-width: 0;
}

.rules-category-nav strong,
.rules-category-nav small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rules-category-nav strong {
    color: #e8eff3;
    font-size: .58rem;
    font-weight: 900;
}

.rules-category-nav small {
    margin-top: .14rem;
    color: #718797;
    font-size: .44rem;
    font-weight: 700;
}

/* Main layout */

.rules-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    align-items: start;
    gap: 1rem;
}

.rules-content,
.rules-sidebar {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rules-section {
    scroll-margin-top: 1rem;
    overflow: hidden;
    border: 1px solid #304a5d;
    border-radius: 9px;
    background:
        linear-gradient(
            145deg,
            rgba(27, 45, 61, .98),
            rgba(15, 29, 42, .99)
        );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .035),
        0 5px 18px rgba(0, 0, 0, .15);
}

.rules-section__header {
    min-height: 83px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: .8rem;
    padding: .85rem 1rem;
    border-bottom: 1px solid #304a5d;
    background: rgba(7, 24, 38, .32);
}

.rules-section__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #3b6e89;
    border-radius: 7px;
    background: rgba(47, 145, 193, .09);
    color: #69bde5;
    font-size: .62rem;
    font-weight: 900;
}

.rules-section__header > div:nth-child(2) {
    min-width: 0;
}

.rules-section__header span {
    display: block;
    color: #718999;
    font-size: .42rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.rules-section__header h2 {
    margin: .13rem 0 0;
    color: #fff;
    font-size: .82rem;
    font-weight: 900;
}

.rules-section__header p {
    overflow: hidden;
    margin: .18rem 0 0;
    color: #748998;
    font-size: .49rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rules-section__header > strong {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #3b6e89;
    border-radius: 999px;
    color: #6abde5;
    font-size: .5rem;
    font-weight: 900;
}

.rules-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
    padding: .75rem;
}

.rule-item {
    min-width: 0;
    min-height: 88px;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: start;
    gap: .6rem;
    padding: .7rem;
    border: 1px solid #324d61;
    border-radius: 7px;
    background: rgba(6, 22, 35, .38);
    transition:
        transform .15s ease,
        border-color .15s ease,
        background .15s ease;
}

.rule-item:hover {
    transform: translateY(-1px);
    border-color: #487f9d;
    background: rgba(47, 145, 193, .07);
}

.rule-item > span {
    min-height: 29px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #3c6d87;
    border-radius: 5px;
    background: rgba(47, 145, 193, .09);
    color: #6bbce3;
    font-size: .46rem;
    font-weight: 900;
}

.rule-item p {
    margin: 0;
    color: #9aabb6;
    font-size: .54rem;
    font-weight: 700;
    line-height: 1.55;
}

.rule-item--important {
    border-color: #79504f;
    background: rgba(151, 62, 62, .07);
}

.rule-item--important > span {
    border-color: #8a5151;
    background: rgba(183, 72, 72, .12);
    color: #e18a8a;
}

/* Sidebar */

.rules-sidebar {
    position: sticky;
    top: 1rem;
}

.rules-sidebar-card {
    overflow: hidden;
    padding: .8rem;
    border: 1px solid #304a5d;
    border-radius: 9px;
    background:
        linear-gradient(
            145deg,
            rgba(27, 45, 61, .98),
            rgba(15, 29, 42, .99)
        );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .035),
        0 5px 18px rgba(0, 0, 0, .15);
}

.rules-sidebar-card--warning {
    border-color: #704448;
    background:
        linear-gradient(
            145deg,
            rgba(72, 34, 42, .92),
            rgba(28, 28, 40, .98)
        );
}

.rules-sidebar-card header {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.rules-sidebar-card header > div {
    width: 33px;
    height: 33px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #3b6e89;
    border-radius: 6px;
    background: rgba(47, 145, 193, .09);
    color: #6abde5;
    font-size: .65rem;
    font-weight: 900;
}

.rules-sidebar-card--warning header > div {
    border-color: #8a5053;
    background: rgba(186, 72, 77, .12);
    color: #ec9093;
}

.rules-sidebar-card header span {
    min-width: 0;
}

.rules-sidebar-card header small,
.rules-sidebar-card header strong {
    display: block;
}

.rules-sidebar-card header small {
    color: #718999;
    font-size: .42rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.rules-sidebar-card header strong {
    margin-top: .12rem;
    color: #fff;
    font-size: .62rem;
    font-weight: 900;
}

.rules-sidebar-card > p {
    margin: .7rem 0 0;
    color: #8397a5;
    font-size: .5rem;
    font-weight: 700;
    line-height: 1.55;
}

.rules-sidebar-card > a {
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: .75rem;
    padding: 0 .65rem;
    border: 1px solid #357698;
    border-radius: 5px;
    background: linear-gradient(#348ebc, #266f96);
    color: #fff !important;
    font-size: .49rem;
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
}

.rules-sanctions {
    margin-top: .65rem;
}

.rules-sanctions > div {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-height: 41px;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.rules-sanctions > div:last-child {
    border-bottom: 0;
}

.rules-sanctions span {
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #3a6076;
    border-radius: 5px;
    color: #6abce4;
    font-size: .4rem;
    font-weight: 900;
}

.rules-sanctions p {
    margin: 0;
    color: #879aa7;
    font-size: .47rem;
    font-weight: 700;
}

/* Wide layout */

@media (min-width: 1280px) {
    .rules-page {
        position: relative;
        left: 50%;
        width: calc(100vw - 40px);
        max-width: 1500px;
        transform: translateX(-50%);
    }
}

@media (min-width: 1800px) {
    .rules-page {
        max-width: 1560px;
    }
}

@media (max-width: 1000px) {
    .rules-layout {
        grid-template-columns: 1fr;
    }

    .rules-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .rules-hero {
        grid-template-columns: 1fr;
    }

    .rules-hero__content {
        padding: 1.35rem;
    }

    .rules-hero__visual {
        min-height: 205px;
    }

    .rules-list {
        grid-template-columns: 1fr;
    }

    .rules-sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .rules-category-nav {
        grid-template-columns: 1fr;
    }

    .rules-hero__stats {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .rules-hero__stats > div {
        min-width: 0;
        padding: .55rem;
    }

    .rules-section__header {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .rules-section__icon {
        width: 42px;
        height: 42px;
    }

    .rules-section__header > strong {
        display: none;
    }

    .rules-section__header p {
        white-space: normal;
    }
}

/* Rules readability refinement */

.rules-layout {
    grid-template-columns: minmax(0, 1fr) 315px;
}

.rules-section__header {
    min-height: 94px;
    padding: 1rem 1.1rem;
}

.rules-section__header h2 {
    font-size: 1rem;
}

.rules-section__header p {
    margin-top: .25rem;
    font-size: .58rem;
    line-height: 1.5;
}

.rules-list {
    display: block;
    padding: 0;
}

.rule-item {
    min-height: 0;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    gap: .85rem;
    padding: .95rem 1.05rem;
    border: 0;
    border-bottom: 1px solid rgba(78, 108, 128, .38);
    border-radius: 0;
    background: transparent;
    transition:
        background .15s ease,
        box-shadow .15s ease;
}

.rule-item:last-child {
    border-bottom: 0;
}

.rule-item:hover {
    transform: none;
    border-color: rgba(78, 108, 128, .38);
    background: rgba(47, 145, 193, .055);
}

.rule-item > span {
    width: 44px;
    min-height: 36px;
    padding: 0 .35rem;
    border-radius: 6px;
    font-size: .55rem;
}

.rule-item p {
    color: #aab9c2;
    font-size: .68rem;
    font-weight: 700;
    line-height: 1.7;
}

.rule-item--important {
    border-bottom-color: rgba(138, 81, 81, .5);
    background: rgba(151, 62, 62, .075);
    box-shadow: inset 3px 0 0 rgba(218, 100, 100, .7);
}

.rule-item--important:hover {
    background: rgba(151, 62, 62, .11);
}

.rules-sidebar-card {
    padding: 1rem;
}

.rules-sidebar-card header strong {
    font-size: .72rem;
}

.rules-sidebar-card > p {
    font-size: .59rem;
    line-height: 1.65;
}

.rules-sanctions > div {
    min-height: 48px;
}

.rules-sanctions p {
    font-size: .54rem;
    line-height: 1.4;
}

.rules-sidebar-card > a {
    min-height: 40px;
    font-size: .54rem;
}

.rules-category-nav strong {
    font-size: .64rem;
}

.rules-category-nav small {
    font-size: .49rem;
}

@media (max-width: 760px) {
    .rule-item {
        grid-template-columns: 46px minmax(0, 1fr);
        gap: .7rem;
        padding: .85rem;
    }

    .rule-item > span {
        width: 40px;
    }

    .rule-item p {
        font-size: .64rem;
    }
}

@media (max-width: 420px) {
    .rule-item {
        grid-template-columns: 1fr;
    }

    .rule-item > span {
        width: fit-content;
        min-width: 42px;
    }
}
