:root {
  --bg: #f4efe8; --card: #fffdf9; --ink: #2b2620; --muted: #7a6f63; --line: #e3d9cc;
  --accent: #b5562b; --accent-ink: #fff; --error: #b3261e; --radius: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1c1916; --card: #262220; --ink: #f1ebe3; --muted: #a89d90; --line: #3a342e; --accent: #e07a4a; --error: #ff8a80; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
.card { max-width: 640px; margin: 32px auto; padding: 28px clamp(16px, 5vw, 36px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.brand { margin: 0; font: 700 1.6rem/1 Georgia, serif; color: var(--accent); }
h1 { margin: .3em 0 .6em; font-size: 1.5rem; }
.curso { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); border-radius: 0 8px 8px 0; margin-bottom: 20px; }
.curso span { color: var(--muted); }
.curso .price { color: var(--ink); font-size: 1.35rem; font-weight: 700; margin-top: 4px; }
.curso .price em { font-size: .85rem; font-weight: 400; font-style: normal; color: var(--muted); }
.curso .next { font-size: .85rem; }
form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 16px; margin: 0; }
fieldset[hidden] { display: none; }
legend { font-weight: 600; padding: 0 6px; }
legend small { display: block; font-weight: 400; color: var(--muted); }
.full { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; font-weight: 500; }
input, select { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); width: 100%; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; }
label.check input { width: 18px; height: 18px; accent-color: var(--accent); }
label.invalid input, label.invalid select { border-color: var(--error); }
.msg, .error { color: var(--error); font-size: .82rem; font-weight: 400; }
a { color: var(--accent); }
button, .button { display: inline-block; text-align: center; text-decoration: none; font: 600 1rem system-ui, sans-serif; padding: 13px 18px; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
button:disabled { opacity: .6; cursor: progress; }
.hint { margin: -4px 0 0; text-align: center; color: var(--muted); font-size: .85rem; }
.result { text-align: center; }
.prose { line-height: 1.65; }
@media (max-width: 560px) { form, fieldset { grid-template-columns: 1fr; } .card { margin: 0; border-radius: 0; border: 0; min-height: 100vh; } }
/* admin */
.admin { max-width: none; margin: 0; padding: 20px 16px; }
.admin nav { margin-bottom: 12px; }
.admin nav a[aria-current] { font-weight: 700; text-decoration: none; color: var(--ink); }
.scroll { overflow-x: auto; }
.admin table { border-collapse: collapse; font-size: .85rem; white-space: nowrap; }
.admin th, .admin td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.admin small { color: var(--muted); font-weight: 400; }
