body:has(.page) {
  margin: 0;
  background: #ffffff;
}

/*
 * Approved editorial reading style. This file is also copied to the CMS as
 * /media-assets/learning.css, so page chrome is scoped under .page and only the
 * body components below are shared with the Astro templates' own .rx tokens.
 */
.page {
  --ink: #0f1e4b;
  --soft: rgba(15, 30, 75, 0.64);
  --line: rgba(15, 30, 75, 0.12);
  --amber: #b07300;
  --accent: #0f1e4b;
  --neutral: #f5f6f9;
  --rule: rgba(15, 30, 75, 0.12);
  min-height: 100vh;
  background: #ffffff;
  color: var(--ink);
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 2;
  letter-spacing: 0.03em;
  overflow-wrap: anywhere;
}

.page a {
  color: inherit;
  text-decoration: none;
}
.page a:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
  border-radius: 2px;
}

.siteHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100% - 80px, 1120px);
  min-height: 76px;
  margin: 0 auto;
}

.page .wordmarkLink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  flex-shrink: 0;
}
.page .wordmark {
  display: block;
  width: auto;
  height: 26px;
}
.siteNav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-right: -12px;
}
.page .siteNav a,
.page .footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.04em;
}
.page .siteNav a:hover,
.page .siteNav a[aria-current="page"],
.page .footer a:hover,
.page .breadcrumbs a:hover,
.page .related a:hover {
  text-decoration: underline;
  text-decoration-color: var(--amber);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

.column {
  width: min(100% - 80px, 680px);
  margin: 0 auto;
  padding: 56px 0 0;
}

.page .breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}
.page .breadcrumbs li {
  display: flex;
  align-items: center;
  min-width: 0;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0.06em;
}
.page .breadcrumbs li + li::before {
  content: "/";
  margin: 0 10px;
}
.page .breadcrumbs a,
.page .breadcrumbs span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.page .header {
  margin: 32px 0 0;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.page .byline {
  margin: 0 0 16px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0.08em;
}
.page .byline time {
  font-variant-numeric: tabular-nums;
}
.page .lead {
  margin: 24px 0 0;
  color: rgba(15, 30, 75, 0.8);
  font-size: 16px;
  line-height: 2;
  letter-spacing: 0.03em;
}
.headingPart {
  display: inline-block;
  max-width: 100%;
}
.articleBody {
  margin-top: 48px;
}

/* Reading body. Low specificity so guide-content components can refine it. */
.article h1 {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 32px);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.02em;
  text-wrap: balance;
  line-break: strict;
}
.article h2 {
  margin: 64px 0 20px;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.02em;
  text-wrap: pretty;
}
.article h3 {
  margin: 40px 0 12px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.7;
}
.article p {
  margin: 0 0 24px;
}
.article :where(ol, ul) {
  margin: 0 0 24px;
  padding-left: 1.5em;
}
.article :where(li) {
  margin: 0 0 12px;
}
.article dl {
  margin: 24px 0;
}
.article dt,
.article strong {
  font-weight: 500;
}
.article dd {
  margin: 4px 0 24px;
}
.articleBody > h2:first-child,
.articleBody > section:first-child > h2:first-child {
  margin-top: 0;
}
.page .articleBody a {
  text-decoration: underline;
  text-decoration-color: var(--amber);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}
.page .articleBody a:hover {
  text-decoration-thickness: 2px;
}

/* Informative app screenshots stay in the reading column, after the explanation. */
.screenFigure {
  width: min(100%, 320px);
  margin: 48px auto 0;
}
.screenTrigger {
  display: block;
  width: min(100%, 160px);
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: zoom-in;
}
.screenImage {
  display: block;
  width: 100%;
  height: auto;
}
.screenHint {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.8;
  text-decoration: underline;
  text-decoration-color: var(--amber);
  text-underline-offset: 0.3em;
}
.screenTrigger:focus-visible,
.screenClose:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
}
.screenFigure figcaption {
  margin-top: 14px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.8;
  letter-spacing: 0.04em;
}
.screenDialog {
  box-sizing: border-box;
  width: min(calc(100vw - 32px), 480px);
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 16px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.screenDialog::backdrop {
  background: rgba(15, 30, 75, 0.72);
}
.screenClose {
  display: block;
  min-height: 44px;
  margin: 0 0 12px auto;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.screenDialogImage {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100dvh - 190px);
  margin: 0 auto;
}
.screenDialog .screenDialogCaption {
  max-width: 320px;
  margin: 12px auto 0;
  font-size: 13px;
  line-height: 1.8;
  letter-spacing: 0.04em;
}

.sourceLink {
  display: inline-block;
  max-width: 100%;
  font-size: 13px;
}
.timecode {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.article .takeaway,
.article blockquote {
  margin: 8px 0 40px;
  padding: 22px 24px;
  border-left: 2px solid var(--accent);
  background: var(--neutral);
  font-weight: 500;
}
.article blockquote p:last-child {
  margin-bottom: 0;
}

/* Steps: a quiet numeral column and hairline rules, no filled counters. */
.article .walkthrough {
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}
.article .walkthrough > li {
  margin: 0;
  padding: 0;
}
.article .walkthrough > section,
.article .walkthrough > li > section {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  margin: 0;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.article .walkthrough h2 {
  margin: 0 0 12px;
}
.article .walkthrough p:last-child {
  margin-bottom: 0;
}
.stepNumber {
  display: block;
  padding-top: 5px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}
.article .example {
  margin: 24px 0 0;
  padding: 20px 24px;
  background: var(--neutral);
  border-radius: 4px;
}
.article .exampleLabel {
  margin: 0 0 8px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0.06em;
}
.article .exampleTimes {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
.exampleTimes del {
  color: var(--soft);
  font-weight: 400;
  text-decoration-thickness: 1px;
}
.exampleTimes ins {
  text-decoration: underline;
  text-decoration-color: var(--amber);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}
.article .exampleNote {
  margin: 0;
  font-size: 14px;
  line-height: 1.9;
}

/* App Store CTA: an explicit left-aligned stack, never a wrapping flex row. */
.page .cta {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0;
  margin: 56px 0;
  padding: 32px;
  background: var(--neutral);
  border-radius: 8px;
}
.page .readingFooter .cta {
  margin: 72px 0 0;
}
.page .ctaBrand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
}
.page .ctaIcon {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.page .ctaWordmark {
  display: block;
  width: 84px;
  height: auto;
}
.page .cta .ctaHeadline {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.02em;
  word-break: auto-phrase;
  text-wrap: balance;
}
.page .cta .ctaDescription {
  margin: 8px 0 0;
  color: rgba(15, 30, 75, 0.8);
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: 0.03em;
}
.page .cta .badgeLink {
  display: inline-block;
  margin: 12px 0 0 -12px;
  padding: 12px;
  text-decoration: none;
}
.page .badge {
  display: block;
  width: auto;
  height: 48px;
}

.page .related h2 {
  margin: 56px 0 0;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.08em;
}
.page .related ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.page .related li {
  margin: 0;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.page .related a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
}
.page .related p {
  margin: 4px 0 0;
  color: rgba(15, 30, 75, 0.8);
  font-size: 15px;
  line-height: 1.9;
}

.page .footer {
  margin-top: 120px;
  padding: 24px 0 56px;
  border-top: 1px solid var(--line);
}
.page .footer nav {
  display: flex;
  flex-wrap: wrap;
  margin-left: -12px;
}

@media (max-width: 860px) {
  .siteHeader,
  .column {
    width: calc(100% - 40px);
  }
  .siteHeader {
    min-height: 64px;
  }
  .page .wordmark {
    height: 22px;
  }
  .siteNav {
    margin-right: -8px;
  }
  .page .siteNav a {
    padding: 0 8px;
    font-size: 13px;
  }
  .column {
    padding-top: 32px;
  }
  .page .header {
    margin-top: 24px;
    padding-bottom: 32px;
  }
  .articleBody {
    margin-top: 40px;
  }
  .article h2 {
    margin-top: 48px;
    font-size: 20px;
  }
  .page .cta {
    padding: 28px 24px;
  }
}

@media (max-width: 640px) {
  .article .walkthrough > section,
  .article .walkthrough > li > section {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 12px;
    padding: 28px 0;
  }
  .stepNumber {
    padding-top: 3px;
    font-size: 14px;
    letter-spacing: 0.04em;
  }
  .article .example {
    padding: 16px;
  }
  .article .exampleTimes {
    gap: 4px 10px;
    font-size: 17px;
  }
  .article .takeaway,
  .article blockquote {
    padding: 18px 20px;
  }
  .page .cta {
    padding: 24px 20px;
  }
}

/* The three header links cannot share a row with the wordmark below ~420px. */
@media (max-width: 420px) {
  .siteHeader {
    flex-wrap: wrap;
    gap: 0 12px;
    padding: 10px 0;
  }
  .siteNav {
    justify-content: flex-start;
    margin: 0 0 0 -8px;
  }
}
