:root {
  --bg: #f5f8fb;
  --panel: #ffffff;
  --primary: #2b5672;
  --primary-accent: #116dff;
  --accent-light: #4eb7f5;
  --border: #dbe5ef;
  --text: #0c1c27;
  --muted: #5d5d61;
  --success: #059669;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.landing-body {
  background: var(--bg);
}

.masthead {
  padding: 3rem clamp(1.5rem, 6vw, 5rem) 2rem;
  background: radial-gradient(circle at top left, rgba(17, 109, 255, 0.18), transparent),
    linear-gradient(135deg, #f8fbff, #edf3f9);
}

.landing-hero {
  text-align: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.brand-logo {
  max-width: 180px;
  height: auto;
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
  text-transform: uppercase;
  font-size: 0.85rem;
}

.masthead h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin: 0 0 0.5rem;
}

.masthead .lede {
  max-width: 720px;
  color: var(--muted);
  margin-bottom: 1rem;
}

.hero-note {
  margin: 0.6rem 0 0;
  color: var(--primary);
  font-weight: 600;
}

.layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  padding: clamp(1.5rem, 5vw, 4rem);
}

.landing-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: clamp(1.5rem, 5vw, 4rem);
}

.option-card {
  background: var(--panel);
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 20px 50px rgba(15, 44, 75, 0.08);
}

.option-card ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.option-card li {
  margin-bottom: 0.25rem;
}

.option-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--primary);
  margin-bottom: -0.25rem;
}

.price-tag {
  display: flex;
  flex-direction: column;
  min-width: 120px;
  color: var(--muted);
}

.price-tag strong {
  font-size: 1.3rem;
  color: var(--text);
}

.primary.block,
.ghost.block {
  display: inline-flex;
  justify-content: center;
  width: 180px;
  text-align: center;
}

.card {
  background: var(--panel);
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  padding: 1.75rem;
  box-shadow: 0 20px 60px rgba(15, 44, 75, 0.08);
}

.card-header h2 {
  margin: 0;
  font-size: 1.4rem;
}

.card-header p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 500;
  color: var(--text);
  font-size: 0.95rem;
}

input,
select,
textarea {
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  padding: 0.75rem 0.9rem;
  font: inherit;
  background: #fefefe;
  transition: border 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-light);
  box-shadow: 0 0 0 2px rgba(17, 109, 255, 0.15);
}

textarea {
  resize: vertical;
}

.input-with-button {
  display: flex;
  gap: 0.5rem;
}

.input-with-button input {
  flex: 1;
}

button {
  border: none;
  border-radius: 0.9rem;
  padding: 0.75rem 1.35rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

button.primary {
  background: linear-gradient(135deg, var(--primary-accent), #2b7cff);
  color: #fff;
  box-shadow: 0 15px 30px rgba(17, 109, 255, 0.25);
}

button.primary:hover {
  transform: translateY(-1px);
}

button.ghost {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--primary);
}

button.small {
  padding: 0.5rem 0.8rem;
  font-size: 0.85rem;
}

.card-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

.selection-list {
  border: 1px dashed var(--border);
  border-radius: 1rem;
  padding: 1rem;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.selection-list.chip-list {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
}

.selection-list.chip-list.empty {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.selection-list.empty {
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.file-upload {
  border: 1px dashed var(--border);
  border-radius: 1rem;
  padding: 1rem;
  background: #f9fbff;
}

.file-label input[type="file"] {
  border: none;
  padding: 0;
  font-size: 0.95rem;
  margin-top: 0.4rem;
}

.attachment-preview {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 0.75rem;
}

.attachment-preview.hidden {
  display: none;
}

.attachment-preview img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 0.85rem;
  border: 1px solid var(--border);
  background: #fff;
}

.attachment-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.attachment-name {
  font-weight: 600;
  margin: 0;
}

.attachment-size {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.medicine-pill {
  border: 1px solid rgba(17, 109, 255, 0.2);
  border-radius: 1rem;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: rgba(78, 183, 245, 0.1);
}

.medicine-pill header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--primary);
}

.symptom-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(17, 109, 255, 0.1);
  color: var(--primary);
  font-weight: 600;
  width: fit-content;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.muted.small {
  font-size: 0.8rem;
}

.inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.checkbox {
  flex-direction: row;
}

.legal {
  font-size: 0.85rem;
  color: var(--muted);
  background: rgba(43, 86, 114, 0.08);
  border-radius: 0.75rem;
  padding: 0.8rem;
  margin-top: 1.25rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.response {
  margin-top: 0.75rem;
  font-weight: 500;
}

.response.success {
  color: var(--success);
}

.response.error {
  color: #e03939;
}

.info-card .timeline {
  padding-left: 1rem;
  color: var(--muted);
}

.info-card .timeline li {
  margin-bottom: 0.8rem;
}

.info-blurb {
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: #f8fbff;
  padding: 1rem 1.2rem;
  margin: 1.25rem 0;
  color: var(--text);
}

.info-blurb p {
  margin: 0.2rem 0;
}

.pill {
  background: rgba(43, 86, 114, 0.08);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  color: var(--primary);
}

.pill a {
  color: var(--primary-accent);
  font-weight: 600;
}

.footnote {
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #e03939;
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 30px rgba(224, 57, 57, 0.25);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  transform: translateY(10px);
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  background: var(--success);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 28, 39, 0.55);
  backdrop-filter: blur(2px);
  z-index: 900;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 950;
}

.modal.hidden,
.modal-backdrop.hidden,
.toast.hidden {
  pointer-events: none;
  opacity: 0;
}

.modal-content {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  width: min(90vw, 420px);
  box-shadow: 0 30px 60px rgba(15, 44, 75, 0.25);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--muted);
  cursor: pointer;
}

.contract-fields {
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 0.9rem;
  background: #f8fbff;
  margin-top: 0.75rem;
}

.contract-fields.hidden {
  display: none;
}

/* Tom Select tweaks */
.ts-wrapper {
  font-size: 0.95rem;
}

.ts-wrapper .ts-control {
  border-radius: 0.8rem;
  border-color: var(--border);
  padding: 0.5rem;
}

.ts-dropdown {
  border-radius: 0.8rem;
  border-color: var(--border);
}

.option-title {
  font-weight: 600;
  color: var(--text);
}

.option-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 768px) {
  .hero-meta {
    flex-direction: column;
    align-items: flex-start;
  }
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
/* Terms & Conditions layout */
.terms-body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
}

.terms-hero {
  padding: clamp(2rem, 6vw, 4rem);
  background: radial-gradient(circle at top left, rgba(17, 109, 255, 0.12), transparent),
    linear-gradient(130deg, #f8fbff, #eef4fb);
  border-bottom: 1px solid var(--border);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.back-link:hover {
  text-decoration: underline;
}

.terms-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.terms-hero .lede {
  margin: 0.75rem 0 1.5rem;
  max-width: 720px;
  color: var(--muted);
}

.terms-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.meta-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

.meta-value {
  margin: 0.15rem 0 0;
  font-weight: 600;
  color: var(--text);
}

.meta-note {
  margin: 0;
  color: var(--muted);
}

.terms-content {
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.terms-section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: 0 15px 35px rgba(15, 44, 75, 0.08);
}

.terms-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.3rem;
  color: var(--primary);
  display: flex;
  gap: 0.5rem;
}

.terms-section h2 span {
  color: var(--muted);
}

.terms-section p {
  margin: 0 0 0.8rem;
}

.terms-section ul {
  margin: 0.3rem 0 0.8rem 1.25rem;
}

.definition-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.definition-list dt {
  font-weight: 600;
  margin-bottom: 0.15rem;
  color: var(--primary);
}

.definition-list dd {
  margin: 0;
}

.terms-section .important {
  font-weight: 600;
  color: var(--primary);
}

.terms-footnote {
  margin-top: 2rem;
}

@media (max-width: 640px) {
  .terms-section {
    padding: 1.1rem;
  }
  .definition-list {
    grid-template-columns: 1fr;
  }
}
.payfast-button-wrapper {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: 0.9rem;
  background: #f8fbff;
  text-align: center;
}

.payfast-button-wrapper.hidden {
  display: none;
}

.payfast-button-wrapper form {
  display: inline-flex;
  justify-content: center;
  width: 100%;
}

.payfast-button-wrapper .payfast-button-form {
  width: 100%;
}

.payfast-button-wrapper button,
.payfast-button-wrapper input[type="submit"],
.payfast-button-wrapper input[type="image"],
.payfast-button-wrapper a {
  margin: 0 auto;
}
