:root { color-scheme: light dark; --bg: #fafaf8; --fg: #1d1d1b; --muted: #66665f; --accent: #0b5cad; --danger: #b3261e; --line: #d8d8d2; --radius: 8px; }
@media (prefers-color-scheme: dark) { :root { --bg: #151514; --fg: #f1f1ec; --muted: #a2a29a; --accent: #7db7f5; --danger: #f2877f; --line: #3a3a36; } }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 1rem/1.5 system-ui, sans-serif; background: var(--bg); color: var(--fg); }
header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
header nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.brand { font-weight: 700; color: inherit; text-decoration: none; }
main { max-width: 36rem; margin: 0 auto; padding: 1rem; }
h1 { font-size: 1.5rem; line-height: 1.2; margin: .5rem 0 1rem; }
h2 { font-size: 1.15rem; }
a { color: var(--accent); }
label { display: block; font-weight: 600; margin: 1rem 0 .25rem; }
input[type=email], input[type=text] { width: 100%; min-height: 2.75rem; padding: .5rem .75rem; font: inherit; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: inherit; }
input[name=code] { font-size: 1.5rem; letter-spacing: .3em; text-align: center; }
button { min-height: 2.75rem; padding: .5rem 1.25rem; font: inherit; font-weight: 600; border: 0; border-radius: var(--radius); background: var(--accent); color: var(--bg); cursor: pointer; margin-top: 1rem; }
button.danger { background: var(--danger); }
button.link { background: none; color: var(--accent); padding: 0 .25rem; min-height: 2.75rem; margin: 0; text-decoration: underline; }
form { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.error { color: var(--danger); font-weight: 600; }
.note, .muted { color: var(--muted); font-size: .9rem; }
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .5rem 1rem; background: #fff3c4; color: #3d3200; }
.banner .link { color: #3d3200; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.list button { margin: 0; }
pre { overflow-x: auto; white-space: pre-wrap; word-break: break-word; }

input[type=text], textarea, select { width: 100%; min-height: 2.75rem; padding: .5rem .75rem; font: inherit; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: inherit; }
textarea { min-height: 5rem; }
input[aria-invalid=true] { border-color: var(--danger); }
label.check { display: flex; align-items: center; gap: .5rem; min-height: 2.75rem; }
label.check input { width: 1.5rem; height: 1.5rem; }
.btn { display: inline-block; min-height: 2.75rem; padding: .6rem 1.25rem; font-weight: 600; border-radius: var(--radius); background: var(--accent); color: var(--bg); text-decoration: none; }
.btn.small, button.small { min-height: 2.75rem; min-width: 2.75rem; padding: .5rem .9rem; margin: 0; font-size: .9rem; }
button.small[disabled] { opacity: .4; cursor: not-allowed; }
.grow { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.move { display: flex; gap: .25rem; }
.status { border: 1px solid var(--line); border-radius: var(--radius); padding: .25rem 1rem; margin: 1rem 0; }
.status h2 { margin: .5rem 0 0; }
.status-failed { border-color: var(--danger); }
.status-pending { border-style: dashed; }
input[type=tel], input[type=time] { width: 100%; min-height: 2.75rem; padding: .5rem .75rem; font: inherit; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: inherit; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); margin: 1rem 0; padding: .25rem 1rem 1rem; min-width: 0; }
legend { font-weight: 700; padding: 0 .25rem; }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.range label { font-weight: 400; font-size: .9rem; margin: .5rem 0 .25rem; }
summary { min-height: 2.75rem; display: flex; align-items: center; cursor: pointer; color: var(--accent); }
.thumb { width: 6.5rem; height: auto; max-height: 8rem; object-fit: cover; border-radius: var(--radius); }
input[type=file] { display: block; width: 100%; min-height: 2.75rem; font: inherit; }
/* Touch targets: links that stand on their own are as tall as buttons. Links inside a sentence stay inline. */
header a, .list a:not(.btn), .crumbs a, p:not(.note) > a:only-child:not(.btn) { display: inline-flex; align-items: center; min-height: 2.75rem; }
p.note > a { display: inline-block; padding-block: .25rem; }
p:has(> .btn) { display: flex; flex-wrap: wrap; gap: .5rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; }
