/* Shared production refinements: interaction, small screens, tablet and desktop. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

a,
button,
summary {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(184, 60, 40, .16);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.reading-guide-card {
  overscroll-behavior: contain;
}

.directory-sticky-close {
  top: 68px;
}

@media (max-width: 359px) {
  .topbar {
    padding-inline: 14px;
  }

  .brand {
    letter-spacing: .1em;
  }

  .issue {
    font-size: 9px;
  }

  .hero-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .page .hero h1 {
    font-size: 32px;
  }

  #yanxishe-fit-guide .hero h1 {
    font-size: 30px;
  }

  .headline-line {
    white-space: normal;
  }
}

@media (min-width: 600px) {
  body {
    padding: 24px 0 40px;
    background: #d8d4cc;
  }

  .page {
    width: min(calc(100% - 48px), 720px);
    min-height: calc(100vh - 64px);
    box-shadow: 0 24px 70px rgba(23, 23, 22, .12);
  }

  .topbar {
    padding-inline: 32px;
  }

  .hero,
  .section,
  .resources,
  .response-section,
  .return-section,
  .consult-section {
    padding-right: 36px;
    padding-left: 36px;
  }

  .manifesto {
    padding-right: 36px;
    padding-left: 36px;
  }

  .continuation-cue {
    right: 36px;
    left: 36px;
  }

  .style-note {
    padding-right: 36px;
    padding-left: 36px;
  }

  .services,
  .support-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service {
    min-height: 300px;
  }

  .service .link-button {
    margin-top: auto;
  }

  .scope-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .boundary-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  body {
    padding: 42px 0 64px;
  }

  .page {
    width: min(calc(100% - 96px), 780px);
  }

  .topbar {
    padding-inline: 44px;
  }

  .hero,
  .section,
  .resources,
  .response-section,
  .return-section,
  .consult-section,
  .manifesto {
    padding-right: 44px;
    padding-left: 44px;
  }

  .continuation-cue {
    right: 44px;
    left: 44px;
  }

  .style-note {
    padding-right: 44px;
    padding-left: 44px;
  }

  .page .hero h1 {
    font-size: 46px;
  }

  .page .section h2 {
    font-size: 30px;
  }

  .page .section-head h2 {
    font-size: 38px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .back-link:hover,
  .reading-guide-replay:hover {
    color: var(--white);
    background: var(--signal);
    border-color: var(--signal);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
