body {

background:#171717;
color:#eee;

font-family:
Arial,
Helvetica,
sans-serif;

margin:0;

}


header {
    position: relative;
    overflow: hidden;
    isolation: isolate;
margin-top: 70px;
    min-height: 280px;
    box-sizing: border-box;
z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background: #111;
    padding: 50px 20px;
    text-align: center;
    border-bottom: 3px solid #8b0000;
}


h1 {

font-size:48px;

color:#b22222;

margin-bottom:10px;

}


header p {

color:#ccc;

font-size:20px;

}



main {

max-width:900px;

margin:auto;

padding:20px;

}



section {

background:#242424;

border:1px solid #555;

border-left:
5px solid #8b0000;

padding:25px;

margin-bottom:25px;

border-radius:8px;

}



h2 {

color:#d3d3d3;

}



.phase {
    background: #1f1f1f;
}

.current-phase-heading {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 0;
    margin-bottom: 18px;

    font-size: 24px;
}

.current-phase-heading strong {
    color: #ff5555;
}

.phase-progress {
    width: 100%;
    height: 18px;

    overflow: hidden;

    background: #111111;

    border: 1px solid #666666;
    border-radius: 999px;

    box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.55);
}

#phaseProgressFill {
    width: 0;
    height: 100%;

    background: linear-gradient(
        90deg,
        #7a0000,
        #d12626
    );

    border-radius: inherit;

    transition: width 0.5s ease;
}



.rule,
.faq,
.event {

background:#333;

padding:15px;

margin:10px 0;

border-radius:5px;

}



a {

color:#ff6666;

}



footer {

text-align:center;
margin-bottom: 40px;
padding:30px;

color:#888;

}

#loginButton,
#logoutButton {

background:#8b0000;

color:white;

border:none;

padding:10px 20px;

border-radius:5px;

cursor:pointer;

margin-top:20px;

}


.admin section:hover {

outline:1px solid #b22222;

}

.edit-header {

display:flex;
align-items:center;
gap:10px;

}



.editButton {

background:#8b0000;

color:white;

border:none;

border-radius:5px;

padding:5px 10px;

cursor:pointer;

}


.editBox textarea {

width:100%;

min-height:150px;

background:#111;

color:white;

border:1px solid #555;

padding:10px;

}


.saveButton {

margin-top:10px;

}

.rule input,
.rule textarea {

width:100%;

box-sizing:border-box;

background:#111;

color:white;

border:1px solid #555;

padding:10px;

margin:5px 0;

}


.rule textarea {

min-height:120px;

}

#navLinks {

background:#111;

padding:15px;

display:flex;

justify-content:center;

align-items:center;
gap:0;

border-bottom:2px solid #8b0000;

flex-wrap:wrap;

}


#navLinks a,
#navLinks button {

color:#eee;

text-decoration:none;

font-weight:bold;

font-size:16px;

font-family:inherit;

background:none;

border:none;

padding:8px 0;

cursor:pointer;

}


#navLinks a:hover,
#navLinks button:hover {

color:#b22222;

}


#navLinks button {

margin:0;

}

/* Vertical dividers between nav items */

#navLinks a,
#navLinks button {
    padding-right: 15px;
    border-right: 1px solid #666;
}

#navLinks a:last-child,
#navLinks button:last-child {
    padding-right: 0;
    border-right: none;
}

#loginButton,
#logoutButton {

border-left:2px solid #b22222 !important;

padding-left:20px !important;
border-radius:0px;

}

.rule input,
.rule textarea,
.faq input,
.faq textarea {

width:100%;

box-sizing:border-box;

background:#111;

color:white;

border:1px solid #555;

padding:10px;

margin:5px 0;

}


.rule textarea,
.faq textarea {

min-height:120px;

}


.saveRule,
.cancelRule,
.saveFAQ,
.cancelFAQ {

margin-right:10px;

}

.currentPhase {

border-left:5px solid #8b0000;

padding-left:15px;

}

.header-image-area {
    position: absolute;
    inset: 0;
    z-index: -1;
}

#headerImage {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}



#headerImagePlaceholder {
    display: none !important;
}

/* Keep header text above the background image */

#festName,
#tagline {
    position: relative;
    z-index: 2;
}


/* Button used to open the admin panel */

.header-admin-panel-toggle {
    position: fixed;
    top: 130px;
    right: 0;
    z-index: 1001;

    display: flex;
    align-items: center;
    gap: 7px;

    padding: 11px 10px;
    border: 1px solid #ffffff;
    border-right: 0;
    border-radius: 8px 0 0 8px;

    background: #a60000;
    color: #ffffff;

    font-family: inherit;
    font-weight: bold;

    cursor: pointer;

    box-shadow: -3px 3px 8px rgba(0, 0, 0, 0.35);
}

.header-admin-panel-toggle:hover {
    background: #c00000;
}

.header-admin-panel-toggle span {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    letter-spacing: 1px;
}


/* Sliding admin panel */

.header-admin-panel {
    position: fixed;
    top: 0;
    right: 0;

    width: min(360px, 90vw);
    height: 100vh;

    box-sizing: border-box;
    padding: 22px;

    background: #202020;
    color: #ffffff;

    border-left: 2px solid #a60000;

    z-index: 1003;

    transform: translateX(100%);
    transition: transform 0.25s ease;

    overflow-y: auto;
}

.header-admin-panel.open {
    transform: translateX(0);
}


/* Darkened page behind the panel */

.header-admin-panel-overlay {
    position: fixed;
    inset: 0;

    display: none;

    background: rgba(0, 0, 0, 0.55);

    z-index: 1002;
}

.header-admin-panel-overlay.open {
    display: block;
}


/* Panel heading */

.header-admin-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 24px;
}

.header-admin-panel-heading h2 {
    margin: 0;
}

.header-admin-close {
    padding: 2px 10px;

    border: 0;
    background: transparent;
    color: #ffffff;

    font-size: 30px;
    line-height: 1;

    cursor: pointer;
}


/* Form controls */

.header-admin-panel label {
    display: block;
    margin-top: 16px;
    margin-bottom: 4px;

    font-weight: bold;
}

.header-admin-panel input[type="text"] {
    width: 100%;
    box-sizing: border-box;

    padding: 9px;

    border: 1px solid #777777;
    border-radius: 4px;

    background: #ffffff;
    color: #111111;
}

.header-admin-checkbox {
    display: flex !important;
    align-items: center;
    gap: 8px;

    font-weight: normal !important;
}

.header-admin-checkbox input {
    margin: 0;
}

.header-admin-panel > button {
    width: 100%;

    margin-top: 18px;
    padding: 10px;

    border: 1px solid #ffffff;
    border-radius: 5px;

    background: #a60000;
    color: #ffffff;

    cursor: pointer;
}

.header-admin-panel > button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.header-admin-status {
    min-height: 24px;
    margin-top: 14px;
}


/* Completely hide optional header text */

.header-setting-hidden {
    display: none !important;
}

/* Sections inside the admin side panel */

.admin-panel-divider {
    margin: 28px 0 22px;
    border: 0;
    border-top: 1px solid #666666;
}

.admin-panel-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    margin-bottom: 14px;
}

.admin-panel-section-heading h2 {
    margin: 0;
    font-size: 20px;
}

.admin-panel-section-heading .editButton {
    flex-shrink: 0;
}


/* Navigation link editor */

#linkEditor {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.linkEditItem {
    padding: 12px;

    background: #303030;
    border: 1px solid #555555;
    border-left: 4px solid #a60000;
    border-radius: 5px;
}

.linkEditItem h3 {
    margin: 0 0 5px;
    overflow-wrap: anywhere;
}

.linkEditItem p {
    margin: 0 0 10px;

    color: #bbbbbb;
    font-size: 13px;

    overflow-wrap: anywhere;
}

.linkEditItem .editButton {
    margin-right: 5px;
}

.linkEditItem label {
    margin-top: 10px;
}

.linkEditItem input {
    width: 100%;
    box-sizing: border-box;

    margin-top: 5px;
    padding: 9px;

    background: #111111;
    color: #ffffff;

    border: 1px solid #666666;
    border-radius: 4px;
}

.linkEditItem .saveLink,
.linkEditItem .cancelLink {
    margin-top: 12px;
    margin-right: 4px;
    padding: 7px 10px;

    border: 1px solid #ffffff;
    border-radius: 4px;

    background: #a60000;
    color: #ffffff;

    cursor: pointer;
}

.linkEditItem .cancelLink {
    background: #444444;
}

.admin-panel-textarea {
    width: 100%;
    min-height: 180px;
    box-sizing: border-box;

    padding: 10px;

    background: #111111;
    color: #ffffff;

    border: 1px solid #777777;
    border-radius: 4px;

    font-family: inherit;
    line-height: 1.5;

    resize: vertical;
}

/* Main overview layout */

.main-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 25px;
    margin-bottom: 25px;
}

.main-overview-grid section {
    margin-bottom: 0;
}

.overview-panel {
    min-width: 0;
}

.about-panel #aboutContent {
    line-height: 1.6;
}

/* Tabbed Rules, Schedule and FAQ box */

.tabbed-content-box {
    padding: 0;
    overflow: hidden;
}

.content-tabs {
    display: flex;
    align-items: stretch;

    background: #181818;
    border-bottom: 1px solid #555555;
}

.content-tab {
    flex: 1;

    padding: 14px 18px;

    background: transparent;
    color: #bbbbbb;

    border: 0;
    border-right: 1px solid #444444;
    border-bottom: 3px solid transparent;

    font-family: inherit;
    font-size: 17px;
    font-weight: bold;

    cursor: pointer;
}

.content-tab:last-child {
    border-right: 0;
}

.content-tab:hover {
    background: #292929;
    color: #ffffff;
}

.content-tab.active {
    background: #242424;
    color: #ffffff;
    border-bottom-color: #b22222;
}

.content-tab:focus-visible {
    outline: 2px solid #ff6666;
    outline-offset: -3px;
}

.tab-content-area {
    padding: 25px;
    background: #242424;
    min-height: 300px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.tab-panel h2 {
    margin-top: 0;
}

.tab-panel .edit-header {
    margin-bottom: 20px;
}

@media (max-width: 700px) {

    .main-overview-grid {
        grid-template-columns: 1fr;
    }

    .content-tabs {
        flex-direction: column;
    }

    .content-tab {
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid #444444;
    }

    .content-tab:last-child {
        border-bottom: 0;
    }

    .content-tab.active {
        border-bottom: 1px solid #444444;
        border-left: 4px solid #b22222;
    }

    .tab-content-area {
        padding: 18px;
    }

}

.tab-panel > .edit-header {
    margin-top: 0;
}

.tab-panel > .edit-header h2 {
    display: none;
}

/* Theme image controls */

.admin-panel-help {
    margin: 0 0 18px;
    color: #bbbbbb;
    font-size: 14px;
    line-height: 1.5;
}

.theme-image-control {
    margin-bottom: 24px;
    padding: 14px;

    background: #2b2b2b;

    border: 1px solid #555555;
    border-left: 4px solid #8b0000;
    border-radius: 5px;
}

.theme-image-control label {
    margin-top: 0;
}

.theme-image-preview {
    min-height: 90px;
    margin: 10px 0 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background-color: #111111;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;

    border: 1px solid #666666;
    border-radius: 4px;

    color: #888888;
    font-size: 13px;
    text-align: center;
}

.theme-image-control button {
    width: 100%;

    margin-top: 8px;
    padding: 9px;

    border: 1px solid #ffffff;
    border-radius: 4px;

    background: #a60000;
    color: #ffffff;

    font-family: inherit;
    cursor: pointer;
}

.theme-image-control button:hover {
    background: #c00000;
}

.theme-image-control .secondary-admin-button {
    background: #444444;
}

.theme-image-control .secondary-admin-button:hover {
    background: #555555;
}

/* Apocalypse decorative page layers */

body {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

.apocalypse-theme-layer {
    pointer-events: none;
    user-select: none;
}


/* Grunge texture across the entire viewport */

.grunge-texture-layer {
    position: fixed;
    inset: 0;
    z-index: 900;

    display: none;

    background-repeat: repeat;
    background-position: top left;
    background-size: auto;

    opacity: 0.15;
    mix-blend-mode: multiply;
}


/* Chain-link image along the page sides */

.chainlink-layer {
    position: fixed;
    inset: 0;
    z-index: 2;

    display: none;

    background-repeat: repeat-y;
    background-position:
        left top,
        right top;
    background-size:
        180px auto,
        180px auto;

    opacity: 0.23;

    -webkit-mask-image:
        linear-gradient(to right,
            black 0,
            black 120px,
            transparent 180px),
        linear-gradient(to left,
            black 0,
            black 120px,
            transparent 180px);

    mask-image:
        linear-gradient(to right,
            black 0,
            black 120px,
            transparent 180px),
        linear-gradient(to left,
            black 0,
            black 120px,
            transparent 180px);

    -webkit-mask-repeat: no-repeat, no-repeat;
    mask-repeat: no-repeat, no-repeat;

    -webkit-mask-position: left top, right top;
    mask-position: left top, right top;

    -webkit-mask-size: 180px 100%, 180px 100%;
    mask-size: 180px 100%, 180px 100%;
}


/* Barbed wire across the top and bottom */

.barbed-wire-layer {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;

    z-index: 3;

    display: none;

    background-repeat:
        repeat-x,
        repeat-x;

    background-position:
        top center,
        bottom center;

    background-size:
        auto 75px,
        auto 75px;

    opacity: 0.75;
}


/* Keep the actual site above the fencing */


nav,
main,
footer {
    position: relative;
    z-index: 5;
}


/* Ash particle container */

.ash-particles {
    position: fixed;
    inset: 0;
    z-index: 4;

    display: none;
    overflow: hidden;

    pointer-events: none;
}


/* Individual ash flakes */

.ash-particle {
    position: absolute;
    top: -20px;

    width: var(--ash-size);
    height: var(--ash-size);

    background: rgba(210, 210, 210, var(--ash-opacity));
    border-radius: 50%;

    filter: blur(var(--ash-blur));

    animation:
        ash-fall var(--ash-duration) linear infinite,
        ash-sway var(--ash-sway-duration) ease-in-out infinite alternate;

    animation-delay: var(--ash-delay);
}


/* Falling movement */

@keyframes ash-fall {
    from {
        transform:
            translate3d(0, -30px, 0)
            rotate(0deg);
    }

    to {
        transform:
            translate3d(
                var(--ash-drift),
                calc(100vh + 60px),
                0
            )
            rotate(360deg);
    }
}

/* Gentle side-to-side movement */

@keyframes ash-sway {
    from {
        margin-left: -20px;
    }

    to {
        margin-left: 20px;
    }
}


/* Avoid unnecessary animation for users who disable motion */

@media (prefers-reduced-motion: reduce) {

    .ash-particle {
        animation-duration:
            30s,
            10s;
    }

}

/* Rich-text editor */

.rich-text-editor {
    width: 100%;
    box-sizing: border-box;
    margin: 8px 0 14px;
    overflow: hidden;

    background: #111;
    border: 1px solid #555;
    border-radius: 5px;
}

.rich-text-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;

    padding: 7px;

    background: #292929;
    border-bottom: 1px solid #555;
}

.rich-text-toolbar button {
    min-width: 32px;
    margin: 0;
    padding: 5px 8px;

    background: #444;
    color: #eee;

    border: 1px solid #666;
    border-radius: 4px;

    font: inherit;
    cursor: pointer;
}

.rich-text-toolbar button:hover,
.rich-text-toolbar button:focus {
    background: #8b0000;
    border-color: #b22222;
}

.rich-text-content {
    width: 100%;
    min-height: 120px;
    box-sizing: border-box;

    padding: 12px;

    background: #111;
    color: #eee;

    outline: none;
    overflow-wrap: anywhere;
}

.rich-text-content:focus {
    box-shadow: inset 0 0 0 1px #b22222;
}

.rich-text-content:empty::before {
    content: "Write here...";
    color: #777;
    pointer-events: none;
}

.rich-text-content p:first-child,
.rich-text-content h2:first-child,
.rich-text-content h3:first-child {
    margin-top: 0;
}

.rich-text-content p:last-child,
.rich-text-content ul:last-child,
.rich-text-content ol:last-child {
    margin-bottom: 0;
}

.rich-text-content a {
    color: #ff6666;
    text-decoration: underline;
}

/* Rule and FAQ drag sorting */

.dragHandle {
    flex: 0 0 auto;

    padding: 5px 9px;

    background: #444;
    color: #ddd;

    border: 1px solid #666;
    border-radius: 5px;

    font-size: 18px;
    line-height: 1;

    cursor: grab;
    user-select: none;
}

.dragHandle:hover {
    background: #8b0000;
    color: white;
    border-color: #b22222;
}

.dragHandle:active {
    cursor: grabbing;
}

.rule.dragging,
.faq.dragging {
    opacity: 0.4;

    outline: 2px dashed #ff6666;
    outline-offset: 2px;
}

#rules.saving-order,
#faq.saving-order {
    opacity: 0.7;
    pointer-events: none;
}

.faq > .edit-header > h3 {
    flex: 1;
}

.rule > .edit-header {
    margin-bottom: 10px;
}

/* More compact site layout */

main {
    padding-top: 15px;
    padding-bottom: 15px;
}

section {
    margin-top: 12px;
    margin-bottom: 12px;
}

h1,
h2,
h3,
h4 {
    margin-top: 8px;
    margin-bottom: 8px;
}

p {
    margin-top: 4px;
    margin-bottom: 4px;
}

.rule,
.faq,
.event {
    padding: 10px;
    margin: 4px 0;
}

.edit-header {
    gap: 4px;
    margin-bottom: 4px !important;
}

.tab-panel .edit-header {
    margin-bottom: 10px;
}

.rule > .edit-header {
    margin-bottom: 4px;
}

.content-tabs {
    margin-top: 10px;
    margin-bottom: 10px;
}

.content-tab {
    padding-top: 7px;
    padding-bottom: 7px;
}

button {
    margin-top: 4px;
    margin-bottom: 4px;
}

label {
    margin-top: 7px;
    margin-bottom: 3px;
}

input,
textarea,
select {
    margin-top: 3px;
    margin-bottom: 4px;
}

.rich-text-editor {
    margin-top: 4px;
    margin-bottom: 8px;
}

.rich-text-toolbar {
    padding: 5px;
}

.rich-text-content {
    min-height: 90px;
    padding: 8px;
}

#navLinks {
    padding: 9px 15px;
    gap: 12px;
}

.rule p,
.faq p,
.event p {
    margin: 4px 0;
}

.rule p:empty,
.faq p:empty,
.event p:empty {
    display: none;
}

/* Claims Info editor */

#editClaimsInfoButton {
    display: none;
}

body.admin #editClaimsInfoButton {
    display: inline-block;
}

#claimsInfoContent {
    overflow-wrap: anywhere;
}

#claimsInfoContent > :first-child {
    margin-top: 0;
}

#claimsInfoContent > :last-child {
    margin-bottom: 0;
}

.claimsInfoStatus {
    margin-top: 8px;
    color: #ff9999;
}

/* Rougher, less polished surface treatment */

:root {
    --rough-edge: polygon(
        0 3px, 2% 0, 8% 2px, 15% 0, 24% 2px, 34% 0,
        45% 1px, 56% 0, 68% 2px, 79% 0, 91% 1px, 100% 0,
        calc(100% - 2px) 18%, 100% 32%, calc(100% - 1px) 50%,
        100% 67%, calc(100% - 2px) 84%, 100% 100%,
        89% calc(100% - 2px), 77% 100%, 65% calc(100% - 1px),
        51% 100%, 39% calc(100% - 2px), 25% 100%, 12% calc(100% - 1px), 0 100%,
        2px 82%, 0 65%, 1px 48%, 0 31%
    );
}

body {
    background-color: #151515;
    background-image:
        repeating-linear-gradient(7deg, rgba(255,255,255,.018) 0 1px, transparent 1px 7px),
        repeating-linear-gradient(97deg, rgba(0,0,0,.16) 0 1px, transparent 1px 11px);
}

header,
#navLinks,
section,
.rule,
.faq,
.event,
.header-admin-panel,
.content-tab,
button,
input,
textarea,
select,
.rich-text-editor,
.rich-text-toolbar,
.rich-text-content {
    border-radius: 0;
}

section,
.rule,
.faq,
.event {
    position: relative;
}

section {
    border-color: #666 #3d3d3d #3d3d3d #666;
    border-left: 6px solid #8b0000;
    box-shadow: 5px 6px 0 rgba(0,0,0,.28);
    background-image:
        linear-gradient(112deg, transparent 0 73%, rgba(255,255,255,.018) 73% 74%, transparent 74%),
        repeating-linear-gradient(3deg, rgba(255,255,255,.012) 0 1px, transparent 1px 6px);
}

.rule,
.faq,
.event {
    border-left: 3px solid #5b5b5b;
    border-bottom: 1px solid #1c1c1c;
    background-color: #303030;
    background-image: repeating-linear-gradient(
        -8deg,
        rgba(255,255,255,.018) 0 1px,
        transparent 1px 5px
    );
}

h1,
h2,
h3,
.content-tab,
#navLinks a,
#navLinks button {
    letter-spacing: .045em;
    text-shadow: 2px 2px 0 #080808;
}

.phase-progress {
    border-radius: 0;
    transform: skewX(-1.2deg);
    box-shadow: inset 3px 3px 0 rgba(0,0,0,.45);
}

#phaseProgressFill {
    border-radius: 0;
    background:
        repeating-linear-gradient(-55deg, rgba(0,0,0,.15) 0 7px, transparent 7px 14px),
        #a31616;
    transition: width .35s steps(8, end);
}

button,
.editButton,
#loginButton,
#logoutButton {
    border: 1px solid #6f6f6f;
    border-left: 3px solid #b22222;
    box-shadow: 3px 3px 0 #090909;
    transform: rotate(-.15deg);
}

button:nth-of-type(even) {
    transform: rotate(.15deg);
}

button:hover,
.editButton:hover {
    transform: translate(1px, 1px) rotate(.15deg);
    box-shadow: 1px 1px 0 #090909;
}

input,
textarea,
select,
.rich-text-content {
    border-color: #686868 #333 #333 #686868;
    box-shadow: inset 2px 2px 0 rgba(0,0,0,.45);
}

#navLinks {
    border-top: 1px solid #333;
    border-bottom-width: 3px;
    box-shadow: 0 4px 0 rgba(0,0,0,.35);
}

/* Image-based distressed edges, overlays and recolourable icons */

:root {
    --grunge-edge-colour: #242424;
    --grunge-mark-colour: #090909;
    --grunge-icon-colour: #b22222;
}

.asset-grunge-layer {
    position: fixed;
    inset: 0;
    z-index: 7;
    pointer-events: none;
    background: var(--grunge-mark-colour);
    opacity: .13;
    mix-blend-mode: multiply;
    -webkit-mask-image:
        url("apocalypse-assets/g2.png"),
        url("apocalypse-assets/g7.png"),
        url("apocalypse-assets/g9.png"),
        url("apocalypse-assets/g3.png"),
        url("apocalypse-assets/g8.png"),
        url("apocalypse-assets/g1.png");
    mask-image:
        url("apocalypse-assets/g2.png"),
        url("apocalypse-assets/g7.png"),
        url("apocalypse-assets/g9.png"),
        url("apocalypse-assets/g3.png"),
        url("apocalypse-assets/g8.png"),
        url("apocalypse-assets/g1.png");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position:
        3% 8%, 96% 18%, 5% 47%, 96% 61%, 12% 92%, 89% 96%;
    mask-position:
        3% 8%, 96% 18%, 5% 47%, 96% 61%, 12% 92%, 89% 96%;
    -webkit-mask-size:
        390px auto, 260px auto, 350px auto, 260px auto, 310px auto, 240px auto;
    mask-size:
        390px auto, 260px auto, 350px auto, 260px auto, 310px auto, 240px auto;
}

section {
    overflow: visible;
}

.phase {
    --grunge-edge-colour: #1f1f1f;
}

.about-panel,
.tabbed-content-box {
    --grunge-edge-colour: #242424;
}

section::before,
section::after {
    content: "";
    position: absolute;
    left: -1px;
    width: calc(100% + 2px);
    height: 27px;
    z-index: 1;
    pointer-events: none;
    background: var(--grunge-edge-colour);
    -webkit-mask: url("apocalypse-assets/edge3.png") center bottom / 100% 100% no-repeat;
    mask: url("apocalypse-assets/edge3.png") center bottom / 100% 100% no-repeat;
}

section::before {
    top: -18px;
}

section::after {
    bottom: -18px;
    transform: rotate(180deg);
}

.overview-panel::before {
    -webkit-mask-image: url("apocalypse-assets/edge5.png");
    mask-image: url("apocalypse-assets/edge5.png");
}

.overview-panel::after {
    -webkit-mask-image: url("apocalypse-assets/edge2.png");
    mask-image: url("apocalypse-assets/edge2.png");
}

.tabbed-content-box::before {
    -webkit-mask-image: url("apocalypse-assets/edge1.png");
    mask-image: url("apocalypse-assets/edge1.png");
}

.tabbed-content-box::after {
    background: #242424;
    -webkit-mask-image: url("apocalypse-assets/edge4.png");
    mask-image: url("apocalypse-assets/edge4.png");
}


.tabbed-content-box {
    overflow: visible;
}

section > * {
    position: relative;
    z-index: 2;
}

.rule,
.faq,
.event {
    overflow: visible;
}

.rule::before,
.faq::before,
.event::before {
    content: "";
    position: absolute;
    inset: -4px -2px auto;
    height: 10px;
    pointer-events: none;
    background: #303030;
    -webkit-mask: url("apocalypse-assets/edge5.png") center bottom / 100% 100% no-repeat;
    mask: url("apocalypse-assets/edge5.png") center bottom / 100% 100% no-repeat;
}

.phase-heading-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.grunge-icon {
    display: inline-block;
    flex: 0 0 auto;
    width: 1.15em;
    height: 1.15em;
    background: var(--grunge-icon-colour);
    vertical-align: -.18em;
    -webkit-mask: center / contain no-repeat;
    mask: center / contain no-repeat;
}

.grunge-icon-radiation {
    -webkit-mask-image: url("apocalypse-assets/i1.png");
    mask-image: url("apocalypse-assets/i1.png");
}

.grunge-icon-warning {
    -webkit-mask-image: url("apocalypse-assets/i2.png");
    mask-image: url("apocalypse-assets/i2.png");
}

.grunge-icon-biohazard {
    -webkit-mask-image: url("apocalypse-assets/i3.png");
    mask-image: url("apocalypse-assets/i3.png");
}

.tab-content-area ul,
#aboutContent ul,
#claimsInfoContent ul {
    list-style: none;
    padding-left: 1.55em;
}

.tab-content-area li,
#aboutContent li,
#claimsInfoContent li {
    position: relative;
}

.tab-content-area li::before,
#aboutContent li::before,
#claimsInfoContent li::before {
    content: "";
    position: absolute;
    width: .82em;
    height: .82em;
    left: -1.35em;
    top: .34em;
    background: var(--grunge-icon-colour);
    -webkit-mask: url("apocalypse-assets/i2.png") center / contain no-repeat;
    mask: url("apocalypse-assets/i2.png") center / contain no-repeat;
}

.phase-progress::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: #080808;
    opacity: .62;
    -webkit-mask: url("apocalypse-assets/bar1.png") center / 100% 100% repeat-x;
    mask: url("apocalypse-assets/bar1.png") center / 100% 100% repeat-x;
}

.phase-progress {
    position: relative;
}

@media (max-width: 700px) {
    .asset-grunge-layer {
        opacity: .09;
        -webkit-mask-size:
            230px auto, 180px auto, 220px auto, 180px auto, 210px auto, 170px auto;
        mask-size:
            230px auto, 180px auto, 220px auto, 180px auto, 210px auto, 170px auto;
    }

    section::before,
    section::after {
        height: 20px;
    }

    section::before {
        top: -13px;
    }

    section::after {
        bottom: -13px;
    }
}

/* Final navigation button overrides */

#navLinks {
    gap: 10px;
}

#navLinks a,
#navLinks button,
#navLinks a:last-child,
#navLinks button:last-child {
    box-sizing: border-box;
    display: inline-block;
    margin: 0;
    padding: 7px 12px !important;
    background: #8b0000;
    color: #ffffff;
    border: 1px solid #6f6f6f !important;
    border-left: 3px solid #b22222 !important;
    border-radius: 5px;
    box-shadow: 3px 3px 0 #090909;
    line-height: 1.2;
    text-decoration: none;
}

#navLinks a:hover,
#navLinks button:hover {
    background: #a50000;
    color: #ffffff;
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 #090909;
}

/* Public question form */

.ask-question-section h2 {
    margin-top: 0;
}

#askQuestionForm label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
}

#questionInput {
    width: 100%;
    min-height: 110px;
    box-sizing: border-box;
    resize: vertical;
    background: #111111;
    color: #ffffff;
    border: 1px solid #666666;
    padding: 10px;
}

#submitQuestionButton {
    margin-top: 10px;
    background: #8b0000;
    color: #ffffff;
    border: 1px solid #6f6f6f;
    border-left: 3px solid #b22222;
    padding: 8px 14px;
}

#submitQuestionButton:disabled {
    opacity: .6;
    cursor: wait;
}

.question-submit-status {
    min-height: 24px;
    margin-top: 8px;
    color: #b8d8b8;
}

.question-submit-status.error,
#questionsAdminStatus.error {
    color: #ff9999;
}

.question-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Admin questions panel */

.questions-panel-toggle {
    position: fixed;
    top: 245px;
    right: 0;
    z-index: 1001;
    align-items: center;
    gap: 7px;
    padding: 11px 8px;
    background: #a60000;
    color: #ffffff;
    border: 1px solid #ffffff;
    border-right: 0;
    border-radius: 8px 0 0 8px;
    box-shadow: -3px 3px 0 #090909;
    cursor: pointer;
    transform: none;
}

.questions-panel-toggle:hover {
    background: #c00000;
    transform: translateX(-1px);
}

.questions-panel-toggle span {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    letter-spacing: 1px;
    font-weight: bold;
}

#questionsCount {
    display: grid;
    place-items: center;
    min-width: 21px;
    height: 21px;
    padding: 0 3px;
    border-radius: 50%;
    background: #ffffff;
    color: #8b0000;
    font-size: 12px;
}

.questions-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(430px, 94vw);
    height: 100vh;
    box-sizing: border-box;
    padding: 22px;
    overflow-y: auto;
    background: #202020;
    color: #ffffff;
    border-left: 2px solid #a60000;
    z-index: 1005;
    transform: translateX(100%);
    transition: transform .25s ease;
}

.questions-panel.open {
    transform: translateX(0);
}

.questions-panel-overlay {
    position: fixed;
    inset: 0;
    display: none;
    background: rgba(0, 0, 0, .55);
    z-index: 1004;
}

.questions-panel-overlay.open {
    display: block;
}

.questions-panel-help {
    color: #bbbbbb;
    line-height: 1.45;
}

#questionsList {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.submitted-question {
    padding: 14px;
    background: #303030;
    border: 1px solid #666666;
    border-left: 5px solid #a60000;
    box-shadow: 4px 4px 0 #111111;
}

.submitted-question-text {
    margin: 0 0 7px;
    color: #ffffff;
    font-weight: bold;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.submitted-question-date {
    margin: 0 0 12px;
    color: #aaaaaa;
    font-size: 12px;
}

.submitted-question label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.question-answer-input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px;
    resize: vertical;
    background: #111111;
    color: #ffffff;
    border: 1px solid #666666;
}

.submitted-question-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 9px;
}

.submitted-question-actions button {
    margin: 0;
}

.delete-submitted-question {
    background: #444444;
    border-left-color: #777777;
}

.questions-empty {
    color: #bbbbbb;
    font-style: italic;
}

@media (max-width: 700px) {
    .questions-panel-toggle {
        top: 245px;
    }
}

/* ID-specific Questions panel layout; kept last to defeat older conflicts */

#questionsPanelToggle {
    position: fixed !important;
    top: 245px !important;
    right: 0 !important;
    left: auto !important;
    z-index: 1006 !important;
    width: auto !important;
    align-items: center !important;
    flex-direction: row !important;
    gap: 7px !important;
    padding: 11px 8px !important;
    margin: 0 !important;
    background: #a60000 !important;
    color: #ffffff !important;
    border: 1px solid #ffffff !important;
    border-right: 0 !important;
    border-radius: 8px 0 0 8px !important;
    box-shadow: -3px 3px 0 #090909 !important;
    transform: none !important;
}

#questionsPanelToggle:hover {
    background: #c00000 !important;
    transform: translateX(-1px) !important;
}

#questionsPanelToggle > span {
    writing-mode: vertical-rl !important;
    transform: rotate(180deg) !important;
    letter-spacing: 1px;
    font-weight: bold;
}

#questionsPanelToggle #questionsCount {
    flex: 0 0 auto;
    align-self: center;
    margin: 0;
}

#questionsPanel {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    z-index: 1010 !important;
    display: none !important;
    width: min(430px, 94vw) !important;
    height: 100vh !important;
    box-sizing: border-box !important;
    padding: 22px !important;
    margin: 0 !important;
    overflow-y: auto !important;
    background: #202020 !important;
    color: #ffffff !important;
    border: 0 !important;
    border-left: 2px solid #a60000 !important;
    transform: translateX(100%) !important;
    transition: transform .25s ease !important;
}

#questionsPanel.open {
    display: block !important;
    transform: translateX(0) !important;
}

#questionsPanelOverlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1009 !important;
    display: none !important;
    margin: 0 !important;
    background: rgba(0, 0, 0, .55) !important;
}

#questionsPanelOverlay.open {
    display: block !important;
}

#questionsPanel[hidden],
#questionsPanelOverlay[hidden] {
    display: none !important;
}