/* Warm paper (decision 8): #faf7f2 background, #1f1d1a text, terracotta #c4572e. */
:root {
    --bg: #faf7f2;
    --text: #1f1d1a;
    --accent: #c4572e;
    --accent-text: #ffffff;
    --card: #ffffff;
    --line: #e2dbcf;
    --muted: #6b645a;
    --error: #b3261e;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1a1816;
        --text: #f1ece4;
        --accent: #c4572e;
        --accent-text: #ffffff;
        --card: #252220;
        --line: #3a3531;
        --muted: #aaa196;
        --error: #ff8a80;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 1.0625rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

main { max-width: 34rem; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
main.wide, body.wide main { max-width: 60rem; }
header { margin-bottom: 1.5rem; }
.brand { color: var(--accent); font-weight: 700; font-size: 1.5rem; text-decoration: none; }
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
a { color: var(--accent); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: .75rem; padding: 1.25rem; margin-bottom: 1rem; }
label { display: block; font-weight: 600; margin: .75rem 0 .25rem; }
input[type=text], input[type=password], input[type=number], input:not([type]) {
    width: 100%; padding: .7rem .8rem; font: inherit; color: var(--text);
    background: var(--bg); border: 1px solid var(--line); border-radius: .5rem;
}
input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button, .button {
    display: inline-block; margin-top: 1rem; padding: .75rem 1.25rem; font: inherit; font-weight: 600;
    color: var(--accent-text); background: var(--accent); border: 0; border-radius: .5rem; cursor: pointer; text-decoration: none;
}
button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button.danger { background: var(--error); }
.error, .field-validation-error { color: var(--error); font-weight: 600; }
.muted { color: var(--muted); }
.ok { color: #2e7d32; font-weight: 600; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap { overflow-x: auto; }
.codes { font-family: ui-monospace, monospace; font-size: 1.1rem; columns: 2; list-style: none; padding: 0; }
.new-country { color: var(--error); font-weight: 700; }
.inline { display: inline; }
.inline button { margin-top: 0; }
.checks label { display: inline-block; font-weight: 400; margin-right: 1rem; }
code { word-break: break-all; }
