/* ==========================================================================
   /research/ (Tely Health Research). Loaded after main.css and
   challenges.css: hero, kickers, pillars, story card, metrics, FAQ and link
   lists come from there. This file adds only the sample chart, the report
   preview card and the request form, with :root tokens only. Form fields
   follow the site's form card (.lp-form-card / .tely-lead__input).
   ========================================================================== */

/* Contents: 7 sections + a call-to-action tile fill a 4 × 2 grid. */
.rs-section--cta {
  background: transparent; border-style: dashed; border-color: var(--border);
  display: flex; flex-direction: column; gap: 12px; justify-content: center;
}
.rs-section--cta .hipaa-pillar-title { font-family: var(--serif); }

/* Sample finding */
.rs-finding { display: flex; flex-direction: column; gap: 20px; }
.rs-finding .story-feature-desc { max-width: 760px; }
.rs-chart { max-width: 960px; margin: 8px 0 0; background: var(--bg); border: 1px solid var(--border2); padding: 16px; }
.rs-chart img { display: block; width: 100%; height: auto; }
.rs-chart figcaption { margin-top: 12px; font-family: var(--sans); font-weight: 300; font-size: 14px; line-height: 1.45; color: var(--muted); }
.rs-more-h {
  margin: 0 0 10px; font-family: var(--sans); font-weight: 600; font-size: 12.5px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.rs-more-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.rs-more-list li {
  position: relative; padding: 12px 0 12px 22px; border-top: 1px solid var(--border2);
  font-family: var(--sans); font-weight: 300; font-size: 15.5px; line-height: 1.5; color: var(--ink);
}
.rs-more-list li::before {
  content: ''; position: absolute; left: 2px; top: 21px; width: 7px; height: 7px;
  background: var(--cyan); transform: rotate(45deg);
}
.rs-source { margin: 0; font-size: 13.5px; }

/* Request: preview left, form right */
.rs-request { scroll-margin-top: 80px; }
.rs-request-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--grid-gap-wide); align-items: start; }
.rs-preview { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 110px; }
.rs-preview .hipaa-heading { margin: 0; }
.rs-preview .hipaa-sub { margin: 0; }

/* The chosen report as a cover (same family as the practice report booklet). */
.rs-cover {
  position: relative; margin-top: 8px; padding: 28px 28px 24px 34px;
  background: var(--ink); color: var(--white);
  box-shadow: 0 30px 60px -30px rgba(10, 17, 26, 0.6);
}
.rs-cover::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--cyan); }
.rs-cover-kicker { display: block; font-family: var(--sans); font-weight: 500; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
.rs-cover-title { margin: 14px 0 18px; font-family: var(--serif); font-weight: 300; font-size: clamp(24px, 2.2vw, 30px); line-height: 1.2; text-wrap: balance; }
.rs-cover-list { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid rgba(255, 255, 255, 0.18); display: grid; gap: 8px; }
.rs-cover-list li { position: relative; padding-left: 20px; font-family: var(--sans); font-weight: 300; font-size: 14.5px; line-height: 1.4; color: rgba(255, 255, 255, 0.85); }
.rs-cover-list li::before { content: ''; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; background: var(--green); transform: rotate(45deg); }
.rs-cover-note { margin: 16px 0 0; font-family: var(--sans); font-weight: 300; font-size: 13.5px; line-height: 1.45; color: rgba(255, 255, 255, 0.7); }

.rs-form-card { background: var(--bg); border: 1px solid var(--border2); padding: 32px; }
.rs-form { display: flex; flex-direction: column; gap: 16px; }
.rs-form[hidden] { display: none; } /* after a successful send only the confirmation shows */
.rs-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rs-row--pick { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.rs-field { display: flex; flex-direction: column; min-width: 0; }
.rs-label { display: block; margin: 0 0 6px; font-family: var(--sans); font-size: 12.5px; font-weight: 600; color: var(--ink); }
.rs-label-hint { font-weight: 400; color: var(--muted); }
.rs-input {
  width: 100%; box-sizing: border-box; min-height: 48px; padding: 11px 13px;
  font-family: var(--sans); font-size: 16px; font-weight: 300; color: var(--ink);
  background: var(--white); border: 1px solid var(--border); border-radius: 8px;
  outline: none; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
select.rs-input {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5l3 3 3-3' stroke='%230a111a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.rs-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15); }
.rs-input.is-invalid { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(10, 17, 26, 0.12); }
.rs-textarea { min-height: 96px; resize: vertical; line-height: 1.45; }

.rs-chips { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rs-chips:empty { display: none; }
.rs-chip {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 6px 0 14px;
  font-family: var(--sans); font-size: 14.5px; font-weight: 500; color: var(--ink);
  background: var(--warm2); border: 1px solid var(--border2); border-radius: 999px;
}
.rs-chip button {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; font-size: 18px; line-height: 1;
}
.rs-chip button:hover { background: var(--border2); }
.rs-chip button:focus-visible, .rs-submit:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.rs-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.rs-error { margin: 0; font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--ink); padding: 10px 14px; background: var(--warm2); border-left: 3px solid var(--ink); }
.rs-error[hidden] { display: none; }

.rs-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  align-self: flex-start; min-height: 56px; padding: 16px 32px;
  font-family: var(--sans); font-weight: 400; font-size: 18px;
  background: var(--ink); color: var(--white); border: 0; border-radius: 8px; cursor: pointer;
  transition: opacity 0.2s ease;
}
.rs-submit:hover { opacity: 0.88; }
.rs-submit[disabled] { opacity: 0.6; cursor: progress; }
.rs-fine { margin: 0; font-family: var(--sans); font-weight: 300; font-size: 13.5px; color: var(--muted); }

.rs-done { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 24px 0; outline: none; }
.rs-done[hidden] { display: none; }
.rs-done-h { margin: 6px 0 0; font-family: var(--serif); font-weight: 300; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.2; color: var(--ink); }
.rs-done-p { margin: 0; font-family: var(--sans); font-weight: 300; font-size: 17px; line-height: 1.5; color: var(--ink); max-width: 480px; }

@media (max-width: 1024px) {
  .rs-request-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .rs-preview { position: static; }
  .rs-more-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 768px) {
  /* Seven section cards stay scannable on a phone: no icon disc, tighter padding. */
  .rs-sections .hipaa-pillar { padding: 20px; gap: 8px; }
  .rs-sections .hipaa-pillar-icon { display: none; }
  .rs-chart { padding: 8px; }
  .rs-form-card { padding: 20px; }
  .rs-row { grid-template-columns: minmax(0, 1fr); }
  .rs-submit { align-self: stretch; }
  .rs-cover { padding: 22px 20px 20px 26px; }
  .rs-more-list li { font-size: 15px; }
}
