:root {
    --bg: #fafaf8;
    --fg: #1d1d1f;
    --muted: #6b6b70;
    --line: #dcdcd6;
    --accent: #1f5fbf;
    --accent-fg: #fff;
    --warn-bg: #fff4e0;
    --warn-line: #f0c070;
    --note-bg: #eaf2ff;
    --err: #b3261e;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.wrap { max-width: 680px; margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: 1200px; }

.top {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
    padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fff;
}
.brand { font-weight: 600; color: var(--fg); text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-left: auto; }

h1 { font-size: 1.5rem; line-height: 1.25; margin: 24px 0 12px; }
h2 { font-size: 1.15rem; margin: 24px 0 8px; }
a { color: var(--accent); }
.muted { color: var(--muted); font-size: .92rem; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 16px 0; }
.card.narrow { max-width: 360px; }
.notice, .warning { border-radius: 8px; padding: 12px 14px; margin: 16px 0; }
.notice { background: var(--note-bg); }
.warning { background: var(--warn-bg); border: 1px solid var(--warn-line); }
.errors { color: var(--err); }
.errors ul { margin: 0 0 8px; padding-left: 18px; }
.errors:empty, .validation-summary-valid { display: none; }

label { display: block; margin: 12px 0 4px; font-weight: 500; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
label.check input { margin-top: 5px; width: 20px; height: 20px; flex: none; }
input[type=text], input[type=password], input:not([type]), select, textarea {
    width: 100%; font: inherit; padding: 10px 12px;
    border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
textarea { resize: vertical; }
.row { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .row { grid-template-columns: 1fr 1fr; } }

button, .button {
    display: inline-block; font: inherit; padding: 10px 16px; margin-top: 12px;
    border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--fg);
    cursor: pointer; text-decoration: none;
}
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
button.link { border: 0; background: none; color: var(--accent); padding: 0; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.actions button { flex: 1 1 140px; }
form.inline { display: inline; }

.source { font-size: 1.25rem; font-weight: 500; margin: 4px 0 8px; }
.progress { display: flex; align-items: center; gap: 12px; margin: 20px 0 0; }
.progress progress { flex: 1; height: 10px; }
details { margin-top: 12px; }
summary { cursor: pointer; color: var(--accent); }
details.report { margin: 8px 0 24px; }

/* reCAPTCHA: its hidden textarea gets an inline style the CSP blocks, so hide it here. */
.captcha { margin-top: 16px; }
textarea.g-recaptcha-response { display: none; }

/* Honeypot: off-screen for people, still in the DOM for bots. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.foot { color: var(--muted); font-size: .85rem; padding-top: 24px; padding-bottom: 32px; }

/* Admin */
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; background: #fff; }
th, td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
td.text { min-width: 220px; }
td.buttons button { margin: 2px 0; padding: 4px 8px; font-size: .85rem; }
tr.inactive { color: var(--muted); }
.tag { display: inline-block; font-size: .75rem; padding: 0 6px; border-radius: 4px; background: var(--note-bg); }
.tag.warn { background: var(--warn-bg); }
.tag.ok { background: #e3f4e6; }
.tag.err { background: #fde7e5; color: var(--err); }
ol.steps li { margin: 6px 0; }
code { font-size: .9em; background: #f0f0ec; padding: 0 4px; border-radius: 4px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; align-items: center; }
.filters a { padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; font-size: .88rem; }
.filters a.active { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.filters .label { color: var(--muted); font-size: .88rem; margin-right: 2px; }
.summary a { text-decoration: none; }
.exports a { margin: 0 4px; }
