/*
 * content (#1264) — operator-authored rich copy (collection SEO text).
 *
 * Theming: the block paints NO surface. Text, list markers and the
 * collapsible's rules are currentColor (inherited from the host's resolved
 * theme), so this stylesheet needs no dark emission of its own; the one
 * theme-dependent value — the link accent — is dual-emitted at runtime by
 * widget.tsx under the two host prefixes (see its THEME CONTRACT note).
 *
 * The body is sanitized HTML restricted to p, br, strong/b, em/i, ul/ol/li,
 * h2–h4 and a — the selectors below are the complete list of what can appear.
 */

.homerunner-content-container {
  width: 100%;
  font-family: inherit;
  line-height: 1.6;
  color: inherit;
}

.hr-content-body {
  color: inherit;
  overflow-wrap: anywhere;
}

.hr-content-body > :first-child {
  margin-top: 0;
}

.hr-content-body > :last-child {
  margin-bottom: 0;
}

.hr-content-body p {
  margin: 0 0 0.75rem;
}

.hr-content-body h2,
.hr-content-body h3,
.hr-content-body h4 {
  font-weight: 600;
  line-height: 1.3;
  color: inherit;
}

.hr-content-body h2 {
  font-size: 1.375rem;
  margin: 1.25rem 0 0.5rem;
}

.hr-content-body h3 {
  font-size: 1.125rem;
  margin: 1rem 0 0.5rem;
}

.hr-content-body h4 {
  font-size: 1rem;
  margin: 0.875rem 0 0.375rem;
}

/* Tailwind's preflight (in common.css) zeroes list styles; restore them. */
.hr-content-body ul,
.hr-content-body ol {
  margin: 0 0 0.75rem;
  padding-left: 1.5rem;
}

.hr-content-body ul {
  list-style: disc;
}

.hr-content-body ol {
  list-style: decimal;
}

.hr-content-body li {
  margin: 0.25rem 0;
}

.hr-content-body a {
  color: var(--hr-content-accent, #f59e0c);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hr-content-body a:hover {
  text-decoration-thickness: 2px;
}

/* ── Collapsible (toolkit `hrtk-cp-seo--collapsible`) ── */

.hr-content--collapsible {
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  /* A hairline of the text colour, softened, so it reads in both themes. */
  border-color: color-mix(in srgb, currentColor 30%, transparent);
  padding: 0.25rem 0;
}

.hr-content-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.hr-content-summary::-webkit-details-marker {
  display: none;
}

/* Chevron: points down closed, up open. */
.hr-content-summary::after {
  content: '';
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  margin: 0 0.25rem 0.25rem 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.hr-content--collapsible[open] > .hr-content-summary::after {
  margin-bottom: -0.25rem;
  transform: rotate(-135deg);
}

.hr-content-summary:focus-visible {
  outline: 2px solid var(--hr-content-accent, #f59e0c);
  outline-offset: 2px;
  border-radius: 2px;
}

.hr-content--collapsible > .hr-content-body {
  padding: 0 0 1rem;
}

/* ── Section heading (WidgetSection; rules live per widget by contract) ── */

.hr-widget-section {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  width: 100%;
}

.hr-widget-section-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  white-space: nowrap;
  flex-shrink: 0;
}

.hr-widget-section-line {
  flex: 1;
  height: 1px;
  background-color: currentColor;
  opacity: 0.18;
  display: block;
}
