.post-intro {
  padding-top: 56px;
  padding-bottom: 48px;
}

.back-link {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-muted);
}

.back-link:hover {
  color: var(--color-ink);
}

.post-kind {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
  margin-top: 40px;
}

.post-kind .eyebrow {
  font-weight: 500;
}

.post-topics {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--color-muted);
}

.post-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 64px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-top: 16px;
  max-width: 900px;
  text-wrap: balance;
}

.post-dek {
  font-size: 22px;
  line-height: 1.5;
  color: var(--color-body);
  margin-top: 20px;
  max-width: 640px;
  text-wrap: pretty;
}

.post-facts {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 32px;
  margin-top: 40px;
  padding: 16px 0;
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

.post-fact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 40px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.post-fact-label {
  color: var(--color-muted);
}

.post-hero {
  height: 560px;
}

.post-hero.browser-stage,
.post-hero.phone-stage {
  height: 520px;
  border-radius: 8px;
}

.post-hero-phone {
  position: absolute;
  left: 50%;
  top: 64px;
  width: 300px;
  margin-left: -150px;
  border-radius: 44px;
  padding: 9px;
  box-shadow: 0 1px 2px rgba(10, 25, 41, 0.1), 0 24px 56px rgba(10, 25, 41, 0.22);
}

.post-hero-phone img {
  border-radius: 35px;
}

.post-hero-browser.browser-window {
  left: 50%;
  right: auto;
  top: 64px;
  width: 640px;
  margin-left: -320px;
}

.post-hero-browser-contained.browser-window {
  --hero-image-height: 392px;
  left: 50%;
  right: auto;
  top: 50%;
  width: calc(var(--hero-image-height) * 1.25);
  max-width: calc(100% - 48px);
  height: auto;
  border-radius: 10px;
  transform: translate(-50%, -50%);
}

.post-hero-browser-contained.browser-window img {
  aspect-ratio: 10 / 8;
  object-fit: contain;
}

.wide-photo {
  height: 480px;
}

.prose {
  max-width: calc(var(--width-prose) + 2 * var(--page-gutter));
  margin: 0 auto;
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.prose p,
.section-lead {
  font-size: 18px;
  line-height: 1.7;
  color: var(--color-body);
  text-wrap: pretty;
}

.prose h2,
.section-heading {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.prose h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 30px;
  line-height: 1.2;
}

.prose * + h2 {
  margin-top: 48px;
}

.prose * + h3 {
  margin-top: 16px;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 15px;
  background: var(--color-soft);
  padding: 2px 6px;
  border-radius: 4px;
}

.prose .photo-frame {
  height: 420px;
  margin: 16px 0;
}

.section-lead {
  margin-top: 16px;
  max-width: var(--width-prose);
}

.pull-quote {
  margin: 24px 0;
  padding: 28px 0;
  border-top: 1px solid var(--color-ink);
  border-bottom: 1px solid var(--color-line);
}

.pull-quote p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 34px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--color-ink);
  text-wrap: balance;
}

.pull-quote-long p {
  font-size: 30px;
  line-height: 1.3;
  text-wrap: pretty;
}

.figure-caption {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-body);
  margin-top: 14px;
}

.figure-caption-centered {
  text-align: center;
  max-width: 560px;
  margin: 40px auto 0;
  text-wrap: pretty;
}

.figure-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 12px;
}

.soft-panel {
  background: var(--color-soft);
  border-radius: 8px;
  padding: 40px 72px;
}

.soft-panel-blue {
  background: #D9E1EA;
}

.code-block {
  border-radius: 8px;
  overflow: hidden;
  background: #0B1520;
  border: 1px solid #1E2E40;
  margin: 8px 0;
}

.code-block-header {
  display: flex;
  justify-content: space-between;
  padding: 10px 18px;
  border-bottom: 1px solid #1E2E40;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #7E8C9C;
}

.code-block pre {
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  color: #D6DDE6;
  overflow: auto;
}

.prose .code-block code {
  font-size: inherit;
  background: none;
  padding: 0;
}

.code-comment {
  color: #7E8C9C;
}

.code-string {
  color: #FFB830;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.feature {
  border-top: 1px solid var(--color-ink);
  padding-top: 20px;
}

.feature h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.2;
}

.feature p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-body);
  margin-top: 10px;
  text-wrap: pretty;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 6px 12px;
  border: 1px solid var(--color-line);
  border-radius: 4px;
}

.stat-grid {
  --stat-gap: 64px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--stat-gap);
  margin-top: 8px;
}

.stat {
  position: relative;
  padding: 24px 0 8px;
}

.stat + .stat::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--stat-gap) / -2);
  border-left: 1px solid var(--color-line);
}

.stat-value {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 88px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 10px;
  letter-spacing: 0.04em;
}

.timeline {
  list-style: none;
  display: flex;
  flex-direction: column;
  margin-top: 16px;
}

.timeline-entry {
  display: grid;
  grid-template-columns: 140px 20px minmax(0, 1fr);
  gap: 16px;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-amber);
  padding-top: 5px;
}

.timeline-track {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-track::before {
  content: '';
  flex: none;
  width: 9px;
  height: 9px;
  margin-top: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--color-ink);
  background: var(--color-bg);
}

.timeline-track::after {
  content: '';
  flex: 1;
  width: 1px;
  background: var(--color-line);
}

.timeline-body {
  padding-bottom: 28px;
}

.timeline-body h4 {
  font-size: 17px;
  font-weight: 600;
}

.prose .timeline-body p {
  font-size: 16px;
  line-height: 1.6;
  margin-top: 4px;
}

.numbered-list {
  list-style: none;
  border-top: 1px solid var(--color-line);
  counter-reset: numbered-list;
}

.numbered-list li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-line);
  font-size: 17px;
  line-height: 1.55;
  color: var(--color-body);
  counter-increment: numbered-list;
}

.numbered-list li::before {
  content: counter(numbered-list, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-amber);
  padding-top: 4px;
}

.text-with-phone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 40px;
  align-items: center;
  margin: 8px 0;
}

.text-with-phone figure {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.text-with-phone .phone-frame {
  border-radius: 34px;
  padding: 7px;
}

.text-with-phone .phone-frame img {
  border-radius: 27px;
}

.text-with-phone figcaption {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-muted);
  text-align: center;
}

.photo-gallery-main {
  height: 600px;
}

.photo-gallery-caption-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-top: 14px;
}

.photo-gallery-caption-row .figure-caption {
  margin-top: 0;
}

.photo-gallery-caption-row .mono-note {
  flex: none;
}

.photo-gallery-thumbnails {
  display: grid;
  grid-template-columns: repeat(var(--thumbnail-columns, 8), minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.photo-gallery-thumbnail {
  height: 72px;
  padding: 0;
  border: none;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: var(--color-soft);
  opacity: 0.55;
  outline-offset: 2px;
  transition: opacity 0.15s ease;
}

.photo-gallery-thumbnail:hover {
  opacity: 0.85;
}

.photo-gallery-thumbnail[aria-pressed="true"] {
  opacity: 1;
  outline: 2px solid var(--color-ink);
}

.photo-gallery-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.segmented-control {
  display: flex;
  gap: 4px;
  background: var(--color-soft);
  padding: 3px;
  border-radius: 8px;
}

.segmented-control button {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--color-muted);
}

.segmented-control button[aria-pressed="true"] {
  background: var(--color-surface);
  color: var(--color-ink);
}

.level-switcher .section-rule {
  margin-bottom: 28px;
}

.level-switcher-heading {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 30px;
}

.level-switcher .soft-panel {
  padding: 48px 96px;
}

.level-switcher .figure-caption {
  font-size: 16px;
  margin-top: 16px;
  max-width: var(--width-prose);
}

.level-switcher strong {
  color: var(--color-ink);
}

.level-switcher .phone-frame {
  width: 280px;
  margin: 0 auto;
}

.screenshot-picker {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.screenshot-picker .browser-window {
  border: 1px solid var(--color-line);
  box-shadow: none;
}

.screenshot-picker-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.screenshot-picker-option {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  opacity: 0.7;
}

.screenshot-picker-option[aria-pressed="true"] {
  opacity: 1;
}

.screenshot-picker-option img {
  width: 100%;
  height: 96px;
  border-radius: 6px;
  border: 2px solid var(--color-line);
  background: #FFFFFF;
  object-fit: cover;
  object-position: top left;
}

.screenshot-picker-option[aria-pressed="true"] img {
  border-color: var(--color-ink);
}

.screenshot-picker-option span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-muted);
}

.screenshot-fan {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  max-width: 1000px;
  min-height: 650px;
  margin: 0 auto -104px;
}

.screenshot-fan .browser-window {
  width: 450px;
  z-index: 1;
}

.screenshot-fan .browser-window:nth-child(1) {
  transform: rotate(-3deg) translateX(40px);
}

.screenshot-fan .browser-window:nth-child(2) {
  transform: rotate(3deg) translateX(-40px);
}

.screenshot-fan .browser-window:nth-child(3) {
  transform: rotate(-2deg) translateY(-120px);
  z-index: 2;
  margin-top: 32px;
  box-shadow: 0 1px 2px rgba(10, 25, 41, 0.1), 0 24px 56px rgba(10, 25, 41, 0.2);
}

.phone-fan {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 600px;
}

.phone-fan .phone-frame {
  width: 270px;
  z-index: 1;
}

.phone-fan .phone-frame:nth-child(1) {
  transform: rotate(-4deg) translate(28px, 36px);
}

.phone-fan .phone-frame:nth-child(2) {
  z-index: 2;
  box-shadow: 0 24px 56px rgba(10, 25, 41, 0.24);
}

.phone-fan .phone-frame:nth-child(3) {
  transform: rotate(4deg) translate(-28px, 36px);
}

.drawer-comparison {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 96px;
  height: 560px;
  overflow: hidden;
  padding: 56px 48px 0;
}

.drawer-comparison-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.drawer-comparison .phone-frame {
  width: 250px;
  border-radius: 38px;
}

.drawer-comparison .phone-frame img {
  border-radius: 30px;
}

.drawer-comparison-gesture {
  position: absolute;
  left: 50%;
  top: 260px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-amber);
}

.try-it {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 32px;
  background: var(--color-soft);
  border-radius: 8px;
  padding: 40px 48px;
}

.try-it h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 40px;
  line-height: 1.1;
}

.try-it p {
  font-size: 17px;
  color: var(--color-body);
  margin-top: 8px;
  max-width: 460px;
}

.more-posts .section-rule {
  margin-bottom: 32px;
}

.more-posts .section-rule a:hover {
  color: var(--color-ink);
}

.post-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-card-image {
  height: 240px;
  border-radius: 6px;
}

.post-card-image.browser-stage {
  --window-left: 12%;
  --window-top: 14%;
}

.post-card-image.browser-stage .browser-window {
  box-shadow: 0 12px 28px rgba(10, 25, 41, 0.14);
}

.post-card-image .phone-frame {
  position: absolute;
  left: 50%;
  top: 36px;
  width: 130px;
  margin-left: -65px;
}

.post-card .eyebrow {
  font-size: 11px;
  letter-spacing: 0.08em;
}

.post-card h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 30px;
  line-height: 1.15;
  margin-top: 4px;
  text-wrap: balance;
}

.post-card:hover h3 {
  color: var(--color-amber);
}

.post-card p {
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-body);
  margin-top: 6px;
}

@media (max-width: 1024px) {
  .screenshot-fan {
    flex-direction: column;
    align-items: center;
    flex-wrap: nowrap;
    min-height: 0;
    margin-bottom: 0;
  }

  .screenshot-fan .browser-window {
    width: min(450px, 88%);
  }

  .screenshot-fan .browser-window:nth-child(n) {
    margin-top: -36px;
  }

  .screenshot-fan .browser-window:first-child {
    margin-top: 0;
  }

  .screenshot-fan .browser-window:nth-child(odd) {
    transform: rotate(-2deg) translateX(-4%);
  }

  .screenshot-fan .browser-window:nth-child(even) {
    transform: rotate(2deg) translateX(4%);
  }

  .phone-fan {
    min-height: 0;
  }

  .phone-fan .phone-frame {
    width: 30%;
    max-width: 270px;
  }
}

@media (max-width: 768px) {
  .post-intro {
    padding-top: 32px;
  }

  .post-title {
    font-size: clamp(40px, 10vw, 56px);
  }

  .post-dek {
    font-size: 19px;
  }

  .post-hero,
  .post-hero.browser-stage,
  .post-hero.phone-stage {
    height: 340px;
  }

  .post-hero-phone {
    top: 32px;
    width: 220px;
    margin-left: -110px;
    border-radius: 34px;
  }

  .post-hero-phone img {
    border-radius: 26px;
  }

  .post-hero.browser-stage:has(> .post-hero-browser) {
    height: auto;
  }

  .post-hero-browser.browser-window {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: auto;
    height: auto;
    margin: 32px 24px 0;
  }

  .post-hero-browser-contained.browser-window {
    --hero-image-height: 236px;
  }

  .wide-photo,
  .photo-gallery-main {
    height: 320px;
  }

  .prose .photo-frame {
    height: 280px;
  }

  .prose h2,
  .section-heading {
    font-size: 32px;
  }

  .prose h3 {
    font-size: 26px;
  }

  .pull-quote p {
    font-size: 26px;
  }

  .soft-panel,
  .level-switcher .soft-panel {
    padding: 20px;
  }

  .level-switcher .section-rule {
    flex-wrap: wrap;
  }

  .level-switcher .phone-frame {
    width: 220px;
  }

  .feature-grid,
  .post-card-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .stat-value {
    font-size: clamp(32px, 10vw, 56px);
  }

  .stat-grid {
    --stat-gap: 32px;
  }

  .timeline-entry {
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 12px;
  }

  .timeline-date {
    grid-column: 2;
    padding-top: 0;
  }

  .timeline-track {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .timeline-body {
    grid-column: 2;
  }

  .text-with-phone {
    grid-template-columns: minmax(0, 1fr);
  }

  .text-with-phone figure {
    width: 200px;
    margin: 0 auto;
  }

  .photo-gallery-thumbnails {
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  }

  .photo-gallery-thumbnail {
    height: 56px;
    outline-offset: -2px;
  }

  .screenshot-picker-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .phone-fan .phone-frame {
    border-radius: 22px;
    padding: 4px;
  }

  .phone-fan .phone-frame img {
    border-radius: 18px;
  }

  .drawer-comparison {
    gap: 16px;
    height: 420px;
    padding: 32px 16px 0;
  }

  .drawer-comparison .phone-frame {
    width: 150px;
    border-radius: 26px;
    padding: 5px;
  }

  .drawer-comparison .phone-frame img {
    border-radius: 21px;
  }

  .drawer-comparison-gesture {
    top: auto;
    bottom: 12px;
  }

  .try-it {
    padding: 28px 24px;
  }

  .try-it h2 {
    font-size: 32px;
  }
}
