.rj-page {
  box-sizing: border-box;
  width: 100%;
  background: #f4f6f8;
  padding: 20px 16px 32px;
  font-family: Arial, Helvetica, sans-serif;
  color: #263238;
}

.rj-page *,
.rj-page *::before,
.rj-page *::after {
  box-sizing: border-box;
}

.rj-card {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dfe4e8;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(25, 45, 55, 0.09);
}

.rj-heading {
  display: block;
  width: 100%;
  margin: 0;
  padding: 18px 26px;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #00796b, #009688);
}

.rj-heading .rj-kicker {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rj-heading h1 {
  width: 100%;
  margin: 0 0 8px;
  padding: 0;
  color: #fff;
  font-size: 26px;
  line-height: 1.25;
  text-align: center;
}

.rj-heading p {
  width: 100%;
  margin: 0;
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.rj-card form {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 20px 24px 24px;
  text-align: left;
}

.rj-card fieldset {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0 0 20px;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid #dfe4e8;
}

.rj-card legend {
  width: auto;
  margin: 0 auto;
  padding: 0 14px;
  color: #00695c;
  background: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.rj-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 20px;
  align-items: start;
}

.rj-grid label,
.rj-consent {
  display: flex;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  color: #263238;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
}

.rj-grid label {
  flex-direction: column;
  gap: 5px;
}

.rj-grid .rj-wide {
  grid-column: 1 / -1;
}

.rj-grid input,
.rj-grid select,
.rj-grid textarea {
  display: block;
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  margin: 0;
  padding: 8px 10px;
  color: #263238;
  background: #fff;
  border: 1px solid #bfc8ce;
  border-radius: 7px;
  font: 400 15px/1.4 Arial, Helvetica, sans-serif;
  text-align: left;
}

.rj-grid textarea {
  min-height: 72px;
  resize: vertical;
}

.rj-grid select option {
  display: block !important;
  color: #263238 !important;
  background: #fff !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
}

.rj-grid input[type="file"] {
  min-height: 38px;
  padding: 6px;
}

.rj-grid input:focus,
.rj-grid select:focus,
.rj-grid textarea:focus {
  outline: 3px solid rgba(0, 150, 136, 0.15);
  border-color: #00897b;
}

.rj-grid small {
  display: block;
  color: #687078;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.rj-consent {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
  font-weight: 400;
  cursor: pointer;
}

.rj-rules {
  display: block;
  width: 100%;
  margin: 2px 0 14px;
  padding: 14px 16px;
  color: #263238;
  background: #f1fbf9;
  border: 1px solid #a7d9d2;
  border-left: 4px solid #00897b;
  border-radius: 8px;
}

.rj-rules summary {
  width: 100%;
  margin: 0;
  padding: 0;
  color: #00695c;
  font-size: 18px;
  line-height: 1.3;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
}

.rj-rules[open] summary {
  margin-bottom: 12px;
}

.rj-rules ol {
  display: block !important;
  width: 100%;
  margin: 0;
  padding-left: 0;
  list-style: none !important;
  counter-reset: representative-rule;
}

.rj-rules li {
  display: flex !important;
  width: 100%;
  margin: 0 0 7px;
  padding-left: 0;
  list-style: none !important;
  counter-increment: representative-rule;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}

.rj-rules li::before {
  content: counter(representative-rule) ".";
  display: inline-block !important;
  flex: 0 0 26px;
  width: 26px;
  color: #00695c;
  font-size: 14px !important;
  font-weight: 800;
  line-height: 1.5;
}

.rj-rules li:last-child {
  margin-bottom: 0;
}

.rj-consent input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px !important;
  max-width: 18px !important;
  height: 18px;
  margin: 1px 0 0;
  padding: 0;
  accent-color: #00897b;
}

.rj-actions {
  display: flex;
  width: 100%;
  gap: 12px;
  margin-top: 16px;
}

.rj-actions button {
  display: inline-flex;
  width: auto !important;
  max-width: none !important;
  min-width: 150px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 12px 22px;
  color: #fff;
  background: #00897b;
  border: 0;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.rj-actions .rj-reset {
  min-width: 100px;
  color: #37474f;
  background: #eceff1;
}

.rj-alert {
  margin: 20px 32px 0;
  padding: 13px 15px;
  border-radius: 7px;
  font-size: 14px;
  line-height: 1.5;
}

.rj-alert-error {
  color: #a3241e;
  background: #fff1f0;
  border: 1px solid #f2b8b5;
}

.rj-alert-success {
  color: #246b38;
  background: #eaf7ee;
  border: 1px solid #a9d6b6;
}

#rj-client-error {
  margin: 0 0 18px;
}

#rj-client-error[hidden] {
  display: none !important;
}

@media (max-width: 680px) {
  .rj-page {
    padding: 14px 10px 28px;
  }

  .rj-card {
    border-radius: 10px;
  }

  .rj-heading {
    padding: 22px 18px;
  }

  .rj-heading h1 {
    font-size: 24px;
  }

  .rj-card form {
    padding: 22px 18px 26px;
  }

  .rj-grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .rj-grid .rj-wide {
    grid-column: auto;
  }

  .rj-card legend {
    font-size: 17px;
  }

  .rj-actions {
    flex-direction: column;
  }

  .rj-actions button,
  .rj-actions .rj-reset {
    width: 100% !important;
  }

  .rj-alert {
    margin: 15px 18px 0;
  }
}
