/* ============================================================
   MonOn AI — Support and resources page
   Depends on monon-ds.css (tokens) and landing.css (nav shell).

   A quiet, sunlit reading page: linen canvas, white cards, warm
   slate shadows, powder-blue accents. No red, no yellow — clay
   carries the "not an emergency service" note.
   ============================================================ */

body.resources-page {
  background:
    radial-gradient(1200px 600px at 50% -12%, var(--bg-tint-blue) 0%, var(--bg-page) 55%);
  background-attachment: fixed;
  color: var(--text-body);
  font-family: var(--font-body);
  min-height: 100vh;
}

/*
 * landing.css lays the mobile header out as start | brand | end so the
 * wordmark stays centered. This page has no hamburger and no header CTA, so
 * equal spacers occupy the start and end cells and keep that geometry.
 */
.resources-nav-spacer {
  display: none;
  width: 42px;
  height: 42px;
  flex: none;
}

@media (max-width: 768px) {
  .resources-nav-spacer {
    display: block;
  }

  .resources-nav-spacer--start {
    grid-area: start;
    justify-self: start;
  }

  .resources-nav-spacer--end {
    grid-area: end;
    justify-self: end;
  }
}

.resources-shell {
  width: min(880px, calc(100% - 2rem));
  margin: 0 auto;
  padding: var(--space-10) 0 var(--space-16);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* ---------- Header ---------- */

.resources-header {
  text-align: center;
  padding-top: var(--space-4);
}

.resources-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.16;
  color: var(--text-strong);
  margin: 0 0 var(--space-3);
  text-wrap: balance;
}

.resources-subtitle {
  margin: 0 auto;
  max-width: 46ch;
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--text-muted);
  text-wrap: pretty;
}

/* ---------- Not-an-emergency-service note (clay, never red) ---------- */

.resources-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  background: var(--status-caution-soft);
  border: 1px solid var(--status-caution);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  color: var(--text-body);
}

.resources-notice i {
  color: var(--status-caution);
  font-size: 1.25rem;
  line-height: 1.3;
  flex-shrink: 0;
}

.resources-notice p {
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.55;
  text-wrap: pretty;
}

/* ---------- Cards ---------- */

.resources-card,
.support-section,
.resources-expander {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.resources-sections {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.support-section {
  padding: var(--space-6);
}

.support-section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  line-height: 1.25;
  color: var(--text-strong);
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}

.support-section__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.support-resource + .support-resource {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-4);
}

.support-resource__name {
  margin: 0 0 var(--space-1);
  font-weight: 700;
  font-size: var(--text-base);
  line-height: 1.35;
  color: var(--text-strong);
  text-wrap: pretty;
}

.support-resource__description {
  margin: 0 0 var(--space-2);
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--text-body);
  text-wrap: pretty;
}

.support-resource__phones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}

.support-resource__phone {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-strong);
  letter-spacing: 0.01em;
}

a.support-resource__phone--call {
  color: var(--text-link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-normal) var(--ease-out);
}

a.support-resource__phone--call:hover {
  border-bottom-color: var(--text-link);
}

a.support-resource__phone--call:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius-xs);
}

.support-resource__phone-sep {
  color: var(--text-faint);
}

.support-resource__meta {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--text-muted);
}

.support-resource__link {
  display: inline-block;
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-link);
  text-decoration: none;
}

.support-resource__link:hover {
  text-decoration: underline;
}

.support-resource__link:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius-xs);
}

/* ---------- Self-help guide download ---------- */

.resources-card--guide {
  padding: var(--space-6);
  background: linear-gradient(180deg, var(--primary-softer), var(--surface-card) 65%);
}

.support-guide__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  line-height: 1.25;
  color: var(--text-strong);
  margin: 0 0 var(--space-2);
}

.support-guide__title--compact {
  font-size: var(--text-base);
  margin-bottom: var(--space-3);
}

.support-guide__description {
  margin: 0 0 var(--space-4);
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--text-body);
  text-wrap: pretty;
}

.support-guide__button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--primary);
  color: var(--text-on-primary);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-base);
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition:
    background var(--duration-normal) var(--ease-out),
    transform var(--duration-normal) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out);
}

.support-guide__button:hover {
  background: var(--primary-hover);
  color: var(--text-on-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.support-guide__button:active {
  background: var(--primary-active);
  transform: translateY(0);
}

.support-guide__button:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.support-guide__meta {
  margin: var(--space-3) 0 0;
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.support-guide__note {
  margin: var(--space-3) 0 0;
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--text-muted);
  text-wrap: pretty;
}

/* ---------- Expanders ---------- */

.resources-expander {
  overflow: hidden;
}

.resources-expander__summary {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-6);
  cursor: pointer;
  list-style: none;
  color: var(--text-strong);
}

.resources-expander__summary::-webkit-details-marker {
  display: none;
}

.resources-expander__summary:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius-lg);
}

.resources-expander__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  line-height: 1.25;
}

.resources-expander__hint {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.4;
}

.resources-expander__chevron {
  color: var(--text-muted);
  transition: transform var(--duration-normal) var(--ease-out);
  flex-shrink: 0;
}

.resources-expander[open] .resources-expander__chevron {
  transform: rotate(180deg);
}

.resources-expander__body {
  padding: 0 var(--space-6) var(--space-5);
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-4);
}

.support-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.support-links__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
}

.support-links__link {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-link);
  text-decoration: none;
  line-height: 1.5;
}

.support-links__link:hover {
  text-decoration: underline;
}

.support-links__link:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius-xs);
}

.support-links__source {
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: var(--bg-sunken);
  border-radius: var(--radius-pill);
  padding: 2px 10px;
}

/* ---------- Footnote ---------- */

.resources-footnote {
  margin: 0;
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-faint);
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .resources-shell {
    padding-top: var(--space-8);
    gap: var(--space-5);
  }

  .support-section,
  .resources-card--guide {
    padding: var(--space-5);
  }

  .resources-expander__summary {
    padding: var(--space-4) var(--space-5);
    flex-wrap: wrap;
  }

  .resources-expander__hint {
    flex-basis: 100%;
  }

  .resources-expander__body {
    padding-left: var(--space-5);
    padding-right: var(--space-5);
  }

  .support-guide__button {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .support-guide__button,
  .resources-expander__chevron,
  a.support-resource__phone--call {
    transition: none;
  }

  .support-guide__button:hover {
    transform: none;
  }
}
