/* Uses the variables and shared components from styles.css. */


/* ==================================================
   ACCESSIBILITY
================================================== */

.visually-hidden {
    position: absolute;

    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;

    border: 0;
}


/* ==================================================
   PAGE CONTAINERS
================================================== */

.rules-container {
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;
}

.rules-narrow-container {
    width: min(760px, calc(100% - 48px));
    margin: 0 auto;
}


/* ==================================================
   PAGE
================================================== */

.rules-page {
    position: relative;
    z-index: 3;

    min-height: 100vh;
    padding-top: var(--header-height);

    background-color: #ffffff;
}


/* ==================================================
   TITLE BAR
================================================== */

.rules-title-bar {
    position: relative;

    padding: 25px 20px;

    overflow: hidden;

    background-color: var(--mid-grey);

    text-align: center;
}

.rules-title-bar h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    gap: 6px;

    margin: 0;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    font-weight: 400;
    line-height: 1.2;
}

.rules-title-bar h1 > span:first-child {
    color: var(--navy);
}

.rules-title-bar h1 strong {
    color: var(--orange);

    font-weight: 400;
}

.rules-title-divider {
    color: rgba(0, 0, 0, 0.18);
}


/* ==================================================
   INTRODUCTION
================================================== */

.rules-introduction {
    position: relative;

    padding: 72px 0 68px;

    background-color: #ffffff;
}

.rules-introduction p:not(.section-eyebrow) {
    margin-bottom: 14px;

    color: #666666;

    font-size: 16px;
    line-height: 1.8;
}

.rules-introduction p:last-child {
    margin-bottom: 0;
}

.rules-introduction-lead {
    color: var(--text) !important;

    font-size: 18px !important;
}


/* ==================================================
   RULES CONTENT
================================================== */

.rules-content-section {
    position: relative;

    padding: 58px 0 85px;

    overflow: hidden;

    background-color: var(--light-grey);
}


/* ==================================================
   TOOLBAR
================================================== */

.rules-toolbar {
    display: grid;
    grid-template-columns:
        minmax(260px, 1fr)
        auto
        auto
        auto;

    min-height: 58px;

    overflow: hidden;

    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);

    box-shadow:
        0 4px 14px
        rgba(0, 0, 0, 0.025);
}


/* ==================================================
   SEARCH FIELD
================================================== */

.rules-search-field {
    display: flex;
    align-items: center;

    gap: 12px;

    min-width: 0;
    padding: 0 18px;

    background-color: #ffffff;
}

.rules-search-field:focus-within {
    box-shadow:
        inset 0 0 0 2px
        rgba(184, 134, 11, 0.18);
}

.rules-search-field svg {
    flex: 0 0 auto;

    width: 21px;
    height: 21px;

    fill: none;
    stroke: #666666;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rules-search-field input {
    width: 100%;
    min-width: 0;

    padding: 18px 0;

    border: 0;
    outline: 0;

    background-color: transparent;
    color: var(--text);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 13px;
    line-height: 1.4;
}

.rules-search-field input::placeholder {
    color: #777777;

    opacity: 1;
}


/* ==================================================
   TOOLBAR BUTTONS
================================================== */

.rules-toolbar-button,
.rules-print-button {
    min-width: 115px;
    min-height: 58px;
    padding: 0 18px;

    border: 0;
    border-left:
        1px solid
        rgba(0, 0, 0, 0.09);

    background-color: #ffffff;
    color: var(--text);

    cursor: pointer;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.3;

    text-align: center;
    text-decoration: none !important;
    text-transform: uppercase;

    -webkit-tap-highlight-color: transparent;

    transition:
        background-color 0.22s ease,
        color 0.22s ease,
        border-color 0.22s ease,
        transform 0.22s ease;
}

.rules-toolbar-button:hover {
    background-color: var(--light-grey);
    color: var(--orange);
}

.rules-toolbar-button:focus-visible {
    position: relative;
    z-index: 2;

    outline: 3px solid var(--gold);
    outline-offset: -3px;
}


/* ==================================================
   PRINT BUTTON
================================================== */

.rules-print-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    background-color: var(--orange);
    border-left:
        1px solid
        var(--orange);

    color: #ffffff;

    text-decoration: none !important;
}

.rules-print-button:link,
.rules-print-button:visited,
.rules-print-button:hover,
.rules-print-button:active,
.rules-print-button:focus {
    text-decoration: none !important;
}

.rules-print-button svg {
    flex: 0 0 auto;

    width: 17px;
    height: 17px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rules-print-button:hover {
    background-color: var(--gold);
    border-color: var(--gold);
    color: var(--navy);

    transform: translateY(-1px);
}

.rules-print-button:focus-visible {
    position: relative;
    z-index: 2;

    outline: 3px solid var(--gold);
    outline-offset: -3px;
}


/* ==================================================
   FILTERS
================================================== */

.rules-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    margin: 22px 0 14px;
}

.rules-filter-button {
    min-height: 36px;
    padding: 9px 15px;

    border:
        1px solid
        rgba(0, 0, 0, 0.12);

    background-color: #ffffff;
    color: #666666;

    cursor: pointer;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;

    -webkit-tap-highlight-color: transparent;

    transition:
        background-color 0.22s ease,
        border-color 0.22s ease,
        color 0.22s ease,
        transform 0.22s ease;
}

.rules-filter-button:hover {
    border-color: var(--orange);
    color: var(--orange);
}

.rules-filter-button:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.rules-filter-button.active,
.rules-filter-button[aria-pressed="true"] {
    background-color: var(--navy);
    border-color: var(--navy);
    color: var(--gold);
}


/* ==================================================
   RESULTS SUMMARY
================================================== */

.rules-results-summary {
    margin-bottom: 18px;
}

.rules-results-summary p {
    margin: 0;

    color: #777777;

    font-size: 12px;
    line-height: 1.5;
}


/* ==================================================
   RULE LIST
================================================== */

.rules-list {
    display: grid;

    gap: 10px;
}


/* ==================================================
   RULE CARD
================================================== */

.rule-card {
    position: relative;

    overflow: hidden;

    background-color: #ffffff;
    border:
        1px solid
        rgba(0, 0, 0, 0.1);

    opacity: 1;

    transform: translateY(0);

    backface-visibility: hidden;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.rule-card:hover {
    border-color:
        rgba(184, 134, 11, 0.45);
}

.rule-card.open {
    border-color: var(--orange);

    box-shadow:
        0 12px 30px
        rgba(0, 0, 0, 0.06);
}


/* ==================================================
   RULE HEADING
================================================== */

.rule-heading {
    margin: 0;
}


/* ==================================================
   RULE TOGGLE
================================================== */

.rule-toggle {
    display: grid;
    grid-template-columns:
        58px
        minmax(0, 1fr)
        auto;

    align-items: center;

    gap: 17px;

    width: 100%;
    min-height: 70px;

    padding:
        0
        21px
        0
        0;

    border: 0;

    background-color: transparent;
    color: var(--text);

    cursor: pointer;

    text-align: left;

    -webkit-tap-highlight-color: transparent;

    transition:
        background-color 0.22s ease;
}

.rule-toggle:hover {
    background-color:
        rgba(247, 247, 247, 0.58);
}

.rule-toggle:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: -3px;
}


/* ==================================================
   RULE NUMBER
================================================== */

.rule-number {
    display: flex;
    align-items: center;
    justify-content: center;

    align-self: stretch;

    min-width: 58px;

    background-color: var(--navy);
    color: var(--gold);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 18px;
    line-height: 1;
}


/* ==================================================
   RULE TITLE
================================================== */

.rule-title {
    min-width: 0;

    color: var(--navy);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 17px;
    font-weight: 400;
    line-height: 1.3;

    overflow-wrap: anywhere;
}


/* ==================================================
   RULE PLUS / MINUS ICON
================================================== */

.rule-icon {
    position: relative;

    flex: 0 0 auto;

    width: 18px;
    height: 18px;

    color: var(--orange);

    transition:
        transform 0.25s ease,
        color 0.25s ease;
}

.rule-icon::before,
.rule-icon::after {
    content: "";

    position: absolute;
    top: 50%;
    left: 50%;

    width: 13px;
    height: 2px;

    background-color: currentColor;

    transform:
        translate(
            -50%,
            -50%
        );

    transition:
        transform 0.25s ease;
}

.rule-icon::after {
    transform:
        translate(
            -50%,
            -50%
        )
        rotate(90deg);
}

.rule-card.open
.rule-icon::after {
    transform:
        translate(
            -50%,
            -50%
        )
        rotate(0deg);
}


/* ==================================================
   RULE PANEL
================================================== */

.rule-panel {
    display: grid;

    grid-template-rows: 0fr;

    visibility: hidden;

    transition:
        grid-template-rows
        0.38s
        cubic-bezier(
            0.22,
            1,
            0.36,
            1
        ),
        visibility
        0s
        linear
        0.38s;
}

.rule-card.open
.rule-panel {
    grid-template-rows: 1fr;

    visibility: visible;

    transition:
        grid-template-rows
        0.38s
        cubic-bezier(
            0.22,
            1,
            0.36,
            1
        ),
        visibility 0s;
}

.rule-panel-inner {
    min-height: 0;

    overflow: hidden;
}


/* ==================================================
   RULE BODY
================================================== */

.rule-body {
    padding:
        5px
        28px
        27px
        75px;

    color: #5f5f5f;

    font-size: 14px;
    line-height: 1.78;
}

.rule-body p {
    margin: 0 0 13px;
}

.rule-body p:last-child {
    margin-bottom: 0;
}

.rule-body ol,
.rule-body ul {
    margin:
        10px
        0
        14px
        21px;
}

.rule-body li {
    margin-bottom: 8px;

    padding-left: 2px;
}

.rule-body li:last-child {
    margin-bottom: 0;
}

.rule-body strong {
    color: var(--text);
}


/* ==================================================
   EMPTY STATE
================================================== */

.rules-empty-state {
    padding: 26px;

    background-color: #ffffff;
    border:
        1px solid
        rgba(0, 0, 0, 0.08);

    color: #666666;

    text-align: center;
}

.rules-empty-state p {
    margin: 0;

    font-size: 13px;
    line-height: 1.6;
}

.rules-empty-state[hidden] {
    display: none;
}


/* ==================================================
   SOURCE NOTE
================================================== */

.rules-source-note {
    margin-top: 28px;
    padding-top: 18px;

    border-top:
        1px solid
        rgba(0, 0, 0, 0.1);
}

.rules-source-note p {
    margin: 0;

    color: #777777;

    font-size: 12px;
    line-height: 1.6;
}


/* ==================================================
   SCROLL REVEAL
================================================== */

.rule-card {
    opacity: 1;

    transform: translateY(0);
}

.js-enabled
.rule-card.reveal-ready:not(.animate-in) {
    opacity: 0;

    transform: translateY(15px);
}

.rule-card.reveal-ready {
    transition:
        opacity 0.85s ease,
        transform 1s
        cubic-bezier(
            0.22,
            1,
            0.36,
            1
        ),
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.rule-card.animate-in {
    opacity: 1;

    transform: translateY(0);
}


/* ==================================================
   LARGE TABLET / SMALL LAPTOP
================================================== */

@media (max-width: 1050px) {

    .rules-container {
        width:
            min(
                960px,
                calc(100% - 40px)
            );
    }

    .rules-toolbar {
        grid-template-columns:
            minmax(230px, 1fr)
            auto
            auto
            auto;
    }

    .rules-toolbar-button,
    .rules-print-button {
        min-width: 108px;
        padding-right: 15px;
        padding-left: 15px;
    }

}


/* ==================================================
   TABLET
================================================== */

@media (max-width: 900px) {

    .rules-container {
        width:
            min(
                860px,
                calc(100% - 36px)
            );
    }

    .rules-narrow-container {
        width:
            min(
                720px,
                calc(100% - 36px)
            );
    }


    /* ----------------------------------------------
       Toolbar
    ---------------------------------------------- */

    .rules-toolbar {
        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            );

        min-height: 0;
    }

    .rules-search-field {
        grid-column: 1 / -1;

        min-height: 56px;

        border-bottom:
            1px solid
            rgba(0, 0, 0, 0.09);
    }

    .rules-toolbar-button,
    .rules-print-button {
        width: 100%;
        min-width: 0;
        min-height: 50px;

        padding:
            11px
            12px;
    }

    .rules-toolbar-button:first-of-type {
        border-left: 0;
    }


    /* ----------------------------------------------
       Rule cards
    ---------------------------------------------- */

    .rule-toggle {
        grid-template-columns:
            56px
            minmax(0, 1fr)
            auto;

        gap: 15px;
    }

    .rule-number {
        min-width: 56px;
    }

    .rule-body {
        padding:
            7px
            26px
            26px
            71px;
    }

}


/* ==================================================
   PORTRAIT TABLET
================================================== */

@media (max-width: 768px) {

    .rules-title-bar {
        padding:
            23px
            18px;
    }

    .rules-introduction {
        padding:
            62px
            0
            58px;
    }

    .rules-content-section {
        padding:
            50px
            0
            72px;
    }

    .rules-filters {
        display: grid;
        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            );

        align-items: stretch;
    }

    .rules-filter-button {
        display: flex;
        align-items: center;
        justify-content: center;

        min-height: 42px;

        text-align: center;
    }

}


/* ==================================================
   MOBILE
================================================== */

@media (max-width: 650px) {

    .rules-page {
        padding-top: var(--header-height);
    }

    .rules-container,
    .rules-narrow-container {
        width:
            calc(100% - 28px);
    }


    /* ----------------------------------------------
       Title
    ---------------------------------------------- */

    .rules-title-bar {
        padding:
            20px
            14px;
    }

    .rules-title-bar h1 {
        gap: 4px;

        font-size: 1.35rem;
    }


    /* ----------------------------------------------
       Introduction
    ---------------------------------------------- */

    .rules-introduction {
        padding:
            55px
            0
            52px;
    }

    .rules-introduction p:not(.section-eyebrow) {
        font-size: 15px;
        line-height: 1.72;
    }

    .rules-introduction-lead {
        font-size: 17px !important;
    }


    /* ----------------------------------------------
       Rules area
    ---------------------------------------------- */

    .rules-content-section {
        padding:
            42px
            0
            58px;
    }


    /* ----------------------------------------------
       Toolbar
    ---------------------------------------------- */

    .rules-toolbar {
        display: grid;

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .rules-search-field {
        grid-column: 1 / -1;

        min-height: 52px;

        padding:
            0
            14px;
    }

    .rules-search-field input {
        padding:
            15px
            0;

        font-size: 14px;
    }

    .rules-toolbar-button,
    .rules-print-button {
        min-height: 48px;

        border-top: 0;
    }

    .rules-toolbar-button:first-of-type {
        border-left: 0;
    }

    .rules-toolbar-button:nth-of-type(2) {
        border-left:
            1px solid
            rgba(0, 0, 0, 0.09);
    }

    .rules-print-button {
        grid-column: 1 / -1;

        min-height: 50px;

        border-top:
            1px solid
            rgba(0, 0, 0, 0.09);

        border-left: 0;
    }


    /* ----------------------------------------------
       Filters
    ---------------------------------------------- */

    .rules-filters {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

        gap: 8px;

        margin-top: 18px;
    }

    .rules-filter-button {
        min-height: 42px;

        padding:
            9px
            8px;

        font-size: 10px;
    }


    /* ----------------------------------------------
       Results
    ---------------------------------------------- */

    .rules-results-summary {
        margin-bottom: 15px;
    }


    /* ----------------------------------------------
       Cards
    ---------------------------------------------- */

    .rules-list {
        gap: 9px;
    }

    .rule-toggle {
        grid-template-columns:
            50px
            minmax(0, 1fr)
            18px;

        gap: 12px;

        min-height: 64px;

        padding-right: 14px;
    }

    .rule-number {
        min-width: 50px;

        font-size: 15px;
    }

    .rule-title {
        font-size: 15px;
        line-height: 1.32;
    }

    .rule-icon {
        width: 16px;
        height: 16px;
    }

    .rule-icon::before,
    .rule-icon::after {
        width: 12px;
    }

    .rule-body {
        padding:
            7px
            18px
            23px
            62px;

        font-size: 13px;
        line-height: 1.68;
    }

    .rule-body ol,
    .rule-body ul {
        margin-left: 18px;
    }

}


/* ==================================================
   SMALL MOBILE
================================================== */

@media (max-width: 480px) {

    .rules-container,
    .rules-narrow-container {
        width:
            calc(100% - 24px);
    }


    /* ----------------------------------------------
       Title
    ---------------------------------------------- */

    .rules-title-bar h1 {
        font-size: 1.25rem;
    }


    /* ----------------------------------------------
       Filters
    ---------------------------------------------- */

    .rules-filters {
        grid-template-columns: 1fr;
    }


    /* ----------------------------------------------
       Rules
    ---------------------------------------------- */

    .rule-toggle {
        grid-template-columns:
            46px
            minmax(0, 1fr)
            16px;

        gap: 10px;

        min-height: 61px;

        padding-right: 12px;
    }

    .rule-number {
        min-width: 46px;

        font-size: 14px;
    }

    .rule-title {
        font-size: 14px;
    }

    .rule-body {
        padding:
            6px
            15px
            21px
            56px;

        font-size: 12.5px;
    }

}


/* ==================================================
   VERY SMALL MOBILE
================================================== */

@media (max-width: 360px) {

    .rules-container,
    .rules-narrow-container {
        width:
            calc(100% - 20px);
    }

    .rules-title-bar h1 {
        font-size: 1.15rem;
    }

    .rules-toolbar {
        display: block;
    }

    .rules-toolbar-button,
    .rules-print-button {
        width: 100%;

        border-top:
            1px solid
            rgba(0, 0, 0, 0.09);

        border-left: 0 !important;
    }

    .rules-search-field {
        border-bottom: 0;
    }

    .rule-toggle {
        grid-template-columns:
            43px
            minmax(0, 1fr)
            15px;

        gap: 9px;
    }

    .rule-number {
        min-width: 43px;
    }

    .rule-body {
        padding-left: 52px;
    }

}


/* ==================================================
   TOUCH DEVICES
================================================== */

@media (hover: none) {

    /*
       We do not remove any functionality on touch
       devices. Hover-only effects are simply neutralised
       so a tap does not leave a card looking permanently
       hovered.
    */

    .rule-card:hover {
        border-color:
            rgba(0, 0, 0, 0.1);
    }

    .rule-card.open:hover {
        border-color: var(--orange);
    }

    .rule-toggle:hover {
        background-color: transparent;
    }

    .rules-toolbar-button:hover {
        background-color: #ffffff;
        color: var(--text);

        transform: none;
    }

    .rules-print-button:hover {
        background-color: var(--orange);
        color: #ffffff;

        transform: none;
    }

    .rules-filter-button:hover {
        border-color:
            rgba(0, 0, 0, 0.12);

        color: #666666;
    }

    .rules-filter-button.active:hover,
    .rules-filter-button[aria-pressed="true"]:hover {
        background-color: var(--navy);
        border-color: var(--navy);
        color: var(--gold);
    }

}


/* ==================================================
   PRINT
================================================== */

@media print {

    @page {
        margin: 16mm;
    }

    html,
    body {
        background-color: #ffffff !important;
    }

    .site-header,
    .rules-title-bar,
    .rules-introduction,
    .rules-toolbar,
    .rules-filters,
    .rules-results-summary,
    .rules-source-note,
    .location-map,
    footer {
        display: none !important;
    }

    .rules-page {
        min-height: 0;

        padding-top: 0;
    }

    .rules-content-section {
        padding: 0;

        background-color: #ffffff;
    }

    .rules-container {
        width: 100%;
        max-width: none;

        margin: 0;
    }

    .rules-list {
        display: block;
    }

    .rule-card {
        break-inside: avoid;
        page-break-inside: avoid;

        margin-bottom: 14px;

        border: 1px solid #aaaaaa !important;

        box-shadow: none !important;

        opacity: 1 !important;

        transform: none !important;
    }

    .rule-toggle {
        min-height: 44px;

        padding-right: 12px;
    }

    .rule-number {
        color: #000000 !important;

        background-color: #eeeeee !important;

        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .rule-title {
        color: #000000;
    }

    .rule-panel {
        display: block;

        grid-template-rows: 1fr !important;

        visibility: visible !important;
    }

    .rule-panel-inner {
        overflow: visible;
    }

    .rule-icon {
        display: none;
    }

    .rule-body {
        padding-bottom: 18px;

        color: #000000;

        font-size: 11pt;
        line-height: 1.5;
    }

    .rule-body strong {
        color: #000000;
    }

}


/* ==================================================
   REDUCED MOTION
================================================== */

@media (prefers-reduced-motion: reduce) {

    .rule-card,
    .rule-card.reveal-ready,
    .rule-card.reveal-ready:not(.animate-in),
    .rule-panel,
    .rule-icon,
    .rule-icon::before,
    .rule-icon::after,
    .rules-toolbar-button,
    .rules-print-button,
    .rules-filter-button {
        transition: none !important;
    }

    .rule-card,
    .rule-card.reveal-ready:not(.animate-in) {
        opacity: 1;

        transform: none;
    }

}