/* ===========================================================================
   Site chrome — shared on every page.
   Nav (+ running header), brief rail, foreword, chapter breaks,
   security exhibit, footer, and the "Request a Demo" modal.
   Ported from the landing page's SiteNav / BriefRail / ChapterBreak /
   SecuritySection / SiteFooter / DemoRequestForm components.
   Every class starts with "ch-".
   =========================================================================== */

/* Shared easing used across the original (Tailwind ease-[cubic-bezier(0.16,1,0.3,1)]) */
:root {
  --ch-ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ch-ease-tw: cubic-bezier(0.4, 0, 0.2, 1); /* Tailwind default transition timing */
}

/* Brief sections sit under the fixed nav when jumped to (Tailwind scroll-mt-16). */
#promptless,
#art-i,
#art-ii,
#art-iii,
#coda {
  scroll-margin-top: 4rem;
}

/* ---------------------------------------------------------------------------
   1. SITE NAV
   site.css styles the bare <nav> element (fixed, padded…). Everything here
   explicitly resets those properties so our nested <nav>s behave.
   --------------------------------------------------------------------------- */
.ch-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  pointer-events: none;
  padding: 14px 12px 0;
  line-height: 1.5;
  letter-spacing: normal;
  transition: padding-top 500ms ease-out;
}
.ch-nav.is-scrolled {
  padding-top: 8px;
}
@media (min-width: 640px) {
  .ch-nav { padding-left: 24px; padding-right: 24px; }
}
@media (min-width: 1024px) {
  .ch-nav { padding-left: 32px; padding-right: 32px; }
}

.ch-nav__shell {
  pointer-events: auto;
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 1220px;
  overflow: hidden;
  border: 1px solid rgba(251, 245, 238, 0.08);
}

/* Flat frosted glass — single translucent layer, no gradient, no shadow. */
.ch-nav__glass {
  position: absolute;
  inset: 0;
  background: rgba(12, 6, 7, 0.32);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  backdrop-filter: blur(28px) saturate(1.6);
  transition: background 500ms ease-out;
}
.ch-nav.is-scrolled .ch-nav__glass {
  background: rgba(12, 6, 7, 0.5);
}

.ch-nav__row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 48px;
  padding: 0 20px;
  transition: height 500ms var(--ch-ease-out-expo);
}
.ch-nav.is-scrolled .ch-nav__row {
  height: 40px;
}
@media (min-width: 640px) {
  .ch-nav__row { padding: 0 32px; }
}

.ch-nav__left {
  display: flex;
  align-items: center;
  gap: 28px;
}

/* Logo */
.ch-nav__logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  outline: none;
  color: inherit;
  text-decoration: none;
}
.ch-nav__logo svg {
  display: block;
}
.ch-nav__logo-sup {
  position: relative;
  top: -4px;
  font-family: var(--font-garamond);
  font-size: 8.5px;
  line-height: 1;
  color: rgba(251, 245, 238, 0.42);
  transition: color 500ms var(--ch-ease-tw);
}
.ch-nav__logo:hover .ch-nav__logo-sup {
  color: rgba(251, 245, 238, 0.9);
}
.ch-nav__logo-rule {
  pointer-events: none;
  position: absolute;
  bottom: -6px;
  left: 0;
  height: 1px;
  width: 0;
  background: rgba(251, 245, 238, 0.55);
  transition: width 700ms var(--ch-ease-out-expo);
}
.ch-nav__logo:hover .ch-nav__logo-rule,
.ch-nav__logo:focus-visible .ch-nav__logo-rule {
  width: 100%;
}

/* Primary links — hidden below md (768px), exactly like the original. */
nav.ch-nav__links {
  position: static;
  inset: auto;
  z-index: auto;
  padding: 0;
  background: none;
  border: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  pointer-events: auto;
  display: none;
  align-items: baseline;
  justify-content: flex-start;
  gap: 20px;
}
@media (min-width: 768px) {
  nav.ch-nav__links { display: flex; }
}

.ch-nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 0;
  outline: none;
  text-decoration: none;
  font-family: var(--font-garamond);
  font-size: 13.5px;
  line-height: 1;
  letter-spacing: 0.01em;
  color: rgba(251, 245, 238, 0.6);
  transition: color 300ms var(--ch-ease-tw);
}
.ch-nav__link:hover,
.ch-nav__link:focus-visible,
.ch-nav__link[aria-current='page'] {
  color: #fbf5ee;
}
.ch-nav__link-icon {
  transform: translateY(-1px);
  color: rgba(251, 245, 238, 0.35);
  transition: color 300ms var(--ch-ease-tw);
}
.ch-nav__link:hover .ch-nav__link-icon,
.ch-nav__link:focus-visible .ch-nav__link-icon {
  color: #fbf5ee;
}
/* ::before = "current page" underline, ::after = hover underline */
.ch-nav__link::before,
.ch-nav__link::after {
  content: '';
  pointer-events: none;
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  transform-origin: left;
  transform: scaleX(0);
  background: rgba(251, 245, 238, 0.55);
  transition: transform 600ms var(--ch-ease-out-expo);
}
.ch-nav__link--external::before,
.ch-nav__link--external::after {
  right: 14px;
}
.ch-nav__link[aria-current='page']::before,
.ch-nav__link:hover::after,
.ch-nav__link:focus-visible::after {
  transform: scaleX(1);
}

/* Request a Demo — mono ghost button */
.ch-nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 2px;
  border: 1px solid rgba(251, 245, 238, 0.18);
  background: rgba(251, 245, 238, 0.04);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(251, 245, 238, 0.82);
  cursor: pointer;
  white-space: nowrap;
  transition: all 300ms var(--ch-ease-tw);
}
.ch-nav__cta:hover {
  border-color: rgba(251, 245, 238, 0.45);
  background: rgba(251, 245, 238, 0.09);
}
.ch-nav__cta-label {
  transition: color 300ms var(--ch-ease-tw);
}
.ch-nav__cta:hover .ch-nav__cta-label {
  color: #fbf5ee;
}
.ch-nav__cta-arrow {
  display: inline-block;
  transform: translateY(-0.5px);
  transition: transform 300ms var(--ch-ease-tw);
}
.ch-nav__cta:hover .ch-nav__cta-arrow {
  transform: translate(2px, -0.5px);
}

/* Running header — centred "Art. I — Research the record" (lg+ only) */
.ch-running {
  pointer-events: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: none;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 400ms ease-out;
}
.ch-running.is-visible {
  opacity: 1;
}
@media (min-width: 1024px) {
  .ch-running { display: flex; }
}
.ch-nav[data-always-visible] .ch-running {
  display: none !important;
}
.ch-running__surface {
  display: flex;
  align-items: baseline;
  gap: 10px;
  animation: ch-running-enter 560ms var(--ch-ease-out-expo) both;
}
@keyframes ch-running-enter {
  0% { opacity: 0; transform: translateY(6px); filter: blur(2px); }
  60% { filter: blur(0); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.ch-running__roman {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(251, 245, 238, 0.55);
}
.ch-running__dash {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: rgba(251, 245, 238, 0.22);
}
.ch-running__title {
  font-family: var(--font-garamond);
  font-size: 13.5px;
  line-height: 1;
  letter-spacing: 0.01em;
  color: rgba(251, 245, 238, 0.88);
}
.ch-running__title em,
.ch-rail em {
  color: inherit; /* site.css paints every <em> cream */
}
.ch-running__object {
  color: rgba(251, 245, 238, 0.52);
}

/* ---------------------------------------------------------------------------
   2. BRIEF RAIL — right-edge scroll-spy (lg+ only)
   --------------------------------------------------------------------------- */
nav.ch-rail {
  pointer-events: none;
  position: fixed;
  top: 50%;
  right: 20px;
  left: auto;
  bottom: auto;
  z-index: 40;
  padding: 0;
  background: none;
  border: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  display: none;
  line-height: 1.5;
  letter-spacing: normal;
  opacity: 0;
  transform: translate(12px, -50%);
  transition:
    opacity 700ms ease-out,
    transform 900ms var(--ch-ease-out-expo);
}
@media (min-width: 1024px) {
  nav.ch-rail { display: block; }
}
nav.ch-rail.is-revealed {
  opacity: 1;
  transform: translate(0, -50%);
}
.ch-rail__list {
  position: relative;
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ch-rail__list::before {
  content: "";
  position: absolute;
  left: 46px;
  top: 18px;
  bottom: 18px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(251, 245, 238, 0.14) 18%,
    rgba(251, 245, 238, 0.14) 82%,
    transparent 100%
  );
}
.ch-rail__item {
  position: relative;
}
.ch-rail__link {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  outline: none;
  text-decoration: none;
  color: inherit;
}
.ch-rail__link:focus-visible::before {
  content: '';
  position: absolute;
  inset: 2px -6px 2px 20px;
  border-radius: 4px;
  background: rgba(251, 245, 238, 0.06);
  pointer-events: none;
}
.ch-rail__ordinal {
  width: 28px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1;
  color: rgba(251, 245, 238, 0.3);
  transition: color 500ms var(--ch-ease-tw);
}
.ch-rail__item--coda .ch-rail__ordinal {
  font-family: var(--font-garamond);
  font-size: 14px;
  font-style: italic;
  letter-spacing: 0;
}
.ch-rail__item.is-active .ch-rail__ordinal {
  color: rgba(251, 245, 238, 0.92);
}
.ch-rail__dot-wrap {
  position: relative;
  display: flex;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}
.ch-rail__dot {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 9999px;
  background-color: rgba(12, 6, 7, 0.9);
  border: 1px solid rgba(251, 245, 238, 0.3);
  box-shadow: none;
  transition: all 600ms var(--ch-ease-out-expo);
}
.ch-rail__item.is-active .ch-rail__dot {
  width: 7px;
  height: 7px;
  background-color: #fdead4;
  border-color: rgba(253, 234, 212, 0.9);
  box-shadow:
    0 0 14px rgba(253, 234, 212, 0.55),
    0 0 2px rgba(253, 234, 212, 0.9);
}
.ch-rail__label {
  position: relative;
  white-space: nowrap;
  font-family: var(--font-garamond);
  font-size: 13px;
  line-height: 1.1;
  color: rgba(251, 245, 238, 0.55);
  opacity: 0;
  transform: translateX(-6px);
  transition: all 600ms var(--ch-ease-out-expo);
}
.ch-rail__label-object {
  color: rgba(251, 245, 238, 0.45);
}
.ch-rail__item.is-active .ch-rail__label {
  opacity: 1;
  transform: translateX(0);
  color: #fbf5ee;
}
.ch-rail__item.is-active .ch-rail__label-object {
  color: rgba(251, 245, 238, 0.6);
}
/* Hovering the rail reveals every label */
.ch-rail__list:hover .ch-rail__label {
  opacity: 1;
  transform: translateX(0);
}

/* ---------------------------------------------------------------------------
   3. CHAPTER BREAK — "§ ii." and ornament "§"
   --------------------------------------------------------------------------- */
.ch-break {
  position: relative;
  z-index: 10;
  margin: 0 auto;
  display: flex;
  width: 100%;
  max-width: 1220px;
  align-items: center;
  gap: 20px;
  padding: 40px 24px;
  line-height: 1.5;
}
@media (min-width: 640px) {
  .ch-break { padding: 56px 40px; }
}
.ch-break__line {
  height: 1px;
  flex: 1 1 0%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(251, 245, 238, 0.14) 60%,
    rgba(251, 245, 238, 0.22)
  );
}
.ch-break__line--right {
  background: linear-gradient(
    to left,
    transparent,
    rgba(251, 245, 238, 0.14) 60%,
    rgba(251, 245, 238, 0.22)
  );
}
.ch-break__marker {
  flex-shrink: 0;
  user-select: none;
  -webkit-user-select: none;
  font-family: var(--font-mono);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  line-height: 1;
  color: rgba(251, 245, 238, 0.38);
}
.ch-break--ornament .ch-break__marker {
  font-family: var(--font-garamond);
  font-size: 22px;
  font-style: italic;
  letter-spacing: 0;
}

/* ---------------------------------------------------------------------------
   4. FOREWORD — Cooley deck with text overlay (md+), stacked on mobile
   --------------------------------------------------------------------------- */
.ch-foreword {
  position: relative;
  z-index: 10;
  width: 100%;
  line-height: 1.5;
  letter-spacing: normal;
}
.ch-foreword__wrap {
  margin: 0 auto;
  max-width: 1100px;
  padding: 48px 16px 24px;
}
@media (min-width: 640px) {
  .ch-foreword__wrap { padding: 96px 40px 32px; }
}
.ch-foreword__card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45);
}
.ch-foreword__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: left;
}
.ch-foreword__overlay {
  position: relative;
  background: #210d0e;
  padding: 40px 24px;
}
.ch-foreword__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: linear-gradient(
    to right,
    rgba(33, 13, 14, 0) 0%,
    rgba(33, 13, 14, 0.85) 25%,
    rgba(33, 13, 14, 0.95) 100%
  );
}
@media (min-width: 768px) {
  .ch-foreword__img {
    aspect-ratio: auto;
    object-fit: fill;
  }
  .ch-foreword__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: transparent;
    padding: 0;
  }
  .ch-foreword__panel {
    height: 100%;
    width: 50%;
    justify-content: center;
    padding: 0 40px;
  }
}
@media (min-width: 1024px) {
  .ch-foreword__panel { padding: 0 56px; }
}
.ch-foreword__kicker {
  font-family: var(--font-garamond);
  font-size: 12px;
  font-style: italic;
  letter-spacing: 0.04em;
  color: rgba(251, 245, 238, 0.5);
}
.ch-foreword__rule {
  margin: 16px 0;
  height: 1px;
  width: 48px;
  background: rgba(251, 245, 238, 0.2);
}
@media (min-width: 640px) {
  .ch-foreword__kicker { font-size: 13px; }
  .ch-foreword__rule { margin: 20px 0; }
}
.ch-foreword__body {
  max-width: 420px;
  font-family: var(--font-garamond);
  font-weight: 400;
  font-size: clamp(0.85rem, 1.5vw, 1.1rem);
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: #fbf5ee;
}
.ch-foreword__body b {
  font-weight: bolder;
  font-style: italic;
}
.ch-foreword__coda {
  margin-top: 32px;
  max-width: 340px;
  font-family: var(--font-garamond);
  font-style: italic;
  font-size: clamp(0.85rem, 1.3vw, 0.95rem);
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: rgba(251, 245, 238, 0.6);
}
@media (min-width: 640px) {
  .ch-foreword__coda { margin-top: 40px; }
}

/* ---------------------------------------------------------------------------
   5. SECURITY — Exhibit S-001 (reveals when scrolled into view)
   --------------------------------------------------------------------------- */
.ch-reveal-zone {
  position: relative;
  z-index: 10;
  width: 100%;
  overflow: hidden;
  line-height: 1.5;
  letter-spacing: normal;
}
.ch-security {
  position: relative;
}
.ch-security__inner {
  margin: 0 auto;
  display: flex;
  max-width: 700px;
  flex-direction: column;
  align-items: center;
  padding: 96px 24px;
  text-align: center;
}
@media (min-width: 640px) {
  .ch-security__inner { padding: 128px 40px; }
}
/* Hidden start state only applies once chrome.js has loaded (html.ch-js),
   so the text stays readable if scripts are off. */
.ch-js .ch-security:not(.is-visible) .ch-security__label {
  opacity: 0;
  transform: translateY(10px);
}
.ch-js .ch-security:not(.is-visible) .ch-security__title,
.ch-js .ch-security:not(.is-visible) .ch-security__body {
  opacity: 0;
  transform: translateY(14px);
}
.ch-security__label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}
.ch-security__title {
  margin-top: 20px;
  font-family: var(--font-garamond);
  font-weight: 400;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: #fff;
  transition: opacity 700ms ease-out 120ms, transform 700ms ease-out 120ms;
}
.ch-security__body {
  margin-top: 20px;
  max-width: 440px;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(0.7rem, 1.3vw, 0.78rem);
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.48);
  transition: opacity 700ms ease-out 240ms, transform 700ms ease-out 240ms;
}
.ch-divider {
  position: relative;
  margin: 0 auto;
  max-width: 1220px;
  padding: 0 24px;
}
@media (min-width: 640px) {
  .ch-divider { padding: 0 40px; }
}
.ch-divider__line {
  height: 1px;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
}

/* ---------------------------------------------------------------------------
   6. FOOTER — cream. (site.css also styles the bare <footer>; reset here.)
   --------------------------------------------------------------------------- */
footer.ch-footer {
  position: relative;
  z-index: 10;
  width: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 8px 8px 0 0;
  padding: 0;
  text-align: left;
  background-color: #fbf5ee;
  color: #210d0e;
  line-height: 1.5;
  letter-spacing: normal;
}
.ch-footer__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 24px 24px;
  text-align: center;
  background-color: #fbf5ee;
  color: #210d0e;
}
@media (min-width: 640px) {
  .ch-footer__top { padding: 80px 40px 24px; }
}
.ch-footer__intro {
  font-family: var(--font-garamond);
  font-size: 13px;
  font-style: italic;
  letter-spacing: 0.04em;
  opacity: 0.5;
}
.ch-footer__brand {
  margin-top: 4px;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 2.5rem;
  letter-spacing: -0.025em;
  color: #4d1b1a;
}
@media (min-width: 640px) {
  .ch-footer__brand { font-size: 3.2rem; }
}
.ch-footer__brand sup {
  position: relative;
  top: -0.5em;
  margin-left: 4px;
  font-size: 0.35em;
  line-height: 0;
  vertical-align: super;
  opacity: 0.7;
}
.ch-footer__tagline {
  margin-top: 24px;
  max-width: 420px;
  font-family: var(--font-garamond);
  font-weight: 400;
  font-size: clamp(0.8125rem, 1.85vw, 0.9375rem);
  line-height: 1.55;
  letter-spacing: 0.02em;
  color: rgba(33, 13, 14, 0.55);
}
.ch-footer__cta {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 2px;
  background: #210d0e;
  padding: 14px 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fbf5ee;
  cursor: pointer;
  transition: all 300ms var(--ch-ease-tw);
}
.ch-footer__cta:hover {
  gap: 14px;
  background: #4d1b1a;
}
.ch-footer__engraving {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 1220px;
  padding: 0 24px;
  background-color: #fbf5ee;
}
@media (min-width: 640px) {
  .ch-footer__engraving { padding: 0 40px; }
}
.ch-footer__engraving img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
}
.ch-footer__bottom {
  background-color: #fbf5ee;
  color: #0a0a0a;
}
.ch-footer__container {
  margin: 0 auto;
  max-width: 1220px;
  padding: 0 24px;
}
@media (min-width: 640px) {
  .ch-footer__container { padding: 0 40px; }
}
.ch-footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
}
.ch-footer__row--ruled {
  border-bottom: 1px solid rgba(10, 10, 10, 0.1);
}
.ch-footer__statement {
  font-family: var(--font-garamond);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  opacity: 0.6;
}
.ch-footer__mono {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ch-footer__copyright {
  opacity: 0.4;
}
.ch-footer__privacy {
  font-family: var(--font-garamond);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: inherit;
  text-decoration: none;
  opacity: 0.4;
  transition: opacity 150ms var(--ch-ease-tw);
}
.ch-footer__privacy:hover {
  opacity: 0.6;
}
.ch-footer__timer {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.6;
}
.ch-footer__timer-value {
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------------------
   7. DEMO REQUEST MODAL + FORM
   --------------------------------------------------------------------------- */
.ch-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  line-height: 1.5;
  letter-spacing: normal;
}
.ch-modal[hidden] {
  display: none;
}
.ch-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.ch-modal__panel {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 32rem;
  /* Keeps very short phones usable; the original had no scroll here. */
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  border-radius: 2px;
  background: #1a0c0d;
  padding: 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  outline: none;
}
@media (min-width: 640px) {
  .ch-modal__panel { padding: 40px; }
}
.ch-modal__close {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 20;
  display: flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  padding: 0;
  color: rgba(251, 245, 238, 0.5);
  cursor: pointer;
  transition: color 150ms var(--ch-ease-tw);
}
.ch-modal__close:hover {
  color: #fbf5ee;
}

/* Form — ported from demo-request-form.css (dark variant) */
.ch-drf {
  max-width: 560px;
  width: 100%;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 0;
  margin: 0 auto;
  --drf-text: rgba(251, 245, 238, 0.85);
  --drf-body: rgba(251, 245, 238, 0.8);
  --drf-heading: rgba(251, 245, 238, 1);
  --drf-muted: rgba(251, 245, 238, 0.85);
  --drf-privacy: rgba(251, 245, 238, 0.55);
  --drf-border: rgba(251, 245, 238, 0.1);
  --drf-focus-border: rgba(251, 245, 238, 0.25);
  --drf-separator: rgba(251, 245, 238, 0.2);
  --drf-select-option-bg: #2c1810;
  --drf-select-option-text: #fbf5ee;
}
.ch-drf[hidden] {
  display: none;
}
.ch-drf--editable {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.ch-drf--fading-out {
  opacity: 0;
  transform: translateY(-6px);
}
.ch-drf--submitted {
  justify-content: flex-start;
  animation: ch-drf-fade-in 0.6s ease-out forwards;
}
@keyframes ch-drf-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.ch-drf-filed-under {
  margin: 0 0 clamp(8px, 2.5vw, 10px);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-style: normal;
  font-size: clamp(14px, 3.2vw, 16px);
  line-height: 120%;
  letter-spacing: -0.5px;
  color: var(--drf-heading);
}
.ch-drf-separator {
  height: 1px;
  background: var(--drf-separator);
}
.ch-drf-separator--submitted {
  margin-bottom: 32px;
}
.ch-drf-thank-you,
.ch-drf-submitted-body,
.ch-drf-estimated-response {
  margin: 0 0 12px;
  font-family: var(--font-garamond);
  font-weight: 400;
  font-size: 17px;
  line-height: 125%;
  letter-spacing: -0.5px;
  color: var(--drf-body);
}
.ch-drf-thank-you {
  margin-bottom: 14px;
  font-style: italic;
  color: var(--drf-heading);
}
.ch-drf-submitted-body--last {
  margin-bottom: 16px;
}
.ch-drf-estimated-push {
  flex-grow: 1;
}
.ch-drf-estimated-response {
  margin: 0;
  font-style: italic;
  color: var(--drf-heading);
}
.ch-drf strong {
  font-weight: 700;
}
.ch-drf-header {
  margin-bottom: clamp(18px, 5vw, 28px);
}
.ch-drf-title {
  margin: 0 0 clamp(8px, 2.5vw, 10px);
  font-family: var(--font-garamond);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(16px, 3.6vw, 19px);
  line-height: 120%;
  letter-spacing: -0.3px;
  color: var(--drf-heading);
}
.ch-drf-intro {
  margin: 0 0 clamp(14px, 3.8vw, 18px);
  font-family: var(--font-garamond);
  font-weight: 400;
  font-size: clamp(14px, 3.2vw, 16px);
  line-height: 125%;
  letter-spacing: -0.5px;
  color: var(--drf-text);
}
.ch-drf-intro--last {
  font-style: italic;
  font-size: clamp(12px, 2.8vw, 13px);
  line-height: 140%;
  color: var(--drf-privacy);
  margin-bottom: clamp(24px, 6.8vw, 34px);
}
.ch-drf-form {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 0.625rem;
}
@media (min-width: 640px) {
  .ch-drf-form { gap: 0.875rem; }
}
.ch-drf-honeypot {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.ch-drf-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
}
@media (min-width: 640px) {
  .ch-drf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
}
.ch-drf-label {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-garamond);
  font-weight: 700;
  font-size: clamp(10px, 2.8vw, 12px);
  line-height: 130%;
  letter-spacing: 0;
  text-transform: none;
  color: var(--drf-heading);
}
.ch-drf-input,
.ch-drf-select {
  display: block;
  width: 100%;
  margin: 0;
  padding: 7px 0;
  border: none;
  border-bottom: 1px solid var(--drf-border);
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--drf-text);
  font-family: var(--font-garamond);
  font-weight: 400;
  font-size: clamp(14px, 3.4vw, 17px);
  line-height: 120%;
  letter-spacing: -0.5px;
  transition: border-color 0.3s ease;
}
.ch-drf-input:focus,
.ch-drf-select:focus {
  border-bottom-color: var(--drf-focus-border);
}
.ch-drf-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.ch-drf-select option {
  background: var(--drf-select-option-bg);
  color: var(--drf-select-option-text);
}
.ch-drf-spacer {
  margin-top: 6px;
}
.ch-drf-submit-error {
  margin: 0 0 8px;
  font-family: var(--font-garamond);
  font-style: italic;
  font-size: 14px;
  line-height: 140%;
  color: #e8a0a0;
}
.ch-drf-submit-error[hidden] {
  display: none;
}
.ch-drf-submit {
  align-self: flex-start;
  padding: 10px clamp(18px, 6vw, 28px);
  border: 1px solid #4a1e20;
  border-radius: 0;
  background: #4a1e20;
  color: #edeae2;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-garamond);
  font-weight: 400;
  font-size: clamp(14px, 3vw, 15px);
  line-height: 125%;
  letter-spacing: -0.5px;
}
.ch-drf-submit:hover:not(:disabled),
.ch-drf-submit:focus-visible:not(:disabled) {
  background: #351015;
  border-color: #351015;
}
.ch-drf-submit:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}
.ch-drf-privacy-push {
  flex-grow: 1;
}
.ch-drf-privacy-rule {
  width: 100%;
  margin: 0 0 10px;
  border: none;
  border-top: 1px solid var(--drf-separator);
}
.ch-drf-privacy-text {
  margin: 0;
  font-family: var(--font-garamond);
  font-style: italic;
  font-size: clamp(12px, 2.8vw, 13px);
  line-height: 140%;
  letter-spacing: -0.5px;
  color: var(--drf-privacy);
}
.ch-drf-privacy-link {
  color: var(--drf-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------------------------------------------------------------------------
   Reduced motion
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .ch-running__surface {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* Hidden rail shouldn't catch clicks at the right edge. */
nav.ch-rail:not(.is-revealed) .ch-rail__link {
  pointer-events: none;
}

/* Closing block: "Talk to our team" (replaces the cream footer card) */
.as-close-footer { background: transparent !important; padding: 0 !important; margin: 0 !important; border: 0 !important; box-shadow: none !important; }
.as-close { max-width: 760px; margin: 0 auto; padding: 140px 24px 120px; text-align: center; }
.as-close__kicker { display: block; margin-bottom: 18px; font-family: var(--font-mono, 'JetBrains Mono', monospace); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: rgba(251,245,238,.72); }
.as-close__title { margin: 0; font-family: 'EB Garamond', Garamond, serif; font-weight: 400; font-size: clamp(38px, 5vw, 64px); line-height: 1.06; color: #fbf5ee; }
.as-close__title em { font-style: italic; color: #fdead4; }
.as-close__lede { margin: 20px auto 0; max-width: 560px; font-family: 'EB Garamond', Garamond, serif; font-size: 21px; line-height: 1.5; color: rgba(251,245,238,.8); }
.as-close__cta { display: inline-flex; align-items: center; gap: 10px; margin-top: 32px; padding: 13px 24px; border: 1px solid rgba(251,245,238,.4); border-radius: 2px; background: rgba(251,245,238,.06); font-family: var(--font-mono, 'JetBrains Mono', monospace); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: #fbf5ee; text-decoration: none; transition: background .2s, border-color .2s; }
.as-close__cta:hover { background: rgba(251,245,238,.14); border-color: rgba(251,245,238,.65); }
.as-close__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; max-width: 1200px; margin: 0 auto; padding: 22px 24px 32px; border-top: 1px solid rgba(251,245,238,.1); }
.as-close__mono { font-family: var(--font-mono, 'JetBrains Mono', monospace); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: rgba(251,245,238,.55); }
.as-close__privacy { font-family: 'EB Garamond', Garamond, serif; font-size: 15px; color: rgba(251,245,238,.7); text-decoration: none; }
.as-close__privacy:hover { color: #fbf5ee; text-decoration: underline; }
@media (max-width: 720px) { .as-close { padding: 96px 20px 80px; } .as-close__lede { font-size: 18px; } .as-close__bar { flex-direction: column; text-align: center; } }
