.guide-page {
  max-width: 72rem;
}

.guide-page :where(h1,h2,h3) {
  margin: 0;
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  letter-spacing: -.035em;
  line-height: 1.14;
  text-transform: none;
  text-wrap: balance;
}

.guide-page h1 {
  max-width: 20ch;
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  font-weight: 800;
}

.guide-page h2 {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
}

.guide-page h3 {
  font-size: 1.2rem;
}

.guide-masthead {
  padding-block: clamp(2.25rem, 6vw, 5rem) clamp(1.8rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}

.guide-masthead .kicker {
  margin: 0 0 .8rem;
  color: var(--warm-accent);
}

.guide-masthead .guide-lead {
  max-width: 68ch;
  margin: 1rem 0 0;
  color: #d1cdd6;
  font-size: clamp(1rem, 1.65vw, 1.17rem);
  line-height: 1.65;
}

.guide-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: 1.1rem;
  color: #bdb8c6;
  font-size: .875rem;
}

.guide-page :where(.guide-crumbs,.guide-toc,.guide-prose,.guide-next) a {
  color: #a9d1ff;
  text-decoration: underline;
  text-decoration-color: #5e7d9e;
  text-underline-offset: .2em;
}

.guide-page :where(.guide-crumbs,.guide-toc,.guide-prose,.guide-next) a:hover {
  color: #d7e9ff;
  text-decoration-color: currentColor;
}

.guide-reader {
  display: grid;
  grid-template-columns: minmax(12rem, .31fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: start;
  padding-block: 2rem clamp(2.5rem, 6vw, 5rem);
}

.guide-toc {
  position: sticky;
  top: 1rem;
  padding: 1rem;
  border: 1px solid #35333e;
  border-radius: 12px;
  background: #17171d;
}

.guide-toc strong {
  display: block;
  margin-bottom: .55rem;
  font-size: .875rem;
}

.guide-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-toc li + li {
  border-top: 1px solid #35333e;
}

.guide-toc li a {
  display: block;
  padding-block: .6rem;
  font-size: .875rem;
  line-height: 1.4;
}

.guide-prose {
  min-width: 0;
  max-width: 76ch;
  color: #d1cdd6;
  font-size: clamp(1rem, 1.5vw, 1.0625rem);
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.guide-prose > section {
  scroll-margin-top: 1.25rem;
}

.guide-prose > section + section {
  margin-top: 1.75rem;
  padding-top: 1.55rem;
  border-top: 1px solid var(--line);
}

.guide-prose h2 {
  margin: 0 0 .65rem;
}

.guide-prose p {
  margin: .75rem 0;
}

.guide-prose :is(ol,ul) {
  margin: .75rem 0;
  padding-left: 1.35rem;
}

.guide-prose li + li {
  margin-top: .55rem;
}

.guide-table-wrap {
  overflow-x: auto;
  margin-block: 1rem;
  border: 1px solid #35333e;
  border-radius: 12px;
  background: #17171d;
}

.guide-table-wrap:focus-visible {
  outline-offset: 2px;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: .9375rem;
  line-height: 1.5;
}

.guide-table caption {
  text-align: left;
  font-weight: 700;
  color: var(--text);
}

.guide-table :is(caption,th,td) {
  padding: .75rem;
  vertical-align: top;
}

.guide-table thead {
  color: var(--text);
  background: #25232d;
}

.guide-table tbody tr + tr {
  border-top: 1px solid #35333e;
}

.guide-cell-label { display: none; }

.guide-table tbody th {
  min-width: 6.5rem;
}

.guide-faq-list details {
  border-bottom: 1px solid #35333e;
}

.guide-faq-list summary {
  min-height: 44px;
  padding: .65rem .15rem;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.guide-faq-list summary::marker {
  color: var(--cool-accent);
}

.guide-faq-list details p {
  margin: 0;
  padding: 0 0 .85rem 1.15rem;
}

.guide-next {
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid #35333e;
  border-radius: 12px;
  background: #17171d;
}

.guide-next h3 {
  margin-top: .9rem;
}

.guide-next ul {
  list-style: none;
  margin-bottom: 0;
  padding-left: 0;
}

.guide-next a {
  display: inline-block;
  padding-block: .15rem;
}

.guide-topic-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.2rem;
}

.guide-topic-links a {
  padding: .55rem .75rem;
  border: 1px solid #484450;
  border-radius: 6px;
  color: #d9d5df;
  font-size: .875rem;
}

.guide-topic-links a:hover {
  border-color: var(--cool-accent);
  color: var(--cool-accent);
}

.guides-shelf {
  display: grid;
  grid-template-columns: minmax(11rem, .34fr) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3rem);
  padding-block: clamp(1.5rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 1rem;
}

.guides-shelf:last-child {
  margin-bottom: 2.25rem;
  border-bottom: 0;
}

.guides-shelf > header p {
  margin: .6rem 0 0;
  color: #c9c4ce;
  line-height: 1.55;
}

.guides-shelf__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  min-width: 0;
}

.guide-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 9.5rem;
  gap: .65rem;
  padding: clamp(.9rem, 2vw, 1.25rem);
  border: 1px solid #35333e;
  border-radius: 12px;
  background: #17171d;
}

.guide-card:hover {
  border-color: var(--cool-accent);
  background: #21212a;
}

.guide-card p {
  margin: 0;
  color: #ccc8d2;
  font-size: .9375rem;
  line-height: 1.5;
}

.guide-card span {
  margin-top: auto;
  color: #a9d1ff;
  font-size: .875rem;
  font-weight: 700;
}

@media (max-width: 760px) {
  .guide-reader,
  .guides-shelf {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-toc {
    position: static;
  }
}

@media (max-width: 540px) {
  .guides-shelf__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-card {
    min-height: 0;
  }

  .guide-table,
  .guide-table caption,
  .guide-table tbody,
  .guide-table tbody tr,
  .guide-table tbody th,
  .guide-table td {
    display: block;
  }

  .guide-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .guide-table tbody tr {
    padding: .8rem .75rem;
    border-top: 1px solid #35333e;
  }

  .guide-table tbody :is(th,td) {
    min-width: 0;
    padding: 0;
  }

  .guide-table td {
    margin-top: .55rem;
  }

  .guide-table td .guide-cell-label {
    display: block;
    margin-bottom: .12rem;
    color: var(--text);
    font-size: .8rem;
    font-weight: 700;
  }
}
