/* Page views (results, business). The home page is the default; body[data-view] switches what is shown. */
.view-back{margin:0 0 14px}
.results-back{display:none}
.back-link{display:inline-block;color:var(--tl-accent,#a54128);font-weight:700;text-decoration:none;padding:6px 0}
.back-link:hover,.back-link:focus-visible{text-decoration:underline}
.results-for{margin:0 0 10px;font-size:1.05rem}
.results-for q{font-weight:700;quotes:"“" "”"}

/* Results: the search stays at the top for refining; everything that is not a result is out of the way. */
body[data-view="results"] .hero-stage,
body[data-view="results"] .mobile-section-heading,
body[data-view="results"] .directory-tools,
body[data-view="results"] #spotlight,
body[data-view="results"] #today,
body[data-view="results"] #events,
body[data-view="results"] #classifieds,
body[data-view="results"] #cities,
body[data-view="results"] #stories,
body[data-view="results"] .tea-banner{display:none}
body[data-view="results"] .results-back{display:block;padding-top:14px}
/* The search bar normally overlaps the hero art with a negative margin; without the art it must sit in the flow. */
body[data-view="results"] .hero{padding-bottom:0;border-bottom:0}
body[data-view="results"] .hero .search{margin:18px 0 0 !important;border-radius:4px}

/* Business page: header and footer stay; the home sections and search are replaced by the page. */
.business-page{display:none}
body[data-view="business"] .business-page{display:block;max-width:860px;margin:0 auto;padding:18px 16px 56px}
body[data-view="business"] .hero,
body[data-view="business"] #directory,
body[data-view="business"] #events,
body[data-view="business"] #classifieds,
body[data-view="business"] #cities,
body[data-view="business"] #stories,
body[data-view="business"] .tea-banner{display:none}
.business-detail h1{font-family:var(--tl-display,Georgia,serif);font-size:clamp(1.9rem,5vw,2.8rem);line-height:1.1;margin:6px 0 10px;overflow-wrap:anywhere}
.business-detail .detail-photo{max-height:320px}
.business-detail dl{display:grid;grid-template-columns:minmax(120px,max-content) 1fr;gap:6px 18px}
.business-detail dd{margin:0}
.view-empty{font-size:1.1rem;padding:24px 0}

/* Comments */
.comments{margin-top:36px;padding-top:22px;border-top:2px solid var(--tl-ink,#153f35)}
.comments h2{font-family:var(--tl-display,Georgia,serif);margin:0 0 6px}
.comments-intro{margin:0 0 16px;color:var(--muted,#706b5d)}
.comment-form label{display:block;font-weight:700}
.comment-form textarea{display:block;width:100%;box-sizing:border-box;margin:6px 0;padding:10px 12px;font:inherit;border:1px solid var(--tl-rule,#cdbc9f);border-radius:6px;background:#fffdf8;resize:vertical;min-height:96px}
.comment-hint{margin:0 0 10px;font-size:.9rem;color:var(--muted,#706b5d)}
.comment-status{min-height:1.3em;margin:10px 0}
.comment-status.error{color:#9a2a1a}
.comment-list{list-style:none;margin:8px 0 0;padding:0}
.comment{padding:16px 0;border-top:1px solid var(--tl-soft-rule,#d9cfbd)}
.comment-head{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:baseline}
.comment-head time{color:var(--muted,#706b5d);font-size:.9rem}
.comment-body{margin:6px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
.comment-actions{display:flex;gap:14px;margin-top:6px}
.comment-empty{padding:16px 0;color:var(--muted,#706b5d)}
@media (max-width:600px){.business-detail dl{grid-template-columns:1fr}.business-page{padding-left:16px;padding-right:16px}}

/* Category placeholder used when a business has no picture yet */
.card-placeholder,.detail-placeholder{display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#eadfca,#f3e9d6);color:var(--tl-accent,#a54128)}
.card-placeholder{width:100%;height:100%}
.card-placeholder svg{width:64px;height:64px;opacity:.85}
.detail-placeholder{width:100%;height:220px;border-radius:6px;margin:0 0 16px}
.detail-placeholder svg{width:88px;height:88px;opacity:.85}
.business-detail .place{margin:0 0 8px;color:var(--muted,#706b5d)}
.business-detail .desc{font-size:1.1rem;margin:0 0 16px}
.detail-buttons{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}

/* Claim and picture panel on community business pages */
.owner-panel{margin-top:28px;padding:16px 18px;border:1px solid var(--tl-rule,#cdbc9f);border-radius:6px;background:#fbf6ea}
.owner-panel h2{font-family:var(--tl-display,Georgia,serif);font-size:1.25rem;margin:0 0 8px}
.owner-panel p{margin:0 0 10px}
.claim-form textarea{display:block;width:100%;box-sizing:border-box;margin:6px 0 10px;padding:10px 12px;font:inherit;border:1px solid var(--tl-rule,#cdbc9f);border-radius:6px;background:#fffdf8;resize:vertical}
.image-form{display:flex;flex-wrap:wrap;gap:10px;align-items:end}
.image-form label{flex:1 1 220px;font-weight:700}
.owner-thumb{display:block;max-width:160px;height:auto;border-radius:6px;margin:0 0 12px}
.owner-status{min-height:1.3em;margin:10px 0 0}

body[data-view="home"] :is(#categories,.index-head,.mobile-section-heading,.directory-tools,#groups,#events,#classifieds,#cities) {
 display:none!important;
}

.directory-page-heading {display:none}
body[data-view="section"] .directory-page-heading {display:block;margin:16px 0 0}
.directory-page-heading h1 {
 color:var(--tl-ink);
 font-family:var(--tl-display,Georgia,serif);
 font-size:clamp(2rem,5vw,3rem);
 line-height:1.1;
 margin:6px 0 14px;
}
body[data-view="section"] main > :is(section,article):not(.hero,#directory,#events,#groups,#classifieds,#cities,#stories,#featured),
body[data-view="section"]:not([data-directory-section="directory"]) #directory,
body[data-view="section"]:not([data-directory-section="events"]) #events,
body[data-view="section"]:not([data-directory-section="groups"]) #groups,
body[data-view="section"]:not([data-directory-section="classifieds"]) #classifieds,
body[data-view="section"]:not([data-directory-section="cities"]) #cities,
body[data-view="section"]:not([data-directory-section="stories"]) #stories,
body[data-view="section"]:not([data-directory-section="featured"]) #featured,
body[data-view="section"] .hero-stage {display:none!important}
body[data-view="section"] .hero {padding-bottom:0;border-bottom:0}
body[data-view="section"] .hero .search {margin:12px 0 0!important;border-radius:4px}

@media(max-width:767px) {
 body[data-view="home"] #about {display:block}
 body[data-view="section"][data-directory-section="classifieds"] #classifieds {display:block}
 body[data-view="section"] #classifieds .listings {grid-template-columns:1fr}
 .site-header nav.primary-nav {display:flex;justify-content:flex-start;gap:10px;overflow-x:auto}
 .site-header .primary-nav a[data-directory-section],
 .site-header .primary-nav a[data-directory-home] {display:flex;align-items:center}
}
body[data-view="section"]:is([data-directory-section="categories"],[data-directory-section="stories"],[data-directory-section="featured"],[data-directory-section="groups"]) .hero {display:none}
.category-page[hidden] {display:none}
.category-page:not([hidden]) {display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,155px),1fr));gap:10px;margin:16px 0 24px;max-height:none;overflow:visible}
.category-page .category {text-decoration:none;color:var(--tl-ink)}

.section-bar {position:sticky;top:0;z-index:12;max-width:1260px;margin:auto;padding:0 30px;background:var(--tl-paper,#f5eddf);font-family:var(--tl-serif)}
.section-bar .primary-nav a {text-decoration:none}
html {scroll-padding-top:60px}
@media(min-width:901px){body .bp-side {top:60px}}
@media(min-width:761px) and (max-width:1100px){.section-bar {padding-inline:26px}}
@media(max-width:760px){.section-bar {padding-inline:var(--tl-mobile-gutter,18px)}}

.photo-position{max-width:44rem;margin:1rem 0;padding:1rem}
.photo-position img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;cursor:grab;touch-action:none;user-select:none}
.photo-position img:active{cursor:grabbing}
.photo-position label{display:flex;align-items:center;gap:1rem;margin:.5rem 0}
.photo-position input{flex:1}
