@font-face {
    font-family: 'Raleway';
    src: url('../fonts/raleway.woff2') format('woff2'),
         url('../fonts/raleway.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

/* Reset / base */
:where(*, *::before, *::after) {
    box-sizing: border-box;
    border-radius: 0 !important;
}

:root {
    --dialog: rgba(255, 255, 255, 0.86);
    --border: #000;
    --inner: rgba(255, 255, 255, 0.35);
    --shadow: #000;
    --title-red: #b00000;
    --prompt-blue: #2b47bb;
    --select-red: #b00000;
    --select-fg: #fff;
    --text: #111;
    --mono: ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

html, body {
    margin: 0;
}

body {
    font-family: 'Raleway', sans-serif;
    color: var(--text);
    background: url('../img/bg.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
}

/* ===== Main layout ===== */

.content-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    width: 100%;
    padding: 24px 16px 16px 16px;
}

.content-box {
    position: relative;
    background: var(--dialog);
    border: 2px solid var(--border);
    padding: 22px;
    width: 100%;
    max-width: 560px;
    text-align: left;
    box-shadow: 0 0 10px rgba(0,0,0,0.45);
}

.content-box::after {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1px solid var(--inner);
    pointer-events: none;
}

.logo {
    max-width: 125px;
    width: 100%;
    display: block;
    margin: 0 auto 18px auto;
}

h1 {
    margin: 0 0 14px 0;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
}

p {
    margin: 0 0 12px 0;
    font-size: 15px;
    line-height: 1.55;
}

a {
    color: #111;
    text-decoration: underline;
}

a:visited {
    color: #111;
}

/* ===== Footer ===== */

footer.links {
    text-align: center;
    color: #000;
    font: 14px/1.4 var(--mono);
    margin: 8px 0 0 0;
    padding-bottom: 10px;
}

footer.links .foot-link {
    color: #000;
    text-decoration: none;
}

footer.links .foot-link:hover {
    text-decoration: underline;
}

footer.links .sep {
    margin: 0 0.35rem;
    opacity: 0.9;
}

.label-full { display: inline; }
.label-short { display: none; }

/* ===== Modal system (CompIT pattern) ===== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9990;
}

.modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 4vw;
    z-index: 10000;
}

.modal[hidden],
.modal-backdrop[hidden] {
    display: none !important;
}

.modal-dialog {
    position: relative;
    width: min(520px, 92vw);
    max-height: calc(100vh - 8vw);
    background: var(--dialog);
    border: 2px solid var(--border);
    display: flex;
    flex-direction: column;
}

.modal-dialog::after {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1px solid var(--inner);
    pointer-events: none;
}

.modal-content {
    padding: 14px 18px;
    overflow-y: auto;
}

.okline {
    text-align: right;
    margin-top: 12px;
}

.btn-ok {
    background: transparent;
    border: 0;
    font: inherit;
    font-weight: 700;
    padding: 2px 8px;
    cursor: pointer;
}

.btn-ok:hover {
    background: var(--select-red);
    color: var(--select-fg);
}

.border {
    position: absolute;
    inset: 0;
    border: 2px solid var(--border);
    pointer-events: none;
}

/* ===== Breakpoints ===== */

@media (min-width: 681px) {
    .content-container {
        padding: 48px 24px 18px 24px;
    }

    .content-box {
        max-width: 820px;
        padding: 34px;
    }

    h1 {
        font-size: 26px;
    }

    p {
        font-size: 16px;
    }

    footer.links {
        margin-top: 10px;
        padding-bottom: 18px;
    }
}

@media (min-width: 1024px) {
    .content-container {
        padding-top: 70px;
        padding-bottom: 18px;
    }

    .content-box {
        max-width: 980px;
        padding: 40px;
    }

    h1 {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .label-full { display: none; }
    .label-short { display: inline; }
}
