/* ══════════════════════════════════════════════════════════
   COREX INSIGHTS — RESPONSIVE LAYOUT
   Shared only by the Insights hub and Insights articles.
   ══════════════════════════════════════════════════════════ */

/* Insights hub: predictable card columns and consistent card internals. */
.res-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  justify-content: initial;
  gap: 22px;
  width: 100%;
}

.res-card {
  width: auto;
  max-width: none;
  min-width: 0;
  height: 100%;
  padding: 24px 22px;
  gap: 12px;
}

.res-card-head {
  align-items: center;
  min-width: 0;
}

.res-card-head > div {
  min-width: 0;
}

.res-card-head .icon-tile {
  flex: 0 0 52px;
  margin-bottom: 0;
}

.res-card-title,
.res-card-desc {
  overflow-wrap: anywhere;
}

.res-card-title {
  font-size: clamp(17px, 1.45vw, 19px);
  line-height: 1.24;
}

.res-card-desc {
  font-size: 14.5px;
  line-height: 1.62;
}

.res-card-footer {
  padding-top: 14px;
}

.res-hero .art-hero-in {
  margin-top: 24px !important;
}

.res-hero .art-hero-in .h-1 {
  max-width: 720px !important;
}

.res-tabs {
  gap: 10px;
}

/* Article hero: clear fixed-header spacing and stable responsive hierarchy. */
.art-hero {
  padding-top: 112px;
}

.art-hero .crumbs {
  margin-bottom: 22px;
}

.art-hero-in {
  max-width: 920px;
  margin-top: 22px !important;
}

.art-hero-in h1 {
  max-width: 920px;
  overflow-wrap: anywhere;
}

.art-hero-in .lead {
  line-height: 1.62;
  text-wrap: pretty;
}

.art-meta {
  row-gap: 10px;
}

.art-hero-img {
  max-width: 920px;
}

/* Article body: robust wrapping and contained technical content. */
.art-body,
.prose,
.prose > * {
  min-width: 0;
}

.prose {
  width: 100%;
}

.prose p,
.prose li,
.prose a,
.prose h2,
.prose h3,
.art-callout,
.art-toc-inline {
  overflow-wrap: anywhere;
}

.prose h2,
.prose h3,
.prose h4 {
  max-width: 100%;
  white-space: normal;
  word-break: normal;
  text-wrap: pretty;
}

.step-frame,
.art-callout,
.art-toc-inline,
.faq,
.art-bio-row,
.art-rel-card,
.cta-band,
.price-card {
  min-width: 0;
  max-width: 100%;
}

/* Compact, balanced clearance between content and both frame corners. */
.step-frame {
  margin-block: 44px;
  padding: 18px clamp(10px, 1.4vw, 14px);
}

.step-frame::before,
.step-frame::after {
  height: 28px;
}

.art-toc-inline .art-toc-links a,
.art-callout p,
.art-bio-info,
.art-rel-title,
.art-rel-desc,
.cta-band h2,
.cta-band p,
.faq-q {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.prose figure {
  max-width: 100%;
  overflow: hidden;
}

.prose figure img,
.prose figure svg,
.prose svg {
  max-width: 100%;
  height: auto;
}

.price-table-wrap {
  max-width: 100%;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--acc) rgba(255, 255, 255, .04);
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

.price-table-wrap::-webkit-scrollbar {
  height: 7px;
}

.price-table-wrap::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--acc);
}

.price-table-wrap::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .04);
}

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

/* Laptop: two-column hub; articles retain a centered reading column. */
@media (min-width: 1024px) and (max-width: 1439px) {
  .res-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .res-card {
    padding: 25px 24px;
  }

  .art-hero {
    padding-top: 104px;
  }

  .art-hero-img {
    max-width: 860px;
  }
}

/* Tablet: two comfortable cards and simplified metadata wrapping. */
@media (min-width: 701px) and (max-width: 1023px) {
  .res-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .res-card {
    padding: 22px 20px;
  }

  .res-card-head .icon-tile {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
  }

  .res-hero {
    padding-bottom: 42px;
  }

  .art-hero {
    padding-top: 100px;
  }

  .art-hero-in {
    margin-top: 20px !important;
  }

  .art-meta-dot {
    display: none;
  }

  .art-meta {
    gap: 8px 18px;
  }

  .art-hero-img {
    aspect-ratio: 16 / 9.5;
  }

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

/* Mobile: one-column hub and compact, readable article components. */
@media (max-width: 700px) {
  .res-hero {
    padding-bottom: 34px;
  }

  .res-hero .art-hero-in {
    margin-top: 18px !important;
  }

  .res-hero .art-hero-in .h-1 {
    max-width: 11ch !important;
    margin-inline: auto;
  }

  .res-tabs {
    gap: 8px;
    margin-top: 22px;
  }

  .res-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .res-card {
    padding: 22px 20px;
  }

  .res-card-head {
    align-items: flex-start;
  }

  .res-card-head .icon-tile {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
  }

  .res-card-title {
    font-size: 18px;
  }

  .res-card-desc {
    font-size: 14.5px;
    line-height: 1.65;
  }

  .art-hero {
    padding-top: 96px;
  }

  .art-hero .wrap {
    padding-inline: 20px;
  }

  .art-hero .crumbs {
    gap: 7px;
    margin-bottom: 18px;
    letter-spacing: .1em;
  }

  .art-hero-in {
    margin-top: 18px !important;
  }

  .art-hero-in .art-kicker {
    margin-bottom: 16px;
  }

  .art-hero-in .h-1 {
    font-size: clamp(31px, 9vw, 38px);
    line-height: 1.09;
  }

  .art-hero-in .lead {
    font-size: 16px;
    line-height: 1.66;
    margin-top: 14px !important;
  }

  .art-meta-dot {
    display: none;
  }

  .art-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 14px;
    margin-top: 20px;
    padding-top: 18px;
    font-size: 12.5px;
  }

  .art-meta > span:not(.art-meta-dot) {
    min-width: 0;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .art-meta > span:not(.art-meta-dot):first-child,
  .art-meta > span:not(.art-meta-dot):last-child {
    grid-column: 1 / -1;
  }

  .art-hero-img {
    margin-top: 26px;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
  }

  .art-body {
    padding-top: 34px;
  }

  .prose p {
    font-size: 16px;
    line-height: 1.72;
  }

  .prose li {
    font-size: 15.5px;
    line-height: 1.65;
  }

  .prose h2 {
    font-size: clamp(21px, 6vw, 25px);
    line-height: 1.22;
    margin-top: 44px;
    padding-top: 18px;
  }

  .prose h3 {
    font-size: 18px;
    margin-top: 22px;
  }

  .art-toc-inline {
    padding: 16px 17px;
    margin: 22px 0 28px;
  }

  .art-toc-links {
    grid-template-columns: 1fr;
  }

  .art-toc-inline .art-toc-links a {
    min-height: 44px;
    padding-block: 11px;
  }

  .art-callout {
    padding: 17px 18px;
    margin: 24px 0;
  }

  .step-frame {
    margin-inline: 0;
    padding-inline: 12px;
  }

  .step-frame::before {
    left: 0;
  }

  .step-frame::after {
    right: 0;
  }

  .prose figure[style] {
    padding: 18px 12px 12px !important;
    margin-block: 28px !important;
  }

  .prose .faq-q {
    box-sizing: border-box;
    padding: 16px 60px;
    font-size: 15px;
    line-height: 1.48;
  }

  .art-rel-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .art-rel-card {
    padding: 21px 20px;
  }

  .cta-band .shiny-cta {
    width: min(100%, 320px);
    justify-content: center;
  }

  .cta-band .shiny-cta + .shiny-cta {
    margin-left: 0;
  }
}

/* Keep floating controls from obscuring reading content on compact screens. */
@media (max-width: 1023px) {
  #back-top {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  #back-top {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    width: 44px;
    height: 44px;
  }
}

/* Touch devices keep the premium surface without desktop hover movement. */
@media (hover: none) {
  .res-card:hover,
  .art-rel-card:hover {
    transform: none;
  }
}

/* CoreX article baseline: keep supporting Insight pages aligned with the
   finalized MEP for Restaurants reading experience. */
.art-hero-in h1 {
  text-wrap: balance;
}

.prose p {
  font-size: 15.5px;
  line-height: 1.65;
}

.prose li {
  font-size: 15.5px;
  line-height: 1.62;
}

.prose h2 {
  font-size: clamp(22px, 2.5vw, 25px);
  line-height: 1.22;
}

.prose h3 {
  font-size: clamp(17px, 1.8vw, 18px);
  line-height: 1.34;
}

.step-frame {
  margin-block: 26px;
  padding: 22px clamp(18px, 2.4vw, 28px);
}

@media (max-width: 1023px) {
  /* Preserve the same visible separator rhythm used on the reference page. */
  .art-meta > .art-meta-dot {
    display: none !important;
  }

  .art-meta > span:nth-of-type(3)::before,
  .art-meta > span:nth-of-type(5)::before,
  .art-meta > span:nth-of-type(7)::before {
    content: "\2022";
    display: inline-block;
    margin-right: 10px;
    color: var(--acc);
    opacity: .68;
    font-size: 10px;
    vertical-align: 1px;
  }
}

@media (max-width: 700px) {
  .art-hero-img {
    aspect-ratio: 16 / 9;
  }

  .prose p {
    font-size: 15.5px;
    line-height: 1.62;
  }

  .prose li {
    font-size: 15.25px;
    line-height: 1.58;
  }

  .prose h2 {
    font-size: 25px;
    line-height: 1.22;
  }

  .prose h3 {
    font-size: 17px;
    line-height: 1.34;
  }

  .step-frame {
    margin-block: 26px;
    padding: 20px 18px;
  }
}

/* Mobile FAQ columns: keep the question clear of the fixed plus control. */
@media (max-width: 520px) {
  .prose .faq-q,
  .faq-grid .faq-q {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 60px;
    column-gap: 20px;
    align-items: center;
    justify-content: initial;
    min-width: 0;
    padding: 14px 14px 14px 16px;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .prose .faq-q .faq-label,
  .faq-grid .faq-q .faq-label {
    box-sizing: border-box;
    min-width: 0;
    display: block;
    width: 100%;
    max-width: calc(100% - 32px);
    justify-self: start;
    padding-right: 24px;
    overflow-wrap: anywhere;
    word-break: normal;
    white-space: normal;
  }

  .prose .faq-q .pm,
  .faq-grid .faq-q .pm {
    position: static;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    width: 34px;
    height: 34px;
    transform: none;
  }

  .faq.open .prose .faq-q .pm,
  .faq.open .faq-grid .faq-q .pm {
    transform: rotate(45deg);
  }
}