/* ==========================================================================
   Bathroom OS brand layer (Brand Guidelines v1.0, Oct 2026). See docs/brand.md
   Loaded LAST in every page <head>, so it re-maps each page's legacy tokens.
   Black and white first; the Signal gradient only on the logo dot and small accents.
   ========================================================================== */

/* ---- Geist (SIL OFL 1.1, self-hosted from @fontsource/geist 5.x) ---- */
@font-face{font-family:'Geist';font-style:normal;font-weight:200;font-display:swap;src:url(/fonts/geist/geist-latin-200-normal.woff2) format('woff2')}
@font-face{font-family:'Geist';font-style:normal;font-weight:300;font-display:swap;src:url(/fonts/geist/geist-latin-300-normal.woff2) format('woff2')}
@font-face{font-family:'Geist';font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/geist/geist-latin-400-normal.woff2) format('woff2')}
/* 500 also serves any legacy 600/700/800 so bold is never faux-synthesised: emphasis = Medium */
@font-face{font-family:'Geist';font-style:normal;font-weight:500 900;font-display:swap;src:url(/fonts/geist/geist-latin-500-normal.woff2) format('woff2')}
@font-face{font-family:'Geist';font-style:italic;font-weight:200;font-display:swap;src:url(/fonts/geist/geist-latin-200-italic.woff2) format('woff2')}
@font-face{font-family:'Geist';font-style:italic;font-weight:300;font-display:swap;src:url(/fonts/geist/geist-latin-300-italic.woff2) format('woff2')}
@font-face{font-family:'Geist';font-style:italic;font-weight:400 900;font-display:swap;src:url(/fonts/geist/geist-latin-400-italic.woff2) format('woff2')}
@font-face{font-family:'Geist Mono';font-style:normal;font-weight:300;font-display:swap;src:url(/fonts/geist/geist-mono-latin-300-normal.woff2) format('woff2')}
@font-face{font-family:'Geist Mono';font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/geist/geist-mono-latin-400-normal.woff2) format('woff2')}
@font-face{font-family:'Geist Mono';font-style:normal;font-weight:500 900;font-display:swap;src:url(/fonts/geist/geist-mono-latin-500-normal.woff2) format('woff2')}

/* ---- Brand tokens (single source of truth) ---- */
html:root{
  --bos-ink:#171717; --bos-white:#ffffff;
  --bos-purple:#a855f7; --bos-pink:#ec4899;
  --bos-grad:linear-gradient(135deg,#a855f7,#ec4899);   /* Signal gradient */
  /* Darkened ends of Signal. Text: devices 7.10:1 and rooms 6.04:1 on white;
     6.24:1 and 5.31:1 on the 8% tints. Ink on those tints is 15.8:1. */
  --devices:#6d28d9; --rooms:#be185d;
  --devices-tint:#f3eefc; --rooms-tint:#faedf2;
  --gray-50:#fafafa; --gray-100:#f5f5f5; --gray-200:#e5e5e5; --gray-300:#d4d4d4;
  --gray-400:#a3a3a3; --gray-500:#737373; --gray-600:#525252; --gray-700:#404040; --gray-900:#262626;
  --font-sans:'Geist',system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  --font-mono:'Geist Mono',ui-monospace,'SF Mono',Menlo,Consolas,monospace;

  /* legacy tokens used by the hand-built pages, re-mapped to the brand */
  --bg:#ffffff; --bg2:var(--gray-50); --card:#ffffff;
  --ink:var(--bos-ink); --mute:var(--gray-600); --line:var(--gray-200);
  --teal:var(--bos-ink); --teal-d:var(--gray-700); --teal-l:var(--gray-100);
  --serif:var(--font-sans); --sans:var(--font-sans);
  /* legacy tokens used by the landscape profile template */
  --border:var(--gray-200); --sec:var(--gray-600); --muted:var(--gray-600);
  --accent:var(--bos-ink); --accent-tint:var(--gray-100);
  --pill-bg:var(--gray-100); --pill-ink:var(--gray-700);
}

/* ---- Type ---- */
body{font-family:var(--font-sans)}
html.bos-light body{font-weight:300}                      /* long-form pages (17-18px body) */
html.bos-light :is(footer,small,figcaption,table,label,input,select,textarea,button,nav,.credits,.tag,.tagp,.pill,.chip,.mat,.co,.btn){font-weight:400}
input,select,textarea,button{font-family:inherit}
h3{font-weight:300}
b,strong{font-weight:500}
.eyebrow{letter-spacing:.18em!important;font-weight:500!important}
h1 em,h2 em,blockquote em{color:inherit}

/* ---- Logo (horizontal >=120px wide; mark alone below that) ---- */
a.logo .logo-img{display:block;height:20px;width:auto;max-width:none;flex-shrink:0}
a.logo .logo-mark{display:none;height:22px;width:22px;flex-shrink:0}
a.logo{gap:0!important}
a.logo .logo-badge{margin-left:20px!important}           /* clear space = ring height */
header.nav .nav-inner a.logo .logo-img{height:18px}        /* 57px profile header: 18px logo (140px wide) keeps ring-height clear space */
a.logo:focus-visible{outline:2px solid var(--bos-ink);outline-offset:6px;border-radius:2px}

/* ---- Nav: ink chrome, gradient only as the small hover underline ---- */
header.nav{background:rgba(255,255,255,.94)!important;border-bottom:1px solid var(--gray-200)!important}
header.nav nav > a:not(.btn):not(.nav-cta){color:var(--gray-600)!important;background-image:var(--bos-grad);background-repeat:no-repeat;background-position:0 100%;background-size:0 1.5px;transition:color .15s,background-size .2s ease;white-space:nowrap}
header.nav nav > a.nav-add{white-space:nowrap}
@media(max-width:640px){header.nav nav > a.nav-add{display:none!important}}
header.nav nav > a.nav-events{white-space:nowrap}
/* The long bar (About, Landscape, Labs, Dispatches, plus profile and the
   conversation button) fits four labels. Events stays in that bar only once
   the row has room, and in the About menu below 1040px. Shorter bars, which
   have no Landscape menu, keep the top-level link. The nav-fit-mobile rules
   on each page are unchanged. */
@media(max-width:1040px){header.nav nav:has(a[href="/landscape"]) > a.nav-events{display:none!important}}
header.nav nav > a:not(.btn):not(.nav-cta):hover,header.nav nav > a:not(.btn):not(.nav-cta):focus-visible,header.nav nav > a:not(.btn):not(.nav-cta)[aria-current="page"],header.nav nav > a:not(.btn):not(.nav-cta).active{color:var(--bos-ink)!important;background-size:100% 1.5px}
header.nav .nav-dd-btn{color:var(--gray-600)!important}
header.nav .nav-dd-btn:hover,header.nav .nav-dd:hover .nav-dd-btn,header.nav .nav-dd.open .nav-dd-btn,header.nav .nav-dd:focus-within .nav-dd-btn,header.nav .nav-dd-btn.active{color:var(--bos-ink)!important}
header.nav .nav-dd-menu{border-radius:6px!important;box-shadow:0 8px 24px rgba(0,0,0,.08)!important}
header.nav .nav-dd-menu a{border-radius:4px!important}
header.nav .nav-dd-menu a:hover,header.nav .nav-dd-menu a:focus-visible{background:var(--gray-100)!important;color:var(--bos-ink)!important}
header.nav .nav-dd-menu a[aria-current="page"],header.nav .nav-dd-menu a.active{background:var(--gray-100)!important;color:var(--bos-ink)!important;font-weight:500}
header.nav nav a.btn,header.nav nav a.nav-cta{border-radius:6px!important;background:var(--bos-ink)!important;color:#fff!important}
header.nav nav a.btn{border-radius:6px!important;background:var(--bos-ink)!important;border:1px solid var(--bos-ink)!important;color:#fff!important;font-weight:500!important}
header.nav nav a.nav-cta:hover,header.nav nav a.nav-cta:focus-visible,header.nav nav a.btn:hover,header.nav nav a.btn:focus-visible{background:var(--gray-700)!important;border-color:var(--gray-700)!important}

/* ---- Buttons: primary = ink fill / white text; secondary = 1px hairline ---- */
.btn{border-radius:6px!important;border-width:1px!important;font-weight:500!important;letter-spacing:.01em}
.btn.p{background:var(--bos-ink)!important;border-color:var(--bos-ink)!important;color:#fff!important}
.btn.p:hover,.btn.p:focus-visible{background:var(--gray-700)!important;border-color:var(--gray-700)!important}
.btn.s{background:transparent;border-color:var(--gray-300)!important;color:var(--bos-ink)!important}
.btn.s:hover,.btn.s:focus-visible{background:var(--gray-100)!important;border-color:var(--bos-ink)!important}
/* on the dark photo heroes the primary flips to white */
.hero2 .btn.p{background:#fff!important;border-color:#fff!important;color:var(--bos-ink)!important}
.hero2 .btn.p:hover,.hero2 .btn.p:focus-visible{background:var(--gray-200)!important;border-color:var(--gray-200)!important}
.hero2 .btn.s{background:transparent!important;border-color:rgba(255,255,255,.6)!important;color:#fff!important}
.hero2 .btn.s:hover,.hero2 .btn.s:focus-visible{background:rgba(255,255,255,.12)!important;border-color:#fff!important}

/* ---- Links & focus ---- */
a{text-decoration-thickness:1px;text-underline-offset:2px}
:focus-visible{outline-color:var(--bos-ink)}

/* ---- Footer ---- */
footer{border-top:1px solid var(--gray-200)!important;color:var(--gray-600)}
a.footer-logo{display:block;width:128px;height:128px;margin:0 0 4px -4px}
a.footer-logo img{display:block;width:128px;height:128px}

/* ---- Standalone figures in Geist Mono ---- */
.stat,.dtot,.gl .big{font-family:var(--font-mono)!important;font-weight:300!important;letter-spacing:-.02em}

/* ---- Small gradient accents (tiny dots / bullets only) ---- */
.bos-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--bos-grad)}

/* hero copy sits on photography: 400 keeps it legible */
.hero2 p,.hero2 .sub,.hero2 .lede{font-weight:400}
@media(max-width:720px){a.logo .logo-img{height:16px}}            /* 16px tall = 125px wide, still >= 120px */
@media(max-width:440px){a.logo .logo-img{display:none!important}a.logo .logo-mark{display:block}}  /* four-item nav: mark alone, still above the 16px minimum */
@media(max-width:420px){header.nav .nav-inner a.logo .logo-img{display:none!important}header.nav .nav-inner a.logo .logo-mark{display:block}}  /* profile header is denser */
@media(prefers-reduced-motion:reduce){header.nav nav > a:not(.btn):not(.nav-cta){transition:none}}
/* small grey card copy (15-16px) reads better at 400 than 300 */
html.bos-light :is(.card,.step,.level,.pcard,.side,.fcard,.mrow) :is(p,li,small){font-weight:400}

/* Long public nav scrolls instead of wrapping the bar off-screen. */
header.nav .wrap{min-width:0}
header.nav nav{min-width:0;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
header.nav nav::-webkit-scrollbar{height:0}
@media(max-width:900px){
  header.nav nav a.btn{display:inline-flex!important;align-items:center;padding:8px 12px!important;font-size:13px!important}
}

/* Auto-hiding bar. The script adds bos-bar and keeps the bar's height as padding, so hiding it does not move the page. */
html.bos-bar body{padding-top:var(--nav-h,66px)}
html.bos-bar header.nav{position:fixed;top:0;left:0;right:0;z-index:100;transform:translateY(0);transition:transform .32s ease}
html.bos-bar header.nav.nav-up{transform:translateY(-100%);pointer-events:none}
html.bos-bar header.nav a.logo{display:inline-flex;align-items:center;transform-origin:center}
@keyframes bos-logo-pulse{
  0%,100%{transform:scale(1);filter:drop-shadow(0 0 0 rgba(168,85,247,0))}
  50%{transform:scale(1.045);filter:drop-shadow(0 0 6px rgba(168,85,247,.55)) drop-shadow(0 0 12px rgba(236,72,153,.35))}
}
html.bos-bar header.nav a.logo:hover,html.bos-bar header.nav a.logo:focus-visible{animation:bos-logo-pulse 1.2s ease infinite}
@media(prefers-reduced-motion:reduce){
  html.bos-bar header.nav{transition:none}
  html.bos-bar header.nav a.logo:hover,html.bos-bar header.nav a.logo:focus-visible{animation:none}
}

/* Landscape section switch, shared by the map and the showcases */
.land-sub{display:flex;flex-wrap:wrap;gap:8px 22px;align-items:center;max-width:1120px;margin:0 auto;padding:12px 24px;font:500 14px/1 var(--font-sans)}
.land-sub a{color:var(--gray-600);text-decoration:none}
.land-sub a[aria-current="page"]{color:var(--bos-ink);box-shadow:inset 0 -1.5px 0 var(--bos-ink)}

/* Header logo: never boxed or cropped by page-level .logo rules (landscape showcase). */
header.nav a.logo{width:auto!important;height:auto!important;border:0!important;border-radius:0!important;background:none!important;overflow:visible!important;display:inline-flex;align-items:center;flex:none}

/* Phones and small tablets: two-row header. Row 1 is the logo and Get in touch; row 2 holds the menus and links. */
@media(max-width:760px){
  header.nav:not(:has(.mnav)) > :is(.wrap,.nav-inner){flex-wrap:wrap!important;height:auto!important;min-height:0!important;column-gap:16px!important;row-gap:2px!important;justify-content:flex-start!important;padding-top:10px!important;padding-bottom:6px!important}
  header.nav:not(:has(.mnav)) > :is(.wrap,.nav-inner) > nav{display:contents!important}
  header.nav:not(:has(.mnav)) > :is(.wrap,.nav-inner)::after{content:"";order:2;flex-basis:100%;height:0}
  header.nav:not(:has(.mnav)) nav > :is(a.btn,a.nav-cta){order:1;margin-left:auto;display:inline-flex!important;align-items:center;padding:8px 14px!important;font-size:14px!important;white-space:nowrap}
  header.nav:not(:has(.mnav)) nav > :not(.btn):not(.nav-cta){order:3}
  header.nav:not(:has(.mnav)) nav > a:not(.btn):not(.nav-cta),header.nav:not(:has(.mnav)) .nav-dd-btn{font-size:14px!important;min-height:36px;display:inline-flex;align-items:center}
  header.nav:not(:has(.mnav)) a.logo .logo-img{display:block!important;height:16px!important}
  header.nav:not(:has(.mnav)) a.logo .logo-mark{display:none!important}
  header.nav:not(:has(.mnav)) .nav-dd{position:static!important}
  header.nav:not(:has(.mnav)) .nav-dd-menu{left:12px!important;right:auto!important;top:calc(100% - 2px)!important;max-width:calc(100vw - 24px)}
}
@media(max-width:400px){
  header.nav:not(:has(.mnav)) > :is(.wrap,.nav-inner){column-gap:12px!important}
  header.nav:not(:has(.mnav)) nav > a:not(.btn):not(.nav-cta),header.nav:not(:has(.mnav)) .nav-dd-btn{font-size:13.5px!important}
  header.nav:not(:has(.mnav)) nav > :is(a.btn,a.nav-cta){padding:7px 12px!important;font-size:13.5px!important}
}
/* Shared phone menu (details.mnav), used by every public page that includes the
   site header. Markup lives in the page (and in tools/includes/site-header.html
   for the v2 profile builder) so the control cannot drift. Desktop nav is
   unchanged: the menu stays hidden above 720px on the homepage and 760px
   everywhere else, matching the previous two-row breakpoint. */
header.nav .mnav{display:none}
header.nav .header-cta{flex:0 0 auto}
header.nav .mnav summary{list-style:none;cursor:pointer;color:#171717;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;display:inline-flex;align-items:center;justify-content:center;background:none;border:0}
header.nav .mnav summary::-webkit-details-marker,header.nav .mnav summary::marker{display:none;content:""}
header.nav .mnav summary:focus-visible{outline:2px solid #171717;outline-offset:2px;border-radius:4px}
header.nav .mnav-icon{position:relative;display:block;width:18px;height:14px}
header.nav .mnav-icon span{position:absolute;left:0;display:block;width:18px;height:2px;background:currentColor;border-radius:1px}
header.nav .mnav-icon span:nth-child(1){top:0}
header.nav .mnav-icon span:nth-child(2){top:6px}
header.nav .mnav-icon span:nth-child(3){top:12px}
header.nav .mnav[open] .mnav-icon span:nth-child(1){top:6px;transform:rotate(45deg)}
header.nav .mnav[open] .mnav-icon span:nth-child(2){opacity:0}
header.nav .mnav[open] .mnav-icon span:nth-child(3){top:6px;transform:rotate(-45deg)}
header.nav .mnav > div{position:absolute;top:calc(100% + 8px);right:0;left:auto;z-index:30;background:#fff;border:1px solid #e5e5e5;border-radius:8px;box-shadow:0 14px 34px rgba(20,30,28,.12);padding:8px;display:grid;min-width:220px;max-width:calc(100vw - 16px);box-sizing:border-box}
header.nav .mnav a{padding:10px 12px;text-decoration:none;font-weight:500;border-radius:6px;color:#171717}
header.nav .mnav a:hover,header.nav .mnav a:focus-visible{background:#f5f5f5;color:#171717}
/* Phone menu: Approach is a labelled, indented group, not a third top-level row. */
header.nav .mnav .mnav-group{display:grid}
header.nav .mnav .mnav-label{margin:0;padding:8px 12px 2px;font:500 12px/1.2 var(--font-sans,Geist,system-ui,sans-serif);letter-spacing:.08em;text-transform:uppercase;color:#737373}
header.nav .mnav .mnav-group a{padding-left:24px}
header.nav .mnav-icon span{transition:transform .15s ease,opacity .15s ease,top .15s ease}
@media(prefers-reduced-motion:reduce){
  header.nav .mnav-icon span{transition:none}
}
@media(max-width:720px){
  /* Homepage keeps Get in touch outside the nav. */
  body.home header.nav:has(.mnav) > :is(.wrap,.nav-inner){justify-content:flex-start!important;flex-wrap:nowrap!important}
  body.home header.nav:has(.mnav) nav{display:none!important}
  body.home header.nav:has(.mnav) .header-cta{margin-left:auto}
  body.home header.nav .mnav{display:block;position:relative;flex:0 0 auto}
}
@media(max-width:760px){
  /* Other pages keep Get in touch inside the desktop nav so its styles do not change.
     On phones the other nav items are hidden and the hamburger sits to its right. */
  body:not(.home) header.nav:has(.mnav) > :is(.wrap,.nav-inner){justify-content:flex-start!important;flex-wrap:nowrap!important}
  body:not(.home) header.nav:has(.mnav) nav{margin-left:auto;display:flex!important;overflow:visible!important}
  body:not(.home) header.nav:has(.mnav) nav > :not(.header-cta){display:none!important}
  body:not(.home) header.nav:has(.mnav) nav > .header-cta{display:inline-flex!important;margin-left:0}
  body:not(.home) header.nav .mnav{display:block;position:relative;flex:0 0 auto}
}

/* Wider screens: the one-row nav must not clip its dropdown menus. */
@media(min-width:761px){header.nav nav{overflow:visible!important}header.nav nav > .nav-dd:last-of-type .nav-dd-menu{left:auto!important;right:-12px!important}}
