/* Apartment page order (apartment-page.mjs). Photos, name, price, how the rent compares, details, similar places, floor plans. */
html main.ap-page.ap-page.ap-page.ap-page.ap-page>*{order:0!important}
.ap-page .ap-sub{margin:4px 0 0;color:var(--ds3-muted,#6b6b6b);font-size:13px;font-weight:400;line-height:1.4;letter-spacing:0}

/* v2 pages (Lubbock, San Marcos, UT Austin) */
.ap-v2 .ap-head{margin-top:16px}
.ap-v2 .ap-head h1{margin-bottom:0}
.ap-v2 .ap-card-opening{position:static!important;top:auto!important;transform:none!important}
.ap-v2 section.v2-costcard.ap-card{position:static;top:auto;width:auto;max-width:none;margin:16px 0 8px;display:block}
.ap-v2 section.v2-costcard.ap-card .v2-cc-actions{display:flex;justify-content:flex-start}
.ap-v2 .ap-grid{display:block!important;grid-template-columns:none!important}
.ap-v2 .ap-grid>.v2-prop-main{max-width:720px;min-width:0}
.ap-v2 .ap-rentfig{margin-top:32px}
.ap-v2 .ap-plans-list{margin-top:40px}
.ap-v2 .ap-plans-list .v2-chiprow{display:none}
@media (max-width:759px){html main.ap-page.ap-v2 .ap-card.ap-card{margin-inline:16px}}

/* pilot pages (Denton, Storrs, Westwood, West Lafayette, Urbana-Champaign, Orlando) */
.ap-pilot .ap-crumbs{padding-bottom:0}
.ap-pilot .ap-crumbs .ds3-crumbs{margin:0}
.ap-pilot .ap-top{display:block!important;padding-top:.75rem}
.ap-pilot .ap-top header{margin-block:0}
.ap-pilot .ap-top .ds3-page-title p{margin-top:4px}
html.ds3 main.ap-pilot .gm-building-shell.ap-top>.fg-residence-lead.ap-card,.ap-pilot .ap-top .ap-card{max-width:640px;margin:16px 0 8px;grid-column:auto;grid-row:auto;position:static}
.ap-pilot .ap-more{padding-top:0}
.ap-pilot .ap-more .rt-section{margin-inline:0;max-width:760px}
html.ds3 main.ap-pilot .ap-more .fg-related.fg-related{margin-top:32px}
.ap-pilot .ap-facts{padding-top:1rem}
.ap-pilot .ap-plans{margin-top:1.5rem}

/* photos first: a hero grid on desktop, a swipe row on phones */
.ap-photos{display:flex;flex-direction:column;padding-top:.75rem}
.ap-photos .gm-preview{order:-1}
.ap-photos .gm-heading{display:flex;align-items:center;justify-content:flex-start;gap:12px;margin:10px 0 0}
.ap-photos .gm-heading h2{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.ap-photos .gm-credit{margin-top:6px}
.ap-photos .gm-preview figure{margin:0}
.ap-photos .gm-preview a{display:block;height:100%}
.ap-photos .gm-preview img{border-radius:0}
@media (min-width:760px){
  .ap-photos .gm-preview{display:grid;grid-template-columns:2fr 1fr;grid-template-rows:repeat(2,minmax(0,1fr));gap:8px;height:clamp(300px,34vw,460px);border-radius:14px;overflow:hidden}
  .ap-photos .gm-preview figure{min-height:0;overflow:hidden}
  .ap-photos .gm-preview figure:first-child{grid-row:1 / 3}
  .ap-photos .gm-preview figure:nth-child(n+4){display:none}
  .ap-photos .gm-preview img{width:100%;height:100%;aspect-ratio:auto;object-fit:cover}
  .ap-photos .gm-preview:has(>figure:only-child){grid-template-columns:minmax(0,1fr);grid-template-rows:1fr}
  .ap-photos .gm-preview:has(>figure:nth-child(2):last-child){grid-template-columns:1fr 1fr;grid-template-rows:1fr}
  .ap-photos .gm-preview:has(>figure:nth-child(2):last-child) figure:first-child{grid-row:auto}
}
@media (max-width:759px){
  .ap-photos .gm-preview{display:flex;gap:6px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;border-radius:12px}
  .ap-photos .gm-preview::-webkit-scrollbar{display:none}
  .ap-photos .gm-preview figure{flex:0 0 86%;scroll-snap-align:start}
  .ap-photos .gm-preview figure:only-child{flex-basis:100%}
  .ap-photos .gm-preview img{width:100%;height:auto;aspect-ratio:4 / 3;object-fit:cover}
}

/* College Station */
.ap-cs .ap-head{margin-top:12px}
.ap-cs .ap-card{margin:8px 0 24px;padding:18px 20px;border:1px solid #e3e3e3;border-radius:12px;background:#fff}
.ap-cs .ap-card h2{margin:4px 0 0}
.ap-cs .ap-card .ds3-address{margin:0;color:#6b6b6b;font-size:14px}
.ap-cs .ap-grid>.ds3-listing-detail>.actions{margin-top:32px}
.ap-cs .ap-plans-list{margin-top:32px}

.ap-photos:has([data-gm-open]:not([hidden])) .gm-all-photos{display:none}
.ap-v2 .ap-photos{width:auto;margin-inline:0;padding-inline:0}
.ap-pilot dd ul:has(>li:nth-child(9)){columns:2;column-gap:20px;font-size:14px}
@media (max-width:759px){main.ap-v2>.guide-community-booking{padding-inline:20px}}
.ap-pilot .ap-card-made{display:block;max-width:640px;margin:16px 0 8px;padding:16px 20px;border:1px solid #e3e3e3;border-radius:12px;background:#fff}
.ap-pilot .ap-card-made p{margin:0;font-size:15px;color:#6b6b6b}
.ap-pilot .ap-card-made strong{font-size:24px;font-weight:700;color:#1f1f1f;letter-spacing:-.02em;margin-right:4px}
.ap-pilot .ap-fees{margin:8px 0 16px;padding:12px 16px;border-radius:10px;background:#f6f6f4;font-size:14px}
.ap-pilot .ap-fees>p{margin:0 0 4px;font-weight:600}
.ap-pilot .ap-fees ul{margin:0;padding-left:18px}

/* round 2: the price leads the page, with its rent history as a sparkline beside it */
html main.ap-page .ap-card .lp-offer-price strong,html main.ap-page .ap-card .v2-cc-price strong,html main.ap-page .ap-card .ds3-price strong,html main.ap-page .ap-card .fg-residence-lead-price strong{font-size:clamp(30px,3.2vw,40px)!important;line-height:1.1!important;font-weight:700;letter-spacing:-.02em}
.ap-page .ap-card .lp-offer-price,.ap-page .ap-card .v2-cc-price,.ap-page .ap-card .ds3-price{margin-bottom:2px}
.ap-spark{display:inline-flex;align-items:center;gap:10px;margin:4px 0 6px;color:#1f1f1f;text-decoration:none;font-size:14px;line-height:1.3}
.ap-spark-svg{display:block;flex:none;width:104px;height:26px;overflow:visible}
.ap-spark-svg .rt-sl{fill:none;stroke:currentColor;stroke-dasharray:none!important;opacity:1!important;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke}
.ap-spark-svg .rt-p0{fill:#a3a3a3}
.ap-spark-svg .rt-p1{fill:currentColor}
.ap-spark-t b{font-weight:700;white-space:nowrap}
.ap-spark-t span{color:#6b6b6b}
.ap-spark:hover .ap-spark-t span,.ap-spark:focus-visible .ap-spark-t span{text-decoration:underline}
.ap-v2 section.v2-costcard.ap-card{max-width:720px}

/* round 3: how this place compares, as chips under the price (from the finder) */
.ap-chips{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0 4px}
.ap-chips span{display:inline-block;padding:4px 10px;border-radius:999px;background:#f1f1ef;color:#2b2b2b;font-size:13px;line-height:1.3}

/* round 3 (St Abby "pop-up"): the price card is not a box; price and Save share one row, the caveat is one muted line */
html main.ap-page .ap-card.ap-card,html main.ap-page .ap-card .ds3-card{border:0!important;box-shadow:none!important;background:none!important;border-radius:0!important;padding:0!important}
html main.ap-page .ap-card.ap-card{margin:14px 0 6px!important}
html main.ap-page .ap-card .lp-opening-content{display:flex!important;flex-direction:row!important;align-items:flex-start;justify-content:space-between;gap:12px;padding:0!important}
html main.ap-page .ap-card .lp-offer-summary{min-width:0;flex:1}
html main.ap-page .ap-card .lp-offer-price{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:8px;margin:0}
html main.ap-page .ap-card .lp-offer-price span{font-size:15px;color:#55585a;white-space:nowrap}
html main.ap-page .ap-card .lp-offer-missing,html main.ap-page .ap-card .v2-cc-missing{margin:4px 0 0;font-size:13px;line-height:1.4;color:#6b6b6b}
html main.ap-page .ap-card .lp-offer-actions{flex:none;margin:0!important;padding:0!important}
html main.ap-page .ap-card .lp-offer-actions .v2-chiprow{display:flex;gap:8px;margin:0;flex-wrap:nowrap}
html main.ap-page .ap-card .lp-offer-actions .ds3-secondary{min-height:36px;padding:6px 14px!important;font-size:14px;border-radius:999px!important}
@media (max-width:759px){
  html main.ap-page .ap-card .lp-offer-price strong,html main.ap-page .ap-card .ds3-price strong,html main.ap-page .ap-card .fg-residence-lead-price strong{font-size:30px!important}
  html main.ap-page.ap-v2 .ap-card.ap-card{margin-inline:16px!important}
}
