body {
  padding: 0 28px;
}

main,
.site-header {
  margin: 0 auto;
  max-width: 720px;
}

main {
  overflow-wrap: anywhere;
  padding-bottom: var(--site-space-section);
}

.step {
  scroll-margin-top: calc(var(--header-height, 4.5625rem) + var(--site-space-meta));
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

@media (any-hover: hover) and (any-pointer: fine) {
  html:not([data-pointer-type="touch"]):not([data-pointer-type="pen"]) a:hover {
    text-decoration-thickness: 2px;
  }
}

a:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 6px;
}

.site-header {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  padding: 24px 0 0;
}

.brand-mark {
  height: auto;
  width: 22px;
}

.brand-word {
  height: auto;
  width: 175px;
}

.article-header {
  padding: 32px 0;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

h1 {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  max-width: 640px;
  text-wrap: balance;
}

.reviewed {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-top: var(--site-space-meta);
}

.guide-prerequisite {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-top: var(--site-space-content);
  max-width: 650px;
}

.guide-index-list {
  display: grid;
  gap: var(--site-space-content);
  list-style: none;
  margin: 0;
  max-width: 650px;
  padding: 0;
}

.guide-index-list h2 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
  text-wrap: wrap;
}

.guide-index-link {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  min-height: 44px;
  text-decoration: none;
}

@media (any-hover: hover) and (any-pointer: fine) {
  html:not([data-pointer-type="touch"]):not([data-pointer-type="pen"]) .guide-index-link:hover > span:first-child {
    text-decoration: underline;
  }
}

main > .guide-index-list .guide-index-link {
  padding: 12px 14px;
  border-radius: 6px;
}

@media (any-hover: hover) and (any-pointer: fine) {
  html:not([data-pointer-type="touch"]):not([data-pointer-type="pen"]) main > .guide-index-list .guide-index-link:hover {
    background: var(--nav-surface);
  }
}

@media (any-hover: hover) and (any-pointer: fine) {
  html:not([data-pointer-type="touch"]):not([data-pointer-type="pen"]) main > .guide-index-list .guide-index-link:hover > span:first-child {
    text-decoration: none;
  }
}

.related-articles {
  margin-top: var(--site-space-section);
}

.related-articles .guide-index-list {
  margin-top: var(--site-space-meta);
}

.related-articles .guide-index-link {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.steps {
  display: grid;
  gap: var(--site-space-section);
  list-style: none;
  margin: 0;
  padding: 0;
}

.step-copy {
  max-width: 650px;
}

h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  text-wrap: balance;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.35;
  margin-top: var(--site-space-label);
  text-wrap: balance;
}

.step-copy > p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-top: var(--site-space-text);
}

strong {
  color: var(--foreground);
  font-weight: 600;
}

figure {
  margin: var(--site-space-content) auto 0;
  max-width: 320px;
  width: 100%;
}

.screenshot-link {
  border: 1px solid var(--line);
  border-radius: 20px;
  cursor: zoom-in;
  display: block;
  overflow: hidden;
}

.screenshot {
  height: auto;
  width: 100%;
}

@media (max-width: 680px) {
  body {
    padding: 0 20px;
  }

  .site-header {
    gap: 12px;
    padding: 16px 0 0;
  }

  .brand-mark {
    width: 19px;
  }

  .brand-word {
    width: 145px;
  }

  .article-header {
    padding: 24px 0 32px;
  }

  .step-copy {
    max-width: none;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.125rem;
  }
}

@media print {
  :root {
    color-scheme: light;
    --background: #ffffff;
    --foreground: #050707;
    --muted: #454747;
    --line: #d6d6d6;
  }

  .site-header {
    display: none;
  }

  .article-header {
    padding-top: 0;
  }

  .step {
    break-inside: avoid;
  }

  figure {
    max-width: 180px;
  }
}

/* Public articles align with the shared site container. */
body.public-guide { padding: 0; }
.public-guide main {
  width: var(--site-content-width);
  max-width: none;
  padding-inline: 0;
}
.public-guide article { max-width: none; }
.public-guide h1 { max-width: none; }

/* Public guides share the simple full-container, single-column layout. */
.public-guide .step { display: block; }
.public-guide .step-copy,
.public-guide .guide-prerequisite { max-width: var(--site-prose-measure); }
.public-guide .guide-index-list { max-width: none; }
.public-guide .article-header { padding: var(--site-space-section) 0 var(--site-space-content); }

.public-guide figure { margin: var(--site-space-content) auto 0; }
@media print { .public-guide .article-header { padding-top: 0; } }
