/* The home is a neighbourhood entrance. Existing board and reader styles stay scoped. */
.community-home-enabled { --home-ink:#16382f; --home-green:#16634c; --home-soft:#e9f2ec; }
.community-home-enabled #homeView { grid-template-rows:auto auto auto auto; }
.community-home-enabled #homeView .home-hub:not(.hidden) { display:block; grid-column:1/-1; grid-row:1; margin:0 0 24px; padding:0; }
.community-home-enabled.show-discovery #homeHub:not(.hidden) { display:block!important; }
.community-home-enabled #homeView>.app-return-note { display:none; }
.community-home-enabled #homeView .search-wrap { grid-row:2; margin-bottom:18px; }
.community-home-enabled #homeView #latestSection,.community-home-enabled #homeView #popularSection { grid-row:3; }
.community-home-enabled #homeView .home-about { grid-row:5; }
.community-home-enabled #homeView.focused-feed .menu-result-banner { grid-row:1; }
.home-welcome { display:grid;grid-template-columns:1fr 1.05fr;gap:24px;min-height:286px;padding:24px;background:#edf3ed;border:1px solid #dce7dd;border-radius:22px;overflow:hidden; }
.home-welcome-copy { display:flex;flex-direction:column;align-items:flex-start;padding:9px 0 5px 6px; }
.home-welcome-kicker { display:flex;align-items:center;gap:12px;font-size:11px;font-weight:600;letter-spacing:.02em;color:#456456; }
.home-welcome-kicker>span { display:inline-flex;align-items:center;gap:6px; }
.home-welcome-kicker i { display:block;width:6px;height:6px;border-radius:50%;background:#427e5c; }
.home-welcome-copy h2 { font-size:clamp(26px,2.7vw,38px);font-weight:700;line-height:1.35;letter-spacing:-1.7px;color:var(--home-ink);margin:20px 0 10px;word-break:keep-all; }
.home-welcome-copy>p { font-size:13px;line-height:1.8;color:#4d685a;margin:0 0 22px;word-break:keep-all; }
.home-welcome-actions { display:flex;flex-wrap:wrap;gap:8px;margin-top:auto; }
.home-welcome-actions>a,.home-welcome-actions>button { min-height:44px;display:inline-flex;align-items:center;gap:8px;border:1px solid #c6d7c8;border-radius:10px;background:#f8fbf7;padding:10px 14px;color:var(--home-ink);font:inherit;font-size:12px;font-weight:600;text-decoration:none;cursor:pointer; }
.home-welcome-actions>a { background:var(--home-green);color:white;border-color:var(--home-green); }
.home-welcome-actions svg { width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6; }
.home-map-wrap { position:relative;min-height:250px;overflow:hidden;border:1px solid #d4e0d3;border-radius:16px;background:#e3ebde;isolation:isolate; }
.home-map-disclosure { min-width:0;height:100%; }
.home-map-disclosure>summary { display:none; }
.home-map-disclosure .home-map-wrap { height:100%; }
#homeMap { height:100%;min-height:250px;width:100%;z-index:0;font-family:inherit;background:#e3ebde; }
.home-map-caption { position:absolute;z-index:410;top:12px;left:12px;max-width:calc(100% - 24px);padding:9px 12px;background:#fffffff0;border:1px solid #ffffffcf;border-radius:10px;box-shadow:0 3px 16px #233e2910;pointer-events:none; }
.home-map-caption span { display:block;font-size:10px;font-weight:600;color:#597361;margin-bottom:2px; }
.home-map-caption strong { font-size:12px;font-weight:650;color:var(--home-ink); }
.home-map-foot { position:absolute;z-index:410;bottom:24px;left:12px;background:#fffffff0;border-radius:6px;padding:5px 8px;color:#526251;font-size:9px;pointer-events:none; }
.home-map-wrap .leaflet-control-attribution { font-size:9px; }
.home-map-pin { background:none;border:0;display:flex;justify-content:center;align-items:center; }
.home-map-pin-label { position:relative;white-space:nowrap;display:flex;align-items:center;gap:6px;min-height:32px;padding:6px 9px;background:white;border:1.5px solid #3d7660;border-radius:8px;box-shadow:0 2px 8px #203d3326;color:#204735;font-size:10px;font-weight:650; }
.home-map-pin-label::after { content:'';position:absolute;left:calc(50% - 4px);bottom:-5px;width:7px;height:7px;transform:rotate(45deg);background:white;border-right:1.5px solid #3d7660;border-bottom:1.5px solid #3d7660; }
.home-map-pin b { display:inline-flex;align-items:center;justify-content:center;min-width:17px;height:17px;border-radius:5px;background:#e3f0e7;color:#186344;font-size:10px; }
.home-map-pin.selected .home-map-pin-label,.home-map-pin.selected .home-map-pin-label::after { background:#16634c;color:white;border-color:#16634c; }
.home-map-pin.selected b { background:#ffffff24;color:white; }
.home-map-pin:focus-visible { outline:2px solid #2456ed;outline-offset:4px;border-radius:10px; }
.home-map-choices>strong { display:block;margin-bottom:7px;font-size:12px;color:#294c38; }
.home-map-choices>button { display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;width:100%;border:0;border-top:1px solid #e6eee8;background:white;color:#294c38;font:inherit;font-size:12px;padding:9px 0;cursor:pointer; }
.home-map-choices b { color:#4b7459; }
#homeMapStatus { position:absolute;z-index:410;right:10px;bottom:36px;max-width:calc(100% - 20px);background:#fffc;padding:6px 9px;border-radius:6px;font-size:10px;color:#526251; }
#homeMapStatus[hidden],#homeMapFallback[hidden] { display:none; }
#homeMapFallback { position:absolute;inset:70px 16px 40px;z-index:1;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px;font-size:12px;color:#526c59;text-align:center; }
#homeMapFallback a { display:inline-flex;align-items:center;min-height:44px;border:1px solid #a9c1ab;border-radius:9px;padding:9px 15px;text-decoration:none;background:#f6faf3;color:#244b34; }
.home-services { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:12px; }
.home-service { position:relative;display:flex;align-items:center;gap:11px;padding:16px 13px;border:1px solid #e0e6eb;background:white;border-radius:13px;text-decoration:none;color:#1d3341;min-width:0;transition:background-color .15s,border-color .15s; }
.home-service-icon { display:flex;align-items:center;justify-content:center;flex:none;width:36px;height:36px;border-radius:11px;background:#edf3eb;color:#386b45; }
.home-service:nth-child(2) .home-service-icon { background:#ecf1fa;color:#4a68a1; }
.home-service:nth-child(3) .home-service-icon { background:#fbf0e5;color:#9b6a32; }
.home-service:nth-child(4) .home-service-icon { background:#f3ecf7;color:#83618d; }
.home-service-icon svg { width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round; }
.home-service-copy { display:flex;flex-direction:column;gap:4px;min-width:0; }
.home-service strong { font-size:13px;font-weight:650;line-height:1.4; }
.home-service small { font-size:10px;line-height:1.5;color:#6c7885;word-break:keep-all; }
.home-service-arrow { margin-left:auto;align-self:flex-start;font-size:13px;color:#7b8895; }
.home-neighbourhood-tools { display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:22px 0 8px; }
.home-area-label { display:flex;align-items:center;gap:9px;color:#40556b;font-size:12px;font-weight:600; }
.community-home-enabled .home-area-label { flex-direction:row;margin:0; }
.home-area-label svg { width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7; }
#homeArea { font:inherit;font-size:12px;font-weight:500;min-height:42px;width:230px;max-width:100%;border:1px solid #dce4e9;background:white;border-radius:9px;color:#243747;padding:8px 30px 8px 11px; }
#homeRememberArea { border:1px solid #dce4e9;border-radius:8px;background:white;min-height:40px;padding:9px 12px;font:inherit;font-size:11px;color:#617180;cursor:pointer; }
#homeRememberArea[aria-pressed=true] { color:#16634c;border-color:#bfdbca;background:#eef6f0; }
#homeAreaNote { font-size:10px;line-height:1.6;color:#6c7b86;margin:0; }
.home-topic-tabs { display:flex;align-items:center;gap:5px;flex-wrap:wrap; }
.home-topic-tabs button { border:1px solid transparent;border-radius:8px;background:transparent;min-height:40px;padding:8px 14px;font:inherit;font-size:12px;color:#647386;cursor:pointer; }
.home-topic-tabs button[aria-pressed=true] { background:#203e34;color:white;border-color:#203e34;font-weight:600; }
.home-feed-scope { display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid #e3e8ef;margin-top:18px;padding-top:14px;color:#71808e;font-size:11px; }
.home-feed-scope strong { color:#334558;font-size:12px;font-weight:600; }
#homeClearScope { border:0;background:none;font:inherit;font-size:11px;min-height:36px;padding:4px 0;color:#526b82;cursor:pointer;text-decoration:underline;text-underline-offset:3px; }
#homeScopeNote { margin:7px 0 0;font-size:11px;color:#6c7a89;line-height:1.6; }
.home-community-card { padding:18px;border:1px solid #e0e7e9;border-radius:14px;background:#fff;margin-bottom:18px; }
.home-community-card>p { margin:0 0 8px;color:#447260;font-size:10px;letter-spacing:.07em;font-weight:650; }
.home-community-card h3 { font-size:15px;line-height:1.5;margin:0 0 12px;color:#2c4538;word-break:keep-all; }
#homeQuestions>p { font-size:12px;line-height:1.8;color:#708071;margin:10px 0 14px;word-break:keep-all; }
#homeQuestions>a { display:flex;flex-direction:column;gap:6px;padding:12px 0;border-top:1px solid #edf0eb;text-decoration:none; }
#homeQuestions>a>span { color:#334737;font-size:12px;font-weight:550;line-height:1.6;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden; }
#homeQuestions small { font-size:10px;color:#7a887b; }
#homeQuestions b { float:right;color:#417359;font-size:12px; }
#homeQuestionAction { margin-top:7px;width:100%;min-height:42px;border:1px solid #dce6db;border-radius:8px;background:#f6f9f4;color:#2f6042;font:inherit;font-size:12px;font-weight:600;cursor:pointer; }
.community-home-enabled #homeView #popularSection { position:static;border:0;background:transparent;box-shadow:none;padding:0; }
.community-home-enabled #popularSection>.section-head,.community-home-enabled #homePopularTabs,.community-home-enabled #popularSection>.popularity-criteria,.community-home-enabled #popularList { background:#fff; }
.community-home-enabled #popularSection>.section-head { margin:0;padding:18px 16px 12px;border:1px solid #e3e8ef;border-bottom:0;border-radius:14px 14px 0 0; }
.community-home-enabled #popularSection>.section-head h2 { font-size:14px; }
.community-home-enabled #homePopularTabs { border-inline:1px solid #e3e8ef;margin:0;padding:0 16px 9px; }
.community-home-enabled #popularSection>.popularity-criteria { border-inline:1px solid #e3e8ef;margin:0;padding:0 16px 6px; }
.community-home-enabled #popularList { border:1px solid #e3e8ef;border-top:0;border-radius:0 0 14px 14px;padding:0 16px 12px; }
.community-home-enabled #returnBrief.return-brief { padding:13px 16px;margin-bottom:18px;border-color:#e3e8ef;background:#fff;border-radius:12px; }
.community-home-enabled #returnBrief h3 { font-size:14px; }
.community-home-enabled #returnBrief .return-setup-copy { font-size:11px; }
.community-home-enabled #latestList { border-color:#e3e8ef;border-radius:14px; }
.community-home-enabled #latestList .post-title { font-weight:650;line-height:1.55; }
.home-service:hover { background:#fbfcfa;border-color:#bbcdbe; }
.community-home-enabled :is(.home-service,.home-welcome-actions>a,.home-welcome-actions>button,#homeQuestionAction,#homeRememberArea,#homeClearScope,.home-topic-tabs button,#homeArea):focus-visible { outline:2px solid #2456ed;outline-offset:3px; }
@media(max-width:1150px) and (min-width:901px) {
  .home-welcome { gap:16px;padding:20px;grid-template-columns:1fr 1fr; }
  .home-welcome-copy h2 { font-size:29px; }
  .home-welcome-copy { padding-left:0; }
  .home-services { gap:8px; }
  .home-service { padding:14px 10px;gap:8px; }
  .home-service-icon { width:29px;height:32px; }
  .home-service-arrow { display:none; }
}
@media(max-width:900px) {
  .community-home-enabled #homeView .home-hub:not(.hidden) { order:0;width:100%;padding:16px 18px 0;margin:0 0 14px; }
  .community-home-enabled #homeView .search-wrap { order:1;padding:0 18px;margin:0 0 15px; }
  .home-welcome { gap:18px;padding:20px;border-radius:17px;grid-template-columns:1fr 1fr; }
  .home-welcome-copy { padding:0; }
  .home-welcome-copy h2 { font-size:28px;margin-top:16px;letter-spacing:-1.1px; }
  .home-welcome-copy>p { font-size:12px;margin-bottom:16px; }
  .home-welcome-kicker { font-size:10px;gap:8px;flex-wrap:wrap; }
  .home-map-wrap,#homeMap { min-height:224px; }
  .home-services { grid-template-columns:repeat(4,minmax(0,1fr));gap:8px; }
  .home-service { gap:8px;padding:13px 9px; }
  .home-service-icon { width:30px;height:32px; }
  .home-service-arrow { display:none; }
  .home-neighbourhood-tools { margin-top:16px;gap:8px; }
  .home-area-label { flex:1;min-width:0; }
  #homeArea { flex:1;min-width:0;max-width:260px; }
  #homeAreaNote { width:100%; }
  .home-topic-tabs { flex-wrap:nowrap;overflow-x:auto;margin:0 -2px;padding:3px 2px;scrollbar-width:none; }
  .home-topic-tabs button { flex:none;font-size:12px;padding:8px 12px; }
  .home-feed-scope { margin-top:12px;padding-top:8px; }
  .community-home-enabled #homeView #popularSection { display:block;order:3;width:100%;padding:20px 18px 0; }
  .community-home-enabled #popularSection>:not(.home-community-card) { display:none; }
  .home-community-card { margin-bottom:0; }
  .community-home-enabled #returnBrief.return-brief { margin:0 18px 14px; }
  .community-home-enabled #latestList { border-radius:0;border-inline:0; }
  .community-home-enabled #homeView.focused-feed .menu-result-banner { order:0; }
}
@media(max-width:600px) {
  .home-welcome { grid-template-columns:1fr;gap:17px;padding:19px;min-height:0; }
  .home-welcome-copy h2 { font-size:28px;margin:14px 0 9px; }
  .home-welcome-copy h2 br { display:none; }
  .home-welcome-copy>p { display:none; }
  .home-welcome-actions { gap:7px; }
  .home-welcome-actions>a,.home-welcome-actions>button { padding:10px 13px; }
  .home-map-wrap,#homeMap { min-height:183px;height:183px; }
  .home-map-caption { top:9px;left:9px;padding:7px 10px; }
  .home-map-foot { bottom:21px;left:9px;font-size:8px; }
  .home-services { grid-template-columns:repeat(4,minmax(0,1fr));gap:7px; }
  .home-service { flex-direction:column;justify-content:center;min-height:78px;padding:10px 4px;gap:7px;text-align:center; }
  .home-service strong { font-size:11px;word-break:keep-all; }
  .home-service small { display:none; }
  .home-service-icon { width:31px;height:33px; }
  .home-map-disclosure { height:auto; }
  .home-map-disclosure>summary { display:flex;align-items:center;justify-content:space-between;min-height:44px;padding:10px 12px;border:1px solid #ceddce;border-radius:9px;background:#ffffffb0;color:#42634c;font-size:11px;font-weight:600;cursor:pointer;list-style:none; }
  .home-map-disclosure>summary::-webkit-details-marker { display:none; }
  .home-map-disclosure>summary span { font-size:18px;line-height:1; }
  .home-map-disclosure[open]>summary { margin-bottom:9px; }
  .home-map-disclosure[open]>summary span { transform:rotate(45deg); }
  .home-feed-scope { font-size:10px; }
  .home-feed-scope strong { font-size:11px; }
  #homeRememberArea { padding-inline:8px;font-size:10px; }
}
@media(prefers-reduced-motion:reduce) { .home-service { transition:none; } }
