.guide-hero {
  display: grid;
  min-height: var(--hero-min-height);
  align-items: end;
  padding: var(--hero-padding-top) var(--hero-padding-inline) var(--hero-padding-bottom);
  background: var(--ink);
  color: var(--paper);
}

.guide-article,
.guide-related {
  width: min(860px, 100%);
  margin: 0 auto;
}

.guide-hero-inner {
  width: min(var(--hero-copy-max), 100%);
  margin: 0;
}

.guide-hero h1 {
  margin-top: 0;
  color: var(--paper);
  font-size: var(--hero-title-size);
  letter-spacing: var(--hero-title-tracking);
  font-weight: 600;
  line-height: 1.08;
  text-wrap: balance;
}

.guide-standfirst {
  max-width: 660px;
  margin-top: 24px;
  color: var(--bone);
  font-size: var(--hero-lede-size);
  font-weight: 400;
  line-height: 1.55;
}

.guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 24px;
  color: var(--ash-inverse);
  font-family: var(--f-mono);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.guide-article {
  padding: var(--section-base) var(--gutter);
}

.guide-article h2 {
  margin-top: 56px;
  font-size: var(--text-h2);
  line-height: 1.15;
}

.guide-article h3 {
  margin-top: 28px;
  font-size: var(--text-h3);
  line-height: 1.25;
}

.guide-article p,
.guide-article li {
  color: var(--slate);
  font-size: var(--text-body-lg);
  line-height: 1.7;
}

.guide-article a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.guide-summary,
.guide-callout {
  margin: 0 0 36px;
  padding: 28px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--bone);
}

.guide-summary strong,
.guide-callout strong {
  color: var(--ink);
}

.guide-list {
  padding-left: 20px;
}

.guide-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.guide-metric {
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}

.guide-metric strong,
.guide-metric span {
  display: block;
}

.guide-metric strong {
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  line-height: 1;
}

.guide-metric span {
  margin-top: 10px;
  color: var(--slate);
  font-size: var(--text-body);
  line-height: 1.45;
}

.guide-steps,
.guide-script {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.guide-step,
.guide-script div {
  padding: 20px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.guide-step strong,
.guide-script strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}

.guide-step strong {
  font-size: var(--text-h3);
}

.guide-script strong {
  font-size: var(--text-body-lg);
}

.guide-table-wrap {
  overflow-x: auto;
  margin-top: 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
  background: var(--paper);
}

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

.guide-table th {
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: var(--text-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.guide-table tr:last-child th,
.guide-table tr:last-child td {
  border-bottom: 0;
}

.guide-source-note {
  margin-top: 14px;
  color: var(--slate);
  font-size: var(--text-body) !important;
  line-height: 1.55 !important;
}

.guide-faq {
  margin-top: 24px;
}

.guide-faq details {
  border-top: 1px solid var(--hairline);
  padding: 20px 0;
}

.guide-faq details:last-child {
  border-bottom: 1px solid var(--hairline);
}

.guide-faq summary {
  cursor: pointer;
  color: var(--ink);
  font-size: var(--text-body-lg);
  font-weight: 700;
}

.guide-related-section {
  background: var(--bone);
  padding: var(--section-tight) var(--gutter);
}

.guide-related {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.guide-related h2 {
  max-width: 24ch;
  font-size: var(--text-h3);
}

.guide-related-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 760px) {
  .guide-hero {
    padding: var(--hero-padding-top) var(--hero-padding-inline) var(--hero-padding-bottom);
  }

  .guide-summary,
  .guide-callout,
  .guide-step,
  .guide-script div {
    padding: 20px;
  }

  .guide-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 18px;
  }
}

@media (max-width: 420px) {
  .guide-metrics {
    grid-template-columns: 1fr;
  }
}

/* Author box at the end of each guide. */
.guide-author {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 56px;
  padding: 28px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.guide-author-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
}

.guide-article .guide-author .guide-author-copy p {
  margin: 0;
  color: var(--slate);
  font-size: var(--text-body);
  line-height: 1.6;
}

.guide-article .guide-author .guide-author-copy p + p {
  margin-top: 8px;
}

.guide-article .guide-author .guide-author-copy .guide-author-name {
  color: var(--ink);
  font-weight: 700;
}

.guide-author-copy a {
  color: var(--ink);
  text-underline-offset: 4px;
}

.guide-author-links a {
  font-weight: 600;
}

.guide-related-reading {
  margin-top: 56px;
  padding: 28px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--bone);
}

.guide-article .guide-related-reading h2 {
  margin-top: 0;
  font-size: var(--text-h3);
}

.guide-related-reading .guide-list {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .guide-author {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 16px;
    padding: 20px;
  }

  .guide-author-photo {
    width: 56px;
    height: 56px;
  }

  .guide-related-reading {
    padding: 20px;
  }
}
