* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  color: #333;
  background: #fff;
  /* Ensures natural vertical scrolling on smaller screens */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #1a5fa8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #1a5fa8;
  outline-offset: 2px;
}

/* ===== Header & Topbar ===== */
.topbar {
  border-bottom: 3px solid #1a3d6d;
}

.topbar__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 20px 12px;
  max-width: 1200px;
  margin: 0 auto;
}

.brand,
.brand_foot {
  display: flex;
  flex-direction: column;
  font-family: "Courier Prime", Georgia, "Times New Roman", serif;
  color: #1a3d6d;
  line-height: 1.15;
}

.brand_line {
  display: flex;
  align-items: flex-start;
  font-weight: bold;
}

.brand__line {
  font-size: clamp(20px, 4vw, 28px); /* Responsive font sizing */
  font-weight: bold;
}

.brand:hover {
  text-decoration: none;
}

/* ===== Main & Container Layout ===== */
main {
  flex: 1; /* Pushes footer down naturally */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 16px; /* Prevents edge-clipping on small screens */
  min-height: auto;
}

.container {
  background-color: #ffffff;
  border: 3px solid #1a3d6d;
  border-radius: 16px;
  width: 100%;
  max-width: 580px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.step-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.icon-container {
  width: 72px;
  height: 72px;
  background-color: #6398c8;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
  flex-shrink: 0;
}

.icon-container i {
  font-size: 27px;
  color: #ffffff;
}

.description {
  color: #222222;
  font-size: 16px;
  line-height: 1.4;
  font-weight: bold;
  max-width: 460px;
  margin-bottom: 24px;
}

.option-box {
  width: 100%;
  border: 2px solid #757575;
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  background-color: #ffffff;
}

.option-box input {
  width: 100%;
  padding: 14px 16px;
  border: none;
  outline: none;
  font-size: 16px; /* Prevents auto-zoom on iOS safari */
}

.option-box input::placeholder {
  font-size: 16px;
  color: #1a3d6d;
}

.rate-disclaimer {
  font-style: italic;
  color: #333333;
  font-size: 14.5px;
  margin-bottom: 24px;
}

.instruction {
  color: #333333;
  font-size: 15px;
  line-height: 1.4;
  max-width: 420px;
  margin-bottom: 24px;
}

.button-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  width: 100%;
}

.btn {
  background-color: #ffffff;
  border: 2px solid #1a3d6d;
  color: #1a3d6d;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  min-width: 130px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn:hover {
  background-color: #f0f0f0;
}

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  padding: 24px 16px 40px;
  font-size: 12px;
  color: #444;
}

.footer-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: bold;
  color: #1a3d6d;
  flex-wrap: wrap;
}

.footer-divider {
  color: #ccc;
}

.footer-copy,
.footer-legal,
.footer-address {
  max-width: 640px;
  margin: 0 auto 10px;
  line-height: 1.6;
  font-size: 14px;
}

hr {
  border: none;
  border-bottom: 3px solid #1a3d6d;
  margin: 0;
}

/* Helper Utilities */
.hidden {
  display: none !important;
}

.error-text {
  color: #d9534f;
  font-size: 13px;
  margin-top: -8px;
  margin-bottom: 12px;
  min-height: 16px;
  width: 100%;
  text-align: left;
}

/* ==========================================
   MEDIA QUERIES (Mobile & Tablet Adjustments)
   ========================================== */

/* Tablet & Smaller Screens (< 768px) */
@media (max-width: 768px) {
  main {
    padding: 24px 12px;
  }

  .container {
    padding: 24px 16px;
  }
  
  .topbar__inner {
    padding: 12px 16px;
  }
}

/* Mobile Screens (< 480px) */
@media (max-width: 480px) {
  .button-group {
    flex-direction: column-reverse; /* Stacks primary action on top */
    width: 100%;
  }

  .btn {
    width: 100%; /* Full width buttons for mobile touch accuracy */
    padding: 14px;
  }

  .description,
  .instruction {
    font-size: 14px;
  }

  .footer-copy,
  .footer-legal,
  .footer-address {
    font-size: 12px;
  }
}