:root {
    --bg: #f6f5f2;
    --surface: #ffffff;
    --text: #1f2328;
    --muted: #5d6670;
    --accent: #2f5d8a;
    --accent-text: #ffffff;
    --border: #dcdad5;
    --danger: #a23b2a;
    --ok: #2e6b3f;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #16181b;
        --surface: #202327;
        --text: #e8e6e3;
        --muted: #a3a9b0;
        --accent: #7fb0e0;
        --accent-text: #10161c;
        --border: #363a40;
        --danger: #e58a78;
        --ok: #84c795;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); }

.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.top nav { display: flex; align-items: center; gap: 1rem; }
.brand { font-weight: 600; text-decoration: none; color: var(--text); }

main { max-width: 56rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 2rem 0 0.75rem; }

.muted { color: var(--muted); }
.error { color: var(--danger); }
.ok { color: var(--ok); }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
}

.narrow { max-width: 26rem; margin: 2rem auto; }

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1rem;
}

.tile { display: block; text-decoration: none; color: inherit; }
a.tile:hover { border-color: var(--accent); }
.tile h2 { margin: 0 0 0.25rem; }
.tile p { margin: 0; color: var(--muted); }

button, .button {
    display: inline-block;
    font: inherit;
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: var(--accent-text);
    cursor: pointer;
    text-decoration: none;
}

button.secondary { background: transparent; color: var(--accent); }
button.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
button.link { background: none; border: none; padding: 0; color: var(--accent); text-decoration: underline; }
button:disabled { opacity: 0.6; cursor: wait; }
.wide { width: 100%; }

form.inline { display: inline; margin: 0; }

label { display: block; margin: 0.75rem 0 0.25rem; font-weight: 500; }
input[type=text], input[type=email], textarea {
    width: 100%;
    font: inherit;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
}
.checks label { display: inline-flex; gap: 0.4rem; margin-right: 1rem; font-weight: normal; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }

.link-box {
    word-break: break-all;
    padding: 0.75rem;
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: 6px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.9rem;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

/* Honeypot field of the access request form, invisible to people */
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.request { margin-bottom: 1rem; }
.quote { white-space: pre-wrap; border-left: 3px solid var(--border); padding-left: 0.75rem; }
.notice { margin-bottom: 1rem; }

/* The validation summary hides itself with an inline style, which the CSP blocks */
.validation-summary-valid { display: none; }
.validation-summary-errors ul { margin: 0; padding-left: 1.2rem; }
