/* One clear entry to the deal; its sections live inside the expanded card. */
body.is-almaro-collection #atlasInvestmentHUD .ih-owner-next-step { display:block; }
body.is-almaro-collection #atlasInvestmentHUD .ih-owner-next-step .ih-next-copy { margin-bottom:8px; }
body.is-almaro-collection #atlasInvestmentHUD .ih-show-deal-actions {
  display:flex;flex-wrap:nowrap;gap:8px;
}
body.is-almaro-collection #atlasInvestmentHUD .ih-show-deal-actions .ih-deal-action {
  display:flex;align-items:center;justify-content:center;
  min-width:44px;min-height:36px;grid-column:auto;padding:8px 12px;gap:6px;border-radius:6px;
  font-size:12px;line-height:1.2;letter-spacing:0;
}
body.is-almaro-collection #atlasInvestmentHUD .ih-show-deal-actions .ih-deal-primary { flex:1; }
body.is-almaro-collection #atlasInvestmentHUD .ih-show-deal-actions .ih-orbit { flex:0 0 auto;min-width:86px; }
body.is-almaro-collection #atlasInvestmentHUD .ih-action-icon { flex:none;width:18px;height:18px; }
body.is-almaro-collection #atlasInvestmentHUD .ih-action-label { display:block;white-space:nowrap; }
body.is-almaro-collection #atlasInvestmentHUD .ih-deal-action:focus-visible { outline:2px solid #2455a6;outline-offset:2px; }

/* Phone chrome floats over a continuous map; desktop keeps its own layout. */
@media (max-width:768px) {
  body.is-v2 {
    --phone-gutter:10px;
    --phone-top:calc(8px + env(safe-area-inset-top,0px));
    --phone-bottom:calc(8px + env(safe-area-inset-bottom,0px));
    --mbar-h:calc(68px + env(safe-area-inset-top,0px));
    --mtab-h:calc(72px + env(safe-area-inset-bottom,0px));
    --paper:#fff; --paper-raised:#fff; --paper-deep:#f3f6fb;
    background:transparent; overscroll-behavior:none;
  }
  body.is-v2 #app {
    --mbar-h:calc(68px + env(safe-area-inset-top,0px));
    --mtab-h:calc(72px + env(safe-area-inset-bottom,0px));
    inset:0; padding:0; background:transparent;
  }
  body.is-v2 #mapPhotoreal { inset:0; }

  /* Safe-area padding belongs outside the bars, where the map remains visible. */
  body.is-v2 #v2Mbar,
  body.is-v2 #v2Rail {
    box-sizing:border-box; border:1px solid rgba(255,255,255,.78);
    border-radius:8px; background:rgba(255,255,255,.9);
    box-shadow:0 3px 14px rgba(21,42,69,.14);
    backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
  }
  body.is-v2 #v2Mbar {
    left:var(--phone-gutter);right:var(--phone-gutter);top:var(--phone-top);
    height:52px;min-height:52px;padding:3px 5px;gap:4px;
  }
  body.is-v2 #v2Mbar .v2-mbrand { min-width:62px;width:62px;height:44px; }
  body.is-v2 #v2Mbar .v2-mbrand-logo { width:60px;height:30px;object-fit:contain; }
  body.is-v2 #v2Mbar .v2-mfilter {
    height:44px;padding:0 8px;border:0;border-radius:6px;
    background:rgba(232,239,250,.75);color:#244c83;
  }
  body.is-v2 #v2Mbar #v2MfilterLabel { font-size:12px;font-weight:500; }
  body.is-v2 #v2Mbar .v2-micon { width:44px;min-width:44px;height:44px;border-radius:6px;background:transparent; }
  body.is-v2 #v2Rail {
    left:50%;right:auto;top:auto;bottom:var(--phone-bottom);transform:translateX(-50%);
    width:calc(100% - 20px);max-width:430px;height:56px;padding:3px;gap:2px;
  }
  body.is-v2 #v2Rail .v2-rail-btn {
    height:48px;min-height:48px;min-width:44px;padding:5px 2px;
    gap:4px;background:transparent;color:#526681;border-radius:6px;box-shadow:none;
  }
  body.is-v2 #v2Rail .v2-rail-btn:has(.v2-rail-on:not([hidden])) { background:#e8effc;color:#2455a6;box-shadow:none; }
  body.is-v2 #v2Rail .v2-rail-label { font-size:10px;letter-spacing:0;font-weight:500; }
  body.is-v2 :is(#v2Mbar,#v2Rail) button:focus-visible { outline:2px solid #2455a6;outline-offset:-2px; }

  /* Floating menus keep the same safe-area boundary as the compact bars. */
  body.is-v2 #v2Mmenu {
    left:var(--phone-gutter);right:var(--phone-gutter);top:var(--mbar-h);
    max-height:calc(100dvh - var(--mbar-h) - var(--mtab-h));
    padding:12px;border:1px solid #dce4ef;border-radius:8px;background:#fff;
    box-shadow:0 8px 28px #152a4526;overscroll-behavior:contain;
  }
  body.is-v2 #v2Mmenu :is(.v2-mmenu-link,.v2-mmenu-login) {
    min-height:44px;margin-bottom:8px;border-radius:6px;
    font:500 13px/1.3 "IBM Plex Sans",system-ui,sans-serif;letter-spacing:0;text-transform:none;
  }
  body.is-v2 #v2Mmenu .v2-mmenu-label { margin-top:12px;font-size:10px;letter-spacing:.04em; }
  body.is-v2 #v2Mmenu .v2-mchip-btn { border-radius:6px;font-size:13px; }
  body.is-v2 #v2Mmenu .v2-mcamera>summary { display:flex;align-items:center;cursor:pointer; }
  body.is-v2 #v2Mmenu .v2-mcamera .v2-mmenu-chips { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:0 0 12px; }
  body.is-v2 #v2Mmenu .v2-mcamera .v2-mmenu-chips .v2-mmenu-link { display:flex;align-items:center;justify-content:center;min-width:0;min-height:44px;margin:0;padding:8px;font-size:12px;text-align:center; }
  body.is-v2 #v2Msearch .v2-mhit[aria-selected="true"] { background:#e8effc;color:#18498f;outline:2px solid #2455a6;outline-offset:-2px; }
  body.is-v2 #v2Msearch,
  body.is-v2 :is(.v2-panel-tasks,.v2-panel-wide,.v2-panel-sel,.v2-jarvis-panel,.v2-grok-panel) {
    left:var(--phone-gutter);right:var(--phone-gutter);top:var(--mbar-h);bottom:var(--mtab-h);
    width:auto;border:1px solid #dce4ef;border-radius:8px;background:#fff;overflow:hidden;
  }
  body.is-v2 #v2Msearch .v2-msearch-field { border-radius:6px; }
  body.is-v2 #lgLayersMenu {
    left:var(--phone-gutter);right:var(--phone-gutter);top:var(--mbar-h);bottom:auto;
    min-width:0;max-height:calc(100dvh - var(--mbar-h) - var(--mtab-h));overflow:auto;
  }
  body.is-v2 #lgLayersMenu:not([hidden]) { display:block!important; }
  body.is-v2 #lgLayersMenu button { min-height:44px; }
  body.is-almaro-collection #hospitalityCollection {
    background:rgba(255,255,255,.97);border:1px solid #dce4ef;border-radius:8px;
  }
  body.is-almaro-collection .hp-almaro-collection {
    left:var(--phone-gutter);right:var(--phone-gutter);top:var(--mbar-h);bottom:var(--mtab-h);width:auto;
  }

  /* Four headline figures use two compact rows on phones. */
  body.is-almaro-collection.has-investment-hud:not(.is-investment-details-open) #atlasInvestmentHUD {
    left:var(--phone-gutter);right:var(--phone-gutter);bottom:calc(var(--mtab-h) + 22px);
    transform:none;width:auto;padding:12px;border-radius:8px;background:rgba(255,255,255,.96);
    max-height:calc(100dvh - var(--mbar-h) - var(--mtab-h) - 30px);overflow:auto;
  }
  body.is-almaro-collection #atlasInvestmentHUD .ih-mobile-head { gap:4px;margin-bottom:8px; }
  body.is-almaro-collection #atlasInvestmentHUD .ih-property { display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;font-size:15px;line-height:1.25;white-space:normal;overflow:hidden;text-overflow:ellipsis; }
  body.is-almaro-collection #atlasInvestmentHUD .ih-place { font-size:10px; }
  body.is-almaro-collection #atlasInvestmentHUD .ih-property-nav { padding:0;gap:0;border:0;background:transparent; }
  body.is-almaro-collection #atlasInvestmentHUD .ih-property-nav button { font-size:22px;min-width:44px;width:44px;min-height:44px;height:44px; }
  body.is-almaro-collection #atlasInvestmentHUD .ih-position { display:inline;min-width:30px;padding:0;font-size:10px; }
  body.is-almaro-collection #atlasInvestmentHUD .ih-show-deal-actions .ih-deal-action { min-height:44px; }
  body.is-almaro-collection #atlasInvestmentHUD .ih-numbers {
    grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;margin-top:10px;padding-top:10px;
  }
  body.is-almaro-collection #atlasInvestmentHUD .ih-metric { padding:0;border:0;gap:3px; }
  body.is-almaro-collection #atlasInvestmentHUD .ih-label { min-height:0;font-size:10px;line-height:1.3; }
  body.is-almaro-collection #atlasInvestmentHUD .ih-metric strong { font-size:20px;line-height:1.15;letter-spacing:-.025em; }

  /* Expanded details use the available height. Only the content scrolls; exits stay visible. */
  body.is-almaro-collection .hp-deal-card,
  body.is-almaro-collection .hp-deal-card.dc-deal:not([hidden]) {
    left:var(--phone-gutter);right:var(--phone-gutter);bottom:calc(var(--mtab-h) + 22px);
    top:auto;transform:none;width:auto;border-radius:8px;
    max-height:min(62dvh,calc(100dvh - var(--mbar-h) - var(--mtab-h) - 30px));
  }
  body.is-almaro-collection .hp-deal-card .hp-card-head { flex-shrink:0;padding:14px 54px 10px 14px; }
  body.is-almaro-collection .hp-deal-card .hp-card-head h2 { font-size:18px;line-height:1.3; }
  body.is-almaro-collection .hp-deal-card .hp-card-scroll { min-height:0;overflow:auto;padding:12px 14px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch; }
  body.is-almaro-collection .hp-deal-card .hp-card-scroll p { font-size:13px;line-height:1.55; }
  body.is-almaro-collection .hp-deal-card .hp-section { margin:0;padding:10px 0; }
  body.is-almaro-collection .hp-deal-card [data-deal-panel]>.hp-section:first-child { padding-top:0; }
  body.is-almaro-collection .hp-deal-card .hp-section>p { margin:6px 0; }
  body.is-almaro-collection .hp-deal-card .hp-section>p:last-child { margin-bottom:0; }
  body.is-almaro-collection .hp-deal-card .hp-card-scroll h3 { margin:0 0 8px;font:600 16px/1.3 "IBM Plex Sans",system-ui,sans-serif; }
  body.is-almaro-collection .hp-deal-card .hp-card-scroll h4 { margin:10px 0 6px;font:600 14px/1.3 "IBM Plex Sans",system-ui,sans-serif; }
  body.is-almaro-collection .hp-deal-card .hp-project { margin:0;padding:10px 0; }
  body.is-almaro-collection .hp-deal-card .hp-project-heading h3 { margin:4px 0 0; }
  body.is-almaro-collection .hp-deal-card .hp-project-action { padding:10px;margin:8px 0; }
  body.is-almaro-collection .hp-deal-card .hp-project-action h3 { margin:8px 0 5px;font-size:14px; }
  body.is-almaro-collection .hp-deal-card .hp-milestones { margin-top:12px; }
  body.is-almaro-collection .hp-deal-card .hp-card-foot { display:flex;flex-shrink:0;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:8px 14px;background:#fff; }
  body.is-almaro-collection .hp-deal-card .hp-card-foot :is(a,button) { display:inline-flex;align-items:center;min-height:44px;font-size:12px; }
  body.is-almaro-collection .hp-deal-card .hp-deal-footer-actions { display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;width:100%; }
  body.is-almaro-collection .hp-deal-card .hp-deal-footer-actions :is(a,button) { min-width:0;white-space:nowrap;line-height:1.25; }
  body.is-almaro-collection .hp-deal-card .hp-expand>summary { min-height:44px;align-content:center;font-size:13px; }
  body.is-almaro-collection .hp-deal-card .hp-deal-facts { gap:12px; }
  body.is-almaro-collection .hp-deal-card .hp-table-scroll {
    display:block;box-sizing:border-box;width:100%;min-width:0;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;
    scrollbar-width:thin;scrollbar-color:#8aa4ca #eaf0f8;
  }
  body.is-almaro-collection .hp-deal-card .hp-table { font-size:12px; }
  body.is-almaro-collection .hp-deal-card .hp-table-scroll::-webkit-scrollbar { height:8px; }
  body.is-almaro-collection .hp-deal-card .hp-table-scroll::-webkit-scrollbar-track { background:#eaf0f8; }
  body.is-almaro-collection .hp-deal-card .hp-table-scroll::-webkit-scrollbar-thumb { background:#8aa4ca;border-radius:4px; }
  /* A single screening scenario fits the phone. Multi-scenario comparisons
     keep readable amount columns and a pinned row label while swiping. */
  body.is-almaro-collection #app[data-owner="0"] .hp-deal-card .hp-table:not(:has(thead th:nth-child(3))) {
    width:100%;min-width:0;table-layout:fixed;
  }
  body.is-almaro-collection #app[data-owner="0"] .hp-deal-card .hp-table:not(:has(thead th:nth-child(3))) :is(th,td) {
    padding:9px 8px;white-space:normal;overflow-wrap:anywhere;vertical-align:top;
  }
  body.is-almaro-collection #app[data-owner="0"] .hp-deal-card .hp-table:not(:has(thead th:nth-child(3))) th:first-child {
    width:56%;max-width:none;text-align:left;
  }
  body.is-almaro-collection #app[data-owner="0"] .hp-deal-card .hp-table:not(:has(thead th:nth-child(3))) :is(th,td):not(:first-child) {
    text-align:right;
  }

  body.is-almaro-collection .hp-deal-card .hp-table:has(thead th:nth-child(3)) {
    width:490px;min-width:490px;table-layout:fixed;
  }
  body.is-almaro-collection .hp-deal-card .hp-table:has(thead th:nth-child(3)) :is(th,td):not(:first-child) {
    width:120px;min-width:120px;white-space:normal;overflow-wrap:normal;word-break:normal;text-align:right;
  }
  body.is-almaro-collection .hp-deal-card .hp-table:has(thead th:nth-child(3)) th:first-child {
    position:sticky;left:0;z-index:1;box-sizing:border-box;min-width:130px;width:130px;max-width:130px;
    white-space:normal;background:#fff;box-shadow:2px 0 0 #e5eaf2;
  }
  body.is-almaro-collection .hp-deal-card .hp-table:has(thead th:nth-child(3)) :is(thead,tr.hp-total) th:first-child { background:#f0f5ff; }

  /* Keep required live credits in their own clear strip, without an opaque box. */
  body.is-v2 .v2-map .am-attribution--plain {
    left:12px;bottom:var(--mtab-h);max-width:calc(100% - 24px);
    padding:0;background:transparent;border:0;box-shadow:none;font-size:10px;line-height:1.25;
  }
  body.is-v2 .v2-map .am-attribution--plain .am-brand { font-size:11px; }
}
@media (min-width:600px) and (max-width:768px) and (max-height:500px) {
  body.is-almaro-collection.has-investment-hud:not(.is-investment-details-open) #atlasInvestmentHUD {
    left:var(--phone-gutter);right:auto;width:min(390px,calc(100vw - 20px));
  }
}
