* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  min-height: 100vh;
  background: #ffffff;
  font-family: 'DM Sans', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 12px;
}

.content-section h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #212C3F;
  font-family: 'Instrument Sans', sans-serif;
  margin-bottom: 12px;
}

.divider {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 12px 0;
}

.form-line {
  font-size: 0.8rem;
  color: #212C3F;
  margin-bottom: 6px;
  line-height: 1.6;
}

.form-line a {
  color: #0066cc !important;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.form-line a:hover {
  text-decoration: underline;
  color: #0044aa;
}

.form-line-w9 {
  font-size: 1.05rem;
  color: #212C3F;
  margin-bottom: 12px;
  line-height: 1.6;
}

.form-line-w9 a {
  color: #0066cc !important;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.form-line-w9 a:hover {
  text-decoration: underline;
  color: #0044aa;
}

.bold-note {
  font-weight: 400;
  color: #212C3F;
  margin-top: 14px;
  font-size: 0.8rem;
}

.note {
  font-size: 0.7rem;
  color: #888;
  margin-top: -20px;
}

#error-msg {
  display: none;
  color: #C10A1C;
  font-size: 0.9rem;
  margin-top: 16px;
}

#loading-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}

#loading-overlay.show {
  display: flex;
}

#loading-overlay p {
  color: #555;
  font-size: 1rem;
}

dialog {
  position: fixed !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
}

dialog::backdrop {
  background: transparent !important;
}

@media (min-width: 576px) {
  body { padding: 24px 16px; }
  .content-section h2 { font-size: 1.2rem; }
  .form-line { font-size: 0.9rem !important; }
  .form-line-w9 { font-size: 1.15rem !important; }
  .note { font-size: 0.8rem !important; white-space: normal !important; }
  .bold-note { font-size: 0.9rem !important; }
}

@media (min-width: 768px) {
  body { justify-content: center; padding: 30px 20px; }
  .content-section h2 { font-size: 1.3rem; }
  .form-line { font-size: 1rem !important; }
  .form-line-w9 { font-size: 1.3rem !important; }
  .note { font-size: 0.9rem !important; white-space: normal !important; }
  .bold-note { font-size: 1rem !important; }
}

@media (min-width: 992px) {
  body { padding: 40px 20px; }
  .content-section h2 { font-size: 1.4rem; }
  .form-line { font-size: 1.1rem !important; }
  .form-line-w9 { font-size: 1.5rem !important; }
  .note { font-size: 1rem !important; }
  .bold-note { font-size: 1.1rem !important; }
}

@media (min-width: 1200px) {
  .content-section h2 { font-size: 1.59rem; }
  .form-line { font-size: 1.15rem !important; }
  .form-line-w9 { font-size: 1.5rem !important; }
  .note { font-size: 1rem !important; white-space: nowrap !important; }
  .bold-note { font-size: 1.15rem !important; }
}

#popup-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 99998;
}

#popup-overlay.show {
  display: block;
}

#status-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 12px;
  padding: 30px 40px;
  text-align: center;
  z-index: 99999;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  min-width: 300px;
  max-width: 90vw;
}

#status-popup.show {
  display: block;
}

.logo {
  max-height: 82px;
}

.form-line-spaced {
  margin-bottom: 12px;
}

.form-line-encrypted {
  color: #212C3F;
  margin-top: 0;
  margin-bottom: -10px;
}

.form-line a.form-link-bold {
  font-weight: 700;
}

.bold-note-spaced {
  margin-top: 20px;
  color: #212C3F;
}

.note-bottom {
  margin-top: 50px;
}

.note-contact-link {
  color: #0066cc;
  font-weight: 400;
}

#popup-title {
  margin-bottom: 12px;
}

#popup-message {
  font-size: 0.95rem;
  margin-bottom: 20px;
  color: #212C3F;
}

#status-popup button {
  border: none;
  padding: 8px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  color: white;
}
