/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #1d1d1f;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

a { color: #0071e3; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Page layout ── */
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 24px 96px;
}

/* ── Typography ── */
.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #6e6e73;
  margin-bottom: 10px;
}

.page-header { margin-bottom: 12px; }

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 0.95rem;
  color: #6e6e73;
}

hr {
  border: none;
  border-top: 1px solid #d2d2d7;
  margin: 36px 0;
}

.md-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 14px;
}

.md-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
  color: #1d1d1f;
}

.md-section p {
  color: #3d3d3f;
  margin-bottom: 12px;
}

.md-section ul,
.md-section ol {
  padding-left: 1.4rem;
  color: #3d3d3f;
  margin-bottom: 12px;
}

.md-section ul { list-style: disc; }
.md-section ol { list-style: decimal; }

.md-section li { margin-bottom: 4px; }

/* ── Table ── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid #d2d2d7;
}

th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #6e6e73;
}

td { color: #3d3d3f; }
tr:last-child td { border-bottom: none; }

/* ── Actions ── */
.actions-section {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 4px;
}

.btn-register {
  background: #0071e3;
  color: #fff;
  border: none;
  padding: 11px 24px;
  border-radius: 980px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .2s;
}
.btn-register:hover { opacity: .85; }

.btn-terms {
  font-size: 0.9rem;
  color: #0071e3;
  border: 1px solid #d2d2d7;
  padding: 10px 22px;
  border-radius: 980px;
  transition: border-color .2s;
}
.btn-terms:hover { border-color: #0071e3; text-decoration: none; }

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal {
  background: #fff;
  border: 1px solid #d2d2d7;
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
}

.modal-close {
  position: absolute;
  top: 13px; right: 15px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #f5f5f7;
  border: none;
  color: #6e6e73;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.modal-close:hover { background: #d2d2d7; }

.modal-header {
  padding: 26px 28px 18px;
  border-bottom: 1px solid #d2d2d7;
  flex-shrink: 0;
}
.modal-header h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 2px; }
.modal-header p { font-size: 0.82rem; color: #6e6e73; }

.reg-form {
  overflow-y: auto;
  padding: 22px 28px;
  flex: 1;
}

.form-section { margin-bottom: 24px; }
.form-section h3 {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #6e6e73;
  margin-bottom: 14px;
  padding-bottom: 7px;
  border-bottom: 1px solid #d2d2d7;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.form-group label { font-size: 0.84rem; font-weight: 500; }
.req { color: #c0392b; }

.form-group input,
.form-group select {
  background: #f5f5f7;
  border: 1px solid #d2d2d7;
  border-radius: 8px;
  color: #1d1d1f;
  padding: 9px 11px;
  font-size: 0.88rem;
  font-family: inherit;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #0071e3;
  box-shadow: 0 0 0 3px rgba(0,113,227,.1);
  background: #fff;
}
.form-group input::placeholder { color: #b0b0b8; }

.checkbox-group label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-weight: 400;
  font-size: 0.84rem;
  color: #3d3d3f;
  cursor: pointer;
}
.checkbox-group input[type="checkbox"] {
  width: 15px; height: 15px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: #0071e3;
  cursor: pointer;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 28px;
  border-top: 1px solid #d2d2d7;
  flex-shrink: 0;
}

.btn-cancel {
  background: transparent;
  color: #6e6e73;
  border: 1px solid #d2d2d7;
  padding: 9px 18px;
  border-radius: 980px;
  font-size: 0.86rem;
  font-family: inherit;
  cursor: pointer;
}
.btn-cancel:hover { border-color: #6e6e73; }

.btn-submit {
  background: #0071e3;
  color: #fff;
  border: none;
  padding: 9px 20px;
  border-radius: 980px;
  font-size: 0.86rem;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .2s;
}
.btn-submit:hover { opacity: .85; }

.reg-success {
  padding: 48px 28px;
  text-align: center;
}
.success-mark {
  font-size: 2rem;
  color: #1d7a4e;
  margin-bottom: 12px;
}
.reg-success h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.reg-success p { font-size: 0.88rem; color: #6e6e73; margin-bottom: 24px; }
.hidden { display: none !important; }

/* ── Terms page ── */
.terms-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 24px 96px;
}

.back-link {
  display: inline-block;
  font-size: 0.86rem;
  color: #0071e3;
  margin-bottom: 32px;
}
.back-link:hover { text-decoration: underline; }

.terms-page-header { margin-bottom: 40px; padding-bottom: 32px; border-bottom: 1px solid #d2d2d7; }
.terms-page-header h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; letter-spacing: -.03em; margin-bottom: 8px; }
.terms-page-header p { font-size: 0.92rem; color: #6e6e73; }
.terms-meta { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 14px; font-size: 0.82rem; color: #6e6e73; }
.terms-meta strong { color: #1d1d1f; }

.terms-toc {
  background: #f5f5f7;
  border: 1px solid #d2d2d7;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 44px;
}
.terms-toc h2 { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: #6e6e73; margin-bottom: 12px; }
.terms-toc ol { list-style: decimal; padding-left: 1.2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 5px 28px; }
.terms-toc ol li { font-size: 0.86rem; }

.terms-article section { padding: 0; margin-bottom: 44px; }
.terms-article h2 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #d2d2d7; }
.terms-article h3 { font-size: 0.92rem; font-weight: 600; margin: 16px 0 7px; }
.terms-article p { font-size: 0.9rem; color: #3d3d3f; line-height: 1.75; margin-bottom: 9px; }
.terms-article ol { list-style: upper-roman; padding-left: 1.4rem; margin-bottom: 9px; }
.terms-article ol li { font-size: 0.9rem; color: #3d3d3f; line-height: 1.75; margin-bottom: 7px; }
.terms-article ul { list-style: disc; padding-left: 1.2rem; margin-bottom: 9px; }
.terms-article ul li { font-size: 0.9rem; color: #3d3d3f; line-height: 1.75; margin-bottom: 5px; }
.terms-article strong { color: #1d1d1f; }

.terms-highlight {
  background: #f5f5f7;
  border-left: 3px solid #0071e3;
  padding: 11px 16px;
  border-radius: 0 6px 6px 0;
  margin: 12px 0;
}
.terms-highlight p { margin-bottom: 0; font-size: 0.88rem; }

.terms-footer-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #d2d2d7;
  padding-top: 28px;
  margin-top: 56px;
  flex-wrap: wrap;
  gap: 14px;
}
.terms-footer-nav p { font-size: 0.8rem; color: #6e6e73; }
.terms-footer-nav a {
  background: #0071e3;
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 980px;
  font-size: 0.86rem;
  font-weight: 500;
}
.terms-footer-nav a:hover { opacity: .85; text-decoration: none; }

/* ── Terms checkbox ── */
.terms-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #3a3a3c;
  cursor: pointer;
  user-select: none;
}
.terms-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #0071e3;
}
.register-footnote {
  font-size: 0.8rem;
  color: #8e8e93;
  margin-top: 6px;
}
.btn-register.disabled {
  background: #b0c4de;
  pointer-events: none;
  cursor: not-allowed;
}
.terms-checkbox--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.terms-checkbox--disabled input {
  cursor: not-allowed;
}

/* ── Timeline ── */
.timeline-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.timeline-table tbody tr {
  border-bottom: 1px solid #e5e5ea;
}
.timeline-table tbody tr:last-child {
  border-bottom: none;
}
.tl-date {
  white-space: nowrap;
  font-weight: 600;
  color: #1d1d1f;
  padding: 12px 24px 12px 0;
  vertical-align: top;
  width: 130px;
}
.tl-event {
  color: #3a3a3c;
  padding: 12px 0;
  vertical-align: top;
}
.timeline-past .tl-date,
.timeline-past .tl-event {
  color: #8e8e93;
}

/* ── Responsive ── */
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
  .modal-header, .reg-form { padding: 18px 20px; }
  .form-actions { padding: 12px 20px; }
  .terms-toc ol { grid-template-columns: 1fr; }
  .terms-meta { flex-direction: column; gap: 6px; }
}
