/* =============================================================
   Pacific Spruce FCU - guide pages (articles)
   Loaded only on the guide pages, after styles.css.
   Uses the tokens defined in styles.css (:root).
   ============================================================= */

/* ---------- Intro: photo band + title card ---------- */
.ps-hero {
  position: relative;
  background: var(--paper-alt);
}
.ps-hero__media {
  margin: 0;
  height: clamp(220px, 30vw, 460px);
  overflow: hidden;
  background: var(--green-50);
}
.ps-hero__media picture,
.ps-hero__media img {
  display: block;
  width: 100%;
  height: 100%;
}
.ps-hero__media img {
  object-fit: cover;
  object-position: center 40%;
}
.ps-hero--dd .ps-hero__media img { object-position: center 12%; }
.ps-hero--fam .ps-hero__media img { object-position: center 30%; }
.ps-hero--board .ps-hero__media img { object-position: center 70%; }

.ps-hero__card {
  position: relative;
  margin-top: clamp(-150px, -9vw, -64px);
  padding: clamp(1.5rem, 3.6vw, 3rem) clamp(1.25rem, 3.6vw, 3.25rem);
  background: var(--paper);
  border: 1px solid var(--border);
  border-top: 4px solid var(--green-700);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
}
.ps-hero__card .breadcrumbs ol { flex-wrap: wrap; margin-bottom: 1rem; }
.ps-hero__card h1 {
  color: var(--green-900);
  font-size: clamp(1.9rem, 3.5vw, 2.9rem);
  line-height: 1.12;
  margin: 0 0 1.1rem;
  text-wrap: balance;
}
.ps-hero__lede {
  margin: 0;
  font-size: clamp(1.05rem, 1.3vw, 1.18rem);
  line-height: 1.7;
  color: var(--ink-700);
}

/* ---------- Article grid: contents rail + body ---------- */
.ps-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: clamp(2.5rem, 4.5vw, 4.5rem);
  align-items: start;
  padding-top: clamp(2.75rem, 5.5vw, 4.5rem);
  padding-bottom: var(--sp-section);
}

.ps-toc {
  position: sticky;
  top: 104px;
}
.ps-toc__title {
  margin: 0 0 .9rem;
  font-size: .9rem;
  font-weight: 700;
  color: var(--green-900);
}
.ps-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--border);
}
.ps-toc a {
  display: block;
  margin-left: -2px;
  padding: .5rem 0 .5rem 1rem;
  border-left: 2px solid transparent;
  font-size: .9rem;
  line-height: 1.4;
  color: var(--ink-700);
}
.ps-toc a:hover,
.ps-toc a:focus-visible {
  color: var(--teal-800);
  border-left-color: var(--teal-600);
  text-decoration: none;
}

/* ---------- Body copy ---------- */
.ps-body > * + * { margin-top: clamp(2.75rem, 5vw, 4rem); }

.ps-section { scroll-margin-top: 104px; }
.ps-section h2 {
  margin: 0 0 1.1rem;
  font-size: clamp(1.5rem, 2.3vw, 1.95rem);
  line-height: 1.2;
  color: var(--ink-900);
}
.ps-section p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink-700);
}
.ps-section p + p { margin-top: 1.1rem; }

.ps-body a,
.ps-hero__lede a {
  color: var(--teal-700);
  border-bottom: 1px solid var(--teal-600);
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.ps-body a:hover,
.ps-hero__lede a:hover {
  color: var(--teal-800);
  border-bottom-color: var(--teal-800);
  background: var(--teal-50);
  text-decoration: none;
}

/* Tinted section */
.ps-section--tint {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--paper-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

/* Section with a photo panel on top */
.ps-panel {
  overflow: hidden;
  background: var(--paper-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.ps-panel__media {
  margin: 0;
  aspect-ratio: 16 / 7;
  background: var(--green-50);
}
.ps-panel__media picture,
.ps-panel__media img {
  display: block;
  width: 100%;
  height: 100%;
}
.ps-panel__media img { object-fit: cover; }
.ps-panel__body {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-top: 4px solid var(--green-700);
}

/* Table */
.ps-table-wrap {
  margin: 1.75rem 0;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.ps-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
.ps-table thead { background: var(--green-900); }
.ps-table thead th {
  padding: .9rem 1.25rem;
  text-align: left;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
}
.ps-table tbody tr { border-top: 1px solid var(--border); }
.ps-table tbody tr:nth-child(even) { background: var(--paper-alt); }
.ps-table tbody th,
.ps-table tbody td {
  padding: 1rem 1.25rem;
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}
.ps-table tbody th {
  width: 30%;
  font-weight: 600;
  color: var(--green-900);
}
.ps-table tbody td { color: var(--ink-700); }

/* Numbered steps (text that is a sequence) */
.ps-steps {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: ps-step;
  display: grid;
  gap: 1rem;
}
.ps-steps li {
  counter-increment: ps-step;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.ps-steps li::before {
  content: counter(ps-step);
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--r-full);
  background: var(--green-900);
  color: #fff;
  font-weight: 700;
}

/* Note plaque */
.ps-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--teal-50);
  border: 1px solid var(--teal-100);
  border-left: 4px solid var(--teal-600);
  border-radius: var(--r-md);
}
.ps-note i { margin-top: .35rem; color: var(--teal-700); }
.ps-note p { color: var(--ink-800); }

/* Question cards */
.ps-qa {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.ps-section .ps-qa p {
  margin: 0;
  padding: 1.5rem 1.6rem;
  background: var(--paper);
  border: 1px solid var(--border);
  border-top: 3px solid var(--teal-600);
  border-radius: var(--r-md);
}
.ps-qa__q {
  display: block;
  margin-bottom: .55rem;
  font-size: 1.1rem;
  line-height: 1.4;
  font-weight: 700;
  color: var(--green-900);
}

/* ---------- Closing band (on top of .join-cta) ---------- */
.ps-close { text-align: left; scroll-margin-top: 80px; }
.ps-close .join-cta__inner { max-width: var(--container-max); }
.ps-close p { max-width: none; font-size: 1.125rem; line-height: 1.7; }
.ps-close .join-cta__buttons { justify-content: flex-start; }

/* ---------- Responsive ---------- */
/* Shared header: keep it inside the viewport between the burger breakpoint and 960px
   (the Log In link stays available in the utility bar above). */
@media (min-width: 821px) and (max-width: 960px) {
  .site-header__inner { gap: 1rem; }
  .site-header .brand { flex-shrink: 0; }
  .primary-nav ul { gap: 1.1rem; }
  .header-cta .btn--ghost { display: none; }
}

@media (max-width: 1024px) {
  .ps-layout { grid-template-columns: minmax(0, 1fr); }
  .ps-toc { display: none; }
}

@media (max-width: 720px) {
  .ps-qa { grid-template-columns: minmax(0, 1fr); }
  .ps-steps li { grid-template-columns: minmax(0, 1fr); gap: .85rem; padding: 1.25rem; }
}

@media (max-width: 640px) {
  .ps-table thead {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .ps-table,
  .ps-table tbody,
  .ps-table tr,
  .ps-table th,
  .ps-table td { display: block; width: auto; }
  .ps-table tbody tr { padding: 1rem 1.1rem; }
  .ps-table tbody th,
  .ps-table tbody td { width: auto; padding: .2rem 0; }
  .ps-table tbody td::before,
  .ps-table tbody th::before {
    content: attr(data-label);
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: var(--ink-500);
  }
  .ps-table tbody td { margin-top: .5rem; }
  .ps-panel__media { aspect-ratio: 16 / 9; }
  .ps-section p { font-size: 1rem; }
}
