/* Reskin responsive pass (layout only). Nothing here applies at 1280 and wider except where noted. DS-GAP: responsive (no DS responsive table, toolbar or sheet). */
@media (max-width: 782px) {
  main.rs { margin: 46px 0 0; }
  .proto .dash-nav { top: 46px; }
  .proto .rs-toolbar { flex-wrap: wrap; }
  .proto .rs-toolbar > .ds-seg { flex: 1 1 100%; max-width: 100%; }
  .proto .rs-tools { flex: 1 1 100%; width: 100%; margin-inline-start: 0; }
  .proto .rs-tools .ds-filter { flex: 1 1 0; min-width: 0; }
  .proto .rs-tools .ds-filter-btn, .proto .rs-filter { width: 100%; }
  .proto .rs-search { flex: 1 1 0; max-width: none; min-width: 0; }
}

/* ---- Touch: row actions that only show on hover are always visible ---- */
@media (hover: none), (max-width: 1024px) { .rs-rowact { opacity: 1 !important; } }

/* ---- 1024 and 768: fewer columns, wrapping text ---- */
@media (max-width: 1024px) {
  .rs-body { padding-inline: 24px; }
}

/* ---- 782 and below: content cards ---- */
@media (max-width: 782px) {
  .proto .wb-card { padding: 12px; }
  .proto .dash-rows { padding-inline: 12px; }
  .proto .dash-thead { padding-inline: 12px; }
}

/* ---- Phone: each testimonial row is a stacked card; the bulk bar sticks to the bottom ---- */
@media (max-width: 599px) {
  .proto .dash-thead .dash-half { gap: 8px; }
  .proto .dash-row { padding: 16px 0; border-bottom: 0; }
  .proto .dash-row::after { top: auto; bottom: 0; }
  .proto .dash-row .dash-half:first-child { display: flex; align-items: flex-start; gap: 10px; }
  .proto .dash-row .dash-txt { gap: 6px; }
  .proto .dash-row .dash-meta { order: -1; flex-wrap: wrap; }
  .proto .dash-row .dash-quote { width: 100%; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
  .proto .dash-row .dash-half.r { padding-left: 0; }
  .proto .dash-row .dash-half.r > * { height: auto; min-height: 44px; }
  .proto .dash-row .dash-tags { flex-wrap: wrap; flex: 1 1 100%; }
  .proto .dash-row .dash-status { flex: 0 0 auto; }
  .proto .dash-row .dash-actions { flex: 1 1 auto; justify-content: flex-end; }
  .proto .wb-card > .rs-bulk.is-on { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; padding: 0 16px env(safe-area-inset-bottom); z-index: 60; background: var(--surface-screen); border-top: 1px solid var(--stroke-tertiary); box-shadow: 0 -4px 16px rgba(0, 0, 0, .08); border-radius: 0; }
  .proto .wb-card > .rs-bulk .rs-bulk__in { padding: 10px 0; }
  .proto .wb-card:has(> .rs-bulk.is-on) { padding-bottom: 96px; }
  .proto .rs-bulk__acts { flex: 1 1 100%; justify-content: flex-start; }
  .proto .rs-bulk__left, .proto .rs-bulk__in { gap: 8px 12px; }
  .proto .rs-head { gap: 8px; }
}

/* ---- Fluid gutters below 1280 (40px at 1280 and up stays as is) ---- */
@media (max-width: 1279px) {
  main.rs { --gut: clamp(16px, 4vw, 40px); }
  main.rs > .rs-body, main.rs .dash-body, main.rs > .rs-crumb, main.rs > .rs-wpfoot { padding-inline: var(--gut); }
  main.rs > .rs-body--dash { padding-inline: 0; }
  .rs-foot--sticky { margin-inline: calc(-1 * var(--gut)); padding-inline: var(--gut); }
  .proto .dash-body { padding-inline: var(--gut); }
}
@media (max-width: 959px) { .rs-foot--sticky { margin-inline: calc(-1 * var(--gut, 16px)); padding-inline: var(--gut, 16px); } }
@media (max-width: 599px) { .rs-foot--sticky { flex-wrap: wrap; padding-bottom: max(16px, env(safe-area-inset-bottom)); } .rs-foot--sticky > :is(button, a) { flex: 1 1 100%; } }

/* ---- Filter panel and popovers: bottom sheets on a phone ---- */
@media (max-width: 599px) {
  .rs-fwrap:has(> .rs-fpanel:not([hidden]))::before { content: ""; position: fixed; inset: 0; z-index: 1099; background: rgba(0, 0, 0, .32); pointer-events: none; }
  .rs-fpanel, .rs-tb__group .ds-filter-panel, .rs-pop { position: fixed !important; left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important; width: 100% !important; max-width: none; max-height: 75dvh !important; overflow-y: auto; z-index: 1100; border-radius: var(--radius-16) var(--radius-16) 0 0; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .rs-ctx { max-width: calc(100vw - 16px); }
}

/* WP comments: row actions sit in the flow and wrap on small screens */
@media (max-width: 1024px) { .rs-rowact { position: static; flex-wrap: wrap; white-space: normal; margin-top: 6px; } .rs-rowact .lnk-wp { min-height: 44px; } }

/* ---- Thrive Architect screens (a separate editor mock): screenshots scale to the width with their hotspots; the HTML replica stacks on a phone ---- */
@media (max-width: 1024px) { .tcb-hot::after { content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); --hit-w: 44px; --hit-h: 44px; } }
@media (max-width: 782px) {
  .tcb-note { right: auto; left: 8px; max-width: calc(100vw - 16px); height: auto; min-height: 24px; white-space: normal; }
  .tcb-note span { overflow: visible; text-overflow: clip; }
}
@media (max-width: 700px) {
  .tcb:not(.is-shot) { --tcb-left-w: 0px; --tcb-rail-w: 32px; grid-template-columns: minmax(0, 1fr) var(--tcb-rail-w); grid-template-rows: auto minmax(0, 1fr) var(--tcb-bottombar-h); }
  .tcb:not(.is-shot) > .tcb-left { grid-row: 1; grid-column: 1 / -1; max-height: 34dvh; border-right: 0; border-bottom: 1px solid var(--tcb-sep); }
  .tcb:not(.is-shot) > .tcb-main { grid-row: 2; grid-column: 1; }
  .tcb:not(.is-shot) > .tcb-rail { grid-row: 2; grid-column: 2; }
  .tcb:not(.is-shot) > .tcb-bar { grid-row: 3; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
  .tcb-top { overflow-x: auto; white-space: nowrap; }
  .tcb-prev { margin-left: 4px; }
}


/* ---- Dashboard rows, D1/D2/D3 (QA 2026-10-31): wrap tags at 1221-1439; below 1221 each row is two lines (quote, then tags, status, actions) ---- */
@media (min-width: 1221px) and (max-width: 1439px) {
  .proto .dash-row { height: auto; min-height: 84px; padding-bottom: 20px; }
  .proto .dash-row::after { top: auto; bottom: 19px; }
  .proto .dash-row .dash-half { height: auto; min-height: 44px; }
  .proto .dash-row .dash-half.r > .dash-tags { height: auto; min-height: 30px; flex-wrap: wrap; overflow: visible; row-gap: 4px; }
}
@media (max-width: 1320px) { .proto .rs-toolbar .ds-seg .seg-in, .proto .dash-toolbar .ds-seg .seg-in { padding-inline: 12px; gap: 6px; } }
@media (max-width: 1220px) {
  .proto .dash-thead .dash-half.r { display: none; }
  .proto .dash-row { flex-direction: column; height: auto; min-height: 0; gap: 8px; padding: 14px 0 18px; align-items: stretch; }
  .proto .dash-row::after { top: auto; bottom: 0; }
  .proto .dash-row .dash-half { height: auto; min-height: 44px; flex: none; width: 100%; }
  .proto .dash-row .dash-half.r { flex-wrap: wrap; gap: 8px 16px; padding-left: 56px; align-items: center; }
  .proto .dash-row .dash-half.r > * { height: auto; min-height: 30px; }
  .proto .dash-row .dash-tags { flex: 1 1 200px; flex-wrap: wrap; overflow: visible; justify-content: flex-start; min-width: 0; }
  .proto .dash-row .dash-status { flex: 0 0 auto; }
  .proto .dash-row .dash-actions { flex: 0 0 auto; margin-left: auto; }
}
@media (max-width: 1220px) { .proto .dash-tag { flex: 0 0 auto; width: auto; align-self: flex-start; } }

/* ---- QA 2026-10-31 round ---- */
@media (max-width: 599px) { .proto .dash-row .dash-half.r { padding-left: 0; } }
/* D13: the Activity card sizes to its content on tablet and phone */
@media (max-width: 1239px) {
  .rs-editgrid .rs-logcard { height: auto; min-height: 0; max-height: 360px; }
  .rs-editgrid .rs-logcard > .rs-log { position: static; max-height: 360px; }
}
/* WP comments: Spam / Trash never run under "View post" at 1280 */
@media (max-width: 1359px) {
  .rs-rowact { flex-wrap: wrap; white-space: normal; width: 100%; row-gap: 0; }
}

/* ---- R15 responsive review (2026-11-01) ---- */
/* 1. Status tabs keep their full border: the toolbar wraps instead of squeezing the tabs; when the tabs alone are wider than the row the group scrolls inside its own border (the DS draws it as an outline, the mask that clipped it is gone) with scroll shadows as the affordance. */
@media (max-width: 1279px) {
  .proto .rs-toolbar { flex-wrap: wrap; }
  .proto .rs-toolbar > .ds-seg { flex: 0 1 auto; max-width: 100%; -webkit-mask-image: none; mask-image: none; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    background: linear-gradient(90deg, var(--surface-overlay-0) 30%, transparent) 0 0 / 40px 100% no-repeat local, linear-gradient(270deg, var(--surface-overlay-0) 30%, transparent) 100% 0 / 40px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .22), transparent) 0 0 / 12px 100% no-repeat scroll, radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .22), transparent) 100% 0 / 12px 100% no-repeat scroll, var(--surface-overlay-0); }
  .proto .rs-toolbar > .ds-seg::-webkit-scrollbar { display: none; }
  .proto .rs-tools { margin-inline-start: auto; }
}
/* 6. Header actions: when they wrap under the title (class set by touch-fit.js) the main button comes first on the left */
.rs-head.is-wrapped > .rs-head__acts { flex-direction: row-reverse; justify-content: flex-end; }
/* 4. Ways to capture: 5 in a row at 1440 and up, then 3 + 2 (second row centred, equal widths), 2 columns, 1 column */
@media (max-width: 1439px) {
  .proto .dash-routes { display: flex; flex-wrap: wrap; justify-content: center; left: 0; }
  .proto .dash-routes > .dash-route { flex: 0 0 calc((100% - 24px) / 3); max-width: calc((100% - 24px) / 3); }
}
@media (max-width: 700px) { .proto .dash-routes > .dash-route { flex-basis: calc((100% - 12px) / 2); max-width: calc((100% - 12px) / 2); } }
@media (max-width: 480px) { .proto .dash-routes > .dash-route { flex-basis: 100%; max-width: 100%; } }
/* 7. Mobile title scale (DS heading tokens only): page H1 xl -> lg, modal / drawer / empty titles lg -> md, video title md -> sm */
@media (max-width: 599px) {
  .proto .rs-h1, .rs-h1, .dash-h1, .set-h1, .rs-wp-h { font: var(--heading-lg); }
  .fm .rs-dlg-title, .nuf-dialog__title, .set-mh h2, .proto .p-buildmodal .p-build__title, .nc__h, .dash-empty-t { font: var(--heading-md); }
  .set-sec__title, .rs-split__t { font: var(--heading-sm); }
  .ovv__title { font: var(--heading-sm); max-width: 100%; }
}
/* Sweep: the WP comments search form never outgrows a 360 phone */
