:root {
  color-scheme: light;
  --paper: #ffffff;
  --canvas: #f3f1e9;
  --ink: #171717;
  --muted: #746f60;
  --line: #e6e0cf;
  --gold: #d2ba6b;
  --gold-dark: #9a8036;
  --black: #111111;
  --red: #a53e33;
  --font: "Heebo", "Arial", sans-serif;
  --display: "Rubik", "Heebo", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 82px; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.8; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.topbar { height: 62px; display: flex; align-items: center; justify-content: space-between; padding-inline: max(calc((100vw - 900px) / 2), 28px); background: var(--black); color: #f7f6f1; }
.wordmark { display: inline-flex; align-items: center; gap: 12px; font-size: 12px; color: #e3dcc7; }
.wordmark-mark { font: 700 17px/1 var(--display); letter-spacing: 0; color: var(--gold); }
.wordmark-divider { height: 18px; width: 1px; background: #625a43; }
.topbar-link { font-size: 12px; color: #f7f6f1; }
.topbar-link span { display: inline-block; margin-inline-start: 5px; color: var(--gold); }
.page-layout { max-width: 900px; margin: 0 auto; padding: 46px 28px 90px; }
.document { min-width: 0; padding: 34px 62px 38px; background: var(--paper); border: 1px solid #e6e0cf; direction: rtl; box-shadow: 0 12px 40px rgb(31 28 20 / 5%); }
.document-meta { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 15px; border-bottom: 1px solid var(--line); color: #7d8780; font-size: 10px; }
.meta-slash { padding-inline: 5px; color: var(--gold-dark); }
.document-heading { padding-top: 35px; }
.eyebrow { margin: 0 0 9px; color: var(--gold-dark); font-size: 11px; font-weight: 600; }
h1 { margin: 0; font-family: var(--display); font-size: clamp(32px, 4vw, 43px); line-height: 1.18; letter-spacing: 0; font-weight: 600; }
.course-line { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 18px; color: #302d24; font-size: 13px; font-weight: 500; }
.course-marker { width: 9px; height: 9px; background: var(--gold); border: 2px solid var(--gold-dark); transform: rotate(45deg); }
.course-separator { color: #9aa39c; }
.intro { max-width: 590px; margin: 22px 0 0; color: #59665e; font-size: 14px; line-height: 1.9; }
.terms-section { padding-top: 26px; margin-top: 25px; border-top: 1px solid var(--line); scroll-margin-top: 28px; }
.section-heading { display: flex; align-items: baseline; gap: 13px; margin-bottom: 10px; }
.section-heading > span { color: var(--gold-dark); font-family: var(--display); font-size: 12px; font-weight: 600; direction: ltr; }
.section-heading h2 { margin: 0; font-size: 17px; line-height: 1.5; font-weight: 600; }
.terms-section p, .terms-section li { color: #4a5750; font-size: 13px; line-height: 1.95; }
.terms-section p { margin: 10px 0 0; }
.terms-section ul { margin: 8px 0 0; padding: 0 20px 0 0; }
.terms-section li { padding-inline-start: 4px; margin: 4px 0; }
.terms-section li::marker { color: var(--gold-dark); font-size: 10px; }
.registration-section { margin-top: 34px; padding-top: 28px; border-top: 2px solid var(--gold); scroll-margin-top: 25px; }
.registration-section > .section-heading { margin-bottom: 14px; }
.registration-section > .section-heading h2 { font-size: 20px; }
.declaration { margin: 12px 0; color: #48554e; font-size: 13px; line-height: 2; }
#registration-form { margin-top: 27px; padding-top: 22px; border-top: 1px solid var(--line); }
.form-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.form-heading h3 { margin: 0; font-size: 15px; font-weight: 600; }
.form-heading > span { color: var(--muted); font-size: 10px; }
.fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 18px; }
.field { min-width: 0; display: grid; gap: 5px; color: #3c382e; font-size: 12px; font-weight: 500; }
.field-wide { grid-column: 1 / -1; }
.field input { width: 100%; height: 43px; padding: 0 12px; border: 1px solid #d9d4c6; border-radius: 2px; background: #fff; color: var(--ink); font-size: 13px; outline: none; transition: border-color .15s, box-shadow .15s; }
.field input::placeholder { color: #a3aca5; }
.field input:focus { border-color: var(--gold-dark); box-shadow: 0 0 0 3px rgb(210 186 107 / 22%); }
.field input[aria-invalid="true"] { border-color: var(--red); }
.signature-block { margin-top: 23px; }
.signature-label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.signature-label label { color: #3c382e; font-size: 12px; font-weight: 600; }
.signature-label span, .signature-controls { color: var(--muted); font-size: 10px; }
.signature-frame { position: relative; height: 142px; overflow: hidden; border: 1px solid #d9d4c6; background-color: #fff; background-image: linear-gradient(90deg, rgb(154 128 54 / 5%) 1px, transparent 1px), linear-gradient(rgb(154 128 54 / 5%) 1px, transparent 1px); background-size: 22px 22px; touch-action: none; }
#signature-pad { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; touch-action: none; cursor: crosshair; }
.signature-placeholder { position: absolute; top: 45px; right: 0; left: 0; color: #b7c0b9; text-align: center; font-size: 17px; pointer-events: none; transition: opacity .15s; }
.signature-frame.has-signature .signature-placeholder { opacity: 0; }
.signature-baseline { position: absolute; right: 24px; bottom: 30px; left: 24px; border-bottom: 1px dashed #d4cba9; pointer-events: none; }
.signature-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 5px; }
#signature-status.signed { color: var(--gold-dark); }
.clear-signature { padding: 2px 0; border: 0; background: transparent; color: #625c4d; font-size: 11px; cursor: pointer; }
.clear-signature span { margin-inline-end: 4px; font-size: 15px; vertical-align: -1px; }
.consent-row { position: relative; display: flex; align-items: flex-start; gap: 10px; margin-top: 24px; color: #3c382e; font-size: 12px; cursor: pointer; }
.consent-row input { position: absolute; width: 19px; height: 19px; opacity: 0; }
.checkbox-ui { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 3px; border: 1px solid #aeb9af; border-radius: 2px; background: #fff; }
.consent-row input:checked + .checkbox-ui { border-color: var(--black); background: var(--black); }
.consent-row input:checked + .checkbox-ui::after { content: ""; display: block; width: 8px; height: 4px; margin: 4px 4px 0 0; border-right: 2px solid white; border-bottom: 2px solid white; transform: rotate(45deg); }
.consent-row input:focus-visible + .checkbox-ui { outline: 3px solid rgb(210 186 107 / 45%); }
.form-error { margin: 12px 0 0; color: var(--red); font-size: 12px; }
.submit-button { width: 100%; min-height: 49px; display: flex; justify-content: space-between; align-items: center; margin-top: 20px; padding: 0 16px; border: 0; border-radius: 2px; background: var(--black); color: white; font-size: 13px; font-weight: 500; cursor: pointer; transition: background .15s; }
.submit-button:hover { background: #302b1d; }
.submit-button span:last-child { color: var(--gold); font-size: 20px; }
.submit-button:disabled { opacity: .65; cursor: wait; }
.privacy-note { margin: 8px 0 0; color: #7e8981; font-size: 10px; line-height: 1.7; }
.submission-result { display: grid; grid-template-columns: 34px 1fr auto; gap: 13px; align-items: center; margin-top: 20px; padding: 16px; border: 1px solid #d7c78e; background: #fbf8ed; }
.submission-result.is-error { border-color: #d9b8b2; background: #fbf3f1; }
.result-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: var(--black); color: var(--gold); font-size: 17px; }
.submission-result.is-error .result-mark { background: var(--red); color: #fff; }
.submission-result h3 { margin: 0; font-size: 13px; }
.submission-result p { margin: 2px 0 0; color: #657269; font-size: 11px; line-height: 1.6; }
.download-button { padding: 8px 10px; border: 1px solid #d7c78e; border-radius: 2px; background: #fff; color: var(--black); font-size: 11px; cursor: pointer; white-space: nowrap; }
.download-button span { margin-inline-start: 5px; color: var(--gold-dark); }
.document-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; margin-top: 34px; padding-top: 15px; border-top: 1px solid var(--line); color: #7e8981; font-size: 10px; }
.document-footer a { color: var(--gold-dark); }
[hidden] { display: none !important; }

@media (max-width: 900px) {
  .page-layout { max-width: 790px; padding-top: 25px; }
  .document { padding: 32px 48px; }
}

@media (max-width: 560px) {
  body { font-size: 14px; }
  .topbar { height: 55px; padding-inline: 17px; }
  .wordmark { gap: 8px; font-size: 10px; }
  .wordmark-mark { font-size: 15px; }
  .topbar-link { font-size: 11px; }
  .page-layout { padding: 15px 10px 44px; }
  .document { padding: 24px 20px; }
  .document-meta { font-size: 9px; }
  .document-heading { padding-top: 27px; }
  h1 { font-size: 34px; }
  .course-line { gap: 7px; font-size: 12px; }
  .intro { font-size: 13px; }
  .terms-section { padding-top: 20px; margin-top: 20px; }
  .section-heading h2 { font-size: 16px; }
  .terms-section p, .terms-section li, .declaration { font-size: 12px; }
  .terms-section ul { padding-right: 18px; }
  .registration-section { margin-top: 27px; padding-top: 22px; }
  .registration-section > .section-heading h2 { font-size: 18px; }
  .fields-grid { grid-template-columns: 1fr; gap: 12px; }
  .field-wide { grid-column: auto; }
  .signature-frame { height: 130px; }
  .submission-result { grid-template-columns: 32px 1fr; }
  .download-button { grid-column: 1 / -1; justify-self: start; }
  .document-footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}