/* The encounter's patient reference (practitioner.html#s-encounter): each state is its own ak-card. */
#akashic-health-records-patient-portal-root .enc-ref-card {
  padding: 14px;
  font-size: 13px;
  color: var(--ink);
}

/* Type and colour come from the shared h3.ak-section-title; this keeps only the layout for the warning icon. */
#akashic-health-records-patient-portal-root .enc-ref-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
}

#akashic-health-records-patient-portal-root .enc-ref-warn { width: 16px; height: 16px; flex: none; color: var(--danger); }
#akashic-health-records-patient-portal-root .enc-ref-caption { margin: 0 0 8px; font-size: 13px; line-height: 1.5; color: var(--ink-muted); }
#akashic-health-records-patient-portal-root .enc-ref-copy { margin: 6px 0; font-size: 13px; line-height: 1.5; color: var(--ink-muted); }

#akashic-health-records-patient-portal-root .enc-ref-retry {
  margin-top: 6px;
  padding: 7px 10px;
  border: 1px solid var(--red-line);
  border-radius: 7px;
  background: var(--surface);
  font-size: 13px;
  color: var(--danger);
  cursor: pointer;
}

#akashic-health-records-patient-portal-root .enc-ref-conditions ul { margin: 0; padding: 0; list-style: none; }
#akashic-health-records-patient-portal-root .enc-ref-conditions li + li { border-top: 1px solid var(--line); }
#akashic-health-records-patient-portal-root .enc-ref-conditions li button {
  display: block;
  width: 100%;
  padding: 7px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-muted);
  text-align: left;
  cursor: pointer;
}
#akashic-health-records-patient-portal-root .enc-ref-conditions li button:hover { color: var(--primary); }

/* Colour and hover come from the shared .ak-link; this keeps only its place under the list. */
#akashic-health-records-patient-portal-root .enc-ref-open {
  display: inline-block;
  margin: 12px 0 0;
}

/* Type and colour come from the shared h2.ak-section-title; this keeps only the gap above the first card. */
#akashic-health-records-patient-portal-root .enc-ref-heading {
  margin: 0 0 10px;
}

@media (max-width: 639px) {
  #akashic-health-records-patient-portal-root .enc-ref-conditions li button,
  #akashic-health-records-patient-portal-root .enc-ref-open,
  #akashic-health-records-patient-portal-root .enc-ref-retry { min-height: 44px; }
}

/* Since your last visit: the reference's first card, the same white card as the rest (the deck's .sincecard). */
#akashic-health-records-patient-portal-root .enc-since {
  margin: 0 0 12px;
  padding: 14px 16px;
}

#akashic-health-records-patient-portal-root .enc-since-head {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

#akashic-health-records-patient-portal-root .enc-since-line { margin: 6px 0; font-size: 13px; line-height: 1.5; color: var(--ink-muted); }
#akashic-health-records-patient-portal-root .enc-since-line strong { font-weight: 400; color: var(--ink-strong); }
#akashic-health-records-patient-portal-root .enc-since-groups { margin: 0; padding: 0; list-style: none; }
#akashic-health-records-patient-portal-root .enc-since-groups li { display: flex; gap: 12px; padding: 9px 0; }
#akashic-health-records-patient-portal-root .enc-since-groups li + li { border-top: 1px solid var(--line); }
#akashic-health-records-patient-portal-root .enc-since-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--sunken);
  color: var(--ink-muted);
}
#akashic-health-records-patient-portal-root .enc-since-group { min-width: 0; }
#akashic-health-records-patient-portal-root .enc-since-label { font-size: 13px; color: var(--ink-strong); }
#akashic-health-records-patient-portal-root .enc-since-label span { font-size: 12px; color: var(--ink-muted); }
#akashic-health-records-patient-portal-root .enc-since-items { overflow: hidden; font-size: 13px; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
