body.midnight[data-theme] {
  color-scheme: dark;
  --ink: #f1f3f6;
  --muted: #b9c7d7;
  --line: #344358;
  --blue: #b9d1f2;
  background: #111923;
  color: #f1f3f6;
}
body.midnight :is(.workspace,.work-title,.sidebar,.member-head,.record,.record-list,.record-head,.record-body,.search-evidence,.search-facets,.grid-table,.table-head,.table-row,.tabs,.fact,.empty,.saved-row,.more-filters) {
  color: #f1f3f6;
  background: #192532;
  border-color: #344358;
}
body.midnight .workspace { background: #111923; }
body.midnight :is(.table-head,.tabs,.fact,.record-list a[aria-current="page"],.sidebar a[aria-current="page"]) {background:#253446;}
body.midnight :is(a,.text-link,.source) { color: #c1d8f7; border-color: #344358; }
body.midnight :is(p,small,.label,dt,.result-count) { color:#b9c7d7; }
body.midnight :is(button,input,select,textarea) { color:#f1f3f6; background:#202e3e; border-color:#46566b; }
body.midnight button[aria-pressed="true"] {background:#30445c;color:#fff;}
body.midnight :is(.relationship,.party,.filter-matches) {border-color:#344358;color:#e4ebf3;}
body.midnight .sector-mark {
  --sector: #a6bddc;
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  margin: .2rem .4rem;
  color: #d9e3ef;
  font-size: .76rem;
}
body.midnight .sector-mark::before {content:"";width:.4rem;height:.4rem;border-radius:50%;background:var(--sector);}
body.midnight .sector-mark[data-sector="Living"], body.midnight .sector-mark[data-sector="Residential"] {--sector:#b8c0cc;}
body.midnight .sector-mark[data-sector="Multi-sector"], body.midnight .sector-mark[data-sector="Retail"] {--sector:#d5b68e;}
body.midnight .sector-mark[data-sector="Data centres"], body.midnight .sector-mark[data-sector="Logistics"] {--sector:#bbb0d2;}
body.midnight .bookmark-action::before {content:"";display:inline-block;width:9px;height:12px;margin-right:7px;background:currentColor;clip-path:polygon(0 0,100% 0,100% 100%,50% 72%,0 100%);}
body.midnight .search-facets .filters {
  background: transparent;
  border-color: #344358;
  color: #f1f3f6;
}
body.midnight .search-facets :is(label, summary) { color: #d9e3ef; }

body.midnight .search-desk .search-facets {
  background: #293c53;
  border-color: #465b73;
}
body.midnight .search-facets :is(input, select) {
  background: #202e3e;
  border-color: #59708a;
}
body.midnight .search-facets select:has(option:checked:not([value=""])) {
  background: #344d69;
  border-color: #7995b4;
}
body.midnight .work-content:has(.deal-evidence-heading[data-sector="Living"]) .table-row:has(.sector-mark[data-sector="Living"]):has(.deal-select[aria-pressed="true"]),
body.midnight .record-head:has(.sector-mark[data-sector="Living"]),
body.midnight .search-evidence:has(.deal-evidence-heading[data-sector="Living"]),
body.midnight .research-evidence:has(.fact-quiet) {
  background: #2b313c;
  border-color: #586373;
}
body.midnight .record-head:has(.sector-mark[data-sector="Living"]) {
  box-shadow: inset 0 3px #b8c0cc;
}
body.midnight .search-evidence:has(.deal-evidence-heading[data-sector="Living"]),
body.midnight .research-evidence:has(.fact-quiet) {
  border-top-color: #b8c0cc;
}
body.midnight .record-list a[aria-current="page"]:has(.sector-mark[data-sector="Living"]) {
  background: #343c49;
  box-shadow: inset 3px 0 #b8c0cc;
}

/* Editorial workspace study */
body.midnight.studio {
  background: #111b29;
}
body.midnight.studio .workspace { background: #111b29; }
body.midnight.studio .work-title {
  background: transparent;
  border-bottom: 1px solid #46566b;
}
body.midnight.studio .work-title .label { display: none; }
body.midnight.studio .work-title h1 { letter-spacing: -.045em; font-size: clamp(26px, 4vw, 42px); }
body.midnight.studio .search-desk .search-facets {
  background: #31445b;
  border-color: #526780;
  padding: 14px;
}
body.midnight.studio :is(.record-head, .search-evidence) {
  background: #263443;
  border-color: #637489;
}
body.midnight.studio .record-head {
  box-shadow: inset 0 2px #aebdd0;
}
body.midnight.studio .record-head p { max-width: 64ch; }
body.midnight.studio .record-list a[aria-current="page"],
body.midnight.studio .table-row:has(.deal-select[aria-pressed="true"]) {
  background: #34404e;
  box-shadow: inset 3px 0 #b8c0cc;
}
body.midnight.studio .source { color: #d1e3fc; }
body.midnight.studio .search-evidence .fact strong { font-size: inherit; }
body.midnight.studio .sector-mark[data-sector="Living"] { --sector: #c2cad5; }
body.midnight.studio .source:focus-visible,
body.midnight.studio button:focus-visible { outline: 2px solid #d1e3fc; outline-offset: 2px; }

body.midnight.koyfin .work-title h1 {font-size:24px}
body.midnight.koyfin .work-title p {display:none}
body.midnight.koyfin .search-desk.search-desk {grid-template-columns:minmax(0,1fr) minmax(155px,31%)}
body.midnight.koyfin .research-layout {grid-template-columns:minmax(0,1fr) minmax(155px,32%)}
body.midnight.koyfin .record-list {grid-column:1/-1;display:flex;overflow:auto;max-height:none}
body.midnight.koyfin .record-list>a {flex:0 0 185px}
body.midnight.koyfin .record-list>.label {display:none}
body.midnight.koyfin .table-head {background:#34475f}
body.midnight.koyfin .table-row {padding-block:7px}
/* Macrobond-inspired light workbench */
body.macrobond[data-theme] {background:#e6edf5;color:#162a40;color-scheme:light;--rule:#cbd7e4}
body.macrobond .member-head {background:#152b43;color:#f4f7fb;border-color:#152b43}
body.macrobond .member-head a {color:#e1ebf7}
body.macrobond .workspace {background:#e6edf5}
body.macrobond .sidebar {background:#d7e3f0;border-color:#bccde0}
body.macrobond .sidebar a {color:#254565}
body.macrobond .sidebar a[aria-current="page"] {background:#f7faff;color:#152b43}
body.macrobond .work-content {background:#edf3fa;padding:clamp(14px,2vw,26px);min-width:0}
body.macrobond .work-title {border-bottom:1px solid #c4d2e1;padding-bottom:12px}
body.macrobond .work-title h1 {font-size:clamp(24px,3vw,36px);letter-spacing:-.04em}
body.macrobond .work-title .label {display:none}
body.macrobond :is(.search-desk.search-desk,.research-layout) {grid-template-columns:minmax(0,1fr);gap:12px}
body.macrobond :is(.search-facets,.search-evidence,.record,.record-head,.record-body,.record-list,.grid-table) {background:#fff;border-color:#cbd7e4;color:#162a40;min-width:0}
body.macrobond .search-facets .filters {background:transparent}
body.macrobond :is(.table-head,.record>.tabs,.search-evidence .fact) {background:#e4edf7;color:#203b57}
body.macrobond .record-list {display:flex;gap:4px;overflow:auto;max-height:none}
body.macrobond .record-list>a {flex:0 0 175px;padding:8px}
body.macrobond .record-list>.label {display:none}
body.macrobond .record-list a[aria-current="page"] {background:#e4edf7;border-color:#587da7}
body.macrobond .record-head {border-top:3px solid #587da7}
body.macrobond .record-head .sector-mark {margin-left:8px}
body.macrobond .record-head p {max-width:65ch}
body.macrobond .table-row:has(.deal-select[aria-pressed="true"]) {background:#eef4fc}
body.macrobond .source {color:#235582;overflow-wrap:anywhere}
body.macrobond .search-evidence .fact strong {font-size:inherit}
body.macrobond .sector-mark {font-size:.75rem;color:#405a73;margin-left:6px}
body.macrobond .bookmark-action::before {content:"";display:inline-block;width:9px;height:11px;margin-right:6px;background:currentColor;clip-path:polygon(0 0,100% 0,100% 100%,50% 72%,0 100%)}
@media(max-width:490px){body.midnight.koyfin :is(.search-desk.search-desk,.research-layout){grid-template-columns:minmax(0,1fr)}}

body.macrobond[data-theme="editorial"] {
  --ink:#162a40;
  --muted:#40566e;
  --blue:#235582;
  --rule:#cbd7e4;
  background:#edf3fa;
}
body.macrobond :is(.home-day,.editorial-row,.story-grid aside,.saved-row,.empty) {
  background:#fff;
  border-color:#cbd7e4;
}
body.macrobond .home-day {padding:clamp(12px,2vw,24px);}
body.macrobond .home-day h2 {border-bottom:1px solid #cbd7e4;padding-bottom:10px;}
body.macrobond .editorial-row {padding-inline:12px;}
body.macrobond .story-grid aside {padding:16px;}
body.macrobond .workspace :is(.sidebar,.work-content) {margin-top:0;}
body.macrobond .work-content :is(input,select,textarea) {
  background:#fff;color:#162a40;border-color:#aebfd2;
}
body.macrobond :is(.source,.text-link,.back) {color:#235582;}
body.macrobond :is(button,input,select,textarea,a):focus-visible {
  outline:2px solid #587da7;outline-offset:2px;
}
body.macrobond .fact strong {font-size:inherit;}

body.macrobond[data-theme="editorial"],
body.macrobond .workspace {background:#d8e0e9;}
body.macrobond .work-content {background:#e5ebf2;}
body.macrobond .raft-visual-banner:is(.hero,.compact,.story-head,.work-title) {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  background:linear-gradient(112deg,#152a40,#254360 78%,#2b5275);
  color:#f5f8fc;
  padding:clamp(18px,3vw,42px);
}
body.macrobond .raft-visual-banner :is(h1,p,.label) {color:#f5f8fc;}
body.macrobond .raft-visual-banner a {color:#dbeaff;}
body.macrobond .raft-visual-banner .raft-visual-motif > span {
  left:89%;top:105%;border-color:#b2d6ff59;
}
body.macrobond .raft-visual-banner .raft-visual-motif {
  mask-image:linear-gradient(90deg,transparent 12%,#000 77%);
}
body.macrobond .editorial-mast {grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);}
body.macrobond .editorial-mast h1 {font-size:clamp(35px,5.4vw,84px);}
body.macrobond .section-more {
  display:inline-block;margin-top:16px;padding:8px 16px;border:1px solid #9fadc0;
  background:#eef3f8;color:#1e4163;border-radius:4px;text-decoration:none;
}
body.macrobond .home-day-grid {grid-template-columns:repeat(3,minmax(0,1fr));}
body.macrobond :is(.record,.search-evidence,.work-title,.editorial-row) {overflow-wrap:anywhere;min-width:0;}
@media(max-width:700px){
  body.macrobond .editorial-mast,body.macrobond .home-day-grid {grid-template-columns:minmax(0,1fr);}
  body.macrobond .work-title {flex-wrap:wrap;}
  body.macrobond .grid-table {overflow-x:auto;}
  body.macrobond .grid-table :is(.table-head,.table-row) {min-width:340px;}
}

body.macrobond .raft-visual-banner h1[tabindex="-1"]:focus {outline:none;}
body.macrobond .home-day :is(.home-story,.section-more)[hidden] {display:none;}

body.macrobond .home-day-grid > .home-story {
  display:grid;
  grid-row:span 5;
  grid-template-rows:subgrid;
  row-gap:0;
  align-items:start;
}
body.macrobond .home-story > .news-picture figcaption {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

body.macrobond .home-story > .news-picture {
  min-width:0;
}
body.macrobond .home-story > .news-picture figcaption {
  overflow-wrap:anywhere;
  white-space:normal;
}
