.guide-prep {
  padding-block: 0 40px;
}
.guide-prep h2 {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 22px;
}
.guide-prep dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  padding-block: 22px;
  border-block: 1px solid var(--line);
}
.guide-prep dt {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 6px;
}
.guide-prep dd,
.guide-prep > p {
  color: var(--muted);
  font-size: 14px;
}
.guide-prep dd {
  margin: 0;
}
.guide-prep > p {
  margin-top: 16px;
}
.guide-step header {
  align-items: baseline;
  gap: 24px;
}
.guide-step header > span {
  font-size: 48px;
  line-height: 1;
  min-width: 56px;
}
.guide-step h2 {
  font-size: 30px;
  font-weight: 500;
}
.guide-step-next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.guide-step-next p {
  margin: 0;
  font-size: 14px;
}
.guide-step-next .text-link {
  min-height: 44px;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
}
@media (max-width: 760px) {
  .guide-prep {
    padding-bottom: 28px;
  }
  .guide-prep dl {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .guide-prep dl > div {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 16px;
  }
  .guide-prep dt {
    margin: 0;
  }
  .guide-step header {
    gap: 18px;
    align-items: baseline;
  }
  .guide-step header > span {
    font-size: 40px;
    min-width: 44px;
  }
  .guide-step h2 {
    font-size: 26px;
  }
}

/* Firsthand issuance guide: one narrative with grouped, inspectable screens. */
.firsthand-hero {
  padding-block: 40px 48px;
}
.firsthand-hero .eyebrow {
  margin: 32px 0 12px;
  color: var(--purple);
}
.firsthand-hero h1 {
  max-width: 960px;
  font-size: 42px;
  font-weight: 600;
  line-height: 1.35;
}
.firsthand-lead {
  max-width: 800px;
  font-size: 18px;
  margin-top: 20px;
  color: var(--muted);
}
.firsthand-hero .actions {
  margin-top: 28px;
}
.firsthand-hero .disclosure {
  margin-top: 14px;
}
.guide-overview {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  padding: 24px;
  background: var(--pearl);
  margin-top: 40px;
  counter-reset: overview;
}
.guide-overview li {
  counter-increment: overview;
  font-weight: 500;
}
.guide-overview li::before {
  content: "0" counter(overview);
  color: var(--purple);
  display: block;
  margin-bottom: 8px;
}
.firsthand-layout {
  grid-template-columns: 204px minmax(0, 1fr);
  gap: 48px;
}
.firsthand-layout .toc {
  padding: 20px;
  border: 0;
  border-radius: 8px;
  background: var(--pearl);
  top: 20px;
  max-height: calc(100svh - 40px);
  overflow: auto;
}
.firsthand-layout .toc summary {
  list-style: none;
  font-size: 15px;
  font-weight: 600;
}
.firsthand-layout .toc summary::-webkit-details-marker {
  display: none;
}

.firsthand-layout .toc a {
  min-height: 44px;
  font-size: 14px;
  border-radius: 8px;
  padding: 8px 0;
}
.firsthand-layout .toc a:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}
.firsthand-layout .guide-body {
  min-width: 0;
}
.firsthand-layout .guide-step {
  padding-block: 48px;
  scroll-margin-top: 24px;
}
.firsthand-layout .guide-step:first-child {
  padding-top: 20px;
}
.firsthand-layout .guide-step header {
  gap: 20px;
  align-items: baseline;
}
.firsthand-layout .guide-step header > span {
  font-size: 34px;
  min-width: 42px;
}
.firsthand-layout .guide-step h2 {
  font-size: 28px;
  line-height: 1.45;
  font-weight: 600;
}
.firsthand-layout .guide-step h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 36px 0 16px;
}
.firsthand-layout .guide-step p,
.firsthand-layout .guide-step li {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.85;
}
.firsthand-layout p a:not(.button),
.firsthand-layout li a {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.firsthand-layout p,
.firsthand-layout li,
.firsthand-layout h2,
.firsthand-layout h3,
.firsthand-layout td,
.firsthand-layout th,
.firsthand-hero h1 {
  word-break: keep-all;
  overflow-wrap: break-word;
}
.referral-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  background: var(--purple-soft);
  padding: 24px;
  margin-top: 28px;
  border-radius: 8px;
}
.referral-inline p {
  margin: 8px 0 0;
}
.firsthand-layout .referral-inline p:last-child {
  font-size: 14px;
}
.referral-code {
  white-space: nowrap;
  font-family: ui-monospace, monospace;
  font-weight: 600;
}
.capture-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-block: 32px;
  align-items: start;
}
.capture-strip.two {
  grid-template-columns: repeat(2, minmax(0, 320px));
}
.capture-strip:has(> :only-child) {
  grid-template-columns: minmax(0, 320px);
}
.capture {
  min-width: 0;
  margin: 0;
}
.capture > a {
  display: block;
  position: relative;
  color: var(--muted);
  text-decoration: none;
}
.capture img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1125 / 2276;
  object-fit: contain;
  border-radius: 8px;
  background: var(--pearl);
}
.capture > a > span {
  display: block;
  text-align: right;
  padding-top: 10px;
  font-size: 13px;
  min-height: 36px;
}
.capture > a:hover > span {
  color: var(--purple);
  text-decoration: underline;
}
.capture figcaption {
  display: grid;
  gap: 8px;
  line-height: 1.65;
  font-size: 14px;
}
.capture figcaption strong {
  font-weight: 600;
}
.capture figcaption > span {
  color: var(--muted);
}
.guide-answer {
  padding: 24px;
  background: var(--purple-soft);
  margin-block: 28px;
  border-radius: 8px;
}
.guide-answer > strong {
  display: block;
  font-size: 18px;
  margin-bottom: 10px;
}
.guide-answer > p:last-child {
  margin-bottom: 0;
}
.guide-subsection {
  scroll-margin-top: 24px;
}
.guide-fee-table {
  margin-block: 24px;
}
.guide-fee-table table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
  font-size: 15px;
}
.guide-fee-table caption {
  text-align: left;
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--muted);
}
.guide-fee-table th,
.guide-fee-table td {
  border: 1px solid var(--muted);
  padding: 18px 16px;
  vertical-align: top;
  text-align: left;
}
.guide-fee-table thead {
  background: var(--pearl);
}
.guide-fee-table th {
  font-weight: 600;
}
.guide-fee-table td > span,
.guide-fee-table td > small {
  display: block;
}
.guide-fee-table td > small {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}
.guide-detail {
  border-block: 1px solid var(--line);
  padding: 0 0 0;
  margin-block: 24px;
}
.guide-detail summary {
  cursor: pointer;
  min-height: 56px;
  padding-block: 16px;
  font-weight: 500;
  line-height: 1.65;
}
.guide-detail[open] {
  padding-bottom: 24px;
}
.guide-detail summary:hover,
.guide-detail summary:focus-visible {
  color: var(--purple);
}
.address-fields > div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 20px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}
.address-fields dt {
  font-weight: 600;
}
.address-fields dd {
  margin: 0;
}
.guide-next-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 28px;
}
.guide-next-links a {
  min-height: 44px;
  margin: 0;
}
.guide-sources {
  font-size: 14px;
}
.guide-sources li {
  margin-bottom: 12px;
}
@media (min-width: 1600px) {
  .firsthand-layout {
    max-width: 1460px;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 64px;
  }
  .firsthand-layout .guide-body {
    max-width: 1060px;
  }
}
@media (max-width: 1150px) {
  .firsthand-layout {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 32px;
  }
  .referral-inline {
    grid-template-columns: 1fr;
  }
  .referral-inline .button {
    justify-self: start;
  }
  .capture-strip {
    gap: 16px;
  }
}
@media (max-width: 900px) {
  .firsthand-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .firsthand-layout .toc {
    position: static;
    display: block;
    padding: 0 20px;
    max-height: none;
    overflow: visible;
  }
  .firsthand-layout .toc summary {
    list-style: disclosure-closed;
    min-height: 56px;
    padding-block: 16px;
    cursor: pointer;
  }
  .firsthand-layout .toc details[open] summary {
    list-style: disclosure-open;
  }
  .firsthand-layout .toc details:not([open]) > nav {
    display: none;
  }
  .firsthand-layout .toc nav {
    padding-bottom: 16px;
  }
  .firsthand-hero h1 {
    font-size: 36px;
  }
  .firsthand-layout .guide-step:first-child {
    padding-top: 12px;
  }
}
@media (max-width: 600px) {
  .firsthand-hero {
    padding-block: 24px 36px;
  }
  .firsthand-hero h1 {
    font-size: 30px;
  }
  .firsthand-lead {
    font-size: 17px;
  }
  .firsthand-lead br {
    display: none;
  }
  .firsthand-hero .actions {
    gap: 12px;
  }
  .guide-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 16px;
    padding: 20px;
    font-size: 14px;
  }
  .firsthand-layout .guide-step h2 {
    font-size: 24px;
  }
  .firsthand-layout .guide-step header {
    gap: 12px;
  }
  .firsthand-layout .guide-step header > span {
    font-size: 28px;
    min-width: 36px;
  }
  .firsthand-layout .guide-step p,
  .firsthand-layout .guide-step li {
    font-size: 16px;
  }
  .firsthand-layout .guide-step {
    padding-block: 40px;
  }
  .capture-strip,
  .capture-strip.two,
  .capture-strip:has(> :only-child) {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .capture {
    width: 100%;
    max-width: 340px;
    justify-self: center;
  }
  .guide-answer,
  .referral-inline {
    padding: 20px;
  }
  .guide-fee-table th,
  .guide-fee-table td {
    padding: 12px 8px;
    font-size: 14px;
  }
  .guide-fee-table th:first-child {
    width: 25%;
  }
  .guide-fee-table td > small {
    font-size: 13px;
  }
  .address-fields > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
}

@media (min-width: 601px) and (max-width: 1050px) {
  .capture-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.firsthand-layout .guide-step > p,
.firsthand-layout .guide-step > ol,
.firsthand-layout .guide-step > ul {
  max-width: 80ch;
}
