/* ReferMyInsurance — simple, elegant, professional */
:root {
  --navy: #16283f;
  --navy-2: #1f3a5f;
  --gold: #c19a3d;
  --gold-soft: #f5edd9;
  --ink: #2b2f36;
  --muted: #6b7280;
  --bg: #f6f7f9;
  --card: #ffffff;
  --line: #e3e6eb;
  --ok: #1a7f4e;
  --danger: #b3261e;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(22, 40, 63, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: var(--navy);
  color: #fff;
  padding: 26px 0;
}
.site-header .brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  letter-spacing: 0.5px;
  margin: 0;
}
.site-header .brand span { color: var(--gold); }
.site-header .tag {
  margin: 4px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.4px;
}

/* Hero */
.hero { text-align: center; padding: 56px 0 34px; }
.hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: 34px;
  color: var(--navy);
  margin: 0 0 10px;
}
.hero p { color: var(--muted); font-size: 17px; margin: 0 auto; max-width: 520px; }
.rule {
  width: 56px; height: 3px; background: var(--gold);
  margin: 18px auto 0; border-radius: 2px;
}

/* Choice cards */
.choices {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 10px 0 70px;
}
@media (min-width: 640px) { .choices { grid-template-columns: 1fr 1fr 1fr; } }
.choice {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 22px;
  text-decoration: none;
  color: var(--ink);
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.choice:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 16px 36px rgba(22, 40, 63, 0.12);
}
.choice .icon {
  width: 52px; height: 52px; margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: Georgia, serif; font-size: 24px;
}
.choice h2 {
  font-family: Georgia, serif; font-weight: 500;
  font-size: 20px; color: var(--navy); margin: 0 0 8px;
}
.choice p { font-size: 14px; color: var(--muted); margin: 0; }

/* Form pages */
.page-head { padding: 44px 0 8px; text-align: center; }
.page-head h1 {
  font-family: Georgia, serif; font-weight: 500;
  font-size: 30px; color: var(--navy); margin: 0 0 8px;
}
.page-head p { color: var(--muted); margin: 0; }
.back-link {
  display: inline-block; margin: 22px 0 0;
  color: var(--navy-2); font-size: 14px; text-decoration: none;
}
.back-link:hover { text-decoration: underline; }

form.referral {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 28px;
  margin: 26px 0 70px;
}
fieldset { border: 0; padding: 0; margin: 0 0 26px; }
fieldset:last-of-type { margin-bottom: 8px; }
legend {
  font-family: Georgia, serif;
  font-size: 18px; color: var(--navy);
  padding: 0; margin-bottom: 14px;
  border-bottom: 2px solid var(--gold-soft);
  width: 100%; padding-bottom: 8px;
}
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.req { color: var(--danger); font-weight: 700; }
.opt {
  display: inline-block; font-size: 11px; font-weight: 600;
  color: var(--muted); border: 1px solid var(--line);
  border-radius: 20px; padding: 1px 8px; margin-left: 8px;
  vertical-align: middle; letter-spacing: 0.4px;
}
.hint { font-size: 13px; color: var(--muted); margin-top: 5px; }
input[type="text"], input[type="email"], input[type="tel"],
input[type="date"], input[type="number"], select, textarea {
  width: 100%;
  font-size: 16px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--navy-2);
  box-shadow: 0 0 0 3px rgba(31, 58, 95, 0.12);
}
textarea { min-height: 84px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .row.two { grid-template-columns: 1fr 1fr; } }

.owner-row {
  display: grid; grid-template-columns: 1fr; gap: 10px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 14px; margin-bottom: 10px;
  position: relative;
}
@media (min-width: 560px) { .owner-row { grid-template-columns: 1fr 1fr auto; align-items: end; } }
.remove-owner {
  background: none; border: 1px solid var(--line); color: var(--muted);
  border-radius: 8px; padding: 10px 12px; font-size: 13px; cursor: pointer;
}
.remove-owner:hover { color: var(--danger); border-color: var(--danger); }
.add-owner {
  background: none; border: 1px dashed var(--navy-2); color: var(--navy-2);
  border-radius: 8px; padding: 10px 14px; font-size: 14px; cursor: pointer; width: 100%;
}
.add-owner:hover { background: rgba(31, 58, 95, 0.05); }

.checkline { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.checkline input { margin-top: 4px; width: auto; }
.hp { position: absolute; left: -9999px; top: -9999px; height: 0; width: 0; opacity: 0; }

.submit-btn {
  display: block; width: 100%;
  background: var(--navy); color: #fff;
  font-size: 17px; font-weight: 600; letter-spacing: 0.3px;
  border: 0; border-radius: 10px; padding: 15px;
  cursor: pointer; margin-top: 10px;
  transition: background 0.15s ease;
}
.submit-btn:hover { background: var(--navy-2); }
.submit-btn:disabled { opacity: 0.6; cursor: wait; }
.form-error {
  display: none; background: #fdecea; color: var(--danger);
  border: 1px solid #f5c6c2; border-radius: 8px;
  padding: 12px 14px; font-size: 14px; margin-bottom: 18px;
}
.form-error.show { display: block; }

/* Confirmation */
.confirmation { display: none; text-align: center; padding: 30px 10px 10px; }
.confirmation.show { display: block; }
.confirmation .check {
  width: 64px; height: 64px; margin: 0 auto 18px;
  border-radius: 50%; background: var(--ok); color: #fff;
  font-size: 32px; display: flex; align-items: center; justify-content: center;
}
.confirmation h2 { font-family: Georgia, serif; color: var(--navy); font-weight: 500; margin: 0 0 10px; }
.confirmation p { color: var(--muted); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0 40px; text-align: center;
  color: var(--muted); font-size: 13px;
}

/* Inbox */
.inbox-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.inbox-table th, .inbox-table td {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.inbox-table th { color: var(--navy); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.4px;
  padding: 2px 10px; border-radius: 20px; text-transform: uppercase;
}
.badge.lender { background: #e3ecfa; color: var(--navy-2); }
.badge.realtor { background: var(--gold-soft); color: #7a5f1e; }
.badge.client { background: #e2f3e9; color: var(--ok); }
.detail-grid { display: grid; grid-template-columns: 180px 1fr; gap: 6px 14px; font-size: 14px; }
.detail-grid dt { color: var(--muted); }
.detail-grid dd { margin: 0; }
.submission-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin-bottom: 18px;
}
.login-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 34px 30px; max-width: 420px; margin: 60px auto;
}
.disclaimer { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 18px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.disclaimer a { color: inherit; text-decoration: underline; }
.policy h2 { font-size: 18px; margin: 26px 0 8px; }
.policy p { line-height: 1.7; color: var(--ink); }
.site-footer a { color: inherit; }
