/* Shared editorial layout for the product detail pages. */
.skip-link {
  position: fixed;
  top: 12px;
  left: 20px;
  z-index: 100;
  transform: translateY(-160%);
  padding: 12px 18px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
}

.skip-link:focus { transform: translateY(0); }
.topic-page main { scroll-margin-top: 100px; }
.main-nav a[aria-current="page"] { color: #fff; background: var(--surface-strong); }

.topic-link {
  display: inline-block;
  margin-top: 16px;
  color: #8dc9ff;
  font-weight: 650;
  line-height: 1.6;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.topic-link:hover { color: #fff; }
.topic-page a:focus-visible,
.topic-link:focus-visible,
.topic-faq summary:focus-visible {
  outline: 2px solid var(--blue-hover);
  outline-offset: 5px;
}

.topic-hero {
  padding: 28px var(--page-gutter) 64px;
  background: linear-gradient(115deg, var(--soft), var(--soft-end));
  border-bottom: 1px solid var(--line);
}

.breadcrumbs { margin-bottom: 48px; color: var(--muted); font-size: 0.875rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px 12px; padding: 0; margin: 0; list-style: none; }
.breadcrumbs li + li::before { content: "/"; margin-right: 12px; color: var(--blue-hover); }
.breadcrumbs a { text-decoration: underline; text-underline-offset: 3px; }
.topic-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; gap: var(--layout-gap); }
.topic-hero h1 { font-size: clamp(2.1rem, 3.8vw, 3.7rem); line-height: 1.14; letter-spacing: -0.035em; overflow-wrap: anywhere; hyphens: auto; }
.topic-lead { margin: 24px 0; max-width: 62ch; color: var(--muted); font-size: 1.125rem; line-height: 1.75; }
.topic-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.topic-actions .button { white-space: normal; text-align: center; padding-block: 12px; }
.topic-figure { margin: 0; min-width: 0; }
.topic-figure img { display: block; width: 100%; height: auto; border-radius: 8px; }
.topic-figure figcaption { color: var(--muted); font-size: 0.875rem; line-height: 1.6; margin-top: 18px; }
.topic-figure-phone .iphone-device { isolation: isolate; width: min(100%, 236px); margin-inline: auto; }
.topic-figure-phone .iphone-screen img { width: 100%; border-radius: 0; }
.topic-figure-phone figcaption { text-align: center; }

.topic-section { padding-block: var(--section-space); }
.topic-section + .topic-section { border-top: 1px solid var(--line); }
.topic-section h2 { max-width: 26ch; margin: 0 0 24px; font-size: var(--section-title-size); line-height: 1.2; }
.topic-section h3 { margin: 0 0 12px; font-size: 1.25rem; line-height: 1.4; }
.topic-section p,
.topic-section li { color: var(--muted); font-size: var(--body-size); line-height: 1.8; }
.topic-section p { max-width: 72ch; }
.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 40px; }
.topic-grid article { padding-top: 24px; border-top: 2px solid var(--blue); }
.topic-grid article p { margin-bottom: 0; }
.topic-example { background: var(--soft); }
.topic-example-layout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--layout-gap); }
.topic-steps { margin: 0; padding-left: 24px; }
.topic-steps li { padding-left: 12px; margin-bottom: 24px; }
.topic-steps li::marker { color: var(--blue-hover); font-weight: 700; }
.topic-steps strong { display: block; color: var(--ink); margin-bottom: 4px; }
.topic-faq { max-width: 880px; }
.topic-faq details { border-bottom: 1px solid var(--line); padding-block: 22px; }
.topic-faq summary { cursor: pointer; color: var(--ink); font-weight: 650; font-size: 1.125rem; line-height: 1.6; }
.topic-faq summary::marker { color: var(--blue-hover); }
.topic-faq details p { margin-bottom: 0; }
.topic-related { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.topic-cta { margin-top: 48px; padding: clamp(24px, 4vw, 48px); border: 1px solid var(--line); background: var(--surface); }
.topic-cta h2 { max-width: none; }

/* Match the light sections on the homepage. */
.topic-section-light {
  --ink: #0b1c33;
  --muted: #4a5b70;
  --blue: var(--blue-dark);
  --blue-hover: var(--blue-dark);
  --line: rgba(3, 15, 39, 0.16);
  color-scheme: light;
  color: var(--ink);
  background: #ffffff;
}

.topic-section-light h2,
.topic-section-light h3 {
  color: var(--ink);
}

.topic-section-light .eyebrow {
  color: var(--blue);
}

@media (max-width: 1100px) and (min-width: 981px) {
  .topic-page .site-header { gap: 14px; }
  .topic-page .main-nav a { padding-inline: 9px; }
}

@media (max-width: 900px) {
  .topic-hero-grid,
  .topic-example-layout { grid-template-columns: minmax(0, 1fr); }
  .topic-figure { max-width: 660px; width: 100%; margin-inline: auto; }
  .topic-grid { grid-template-columns: 1fr; gap: 24px; }
  .breadcrumbs { margin-bottom: 32px; }
}

@media (max-width: 680px) {
  .topic-hero { padding-bottom: 40px; }
  .topic-lead { font-size: 1rem; }
  .topic-hero h1 { font-size: clamp(1.875rem, 8vw, 2.75rem); }
  .topic-actions { display: grid; grid-template-columns: 1fr; }
}
