/* Professional pages and the portfolio entrance share an editorial layout. */
html.editorial {
  color-scheme: light;
  --bg: #f7f8f5; --ink: #142c32; --body: #364e53; --quiet: #55686c; --border: #c8d4d1;
  --aqua: #125e60; --moon: #135e62; --rose: #475e63; --panel: #e6eeea; --deep: #fff;
  --pixel: "Segoe UI", Arial, sans-serif; --mast-height: 67px;
  --folio-margin: clamp(20px,5vw,86px);
  font-family: "Segoe UI", Arial, sans-serif; background: var(--bg); color: var(--ink);
  scroll-padding-top: calc(var(--mast-height) + 12px); scrollbar-gutter: stable;
}
.editorial body { min-height: 100svh; display: flex; flex-direction: column; }
.editorial main { flex: 1; }
.editorial :focus-visible { outline-color: #268e90; }
.folio-frame { width: min(1280px, calc(100% - var(--folio-margin) * 2)); margin-inline: auto; }
.folio-head { position:sticky; top:0; z-index:8; background:var(--bg); border-bottom: 1px solid var(--border); }
.head-inner, .wordmark, .head-inner nav, .folio-foot > div, .folio-foot nav, .folio-actions, .section-heading {
  display: flex; align-items: center;
}
.head-inner { gap: clamp(14px,2.4vw,38px); min-height: 66px; }
.folio-brand-tools { display:flex; align-items:center; flex-wrap:wrap; gap:8px 16px; margin-right:auto; }
.wordmark { gap: 10px; font-weight: 680; letter-spacing: -.035em; margin-right: auto; white-space: nowrap; }
.monogram {
  display: grid; place-items: center; height: 32px; width: 36px; border-radius: 3px;
  background: #164c50; color: white; font: 600 14px/1 Georgia,serif; letter-spacing: -.08em;
}
.head-inner nav { gap: clamp(11px,1.7vw,26px); }
.head-inner nav a, .front-contact, .view-switch, .folio-foot a, .backlink { font-size: 14px; font-weight: 600; }
.head-inner nav [aria-current], .editorial a:hover { color: var(--aqua); text-decoration: underline; text-underline-offset: 4px; }
.view-switch { border: 1px solid #94aaa5; padding: 8px 12px; border-radius: 4px; white-space: nowrap; }
.view-switch span { margin-inline-start: 4px; }
.folio-foot { margin-top: auto; border-top: 1px solid var(--border); color: var(--quiet); }
.folio-foot > div { justify-content: space-between; flex-wrap: wrap; gap: 13px; padding-block: 22px; font-size: 13px; }
.folio-foot nav { flex-wrap: wrap; gap: 8px 22px; }
.folio-foot a { font-size: 13px; }
.entrance { padding-block: clamp(32px,5.5vh,76px) clamp(30px,5vh,72px); }
.location, .section-label {
  color: var(--aqua); font: 650 12px/1.4 var(--mono); letter-spacing: .075em; text-transform: uppercase;
}
.entrance h1 {
  margin: .13em 0 .14em; font: 500 clamp(47px,6.4vw,88px)/1.06 Georgia, "Times New Roman", serif;
  letter-spacing: -.058em; color: var(--ink); text-wrap: balance;
}
.entrance h1 span, .folio-home h1 span { color: #248079; }
.entry-role { font-size: clamp(18px,1.55vw,23px); line-height: 1.4; color: var(--body); }
.choose-heading { font-size: 15px; font-weight: 650; margin: clamp(22px,4vh,48px) 0 13px; }
.entrances { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(14px,2.1vw,32px); }
.entry-card { display: block; color: var(--ink); border: 1px solid #b8c9c4; border-radius: 6px; overflow: hidden; background: #fff; }
.editorial .entry-card:hover { text-decoration: none; color: var(--ink); border-color: var(--aqua); }
.entry-art { position: relative; container-type: inline-size; width:100%; aspect-ratio: 2.5; min-height: 152px; overflow: hidden; }
.entry-label { padding: clamp(15px,1.8vw,26px); display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.entry-label h3 { font: 550 clamp(23px,2.4vw,34px)/1.12 Georgia,serif; letter-spacing: -.035em; }
.entry-label p { margin-top: 8px; max-width: 43ch; color: var(--body); font-size: 15px; line-height: 1.5; }
.entry-label b { display: grid; place-items: center; flex: none; width: 33px; height: 33px; border: 1px solid var(--border); border-radius: 50%; color: var(--aqua); }
.entry-card:hover .entry-label b { background: #145d5c; color: #fff; }
.analytical-art { display: grid; grid-template-columns:minmax(0,1fr); align-items: center; justify-items: center; background: #dbe7e1; }
.sales-figure {
  width: 84%; background: #15393d; color: #f1f8f2; padding: max(12px,2.8cqw) max(14px,4cqw);
  box-shadow: 5px 5px 0 #b1c9c0; border-radius: 2px;
}
.sales-figure figcaption span, .sales-figure small { display:block; font: 500 clamp(9px,1.8cqw,12px)/1.4 var(--mono); color: #c2ddd3; }
.sales-figure figcaption strong { display: block; margin: 2px 0 7px; font: 500 clamp(17px,4.4cqw,28px)/1.12 Georgia,serif; }
.sales-figure ul { margin: 0 0 5px; padding: 0; list-style: none; }
.sales-figure li { display: grid; grid-template-columns: 7.3em minmax(0,1fr) 3.7em; align-items: center; gap: .5em; font-size: clamp(10px,2.05cqw,13px); }
.bar-track { height: 1.55em; position: relative; border-left: 1px solid #446468; background: repeating-linear-gradient(to right,transparent 0 calc(20% - 1px),#36595a calc(20% - 1px) 20%); }
.bar-track::before { content: ""; position: absolute; inset: 0 auto 0 20%; border-left: 1px solid #bfd2c8; }
.bar-track i { position: absolute; top: 27%; height: 48%; background: #95d1b5; }
.bar-track .negative { background: #f2b19a; }
.sales-figure b { text-align: right; font-variant-numeric: tabular-nums; }
.london-art {
  background: url('/assets/dusk-moon.svg') 78% 12% / 13% auto no-repeat, url('/assets/dusk-stars.svg') center top / cover,
    linear-gradient(#25263e 0 15%,#38344d 15% 30%,#4e425e 30% 46%,#705573 46% 62%,#9d7487 62% 100%);
}
.entry-terrain { position: absolute; width: 100%; height: auto; bottom: 0; }
.entry-actor { position: absolute; width: 3.8%; bottom: 6.8cqw; left: 13%; }
.entry-art img { image-rendering: pixelated; }
/* Professional and creative pages use the same chapter order, docking behaviour and page structure. */
html.pro-view {
  --folio-margin: clamp(18px, 2.2vw, 52px); --frame-inset: var(--folio-margin);
  --page-gutter: clamp(24px, 4vw, 96px);
  --intro-column: 46%; --content-start: var(--folio-margin); --copy-padding: clamp(22px,3vw,56px);
}
.pro-view .folio-frame { width: 100%; padding-inline: var(--folio-margin); }
.pro-navs, .pro-navs nav { display:flex; align-items:center; }
.pro-navs { gap:clamp(12px,1.8vw,32px); }
.pro-navs nav { gap:clamp(12px,1.5vw,26px); }
.pro-navs > nav:last-child { border-left:1px solid var(--border); padding-left:clamp(12px,1.8vw,30px); color:var(--aqua); }
.pro-navs a { display:inline-flex; align-items:center; min-height:40px; }
.compact-nav { display:none; }
.pro-view .monogram { font:650 13px/1 var(--pixel); letter-spacing:-.03em; }
.pro-view .view-switch { font-size:13px; }
.pro-spread {
  display:grid; grid-template-columns:minmax(0,var(--intro-column)) minmax(0,1fr);
  min-height:calc(100svh - var(--mast-height) - var(--dock-height));
}
.spread-copy {
  padding:clamp(30px,4.3vh,68px) var(--copy-padding) clamp(30px,4.3vh,68px) var(--folio-margin);
  align-self:center; min-width:0;
}
.pro-view .location { font:650 12px/1.4 var(--pixel); letter-spacing:.1em; text-transform:uppercase; }
.pro-view .pro-spread h1, .pro-view .folio-profile h1 {
  margin:12px 0; color:var(--ink); font:650 clamp(34px,3.25vw,62px)/1.08 var(--pixel);
  letter-spacing:-.045em; text-wrap:balance;
}
.pro-view .entry-role { font-weight:600; color:var(--aqua); font-size:clamp(16px,1.3vw,22px); max-width:47ch; }
.intro-prose { align-self:stretch; display:grid; align-content:center; padding:clamp(28px,3.4vw,68px); background:#e6eeea; color:var(--body); font-size:clamp(16px,1.12vw,19px); line-height:1.55; }
.intro-prose p { max-width:65ch; }
.intro-prose p + p { margin-top:.74em; }
.folio-actions { gap:10px; flex-wrap:wrap; margin-top:22px; }
.primary-action, .plain-action { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:9px 16px; border-radius:4px; font:600 15px/1.35 var(--pixel); }
.primary-action, .editorial .primary-action:hover { color:#fff; background:var(--aqua); }
.plain-action { border:1px solid #96aaa6; color:var(--ink); }
.pro-view .project-dock, .pro-view .station-board { background:#edf2ee; border-color:#b2c4ba; box-shadow:none; }
.pro-view .station-board a { background:#fafcf9; border:1px solid #b8c9c0; border-radius:3px; }
.pro-view .station-board a:hover, .pro-view .drawer-handle:hover { background:#dce8e0; }
.pro-view .station-board a[aria-current] { border-color:#29665f; box-shadow:inset 3px 0 #29665f; background:#d4e5da; }
.pro-view .chapter-drawer[open] .drawer-handle { border-color:#b2c4ba; }
.pro-view .drawer-current, .pro-view .drawer-credit, .pro-view .station-copy small { color:#425c59; }
.pro-view .drawer-title, .pro-view .station-copy strong { font-family:var(--pixel); font-size:clamp(15px,1.1vw,19px); letter-spacing:-.015em; }
.pro-view .station-group[data-group="cleaning"] h3 { color:#315d55; }
.pro-view .drawer-action, .pro-view .drawer-current, .pro-view .drawer-credit { font-family:var(--pixel); }
.pro-view .folio-profile {
  display:grid; grid-template-columns:minmax(0,var(--intro-column)) minmax(0,1fr); align-content:start;
  width:100%; max-width:none; padding:clamp(26px,5vh,70px) var(--folio-margin);
}
.folio-profile header { padding-right:var(--copy-padding); }
.profile-detail { min-width:0; }
.profile-detail :is(article:first-child, section:first-child) { padding-top:0; border-top:0; }
.folio-profile h2, .folio-profile h3 { letter-spacing:-.025em; }
.folio-profile header > a { display:inline-block; margin:0 0 12px; }
.folio-profile .qual-group > h2, .folio-profile .qual-group + .qual-group > h2 { color:var(--aqua); }
.pro-view #contact-form :is(input,textarea) { color:var(--ink); background:#fff; }
.editorial .folio-profile :is(button,[data-preference-storage]) { color:#fff; background:#165c60; border-color:#165c60; border-radius:4px; }
/* The supplied report designs and notebook outputs keep a dark reading surface. */
.pro-case { --intro-column:clamp(285px,34%,580px); background:#172b30; }
.pro-case .evidence-area {
  color-scheme: dark; --ink: #edf4f2; --body: #c8d7d7; --quiet: #aebdc1; --border: #456164; --moon: #c3ded5; --aqua: #9dd8c9;
  --rose: #b5c6c9; --panel: #283b40; --deep: #15292e; --frame-inset: var(--folio-margin);

  color: var(--ink); background: #172b30; border-color: #30474a; padding-block:clamp(12px,1.8vh,24px) 38px;
}
.pro-case .viewer h1 { margin:5px 0 0; color:var(--ink); font:650 clamp(24px,2.2vw,37px)/1.1 var(--pixel); letter-spacing:-.035em; }
.pro-case .next-case { display:block; width:fit-content; margin-top:14px; color:var(--aqua); font-weight:600; text-decoration:underline; text-underline-offset:3px; }
.pro-case .project-summary { color:var(--ink); line-height:1.55; }
.pro-case .notebook-guide .project-summary { margin-top:12px; }
.pro-case .evidence-area .viewer h2, .pro-case .model-section h2 { letter-spacing: -.035em; }
.pro-case .evidence-area .actions .button { border-radius: 3px; font-size: 15px; }
.pro-case .model-board, .pro-case .map-viewport { background-color:#18292e; }
.pro-case .board-bar, .pro-case .map-caption, .pro-case .schema-card, .pro-case .notebook-paper .cell { background-color:#23343a; }
.pro-case .schema-card { box-shadow:none; }
.pro-case .evidence-area a:hover { color: #d0f5e6; }

@media (min-width:821px) {
  .folio-home { background:linear-gradient(to right, var(--bg) 50%, #e6eeea 50%); }
  .pro-spread, .pro-view .folio-profile {
    width:min(calc(100% - 2 * var(--page-gutter)), 94rem);
    margin-inline:auto;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    column-gap:clamp(40px, 6vw, 112px);
  }
  .spread-copy, .intro-prose, .pro-view .folio-profile { padding-inline:0; }
  .intro-prose { background:transparent; }
  .intro-prose p { max-width:72ch; }
  .pro-view .folio-profile { width:min(calc(100% - 2 * var(--page-gutter)), 82rem); grid-template-columns:4fr 6fr; }
  .pro-view .profile-detail :is(p, ul) { max-width:72ch; }
  .pro-view #contact-form { max-width:100%; }

  .pro-case .reading-wrap.evidence-area { display:block; padding-inline:var(--page-gutter); }
  .pro-case .report-viewer { --visual-width:max(1px, calc(var(--frame-height) * 16 / 9)); }
  .pro-case .notebook-view { --visual-width:92rem; }
  .pro-case .dashboard-section:has(.hm-chart) {
    --visual-width:clamp(1px, calc((100dvh - var(--mast-height) - var(--dock-height) - 70px) * 540 / 326), 48rem);
  }
  /* When the viewport height limits the report, centre its guide and canvas as one unit. */
  .pro-case #report {
    --guide-width:41rem;
    width:100%;
    max-width:calc(var(--guide-width) + var(--visual-width));
    margin-inline:auto;
    grid-template-columns:minmax(min(36%, var(--guide-width)), 1fr) minmax(0, var(--visual-width));
  }
  .pro-case #report :is(.viewer-head, .report-guide, .notebook-guide) {
    max-width:none;
    margin-inline-end:clamp(24px, 3vw, 64px);
  }
  .pro-case .hm-chart, .pro-case .hm-chart img { width:100%; }
  .pro-case .model-section { max-width:132rem; margin-inline:auto; }
}

@media (max-width:980px) {
  .pro-view .head-inner { flex-wrap:wrap; gap:0 10px; padding-block:7px 1px; }
  .pro-navs { width:100%; justify-content:space-between; border-top:1px solid var(--border); margin-top:6px; }
}
@media (max-width:820px) {
  .pro-spread, .pro-view .folio-profile { grid-template-columns:1fr; }
  .spread-copy { padding-inline:var(--folio-margin); }
  .intro-prose { padding:24px var(--folio-margin); }
  .pro-spread { align-content:start; }
  .pro-spread { min-height:0; }
  .profile-detail { padding-top:18px; }
}
@media (max-width:650px) {
  .entrances { grid-template-columns:1fr; }
  .entry-art { aspect-ratio:2.6; min-height:149px; }
  .entry-label { padding:16px; }
  .sales-figure { width:85%; }
  .entrance { padding-top:25px; }
  .entry-role { font-size:17px; }
  .choose-heading { margin-top:20px; }
  .pro-navs { gap:2px 10px; flex-wrap:wrap; }
  .pro-navs nav { gap:clamp(8px,2vw,14px); }
  .pro-navs a { font-size:13px; min-height:32px; }
  .pro-navs > nav:last-child { padding-left:0; border:0; }
  .folio-brand-tools { gap:8px; }
  .pro-view .view-switch { padding:6px 8px; }
}
@media (max-width:539px) and (max-height:650px) {
  .pro-case .report-heading h1 { font-size:21px; margin:0; }
}
@media (max-width:450px) {
  html.pro-view { --folio-margin:12px; }
  .pro-navs { flex-wrap:nowrap; gap:6px; }
  .pro-navs .wide-nav { display:none; }
  .pro-navs nav { gap:12px; }
  .pro-navs nav a { font-size:13px; min-height:40px; }
  .compact-nav { display:block; position:relative; }
  .compact-nav summary { cursor:pointer; padding:11px 4px 11px 0; font:600 14px/1.3 var(--pixel); }
  .compact-nav[open] nav { position:absolute; top:100%; left:0; width:170px; flex-direction:column;
    gap:0; align-items:stretch; border:1px solid var(--border); padding:3px 12px; background:var(--bg); box-shadow:0 5px 12px #142c321a; }
  .folio-brand-tools .wordmark { gap:6px; }
  .folio-brand-tools { flex-wrap:nowrap; }
  .pro-view .drawer-title, .pro-view .drawer-action { white-space:nowrap; }
  .pro-view .drawer-title i { display:none; }
  .pro-view .drawer-title { font-size:14px; }
}
