/* Long-form text: articles, legal pages, the About page and FAQ answers. */

.prose {
  max-width: var(--column);
  color: var(--text);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  overflow-wrap: break-word;
}

.prose > * + *,
.prose li > * + * {
  margin-top: 1.25em;
}

.prose li > :is(ul, ol) {
  margin-top: 0.5em;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  color: var(--light);
  line-height: 1.2;
}

.prose h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
}

.prose h2 {
  margin-top: 2.2em;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.prose h3 {
  margin-top: 1.8em;
  font-size: 1.4rem;
}

.prose h4 {
  margin-top: 1.6em;
  font-size: 1.15rem;
}

.prose h2 + *,
.prose h3 + *,
.prose h4 + * {
  margin-top: 0.6em;
}

/* Small notes some posts and answers write as h6. */
.prose h6 {
  margin: 0.4em 0 0;
  color: var(--gray);
  font-size: var(--text-small);
  font-weight: 400;
  line-height: 1.6;
}

.prose p {
  color: inherit;
}

.prose strong,
.prose b {
  color: var(--contrast);
  font-weight: 700;
}

.prose a {
  color: var(--aqua);
  text-decoration: underline;
  text-decoration-color: rgba(63, 208, 200, 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--ease);
}

.prose a:hover {
  text-decoration-color: currentColor;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li + li {
  margin-top: 0.5em;
}

.prose li::marker {
  color: var(--disabled);
}

.prose blockquote {
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--brand);
  color: var(--contrast);
  font-style: italic;
}

.prose hr {
  height: 1px;
  margin: 2.5em 0;
  border: 0;
  background: var(--glass-border);
}

.prose code {
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.07);
  color: var(--light);
  font: 0.88em/1.4 var(--font-mono);
}

.prose pre {
  padding: 20px;
  overflow-x: auto;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: #0d1017;
}

.prose pre code {
  padding: 0;
  background: none;
}

.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: var(--text-small);
}

.prose th,
.prose td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--glass-border);
  text-align: left;
}

.prose th {
  color: var(--light);
}

.prose img {
  display: block;
  max-width: 100%;
  margin-block: 1.5em;
  height: auto;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}

.prose mark {
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(254, 45, 118, 0.2);
  color: var(--light);
}

.prose .button-primary,
.prose .button-ghost {
  text-decoration: none;
}

.prose .button-primary {
  color: #fff;
}

.prose .button-ghost {
  height: auto;
  min-height: 48px;
  padding: 12px 24px;
  color: var(--contrast);
  line-height: 1.35;
  text-align: center;
  white-space: normal;
}

/* Images that open larger in the lightbox (assets/js/components/lightbox.js). */
[data-lightbox] img {
  cursor: zoom-in;
}

.lightbox {
  width: min(1200px, 94vw);
  max-width: none;
  max-height: 92vh;
  padding: 0;
  border: 0;
  background: none;
}

.lightbox::backdrop {
  background: rgba(4, 5, 8, 0.85);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.lightbox img {
  display: block;
  width: 100%;
  max-height: 92vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--light);
  font-size: 22px;
}

/* A list of labelled facts, as on the About page. */
.prose .facts {
  display: grid;
  grid-template-columns: minmax(140px, 0.4fr) 1fr;
  border-top: 1px solid var(--glass-border);
}

.prose .facts dt,
.prose .facts dd {
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--glass-border);
}

.prose .facts dt {
  padding-right: 20px;
  color: var(--light);
  font-weight: 700;
}

/* Legal pages carry their own heading inside the text. */
.legal {
  max-width: var(--column-wide);
  padding-top: 64px;
  padding-bottom: var(--section-space);
}

.legal .prose {
  max-width: none;
  margin-top: 40px;
}

.legal .prose h1 {
  margin-bottom: 0.4em;
}

/* Numbered steps in a post, marked with pink counters (a post opts in with `articleClass: prose-steps`). */
.prose-steps ol {
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.prose-steps ol > li {
  position: relative;
  padding-left: 3.5rem;
  counter-increment: step;
}

.prose-steps ol > li + li {
  margin-top: 2em;
}

.prose-steps ol > li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font: 800 1.1rem/1 var(--font-display);
}

@media (max-width: 560px) {
  .prose h1 {
    font-size: 1.5rem;
  }

  .prose h2 {
    font-size: 1.1875rem;
  }

  .prose h3 {
    font-size: 1.0625rem;
  }

  /* On a phone the number sits above its step, so the step's text and screenshots keep the full width. */
  .prose-steps ol > li {
    padding-left: 0;
  }

  .prose-steps ol > li::before {
    position: static;
    margin-bottom: 0.75rem;
  }

  .prose .facts {
    grid-template-columns: 1fr;
  }

  .prose .facts dt {
    padding-bottom: 0;
    border-bottom: 0;
  }
}
