/* The real estate agency: styles for its worked example only. Shared pieces (fields, letter) are in ../styles.css. Every selector here starts with an rl- class. */

/* ---------- What they asked for ---------- */
.rl-reqs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 8px; }
.rl-reqs li { display: grid; }
.rl-req { display: grid; gap: 2px; align-content: start; width: 100%; text-align: left; padding: 8px 6px 10px; border: 0; border-top: 1px solid rgba(34, 50, 44, 0.12); border-radius: 0; background: transparent; cursor: pointer; line-height: 1.35; transition: background-color 0.18s ease; }
.rl-req:hover, .rl-req:focus-visible, .rl-req.hot { background: var(--mustard-wash); }
.rl-req-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 8px; }
.rl-req-l { color: var(--ink-soft); font-size: 0.82rem; font-weight: 600; }
.rl-req-v { font-weight: 700; }
.rl-req-n { font-size: 0.84rem; color: var(--ink-soft); }
.rl-need { padding: 1px 8px; border-radius: 999px; border: 1.5px solid var(--ink); font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.rl-need.is-must { background: var(--ink); color: var(--white); }
.rl-need.is-nice { background: var(--white); border-style: dashed; }
.rl-need.is-when { background: var(--sky); }

/* The listing check: six little houses, three fade out with the reason */
.rl-homes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rl-home { position: relative; display: grid; gap: 1px; align-content: start; padding: 8px 8px 10px; border-radius: var(--r-sm); border: 1.5px solid rgba(34, 50, 44, 0.35); background: var(--white); transition: opacity 0.3s ease, filter 0.3s ease, box-shadow 0.18s ease; }
.rl-home .house { width: 100%; max-width: 84px; height: auto; margin: 0 auto 4px; overflow: visible; }
.rl-home .house :where(rect, path) { stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rl-addr { font-size: 0.86rem; font-weight: 700; line-height: 1.25; }
.rl-meta { font-size: 0.78rem; color: var(--ink-soft); line-height: 1.35; }
.rl-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.rl-tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper-2); color: var(--ink); font-size: 0.74rem; font-weight: 700; line-height: 1.4; text-align: left; }
button.rl-tag { min-height: 24px; cursor: pointer; } /* trace targets stay at least 24px tall */
.rl-tag.is-fit { background: var(--green); border-color: var(--green-deep); color: var(--white); }
.rl-tag.is-fit .tiny { width: 11px; height: 11px; }
.rl-tag.is-fit .tiny path { stroke: var(--white); stroke-width: 2.6; }
.rl-tag.is-caveat { background: var(--white); border-style: dashed; }
.rl-tag.is-out { background: var(--blush); }
button.rl-tag:hover, button.rl-tag:focus-visible, .rl-tag.hot { background: var(--mustard); }
.rl-home.is-fit { border: 2px solid var(--green); }
.rl-home.is-out { border-style: dashed; border-color: rgba(34, 50, 44, 0.45); background: transparent; }
.rl-home.is-out > :not(.rl-tags) { opacity: 0.5; filter: grayscale(1); }
.rl-home.is-out > .rl-addr, .rl-home.is-out > .rl-meta { opacity: 0.85; } /* faded, but still readable */
.rl-home:has(.hot) { box-shadow: 0 0 0 3px var(--mustard); }
.rl-home:has(.hot) > * { opacity: 1; filter: none; }
.rl-badge { position: absolute; top: 6px; left: 6px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--ink); background: var(--mustard); font-family: var(--serif); font-weight: 700; font-size: 0.85rem; }

/* ---------- The Saturday plan ---------- */
.rl-window { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; width: 100%; margin-top: 4px; padding: 4px 10px 4px 14px; border: 0; border-left: 4px solid var(--mustard); border-radius: 0; background: transparent; text-align: left; font-weight: 700; cursor: pointer; }
.rl-window:hover, .rl-window:focus-visible, .rl-window.hot { background: var(--mustard-wash); }

/* The morning strip: 9:00 to 12:00, with the three proposed slots on it */
.rl-strip { position: relative; margin: 12px 4px 26px; }
.rl-track { position: relative; height: 34px; border: 2px solid var(--ink); border-radius: 8px; background: repeating-linear-gradient(90deg, var(--paper) 0 calc(100% / 6 - 1px), rgba(34, 50, 44, 0.14) calc(100% / 6 - 1px) calc(100% / 6)); }
.rl-block { position: absolute; top: 3px; bottom: 3px; display: grid; place-items: center; border: 2px dashed var(--ink); border-radius: 6px; background: var(--mustard); font-family: var(--serif); font-weight: 700; font-size: 0.9rem; transform-origin: left center; }
.rl-tick { position: absolute; top: 100%; margin-top: 4px; transform: translateX(-50%); font-size: 0.74rem; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.rl-tick:first-of-type { transform: none; }
.rl-tick:last-child { transform: translateX(-100%); }

/* The slots, each one plainly a proposal */
.rl-slots { display: grid; gap: 0; }
.rl-slot { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; padding: 10px 4px; border: 0; border-top: 1.5px dashed rgba(34, 50, 44, 0.45); border-radius: 0; background: transparent; }
.rl-slot + .rl-slot { margin-top: 30px; }
.rl-slot-n { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--ink); background: var(--mustard); font-family: var(--serif); font-weight: 700; font-size: 0.9rem; }
.rl-slot-time { font-size: 0.82rem; font-weight: 700; color: var(--green); }
.rl-slot-addr { font-weight: 700; line-height: 1.3; }
.rl-slot-note { margin-top: 2px; font-size: 0.86rem; color: var(--ink-soft); line-height: 1.4; }
.rl-proposed { align-self: start; padding: 2px 9px; border-radius: 999px; border: 1.5px solid var(--brick); background: var(--white); color: var(--brick); font-size: 0.74rem; font-weight: 700; white-space: nowrap; }
.rl-hop { position: absolute; left: 25px; top: 100%; height: 30px; display: flex; align-items: center; padding-left: 16px; border-left: 2px dotted rgba(34, 50, 44, 0.5); font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.rl-route { margin-top: 12px; font-size: 0.9rem; line-height: 1.45; color: var(--ink-soft); }

/* ---------- Motion, as each section opens: the three that don't fit fade out ---------- */
.anim .rl-narrowing .rl-home.is-out > :not(.rl-tags) { animation: rl-fade 0.35s ease backwards; animation-delay: calc(var(--n) * 40ms + 300ms); }
.anim .rl-narrowing .rl-home.is-out .rl-tags { animation: rise 0.3s ease backwards; animation-delay: calc(var(--n) * 40ms + 400ms); }
.anim .rl-strip.is-new .rl-block { animation: grow 0.35s ease backwards; animation-delay: 0.2s; }
@keyframes rl-fade { from { opacity: 1; filter: none; } }

@media (max-width: 600px) {
  .rl-homes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rl-slot { grid-template-columns: 30px minmax(0, 1fr); }
  .rl-proposed { grid-column: 2; justify-self: start; }
}
