@media (max-width: 64rem) {
  .site-header__nav {
    gap: 0.55rem;
  }

  .site-header__nav > a:not(.cta-line) {
    font-size: 0.82rem;
  }

  .service-selector,
  .article-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .related-cluster .article-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .step-list li:nth-child(odd) + li {
    border-left: 1px solid var(--color-border);
  }

  .step-list li:nth-child(n + 3) {
    border-top: 1px solid var(--color-border);
  }

  .hub-feature,
  .service-intro,
  .service-boundary {
    grid-template-columns: 1fr;
  }

  .hub-feature__image {
    min-height: 15rem;
  }

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

  .site-footer__brand {
    grid-column: span 3;
  }
}

@media (max-width: 48rem) {
  body {
    padding-bottom: 5.25rem;
  }

  .site-header__primary {
    min-height: 4.25rem;
  }

  html.js .site-header__nav {
    position: absolute;
    inset: 100% 0 auto;
    display: none;
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding: 0.75rem 1rem 1rem;
    background: var(--color-paper);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
  }

  html.js .site-header__nav[data-open] {
    display: grid;
  }

  html.js .site-header__nav > a {
    padding: 0.75rem;
    border-radius: var(--radius-small);
  }

  html.js .site-header__nav > a:not(.cta-line):hover {
    background: var(--color-teal-soft);
  }

  html.js .site-header__nav .cta-line {
    margin-top: 0.4rem;
  }

  html.js .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .context-nav {
    gap: 0.05rem;
    min-height: 3rem;
  }

  .context-nav > a,
  .context-nav summary {
    padding-inline: 0.6rem;
    font-size: 0.8rem;
  }

  .hero {
    min-height: 32rem;
  }

  .hero__inner {
    padding-block: 4rem 5rem;
  }

  .hero__actions > * {
    flex: 1 1 100%;
  }

  .service-selector,
  .trust-panel,
  .article-card-grid,
  .price-plans,
  .hub-problem-index,
  .related-cluster__grid {
    grid-template-columns: 1fr;
  }

  .related-cluster .article-card-grid {
    grid-template-columns: 1fr;
  }

  .step-list {
    grid-template-columns: 1fr;
  }

  .step-list li + li,
  .step-list li:nth-child(odd) + li {
    border-top: 1px solid var(--color-border);
    border-left: 0;
  }

  .office-visit {
    grid-template-columns: 1fr;
  }

  .office-visit__media {
    min-height: 0;
    max-height: 18rem;
  }

  .hub-feature__image {
    min-height: 12rem;
  }

  .cta-band__inner {
    grid-template-columns: 1fr;
  }

  .site-footer__grid,
  .site-footer__brand {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-column: auto;
  }

  .site-footer__brand {
    grid-column: span 2;
  }

  .sticky-cta {
    position: fixed;
    z-index: 90;
    inset: auto 0 0;
    display: block;
    padding: 0.6rem 0.85rem calc(0.6rem + env(safe-area-inset-bottom));
    background: rgb(255 255 255 / 97%);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -0.5rem 1.25rem rgb(16 42 67 / 9%);
  }

  .sticky-cta .cta-line {
    width: 100%;
  }
}

@media (max-width: 30rem) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .site-footer__brand {
    grid-column: auto;
  }

  /* 幅の狭い画面では丸窓を小さくして、吹き出しの一行あたりの文字数を確保する。
     読み手が片手で持って読む場面を想定している。 */
  .cat-talk__avatar {
    width: 3rem;
    height: 3rem;
  }

  .cat-talk__turn {
    gap: 0.55rem;
  }

  .cat-talk__bubble {
    padding: 0.8rem 0.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Human/local layout overrides ------------------------------------------ */

@media (max-width: 64rem) {
  /* Below this the container no longer clears a centred .section-heading, so
     the corner spot would land on the copy.  Drop it rather than crowd it. */
  .spot-illustration--corner {
    display: none;
  }

  .site-header__primary.container {
    width: min(100% - 1rem, var(--content-wide));
  }

  .site-header__nav {
    gap: 0.35rem;
  }

  .site-header__nav > a:not(.cta-line) {
    font-size: 0.76rem;
  }

  .trust-panel__item:nth-child(odd) + .trust-panel__item {
    border-left: 1px solid var(--color-border);
  }

  .trust-panel__item:nth-child(n + 3) {
    border-top: 1px solid var(--color-border);
  }

  .article-card-grid,
  .related-cluster .article-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-cover {
    height: clamp(15rem, 42vw, 24rem);
  }

  .article-cover > img,
  .article-cover picture,
  .article-cover picture img {
    min-height: clamp(15rem, 42vw, 24rem);
  }
}

@media (max-width: 48rem) {
  body {
    padding-bottom: 5.25rem;
  }

  .site-header {
    top: 0.5rem;
    width: calc(100% - 1rem);
    margin-top: 0.5rem;
    border-radius: 1.25rem;
  }

  .site-header__primary {
    min-height: 4rem;
  }

  html.js .site-header__nav {
    z-index: 240;
    inset: calc(100% + 0.5rem) 0 auto;
    padding: 0.75rem;
    background: var(--color-paper);
    border: 2px solid var(--color-navy);
    border-radius: var(--radius);
    box-shadow: 0 0.5rem 0 var(--color-navy), var(--shadow-small);
  }

  html.js .site-header__nav > a {
    color: var(--color-navy-deep);
  }

  html.js .site-header__nav > a:not(.cta-line):hover {
    color: var(--color-navy-deep);
    background: var(--color-cream);
  }

  html.js .menu-button {
    min-width: 2.65rem;
    min-height: 2.65rem;
    font-size: 0.73rem;
  }

  /* Normal flow at this width lets the native details disclosure be tapped,
     focused and read without an overflow ancestor clipping its panel. */
  .context-nav {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.2rem;
    width: calc(100% - 1rem);
    min-height: 0;
    padding: 0.42rem;
    overflow: visible;
    border-radius: var(--radius-small);
    box-shadow: 0 0.25rem 0 var(--color-navy);
  }

  .context-nav > a,
  .context-nav summary {
    padding: 0.42rem 0.58rem;
    font-size: 0.78rem;
  }

  .region-menu {
    position: static;
  }

  .region-menu[open] {
    flex: 1 0 100%;
  }

  .region-menu[open] summary {
    display: inline-block;
  }

  .region-menu[open] ul {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
    margin-top: 0.45rem;
    transform: none;
    box-shadow: none;
  }

  .region-menu[open] li + li {
    border-top: 0;
  }

  .region-menu[open] li:nth-child(odd) + li {
    border-left: 1px solid var(--color-border);
  }

  .region-menu[open] li:nth-child(n + 3) {
    border-top: 1px solid var(--color-border);
  }

  .hero {
    min-height: 31rem;
  }

  .hero--background::before {
    inset: auto -4.5rem -6rem auto;
    width: 14rem;
    border-width: 0.55rem;
  }

  .hero--background::after {
    top: 11%;
    left: 1rem;
    box-shadow: 0.5rem 0.5rem 0 rgb(31 90 157 / 15%);
  }

  .hero__inner {
    padding-block: 4.4rem 5.25rem;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 11vw, 3.35rem);
  }

  .hero__eyebrow::before,
  .hero__eyebrow::after {
    width: 1.45rem;
    margin-inline: 0.38rem;
  }

  .hero .cat-marker {
    right: 0.9rem;
    bottom: 0.9rem;
    width: 4.2rem;
  }

  .hero__cat {
    right: 0.9rem;
    bottom: 0.9rem;
    width: 5.2rem;
  }

  .hero .cat-marker--left {
    right: auto;
    left: 0.9rem;
  }

  .service-selector,
  .trust-panel,
  .article-card-grid,
  .price-plans,
  .hub-problem-index,
  .related-cluster__grid,
  .related-cluster .article-card-grid {
    grid-template-columns: 1fr;
  }

  .trust-panel__item + .trust-panel__item,
  .trust-panel__item:nth-child(odd) + .trust-panel__item {
    border-top: 1px solid var(--color-border);
    border-left: 0;
  }

  .office-visit {
    grid-template-columns: minmax(0, 1fr);
  }

  .office-visit__media {
    min-height: 15rem;
  }

  .office-visit__content {
    padding: 1.4rem 1.25rem 1.7rem;
  }

  .service-intro,
  .service-boundary,
  .hub-feature {
    grid-template-columns: minmax(0, 1fr);
  }

  .service-intro__visual,
  .article-figure {
    width: 100%;
  }

  .hub-feature__image {
    min-height: 13rem;
  }

  .article-layout {
    width: min(100% - 1.25rem, var(--content-narrow));
  }

  .article-cover {
    width: calc(100vw - 1.25rem);
    height: 15.5rem;
    border-radius: var(--radius-small);
  }

  .article-cover > img,
  .article-cover picture,
  .article-cover picture img {
    min-height: 15.5rem;
  }

  .article-cover::after {
    background: linear-gradient(180deg, rgb(18 62 114 / 76%) 0%, rgb(18 62 114 / 58%) 100%);
  }

  .article-cover__title {
    width: min(100% - 1.5rem, 34rem);
    padding: 0.5rem;
    font-size: clamp(1.65rem, 7.4vw, 2.5rem);
  }

  .article-card {
    padding-block: 1rem;
  }

  .article-card__image {
    height: 11rem;
  }

  .office-map__open {
    right: 0.7rem;
    bottom: 0.7rem;
    min-height: 2.5rem;
    padding-inline: 0.75rem;
    font-size: 0.82rem;
  }

  .cta-band__inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 30rem) {
  .spot-row .spot-illustration,
  .spot-row--compact .spot-illustration {
    width: 3.7rem;
  }

  .region-menu[open] ul {
    grid-template-columns: minmax(0, 1fr);
  }

  .region-menu[open] li:nth-child(odd) + li {
    border-left: 0;
  }

  .region-menu[open] li + li {
    border-top: 1px solid var(--color-border);
  }
}

/* Once the hero buttons grow to fill the width, the bottom-right corner is
   theirs.  たすけ steps down into the flow rather than sitting on a button. */
@media (max-width: 56rem) {
  .hero__cat {
    position: static;
    display: block;
    width: clamp(5rem, 16vw, 7.5rem);
    margin: clamp(1.25rem, 4vw, 2rem) auto 0;
  }
}
