/* Kettle & Key v2 · listings: tiles, editorial grid, board tags, rows, map pins */
.tile { position: relative; display: flex; flex-direction: column; min-width: 0; }
.tile .ph { position: relative; overflow: hidden; background: var(--mist-2); aspect-ratio: var(--ar, 4 / 3); }
.tile .ph picture, .tile .ph img { width: 100%; height: 100%; object-fit: cover; }
.tile .ph img { transition: transform .9s var(--ease); }
.tile:hover .ph img { transform: scale(1.035); }
.tile a.cover { position: absolute; inset: 0; z-index: 2; }
.tile a.cover:focus-visible { outline-offset: -3px; box-shadow: inset 0 0 0 6px var(--board); }
.tile .body { padding: 16px 0 0; display: grid; gap: 6px; }
.tile .body > *, .mrow p, .row p { margin: 0; }
.tile .price { font-size: clamp(24px, 2.1vw, 32px); font-weight: 700; font-stretch: 86%; letter-spacing: -.025em; line-height: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.tile .price .q { font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--slate); order: -1; flex-basis: 100%; }
.tile .price s { font-size: 16px; font-weight: 500; color: var(--slate); }
.tile .price .pw { font: 500 14px var(--mono); color: var(--slate); }
.tile .addr { font-size: 17px; font-weight: 500; }
.tile .facts { font: 500 12.5px/1.4 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--slate); display: flex; flex-wrap: wrap; gap: 2px 14px; }
.tile .note { font-size: 15px; color: var(--slate); }
.tile.big .price { font-size: clamp(30px, 3vw, 44px); }
.tile.big .addr { font-size: 20px; }

.tag { position: absolute; top: 14px; left: 14px; z-index: 3; font: 600 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 8px 10px 7px; background: var(--board); color: var(--ink); box-shadow: 0 1px 0 rgba(0, 0, 0, .15); }
.tag.dark { background: var(--ink); color: #fff; }
.tag.light { background: #fff; color: var(--ink); }
.counter { position: absolute; left: 14px; bottom: 14px; z-index: 3; font: 500 12px/1 var(--mono); letter-spacing: .06em; background: rgba(15, 23, 32, .82); color: #fff; padding: 6px 8px; }
.save { position: absolute; top: 10px; right: 10px; z-index: 4; width: 44px; height: 44px; display: grid; place-items: center; background: #fff; border: 0; border-radius: var(--r); color: var(--ink); }
.save svg { width: 20px; height: 20px; }
.save[aria-pressed=true] svg path { fill: var(--ink); }
.save[aria-pressed=true] { background: var(--board); }
.save.pop { animation: pop .35s var(--ease); }
@keyframes pop { 50% { transform: scale(1.18); } }

/* homepage editorial grid: deliberately unequal */
.ed-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(28px, 3vw, 44px) clamp(16px, 2vw, 32px); align-items: start; }
.ed-grid > :nth-child(1) { grid-column: span 7; --ar: 5 / 4; }
.ed-grid > :nth-child(2) { grid-column: span 5; --ar: 4 / 5; }
.ed-grid > :nth-child(3) { grid-column: span 5; --ar: 1 / 1; }
.ed-grid > :nth-child(4) { grid-column: span 3; }
.ed-grid > :nth-child(5) { grid-column: span 4; --ar: 4 / 5; }
.ed-grid > :nth-child(6) { grid-column: span 8; --ar: 16 / 9; }
.ed-grid > :nth-child(7) { grid-column: span 4; --ar: 4 / 5; }
.ed-grid > :nth-child(2), .ed-grid > :nth-child(5) { margin-top: clamp(0px, 6vw, 96px); }
@media (max-width: 1023px) {
  .ed-grid { grid-template-columns: repeat(6, 1fr); }
  .ed-grid > :nth-child(n) { grid-column: span 3; margin-top: 0; }
  .ed-grid > :nth-child(1), .ed-grid > :nth-child(6) { grid-column: span 6; --ar: 16 / 10; }
  .ed-grid > :nth-child(4) { grid-column: span 3; }
}
@media (max-width: 600px) { .ed-grid > :nth-child(n) { grid-column: span 6; --ar: 4 / 3; } }

/* valuation tile slotted into a grid */
.vtile { background: var(--board); color: var(--ink); padding: 24px; display: flex; flex-direction: column; gap: 14px; min-height: 100%; text-decoration: none; position: relative; }
.vtile h3 { font-size: clamp(26px, 2.4vw, 34px); font-stretch: 84%; letter-spacing: -.03em; }
.vtile p { margin: 0; font-size: 16px; }
.vtile .spec { color: var(--ink); }
.vtile .go { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-weight: 600; border-top: 1px solid var(--ink); padding-top: 14px; }
.vtile svg { width: 22px; height: 22px; transition: transform .2s var(--ease); }
.vtile:hover svg { transform: translateX(4px); }

/* results grid: alternating 7/5 rhythm, two big photos per row */
.r-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 44px 28px; }
.r-grid > * { grid-column: span 6; }
.r-grid > :nth-child(4n+1) { grid-column: span 7; }
.r-grid > :nth-child(4n+2) { grid-column: span 5; }
.r-grid > :nth-child(4n+3) { grid-column: span 5; }
.r-grid > :nth-child(4n) { grid-column: span 7; }
.r-grid { align-items: start; }
.r-grid > :nth-child(4n+1) .ph, .r-grid > :nth-child(4n) .ph { aspect-ratio: 3 / 2; }
.r-grid > :nth-child(4n+2) .ph, .r-grid > :nth-child(4n+3) .ph { aspect-ratio: 5 / 4.6; }
@media (max-width: 900px) { .r-grid > :nth-child(n) { grid-column: span 12; } .r-grid .tile .ph { aspect-ratio: 3 / 2 !important; } }

/* list rows */
.rows { display: grid; border-top: 1px solid var(--line); }
.row { position: relative; display: grid; grid-template-columns: 280px 1fr auto; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: center; }
.row .ph { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--mist-2); }
.row .ph img, .row .ph picture { width: 100%; height: 100%; object-fit: cover; }
.row .price { font-size: 28px; font-weight: 700; font-stretch: 86%; letter-spacing: -.02em; }
.row .addr { font-size: 18px; font-weight: 500; margin: 4px 0 8px; }
.row .side { display: grid; gap: 8px; justify-items: end; }
.row .save { position: static; border: 1px solid var(--line); }
.row a.cover { position: absolute; inset: 0; z-index: 1; }
.row .side > * { position: relative; z-index: 2; }
@media (max-width: 700px) { .row { grid-template-columns: 120px 1fr; gap: 14px; } .row .side { grid-column: 1 / -1; justify-items: start; grid-auto-flow: column; justify-content: start; } .row .price { font-size: 22px; } .row .tag { display: none; } }

/* compact map list item */
.mrow { position: relative; display: grid; grid-template-columns: 112px 1fr; gap: 14px; padding: 14px; border-bottom: 1px solid var(--line); background: #fff; transition: background .15s; }
.mrow.hot, .mrow:hover { background: #FFF7D6; }
.mrow .ph { aspect-ratio: 1 / 1; overflow: hidden; background: var(--mist-2); }
.mrow .ph img, .mrow .ph picture { width: 100%; height: 100%; object-fit: cover; }
.mrow .price { font-size: 21px; font-weight: 700; font-stretch: 88%; letter-spacing: -.02em; }
.mrow .addr { font-size: 15px; font-weight: 500; margin: 2px 0 6px; }
.mrow a { position: absolute; inset: 0; }

/* leaflet price pins */
.pin { width: max-content; background: var(--board); color: var(--ink); font: 600 12.5px/1 var(--mono); padding: 7px 8px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); border: 1px solid var(--ink); position: relative; transform: translate(-50%, -100%); display: inline-block; cursor: pointer; }
.pin::after { content: ''; position: absolute; left: 50%; bottom: -7px; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--ink); border-bottom: 0; }
.pin.sold { background: var(--ink); color: #fff; }
.pin.hot { background: var(--ink); color: var(--board); z-index: 1000; }
.pin-wrap { background: none !important; border: 0 !important; }
.leaflet-container { font-family: var(--sans); background: var(--mist); }
.leaflet-popup-content-wrapper { border-radius: var(--r); }
.leaflet-popup-content { margin: 12px 14px; font-size: 14px; }
.map-attr { font: 500 11px var(--mono); color: var(--slate); margin-top: 8px; }
.stn { background: #fff; border: 2px solid var(--ink); width: 12px !important; height: 12px !important; border-radius: 50%; }

.empty { padding: 48px 24px; text-align: center; border: 1px dashed #9AA4AF; }
.empty h3 { font-size: 26px; margin-bottom: 8px; }
.r-grid > .vtile { align-self: start; min-height: 320px; }
