:root {
  --ink: #102033;
  --ink-soft: #3d4f63;
  --paper: #f7f2ea;
  --paper-2: #efe6d6;
  --gold: #b8893a;
  --gold-2: #d4b06a;
  --line: rgba(16, 32, 51, 0.12);
  --white: #fffcf7;
  --danger: #8b3a2f;
  --shadow: 0 18px 50px rgba(16, 32, 51, 0.12);
}
[data-brand="affinityhealth"] {
  --ink: #12343b;
  --gold: #2a7a74;
  --gold-2: #7eb8b2;
  --paper: #f3f7f6;
  --paper-2: #e4eeec;
  --white: #f8fcfb;
}
[data-brand="medicalsociety"] {
  --ink: #1a2340;
  --gold: #6d4c9a;
  --gold-2: #b39dd4;
  --paper: #f5f2f8;
  --paper-2: #ebe4f2;
  --white: #fcfaff;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  min-height: 100vh;
}
a { color: inherit; }
img { max-width: 100%; }
.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0 18px; border-bottom: 1px solid var(--line);
}
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.mark {
  width: 42px; height: 42px; border: 1.5px solid var(--gold);
  display: grid; place-items: center; font-size: 13px; letter-spacing: 0.12em;
  color: var(--gold); font-weight: 700;
}
.brand-name { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; }
.brand-sub { display: block; font-size: 11px; letter-spacing: 0.08em; color: var(--ink-soft); text-transform: none; }
nav { display: flex; gap: 22px; align-items: center; font-size: 14px; }
nav a { text-decoration: none; color: var(--ink-soft); }
nav a:hover, nav a.active { color: var(--ink); }
.guest { font-size: 13px; color: var(--ink-soft); }
.btn, button.btn {
  appearance: none; border: 0; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 18px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--ink); color: var(--white);
}
.btn.gold { background: var(--gold); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.wide { width: 100%; }
.hero {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px;
  padding: 64px 0 40px; align-items: center;
}
.kicker { letter-spacing: 0.22em; text-transform: uppercase; font-size: 11px; color: var(--gold); }
h1 { font-family: Georgia, "Iowan Old Style", serif; font-weight: 500; font-size: clamp(32px, 5vw, 56px); line-height: 1.12; margin: 10px 0 16px; }
.lede { font-size: 18px; color: var(--ink-soft); max-width: 40rem; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.panel {
  background: var(--white); padding: 28px; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.panel h2 { font-family: Georgia, serif; font-weight: 500; margin: 0 0 8px; font-size: 22px; }
.muted { color: var(--ink-soft); font-size: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 10px 0 70px; }
.card { background: var(--white); border: 1px solid var(--line); padding: 22px; min-height: 180px; }
.card h3 { font-family: Georgia, serif; font-weight: 500; margin: 0 0 8px; }
.section { padding: 28px 0 70px; }
.notice { background: var(--paper-2); padding: 14px 16px; font-size: 14px; border-left: 3px solid var(--gold); margin: 18px 0; }
label { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; margin: 14px 0 6px; }
input[type="email"], input[type="password"], input[type="text"], input[type="file"] {
  width: 100%; padding: 12px 12px; border: 1px solid var(--line); background: var(--white); font: inherit; color: var(--ink);
}
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--ink-soft); font-size: 12px; display: flex; justify-content: space-between; gap: 20px; }
.overlay {
  position: fixed; inset: 0; background: rgba(16,32,51,0.46); display: none;
  align-items: center; justify-content: center; z-index: 40; padding: 20px;
}
.overlay.open { display: flex; }
.modal { width: min(420px, 100%); background: var(--white); padding: 28px; box-shadow: var(--shadow); }
.modal h2 { font-family: Georgia, serif; font-weight: 500; margin: 0 0 6px; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.err { color: var(--danger); font-size: 13px; min-height: 1.2em; }
.tracker { position: absolute; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 860px) {
  .hero, .grid3, footer, .top { display: block; }
  nav { margin: 14px 0; }
  .hero { padding-top: 32px; }
  .panel { margin-top: 24px; }
}
