/* Referral Terms — plain-language program rules.
 * Served at /referral-terms. Linked from /welcome and /r.
 * Brand: ITT Heal sage/cream palette + Playfair Display headings. */

:root {
  --rt-sage:        #8aa77b;
  --rt-sage-deep:   #5e7548;
  --rt-sage-deeper: #45562f;
  --rt-sage-tint:   #e9f0e1;
  --rt-sage-tint-2: #f2f6ec;
  --rt-cream:        #f5f1e8;
  --rt-cream-soft:   #faf8f2;
  --rt-lavender-100: #f5f3ff;
  --rt-lavender-200: #e9e5ff;
  --rt-ink-900:     #1a1a1a;
  --rt-ink-700:     #4a4a4a;
  --rt-ink-500:     #6e6a60;
  --rt-line:        #e4ddcd;
  --rt-shadow:      0 18px 38px -16px rgba(69, 86, 47, 0.26);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: linear-gradient(170deg, var(--rt-cream-soft) 0%, var(--rt-lavender-100) 60%, var(--rt-lavender-200) 100%);
  color: var(--rt-ink-900);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

.rt-wrap {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 22px max(48px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

/* Brand */
.rt-brand { display: flex; align-items: center; gap: 12px; }
.rt-mark { display: inline-flex; }
.rt-mark img { display: block; height: 36px; width: auto; }
.rt-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.rt-wordmark {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--rt-sage-deeper);
}
.rt-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--rt-sage-deep);
}

/* Header */
.rt-head { padding-top: 4px; }
.rt-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: clamp(30px, 7vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--rt-sage-deeper);
  margin: 0 0 12px;
}
.rt-lede {
  font-size: 17px;
  color: var(--rt-ink-700);
  margin: 0;
  max-width: 52ch;
}

/* Section card */
.rt-section {
  background: #fff;
  border: 1px solid var(--rt-line);
  border-radius: 18px;
  padding: 22px 22px;
  box-shadow: var(--rt-shadow);
}
.rt-section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
  font-size: 21px;
  color: var(--rt-sage-deeper);
  margin: 0 0 14px;
}
.rt-section p {
  font-size: 15px;
  color: var(--rt-ink-700);
  line-height: 1.55;
  margin: 0 0 14px;
}

.rt-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rt-list li {
  /* Block, not flex: a flex li turns every child (text runs, <strong>, <a>) into its own flex
     item, so a sentence with a bold phrase or link mid-way rendered as skinny side-by-side
     columns. The bullet is positioned out of flow instead, so the li's content flows as prose.
     19px = the 7px dot + the 12px gap the flex layout used. */
  display: block;
  position: relative;
  padding-left: 19px;
  font-size: 15px;
  color: var(--rt-ink-700);
  line-height: 1.55;
  /* html/body carry overflow-x: hidden, so a long unbroken token would be silently CLIPPED
     off-screen rather than causing visible scroll — unacceptable on a legal notice where a
     statutory citation or email address must stay fully readable. Base rule, not media-scoped:
     .rt-wrap can narrow at any width. */
  overflow-wrap: break-word;
  min-width: 0;
}
.rt-list li::before {
  content: "";
  position: absolute;
  left: 0;
  /* Centre the 7px dot on the first line box: half the 1.55 line-height, minus half the dot.
     em-based so it tracks the 14px override at <=344px. */
  top: calc(0.775em - 3.5px);
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--rt-sage);
}
.rt-list strong { color: var(--rt-ink-900); font-weight: 600; }

/* Links inside list items. Added for hipaa-notice.html, whose contact section puts mailto:
   and tel: links in list items — previously these fell back to default browser blue with no
   hover/focus state. --rt-sage-deep (#5e7548) on the white .rt-section background computes to
   ~5.1:1, clearing WCAG AA for normal text, and reuses the token .rt-foot-link already proves. */
.rt-list a {
  color: var(--rt-sage-deep);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--rt-line);
}

.rt-list a:hover,
.rt-list a:focus-visible {
  color: var(--rt-sage-deeper);
  text-decoration-color: currentColor;
}

/* Footer */
.rt-foot {
  margin-top: 4px;
  padding-top: 20px;
  border-top: 1px solid var(--rt-line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--rt-ink-500);
}
.rt-foot-link { color: var(--rt-sage-deep); text-decoration: none; font-weight: 500; }
.rt-foot-link:hover { text-decoration: underline; }
.rt-foot-sep { color: var(--rt-ink-500); }

/* Mobile breakpoint — small phones */
@media (max-width: 480px) {
  .rt-wrap { padding-left: 18px; padding-right: 18px; gap: 24px; }
  .rt-section { padding: 18px 18px; }
}

/* Tablet + landscape phone */
@media (max-width: 768px) {
  .rt-wrap { max-width: 100%; }
}

/* Desktop wide */
@media (min-width: 1920px) {
  .rt-wrap { max-width: 680px; }
}

/* Extra-narrow (Samsung Z Fold folded) */
@media (max-width: 344px) {
  .rt-wrap { padding-left: 12px; padding-right: 12px; }
  .rt-wordmark { font-size: 16px; }
  .rt-tagline { font-size: 10px; }
  .rt-title { font-size: 26px; }
  .rt-lede { font-size: 16px; }
  .rt-section { padding: 16px 14px; }
  .rt-section-title { font-size: 19px; }
  .rt-list li { font-size: 14px; }
}
