/* v0.25 visual polish: one clay icon language, clearer hierarchy and compact phones. */
:root{
  --hub-radius:20px;
  --hub-shadow:0 2px 3px #18332b0b,0 12px 28px #18332b12,0 30px 56px #18332b08;
  --hub-shadow-hover:0 5px 9px #18332b14,0 20px 42px #18332b1a;
}

/* The same small, tactile navigation objects on desktop and mobile. */
.nav-clay-icon{display:block;width:31px;height:31px;object-fit:contain;filter:drop-shadow(0 3px 3px #061b1636)}
.desktop-nav a>span:first-child{height:40px;background:#ffffff0f}
.desktop-nav a.active>span:first-child{background:linear-gradient(145deg,#3b8f77,#1e6655);box-shadow:inset 0 1px #ffffff2e,0 6px 14px #071b173b}
.workspace-emoji{overflow:hidden;background:linear-gradient(145deg,#fff,#dceee5);box-shadow:inset 0 1px #fff,0 4px 10px #173f3218}
.workspace-emoji img{width:33px;height:33px;object-fit:contain}
.mobile-nav .nav-clay-icon{width:29px;height:29px;filter:drop-shadow(0 2px 2px #173f322f)}
.mobile-nav a{transition:transform .16s ease,background-color .16s ease,color .16s ease}
.mobile-nav a.active{box-shadow:inset 0 -3px #176953}
.mobile-nav a:active{transform:scale(.94)}

/* Purposeful visual mapping. Explicit classes win over page-wide defaults. */
.visual-insights{--card-visual:url("icon-insights-3d.png")!important}
.visual-documents{--card-visual:url("icon-documents-3d.png")!important}
.visual-company{--card-visual:url("icon-company-3d.png")!important}
.visual-settings{--card-visual:url("icon-more-3d.png")!important}
.visual-money{--card-visual:url("icon-money-3d.png")!important}
.visual-opportunities{--card-visual:url("icon-explore-3d.png")!important}
.visual-tasks{--card-visual:url("icon-tasks-3d.png")!important}
.visual-entries{--card-visual:url("icon-entries-3d.png")!important}

/* Tiles with their own visible artwork should not repeat a corner watermark. */
.link-tile::before,.hub-quick-actions a::before,.research-stat::before{display:none!important}
.link-tile>span:first-child,.hub-quick-actions a>span{overflow:hidden;background:linear-gradient(145deg,#f8fcf9,#deeee6);box-shadow:inset 0 1px #fff,0 5px 12px #173f3215}
.link-tile img,.hub-quick-actions img,.research-stat img{display:block;width:38px;height:38px;object-fit:contain}
.hub-quick-actions a>span img{width:39px;height:39px}
.research-stat>span{display:grid;place-items:center;width:39px;height:39px;border-radius:12px;background:#ffffffa8;box-shadow:inset 0 1px #fff,0 5px 12px #173f3214}
.research-stat>span img{width:35px;height:35px}

/* A quieter material system with depth reserved for interactive surfaces. */
:where(.panel,.card,.loan-card,.funding-card,.link-tile,.property-tile,.research-stat){border-radius:var(--hub-radius);box-shadow:var(--hub-shadow)}
:where(a.link-tile,a.research-stat,a.insight-summary-link,.property-tile){transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease}
:where(a.link-tile,a.research-stat,a.insight-summary-link):hover,
:where(a.link-tile,a.research-stat,a.insight-summary-link):focus-visible{transform:translateY(-3px);border-color:#89bda7;box-shadow:var(--hub-shadow-hover)}
:where(a.link-tile,a.research-stat,a.insight-summary-link):active{transform:translateY(0) scale(.985)}
.button,button{box-shadow:0 4px 10px #174d3d18;transition:transform .15s ease,box-shadow .15s ease,background-color .15s ease}
.button:active,button:active{transform:scale(.975);box-shadow:0 1px 3px #174d3d18}

/* Insights: headline statistics first, evidence below. */
.insights-heading{position:relative;overflow:hidden;padding:22px 132px 22px 22px;border:1px solid #d5e6dd;border-radius:22px;background:
  url("icon-insights-3d.png") calc(100% - 26px) center/86px 86px no-repeat,
  radial-gradient(circle at 90% 5%,#cceadd 0 105px,transparent 106px),
  linear-gradient(135deg,#fff,#f1f8f3)}
.insights-heading>*{position:relative;z-index:1}.insights-heading>.button{margin-left:auto}
.market-pulse{margin:14px 0;padding:20px;border:1px solid #bfdccd;border-radius:22px;background:linear-gradient(135deg,#17323b,#1d6454);color:#fff;box-shadow:0 17px 40px #173e3a24}
.market-pulse-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:15px}
.market-pulse-heading h2{margin:2px 0 0;font-size:21px}.market-pulse-heading .eyebrow{margin:0;color:#9edfc3}
.estimate-chip{padding:5px 10px;border:1px solid #ffffff42;border-radius:999px;background:#ffffff16;color:#d8eee5;font-size:10px;font-weight:750;white-space:nowrap}
.market-pulse-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.market-pulse-grid>div{min-width:0;padding:13px;border:1px solid #ffffff20;border-radius:14px;background:#ffffff0c}
.market-pulse-grid small,.market-pulse-grid strong,.market-pulse-grid span{display:block}
.market-pulse-grid small{color:#b9dbcf;font-size:10px}.market-pulse-grid strong{margin:4px 0;font-size:20px;overflow-wrap:anywhere}.market-pulse-grid span{color:#c9ded6;font-size:10px;line-height:1.3}
.market-pulse-grid .trend-up{color:#b9f0d7}.market-pulse-grid .trend-down{color:#ffd0c4}
.decision-pipeline{overflow:hidden}.decision-pipeline>.section-heading{padding-right:45px}
.pipeline-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.pipeline-grid a{display:grid;gap:10px;padding:12px;border:1px solid var(--line);border-radius:13px;background:#f8faf8;color:var(--ink);text-decoration:none}
.pipeline-grid span{display:flex;align-items:baseline;gap:8px;min-width:0}.pipeline-grid b{font-size:22px}.pipeline-grid small{color:var(--muted);font-size:10px;line-height:1.2}
.pipeline-grid i{display:block;width:100%;height:7px;overflow:hidden;border-radius:999px;background:#e0e9e3}
.pipeline-grid i::after{content:"";display:block;width:max(9px,var(--pipeline-width));height:100%;border-radius:inherit;background:linear-gradient(90deg,#1d755d,#70b595)}
/* v0.41.1: bar widths are classes in 5% steps, because the security policy blocks inline style attributes. */
.pipeline-grid i{--pipeline-width:0%}.pipeline-grid i.pw-5{--pipeline-width:5%}.pipeline-grid i.pw-10{--pipeline-width:10%}.pipeline-grid i.pw-15{--pipeline-width:15%}.pipeline-grid i.pw-20{--pipeline-width:20%}.pipeline-grid i.pw-25{--pipeline-width:25%}.pipeline-grid i.pw-30{--pipeline-width:30%}.pipeline-grid i.pw-35{--pipeline-width:35%}.pipeline-grid i.pw-40{--pipeline-width:40%}.pipeline-grid i.pw-45{--pipeline-width:45%}.pipeline-grid i.pw-50{--pipeline-width:50%}.pipeline-grid i.pw-55{--pipeline-width:55%}.pipeline-grid i.pw-60{--pipeline-width:60%}.pipeline-grid i.pw-65{--pipeline-width:65%}.pipeline-grid i.pw-70{--pipeline-width:70%}.pipeline-grid i.pw-75{--pipeline-width:75%}.pipeline-grid i.pw-80{--pipeline-width:80%}.pipeline-grid i.pw-85{--pipeline-width:85%}.pipeline-grid i.pw-90{--pipeline-width:90%}.pipeline-grid i.pw-95{--pipeline-width:95%}.pipeline-grid i.pw-100{--pipeline-width:100%}
.insight-summary-link{overflow:hidden;min-height:126px;padding-right:62px!important}.insight-summary-link strong{font-size:31px}.insight-summary-link::before{opacity:.84!important}
.insight-panel svg{background:linear-gradient(180deg,#fbfdfc,#f3f8f5)}

/* Property cards read as compact decision sheets. */
.property-tile{background:linear-gradient(180deg,#fff,#fcfdfc);isolation:isolate}
.property-photo{background:radial-gradient(circle at 48% 35%,#f9fcfa 0 18%,#e0efe8 52%,#cbded5 100%)}
.photo-placeholder img{width:min(42%,118px)!important;height:auto!important;object-fit:contain!important;filter:drop-shadow(0 12px 10px #173f322b)}
.photo-placeholder small{padding:4px 9px;border-radius:999px;background:#ffffffa8;color:#4f6a60;font-weight:700}
.property-specs{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 8px}
.property-specs span,.confidence-pill{display:inline-flex;align-items:center;min-height:27px;padding:4px 8px;border:1px solid #d8e4dd;border-radius:999px;background:#f7faf8;color:#50665d;font-size:10px;font-weight:700;line-height:1.2}
.property-specs .heating-gas{border-color:#bfe0cf;background:#e9f6ef;color:#17634e}
.property-specs .heating-oil{border-color:#ecd2a4;background:#fff5e1;color:#815716}
.confidence-pill{margin-bottom:3px;border-color:#e6d4a9;background:#fff5df;color:#80591a}
.confidence-pill.confidence-high{border-color:#baddca;background:#e8f6ee;color:#17634e}
.confidence-pill.confidence-medium{border-color:#d6c7e4;background:#f3eef8;color:#6a4b85}
.property-keyline{margin-top:11px}.property-tile h2{font-size:19px}.property-meta{min-height:0}
.photo-badges .new-marker{animation:new-house-pulse 2.4s ease-in-out infinite}
.workbench-placeholder{overflow:hidden;background:radial-gradient(circle at 40% 25%,#fff,#dcece4)}
.workbench-placeholder img{width:58px!important;height:58px!important;object-fit:contain!important}
.dashboard-opportunity-photo.placeholder img{width:76%;height:76%;object-fit:contain;filter:drop-shadow(0 7px 6px #071f1954)}
@keyframes new-house-pulse{0%,70%,100%{box-shadow:0 2px 7px #102b2625}82%{box-shadow:0 0 0 6px #d8a44838,0 2px 9px #102b2633}}

/* Dark theme keeps separation without making every surface pure black. */
html[data-theme=dark] .insights-heading{border-color:#345057;background:
  url("icon-insights-3d.png") calc(100% - 26px) center/86px 86px no-repeat,
  radial-gradient(circle at 90% 5%,#285247 0 105px,transparent 106px),
  linear-gradient(135deg,#1d2f35,#18272d)}
html[data-theme=dark] .pipeline-grid a,html[data-theme=dark] .property-specs span{background:#18282e;border-color:#345057;color:#dceae4}
html[data-theme=dark] .pipeline-grid i{background:#2d4542}
html[data-theme=dark] .market-pulse{border-color:#315d50;background:linear-gradient(135deg,#13272e,#174c40)}
html[data-theme=dark] .property-tile{background:linear-gradient(180deg,#1d2c33,#19282e)}
html[data-theme=dark] .property-specs .heating-gas{background:#183c33;color:#bee8d7;border-color:#2d6453}
html[data-theme=dark] .property-specs .heating-oil{background:#493a23;color:#ffe0a6;border-color:#6a5331}
html[data-theme=dark] .confidence-pill{background:#493a23;color:#ffe0a6;border-color:#6a5331}
html[data-theme=dark] .confidence-pill.confidence-high{background:#183c33;color:#bee8d7;border-color:#2d6453}
html[data-theme=dark] .confidence-pill.confidence-medium{background:#372f48;color:#e0cfef;border-color:#55486b}
html[data-theme=dark] .insight-panel svg{background:linear-gradient(180deg,#17262b,#1c2e33)}
html[data-theme=dark] .link-tile>span:first-child,html[data-theme=dark] .hub-quick-actions a>span,html[data-theme=dark] .research-stat>span{background:linear-gradient(145deg,#355147,#223b35)}

@media(max-width:900px){
  .market-pulse-grid,.pipeline-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:620px){
  .workspace-header{box-shadow:0 7px 18px #172c3611}
  .workspace-title small{display:none}.workspace-emoji img{width:29px;height:29px}
  .mobile-nav{grid-template-columns:repeat(5,minmax(0,1fr))!important;padding-top:5px;background:#fffffff5;box-shadow:0 -9px 26px #172c361b}
  .mobile-nav a{min-height:62px!important;border-radius:14px!important}.mobile-nav a.active{background:linear-gradient(180deg,#edf8f2,#dcefe5)!important}
  .mobile-nav .nav-clay-icon{width:30px;height:30px}.mobile-nav small{font-size:8.5px!important;letter-spacing:-.02em}
  .insights-heading{padding:16px;border-radius:18px;background:linear-gradient(135deg,#fff,#edf7f1)}
  .insights-heading::after{content:"";position:absolute;right:9px;top:8px;width:48px;height:48px;background:url("icon-insights-3d.png") center/contain no-repeat;opacity:.2}
  html[data-theme=dark] .insights-heading{background:linear-gradient(135deg,#1d2f35,#18272d)}
  .insights-heading>.button{width:100%;margin-top:12px}.insight-summary-grid{gap:8px}
  .insight-summary-link{min-height:111px;padding:13px 50px 13px 13px!important}.insight-summary-link strong{font-size:25px}
  .market-pulse{padding:16px;border-radius:18px}.market-pulse-grid{gap:7px}.market-pulse-grid>div{padding:10px}.market-pulse-grid strong{font-size:17px}
  .decision-pipeline{padding:16px}.decision-pipeline>.section-heading{padding-right:35px}.pipeline-grid{gap:7px}.pipeline-grid a{padding:10px}.pipeline-grid span{display:grid;gap:1px}.pipeline-grid b{font-size:19px}
  .property-photo{aspect-ratio:16/8.7}.property-tile-body{padding:14px}.property-specs{gap:5px}.property-specs span{font-size:9.5px;padding-inline:7px}
  .hub-quick-actions a>span img{width:36px;height:36px}.link-tile img{width:36px;height:36px}
}

@media(max-width:360px){
  .workspace main{padding-left:9px;padding-right:9px}.mobile-nav{padding-inline:1px}.mobile-nav a{min-height:60px!important}.mobile-nav .nav-clay-icon{width:27px;height:27px}.mobile-nav small{font-size:7.8px!important}
  .market-pulse-grid,.pipeline-grid{grid-template-columns:1fr 1fr}.market-pulse-grid span{display:none}
  .property-keyline{gap:6px}.property-keyline>span{padding:9px}.property-keyline strong{font-size:15px}.property-tile-actions{gap:7px}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important}
  .photo-badges .new-marker{animation:none}.mobile-nav a,.button,button{transition:none!important}
}

@media print{
  .insights-heading,.market-pulse{background:#fff!important;color:#000!important;box-shadow:none}.insights-heading{padding:14px}.insights-heading::after{display:none}.market-pulse-grid small,.market-pulse-grid span{color:#444}
}

/* v0.29.1: keep headings, their links and card arrows clear of the corner icon */
.panel>h2:first-child,.panel>.section-heading:first-child{padding-right:52px}
.loan-card.card-action>b[aria-hidden]{margin-right:50px}
@media(max-width:620px){.panel>h2:first-child,.panel>.section-heading:first-child{padding-right:46px}.loan-card.card-action>b[aria-hidden]{margin-right:44px}}
/* v0.29.1: the house comparison scrolls sideways on phones instead of squashing labels and prices */
@media(max-width:620px){
  .panel>.table-scroll:first-child{margin-top:42px}
  .table-scroll .comparison-table{table-layout:auto;min-width:560px}
  .table-scroll .comparison-table th,.table-scroll .comparison-table td{white-space:normal;overflow-wrap:normal;word-break:normal}
  .table-scroll .comparison-table th:first-child{width:auto;min-width:118px}
  .table-scroll .comparison-table td{min-width:128px}
}
/* v0.34.0 visual tidy-up: short house rows, verdict colours, problems first, fewer corner icons. */
:where(.panel,.card,.loan-card,.funding-card,.balance-hero,.money-bank,.dashboard-opportunity,.research-stat,.market-insight-link,.link-tile):not(details)::before{display:none!important}
.loan-card.card-action>b[aria-hidden]{margin-right:0}
@media(max-width:620px){.panel>h2:first-child,.panel>.section-heading:first-child{padding-right:0}.loan-card.card-action>b[aria-hidden]{margin-right:0}}
.house-rows{display:flex;flex-direction:column;gap:10px;margin:0 0 18px}
.house-row{display:grid;grid-template-columns:84px minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px 12px 10px 10px;border:1px solid var(--line,#dce7df);border-left:5px solid #9aa9a4;border-radius:14px;background:var(--white,#fff);color:var(--ink,#14231f);text-decoration:none;box-shadow:0 1px 4px #102b2612}
.house-row:hover,.house-row:focus-visible{border-color:#90bea9;box-shadow:0 6px 16px #173f321c}
.house-row>img,.house-row-placeholder{width:84px;height:72px;object-fit:cover;border-radius:10px;display:block}
.house-row-placeholder{display:grid;place-items:center;background:radial-gradient(circle at 40% 25%,#fff,#dcece4)}.house-row-placeholder img{width:56px;height:56px;object-fit:contain}
.house-row-main{min-width:0;display:flex;flex-direction:column;gap:3px}
.house-row-main strong{font-size:15px;line-height:1.25;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}
.house-row-main small{font-size:12.5px;color:var(--muted,#536960)}
.house-row-rank{color:var(--muted,#536960);font-weight:700}
.house-row-tags{display:flex;flex-wrap:wrap;gap:5px;align-items:center}.house-row-tags .deal-badge{font-size:11.5px;padding:3px 8px;white-space:nowrap}
.house-row-new,.house-row-warn{font-size:11px;font-weight:800;padding:2px 7px;border-radius:99px}
.house-row-new{background:#fff1d6;color:#7a4a00}.house-row-warn{background:#fbe3df;color:#8a2c1d}
.house-row-nums{display:flex;flex-direction:column;align-items:flex-end;gap:2px;text-align:right;font-size:12px;color:var(--muted,#536960);white-space:nowrap}
.house-row-nums b{font-size:15.5px;color:var(--ink,#14231f)}
.house-row-key{display:flex;flex-wrap:wrap;gap:6px 14px;margin:4px 2px 0;font-size:12px;color:var(--muted,#536960)}
.house-row-key span::before{content:"";display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:5px;vertical-align:-1px;background:currentColor}
.house-row-key span{color:var(--muted,#536960)}.house-row-key .key-positive::before{background:#1c8a63}.house-row-key .key-neutral::before{background:#3a6ea5}.house-row-key .key-review::before{background:#d08a12}.house-row-key .key-negative::before{background:#c2513c}
.verdict-positive{border-left-color:#1c8a63!important}.verdict-neutral{border-left-color:#3a6ea5!important}.verdict-review{border-left-color:#d08a12!important}.verdict-negative{border-left-color:#c2513c!important}.verdict-archived{border-left-color:#9aa9a4!important}
.property-tile[class*=verdict-],.workbench-row[class*=verdict-]{border-left-width:5px;border-left-style:solid}
.research-results>.opportunity-grid{display:none}
@media(min-width:1200px){
 .house-rows{display:none}
 .workbench-row{grid-template-columns:104px minmax(0,1fr);padding:12px 12px 12px 10px}
 .workbench-row img,.workbench-row .workbench-placeholder{width:104px;height:86px}
}
@media(max-width:420px){.house-row{grid-template-columns:72px minmax(0,1fr) auto;gap:10px}.house-row>img,.house-row-placeholder{width:72px;height:64px}.house-row-main strong{font-size:14px}}
@media print{.house-rows{display:none!important}.research-results>.opportunity-grid{display:grid!important}}
.deal-group-title{font-size:13px;letter-spacing:.04em;text-transform:uppercase;margin:14px 0 8px}
.deal-group-problems{color:#8a2c1d}.deal-group-unknown{color:var(--muted,#536960)}
.deal-passed,.fine-print{margin-top:12px;border:1px solid var(--line,#dce7df);border-radius:12px;padding:10px 14px;background:transparent;box-shadow:none}
.deal-passed>summary,.fine-print>summary{cursor:pointer;font-weight:700;color:#0f5c44}
.fine-print>summary{color:var(--muted,#536960);font-weight:600}
.deal-passed[open]>summary,.fine-print[open]>summary{margin-bottom:10px}
.report-decision:empty{display:none}.report-decision .quick-decision{margin:0 0 16px}
html[data-theme=dark] .house-row{background:#192a31;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .house-row-nums b{color:var(--ink)}
html[data-theme=dark] .house-row-new{background:#4a3a14;color:#ffd98a}html[data-theme=dark] .house-row-warn{background:#4f2219;color:#ffc3b6}
html[data-theme=dark] .deal-group-problems{color:#ffc3b6}html[data-theme=dark] .deal-passed>summary{color:#bdf0d8}
