:root {
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --card: #f5f5f7;
  --dot-idle: rgba(29, 29, 31, 0.28);
  --column: 65rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

html,
body {
  background: #ffffff;
  color: var(--ink);
  overflow-x: clip;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.125rem;
  line-height: 1.45;
}

h1,
h2,
h3 {
  font-family: 'Iowan Old Style', Palatino, 'Palatino Linotype', serif;
  font-weight: 600;
  line-height: 1.05;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.75rem, 7vw, 5rem);
}

h2 {
  font-size: clamp(2.5rem, 5.5vw, 5rem);
}

h3 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

.column {
  max-width: var(--column);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.75rem);
  text-align: center;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1rem, 3vw, 1.75rem);
  padding-block: clamp(1.5rem, 4vw, 2.5rem) clamp(2.5rem, 6vw, 4rem);
}

.hero-kicker {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.lede {
  max-width: 36rem;
  color: var(--muted);
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
}

.image-gap {
  display: block;
  width: min(36rem, 100%);
  min-height: clamp(10rem, 28vw, 16rem);
  margin: 0 auto;
  border-radius: 1rem;
  background: var(--card);
  border: 1px dashed rgba(29, 29, 31, 0.12);
}

.site-bar:not([hidden]) {
  position: fixed;
  top: max(0.65rem, env(safe-area-inset-top));
  left: 0;
  right: 0;
  width: min(800px, calc(100% - 1.3rem));
  max-width: 800px;
  margin-inline: auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  padding: 0.35rem 0.4rem 0.35rem 1.15rem;
  backdrop-filter: saturate(180%) blur(20px);
}

.site-bar-name {
  margin: 0;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
}

.site-bar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.text-link {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
}

.text-link:hover,
.text-link:focus-visible {
  background: rgba(0, 0, 0, 0.05);
  outline: none;
}

.highlights {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

#overview-heading {
  scroll-margin-top: 4.5rem;
}

.highlights-head h2 {
  text-align: center;
  margin-bottom: 1.25rem;
}

.rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}

.card {
  width: min(var(--column), 100%);
  background: var(--card);
  border-radius: 1.25rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  text-align: center;
}

.card h3 {
  margin-bottom: 0.75rem;
}

.card-media {
  margin: 0 0 1rem;
}

.card .image-gap {
  width: 100%;
  min-height: 10rem;
}

.card-caption {
  color: var(--ink);
  max-width: 36rem;
  margin-inline: auto;
  margin-bottom: 1rem;
}

.rail-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.dot {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--dot-idle);
  cursor: pointer;
  transition: width 0.25s ease, background-color 0.25s ease;
}

.dot--active {
  width: 2rem;
  background: var(--ink);
}

.dot:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.pause-btn {
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(29, 29, 31, 0.2);
  border-radius: 999px;
  padding: 0.5rem 1.25rem;
  cursor: pointer;
}

.pause-btn:hover,
.pause-btn:focus-visible {
  border-color: var(--ink);
}

.pose {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.pose p {
  max-width: 36rem;
  margin-inline: auto;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
  color: var(--muted);
}

.pose-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

.more-btn,
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  margin: 0;
  padding: 0.55rem 1.15rem;
  border: 0;
  border-radius: 999px;
  background: #0071e3;
  color: #ffffff;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

.more-btn--ghost {
  background: var(--card);
  color: var(--ink);
  border: 1px solid rgba(29, 29, 31, 0.15);
}

.more-btn:hover,
.more-btn:focus-visible,
.page-link:hover,
.page-link:focus-visible {
  background: #0077ed;
}

.more-btn--ghost:hover,
.more-btn--ghost:focus-visible {
  background: #e8e8ed;
}

.site-footer {
  margin-top: clamp(1.25rem, 3vw, 2rem);
  padding: 1.15rem clamp(1.25rem, 5vw, 3rem) 3rem;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  background: #ffffff;
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

.hero-anchor {
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

html.slider-on .rail {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  gap: 1.25rem;
  scroll-padding-inline: max(1.25rem, calc((100% - min(65rem, calc(100vw - 5.5rem))) / 2));
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

html.slider-on .rail.is-dragging {
  scroll-snap-type: none;
  cursor: grabbing;
}

html.slider-on .rail::-webkit-scrollbar {
  display: none;
}

html.slider-on .card {
  flex: 0 0 min(65rem, calc(100vw - 5.5rem));
  width: min(65rem, calc(100vw - 5.5rem));
  scroll-snap-align: center;
}

html:not(.slider-on) .rail-controls {
  display: none;
}

.detail-dialog {
  width: min(32rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  margin: auto;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 1.75rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(28px) saturate(180%);
}

.detail-dialog::backdrop {
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(22px) saturate(160%);
}

.detail-dialog-inner {
  position: relative;
  padding: 2.75rem 1.5rem 1.5rem;
  text-align: left;
}

.detail-dialog h2 {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.65rem;
  font-weight: 650;
  letter-spacing: -0.022em;
  line-height: 1.15;
  text-align: center;
  margin-bottom: 1rem;
}

.detail-dialog ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.detail-dialog li {
  margin-bottom: 0.45rem;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.4;
}

.detail-dialog p {
  font-size: 1rem;
  line-height: 1.45;
  color: var(--muted);
}

.detail-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #e8e8ed;
  color: var(--ink);
  cursor: pointer;
}

.detail-close svg {
  width: 0.7rem;
  height: 0.7rem;
}

.detail-dialog .dialog-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: #0071e3;
  font-weight: 500;
  text-decoration: none;
}

.detail-dialog .dialog-link:hover,
.detail-dialog .dialog-link:focus-visible {
  text-decoration: underline;
}

.subpage {
  padding-block: clamp(2rem, 5vw, 3rem) 4rem;
  text-align: left;
}

.subpage .column {
  text-align: left;
}

.subpage-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.subpage-header h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin: 0;
}

.subpage-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.subpage h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  margin-top: 2.5rem;
}

.subpage h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
}

.subpage p,
.subpage li {
  color: var(--muted);
  max-width: 48rem;
}

.subpage table {
  width: 100%;
  max-width: 48rem;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.98rem;
}

.subpage th,
.subpage td {
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

.subpage th {
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
}

.subpage code {
  font-size: 0.92em;
  background: var(--card);
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
}

.subpage .note {
  padding: 1rem 1.15rem;
  border-radius: 0.75rem;
  background: var(--card);
  margin: 1rem 0;
}

@media (prefers-reduced-motion: reduce) {
  .dot {
    transition: none;
  }
}

@media (max-width: 700px) {
  .site-bar-actions {
    gap: 0.25rem;
  }

  .text-link {
    padding: 0.4rem 0.55rem;
    font-size: 0.88rem;
  }
}
