:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #242629; background: #f5f6f7; font-synthesis: none;
  font-variant-numeric: tabular-nums;
  --muted: #6c7078; --line: #e8e9ec; --blue: #1769c9;
}
* { box-sizing: border-box; }
body { margin: 0; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
h1,h2,h3,p { margin: 0; }
button,input,select { font: inherit; }
button,a,summary,select { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button,summary { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button:focus-visible,a:focus-visible,summary:focus-visible,select:focus-visible,input:focus-visible {
  outline: 3px solid #5594e4; outline-offset: 3px;
}
[hidden] { display: none !important; }
.icon { width: 18px; height: 18px; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip { position: absolute; left: 12px; top: -60px; background: white; padding: 12px; z-index: 20; }
.skip:focus { top: 10px; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.app-header {
  display: flex; align-items: center; gap: 12px; padding: 0 24px; height: 64px;
  flex: none; border-bottom: 1px solid var(--line); background: #fff;
}
.brand-mark {
  display: grid; place-items: center; background: #f0f1f3; color: #484c53;
  width: 30px; height: 30px; border-radius: 9px; font-size: 11px; font-weight: 750;
}
.app-header h1 { font-size: 17px; letter-spacing: -.025em; font-weight: 650; }
.header-divider { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.app-caption { color: var(--muted); font-size: 14px; }
.header-end { margin-left: auto; display: flex; align-items: center; gap: 24px; font-size: 13px; }
.sample-label { color: #5d636d; background: #f4f5f6; padding: 5px 9px; border-radius: 6px; font-size: 12px; }
#workspace { display: grid; grid-template-columns: 340px minmax(0,1fr); flex: 1; min-height: 0; }
.sidebar {
  display: flex; flex-direction: column; min-height: 0; background: #fff;
  border-right: 1px solid #dfe2e5; z-index: 4;
}
.sidebar-top { padding: 28px 22px 14px; position: relative; z-index: 5; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .1em; color: #868990; margin-bottom: 7px; }
.sidebar-top h2 { font-size: 27px; font-weight: 650; line-height: 1.15; letter-spacing: -.045em; }
.area-subtitle { font-size: 14px; color: var(--muted); margin-top: 7px; line-height: 1.5; }
.search-control {
  display: flex; align-items: center; gap: 8px; border-radius: 10px;
  background: #f2f3f5; color: #858991; padding: 0 12px; margin-top: 22px;
}
.search-control input { min-height: 42px; min-width: 0; width: 100%; border: 0; background: transparent; color: #242629; font-size: 14px; }
.search-control input::placeholder { color: #7e8188; }
.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; }
[data-filter-summary] { font-size: 12px; line-height: 1.4; color: var(--muted); }
.filter-menu > summary {
  display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 550;
  min-height: 36px; color: var(--blue); padding: 5px 0 5px 8px;
}
.filter-menu > summary .icon { width: 15px; height: 15px; }
.filter-count { background: #eaf2fe; border-radius: 10px; min-width: 17px; padding: 2px 5px; font-size: 11px; text-align: center; }
.filter-popover {
  position: absolute; top: calc(100% - 8px); left: 12px; right: 12px; padding: 20px;
  border: 1px solid #e2e5ea; border-radius: 16px; background: #fff;
  box-shadow: 0 12px 40px #1c2c4d24, 0 2px 8px #1c2c4d0a;
  max-height: min(540px, calc(100dvh - 270px)); overflow: auto; scrollbar-width: thin;
}
.popover-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.popover-heading h3 { font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.text-button { border: 0; background: none; color: var(--blue); font-size: 14px; padding: 8px 0 8px 8px; }
.field-label { display: grid; gap: 8px; font-size: 13px; font-weight: 600; }
select {
  appearance: none; width: 100%; min-height: 42px; padding: 9px 32px 9px 12px;
  border: 1px solid #dfe2e7; border-radius: 8px; color: #30343b; font-size: 14px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236c7078' stroke-width='1.5'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 11px center/14px;
}
fieldset { margin: 20px 0 0; padding: 0; border: 0; }
legend { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.period-control { display: flex; gap: 3px; padding: 3px; background: #f1f2f4; border-radius: 9px; }
.period-control button {
  flex: 1; min-height: 34px; font-size: 13px; color: #616773; border: 0; border-radius: 6px; background: transparent;
}
.period-control button[aria-pressed=true] { color: #242629; background: white; box-shadow: 0 1px 4px #00000014; font-weight: 600; }
.field-hint { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.scope-chips { display: grid; gap: 4px; }
.scope-chips button {
  display: flex; align-items: center; gap: 8px; min-height: 39px;
  border: 0; border-radius: 7px; background: white; text-align: left; padding: 8px 10px; color: #4d535e; font-size: 14px;
}
.scope-chips button b { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--muted); }
.scope-chips button[aria-pressed=true] { background: #edf4ff; color: #1a62b4; }
.scope-chips i,.chart-key i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.scope-new { background: #3479c4; }.scope-remodel { background: #7e8db6; }.scope-demo { background: #b2cbdc; }
.primary-button {
  border: 0; border-radius: 9px; min-height: 42px; color: white; background: var(--blue);
  padding: 10px 14px; width: 100%; font-size: 14px; font-weight: 600; margin-top: 20px;
}
.primary-button:hover { background: #1259ae; }
.sidebar-body { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.view-tabs { margin: 0 22px 12px; display: flex; padding: 3px; gap: 3px; border-radius: 10px; background: #f0f1f3; flex: none; }
.view-tabs button { flex: 1; border: 0; background: none; border-radius: 7px; padding: 9px; color: #71767f; font-size: 14px; font-weight: 550; }
.view-tabs button[aria-selected=true] { background: white; box-shadow: 0 1px 4px #00000012; color: #2a2e35; }
.view-tabs span { margin-left: 4px; color: #8a8e95; font-size: 12px; }
.list-panel { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.list-summary { padding: 5px 23px 13px; font-size: 12px; color: #858991; }
.project-list { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; padding: 0 10px 14px; }
.project-row {
  display: grid; grid-template-columns: 23px minmax(0,1fr) auto; align-items: start;
  gap: 9px; width: 100%; border: 0; border-radius: 10px; padding: 16px 12px;
  text-align: left; background: white; color: #2a2e35; position: relative;
}
.project-row::after { content: ""; position: absolute; bottom: 0; left: 44px; right: 12px; height: 1px; background: #f0f1f3; }
.project-row:hover { background: #f7f8fa; }
.project-row[aria-pressed=true] { background: #edf4fd; }
.project-row[aria-pressed=true]::after { background: transparent; }
.row-number { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #edf0f3; color: #79838e; font-size: 11px; font-weight: 600; }
.project-row[aria-pressed=true] .row-number { color: #fff; background: var(--blue); }
.row-copy { min-width: 0; }
.row-title { font-size: 14px; font-weight: 550; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-meta { display: block; font-size: 12px; line-height: 1.5; color: #7a7f87; margin-top: 5px; }
.row-value { font-size: 13px; font-weight: 600; padding-top: 2px; }
.sidebar-footer { flex: none; padding: 14px 23px 17px; border-top: 1px solid var(--line); color: #868a91; font-size: 11px; line-height: 1.7; background: #fff; }
.sidebar-footer a { display: inline-block; margin-top: 3px; font-size: 12px; }
.insights-panel { overflow-y: auto; min-height: 0; flex: 1; padding: 12px 23px 24px; scrollbar-width: thin; }
.insights-heading h2 { font-size: 18px; font-weight: 600; letter-spacing: -.025em; margin-bottom: 6px; }
.insights-heading p { font-size: 13px; color: var(--muted); line-height: 1.5; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; margin-top: 9px; }
.metrics article { padding: 18px 0 15px; border-bottom: 1px solid var(--line); }
.metrics h3 { font-size: 12px; line-height: 1.4; color: #6c727b; font-weight: 500; }
.metrics strong { display: block; font-size: 27px; font-weight: 550; line-height: 1.25; letter-spacing: -.045em; margin: 6px 0; }
.metrics p { font-size: 11px; color: #878c94; line-height: 1.45; }
.metrics article:last-child { grid-column: span 2; }
.chart-panel { padding-top: 24px; }
.chart-panel h3 { font-size: 15px; font-weight: 600; }
.chart-panel > p { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 5px; }
.chart-key { display: flex; gap: 8px 12px; flex-wrap: wrap; font-size: 11px; color: #7b828c; }
.chart-key span { display: flex; align-items: center; gap: 5px; }
.chart { display: block; width: 100%; height: 172px; margin-top: 12px; }
.chart text { font: 11px -apple-system,BlinkMacSystemFont,sans-serif; fill: #8a929c; }
.chart .grid { stroke: #eef0f3; stroke-width: 1; }
.chart .new { fill: #3479c4; }.chart .remodel { fill: #7e8db6; }.chart .demo { fill: #b2cbdc; }
.chart-empty,.empty { font-size: 14px; color: var(--muted); line-height: 1.6; padding: 25px 14px; }
.map-stage { position: relative; min-width: 0; min-height: 0; background: #eef2f3; }
.map-frame { position: absolute; inset: 0; }
.watch-map,.watch-map.maplibregl-map { position: absolute; inset: 0; }
.watch-map .maplibregl-canvas { filter: saturate(.58); }
.map-topline { position: absolute; inset: 20px 20px auto 24px; display: flex; justify-content: space-between; gap: 16px; align-items: start; pointer-events: none; }
.map-summary { padding: 10px 14px; border-radius: 10px; background: #ffffffec; box-shadow: 0 2px 10px #29384a0a; font-size: 13px; line-height: 1.45; color: #68717b; }
.fit {
  display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 9px 12px; background: #ffffffed;
  border: 1px solid #fff; border-radius: 11px; box-shadow: 0 2px 10px #28395012; color: #55606b; font-size: 13px; pointer-events: auto;
}
.fit:hover { background: #fff; color: #242629; }
.watch-map .maplibregl-ctrl-top-right { top: 68px; right: 10px; }
.watch-map .maplibregl-ctrl-group { border-radius: 10px; box-shadow: 0 2px 10px #28395018; overflow: hidden; }
.watch-map .maplibregl-ctrl-group button { width: 36px; height: 36px; }
.map-prompt {
  position: absolute; top: 76px; left: 24px; font-size: 13px; color: #68717b;
  background: #ffffffcf; padding: 8px 12px; border-radius: 8px; pointer-events: none;
}
.map-status { position: absolute; top: 42%; left: 15%; right: 15%; padding: 15px; text-align: center; background: #fffffff2; border-radius: 12px; font-size: 14px; line-height: 1.5; color: var(--muted); pointer-events: none; }
.map-key { position: absolute; left: 24px; bottom: 27px; z-index: 2; max-width: calc(100% - 70px); }
.map-key > summary { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 10px; background: #fffffff0; color: #5b6673; font-size: 12px; box-shadow: 0 2px 10px #29384a12; width: max-content; }
.map-key .icon { width: 15px; height: 15px; }
.map-legend {
  position: absolute; left: 0; bottom: calc(100% + 8px); width: 272px; max-width: calc(100vw - 70px);
  padding: 17px; border: 1px solid #e2e5ea; border-radius: 13px; background: white; box-shadow: 0 8px 30px #29384a20;
}
.map-legend span { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; font-size: 13px; color: #4f5967; }
.map-legend i { width: 9px; height: 9px; border-radius: 50%; background: #7e96a8; }
.map-legend i.recent-dot { background: #2478cb; outline: 1px solid #2478cb; outline-offset: 2px; }
.map-legend p { font-size: 12px; line-height: 1.5; color: var(--muted); margin-top: 12px; }
.watch-pin { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; padding: 0; }
.watch-pin span {
  display: grid; place-items: center; min-width: 25px; height: 25px; padding: 0 4px;
  border-radius: 50%; background: #7e96a8; color: white; border: 2px solid white;
  box-shadow: 0 2px 6px #263f552b; font-size: 11px; font-weight: 650;
}
.watch-pin.recent span { background: #2478cb; }
.watch-pin[aria-pressed=true] { z-index: 2; }
.watch-pin[aria-pressed=true] span { min-width: 32px; height: 32px; font-size: 13px; background: var(--blue); outline: 6px solid #1769c91e; }
.watch-pin:hover span { background: #3d6f9b; }
.detail-panel {
  position: absolute; right: 24px; bottom: 40px; width: 340px; max-height: calc(100% - 140px);
  overflow-y: auto; scrollbar-width: thin; padding: 28px 24px 12px; z-index: 3;
  border: 1px solid #ffffffd9; border-radius: 20px; background: #ffffffed;
  box-shadow: 0 12px 40px #20324722, 0 2px 6px #2032470a;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.close-detail {
  position: absolute; right: 12px; top: 12px; display: grid; place-items: center;
  width: 30px; height: 30px; border: 0; border-radius: 50%; background: #eef0f2; color: #787f87;
}
.close-detail:hover { background: #e4e7eb; color: #343b43; }
.detail-status { font-size: 12px; color: #7b828c; margin-bottom: 8px; padding-right: 20px; }
.project-detail h3 { font-size: 23px; line-height: 1.18; font-weight: 650; letter-spacing: -.035em; margin-bottom: 8px; }
.detail-address { font-size: 14px; color: var(--muted); line-height: 1.5; }
.detail-value { margin: 20px 0; display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.detail-value strong { font-size: 26px; font-weight: 600; letter-spacing: -.04em; }
.detail-value span { font-size: 12px; color: #7e858d; }
.detail-company { padding-bottom: 18px; }
.detail-company strong { font-size: 16px; font-weight: 550; line-height: 1.4; display: block; }
.detail-company p { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.detail-phone { display: block; font-size: 14px; color: #3c638a; margin-top: 9px; }
.detail-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 15px; }
.detail-links a { padding: 11px 5px; border-radius: 9px; background: #edf2f8; text-align: center; font-size: 13px; font-weight: 550; text-decoration: none; }
.detail-links a:hover { background: #e4edf8; }
.detail-links a:first-child { background: var(--blue); color: #fff; }
.detail-links a:first-child:hover { background: #1259ae; }
.detail-disclosure { border-top: 1px solid var(--line); padding: 0; }
.detail-disclosure summary { min-height: 46px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 550; color: #4d5764; gap: 12px; }
.detail-disclosure summary::after { content: ""; width: 6px; height: 6px; flex: none; border: solid #89919c; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); margin-right: 3px; transition: transform .18s; }
.detail-disclosure[open] summary::after { transform: rotate(225deg); }
.detail-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; margin: 2px 0 18px; }
.detail-facts div { min-width: 0; }
.detail-facts dt { color: #838a93; font-size: 12px; margin-bottom: 5px; }
.detail-facts dd { margin: 0; font-size: 14px; line-height: 1.4; color: #384452; overflow-wrap: anywhere; }
.source-note,.detail-context { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 14px; }
.detail-context strong { color: #4d5764; display: block; font-size: 13px; margin-bottom: 6px; font-weight: 600; }
.raw-description { margin: 0 0 17px; color: #66717f; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
@media(max-width:1100px) and (min-width:700px) {
  #workspace { grid-template-columns: 300px minmax(0,1fr); }
  .sidebar-top { padding-inline: 18px; }.sidebar-top h2 { font-size: 24px; }
  .sidebar-top .area-subtitle { font-size: 13px; }
  .view-tabs { margin-inline: 18px; }
  .detail-panel { width: 300px; right: 14px; bottom: 40px; padding-inline: 20px; }
  .map-topline { left: 16px; right: 14px; }.map-summary { max-width: calc(100% - 90px); }
  .map-prompt,.map-key { left: 16px; }
}
@media(max-width:699px) {
  body { height: auto; min-height: 100dvh; overflow: auto; }
  .app-header { height: 56px; padding: 0 16px; gap: 9px; }
  .app-header h1 { font-size: 16px; }.app-caption,.header-divider { display: none; }
  .header-end { gap: 12px; font-size: 12px; }.sample-label { font-size: 10px; padding: 5px 7px; }
  #workspace { display: flex; flex-direction: column; }
  .sidebar { display: contents; }
  .sidebar-top { order: 0; padding: 20px 18px 8px; background: white; }
  .sidebar-top h2 { font-size: 26px; }.eyebrow { font-size: 10px; }
  .area-subtitle { display: none; }
  .search-control { margin-top: 15px; }.search-control input { min-height: 44px; font-size: 16px; }
  .filter-row { margin-top: 6px; }.filter-menu > summary { min-height: 38px; }
  .filter-popover { left: 12px; right: 12px; max-height: min(530px,calc(100dvh - 260px)); padding: 18px; }
  .field-label,.scope-chips button { font-size: 14px; }
  .map-stage { order: 1; min-height: 0; background: #f4f6f8; }
  .map-frame { position: relative; height: 420px; height: clamp(350px,52dvh,470px); }
  .map-topline { top: 14px; left: 14px; right: 14px; gap: 8px; }
  .map-summary { padding: 9px 10px; max-width: calc(100% - 85px); font-size: 11px; }
  .fit { padding: 8px 10px; min-height: 36px; font-size: 12px; }.fit .icon { width: 15px; height: 15px; }
  .map-prompt { left: 14px; top: 62px; font-size: 11px; padding: 7px 9px; }
  .watch-map .maplibregl-ctrl-top-right { top: 61px; right: 4px; }
  .watch-map .maplibregl-ctrl-group button { width: 34px; height: 34px; }
  .map-key { left: 14px; bottom: 57px; }.map-key > summary { padding: 9px 10px; font-size: 11px; }
  .map-legend { padding: 14px; }.map-legend p { font-size: 12px; }
  .detail-panel {
    position: relative; right: auto; bottom: auto; width: auto; max-height: none;
    margin: 12px; padding: 26px 22px 10px; border-radius: 17px; background: white; box-shadow: 0 2px 12px #2032470c;
  }
  .close-detail { width: 36px; height: 36px; top: 10px; right: 10px; }
  .project-detail h3 { font-size: 24px; }.detail-status { padding-right: 25px; }
  .detail-links a { min-height: 44px; font-size: 14px; }.detail-disclosure summary { min-height: 50px; font-size: 14px; }
  .sidebar-body { order: 2; background: white; min-height: 340px; padding-top: 18px; }
  .view-tabs { margin-inline: 18px; }.view-tabs button { padding: 11px; }
  .project-list { overflow: visible; padding-bottom: 16px; }
  .project-row { padding: 17px 14px; }.row-title { font-size: 15px; }.row-value { font-size: 14px; }.row-meta { font-size: 13px; }
  .insights-panel { overflow: visible; padding: 12px 24px 30px; }
  .metrics h3 { font-size: 13px; }.metrics p { font-size: 12px; }.metrics strong { font-size: 30px; }
  .sidebar-footer { order: 3; padding: 16px 24px 24px; font-size: 12px; }.sidebar-footer a { font-size: 13px; }
  .chart { height: 190px; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
