/* Fonts are self-hosted (fonts/) so screens keep their typography even without internet access. */
@font-face { font-family: Lato; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/lato-400.woff2") format("woff2"); }
@font-face { font-family: Lato; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/lato-700.woff2") format("woff2"); }
@font-face { font-family: Oswald; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/oswald-400.woff2") format("woff2"); }

/* Single source of truth for colours - change them here. */
:root {
    --bg: #111C4E;            /* Background colour */
    --accent: #ff8c00;        /* Orange accent */
    --text: #fff;
    --rule: #333;

    --status-open: #28a745;
    --status-expected: #ff8c00;
    --status-closed: #dc3545;

    --diff-green: #28a745;
    --diff-blue: #007bff;
    --diff-red: #dc3545;
    --diff-black: #000;
    --diff-unknown: #ddd;
}

body, html {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Lato, sans-serif;
    font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
    font-family: Oswald, sans-serif;
    font-weight: 400;
}

/* Status text colours */
.txt-open { color: var(--status-open); }
.txt-expected { color: var(--status-expected); }
.txt-closed { color: var(--status-closed); }
.txt-unknown { color: var(--accent); }

/* Difficulty badges */
.diff { font-weight: bold; }
.diff-green { color: var(--diff-green); }
.diff-blue { color: var(--diff-blue); }
.diff-red { color: var(--diff-red); }
.diff-black { color: var(--diff-black); background: #fff; padding: 0 6px; border-radius: 3px; display: inline-block; }
.diff-unknown { color: var(--diff-unknown); }

/* Report not updated today */
.is-stale { color: var(--status-closed) !important; }

/* Alert Overlay */
#alert-overlay { position: fixed; inset: 0; background: rgba(17, 28, 78, 0.4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center; box-sizing: border-box; transition: opacity 1s ease; }
.alert-content { width: 80%; height: 80%; max-height: 80vh; background: var(--bg); border: 10px solid var(--accent); box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 40px; overflow: hidden; }
.alert-content h2 { font-size: 56px; color: #fff; margin: 0 0 24px 0; }
#alert-list { overflow-y: auto; width: 100%; flex: 1; display: flex; flex-direction: column; align-items: center; padding: 0; }
.alert-item { font-size: 28px; margin-bottom: 12px; font-weight: bold; }
.alert-stat-open { color: var(--status-open); }
.alert-stat-expected { color: var(--status-expected); }
.alert-stat-closed { color: var(--status-closed); }

#alert-overlay.hidden { display: flex !important; visibility: hidden; opacity: 0; pointer-events: none; }
.hidden { display: none !important; }

/* Data loading / error status */
#data-status { position: fixed; inset: 0; background: var(--bg); z-index: 1500; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #fff; font-family: Lato, sans-serif; }
#data-status.data-status-error { color: var(--accent); }
#data-status.data-status-banner {
    right: auto;
    bottom: auto;
    top: 16px;
    left: 16px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--accent);
    border-radius: 10px;
    font-size: 18px;
    z-index: 2500;
    pointer-events: none;
}
