/* ============================================================
   Find My Roomie — Blog (index + posts)
   Loaded after styles.css: reuses its tokens, header, footer,
   buttons and .section-* type.
   Pages are generated by scripts/build-blog.mjs.
   ============================================================ */

/* Both languages ship in the HTML; i18n.js sets <html lang>
   and only the matching one is shown. */
html[lang="en"] [data-lang="es"],
html:not([lang="en"]) [data-lang="en"] { display: none !important; }

.top-nav a[aria-current] { color: var(--brand); }
.mobile-nav-links a[aria-current] { color: var(--brand); }

main a:focus-visible,
main button:focus-visible {
  outline: 2.5px solid var(--brand);
  outline-offset: 3px;
}

/* ============================================================
   INDEX — news-feed layout (search bar + tile grid)
   ============================================================ */
[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.feed-top {
  padding: clamp(20px, 4vw, 40px) 0 clamp(26px, 3.5vw, 40px);
  text-align: center;
}
.capi-title { max-width: min(600px, 100%); margin: 0 auto; }
.capi-title img { width: 100%; height: auto; }
.capi-sub {
  margin-top: 4px;
  font-size: 17px;
  color: var(--ink-3);
  text-wrap: balance;
}
.feed-search {
  display: flex;
  align-items: center;
  max-width: 700px;
  height: 58px;
  margin: 22px auto 0;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-warm-md);
  transition: box-shadow 0.2s ease;
}
.feed-search:focus-within {
  box-shadow: 0 0 0 3px rgba(173, 23, 1, 0.2), var(--shadow-warm-md);
}
.fs-icon {
  display: grid;
  place-items: center;
  width: 54px;
  flex-shrink: 0;
  color: var(--ink-mute);
}
.fs-icon svg,
.fs-go svg { width: 20px; height: 20px; }
.feed-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
}
.feed-search input::placeholder { color: var(--ink-mute); font-weight: 400; }
.fs-go {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-right: 6px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
.fs-go:hover { background: var(--brand-hot); }
.feed-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.feed-chip {
  padding: 7px 15px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.7);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.feed-chip:hover { border-color: var(--brand); color: var(--brand); }

.feed-sec + .feed-sec { margin-top: clamp(40px, 6vw, 64px); }
.feed-sec { scroll-margin-top: 110px; }
.sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  margin-bottom: 16px;
}
.sec-head h2 {
  font-family: var(--font-slab);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  letter-spacing: -0.015em;
  color: var(--ink);
}
.sec-head p { font-size: 15.5px; color: var(--ink-mute); }

.results-msg {
  margin-bottom: 18px;
  text-align: center;
  font-size: 16px;
  color: var(--ink-3);
}

/* ---------- grid ---------- */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 396px;
  grid-auto-flow: dense;
  gap: 18px;
}
.feed-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile--wide { grid-column: span 2; }

@media (max-width: 1180px) {
  .feed-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
  .feed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .feed-grid { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; gap: 14px; }
  .tile--wide { grid-column: auto; }
}

/* ---------- tile base ---------- */
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-warm-sm);
  transition: box-shadow 0.2s ease;
}
.tile:hover { box-shadow: var(--shadow-warm-md); }

.src {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 14px;
  color: var(--ink-mute);
}
.src-logo { width: 18px; height: 18px; flex-shrink: 0; border-radius: 5px; background: #fff; }
.src-name { font-weight: 500; color: var(--ink-2); }

/* ---------- post tile ---------- */
.tile-media { flex: 0 0 50%; overflow: hidden; background: #d9b99a; }
.tile-media img { width: 100%; height: 100%; object-fit: cover; }
.tile-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 16px 20px 12px;
}
.tile-title {
  margin-top: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile-title a,
.slide-title a { color: inherit; text-decoration: none; }
/* The title link covers the whole tile; the share button sits above it. */
.tile-title a::after,
.slide-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.tile:hover .tile-title a,
.slide:hover .slide-title a {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.tile-title a:focus-visible,
.slide-title a:focus-visible { outline: none; }
.tile--post:has(.tile-title a:focus-visible) {
  outline: 2.5px solid var(--brand);
  outline-offset: 3px;
}
.slide:has(.slide-title a:focus-visible) {
  outline: 3px solid #fff;
  outline-offset: -6px;
  border-radius: 16px;
}

.tile-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
  font-size: 14px;
  color: var(--ink-mute);
}
.tile-read { display: inline-flex; align-items: center; gap: 6px; }
.tile-read svg { width: 17px; height: 17px; }
.tile-share {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-right: -9px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.tile-share:hover { background: var(--plaster-deep); color: var(--brand); }
.tile-share svg { width: 19px; height: 19px; }

/* ---------- featured carousel ---------- */
.tile--carousel { background: #2a1a12; }
.car-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.car-track::-webkit-scrollbar { display: none; }
.slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  color: #fff;
}
.slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(24, 10, 4, 0.9) 0%, rgba(24, 10, 4, 0.55) 34%, rgba(24, 10, 4, 0) 66%);
}
.slide-body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: 0 26px 12px;
}
.slide .src,
.slide .src-name { color: rgba(255, 255, 255, 0.92); }
.slide-title {
  margin-top: 8px;
  max-width: 24ch;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(23px, 2.3vw, 31px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.slide-body .tile-foot { margin-top: 10px; color: rgba(255, 255, 255, 0.85); }
.slide .tile-share { color: #fff; }
.slide .tile-share:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }

.car-btn {
  position: absolute;
  top: 40%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 36px;
  height: 58px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: var(--shadow-warm-sm);
  transition: background 0.2s;
}
.car-btn:hover { background: #fff; }
.car-btn svg { width: 20px; height: 20px; }
.car-prev { left: 12px; }
.car-next { right: 12px; }
.car-dots {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 3;
  display: flex;
  gap: 8px;
  padding: 7px 11px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.35);
  transform: translateX(-50%);
}
.car-dot {
  position: relative;
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s, background 0.2s;
}
.car-dot::after { content: ""; position: absolute; inset: -8px -4px; } /* bigger hit area */
.car-dot[aria-current] { width: 22px; background: #fff; }
.car-btn:focus-visible,
.car-dot:focus-visible { outline: 2.5px solid #fff; outline-offset: 2px; }

/* ---------- widgets ---------- */
.tile--widget { padding: 18px 20px 16px; }
.w-head { display: flex; align-items: center; gap: 9px; }
.w-head h2 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
}
.w-icon { display: grid; place-items: center; color: var(--brand); }
.w-icon svg { width: 20px; height: 20px; }
.w-note { margin-left: auto; font-size: 13px; color: var(--ink-mute); white-space: nowrap; }
.w-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  align-self: flex-end;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}
.w-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Rent splitter (red, like MSN's weather card) */
.w-calc {
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(255, 140, 100, 0.35), transparent 60%),
    linear-gradient(165deg, #C21C04 0%, #A81600 55%, #870F00 100%);
  color: #fff;
}
.w-calc .w-head h2,
.w-calc .w-icon { color: #fff; }
.calc-big {
  margin-top: 16px;
  font-family: var(--font-body);
  font-size: 50px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.calc-cap { margin-top: 6px; font-size: 14px; color: rgba(255, 255, 255, 0.85); }
.calc-cap b { font-weight: 700; color: #fff; }
.calc-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.calc-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}
.calc-input {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  transition: border-color 0.2s, background 0.2s;
}
.calc-input:focus-within { border-color: #fff; background: rgba(255, 255, 255, 0.22); }
.calc-input input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.calc-split {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 14px 0 16px;
}
.calc-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 9px 2px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  font-family: var(--font-body);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
.calc-col:hover { background: rgba(255, 255, 255, 0.18); }
.calc-col[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}
.calc-col-n { display: inline-flex; align-items: center; gap: 3px; font-size: 15px; font-weight: 700; }
.calc-col-n svg { width: 13px; height: 13px; }
.calc-col-v { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.w-pill {
  margin-top: auto;
  align-self: center;
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.16);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s;
}
.w-pill:hover { background: rgba(255, 255, 255, 0.26); }
.w-calc :focus-visible { outline: 2.5px solid #fff; outline-offset: 2px; }

/* Rent ranges (like MSN's watchlist) */
.rents { list-style: none; margin: 8px 0 12px; }
.rent-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 14px;
}
.rent-row:last-child { border-bottom: 0; }
.rent-name {
  overflow: hidden;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.rent-bar { position: relative; height: 6px; border-radius: 3px; background: var(--plaster-deep); }
.rent-bar span {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--a);
  right: calc(100% - var(--b));
  border-radius: 3px;
  background: var(--terracotta);
}
.rent-val {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

/* Resource cards: icon, title, a preview lifted from the article */
.tile--res { padding: 20px 20px 16px; }
.res-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--rose-tint);
  color: var(--brand);
}
.res-icon svg { width: 22px; height: 22px; }
.res-title {
  margin-top: 14px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.res-title a { color: inherit; text-decoration: none; }
.res-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.tile--res:hover .res-title a {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.res-title a:focus-visible { outline: none; }
.tile--res:has(.res-title a:focus-visible) { outline: 2.5px solid var(--brand); outline-offset: 3px; }
.res-desc { margin-top: 6px; font-size: 15px; line-height: 1.45; color: var(--ink-3); }
.res-preview {
  flex: 1;
  min-height: 0;
  margin-top: 14px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 14px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 14px), transparent);
}
.res-checks { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.res-checks li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.res-checks li::before {
  content: "";
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 2px solid var(--ink-3);
  border-radius: 5px;
}
.res-chat { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.bubble {
  max-width: 88%;
  padding: 7px 12px;
  border-radius: 14px 14px 14px 4px;
  background: var(--plaster-deep);
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--ink-2);
}
.bubble--me { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: var(--brand); color: #fff; }
.res-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
}

/* ---------- outside headlines (News feed) ---------- */
.tile--ext { --topic-bg: var(--rose-tint); --topic-fg: var(--brand); }
.tile--ext[data-topic="estudiantes"] { --topic-bg: var(--mint-soft); --topic-fg: var(--mint-deep); }
.tile--ext[data-topic="ciudad"] { --topic-bg: var(--plaster-deep); --topic-fg: var(--terracotta-deep); }
.tile--ext[data-topic="dinero"] { --topic-bg: #FBEFD5; --topic-fg: #8A5A00; }
.ext-band {
  position: relative;
  flex: 0 0 34%;
  overflow: hidden;
  background: var(--topic-bg);
  color: var(--topic-fg);
}
.ext-band svg,
.tile--ext .tile-media > svg {
  position: absolute;
  right: -10px;
  bottom: -18px;
  width: 128px;
  height: 128px;
  opacity: 0.22;
  stroke-width: 1.5;
}
.ext-topic {
  position: absolute;
  z-index: 1;
  left: 20px;
  top: 18px;
  color: var(--topic-fg);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  font-weight: 600;
}
.tile--ext .tile-title { -webkit-line-clamp: 4; }
.tile--ext.has-img .tile-media { position: relative; flex-basis: 46%; }
/* Film over the outlet's cover: --ink, lighter top left, densest
   bottom right under the icon. Also shows while the photo loads. */
.tile--ext.has-img .tile-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top left, rgba(31, 20, 16, 0.72), rgba(31, 20, 16, 0.42) 55%, rgba(31, 20, 16, 0.28));
  transition: opacity 0.2s ease;
}
.tile--ext .tile-media > svg { color: #fff; opacity: 0.55; }
@media (hover: hover) {
  .tile--ext.has-img:hover .tile-media::before { opacity: 0.7; }
}
.tile--ext.has-img:has(.tile-title a:focus-visible) .tile-media::before { opacity: 0.7; }
.tile--ext.has-img .ext-topic { left: 14px; top: 14px; background: rgba(255, 255, 255, 0.9); }
.tile--ext.has-img .tile-title { -webkit-line-clamp: 3; }
.ext-open { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tile--ext .tile-foot svg { width: 16px; height: 16px; flex-shrink: 0; }
.tile--ext:has(.tile-title a:focus-visible) { outline: 2.5px solid var(--brand); outline-offset: 3px; }

.src-badge {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}
.src .src-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* "More headlines" list tile */
.w-heads .w-icon { color: var(--terracotta); }
.heads { list-style: none; margin-top: 6px; }
.heads li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
}
.heads li:last-child { border-bottom: 0; }
.heads .src { font-size: 13px; }
.heads a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  text-decoration: none;
}
.heads a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Loading / end states */
.news-status { margin-top: 18px; text-align: center; }
.news-skeletons,
.news-msg { display: none; }
.news-status[data-state="loading"] .news-skeletons { display: grid; }
.news-status[data-state="loading"] [data-for="loading"],
.news-status[data-state="end"] [data-for="end"],
.news-status[data-state="empty"] [data-for="empty"],
.news-status[data-state="error"] [data-for="error"] { display: block; }
.news-msg { padding: 28px 0 8px; font-size: 16px; color: var(--ink-3); }
.news-msg a,
.news-retry {
  margin-left: 6px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.news-sentinel { height: 1px; }
.tile.sk {
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.55) 30%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 255, 255, 0.55) 70%) 0 0 / 300% 100%;
  box-shadow: none;
  animation: sk-shimmer 1.4s linear infinite;
}
@keyframes sk-shimmer { to { background-position: -150% 0; } }

/* Resources section header link */
.sec-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 15px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  white-space: nowrap;
}
.sec-more:hover { text-decoration: underline; text-underline-offset: 3px; }

.res-flags { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.res-flags li { position: relative; padding-left: 28px; font-size: 14.5px; line-height: 1.35; color: var(--ink-2); }
.res-flags li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--mint-deep) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.res-flags--red li::before {
  background-color: var(--brand);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E");
  background-size: 9px;
}
.res-steps { list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 9px; }
.res-steps li { counter-increment: step; display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.res-steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--ink);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.res-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; }
.res-chips li {
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--plaster-deep);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
}

/* ---------- resources page ---------- */
.res-page { padding: clamp(16px, 3vw, 32px) 0 clamp(64px, 9vw, 104px); }
.res-head { margin-top: clamp(20px, 3vw, 32px); }
.res-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 20px;
}
.feed-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--plaster); }
.res-page .feed-grid { margin-top: 0; }

/* Single column: tiles size to their content */
@media (max-width: 600px) {
  .tile-media { flex: none; aspect-ratio: 16 / 9; }
  .tile-body { padding-bottom: 10px; }
  .tile--carousel { height: 440px; }
  .res-preview { flex: none; -webkit-mask-image: none; mask-image: none; }
  .ext-band { flex: none; height: 96px; }
  .tile--ext .tile-media > svg { width: 104px; height: 104px; bottom: -14px; }
  .sec-more { margin-left: 0; }
}

.blog-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 1000;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--plaster);
  font-size: 15px;
  font-weight: 600;
  box-shadow: var(--shadow-warm-md);
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.blog-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   POST
   ============================================================ */
.post { padding-top: clamp(16px, 3vw, 32px); }

.post-crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  color: var(--ink-mute);
}
.post-crumbs a {
  color: var(--ink-2);
  font-weight: 600;
  text-decoration: none;
}
.post-crumbs a:hover { color: var(--brand); }

.post-head { max-width: 920px; margin-top: clamp(20px, 3vw, 32px); }
.post-title {
  font-family: var(--font-slab);
  font-weight: 700;
  font-size: clamp(2.3rem, 5.6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}
.post-dek {
  margin-top: 20px;
  font-size: clamp(18px, 1.7vw, 21px);
  line-height: 1.5;
  color: var(--ink-3);
  max-width: 58ch;
  text-wrap: pretty;
}
.post-meta {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  font-size: 14.5px;
  color: var(--ink-mute);
}
.post-meta .by { color: var(--ink-2); font-weight: 600; }

.post-cover {
  margin-top: clamp(28px, 4vw, 44px);
  aspect-ratio: 2 / 1;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #c4946d;
  box-shadow: var(--shadow-warm-lg);
}
.post-cover img { width: 100%; height: 100%; object-fit: cover; }

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: clamp(40px, 6vw, 96px);
  margin-top: clamp(36px, 5vw, 64px);
  align-items: start;
}
.post-aside {
  position: sticky;
  top: 112px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Table of contents */
.post-toc-h {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-mute);
  margin-bottom: 10px;
}
.post-toc ol {
  list-style: none;
  border-left: 2px solid var(--hairline);
}
.post-toc a {
  display: block;
  margin-left: -2px;
  padding: 7px 0 7px 16px;
  border-left: 2px solid transparent;
  font-size: 15px;
  line-height: 1.35;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}
.post-toc a:hover { color: var(--brand); border-left-color: var(--brand); }

/* Sidebar CTA */
.aside-cta {
  background: var(--ink);
  color: var(--plaster);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
}
.aside-cta-h {
  font-family: var(--font-slab);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.2;
  color: #fff;
}
.aside-cta p:not(.aside-cta-h) {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 249, 245, 0.75);
}
.aside-cta .btn {
  margin-top: 20px;
  width: 100%;
  padding: 13px 20px;
  font-size: 15px;
}

@media (max-width: 1080px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); }
  .post-aside { display: none; }
}
@media (max-width: 640px) {
  .post-cover { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); }
}

/* ============================================================
   PROSE — long-form article body
   ============================================================ */
.prose {
  max-width: 68ch;
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink-2);
}
.prose > * + * { margin-top: 1.1em; }
.prose .lead { font-size: 1.12em; line-height: 1.6; color: var(--ink); }
.prose h2 {
  margin-top: 2.2em;
  font-family: var(--font-slab);
  font-weight: 700;
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
  scroll-margin-top: 112px;
}
.prose h3 {
  margin-top: 1.8em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15em;
  line-height: 1.3;
  color: var(--ink);
}
.prose h2 + *,
.prose h3 + * { margin-top: 0.55em; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--brand-hot); }
.prose ul,
.prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.5em; }
.prose li::marker { color: var(--brand); font-weight: 600; }

/* Callouts */
.callout {
  background: var(--plaster-deep);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  font-size: 17px;
  line-height: 1.6;
}
.callout > * + * { margin-top: 0.4em; }
.callout-h { font-weight: 700; color: var(--ink); }
.callout--app { background: var(--mint-soft); }

/* Green / red flag lists */
.prose .flags { list-style: none; padding-left: 0; }
.flags li {
  position: relative;
  padding-left: 44px;
}
.flags li + li { margin-top: 0.85em; }
.flags li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--mint-deep) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 15px no-repeat;
}
.flags--red li::before {
  background-color: var(--brand);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E");
  background-size: 13px;
}

/* Printable checklist: native numbering + an empty box to tick */
.prose .checklist { padding-left: 1.9em; }
.checklist li { position: relative; padding-left: 48px; }
.checklist li + li { margin-top: 1em; }
.checklist li::marker { font-family: var(--font-slab); font-weight: 700; color: var(--brand); }
.checklist li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0.2em;
  width: 24px;
  height: 24px;
  border: 2px solid var(--ink-3);
  border-radius: 7px;
  background: #fff;
}
.checklist strong { display: block; }

.post-print { padding: 12px 24px; font-size: 15px; }

/* Neighborhood comparison table */
.table-wrap {
  overflow-x: auto;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-warm-sm);
}
.hood-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 15.5px;
  line-height: 1.45;
}
.hood-table th,
.hood-table td {
  padding: 14px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--hairline);
}
.hood-table thead th {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-mute);
  background: var(--plaster-deep);
}
.hood-table tbody th {
  font-family: var(--font-slab);
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.hood-table .rent {
  white-space: nowrap;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.hood-table tbody tr:last-child > * { border-bottom: 0; }

@media (max-width: 640px) {
  .prose { font-size: 17.5px; }
  .callout { padding: 18px 20px; font-size: 16px; }
}

/* ============================================================
   CTA band + related posts (shared)
   ============================================================ */
.cta-band { padding-top: clamp(64px, 9vw, 104px); }
.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 28px 40px;
  padding: clamp(32px, 5.5vw, 60px);
  border-radius: var(--radius-2xl);
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-warm-lg);
}
.cta-card h2 {
  font-family: var(--font-slab);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  max-width: 16ch;
  text-wrap: balance;
}
.cta-card p {
  margin-top: 14px;
  font-size: 18px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
  max-width: 46ch;
}
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-light { background: #fff; color: var(--brand); }
.btn-light:hover { background: var(--plaster); transform: translateY(-1px); }
.btn-line-light { color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.btn-line-light:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); transform: translateY(-1px); }
.cta-card .btn:focus-visible { outline-color: #fff; }

@media (max-width: 560px) {
  .cta-actions, .cta-actions .btn { width: 100%; }
}

.post-related { padding-top: clamp(64px, 9vw, 104px); }
.related-h {
  font-family: var(--font-slab);
  font-weight: 700;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 28px;
}

.feed-page,
.post { padding-bottom: clamp(64px, 9vw, 104px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile,
  .car-dot,
  .btn,
  .tile--ext .tile-media::before { transition: none; }
  .tile.sk { animation: none; }
}

/* ============================================================
   PRINT — mainly for the checklist
   ============================================================ */
@media print {
  .atmosphere,
  .site-header,
  .mobile-nav,
  .site-footer,
  .post-crumbs,
  .post-cover,
  .post-aside,
  .post-print,
  .cta-band,
  .post-related,
  .tile--ext .tile-media::before,
  .tile--ext .tile-media > svg { display: none !important; }

  body { background: #fff; }
  .shell { max-width: none; padding: 0; }
  .post { padding: 0; }
  .post-title { font-size: 26pt; }
  .post-dek { font-size: 12pt; }
  .post-layout { display: block; margin-top: 18pt; }
  .prose { max-width: none; font-size: 11.5pt; line-height: 1.45; }
  .prose a { color: inherit; text-decoration: none; }
  .checklist li,
  .flags li,
  .callout { break-inside: avoid; }
}
