/* Registration pages: forms on the site's cream page, using the site's own colours and radii. */
.reg { max-width: 760px; gap: 16px; padding-bottom: 8px; }
.reg.wide { max-width: 1000px; }
.reg .r-head { display: flex; flex-direction: column; gap: 12px; padding: clamp(20px, 4vw, 44px) 0 8px; }
.reg .r-head h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.08; }
.reg .r-head .lede { max-width: 36em; }
.reg h2 { font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -.025em; }
.reg .tile { gap: 22px; padding: clamp(20px, 4vw, 40px); }
.reg .r-note { background: var(--accent-soft); border-radius: var(--r-md); padding: 14px 16px; font-size: 15px; color: var(--muted); }
.reg .r-note.warn { background: rgba(217,164,65,.16); color: var(--ink); }

.r-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.r-grid .full { grid-column: 1 / -1; }
.f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.f > label, .f > .label, fieldset > legend { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.f .opt { font-weight: 400; color: var(--faint); }
.f .hint { font-size: 13.5px; color: var(--muted); }
.f .code-status:empty { display: none; }
.reg input[type=text], .reg input[type=email], .reg input[type=tel], .reg select, .reg textarea {
  width: 100%; min-width: 0; font-size: 16px; padding: 11px 13px; background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-md); color: var(--ink); }
.reg textarea { min-height: 96px; resize: vertical; font-family: var(--mono); font-size: 14px; }
.reg #aid_note { font-family: inherit; font-size: 16px; }
.reg select { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1.5 5 5 5-5' fill='none' stroke='%231a2744' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center; }
.reg input:focus-visible, .reg select:focus-visible, .reg textarea:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 1px; border-color: var(--accent-ink); }
.reg [aria-invalid=true] { border-color: #a63d2f; background-color: #fff8f6; }
.err { color: #a63d2f; font-size: 13.5px; font-weight: 500; }
.err:empty { display: none; }
.r-form-err { color: #a63d2f; font-size: 15px; font-weight: 500; }
.r-form-err:empty { display: none; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.r-opts { display: flex; flex-direction: column; gap: 8px; }
.r-opt { display: flex; align-items: flex-start; gap: 12px; background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 12px 14px; cursor: pointer; font-size: 16px; }
.r-opt:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.r-opt input { margin: 4px 0 0; accent-color: var(--accent); flex: none; width: 17px; height: 17px; }
.r-opt .price { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 12px; }
.r-opt > span:first-of-type { min-width: 0; }
.r-check { display: flex; align-items: flex-start; gap: 12px; font-size: 15.5px; cursor: pointer; }
.r-check input { margin: 4px 0 0; accent-color: var(--accent); flex: none; width: 18px; height: 18px; }
.r-check span { min-width: 0; }
.r-privacy { font-size: 14px; color: var(--muted); border-left: 2px solid var(--line-2); padding-left: 14px; }

.r-step { font-size: 14px; font-weight: 600; color: var(--faint); }
.r-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.r-actions .btn[disabled] { opacity: .55; cursor: default; }
.reg input[type=file] { font-size: 15px; max-width: 100%; }

/* payment */
.r-pay { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 24px; align-items: start; }
.r-qr-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.r-qr { width: 100%; border-radius: var(--r-md); background: #fff; border: 1px solid var(--line-2); display: grid; place-items: center; overflow: hidden; }
.r-qr img { width: 100%; height: auto; object-fit: contain; display: block; }
.r-qr .ph { padding: 16px; text-align: center; border: 2px dashed var(--line-2); border-radius: var(--r-md); margin: 12px; color: var(--muted); font-size: 14px; }
.r-amount { font-size: clamp(30px, 6vw, 40px); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.r-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15.5px; }

/* done */
.r-id { font-family: var(--mono); font-size: clamp(20px, 5vw, 28px); font-weight: 600; letter-spacing: .02em; background: var(--accent-soft); border-radius: var(--r-md); padding: 14px 18px; align-self: flex-start; overflow-wrap: anywhere; }

/* honeypot: off-screen, not display:none, so simple bots still fill it */
.r-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* student table */
.r-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.r-tools .btn { padding: 8px 16px; font-size: 15px; }
.r-count { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.r-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.r-table th { text-align: left; font-size: 13.5px; font-weight: 600; color: var(--faint); padding: 0 6px 8px; white-space: nowrap; }
.r-table td { padding: 4px 6px; vertical-align: top; }
.r-table td.n { width: 32px; color: var(--faint); padding-top: 14px; font-variant-numeric: tabular-nums; }
.r-table td.c { text-align: center; padding-top: 12px; }
.r-table td.c input { width: 18px; height: 18px; accent-color: var(--accent); }
.r-table .rm { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; padding: 10px 6px; text-decoration: underline; text-underline-offset: .2em; }
.r-table input, .r-table select { padding: 9px 10px; }
.r-table td .err { margin-top: 4px; }
.r-scroll { overflow-x: auto; margin: 0 -6px; }
.tile .r-hint-row { font-size: 13.5px; color: var(--muted); }

@media (max-width: 760px) {
  .r-grid { grid-template-columns: minmax(0, 1fr); }
  .r-pay { grid-template-columns: minmax(0, 1fr); }
  .r-qr-col { max-width: 260px; }
  .r-table, .r-table tbody, .r-table tr, .r-table td { display: block; width: 100%; }
  .r-table thead { display: none; }
  .r-table tr { border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 12px; margin-bottom: 12px; background: var(--bg); position: relative; }
  .r-table td { padding: 5px 0; }
  .r-table td[data-label]::before { content: attr(data-label); display: block; font-size: 13px; font-weight: 600; color: var(--faint); margin-bottom: 3px; }
  .r-table td.n { width: auto; padding: 0 0 4px; font-weight: 600; color: var(--ink); }
  .r-table td.c { text-align: left; display: flex; align-items: center; gap: 10px; padding-top: 8px; }
  .r-table td.c::before { margin: 0; }
  .r-table td.x { text-align: right; }
  .r-scroll { margin: 0; overflow: visible; }
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Forms show at once: the site's scroll-reveal would hide messages and steps that appear after the page loads. */
.reg > :not(.r-head) :is(h2, h3, p, a, .actions, .f, fieldset, .r-opt) { opacity: 1 !important; transform: none !important; filter: none !important; }

.wa-join { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; background: var(--accent-soft); border-radius: var(--r-md); padding: 18px 20px; margin: 8px 0; }
.wa-join img { width: 140px; height: 140px; border-radius: 12px; background: #fff; flex: none; }
.wa-join p { margin: 0 0 8px; }
.wa-join .btn { margin-top: 4px; }
