/* SilverPath Help & FAQs — clean, document-like, senior-friendly.
   Shares the visual language of the legal pages (legal.silverpathapp.com)
   but uses a larger, more readable type scale. */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --brand: #2E7D32;
  --brand-dark: #1B5E20;
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --rule: #e5e5e5;
  --rule-light: #eee;
  --surface: #fafafa;
  --column: 800px; /* reading column: within the 760–820px target */
}

html {
  scroll-behavior: smooth;
  color-scheme: light; /* Light-only, matching the legal pages. */
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  max-width: var(--column);
  margin: 0 auto;
  padding: 32px 32px 72px;
}

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #ffffff;
  color: var(--brand-dark);
  font-size: 16px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 6px;
  z-index: 10;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule-light);
}

.site-header .brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}

.site-header .brand:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

.site-header .open-app {
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-dark);
  text-decoration: none;
}

.site-header .open-app:hover {
  text-decoration: underline;
}

/* ---------- Page title ---------- */

h1 {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-top: 48px;
}

/* ---------- Search ---------- */

.faq-search {
  margin-top: 36px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
}

.faq-search-label {
  display: block;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.faq-search-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

#faq-search-input {
  flex: 1 1 320px;
  min-width: 0;
  font-family: inherit;
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink);
  background: #ffffff;
  padding: 14px 16px;
  border: 2px solid #c4c4c4;
  border-radius: 8px;
  -webkit-appearance: none;
  appearance: none;
}

#faq-search-input::placeholder {
  color: #6b6b6b;
}

#faq-search-input:hover {
  border-color: #9a9a9a;
}

#faq-search-input:focus {
  border-color: var(--brand-dark);
}

#faq-search-clear {
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  color: var(--brand-dark);
  background: #ffffff;
  padding: 14px 20px;
  border: 2px solid #c4c4c4;
  border-radius: 8px;
  cursor: pointer;
}

#faq-search-clear:hover {
  border-color: var(--brand-dark);
  background: #f2f7f2;
}

.faq-search-status {
  font-size: 16px;
  color: var(--ink-soft);
  margin-top: 12px;
}

.faq-search-status:empty {
  display: none;
}

/* Search is a JavaScript enhancement — hidden until the script enables it. */
.faq-search[hidden] {
  display: none;
}

/* ---------- Category jump links ---------- */

.faq-categories {
  margin-top: 36px;
  padding: 24px 28px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
}

.faq-categories-title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.faq-categories ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.faq-categories li {
  font-size: 18px;
}

.faq-categories a {
  display: inline-block;
  padding: 6px 0;
  color: var(--brand-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- FAQ content ---------- */

.faq-category {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 2px solid var(--rule);
}

.faq-category:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 56px;
}

.faq-category h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  scroll-margin-top: 24px;
}

.faq-item {
  margin-top: 40px;
}

.faq-item h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 12px;
}

.faq-answer p {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.faq-answer p:last-child,
.faq-answer ul:last-child {
  margin-bottom: 0;
}

.faq-answer ul {
  margin-bottom: 16px;
  padding-left: 26px;
}

.faq-answer li {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 8px;
}

.faq-answer li:last-child {
  margin-bottom: 0;
}

.faq-example {
  margin-bottom: 16px;
  padding-left: 20px;
  border-left: 3px solid var(--rule);
  color: var(--ink-soft);
}

.faq-example p {
  margin-bottom: 2px;
}

.faq-example p:last-child {
  margin-bottom: 0;
}

/* ---------- No results ---------- */

.faq-no-results {
  margin-top: 56px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  font-size: 18px;
  line-height: 1.6;
}

/* ---------- Links ---------- */

a {
  color: var(--brand-dark);
}

.faq-answer a,
.site-footer a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.faq-answer a:hover,
.site-footer a:hover {
  color: var(--brand);
}

/* Visible focus for every interactive element. */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--brand-dark);
  outline-offset: 3px;
  border-radius: 4px;
}

strong {
  font-weight: 700;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-bottom: 16px;
}

.footer-links a {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-soft);
}

.footer-copy {
  font-size: 16px;
  color: var(--ink-soft);
}

/* ---------- Mobile ----------
   Spacing tightens; type stays at the full readable size. */

@media (max-width: 640px) {
  .page {
    padding: 20px 20px 56px;
  }

  h1 {
    font-size: 30px;
    margin-top: 32px;
  }

  .faq-search,
  .faq-categories {
    margin-top: 28px;
    padding: 20px;
  }

  .faq-search-row {
    flex-direction: column;
  }

  #faq-search-input,
  #faq-search-clear {
    flex: 1 1 auto;
    width: 100%;
  }

  .faq-categories ul {
    flex-direction: column;
    gap: 0;
  }

  .faq-category {
    margin-top: 48px;
    padding-top: 32px;
  }

  .faq-category:first-of-type {
    margin-top: 40px;
  }

  .faq-item {
    margin-top: 32px;
  }

  .site-footer {
    margin-top: 56px;
  }
}
