/* Become an RBT guide — extends style.css + pages.css */

.page-hero--compact {
  padding-block: clamp(3rem, 8vw, 5rem);
}

.page-hero--compact h1 {
  margin-bottom: var(--sp-2);
}

.page-hero--compact .page-hero-lead {
  margin-top: var(--sp-5);
}

.page-hero--compact .guide-draft-badge {
  margin-top: var(--sp-6);
}

/* Chapter body — slightly more room than generic inner pages */
.page-section:has(.guide-prose) {
  padding-block: var(--sp-12) var(--sp-16);
}

.page-section:has(.guide-prose) .page-section-num + h2,
.page-section:has(.guide-step-path) h2 {
  margin-top: var(--sp-2);
  margin-bottom: var(--sp-8);
}

.page-section:has(.guide-table) > .container--narrow > p,
.page-section:has(.guide-prose) > .container--narrow > .guide-prose > p:last-child {
  margin-bottom: 0;
}

.guide-breadcrumb {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}

.guide-breadcrumb a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
}

.guide-breadcrumb a:hover,
.guide-breadcrumb a:focus-visible {
  color: #fff;
}

.guide-draft-badge {
  display: inline-block;
  margin-top: var(--sp-5);
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.35em 0.75em;
  border-radius: 100px;
}

.guide-disclaimer {
  border-left: 3px solid var(--color-accent-start, #f1a14b);
  background-color: var(--color-bg-tinted);
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-10);
  border-radius: 0 4px 4px 0;
}

.guide-disclaimer p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.65;
}

.guide-disclaimer a {
  color: var(--color-text);
  font-weight: 500;
}

.guide-prose {
  max-width: var(--container-narrow);
}

/* Markdown # title duplicates the layout hero — strip in build; hide if any slip through */
.guide-prose h1 {
  display: none;
}

.guide-prose h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-top: var(--sp-12);
  margin-bottom: var(--sp-6);
  scroll-margin-top: calc(var(--header-height) + 4rem);
}

.guide-prose h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--color-text);
  line-height: 1.3;
  margin-top: var(--sp-10);
  margin-bottom: var(--sp-4);
  scroll-margin-top: calc(var(--header-height) + 4rem);
}

.guide-prose h2 + h3 {
  margin-top: var(--sp-6);
}

.guide-prose p,
.guide-prose li {
  font-size: 1rem;
  color: var(--color-text-light);
  line-height: 1.75;
}

.guide-prose p + p {
  margin-top: var(--sp-4);
}

.guide-prose p + ul,
.guide-prose p + ol,
.guide-prose h2 + ul,
.guide-prose h2 + ol,
.guide-prose h3 + ul,
.guide-prose h3 + ol {
  margin-top: var(--sp-4);
}

.guide-prose ul,
.guide-prose ol {
  margin-top: var(--sp-4);
  margin-bottom: var(--sp-6);
  padding-left: 1.25rem;
}

.guide-prose li + li {
  margin-top: var(--sp-2);
}

.guide-prose > p:first-child {
  margin-top: 0;
}

.guide-prose blockquote {
  display: none;
}

.guide-prose a {
  color: var(--color-text);
  font-weight: 500;
  text-underline-offset: 2px;
}

.guide-prose a:hover,
.guide-prose a:focus-visible {
  color: var(--color-accent-end, #e556b3);
}

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

.guide-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-block: var(--sp-5) var(--sp-8);
}

.guide-prose h2 + .guide-table-wrap,
.guide-prose h3 + .guide-table-wrap,
.guide-prose p + .guide-table-wrap {
  margin-top: var(--sp-4);
}

.guide-prose .guide-table-wrap:first-child {
  margin-top: 0;
}

/* Fallback if a bare table slips through without the build transform */
.guide-prose table:not(.guide-table) {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin-block: var(--sp-4) var(--sp-6);
}

.guide-prose table:not(.guide-table) th,
.guide-prose table:not(.guide-table) td {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.guide-prose table:not(.guide-table) th {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.guide-prose table:not(.guide-table) td {
  color: var(--color-text-light);
  line-height: 1.55;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.guide-table th,
.guide-table td {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.guide-table th {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.guide-table thead th {
  border-bottom: 2px solid var(--color-border);
}

.guide-table td {
  color: var(--color-text-light);
  line-height: 1.55;
}

.guide-table a {
  font-weight: 500;
  color: var(--color-text);
}

.guide-step-path {
  list-style: none;
  padding: 0;
  margin: var(--sp-6) 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.guide-step-card {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.guide-step-card__num {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.guide-step-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.3;
  margin: 0 0 var(--sp-3);
}

.guide-step-card__lead {
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.6;
  margin: 0 0 var(--sp-4);
}

.guide-step-card__links {
  margin: 0;
  font-size: 0.9rem;
}

.guide-step-card__links a {
  font-weight: 600;
}

.guide-chapter-nav {
  border-top: 1px solid var(--color-border);
  padding-block: var(--sp-10);
  background: var(--color-bg-tinted);
}

.page-signup-block h2 {
  margin-bottom: var(--sp-6);
}

.page-signup-block p {
  margin-bottom: var(--sp-10);
}

.guide-chapter-nav .container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--sp-4);
  align-items: center;
}

.guide-chapter-nav__link {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  text-decoration: none;
  color: var(--color-text);
  max-width: 280px;
}

.guide-chapter-nav__link--next {
  text-align: right;
  justify-self: end;
}

.guide-chapter-nav__label {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.guide-chapter-nav__title {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.35;
}

.guide-chapter-nav__link:hover .guide-chapter-nav__title,
.guide-chapter-nav__link:focus-visible .guide-chapter-nav__title {
  color: var(--color-accent-end, #e556b3);
}

.guide-chapter-nav__hub {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-text-mid);
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  white-space: nowrap;
}

.guide-chapter-nav__hub:hover,
.guide-chapter-nav__hub:focus-visible {
  color: var(--color-text);
  border-color: var(--color-text-mid);
}

.guide-chapter-nav__spacer {
  display: block;
}

.guide-jump-nav a[aria-current="page"] {
  color: var(--color-text);
  border-color: var(--color-border);
  background: var(--color-bg);
}

@media (max-width: 720px) {
  .guide-chapter-nav .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .guide-chapter-nav__link,
  .guide-chapter-nav__link--next {
    justify-self: center;
    text-align: center;
    max-width: none;
  }

  .guide-step-card {
    grid-template-columns: 2.5rem 1fr;
  }
}
