.xhome, .xhome-install {
  --xh-text: #f5f7f9;
  --xh-muted: #b9cad6;
  --xh-panel: #0c202d;
  --xh-edge: #29424f;
  --xh-accent: #ff893b;
  --xh-radius: 12px;
  color: var(--xh-text);
}

.xhome, .xhome *, .xhome-static-header *, .xhome-install * { box-sizing: border-box; }
.xhome { width: min(100% - 2rem, 78rem); margin: 0 auto; padding: clamp(2rem, 5vw, 4.25rem) 0; display: grid; gap: clamp(2.25rem, 5vw, 4.5rem); }
.xhome h1, .xhome h2, .xhome h3, .xhome p, .xhome figure { margin: 0; }
.xhome h1, .xhome h2, .xhome h3 { font-weight: 790; line-height: 1.06; letter-spacing: -.045em; }
.xhome h1 { font-size: clamp(2.45rem, 4.05vw, 4.05rem); max-width: none; margin-block: .8rem 1rem; }
.xhome h2 { font-size: clamp(1.85rem, 3.15vw, 2.8rem); }
.xhome h3 { font-size: clamp(1.25rem, 2vw, 1.65rem); }
.xhome p { color: var(--xh-muted); font-size: 1rem; line-height: 1.6; }
.xhome img { display: block; max-width: 100%; }
.xhome a:focus-visible, .xhome-install :is(a, button):focus-visible { outline: 2px solid #ffb67f; outline-offset: 4px; }
.xhome :is(.xhome-hero, .xhome-directory) { display: grid; grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr); align-items: center; }
.xhome-hero { column-gap: clamp(1.5rem, 3.6vw, 3.75rem); }
.xhome-hero-copy p { max-width: 44ch; font-size: clamp(1rem, 1.55vw, 1.125rem); }
.xhome-product-tag { color: #ffac72; font-size: .94rem; font-weight: 780; letter-spacing: .085em; text-decoration: none; }
.xhome-product-tag:hover { text-decoration: underline; }
.xhome-hero-art { overflow: hidden; border: 1px solid #395366; border-radius: var(--xh-radius); background: #081c2a; box-shadow: 0 15px 34px #0005; }
.xhome-hero-art img { width: 100%; height: auto; }
.xhome-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1rem; margin-top: 1.2rem; }
.xhome-action { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: .64rem .95rem; text-align: center; text-decoration: none; border: 1px solid transparent; border-radius: 6px; font-size: .9375rem; font-weight: 750; line-height: 1.25; }
.xhome-action--primary { background: #ff893b; color: #1a1009; border-color: #ff9d5b; }
.xhome-action--primary:hover { background: #ffa65e; color: #1a1009; }
.xhome-action--quiet { background: #152b39; color: #edf6fd; border-color: #426073; }
.xhome-action--quiet:hover { background: #1e3a4c; border-color: #7194a9; }
.xhome-action--text { color: #d2e3ef; padding-inline: .25rem; text-decoration: underline; text-underline-offset: .22em; }
.xhome-action--text:hover { color: #ffb47f; }

.xhome-directory { overflow: hidden; background: var(--xh-panel); border: 1px solid var(--xh-edge); border-radius: var(--xh-radius); }
.xhome-directory > img { height: 100%; width: 100%; min-height: 15rem; max-height: 22rem; object-fit: cover; object-position: 50% 48%; }
.xhome-directory-copy { padding: clamp(1.25rem, 4vw, 3.3rem); }
.xhome-directory-copy p, .xhome-studio p { margin-top: .7rem; }
.xhome-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.85rem, 2vw, 1.5rem); margin-top: 1.1rem; }
.xhome-card { display: flex; flex-direction: column; overflow: hidden; background: var(--xh-panel); border: 1px solid var(--xh-edge); border-radius: var(--xh-radius); }
.xhome-card-art { display: grid; place-items: center; overflow: hidden; height: clamp(8rem, 16vw, 12rem); background: radial-gradient(ellipse at 50% 65%, #21313d, #07131d 75%); border-bottom: 1px solid var(--xh-edge); }
.xhome-card-art img { width: auto; height: 84%; object-fit: contain; }
.xhome-card--commercial .xhome-card-art img { width: 100%; height: 100%; object-fit: contain; }
.xhome-card-body { display: grid; flex: 1; grid-template-rows: auto 1fr auto; gap: .75rem; padding: 1.2rem; }
.xhome-card-body .xhome-action { justify-self: start; }
.xhome-studio { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem 2rem; padding: clamp(1.15rem, 3vw, 2rem); border: 1px solid var(--xh-edge); border-radius: var(--xh-radius); background: #0a1a26; }
.xhome-studio h2 { font-size: clamp(1.45rem, 2.5vw, 1.95rem); }

/* The existing site renderer still appends legacy homepage sections. */
#main:has(> .xhome) > :is(.studio-entry, .xsca-overview) { display: none; }
#site:has(#main > .xhome) #main-nav a:is([data-route="customers"], [data-route="route"]) { display: none; }
#site:has(#main > .xhome) .account-actions a[href*="mode=signup"] { display: none; }
.xhome-static-header .brand, .xhome-static-header .xhome-static-nav { order: 0; }
.xhome-static-nav { display: flex; align-items: center; gap: .75rem; }
.xhome-static-nav > a:first-child { color: #edf6fd; text-underline-offset: .22em; }
.xhome-static-header .header-inner { min-height: 66px; display: flex; justify-content: space-between; gap: .75rem; }
.xhome-install { width: min(25rem, calc(100% - 2rem)); padding: 1.5rem; border: 1px solid var(--xh-edge); border-radius: var(--xh-radius); background: #0b1e2b; text-align: center; }
.xhome-install::backdrop { background: #000a; }
.xhome-install img { display: block; width: min(100%, 245px); height: auto; margin: 1rem auto; padding: .4rem; background: white; image-rendering: pixelated; }
.xhome-install .xhome-actions { justify-content: center; }
.xhome-install form { margin: 0; }

@media (max-width: 58rem) {
  .xhome :is(.xhome-hero, .xhome-directory) { grid-template-columns: 1fr; }
  .xhome-hero { row-gap: 1.3rem; }
  .xhome-directory > img { aspect-ratio: 2.4; min-height: 0; }
  .xhome-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 36rem) {
  .xhome h1 br { display: none; }
  .xhome-card-grid { grid-template-columns: 1fr; }
  .xhome-card-art { height: 10rem; }
  .xhome-static-nav { gap: .5rem; }
  .xhome-static-nav .xhome-action { padding-inline: .55rem; font-size: .825rem; }
}
