/* ==========================================================
   T1 round 2 · full-bleed story tiles
   Text readability rules:
   - every text node sits on a scrim, a solid panel or a solid tag
   - tiles use min-height, never height, so 200% text zoom grows the tile
   - text stays live HTML, never baked into the image
   ========================================================== */

.t1-hero { padding-top: 64px; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; }
.t1-hero h1 { font-family: var(--f-serif); font-weight: 400; font-size: 56px; line-height: 1.02; letter-spacing: -0.015em; margin: 0 0 20px; text-wrap: balance; }
.t1-hero p { font-size: 16.5px; max-width: 62ch; margin: 0 0 14px; text-wrap: pretty; }
.t1-hero .back { font-family: var(--f-mono); font-size: 12px; color: var(--c-muted); text-decoration: none; display: inline-block; margin-bottom: 20px; }
.t1-hero .back:hover { color: var(--c-ink); }
.rules { background: var(--c-paper); border: 1px solid var(--c-line); border-radius: 6px; padding: 22px 24px; }
.rules h2 { font-family: var(--f-mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; color: var(--c-muted); margin: 0 0 14px; }
.rules ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; font-size: 14px; }
.rules li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; }
.rules li span:first-child { font-family: var(--f-mono); font-size: 11px; color: var(--c-muted); padding-top: 2px; }

/* audit readouts */
.audit { font-family: var(--f-mono); font-size: 11.5px; line-height: 1.5; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.audit .ok { color: #1D5B3A; background: #EEF5F0; border: 1px solid #A9C9B4; padding: 2px 7px; border-radius: 4px; }
.audit .bad { color: #8A2B1E; background: #FBEDEA; border: 1px solid #E2B3AA; padding: 2px 7px; border-radius: 4px; }
.audit .h { color: var(--c-muted); border: 1px solid var(--c-line); padding: 2px 7px; border-radius: 4px; background: #fff; }

/* ---------- the tile ---------- */
.fb {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  width: 100%; margin: 0; padding: 0; border: 0; border-radius: 2px;
  background: #2B1B1C; color: #fff; text-align: left; font: inherit; cursor: pointer;
  text-decoration: none;
}
div.fb { cursor: default; }
.fb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.fb-split { position: absolute; inset: 0; z-index: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; background: #fff; }
.fb-split .fb-img { position: relative; }
.fb-split-lab { position: absolute; top: 10px; z-index: 4; font-size: 11px; font-weight: 600; letter-spacing: .04em; background: #fff; color: var(--rv-ink); padding: 3px 7px; }
.fb-split-lab.l { left: 10px; } .fb-split-lab.r { right: 10px; }
.fb-layer { position: absolute; inset: 0; z-index: 1; pointer-events: none; transition: opacity .3s; }
.fb-body { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 3px; padding: 14px 16px 15px; }
.fb-k { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.fb-h { display: block; font-family: var(--f-serif); font-weight: 400; font-size: 21px; line-height: 1.12; letter-spacing: -0.005em; }
.fb-s { display: block; font-size: 13px; line-height: 1.4; }
.fb-more { display: none; font-size: 13px; line-height: 1.45; margin-top: 6px; }
.fb.is-open .fb-more { display: block; }
.fb-specs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.fb-spec { font-size: 11px; padding: 2px 7px; border: 1px solid rgba(255,255,255,.55); white-space: nowrap; }
.fb-link { display: inline-block; margin-top: 8px; font-size: 12.5px; color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.fb-cue { position: absolute; right: 12px; bottom: 14px; z-index: 2; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(255,255,255,.7); display: grid; place-items: center; transition: transform .25s; }
.fb.is-open .fb-cue { transform: rotate(45deg); }
.fb-cue svg { width: 12px; height: 12px; }

.fb:hover .fb-img { transform: scale(1.035); }
.fb:focus-visible { outline: 3px solid var(--rv-plum); outline-offset: 2px; }

/* treatments that put text on a solid */
.fb-panel { background: rgba(255, 255, 255, 0.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--rv-plum); padding: 12px 14px; margin: 10px; }
.fb-panel .fb-s, .fb-panel .fb-k { color: var(--rv-ink); }
.fb-tag { align-self: flex-start; background: var(--rv-plum); color: #fff; padding: 9px 14px 10px; margin: 10px; outline: 1px dashed rgba(255,255,255,.45); outline-offset: -5px; max-width: calc(100% - 20px); }
.fb-tag--guava { background: #9E4529; }

/* ---------- layouts ---------- */
.t1-surface { background: #fff; padding: 20px; display: flex; flex-direction: column; gap: 0; }
.t1-col { width: 100%; max-width: 400px; margin: 0 auto; }
.t1-h { font-size: 12px; font-weight: 600; margin: 0 0 10px; display: flex; justify-content: space-between; color: var(--rv-ink); }

/* F · stack */
.t1-stack { display: grid; gap: 8px; }
.t1-stack .fb { min-height: 140px; }
.t1-stack .fb.is-open { min-height: 300px; }
.t1-stack .fb .fb-s { padding-right: 34px; }

/* G · mosaic */
.t1-mosaic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; grid-auto-flow: row dense; }
.t1-mosaic .fb { aspect-ratio: 1 / 1; }
.t1-mosaic .fb .fb-h { font-size: 18px; }
.t1-mosaic .fb .fb-s { display: none; }
.t1-mosaic .fb.is-open { grid-column: 1 / -1; aspect-ratio: 16 / 11; }
.t1-mosaic .fb.is-open .fb-h { font-size: 21px; }
.t1-mosaic .fb.is-open .fb-s { display: block; }
.t1-mosaic .fb--wide { grid-column: 1 / -1; aspect-ratio: auto; min-height: 88px; }

/* H · hero + picture tabs */
.t1-heroset { display: grid; }
.t1-heroset > .fb { grid-area: 1 / 1; min-height: 248px; visibility: hidden; opacity: 0; transition: opacity .3s, visibility 0s .3s; }
.t1-heroset > .fb.is-on { visibility: visible; opacity: 1; transition: opacity .3s; }
.t1-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.t1-tabs .fb { aspect-ratio: 1 / 0.9; justify-content: flex-end; }
.t1-tabs .fb .fb-body { padding: 8px 9px 9px; }
.t1-tabs .fb .fb-h { font-family: var(--f-sans); font-size: 12.5px; font-weight: 600; line-height: 1.2; letter-spacing: 0; }
.t1-tabs .fb[aria-selected="true"] { outline: 2px solid var(--rv-plum); outline-offset: 2px; }
.t1-tabs .fb[aria-selected="true"]::after { content: ""; position: absolute; left: 9px; right: 9px; bottom: 5px; height: 2px; background: #fff; z-index: 3; }
.t1-swatchrow { margin-top: 6px; }
.t1-swatchrow .fb { min-height: 76px; flex-direction: row; align-items: center; justify-content: flex-start; }

/* I · fabric strips */
.t1-strips { display: flex; flex-direction: column; gap: 6px; }
.t1-strips .fb { min-height: 56px; justify-content: center; }
.t1-strips .fb.is-open { min-height: 248px; justify-content: space-between; }
.t1-strips .fb .fb-tag { margin: 8px 10px; padding: 6px 12px 7px; }
.t1-strips .fb .fb-tag .fb-h { font-family: var(--f-sans); font-size: 13px; font-weight: 600; }
.t1-strips .fb .fb-body--open { display: none; }
.t1-strips .fb.is-open .fb-body--open { display: flex; }
.t1-strips .fb .fb-layer { opacity: 0; }
.t1-strips .fb.is-open .fb-layer { opacity: 1; }
.t1-strips .fb.is-open .fb-tag { display: none; }

/* J · portrait rail */
.t1-rail { display: grid; grid-auto-flow: column; grid-auto-columns: 64%; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.t1-rail::-webkit-scrollbar { display: none; }
.t1-rail .fb { aspect-ratio: 4 / 5; scroll-snap-align: start; }
.t1-rail .fb .fb-h { font-size: 20px; }

/* treatments grid */
.t1-treat { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 16px; }
.t1-treat figure { margin: 0; background: var(--c-paper); border: 1px solid var(--c-line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.t1-treat figure.is-pick { border: 2px solid var(--c-pick); }
.t1-treat .stage { padding: 14px; background: #fff; }
.t1-treat .fb { aspect-ratio: 4 / 3.4; cursor: default; }
.t1-treat figcaption { padding: 12px 14px 14px; font-size: 13px; display: grid; gap: 6px; border-top: 1px solid var(--c-line); flex: 1; }
.t1-treat figcaption b { font-size: 14px; }

/* in context */
.ctx-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 24px; align-items: start; }
.ctx-col .frame { padding: 24px 20px; }
.ctx-col .frame-label { margin-top: 0; }

.no-anim, .no-anim * { transition: none !important; }

@media (prefers-reduced-motion: reduce) {
  .fb-img, .fb-layer, .t1-heroset > .fb { transition: none !important; }
  .fb:hover .fb-img { transform: none; }
}
@media (max-width: 1100px) { .t1-hero { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
@media (max-width: 700px) { .t1-hero h1 { font-size: 40px; } }

/* stretched hit area: the whole tile toggles, links inside stay clickable */
.fb-hit { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.fb-hit:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
.fb:has(.fb-hit:focus-visible) { outline: 2px solid var(--rv-plum); outline-offset: 2px; }
.fb-hit ~ .fb-body, .fb-hit ~ .fb-tag { z-index: 3; pointer-events: none; }
.fb-hit ~ .fb-body a { pointer-events: auto; }
.fb-cue { z-index: 3; pointer-events: none; }
.fb-panel, .fb-tag { position: relative; z-index: 3; display: flex; flex-direction: column; gap: 2px; }
.fb-tag .fb-s, .fb-tag .fb-k { color: #fff; }
.fb-tag .fb-h { font-size: 19px; }
div.fb-more { display: none; }
.fb.is-open div.fb-more { display: block; }
.t1-strips .fb.is-open .fb-more { display: block; }
.t1-rail .fb-s { font-size: 12.5px; }
.t1-surface--phone { padding: 0; }

/* text-anchored scrim: dark under the words, fades out --fade px above them */
.fb-body { --fade: 48px; }
.t1-tabs .fb-body { --fade: 26px; }
.fb[data-treat="scrim"] .fb-body::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--fade) * -1);
  z-index: -1; pointer-events: none;
  background: linear-gradient(to top, rgba(28,14,16,var(--a-base, .9)) 0, rgba(28,14,16,var(--a-mid, .74)) calc(100% - var(--fade)), rgba(28,14,16,0) 100%);
}
.audit .ok, .audit .bad, .audit .h { white-space: nowrap; }

/* ---------- in-context viewer (top of page) ---------- */
.ctx { padding-top: 40px; }
.ctx-head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 48px; align-items: end; margin-bottom: 20px; }
.ctx-head h1 { font-family: var(--f-serif); font-weight: 400; font-size: 48px; line-height: 1.02; letter-spacing: -0.015em; margin: 0; }
.ctx-head .back { font-family: var(--f-mono); font-size: 12px; color: var(--c-muted); text-decoration: none; display: inline-block; margin-bottom: 16px; }
.ctx-head .back:hover { color: var(--c-ink); }

.ctx-bar { position: sticky; top: 48px; z-index: 40; background: rgba(236, 232, 225, 0.96); padding: 12px 0 10px; margin-bottom: 16px; border-bottom: 1px solid var(--c-line); }
.ctx-toggle { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ctx-toggle label { position: relative; cursor: pointer; }
.ctx-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ctx-toggle span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-paper); font-size: 13px; font-weight: 500; color: var(--c-ink); white-space: nowrap; }
.ctx-toggle label.is-pick span { border-color: var(--c-pick); }
.ctx-toggle input:checked + span { background: var(--c-pick); border-color: var(--c-pick); color: #fff; }
.ctx-toggle input:focus-visible + span { outline: 2px solid var(--c-test); outline-offset: 2px; }
.ctx-toggle label:hover span { border-color: var(--c-ink); }
.ctx-desc { margin: 8px 2px 0; font-size: 13px; color: var(--c-muted); min-height: 1.5em; }
.ctx-desc b { color: var(--c-ink); font-weight: 600; }

.ctx-stage { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 32px; align-items: start; }
.ctx-deskwrap { min-width: 0; overflow-x: auto; }
.ctx-desk { position: relative; min-width: 900px; }
.ctx-pdp { grid-template-columns: 56px minmax(0, 1fr) 400px; gap: 0 20px; padding: 0 24px 40px; }
.ctx-pdp .rv-thumbs button { width: 56px; height: 64px; }
.ctx-buy { position: static; }
.ctx-buy .rv-title, .m-buy .rv-title { margin: 0; }
.ctx-ugc { padding: 16px 0; border-top: 1px solid var(--rv-line); }
.ctx-ugc p { margin: 0 0 8px; font-size: 13px; }
.t1-slot .t1-variant { padding: 18px 0 16px; }
.t1-slot .t1-col { max-width: none; }

.fold { position: absolute; left: 0; right: 0; top: 900px; height: 0; border-top: 2px dashed var(--c-test); z-index: 30; pointer-events: none; }
.fold span { position: absolute; right: 10px; top: -24px; font-family: var(--f-mono); font-size: 11px; color: #fff; background: var(--c-test); padding: 3px 8px; border-radius: 3px; }

.ctx-read { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; font-family: var(--f-mono); font-size: 11.5px; min-height: 26px; }
.ctx-read .lab { font-weight: 600; color: var(--c-ink); margin-right: 4px; }
.ctx-read > span:not(.lab):not(.audit):not(:empty) { color: var(--c-muted); border: 1px solid var(--c-line); background: #fff; padding: 2px 7px; border-radius: 4px; white-space: nowrap; }
.ctx-read .audit { display: inline-flex; gap: 6px; }

.ctx-mobwrap .phone { margin: 0; }
.ctx-mob { height: 760px; }
.ctx-mob .m-slide { aspect-ratio: 4 / 5; }
.ctx-note { font-size: 12px; color: var(--c-muted); margin: 10px 4px 0; }

@media (max-width: 1100px) {
  .ctx-head { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ctx-stage { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .ctx-head h1 { font-size: 36px; }
  .ctx-bar { top: 0; }
}
.fold span { left: 10px; right: auto; }
@media (max-width: 700px) { .book-bar { position: static; } }

/* ---------- laptop frame: the live page at 1440 px, scaled to fit ----------
   Measurements taken from revivalrugs.com at 1440 × 900 (6 Oct 2026):
   content column 1186 = thumbs 90 + 30 + gallery 655 + 30 + buy box 381 */
.ctx-deskrow { margin-bottom: 40px; }
.ctx-scale { position: relative; overflow: hidden; }
.ctx-page { position: absolute; top: 0; left: 0; width: 1440px; transform-origin: 0 0; background: #fff; }
.lp-promo { height: 36px; display: flex; align-items: center; justify-content: space-between; padding: 0 64px; background: var(--rv-cream); font-size: 16px; }
.lp-head { height: 76px; display: flex; align-items: center; gap: 36px; padding: 0 64px; border-bottom: 1px solid var(--rv-line); }
.lp-head .rv-logo { font-size: 34px; width: 98px; }
.lp-head ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; font-size: 16px; }
.lp-head .icons { margin-left: auto; display: flex; gap: 20px; }
.lp-crumb { width: 1186px; margin: 24px auto 0; font-size: 12px; line-height: 16px; color: var(--rv-muted); }
.lp-pdp { width: 1186px; margin: 12px auto 0; display: grid; grid-template-columns: 90px 655px 381px; column-gap: 30px; align-items: start; padding-bottom: 80px; }
.lp-thumbs { padding-top: 29px; display: flex; flex-direction: column; gap: 21px; }
.lp-thumbs img { width: 90px; height: 113px; object-fit: cover; }
.lp-thumbs img.is-on { outline: 1px solid var(--rv-plum); outline-offset: 2px; }
.lp-gallery { padding-top: 24px; display: flex; flex-direction: column; gap: 24px; }
.lp-gallery .rv-media { width: 655px; height: 818px; }
.lp-buy { width: 381px; }
.lp-buy p { margin: 0; }
.lp-title { font-family: var(--f-serif); font-weight: 400; font-size: 32px; line-height: 38px; color: var(--rv-plum); }
.lp-pricerow { display: flex; justify-content: space-between; align-items: center; height: 32px; margin-top: 8px; }
.lp-price { font-size: 24px; }
.lp-rev { display: inline-flex; gap: 8px; align-items: center; font-size: 12px; }
.lp-rev .s { display: inline-flex; gap: 1px; }
.lp-buy .lp-sale { margin-top: 4px; font-size: 14px; font-weight: 600; line-height: 17px; }
.lp-buy .lp-desc { margin-top: 31px; font-size: 14px; line-height: 22.5px; }
.lp-lbl { display: flex; justify-content: space-between; font-size: 12px; line-height: 16px; }
.lp-buy .lp-lbl--color { margin-top: 36px; }
.lp-buy .lp-lbl--size { margin-top: 26px; }
.lp-buy .lp-lbl--pad { margin-top: 31px; }
.lp-sw { display: flex; gap: 12px; margin-top: 16px; }
.lp-sw span { width: 32px; height: 32px; border-radius: 50%; background-size: cover; background-position: center; box-shadow: 0 0 0 1px var(--rv-line); }
.lp-sw span.is-on { outline: 1px solid var(--rv-plum); outline-offset: 3px; }
.lp-select { margin-top: 12px; height: 49px; border: 1px solid var(--rv-plum); display: flex; align-items: center; justify-content: space-between; padding: 0 13px; font-size: 15px; font-weight: 300; }
.caret { width: 10px; height: 6px; background: var(--rv-ink); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.caret.up { transform: rotate(180deg); }
.lp-pads { margin-top: 16px; display: grid; grid-template-columns: repeat(2, 183px); gap: 15px; }
.lp-pads span { height: 46px; border: 1px solid #EDE7D9; display: flex; align-items: center; gap: 10px; padding: 0 12px; font-size: 12px; }
.lp-pads i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid #BDB5AC; flex: none; }
.lp-pads b { margin-left: auto; font-weight: 400; }
.lp-atc { margin-top: 16px; height: 68px; background: var(--rv-plum); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 600; }
.lp-buy .lp-ship { text-align: center; font-size: 16px; font-weight: 300; line-height: 32px; }
.lp-buy .lp-ship:first-of-type { margin-top: 20px; }
.lp-atc + .lp-ship { margin-top: 20px; }
.lp-trust { margin-top: 16px; height: 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); font-size: 14px; line-height: 20px; }
.lp-trust > div { display: flex; align-items: center; gap: 12px; }
.lp-acc { border-top: 1px solid #E5E7EB; }
.lp-acc--last { border-bottom: 1px solid #E5E7EB; }
.lp-acc--open { margin-top: 32px; padding-bottom: 23px; }
.lp-accrow { height: 61px; display: flex; align-items: center; justify-content: space-between; font-size: 18px; line-height: 28px; }
.lp-ugc { margin-top: 13px; display: grid; grid-auto-flow: column; grid-auto-columns: 98px; gap: 8px; overflow: hidden; }
.lp-ugc img { width: 98px; height: 150px; object-fit: cover; }
.lp-buy .t1-variant { padding-top: 32px; }
.lp-buy .t1-variant + .lp-acc--open { margin-top: 32px; }

.ctx-mobrow { display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 48px; align-items: start; }
.ctx-mobnotes { padding-top: 8px; max-width: 560px; }
.ctx-mobnotes .ctx-note { font-size: 14px; color: var(--c-muted); margin: 12px 0 0; }
@media (max-width: 800px) { .ctx-mobrow { grid-template-columns: minmax(0, 1fr); } }

/* ---------- live scroll behaviour (measured 6 Oct 2026) ----------
   laptop: promo + header pinned (112 px); thumbnail rail sticky at top 40 px;
   buy box sticky with top = viewport height - its own height (pins by its bottom edge) */
.ctx-page.is-screen { height: 900px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.ctx-page.is-screen .fold { display: none; }
.lp-top { position: sticky; top: 0; z-index: 20; background: #fff; }
.lp-thumbs { position: sticky; top: 40px; align-self: start; }
.lp-buy { position: sticky; align-self: start; }
.ctx-page:focus-visible, .ctx-mob:focus-visible { outline: 3px solid var(--c-test); outline-offset: -3px; }

/* swatch offer placements, switched by data-swatch on the section */
.sw-opt { display: none; }
.ctx[data-swatch="link"] .sw-link { display: inline; }
.ctx[data-swatch="chip"] .sw-chip { display: inline-flex; }
.ctx[data-swatch="under"] .sw-under { display: grid; }
.sw-link { font-size: 12px; color: var(--rv-ink); text-decoration: underline; text-underline-offset: 2px; }
.sw-chip { align-items: center; height: 32px; padding: 0 12px; border: 1px dashed #A99F95; border-radius: 999px; font-size: 12px; color: var(--rv-ink); text-decoration: none; background: #fff; }
.sw-under { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: center; margin-top: 14px; padding: 8px 10px; background: var(--rv-cream); text-decoration: none; color: var(--rv-ink); font-size: 12px; line-height: 1.4; }
.sw-under img { width: 40px; height: 40px; object-fit: cover; }
.sw-under b { font-weight: 600; }

/* toggles: secondary groups */
.ctx-sub { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 10px; }
.ctx-toggle--sm { align-items: center; }
.ctx-toggle--sm legend { float: left; font-family: var(--f-mono); font-size: 11px; color: var(--c-muted); text-transform: uppercase; letter-spacing: .04em; margin-right: 10px; padding: 0; line-height: 32px; }
.ctx-toggle--sm span { min-height: 32px; font-size: 12px; padding: 0 12px; }

/* ---------- phone: live 390 × 844 measurements ---------- */
.ctx-mobrow { grid-template-columns: 414px minmax(0, 1fr); }
.ctx-phone { width: 414px; padding: 12px; }
.phone-screen { position: relative; width: 390px; height: 844px; border-radius: 26px; overflow: hidden; background: #fff; }
.ctx-mob.mock-viewport { height: 844px; width: 390px; border-radius: 0; overscroll-behavior: contain; }
.mp-top { position: sticky; top: 0; z-index: 20; background: #fff; }
.mp-promo { height: 36px; display: flex; justify-content: center; gap: 24px; align-items: center; background: var(--rv-cream); font-size: 12px; }
.mp-head { height: 59px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--rv-line); }
.mp-head .rv-logo { font-size: 26px; }
.mp-head .icons { display: flex; gap: 14px; align-items: center; }
.ctx-mob p { margin: 0; }
.ctx-mob .mp-crumb { margin-top: 24px; padding: 0 16px; font-size: 12px; line-height: 16px; color: var(--rv-muted); white-space: nowrap; overflow: hidden; }
.ctx-mob .mp-title { padding: 0 16px; font-family: var(--f-serif); font-size: 18px; line-height: 24px; color: var(--rv-plum); max-width: 250px; }
.ctx-mob .mp-price { margin-top: 4px; padding: 0 16px; font-size: 17.6px; line-height: 24px; }
.ctx-mob .mp-sale { margin-top: 4px; padding: 0 16px; font-size: 12px; line-height: 14px; }
.ctx-mob .mp-rev { margin-top: 10px; padding: 0 16px; font-size: 12px; line-height: 16px; display: flex; gap: 6px; align-items: center; }
.mp-rev .s { display: inline-flex; gap: 1px; }
.mp-gal { position: relative; margin-top: 13px; width: 390px; height: 488px; background: var(--rv-sand); }
.mp-gal img { width: 100%; height: 100%; object-fit: cover; }
.ctx-mob .mp-vir { margin-top: 16px; padding: 0 16px; text-align: right; font-size: 11px; font-weight: 600; }
.mp-buy { padding: 0 24px 40px; }
.mp-lbl { display: flex; justify-content: space-between; font-size: 12px; line-height: 16px; }
.ctx-mob .mp-lbl--color { margin-top: 33px; }
.ctx-mob .mp-lbl--size { margin-top: 30px; }
.ctx-mob .mp-lbl--pad { margin-top: 27px; }
.mp-sw { display: flex; gap: 20px; margin-top: 12px; align-items: center; }
.mp-sw > span { width: 30px; height: 30px; border-radius: 50%; background-size: cover; background-position: center; box-shadow: 0 0 0 1px var(--rv-line); }
.mp-sw > span.is-on { outline: 1px solid var(--rv-plum); outline-offset: 3px; }
.mp-select { margin-top: 8px; }
.mp-pads { margin-top: 9px; display: grid; gap: 16px; }
.mp-pads span { height: 46px; border: 1px solid #EDE7D9; display: flex; align-items: center; gap: 10px; padding: 0 12px; font-size: 12px; }
.mp-pads i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid #BDB5AC; }
.mp-pads b { margin-left: auto; font-weight: 400; }
.mp-atc { margin-top: 7px; }
.ctx-mob .mp-ship { text-align: center; font-size: 16px; font-weight: 300; line-height: 32px; }
.mp-atc + .mp-ship { margin-top: 20px; }
.mp-trust { margin-top: 35px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); font-size: 10px; line-height: 12.5px; }
.mp-trust > div { display: flex; align-items: center; gap: 10px; }
.ctx-mob .mp-desc { margin-top: 34px; font-size: 12px; line-height: 20px; }
.mp-acc { border-top: 1px solid #E5E7EB; }
.mp-acc--last { border-bottom: 1px solid #E5E7EB; }
.mp-acc--open { margin-top: 32px; padding-bottom: 23px; }
.mp-accrow { height: 57px; display: flex; align-items: center; justify-content: space-between; font-size: 16px; line-height: 24px; }
.mp-ugc { grid-auto-columns: 98px; gap: 14px; margin-top: 13px; overflow: hidden; margin-right: -24px; }
.mp-buy .t1-variant { padding-top: 32px; }
.mp-sticky { position: absolute; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--rv-line); padding: 10px 16px 14px; box-shadow: 0 -6px 20px rgba(0,0,0,0.08); transform: translateY(105%); transition: transform .25s ease; }
.mp-sticky.is-on { transform: translateY(0); }
.mp-sticky .row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 13px; }
.mp-sticky img { width: 60px; height: 50px; object-fit: cover; }
.mp-sticky .sz { display: grid; }
.mp-sticky .sz b { font-weight: 600; }
.mp-sticky u { margin-left: auto; font-size: 12px; }
.mp-sticky .lp-atc { height: 56px; margin: 0; }
@media (prefers-reduced-motion: reduce) { .mp-sticky { transition: none; } }
@media (max-width: 860px) { .ctx-mobrow { grid-template-columns: minmax(0, 1fr); } }
.ctx-read > span.r-pin.is-ok { color: #1D5B3A; border-color: #A9C9B4; background: #EEF5F0; }
.ctx-read > span.r-pin.is-warn { color: #8A2B1E; border-color: #E2B3AA; background: #FBEDEA; }
/* row heights include their 1px top rule: 61 px laptop, 57 px phone (live) */
.lp-accrow { height: 60px; }
.mp-accrow { height: 56px; }
.lp-acc--last, .mp-acc--last { border-bottom: 0; }
.mp-trust { height: 41px; align-items: center; }

/* ---------- desktop sticky Add to Cart (three placements) ---------- */
.lp-stk { opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility 0s .2s; }
.lp-stk.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .2s; }
.lp-stk .btn { background: var(--rv-plum); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 600; }
.ctx:not([data-stk="top"]) .lp-stk--top, .ctx:not([data-stk="col"]) .lp-stk--col, .ctx:not([data-stk="bot"]) .lp-stk--bot { display: none; }
.ctx-page:not(.is-screen) .lp-stk { display: none; }

/* bar under the header: rides on the pinned header */
.lp-top { position: sticky; }
.lp-stk--top { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--rv-line); box-shadow: 0 8px 20px rgba(0,0,0,0.06); transform: translateY(-8px); }
.lp-stk .in { width: 1186px; margin: 0 auto; height: 72px; display: flex; align-items: center; gap: 16px; }
.lp-stk .in img { width: 48px; height: 56px; object-fit: cover; }
.lp-stk .nm { display: grid; gap: 2px; font-size: 13px; }
.lp-stk .nm b { font-family: var(--f-serif); font-weight: 400; font-size: 19px; color: var(--rv-plum); }
.lp-stk .pr { margin-left: auto; font-size: 18px; }
.lp-stk .in .btn { width: 381px; height: 48px; }

/* bar at the bottom: same content, like the mobile bar that won */
.lp-botpin { position: sticky; bottom: 0; height: 0; z-index: 25; }
.lp-stk--bot { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--rv-line); box-shadow: 0 -8px 20px rgba(0,0,0,0.06); transform: translateY(8px); }

/* pinned in the buy column: sticks under the header inside the column */
.lp-colpin { position: sticky; top: 112px; height: 0; z-index: 15; }
.lp-stk--col { position: absolute; left: -12px; right: -12px; top: 0; padding: 12px; background: #fff; border-bottom: 1px solid var(--rv-line); box-shadow: 0 10px 18px -10px rgba(0,0,0,0.18); display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; transform: translateY(-6px); }
.lp-stk--col .sz { height: 49px; border: 1px solid var(--rv-plum); display: flex; align-items: center; justify-content: space-between; padding: 0 12px; font-size: 14px; font-weight: 300; background: #fff; }
.lp-stk--col .btn { height: 49px; }

.ctx-jump { display: flex; align-items: center; gap: 6px; }
.ctx-jump span { font-family: var(--f-mono); font-size: 11px; color: var(--c-muted); text-transform: uppercase; letter-spacing: .04em; margin-right: 4px; }
.ctx-jump button { min-height: 32px; padding: 0 12px; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-paper); font-size: 12px; cursor: pointer; }
.ctx-jump button:hover { border-color: var(--c-ink); }
@media (prefers-reduced-motion: reduce) { .lp-stk, .lp-stk.is-on { transition: none; transform: none; } }
.ctx-bar { position: relative; top: auto; }
