/* Shared touch/readability rules, after page styles and before motion styles. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
/* Native anchor navigation should land below the shared masthead on every page. */
main [id] { scroll-margin-top: 112px; }
::selection { color: #251038; background: #e9dbfa; }
:is(.article-body, .prose-block) p { text-wrap: pretty; }
:is(.article-body, .prose-block) a:not(.text-link) { text-underline-offset: .2em; }
.access-form :is(input, textarea) { caret-color: #7030b5; }
.footer-links a:focus-visible { border-radius: 2px; }

/* Include large/hybrid tablets without changing mouse-driven desktop spacing. */
@media (any-pointer: coarse), (max-width: 1200px) {
  .brand { display: inline-flex; align-items: center; min-height: 44px; }
  .footer-links a,
  .back-link,
  .feed-demo .text-link,
  .resource-filters button,
  .feed-sidebar > button {
    min-height: 44px;
  }
  .back-link { display: inline-flex; align-items: center; }
  .footer-links a { font-size: 15px; padding-block: 7px; line-height: 1.45; }
  .footer-links nav { gap: 0; align-items: stretch; }
  .resource-filters button { font-size: 14px; padding: 11px 16px; }
}

/* Read the assessment at the same scale wherever it appears, including stories. */
@media (any-pointer: coarse), (max-width: 1200px) {
  /* Keep scrolled content from showing through the compact, sticky masthead. */
  .masthead { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .feed-demo .feed-item p,
  .feed-demo .alert-preview p,
  .assessment-demo .report-columns p,
  .assessment-demo .agent-answer p,
  .context-demo .context-result > p:not(.context-private),
  .solution-grid .solution-link p,
  .opportunity-copy p,
  .opportunity-copy ul { font-size: 16px; }
  .assessment-demo .report-lead { font-size: 18px; }
  .assessment-demo .report-columns h4 { font-size: 17px; }
  .feed-demo .alert-preview strong { font-size: 19px; }
  .context-demo .button { font-size: 15px; white-space: normal; max-width: 100%; }
  .assessment-demo .agent-question > button { font-size: 16px; }
  .assessment-demo .agent-question > span { font-size: 14px; }
  .assessment-demo .agent-answer .text-link { font-size: 15px; }
  .assessment-demo .evidence-row > span:nth-child(2) { font-size: 14px; }
  .assessment-demo .evidence-row p { font-size: 16px; }
  .feed-demo .feed-path :is(span, strong) { font-size: 14px; }
}

/* A portrait tablet has room for a full-width finding, not a narrow sidebar. */
@media (min-width: 701px) and (max-width: 1000px) {
  .editorial-feed { display: block; }
  .editorial-feed-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: var(--content-gap);
    padding: 0;
  }
  .editorial-feed-copy h2 { grid-row: 1 / 3; }
  .editorial-feed-copy > p { margin-top: 0; }
  .editorial-feed-copy .text-link { grid-column: 2; justify-self: start; }
  .editorial-feed-stage { margin-top: 32px; }
}

@media (max-width: 650px) {
  .feed-sidebar { padding: 12px; gap: 6px; }
  .feed-demo .feed-sidebar > button {
    font-size: 14px;
    flex: 1 0 auto;
    padding: 10px 7px;
    min-height: 46px;
  }
  .feed-sidebar > button > .icon,
  .feed-filter-detail { display: none; }
  /* Vertical relationships stay legible; shrinking them to 9px hid the story. */
  .feed-path { display: grid; justify-items: start; gap: 5px; }
  .feed-demo .feed-path :is(span, strong) { padding: 7px 11px; }
  .feed-path > .icon { width: 18px; height: 18px; margin-left: 12px; transform: rotate(90deg); }
  .report-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0 12px; gap: 0; }
  .report-tabs button { font-size: 14px; padding: 14px 6px; line-height: 1.4; min-height: 64px; }
  .assessment-demo .agent-answer { grid-template-columns: 1fr; }
  .resource-filters { justify-content: flex-start; }
  .resource-filters button { text-align: left; }
  .access-form { padding: 24px 20px; }
  .access-form .button { gap: 12px; padding-inline: 16px; }
}
