:root { --ink: #111; --muted: #666; --line: #dcdcdc; --bg: #f2f2f2; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1 { text-wrap: balance; }
p, .help, .label, .agree span { text-wrap: pretty; }
a { color: var(--ink); }
.page { max-width: 640px; margin: 0 auto; padding: 28px 16px 40px; }

.top { text-align: center; margin-bottom: 20px; }
.logo { width: 100%; max-width: 380px; height: auto; display: inline-block; }
.top h1 { font-size: 26px; margin: 18px 0 6px; }
.top p { margin: 0; color: var(--muted); }

.card { background: #fff; border: 1px solid var(--line); border-top: 6px solid var(--ink); border-radius: 10px; padding: 26px 22px; }
.notice { background: #fff8e1; border: 1px solid #f0d98a; border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }

.field { display: block; margin: 0 0 24px; padding: 0; border: 0; min-width: 0; }
.label { display: block; font-weight: 600; margin-bottom: 8px; padding: 0; }
em { color: #c62828; font-style: normal; }
.help { display: block; font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.center { text-align: center; }

input[type=text], input[type=email], textarea, select {
  width: 100%; font: inherit; color: inherit; padding: 10px 12px;
  border: 1px solid #bbb; border-radius: 6px; background: #fff;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.invalid { border-color: #c62828 !important; outline-color: #c62828 !important; }

.student-row { display: flex; gap: 8px; margin-bottom: 8px; }
.student-row button { flex: none; width: 42px; border: 1px solid #bbb; border-radius: 6px; background: #fff; font-size: 20px; color: var(--muted); cursor: pointer; }
.link-btn { background: none; border: 0; padding: 2px 0; font-family: inherit; font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: underline; cursor: pointer; }

.choices { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.choices.stack { flex-direction: column; }
.choices label { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.choices input, .agree input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); flex: none; }

.agree { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; cursor: pointer; margin-bottom: 20px; }
.agree input { margin-top: 3px; }

.total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 16px; font-size: 18px; }
.total strong { font-size: 22px; }

.error { color: #b71c1c; background: #fdecec; border-radius: 6px; padding: 10px 12px; margin: 14px 0 0; }
.btn { display: block; width: 100%; margin-top: 16px; padding: 15px; border: 0; border-radius: 8px; background: var(--ink); color: #fff; font-family: inherit; font-size: 18px; font-weight: 700; cursor: pointer; }
.btn:hover { background: #333; }
.btn:disabled { opacity: .6; cursor: wait; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 16px; z-index: 10; }
.modal[hidden] { display: none; }
.modal-card { background: #fff; border-radius: 12px; padding: 24px 22px; max-width: 440px; width: 100%; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.modal-card h2 { margin: 0 0 10px; font-size: 21px; }
.modal-card p { margin: 0 0 10px; }
.modal-btns { display: flex; gap: 10px; margin-top: 8px; }
.modal-btns .btn { margin-top: 8px; font-size: 16px; padding: 13px; }
.btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.ghost:hover { background: #f2f2f2; }

.foot { text-align: center; color: var(--muted); font-size: 14px; margin-top: 20px; }

.thanks { text-align: center; }
.thanks .check { width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 30px; margin: 0 auto 10px; }
.thanks h2 { margin: 0 0 8px; }
.thanks ol { text-align: left; margin: 16px 0 0; padding-left: 22px; }
.thanks li { margin-bottom: 8px; }
