/* Server-rendered listing and homes-directory pages. Uses the tokens in /th-chrome.css. */
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:#fff;color:var(--th-ink);font:16px/1.6 var(--th-font)}
img{max-width:100%;display:block}
a{color:var(--th-accent-ink)}
.th-main{max-width:var(--th-max);margin:0 auto;padding:24px 24px 72px}
.th-crumbs{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 18px;color:var(--th-muted);font-size:13px}
.th-crumbs a{color:var(--th-muted);text-decoration:none}.th-crumbs a:hover{color:var(--th-ink);text-decoration:underline}
.th-crumbs span[aria-hidden]{color:#b9b2bf}

/* Listing gallery */
.th-gallery{display:grid;grid-template-columns:2fr 1fr 1fr;grid-template-rows:repeat(2,minmax(0,1fr));gap:8px;height:min(520px,52vw);margin-bottom:28px;border-radius:12px;overflow:hidden}
.th-gallery figure{margin:0;min-height:0;background:var(--th-surface)}
.th-gallery figure:first-child{grid-row:1/3}
.th-gallery img{width:100%;height:100%;object-fit:cover}
.th-gallery.count-1{grid-template-columns:1fr}.th-gallery.count-1 figure:first-child{grid-row:auto}
.th-gallery.count-2{grid-template-columns:2fr 1fr}.th-gallery.count-2 figure:nth-child(2){grid-row:1/3}
.th-gallery.count-3{grid-template-columns:2fr 1fr}
.th-gallery .more{display:none}
.th-gallery-empty{display:grid;place-items:center;height:240px;margin-bottom:28px;border-radius:12px;background:var(--th-surface);color:var(--th-muted)}
.th-photos{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0 0}
.th-photos img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:var(--th-radius)}

/* Listing body */
.th-listing{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:48px;align-items:start}
.th-listing h1{margin:0 0 6px;font-size:clamp(28px,3vw,38px);line-height:1.15;letter-spacing:-.025em}
.th-place{display:flex;align-items:center;gap:6px;margin:0;color:var(--th-ink-2)}
.th-facts{display:flex;flex-wrap:wrap;gap:8px;margin:20px 0 28px;padding:0;list-style:none}
.th-facts li{padding:8px 14px;border:1px solid var(--th-line);border-radius:999px;font-size:14px;font-weight:500;color:var(--th-ink-2)}
.th-section{padding:24px 0;border-top:1px solid var(--th-line)}
.th-section h2{margin:0 0 10px;font-size:20px;letter-spacing:-.01em}
.th-section p{margin:0 0 10px;color:var(--th-ink-2)}
.th-description{white-space:pre-wrap}
.th-panel{position:sticky;top:88px;padding:24px;border:1px solid var(--th-line);border-radius:12px;background:#fff;box-shadow:0 8px 28px #24212a12}
.th-price{margin:0;font-size:30px;font-weight:700;letter-spacing:-.02em}
.th-price small{font-size:15px;font-weight:500;color:var(--th-muted)}
.th-kind{margin:2px 0 18px;color:var(--th-muted);font-size:14px}
.th-button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:48px;padding:0 18px;border-radius:var(--th-radius);background:var(--th-accent);color:#fff!important;font-weight:600;text-decoration:none!important}
.th-button:hover{background:var(--th-accent-strong)}
.th-direct{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 0}
.th-direct a,.th-direct span{flex:1 1 auto;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 14px;border:1px solid var(--th-line);border-radius:var(--th-radius);color:var(--th-ink)!important;font-size:14px;font-weight:600;text-decoration:none!important}
.th-direct a:hover{border-color:var(--th-ink)}
.th-direct code{font:inherit;margin-left:4px}
.th-panel-note{margin:14px 0 0;color:var(--th-muted);font-size:13px;line-height:1.5}
.th-panel .th-note{margin-top:16px;font-size:13px}
.th-mobile-bar{display:none}

/* Homes directory */
.th-intro{max-width:760px;margin:8px 0 28px}
.th-intro h1{margin:0 0 10px;font-size:clamp(30px,3.4vw,44px);line-height:1.12;letter-spacing:-.03em}
.th-intro p{margin:0 0 12px;color:var(--th-ink-2);font-size:17px}
.th-links{display:flex;flex-wrap:wrap;gap:10px}
.th-chip{display:inline-flex;align-items:center;min-height:40px;padding:0 16px;border:1px solid var(--th-line);border-radius:999px;color:var(--th-ink)!important;font-size:14px;font-weight:500;text-decoration:none!important}
.th-chip:hover{border-color:var(--th-ink)}
.th-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:24px;margin:8px 0 32px;padding:0;list-style:none}
.th-card{display:flex;flex-direction:column;border:1px solid var(--th-line);border-radius:12px;overflow:hidden;background:#fff;transition:box-shadow .2s ease,transform .2s ease}
.th-card:hover{box-shadow:0 10px 30px #24212a14;transform:translateY(-2px)}
.th-card-photo{display:block;aspect-ratio:4/3;background:var(--th-surface)}
.th-card-photo img{width:100%;height:100%;object-fit:cover}
.th-card-body{display:grid;gap:4px;padding:16px 18px 18px}
.th-card-price{font-size:21px;font-weight:700;letter-spacing:-.015em}
.th-card-price small{font-size:13px;font-weight:500;color:var(--th-muted)}
.th-card h3{margin:0;font-size:16px;line-height:1.35}
.th-card h3 a{color:var(--th-ink);text-decoration:none}
.th-card h3 a::after{content:'';position:absolute;inset:0}
.th-card{position:relative}
.th-card p{margin:0;color:var(--th-muted);font-size:14px}
.th-card .th-card-snippet{margin-top:6px;color:var(--th-ink-2);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.th-pager{display:flex;gap:12px;margin:0 0 40px}
.th-guide{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:32px;padding:32px 0 0;border-top:1px solid var(--th-line)}
.th-guide h2{margin:0 0 8px;font-size:18px}
.th-guide p{margin:0;color:var(--th-ink-2);font-size:15px}
.th-empty{padding:40px 24px;border-radius:12px;background:var(--th-surface);text-align:center;color:var(--th-ink-2)}

@media(max-width:1023px){
  .th-main{padding:16px 16px 48px}
  .th-listing{grid-template-columns:1fr;gap:0}
  .th-panel{position:static;margin-top:8px;box-shadow:none}
  .th-gallery{display:flex;gap:8px;height:auto;margin:0 -16px 20px;padding:0 16px;border-radius:0;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}
  .th-gallery::-webkit-scrollbar{display:none}
  .th-gallery figure{flex:0 0 88%;aspect-ratio:4/3;scroll-snap-align:center;border-radius:12px;overflow:hidden}
  .th-gallery.count-1 figure{flex-basis:100%}
  .th-photos{display:none}
  .th-gallery .more{display:block}
  .th-mobile-bar{position:fixed;left:0;right:0;bottom:calc(58px + env(safe-area-inset-bottom));z-index:44;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;background:#fff;border-top:1px solid var(--th-line);box-shadow:0 -6px 20px #24212a0f}
  .th-mobile-bar strong{font-size:18px;letter-spacing:-.01em}.th-mobile-bar small{color:var(--th-muted);font-weight:500}
  .th-mobile-bar .th-button{width:auto;min-height:44px}
  body.th-has-bar{padding-bottom:calc(132px + env(safe-area-inset-bottom))}
  .th-guide{grid-template-columns:1fr;gap:20px}
}
@media (prefers-reduced-motion:reduce){.th-card,.th-card:hover{transition:none;transform:none}}
.th-visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.th-place svg,.th-section p svg{vertical-align:-3px;color:var(--th-muted)}
.th-cap{display:inline-block}.th-cap::first-letter{text-transform:uppercase}
p.th-cap{display:block}
.th-crumbs>span:last-child{flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* How-to-publish page */
.th-publish{max-width:820px}
.th-publish>h2{margin:32px 0 14px;font-size:22px;letter-spacing:-.01em}
.th-steps{counter-reset:step;display:grid;gap:12px;margin:0;padding:0;list-style:none}
.th-steps li{counter-increment:step;position:relative;padding:16px 18px 16px 60px;border:1px solid var(--th-line);border-radius:12px;color:var(--th-ink-2)}
.th-steps li::before{content:counter(step);position:absolute;left:18px;top:15px;width:28px;height:28px;display:grid;place-items:center;border-radius:50%;background:var(--th-accent-soft);color:var(--th-accent-ink);font-weight:700;font-size:14px}
.th-publish-accuracy{margin:20px 0;color:var(--th-ink-2)}
.th-publish-support{margin-top:28px;color:var(--th-muted);font-size:14px}
.th-button-inline{display:inline-flex;width:auto}
.th-original-note{margin:0 0 10px;padding:8px 12px;border-left:3px solid var(--th-accent,#bd166e);background:#faf6f9;color:var(--th-ink-2);font-size:14px;line-height:1.5}
.th-key-list{display:flex;flex-wrap:wrap;gap:8px;list-style:none;margin:0 0 10px;padding:0}.th-key-list li{padding:6px 12px;border:1px solid var(--th-line,#e7e3ea);border-radius:999px;background:#fff;font-size:14px}.th-key-ask{color:var(--th-ink-2);font-size:14px;margin:6px 0}.th-key-updated{color:var(--th-muted,#6b6472);font-size:13px;margin:0}
.th-publish-cta{margin:18px 0 6px}
.th-publish-faq{display:grid;gap:12px}
.th-publish-faq section{padding:16px 18px;border:1px solid var(--th-line);border-radius:12px;background:#fff}
.th-publish-faq h3{margin:0 0 6px;font-size:17px;color:var(--th-ink)}
.th-publish-faq p{margin:0;color:var(--th-ink-2);line-height:1.6}
.th-steps li strong{color:var(--th-ink)}
