/* Phone and tablet layouts for the portfolio pages. Loaded last. Work is never cropped: every media box keeps object-fit: contain. */

/* ---------- Tablet (600–1024) ---------- */
@media (max-width:1024px){
  /* Landing: short form and long form stack picture over copy, two across */
  .lengths{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--phx-space-5)}
  .len{grid-template-columns:1fr;gap:var(--phx-space-3)}
  .len .media{width:min(100%,260px)}
  .len h4 br{display:none}
  /* Landing: messaging territories read as one column so the proof panel is not squeezed */
  .vp{grid-template-columns:1fr;gap:var(--phx-space-5)}
  /* Landing: other work at a size where each piece is legible */
  .other{grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--phx-space-4)}
  /* Andie + Brands: rows of work fill the measure instead of sitting as small tiles at the left */
  .sys-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--phx-space-3);align-items:end}
  .sys-row figure,.sys-row .r11,.sys-row .r916{width:auto!important;flex:none!important;min-width:0}
  .sys-row figure .media{width:100%}
  .sys-row figure:only-child{grid-column:1 / span 2}
  .gal-masonry{columns:3}
  .feed-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--phx-space-4)}
  .feed-row figure{width:auto}
}

/* Landing sizing exhibit: both frames share one height and fill the width */
@media (max-width:820px){
  .sizing{display:grid!important;grid-template-columns:.5625fr .8fr;gap:var(--phx-space-4);align-items:end;max-width:560px}
  .sizing .sz{flex:none!important;width:auto!important;min-width:0}
  .sizing .sz .media{width:100%}
  .pair-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* ---------- Phone (≤599) ---------- */
@media (max-width:599px){
  /* Landing strategy cards: work fills the card, centred, letterboxed */
  .ch .media{max-width:min(100%,300px)!important;margin-inline:auto}
  .lengths{grid-template-columns:1fr}
  .len{grid-template-columns:minmax(0,.9fr) minmax(0,1fr);gap:var(--phx-space-4);align-items:start}
  .len .media{width:100%}
  .other{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--phx-space-3)}
  .pair-grid{grid-template-columns:1fr}
  .sizing{max-width:none}
  /* Andie + Brands */
  .sys-row{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sys-row figure:only-child{grid-column:1 / -1;max-width:260px;width:100%!important;justify-self:start}
  .sys-row figure:only-child .media{width:100%}
  .gal-masonry{columns:2;column-gap:var(--phx-space-2)}
  .gal-masonry .ad{margin-bottom:var(--phx-space-2)}
  .feed-row{grid-template-columns:minmax(0,1fr);justify-items:center}
  .feed-row figure{width:min(100%,300px)}
}

/* Google Sheets recreations: the row labels stay pinned while the weeks scroll sideways */
@media (max-width:1024px){
  .gs-scroll{overscroll-behavior-x:contain;scroll-snap-type:x proximity}
  .gs-scroll .gs-rn{position:sticky;left:0;z-index:2;background-color:var(--gs-head)}
  .gs-road .gs-t tr>:nth-child(2){position:sticky;left:34px;z-index:2;box-shadow:6px 0 8px -6px rgba(0,0,0,.25)}
  .gs-road .gs-t tr>:nth-child(2):not([class]):not([style]){background-color:#fff}
  .gs-road .gs-cols tr>:nth-child(2),.gs-road .gs-cols>:nth-child(2){background-color:var(--gs-head)}
}

/* Landing territory proof panel: label over its proof on phones */
@media (max-width:599px){
  .chain dl{grid-template-columns:minmax(0,1fr);gap:2px 0}.chain dt:not(:first-child){margin-top:10px}
  .chain dd{margin:0}
}

/* Brands galleries: two across on phones so a season reads as a set */
@media (max-width:599px){
  .grid-sq,.grid-up,.grid-mix{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--phx-space-2)}
}

/* Strategy deck: full slides where their text stays legible (>=14px needs >=1200px slide width); the responsive HTML version below that */
.deck-exhibits{display:none}
@media (min-width:1360px){
 .deck-exhibits{display:grid;gap:var(--phx-space-6)}
 .deck-exhibits figure{margin:0;aspect-ratio:16/9;border-radius:12px;overflow:hidden;box-shadow:0 1px 0 rgba(0,0,0,.06),0 12px 40px rgba(0,0,0,.08)}
 .deck-exhibits img{width:100%;height:100%;object-fit:contain;display:block}
 .deck-exhibits + .slides.landing{display:none}
}

/* Sales range: 12 square pieces, even grid at every width (4 / 3 / 2 across) */
.us-range{columns:auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--phx-space-3)}
.us-range figure{margin:0}
.us-range .media.natural{aspect-ratio:1/1;display:block}
.us-range .media.natural img{width:100%;height:100%;object-fit:contain}
@media (max-width:1023px){.us-range{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:599px){.us-range{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Andie strategy deck: same behaviour as Landing */
.deck-exhibits + .slides.andie{display:block}
@media (min-width:1360px){.deck-exhibits + .slides.andie{display:none}}

/* How I run the work */
#ops .ops-block{margin-top:var(--phx-space-7)}
#ops .ops-text{max-width:var(--phx-size-measure);margin-bottom:var(--phx-space-4)}
#ops .ops-text p{text-wrap:pretty}
#ops .gs.tc{font-size:14px}
#ops .tc .gs-t{min-width:1240px}
#ops .tc .gs-t td{text-align:left;white-space:nowrap}
#ops .tc .gs-t td.tc-copy{white-space:normal;min-width:300px;font-style:italic}
#ops .tc .gs-cols th,#ops .tc .gs-rn{font-size:14px}
#ops .tc-head td{font-weight:700;color:#fff;white-space:normal!important;vertical-align:bottom;padding:10px 8px}
#ops .tc-head td.p{background:#5B21B6}
#ops .tc-head td.o{background:#B45309}
#ops .tc-core{background:#EDEDED}
#ops .tc-pill{display:inline-block;border-radius:10px;padding:1px 10px;min-width:96px}
#ops .tc-pill.it{background:#CFE2F3;color:#0B3D6B}
#ops .tc-pill.nw{background:#FCE8B2;color:#5C4400}
#ops .tc-ch{display:inline-block;border-radius:10px;padding:1px 10px;min-width:96px;color:#fff}
#ops .tc-ch.fb{background:#1F4E8C}
#ops .tc-ch.tt{background:#4C2A85}
#ops .tc .gs-tab{font-size:14px}
#ops .nm{display:grid;gap:var(--phx-space-4)}
#ops .nm-anat{display:flex;flex-wrap:wrap;align-items:flex-start;gap:6px 2px;background:#fff;border-radius:var(--phx-radius-media);padding:var(--phx-space-4)}
#ops .nm-part{display:inline-flex;flex-direction:column;align-items:center;gap:6px}
#ops .nm-part b{font:600 clamp(16px,2vw,24px)/1.2 ui-monospace,Menlo,monospace;background:#E9E3DA;border-radius:6px;padding:6px 10px;color:#1E1B18}
#ops .nm-part i{font-style:normal;font-family:var(--phx-font-family-display);text-transform:uppercase;letter-spacing:var(--phx-font-tracking-caps-small);font-size:14px;font-weight:700;color:var(--phx-color-text-body)}
#ops .nm-sep{font:600 clamp(16px,2vw,24px)/1.2 ui-monospace,Menlo,monospace;padding-top:6px;color:var(--phx-color-text-body)}
#ops .nm-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--phx-space-3)}
#ops .nm-ex{background:#fff;border-radius:var(--phx-radius-media);padding:var(--phx-space-3) var(--phx-space-4)}
#ops .nm-ex code{display:block;font:600 14px/1.4 ui-monospace,Menlo,monospace;word-break:break-all;color:var(--phx-color-text-primary)}
#ops .nm-ex p{margin:8px 0 0;font-size:15px}
#ops .flow{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--phx-space-3);counter-reset:f}
#ops .flow li{background:#fff;border-radius:var(--phx-radius-media);padding:var(--phx-space-4);counter-increment:f}
#ops .flow li b{display:block;font-family:var(--phx-font-family-display);text-transform:uppercase;letter-spacing:var(--phx-font-tracking-caps-small);font-size:16px}
#ops .flow li b:before{content:counter(f,decimal-leading-zero) "  ";color:var(--phx-color-text-body)}
#ops .flow li p{margin:8px 0 0;font-size:15px}
#ops .ops-two{display:grid;grid-template-columns:1fr 1fr;gap:var(--phx-space-6)}
#ops .qa{margin:0;padding:0;list-style:none;display:grid;gap:10px}
#ops .qa li{padding-left:30px;position:relative}
#ops .qa li:before{content:"";position:absolute;left:0;top:.2em;width:18px;height:18px;border-radius:4px;background:var(--phx-color-agave)}
#ops .qa li:after{content:"";position:absolute;left:5px;top:.42em;width:8px;height:4px;border-left:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(-45deg)}
#ops .ho-list{display:grid;gap:var(--phx-space-3)}
#ops .ho{background:#fff;border-radius:var(--phx-radius-media);padding:var(--phx-space-4)}
#ops .ho p{margin:8px 0 0}
@media (max-width:1023px){#ops .nm-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#ops .flow{grid-template-columns:repeat(2,minmax(0,1fr))}#ops .ops-two{grid-template-columns:1fr}}
@media (max-width:599px){#ops .nm-grid{grid-template-columns:1fr}#ops .flow{grid-template-columns:1fr}}

#ops .ho-k{font-family:var(--phx-font-family-display);text-transform:uppercase;letter-spacing:var(--phx-font-tracking-caps-small);font-size:16px}
#ops .flow li b{font-size:17px}#ops .flow li p,#ops .nm-ex p{font-size:16px}
#ops .tc-head td.c1{background:#5B21B6}

/* Responsive pass 11-23: the reel caption wraps instead of being cut off */
.phx .chap,.phx-chap{white-space:normal;overflow:visible;text-overflow:clip;text-wrap:balance}
