/* Original Spending guide. Existing global site styles stay unchanged. */
.guide-page .brand img {
  width: calc(1.625rem * 695 / 1148);
  aspect-ratio: 695 / 1148;
}

.guide-page .public-nav a,
.guide-page .header-actions > a {
  text-decoration: none;
}

.guide-page .guide-menu {
  display: none;
}

.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15rem;
  align-items: center;
  gap: 2.5rem;
  padding-block: 4rem 3rem;
  border-bottom: 1px solid var(--line);
}

.guide-hero__copy {
  display: grid;
  gap: 1rem;
  max-width: 44rem;
}

.guide-kicker {
  color: var(--accent-hover);
  font-size: var(--text-md);
  font-weight: 600;
}

.guide-hero h1 {
  font-size: clamp(2.125rem, 1.5rem + 2.6vw, 3.375rem);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.guide-lead {
  max-width: 39rem;
  color: var(--text-2);
  font-size: var(--text-lg);
  line-height: 1.65;
}

.guide-byline {
  color: var(--text-3);
  font-size: var(--text-sm);
}

.guide-card {
  display: grid;
  gap: 0.75rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.guide-card > img {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

.guide-card figcaption {
  color: var(--text-3);
  font-size: var(--text-xs);
  line-height: 1.5;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 42rem);
  align-items: start;
  justify-content: space-between;
  gap: 3rem;
  padding-block: 2.5rem 4rem;
}

.guide-contents {
  position: sticky;
  top: 6rem;
  color: var(--text-2);
  font-size: var(--text-md);
}

.guide-contents summary {
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}

.guide-contents ol {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.75rem;
}

.guide-contents a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  line-height: 1.4;
}

.guide-body {
  min-width: 0;
  color: var(--text-2);
  font-size: 1.0625rem;
  line-height: 1.75;
}

.guide-body section {
  scroll-margin-top: 6rem;
}

.guide-facts {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  margin-bottom: 2.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: var(--text-md);
  line-height: 1.6;
}

.guide-facts dt,
.guide-facts dd {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--line);
}

.guide-facts dt {
  color: var(--text);
  font-weight: 600;
}

.guide-facts dt:last-of-type,
.guide-facts dd:last-of-type {
  border-bottom: 0;
}

.guide-body section + section {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.guide-body h2 {
  margin-bottom: 1rem;
  color: var(--text);
  font-size: clamp(1.375rem, 1.2rem + 0.5vw, 1.625rem);
  letter-spacing: -0.025em;
}

.guide-body p + h2 {
  margin-top: 2rem;
}

.guide-body p + p,
.guide-body p + ul,
.guide-body p + ol,
.guide-body ul + p,
.guide-body ol + p {
  margin-top: 1rem;
}

.guide-body :is(ul, ol) {
  display: grid;
  gap: 0.75rem;
  padding-left: 1.25rem;
  list-style: disc;
}

.guide-body ol {
  list-style: decimal;
}

.guide-body strong {
  color: var(--text);
  font-weight: 600;
}

.guide-body a:not(.button),
.guide-contents a {
  color: var(--accent-hover);
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-underline-offset: 0.2em;
}

.guide-note {
  margin-top: 1.25rem;
  padding: 1rem 1.125rem;
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--surface);
}

.guide-pricing {
  width: 100%;
  margin-block: 1.5rem;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: var(--text-md);
  line-height: 1.55;
}

.guide-pricing caption {
  padding-bottom: 0.75rem;
  color: var(--text-3);
  font-size: var(--text-sm);
  text-align: left;
}

.guide-pricing th,
.guide-pricing td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.guide-pricing th {
  color: var(--text);
  font-weight: 600;
}

.guide-pricing th:first-child {
  width: 40%;
}

.guide-faq details + details {
  border-top: 1px solid var(--line);
}

.guide-faq summary {
  padding-block: 1.125rem;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  line-height: 1.5;
}

.guide-faq details p {
  padding-bottom: 1.25rem;
}

.guide-cta {
  padding: 1.5rem;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.guide-cta .hero-actions {
  margin-top: 1.25rem;
}

@media (max-width: 920px) {
  .guide-page .guide-menu {
    display: block;
    position: static;
  }

  .guide-menu > summary {
    display: grid;
    place-items: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    color: var(--text);
    cursor: pointer;
    font-size: var(--text-md);
    font-weight: 600;
    list-style: none;
  }

  .guide-menu > summary::-webkit-details-marker {
    display: none;
  }

  .guide-menu[open] .public-nav {
    display: flex;
  }

  .guide-hero {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 2.5rem;
  }

  .guide-card {
    max-width: 16rem;
  }

  .guide-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    padding-top: 1.5rem;
  }

  .guide-contents {
    position: static;
    padding: 1rem 1.125rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
  }
}

@media (max-width: 620px) {
  .guide-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-facts dt {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .guide-facts dd {
    padding-top: 0.25rem;
  }

  .guide-card {
    max-width: 13rem;
  }

  .guide-body {
    font-size: 1rem;
  }

  .guide-body section + section {
    margin-top: 2rem;
    padding-top: 2rem;
  }

  .guide-cta {
    padding: 1.125rem;
  }
}
