/* job-intake — recruiter job-opportunity form for David Sing, MD.
   Visual language borrowed loosely from the Mira Health "How to evaluate a job" primer
   (navy + gold, warm off-white, serif headings) so the two feel like one editorial world,
   without sharing any code, deploy, or account with that property. No web fonts loaded —
   system serif/sans stacks only, so this page makes zero third-party requests. */

:root {
  --bg: #f8fafb;
  --card: #ffffff;
  --navy: #003053;
  --navy-hover: #004070;
  --slate-pale: #ebf0f7;
  --charcoal: #1a202c;
  --charcoal-light: #4a5568;
  --gold: #8f6839;
  --gold-pale: #f4ece1;
  --border: #e2e8f0;
  --border-fine: #edf2f7;
  --muted: #5f6d7e;
  --covenant-bg: #fdf6ec;
  --covenant-border: #d9a441;
  --error: #b8553a;
  --serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --radius: 0.75rem;
  --shadow-sm: 0 2px 12px rgba(0, 48, 83, 0.06);
  --unit: 8px;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--charcoal);
  font-family: var(--sans);
  line-height: 1.55;
  font-size: 16px;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 24px) 96px;
}

header.page-head {
  margin-bottom: 40px;
}

header.page-head .eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 8px;
}

header.page-head h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 12px;
  line-height: 1.2;
}

header.page-head p {
  color: var(--charcoal-light);
  font-size: 15.5px;
  margin: 0 0 8px;
  max-width: 60ch;
}

header.page-head .disclaimer {
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--border-fine);
  padding-top: 16px;
  margin-top: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(20px, 4vw, 32px);
  margin-bottom: 24px;
}

.card > h2 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 4px;
}

.card > .section-sub {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0 0 20px;
}

.field {
  margin-bottom: 16px;
}

.field label,
fieldset legend {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 6px;
}

.field .hint {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 400;
  display: block;
  margin-top: 2px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--charcoal);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  transition: border-color 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0, 48, 83, 0.12);
}

textarea { resize: vertical; min-height: 88px; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

@media (max-width: 560px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

fieldset {
  border: none;
  padding: 0;
  margin: 0 0 16px;
}

.radio-row, .check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.radio-opt, .check-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 400;
}

.radio-opt input, .check-opt input {
  width: 17px;
  height: 17px;
  accent-color: var(--navy);
}

/* --- Restrictive covenants: the most important card on the page --- */
.covenant-card {
  background: var(--covenant-bg);
  border: 1.5px solid var(--covenant-border);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 32px);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.covenant-card > h2 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.covenant-card > .section-sub {
  font-size: 13.5px;
  color: #6b5730;
  margin: 0 0 20px;
}

.no-covenants-check {
  background: #fff;
  border: 1px solid var(--covenant-border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.no-covenants-check input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

.no-covenants-check label {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy);
  margin: 0;
}

.covenant-detail-fields[data-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

/* --- Collapsible optional sections --- */
details.optional {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

details.optional > summary {
  list-style: none;
  cursor: pointer;
  padding: 18px clamp(20px, 4vw, 32px);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

details.optional > summary::-webkit-details-marker { display: none; }

details.optional > summary::after {
  content: "+";
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 400;
  color: var(--gold);
  flex-shrink: 0;
}

details.optional[open] > summary::after { content: "\2212"; }

details.optional > summary .opt-sub {
  display: block;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 3px;
}

details.optional .optional-body {
  padding: 4px clamp(20px, 4vw, 32px) 24px;
  border-top: 1px solid var(--border-fine);
  padding-top: 20px;
}

.optional-toggle-all {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  margin-bottom: 12px;
}

.optional-toggle-all:hover { background: var(--slate-pale); }

.check-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check-list .check-opt {
  align-items: flex-start;
}

.check-list .check-opt input { margin-top: 2px; }

/* --- Submit --- */
.submit-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

button.submit-btn {
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 14px 32px;
  font-size: 15.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

button.submit-btn:hover { background: var(--navy-hover); }
button.submit-btn:disabled { background: var(--muted); cursor: not-allowed; }

#form-status {
  font-size: 14px;
  margin-top: 4px;
}

#form-status[data-state="error"] { color: var(--error); font-weight: 600; }
#form-status[data-state="sending"] { color: var(--muted); }

.success-card {
  background: var(--card);
  border: 1.5px solid var(--navy);
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 40px);
  text-align: center;
}

.success-card h2 {
  font-family: var(--serif);
  color: var(--navy);
  font-size: 24px;
  margin: 0 0 10px;
}

.success-card p {
  color: var(--charcoal-light);
  font-size: 15px;
  margin: 0;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

footer.page-foot {
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 40px;
}

.required-mark { color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
