/* The guide pages (/guide/...): the main page's cyan hero with the guide's
   number, numbered steps, side notes and the wallet cards. */

/* ---------- hero ---------- */

.guide-hero, .guide {
  width: min(100% - 2 * var(--gutter), var(--content));
  margin-inline: auto;
}

.guide-hero {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 48px 64px;
  border-radius: 40px;
  background: var(--hero-bg);
}
.guide-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--navy);
  color: #ffffff;
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 2.75rem;
}
.guide-intro { display: flex; flex-direction: column; gap: 12px; }
.guide-intro h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: -.015em; }
.guide-intro .lede { max-width: 46rem; font-size: 1.15rem; }
.crumbs { font-size: .9rem; color: var(--muted); }

@media (prefers-color-scheme: dark) {
  .guide-num { background: var(--surface-soft); }
}

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

.guide { flex: 1; display: flex; flex-direction: column; gap: 56px; padding: 56px 0 72px; }
.guide article { display: flex; flex-direction: column; gap: 48px; }

.guide-columns {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: start;
  gap: 56px;
}

.guide-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 36px; counter-reset: guide-step; }
.guide-steps li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 20px;
  row-gap: 10px;
  counter-increment: guide-step;
}
.guide-steps li::before {
  content: counter(guide-step);
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--line-strong);
  border-radius: 999px;
  color: var(--heading);
  font-family: var(--font-display);
  font-weight: 800;
}
.guide-steps h2 { font-size: 1.25rem; font-stretch: 112%; align-self: center; }
.guide-steps p { grid-column: 2; }
.guide-steps strong { color: var(--heading); }
.guide-steps code { font-size: .9em; overflow-wrap: anywhere; }

/* Side notes, and notes under a section. */
.guide-asides { display: flex; flex-direction: column; gap: 20px; }
.guide-note {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 28px;
  border-radius: 24px;
  background: var(--hero-bg);
}
.guide-note h2 { font-size: 1.05rem; }
.guide-note ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.guide-note.dark { background: var(--navy); color: #ffffff; }
.guide-note.dark h2 { color: var(--cyan); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; }
.guide-note.dark a { color: var(--cyan); }
.guide-note.dark a:hover { color: #ffffff; }
.guide-note.dark p { color: #d9d6f2; }
p.guide-note { display: block; }

@media (prefers-color-scheme: dark) {
  .guide-note.dark { background: var(--surface-soft); }
}

/* ---------- wallets ---------- */

.wallet-group, .wallet-howto { display: flex; flex-direction: column; gap: 20px; }
.wallet-howto .guide-steps { margin-bottom: 8px; }
.wallet-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.wallet-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}
.wallet-card h3 { font-size: 1.15rem; font-stretch: 112%; }
.store-links { display: flex; flex-wrap: wrap; gap: 8px; align-self: stretch; }
.store-link {
  flex: 1;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 2px solid var(--line-strong);
  border-radius: 999px;
  color: var(--heading);
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.store-link:hover { background: var(--heading); color: var(--bg); }

/* ---------- guide navigation ---------- */

.guide-nav ol {
  list-style: none;
  margin: 0;
  padding: 24px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  border-top: 2px solid var(--line-strong);
}
.guide-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--hero-bg);
  color: var(--heading);
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}
.guide-nav a:hover { text-decoration: underline; }
.guide-nav a[aria-current] { background: var(--navy); color: #ffffff; }
.guide-nav .step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--navy);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 800;
}
.guide-nav a[aria-current] .step-num { background: var(--cyan); color: var(--navy); }

@media (prefers-color-scheme: dark) {
  .guide-nav a[aria-current] { background: var(--cyan); color: var(--navy); }
  .guide-nav a[aria-current] .step-num { background: var(--navy); color: #ffffff; }
  .guide-nav .step-num { background: var(--surface-soft); }
}

/* ---------- small screens ---------- */

@media (max-width: 900px) {
  .guide-hero { padding: 32px 24px; border-radius: 28px; gap: 24px; }
  .guide-columns { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .guide-nav ol { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .guide-hero { flex-direction: column; align-items: flex-start; }
  .guide-num { width: 64px; height: 64px; font-size: 1.8rem; }
  .guide { padding-top: 40px; gap: 40px; }
  .guide-steps li { grid-template-columns: 36px minmax(0, 1fr); column-gap: 14px; }
  .guide-steps li::before { width: 36px; height: 36px; }
}
