html{-webkit-text-size-adjust:100%}
*,*::before,*::after{box-sizing:border-box}
body{margin:0;background:#FFFFFF}
img{max-width:100%}
.m-tog,.m-btn{display:none}

/* ---------- Ratio coming-soon page on desktop ----------
   The canvas draws it in a fixed 900px frame with the content pinned 104px from the top, so short
   laptop screens cut off the form and big screens strand a small block at the top. Fill the screen,
   centre the block, and size the drawing to whatever height is left after the text (about 470px of
   text, padding and footer row; the drawing is 1.6:1). Phones keep their own rules below. */
@media (min-width: 821px) {
  body[data-page="Ratio-Soon"] div[style*="height: 900px"] { height: 100vh !important; height: 100svh !important; min-height: 600px; }
  body[data-page="Ratio-Soon"] main[style*="padding-top: 104px"] { justify-content: center; padding: 48px 40px 104px !important; }
  body[data-page="Ratio-Soon"] svg[width="600"] { width: clamp(360px, min(48vw, (100svh - 470px) * 1.6), 980px) !important; height: auto !important; }
  body[data-page="Ratio-Soon"] h1 { font-size: clamp(40px, min(3.2vw, 5.4svh), 76px) !important; margin-top: clamp(32px, 5svh, 72px) !important; }
  body[data-page="Ratio-Soon"] main p[style*="font-size: 11px"] { font-size: clamp(11px, .72vw, 14px) !important; margin-top: clamp(16px, 2svh, 26px) !important; }
  body[data-page="Ratio-Soon"] main p[style*="font-size: 15px"] { font-size: clamp(15px, 1vw, 19px) !important; margin-top: clamp(14px, 1.8svh, 24px) !important; }
  body[data-page="Ratio-Soon"] main > div[style*="margin-top: 30px"] { margin-top: clamp(24px, 3.4svh, 44px) !important; }
  body[data-page="Ratio-Soon"] label[style*="width: 320px"] { width: clamp(320px, 22vw, 440px) !important; }
  body[data-page="Ratio-Soon"] input[type="email"] { font-size: clamp(17px, 1vw, 20px) !important; min-height: clamp(48px, 2.8vw, 58px) !important; }
  body[data-page="Ratio-Soon"] .rs-btn { font-size: clamp(12px, .68vw, 14px) !important; min-height: clamp(48px, 2.8vw, 58px) !important; padding: 0 clamp(24px, 1.5vw, 32px) !important; }
  body[data-page="Ratio-Soon"] div[style*="bottom: 28px"] { font-size: clamp(12px, .62vw, 14px) !important; }
}

/* ---------- Phones and small tablets ---------- */
@media (max-width: 820px) {
  /* layout: one column everywhere the canvas drew a grid */
  [style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  [style*="grid-column: span"] { grid-column: auto !important; }
  .t-steps { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .o-rooms { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  [style*="padding: 140px 24px"], [style*="padding: 160px 24px"] { padding-top: 72px !important; padding-bottom: 72px !important; }
  [style*="padding: 115px 24px"], [style*="padding: 100px 24px"] { padding-top: 64px !important; padding-bottom: 64px !important; }
  [style*="max-width: 1360px"] { padding-left: 20px !important; padding-right: 20px !important; }
  [style*="padding-left: 64px"] { padding-left: 20px !important; }

  /* type */
  h1[style*="font-size"] { font-size: clamp(36px, 10.5vw, 52px) !important; line-height: 1.06 !important; }
  h2[style*="font-size: 48px"], h2[style*="font-size: 52px"], h2[style*="font-size: 56px"], h2[style*="font-size: 64px"], h2[style*="font-size: 72px"], h2[style*="font-size: 80px"] { font-size: clamp(30px, 8.6vw, 42px) !important; line-height: 1.1 !important; }
  span[style*="font-size: 72px"], span[style*="font-size: 88px"] { font-size: 44px !important; }
  h3[style*="font-size: 40px"] { font-size: 28px !important; }
  p[style*="font-size: 19px"], p[style*="font-size: 18px"] { font-size: 17px !important; }

  /* full-screen sections: fit the phone screen instead of a 900px desktop frame */
  section[style*="height: 900px"], div[style*="height: 900px"][style*="overflow: hidden"] { height: 100svh !important; min-height: 600px; }

  /* menu */
  .wgr-head { position: relative; padding: 16px 20px !important; flex-wrap: nowrap !important; }
  .m-tog { display: block; position: absolute; right: 12px; top: 10px; width: 48px; height: 48px; margin: 0; opacity: 0; z-index: 3; cursor: pointer; }
  .m-btn { display: flex; flex-direction: column; justify-content: center; gap: 7px; width: 48px; height: 44px; margin-right: -12px; padding: 0 12px; }
  .m-btn span { display: block; height: 1.5px; background: currentColor; transition: transform .25s; }
  .m-tog:checked + .m-btn span:first-child { transform: translateY(4.25px) rotate(45deg); }
  .m-tog:checked + .m-btn span:last-child { transform: translateY(-4.25px) rotate(-45deg); }
  .m-tog:focus-visible + .m-btn { outline: 1px solid #DA2027; outline-offset: 2px; }
  .m-nav { display: none !important; }
  .m-tog:checked ~ .m-nav { display: flex !important; flex-direction: column; align-items: flex-start !important; gap: 0 !important; position: absolute; top: 100%; left: 0; right: 0; z-index: 50; padding: 8px 20px 20px; background: #141110; color: #FFFFFF; letter-spacing: .2em; }
  .m-tog:checked ~ .m-nav a { min-height: 52px !important; width: 100%; margin-left: 0 !important; border-bottom: 1px solid rgba(255,255,255,.14); color: #FFFFFF !important; }

  /* What we do: the path */
  aside[style*="position: sticky"][style*="height: 900px"] { display: none !important; }
  .j-st { min-height: 0 !important; padding: 64px 0 !important; }
  .j-st .j-in { opacity: 1 !important; transform: none !important; }
  .j-sk { height: 240px !important; }

  /* Design-build: on phones, the finished drawing up top and the ten steps as a plain read */
  div:has(> section[aria-label="Design-build"]) { height: auto !important; overflow: visible !important; }
  section[aria-label="Design-build"] { height: auto !important; min-height: 0 !important; overflow: visible !important; }
  section[aria-label="Design-build"] > div[style*="grid-template-columns"] { display: flex !important; flex-direction: column-reverse; padding-left: 20px !important; padding-right: 20px; }
  section[aria-label="Design-build"] div[style*="position: sticky"][style*="height: 900px"] { position: relative !important; height: 62vw !important; margin-top: 88px; width: 100% !important; align-self: stretch !important; }
  section[aria-label="Design-build"] div[style*="position: sticky"][style*="height: 900px"] > div[style*="bottom: 30px"] { display: none !important; }
  section[aria-label="Design-build"] .db-draw { top: 0 !important; bottom: 0 !important; right: 0 !important; }
  .db-draw .d { stroke-dashoffset: 0 !important; }
  .db-draw .f { opacity: 1 !important; }
  .db-draw g[data-l] { opacity: 1 !important; }
  .db-draw g[data-s] { opacity: 0 !important; }
  .db-st { min-height: 0 !important; padding: 40px 0 !important; }
  .db-st .db-in { opacity: 1 !important; transform: none !important; }
  .db-cue, .db-st p[style*="color: #A89C8E; max-width: 44ch;"]:not([style*="Menlo"]) { display: none !important; }

  /* Work: the project slideshow */
  .w-box > div[style*="height: 2700px"] { height: 300svh !important; }
  .w-box div[style*="position: sticky"][style*="height: 900px"] { height: 100svh !important; }
  .w-snap { height: 100svh !important; }
  .w-snap:nth-child(2) { top: 100svh !important; }
  .w-snap:nth-child(3) { top: 200svh !important; }
  .w-gi { right: 20px !important; }
  .w-gi button { min-height: 40px !important; }
  .w-cap { left: 20px !important; right: 20px !important; bottom: 28px !important; }
  .w-soon .w-ci { aspect-ratio: 3 / 1 !important; }

  /* tap targets */
  .p-room { display: inline-flex !important; align-items: center; min-height: 40px; }
  .j-t, .g-rel { display: inline-flex; align-items: center; min-height: 40px; }
  .db-n { font-size: 10px !important; }

  /* Ratio */
  svg[width="600"], svg[width="520"] { width: min(600px, 86vw) !important; height: auto !important; }
  label[style*="width: 320px"] { width: 56vw !important; }
  main[style*="padding-top: 104px"] { padding-left: 20px !important; padding-right: 20px !important; }

  /* ---------- Fixes from the Nov 28 full-site review (phone) ---------- */
  /* What we do: the six steps are a scroll box on desktop; on phones they read down the page. */
  section[aria-label="How a project runs"] { height: auto !important; min-height: 0 !important; overflow: visible !important; }
  /* Commercial sauna: the sticky "On this page" list sat on top of the text once the columns stacked. */
  nav[aria-label="On this page"] { position: static !important; }
  /* Room links: flex dropped the space before the arrow. */
  .p-room, .j-t, .g-rel { gap: .3em; }
  /* What we do: the second of two side-by-side links wraps under the first on phones; drop its desktop gap. */
  a[style*="margin-left: 32px"] { margin-left: 0 !important; }
  /* One 20px gutter everywhere: footer, captions and overlay titles were still at the desktop 40px. */
  footer[style*="padding: 30px 40px"] { padding-left: 20px !important; padding-right: 20px !important; }
  [style*="position: absolute"][style*="left: 40px"] { left: 20px !important; }
  [style*="position: absolute"][style*="right: 40px"] { right: 20px !important; }
  figcaption[style*="left: 40px"] { right: 20px; }
  /* Uppercase captions and labels set to one line height touched when they wrapped. */
  figcaption[style*="line-height: 1;"], a[style*="text-transform: uppercase"][style*="line-height: 1;"], button[style*="text-transform: uppercase"][style*="line-height: 1;"] { line-height: 1.5 !important; }
  /* Form buttons (OK, Back) are indented past the desktop step-number column, which stacks on phones. */
  [style*="padding-left: 72px"] { padding-left: 0 !important; }
  /* Small row layouts keep their columns (the one-column rule above is for page grids). */
  /* (Match only the leading track: the browser rewrites "minmax(0, 1fr)" as "minmax(0px, 1fr)" in the style attribute.) */
  [style*="grid-template-columns: 24px "] { grid-template-columns: 24px minmax(0, 1fr) auto !important; }
  [style*="grid-template-columns: 16px "] { grid-template-columns: 16px minmax(0, 1fr) auto !important; }
  [style*="grid-template-columns: 36px "] { grid-template-columns: 36px minmax(0, 1fr) !important; }
  [style*="grid-template-columns: 28px "] { grid-template-columns: 28px minmax(0, 1fr) auto !important; }
  [style*="grid-template-columns: 28px "] > :nth-child(3) { grid-column: 2 / 4; }
  span[aria-hidden="true"][style*="repeat(8"] { grid-template-columns: repeat(8, minmax(0, 1fr)) !important; }
  /* Demo pages: back link on its own row, the three demos on one row. */
  nav[aria-label="Demos"] > div > span[style*="flex: 1"] { display: none; }
  nav[aria-label="Demos"] > div > a:first-child { flex-basis: 100%; }
  nav[aria-label="Demos"] > div { gap: 0 18px !important; letter-spacing: .14em !important; font-size: 11px !important; }
  /* Service demo: room tabs full width, chat panel without the desktop column height. */
  div[role="tablist"][aria-label="Rooms"] > button { flex: 1 1 100%; justify-content: space-between; }
  div[style*="min-height: 760px"] { min-height: 520px !important; }
  .s-btn { white-space: nowrap; }
  /* Start form: no half-screen reserve under the question on phones. */
  div[style*="min-height: 560px"] { min-height: 0 !important; padding-bottom: 24px; }
}

/* Demo grids: one room card / two stage cards per row on every phone (the 4-up and 2-up grids overflow at 390px). */
/* Element-qualified so they beat the demo pages' own <style> (which load after this file). */
@media (max-width: 600px) {
  ul.o-rooms { grid-template-columns: minmax(0, 1fr) !important; }
  ol.t-steps { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
