/* ==========================================================================
   Castillo Housing Group — AI Home Design.

   Scoped `chg-` throughout, including the one rule that reaches up to the
   stage, so this file cannot affect another screen.

   Shape: a cool architectural page — drafting paper rather than LifeWorx's
   warm stock — that darkens once for the prototype. The builder's own green
   is the only accent, and it is spent on the product, not on decoration.
   ========================================================================== */

@font-face {
  font-family: "OrticaLinear-Light";
  src: url("/assets/fonts/OrticaLinear-Light.otf") format("opentype");
  font-weight: 300;
}

.stage:has(.chg) {
  place-items: start stretch;
  padding: 0;
  background: #F3F3F1;
}

.chg {
  --t-hero:  clamp(1.75rem, 3.5vw, 2.85rem);
  --t-stmt:  clamp(1.25rem, 2vw, 1.5rem);
  --t-copy:  1.0625rem;
  --t-cap:   .8125rem;

  --green:      #4D8615;
  --green-soft: rgba(77, 134, 21, .11);
  --ink-dark:   #12171C;   /* the prototype's surface */

  --m: 46rem;
  --col: min(96rem, 100% - 2 * var(--gutter));

  position: relative;
  width: 100%;
  padding-bottom: clamp(3rem, 10vh, 6rem);
  color: var(--ink);
  opacity: 0;
}
.chg[data-ready="true"] { opacity: 1; transition: opacity var(--dur-l) var(--ease-out); }

.chg .worlds__crumb { padding: calc(var(--header-h) + .5rem) var(--gutter) 0; }

.chg [data-reveal][data-in="false"] { opacity: 0; transform: translate3d(0, 1.1rem, 0); }
.chg [data-reveal][data-in="true"] {
  opacity: 1; transform: none;
  transition: opacity var(--dur-l) var(--ease-out), transform var(--dur-l) var(--ease-out);
}
/* Phones and tablets: the same rise, quicker, so it never trails the scroll. */
@media (max-width: 1179px), (hover: none) and (pointer: coarse) {
  .chg [data-reveal][data-in="true"] { transition-duration: .5s; }
}

.chg-label {
  display: flex; align-items: baseline; justify-content: center; gap: .9rem;
  color: #a25b57; margin: 0;
  font-weight: 600;
}

/* ==========================================================================
   01 — the opening
   ========================================================================== */
.chg-open {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: clamp(1.5rem, 5vh, 3rem) var(--gutter) clamp(2rem, 6vh, 3.25rem);
}
.chg-open > * { max-width: var(--m); }

.chg-open .chg-label { margin-bottom: clamp(1.5rem, 4.5vh, 2.5rem); }

.chg-open__logo {
  display: block; width: auto;
  height: clamp(36px, 4vw, 56px);
  margin: 0 0 clamp(1.5rem, 4.5vh, 2.25rem);
}

.chg-open__title {
  margin: 0; font-weight: 300 !important; font-family: OrticaLinear-Light;
  font-size: var(--t-hero);
  line-height: 1.2; letter-spacing: -.012em;
}
.chg-open__sub {
  margin: .85rem 0 0;
  color: var(--green);
}
.chg-open__lede {
  margin: clamp(1rem, 2.6vh, 1.5rem) 0 0; max-width: 52rem;
  font-size: var(--t-copy); line-height: 1.72; color: var(--ink-soft);
  text-wrap: balance;
}
.chg-open__about {
  margin: clamp(.9rem, 2.2vh, 1.2rem) 0 0; max-width: 52rem;
  font-size: var(--t-copy); line-height: 1.72; color: var(--ink-soft);
  text-wrap: balance;
}

/* --- role and link to live site -------------------------------------------- */
.chg-id {
  margin: clamp(1.5rem, 3.5vh, 2rem) 0 0;
  display: flex; flex-direction: column; align-items: flex-start;
}
.chg-id dt { color: #a25b57; font-weight: 600; }
.chg-id dd {
  margin: .4rem 0 0;
  display: flex; flex-wrap: nowrap; align-items: baseline;
  gap: clamp(.8rem, 2vw, 1.5rem);
  font-size: .9375rem;
}

.chg-live {
  display: inline-flex; align-items: center; gap: .45rem;
  padding-bottom: .15rem;
  font-size: .9375rem;
  color: #73765F;
  border-bottom: 1px solid currentColor;
  transition: opacity var(--dur-s) var(--ease-out);
}
.chg-live:hover { opacity: .68; }

/* --- real vs concept, stated in the first ten seconds --------------------- */
.chg-split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0;
  width: 100%; max-width: 52rem;
  margin: clamp(1.75rem, 5vh, 2.75rem) 0 0;
  text-align: left;
  border: 1px solid var(--rule-soft);
}
.chg-split__half { padding: clamp(1.1rem, 3vh, 1.5rem) clamp(1.1rem, 2.5vw, 1.5rem); }
.chg-split__half--real { border-right: 1px solid var(--rule-soft); }
.chg-split__half--concept { background: var(--green-soft); }

.chg-split__label { margin: 0; color: var(--ink-muted); }
.chg-split__half--concept .chg-split__label { color: var(--green); }
.chg-split__body {
  margin: .7rem 0 0;
  font-size: .9375rem; line-height: 1.66; color: var(--ink-soft);
}
.chg-split__role {
  margin: .85rem 0 0;
  font-size: var(--t-cap); line-height: 1.5; color: var(--ink-muted);
}

.chg-live {
  display: inline-flex; align-items: center; gap: .45rem;
  padding-bottom: .15rem;
  font-size: .9375rem;
  color: #73765F;
  border-bottom: 1px solid currentColor;
  transition: opacity var(--dur-s) var(--ease-out);
}
.chg-live:hover { opacity: .68; }

/* ==========================================================================
   02 — the real work
   ========================================================================== */
.chg-work {
  container-type: inline-size;
  width: 100%; max-width: var(--col); margin-inline: auto;
  padding: clamp(2.5rem, 7vh, 4rem) var(--gutter);
  border-top: 1px solid var(--rule-soft);
  text-align: center;
}
.chg-work .chg-label { margin-bottom: clamp(1.25rem, 3.5vh, 2rem); }
.chg-work__h {
  margin: 0 auto;
  font-weight: 300 !important; font-family: OrticaLinear-Light;
  font-size: var(--t-stmt); line-height: 1.2; letter-spacing: -.012em;
  /* One line from tablet width up, easing down only as far as the line
     needs (the sentence is ~28.8em wide). On phones one line would be too
     small to read, so there it wraps into balanced lines at full size. */
  font-size: min(var(--t-stmt), 100cqi / 29.5);
  white-space: nowrap;
}
@media (max-width: 46rem) {
  .chg-work__h { font-size: var(--t-stmt); white-space: normal; text-wrap: balance; }
}
.chg-work__body {
  margin: clamp(1rem, 2.6vh, 1.4rem) auto 0; max-width: 46rem;
  font-size: var(--t-copy); line-height: 1.72; color: var(--ink-soft);
}
.chg-work__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 1.75rem);
  margin-top: clamp(2rem, 5vh, 3rem);
  text-align: left;
}
.chg-work__fig { margin: 0; }
.chg-work__img {
  width: 100%; height: auto;
  border: 1px solid var(--rule-soft);
}
.chg-work__cap {
  margin: .7rem 0 0;
  font-size: var(--t-cap); line-height: 1.55; color: var(--ink-muted);
}

.chg-office {
  width: 100%; max-width: 64rem;
  margin: 0 auto; padding: 0 var(--gutter) clamp(2.5rem, 7vh, 4rem);
  text-align: left;
}
.chg-office__video {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--rule-soft);
}

/* ==========================================================================
   03 / 04 — problem and solution
   ========================================================================== */
.chg-duals {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  width: 100%; max-width: var(--col); margin-inline: auto;
  padding: clamp(2rem, 5vh, 3rem) var(--gutter) clamp(3rem, 8vh, 5rem);
  border-top: 1px solid var(--rule-soft);
}
.chg-dual {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 0 clamp(1rem, 3vw, 2rem);
}
.chg-dual:first-child { border-right: 1px solid var(--rule-soft); }
.chg-dual .chg-label { margin-bottom: clamp(.8rem, 2vh, 1.15rem); }
.chg-dual__h {
  margin: 0; max-width: 20em;
  font-weight: 300 !important; font-family: OrticaLinear-Light;
  font-size: var(--t-stmt); line-height: 1.24; letter-spacing: -.012em;
}
.chg-dual__body {
  margin: clamp(1rem, 2.6vh, 1.5rem) 0 0; max-width: 34rem;
  font-size: var(--t-copy); line-height: 1.72; color: var(--ink-soft);
}

/* ==========================================================================
   05 — the prototype
   The one dark room in the house. It is not pinned to the scrollbar: the
   visitor is meant to use this, and a scene that fights the scroll is a scene
   nobody finishes.
   ========================================================================== */
.chg-lab {
  background: #30352D;
  color: var(--on-dark);
  padding: clamp(3rem, 9vh, 5.5rem) 0 clamp(2.5rem, 7vh, 4rem);
}
.chg-lab__head {
  width: 100%; max-width: var(--m); margin-inline: auto;
  padding: 0 var(--gutter);
  text-align: center;
}
.chg-lab .chg-label { color: rgba(255, 255, 255, .5); margin-bottom: clamp(1rem, 3vh, 1.5rem); }
.chg-lab__h {
  margin: 0; font-weight: 300 !important; font-family: OrticaLinear-Light;
  font-size: var(--t-hero); line-height: 1.2; letter-spacing: -.012em;
}
.chg-lab__sub {
  margin: .9rem auto 0; max-width: 34rem;
  font-size: var(--t-copy); line-height: 1.68; color: rgba(255, 255, 255, .62);
}

.chg-lab__grid {
  display: grid; grid-template-columns: 1fr minmax(0, 24rem);
  align-items: start;
  gap: clamp(2rem, 5vw, 4rem);
  width: 100%; max-width: 68rem; margin-inline: auto;
  padding: clamp(2.25rem, 6vh, 3.5rem) var(--gutter) 0;
}

/* --- the running commentary ---------------------------------------------- */
.chg-notes__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.chg-notes__item {
  display: grid; grid-template-columns: 2.25rem 1fr auto;
  align-items: baseline; gap: .75rem;
  padding: .85rem .9rem;
  border-left: 2px solid transparent;
  color: rgba(255, 255, 255, .42);
  transition: color var(--dur-m) var(--ease-out),
              border-color var(--dur-m) var(--ease-out),
              background-color var(--dur-m) var(--ease-out);
}
.chg-notes__item[data-on="true"] {
  color: var(--on-dark);
  border-left-color: var(--green);
  background: rgba(255, 255, 255, .04);
}
.chg-notes__no { color: inherit; opacity: .6; }
.chg-notes__label { font-size: 1.0625rem; }
.chg-notes__say {
  font-size: var(--t-cap); color: var(--green);
  text-align: right;
}
.chg-notes__honesty {
  margin: clamp(1.5rem, 4vh, 2.25rem) 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: var(--t-cap); line-height: 1.66;
  color: rgba(255, 255, 255, .5);
}

/* --- the device ---------------------------------------------------------- */
.chg-stage { display: flex; justify-content: center; }

.chg-phone { width: 100%; max-width: 22rem; }
.chg-phone, .chg-desk { transition: transform var(--dur-l) var(--ease-mid); }
.chg-phone__frame {
  position: relative;
  aspect-ratio: 390 / 812;
  padding: .55rem;
  border-radius: 2.6rem;
  background: linear-gradient(160deg, #3A4149, #1A1F25 42%, #2C333A);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .10),
    0 2rem 4rem rgba(0, 0, 0, .55),
    inset 0 1px 1px rgba(255, 255, 255, .22);
}
.chg-phone__island {
  position: absolute; z-index: 3; top: 1.05rem; left: 50%;
  transform: translateX(-50%);
  width: 5.2rem; height: 1.15rem;
  border-radius: 1rem;
  background: #05070A;
}
.chg-phone__screen {
  position: relative; height: 100%;
  border-radius: 2.1rem;
  overflow: hidden;
  background: #FBFBFA;
  color: var(--ink);
}

.chg-app { display: flex; flex-direction: column; height: 100%; }

/* The product speaks in Castillo's own type (Karla body, Lato headings, as on
   castillohousing.com), on the homeowner's phone and the builder's desk alike.
   The portfolio around it keeps its own. */
.chg-app, .chg-desk { font-family: 'Karla', 'Helvetica Neue', Arial, sans-serif; }
.chg-app__title, .chg-app .chg-scr__h,
.chg-desk .chg-desk__proj, .chg-desk .chg-desk__emptyh, .chg-desk .chg-drawer__h { font-family: 'Lato', 'Helvetica Neue', Arial, sans-serif; }
.chg-app input, .chg-app textarea, .chg-desk input, .chg-desk textarea { font-family: inherit; }

/* Readability inside the product: every size ~8% up (rounded to half-pixels,
   so the hierarchy holds), and primary labels a step stronger than the
   secondary text beneath them. Scoped to .chg-app — nothing outside moves. */
.chg-app .chg-app__title { font-size: 0.9375rem; }
.chg-app .chg-app__chip { font-size: 0.5938rem; }
.chg-app .chg-scr__h { font-size: 1.4063rem; }
.chg-app .chg-scr__lede { font-size: 0.875rem; }
.chg-app .chg-scr__eyebrow { font-size: 0.6875rem; }
.chg-app .chg-scr__note { font-size: 0.75rem; }
.chg-app .chg-step__label { font-size: 0.875rem; }
.chg-app .chg-step__ctrl button { font-size: 0.9375rem; }
.chg-app .chg-step__ctrl b { font-size: 1rem; }
.chg-app .chg-chip__label { font-size: 0.875rem; }
.chg-app .chg-chip__rule { font-size: 0.6875rem; }
.chg-app .chg-cta { font-size: 0.875rem; }
.chg-app .chg-row__name { font-size: 0.9375rem; }
.chg-app .chg-row__score { font-size: 1rem; }
.chg-app .chg-row__score i { font-size: 0.6875rem; }
.chg-app .chg-row__meta { font-size: 0.75rem; }
.chg-app .chg-row__why { font-size: 0.75rem; }
.chg-app .chg-stats b { font-size: 1.0938rem; }
.chg-app .chg-stats span { font-size: 0.5938rem; }
.chg-app .chg-why__label { font-size: 0.8125rem; }
.chg-app .chg-why__v { font-size: 0.8125rem; }
.chg-app .chg-why__rule { font-size: 0.6875rem; }
.chg-app .chg-why__read { font-size: 0.75rem; }
.chg-app .chg-cmp__name { font-size: 0.875rem; }
.chg-app .chg-cmp__score { font-size: 1.2188rem; }
.chg-app .chg-cmp__col dt { font-size: 0.5938rem; }
.chg-app .chg-cmp__col dd { font-size: 0.8125rem; }
.chg-app .chg-cmp__d { font-size: 0.6875rem; }
.chg-app .chg-cmp__same { font-size: 0.6875rem; }
.chg-app .chg-pick__b { font-size: 0.75rem; }
.chg-app .chg-flag, .chg-app .chg-state { font-size: 0.5938rem; }
.chg-app .chg-cat__name { font-size: 0.875rem; }
.chg-app .chg-cat__n { font-size: 0.8125rem; }
.chg-app .chg-cat__n i { font-size: 0.6875rem; }
.chg-app .chg-item__title { font-size: 0.875rem; }
.chg-app .chg-item__sub { font-size: 0.6875rem; }
.chg-app .chg-add { font-size: 0.8125rem; }
.chg-app .chg-link, .chg-app .chg-shots { font-size: 0.75rem; }
.chg-app .chg-fields span { font-size: 0.5938rem; }
.chg-app .chg-fields input, .chg-app .chg-fields textarea { font-size: 0.8125rem; }
.chg-app .chg-shot button { font-size: 0.8125rem; }
.chg-app .chg-upload { font-size: 0.75rem; }
.chg-app .chg-prio { font-size: 0.75rem; }
.chg-app .chg-track__s span { font-size: 0.5313rem; }
.chg-app .chg-thread__who { font-size: 0.6875rem; }
.chg-app .chg-thread__when { font-size: 0.5938rem; }
.chg-app .chg-thread__t { font-size: 0.75rem; }
.chg-app .chg-thread__empty { font-size: 0.75rem; }
.chg-app .chg-say input { font-size: 0.75rem; }
.chg-app .chg-say button { font-size: 0.75rem; }
.chg-app .chg-step__label,
.chg-app .chg-chip__label,
.chg-app .chg-row__name,
.chg-app .chg-why__label,
.chg-app .chg-cmp__name,
.chg-app .chg-cat__name,
.chg-app .chg-item__title { color: var(--ink); font-weight: 500; }
.chg-app__bar {
  display: grid; grid-template-columns: 1.75rem 1fr auto;
  align-items: center; gap: .5rem;
  padding: 2.55rem .95rem .7rem;
  border-bottom: 1px solid var(--rule-soft);
  background: #FBFBFA;
}
.chg-app__back {
  width: 1.75rem; height: 1.75rem;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--ink-soft);
  transition: background-color var(--dur-s) var(--ease-out);
}
.chg-app__back:hover { background: rgba(0, 0, 0, .06); }
.chg-app__back[hidden] { visibility: hidden; display: grid; }
.chg-app__title { margin: 0; font-size: .875rem; font-weight: 500; text-align: center; }
.chg-app__chip {
  padding: .2rem .45rem;
  font-size: .5625rem;
  color: var(--green);
  border: 1px solid currentColor;
  border-radius: 2px;
}

.chg-app__body {
  flex: 1; min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 1rem .95rem 1.4rem;
}
.chg-app__body::-webkit-scrollbar { width: 0; }

/* Each screen arrives rather than snapping. */
.chg-scr { animation: chg-in var(--dur-m) var(--ease-out) both; }
@keyframes chg-in {
  from { opacity: 0; transform: translate3d(0, .5rem, 0); }
  to   { opacity: 1; transform: none; }
}

.chg-scr__h {
  margin: 0; font-weight: 300 !important; font-family: OrticaLinear-Light;
  font-size: 1.3rem; line-height: 1.2; letter-spacing: -.014em;
}
.chg-scr__lede {
  margin: .35rem 0 0;
  font-size: .8125rem; line-height: 1.5; color: var(--ink-muted);
}
.chg-scr__eyebrow { margin: 1.25rem 0 .6rem; color: var(--ink-muted); font-size: .625rem; }
.chg-scr__note {
  margin: 1.1rem 0 0;
  padding: .7rem .75rem;
  background: rgba(0, 0, 0, .035);
  border-left: 2px solid var(--green);
  font-size: .6875rem; line-height: 1.55; color: var(--ink-soft);
}

/* --- the bedroom stepper -------------------------------------------------- */
.chg-step {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-top: 1.1rem;
  padding: .6rem .7rem;
  border: 1px solid var(--rule-soft);
  border-radius: .5rem;
}
.chg-step__label { font-size: .8125rem; color: var(--ink-soft); }
.chg-step__ctrl { display: flex; align-items: center; gap: .55rem; }
.chg-step__ctrl button {
  width: 1.6rem; height: 1.6rem;
  display: grid; place-items: center;
  border: 1px solid var(--rule); border-radius: 50%;
  font-size: .875rem; line-height: 1;
  transition: background-color var(--dur-s) var(--ease-out), color var(--dur-s) var(--ease-out);
}
.chg-step__ctrl button:hover { background: var(--ink); color: var(--on-dark); }
.chg-step__ctrl b { min-width: 1ch; text-align: center; font-weight: 500; font-size: .9375rem; }

/* --- the signal chips ----------------------------------------------------- */
.chg-chips { display: grid; gap: .45rem; }
.chg-chip {
  display: block; width: 100%; text-align: left;
  padding: .6rem .7rem;
  border: 1px solid var(--rule-soft); border-radius: .5rem;
  background: transparent;
  transition: border-color var(--dur-s) var(--ease-out),
              background-color var(--dur-s) var(--ease-out),
              transform var(--dur-s) var(--ease-out);
}
.chg-chip:hover { border-color: var(--ink-quiet); }
.chg-chip:active { transform: scale(.985); }
.chg-chip[aria-pressed="true"] {
  border-color: var(--green);
  background: var(--green-soft);
}
.chg-chip__label { display: block; font-size: .8125rem; }
.chg-chip[aria-pressed="true"] .chg-chip__label { color: var(--green); font-weight: 500; }
.chg-chip__rule {
  display: block; margin-top: .2rem;
  font-size: .625rem; line-height: 1.45; color: var(--ink-muted);
}

.chg-cta {
  width: 100%; margin-top: 1.1rem;
  padding: .7rem 1rem;
  background: var(--ink); color: var(--on-dark);
  border-radius: .5rem;
  font-size: .8125rem; font-weight: 500;
  transition: opacity var(--dur-s) var(--ease-out);
}
.chg-cta:hover { opacity: .86; }
.chg-cta:disabled { opacity: .3; cursor: not-allowed; }

/* --- a scored bar --------------------------------------------------------- */
.chg-bar {
  display: block; height: 3px; margin: .4rem 0 .35rem;
  background: rgba(0, 0, 0, .08);
  border-radius: 2px; overflow: hidden;
}
.chg-bar--thin { height: 2px; }
.chg-bar__fill {
  display: block; height: 100%;
  width: calc(var(--v) * 100%);
  background: var(--green);
  border-radius: inherit;
  transform-origin: left;
  animation: chg-fill var(--dur-l) var(--ease-out) both;
}
@keyframes chg-fill { from { transform: scaleX(0); } to { transform: none; } }

/* --- the ranked list ------------------------------------------------------ */
.chg-rows { list-style: none; margin: .9rem 0 0; padding: 0; display: grid; gap: .4rem; }
.chg-row {
  display: block; width: 100%; text-align: left;
  padding: .65rem .7rem;
  border: 1px solid var(--rule-soft); border-radius: .5rem;
  transition: border-color var(--dur-s) var(--ease-out),
              background-color var(--dur-s) var(--ease-out);
}
.chg-row:hover { border-color: var(--green); background: var(--green-soft); }
.chg-row__top { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.chg-row__name { font-size: .875rem; }
.chg-row__score { font-size: .9375rem; font-weight: 500; color: var(--green); }
.chg-row__score i { font-style: normal; font-size: .625rem; opacity: .7; }
.chg-row__meta { display: block; font-size: .6875rem; color: var(--ink-muted); }
.chg-row__why { display: block; margin-top: .15rem; font-size: .6875rem; color: var(--ink-soft); }

/* --- one plan ------------------------------------------------------------- */
.chg-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: .5rem; margin-top: 1rem;
  padding: .75rem 0;
  border-block: 1px solid var(--rule-soft);
  text-align: center;
}
.chg-stats div { display: flex; flex-direction: column; gap: .15rem; }
.chg-stats b { font-size: 1rem; font-weight: 500; }
.chg-stats span { font-size: .5625rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-muted); }

.chg-why { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.chg-why__item { padding-bottom: .7rem; border-bottom: 1px solid var(--rule-soft); }
.chg-why__item:last-child { border-bottom: 0; padding-bottom: 0; }
.chg-why__item.is-abstained { opacity: .55; }
.chg-why__head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.chg-why__label { font-size: .75rem; }
.chg-why__v { font-size: .75rem; font-weight: 500; color: var(--green); }
.is-abstained .chg-why__v { color: var(--ink-muted); font-weight: 400; font-style: italic; }
.chg-why__rule { display: block; font-size: .625rem; line-height: 1.45; color: var(--ink-muted); }
.chg-why__read { display: block; margin-top: .15rem; font-size: .6875rem; color: var(--ink-soft); }

/* --- compare -------------------------------------------------------------- */
.chg-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1rem; }
.chg-cmp__col { padding: .7rem; border: 1px solid var(--rule-soft); border-radius: .5rem; }
.chg-cmp__name { margin: 0; font-size: .8125rem; }
.chg-cmp__score { margin: .1rem 0 .5rem; font-size: 1.125rem; font-weight: 500; color: var(--green); }
.chg-cmp__col dl { margin: 0; display: grid; gap: .3rem; }
.chg-cmp__col dt {
  font-size: .5625rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-muted);
}
.chg-cmp__col dd { margin: 0; font-size: .75rem; }
.chg-cmp__d { font-style: normal; font-size: .625rem; color: var(--green); }
.chg-cmp__same { font-style: normal; font-size: .625rem; color: var(--ink-muted); }

.chg-pick { display: flex; flex-wrap: wrap; gap: .3rem; }
.chg-pick__b {
  padding: .35rem .55rem;
  border: 1px solid var(--rule-soft); border-radius: 1rem;
  font-size: .6875rem;
  transition: border-color var(--dur-s) var(--ease-out), background-color var(--dur-s) var(--ease-out);
}
.chg-pick__b:hover { border-color: var(--ink-quiet); }
.chg-pick__b[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); color: var(--green); }

/* --- the catalogue rail --------------------------------------------------- */
.chg-plot {
  width: 100%; max-width: 68rem; margin-inline: auto;
  padding: clamp(2.5rem, 7vh, 4rem) var(--gutter) 0;
}
.chg-plot__label { margin: 0 0 1.5rem; color: rgba(255, 255, 255, .5); text-align: center; }
.chg-plot__rail {
  position: relative;
  height: 7.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, .18);
}
.chg-dot {
  position: absolute; bottom: 0;
  left: calc(var(--x) * 100%);
  transform: translateX(-50%);
  width: 1.5rem;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  height: calc(1.25rem + var(--s) * 5.75rem);
  transition: height var(--dur-l) var(--ease-out);
}
.chg-dot::before {
  content: ""; order: -1;
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255, 255, 255, .3);
  transition: background-color var(--dur-m) var(--ease-out),
              box-shadow var(--dur-m) var(--ease-out),
              transform var(--dur-m) var(--ease-out);
}
.chg-dot::after {
  content: ""; order: 0;
  flex: 1; width: 1px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .22), rgba(255, 255, 255, .04));
}
/* Castillo's sizes bunch between 3,400 and 4,500 sq ft, so naming all sixteen
   at their true positions is illegible. Position and height stay honest for
   every plan; only the ones being talked about are named. */
.chg-dot span {
  position: absolute; bottom: -1.45rem; left: 50%;
  transform: translateX(-50%) rotate(38deg);
  transform-origin: left center;
  white-space: nowrap;
  font-size: .5625rem; color: rgba(255, 255, 255, .34);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-m) var(--ease-out), color var(--dur-m) var(--ease-out);
}
.chg-dot.is-on::before { background: var(--green); box-shadow: 0 0 0 4px rgba(77, 134, 21, .22); }
.chg-dot.is-on span { opacity: 1; color: rgba(255, 255, 255, .72); }
.chg-dot.is-sel::before { background: #fff; box-shadow: 0 0 0 5px rgba(255, 255, 255, .2); transform: scale(1.2); }
.chg-dot.is-sel span { opacity: 1; color: #fff; }
.chg-dot:hover::before { transform: scale(1.35); }
.chg-dot:hover span,
.chg-dot:focus-visible span { opacity: 1; color: #fff; }
.chg-plot__scale {
  display: flex; justify-content: space-between;
  margin: 2.6rem 0 0;
  font-size: var(--t-cap); color: rgba(255, 255, 255, .4);
}

/* ==========================================================================
   06 — the workspace

   Back onto paper after the dark room. Two surfaces, one record: a phone for
   the buyer and a desktop for the builder, sharing every token below so they
   read as one product rather than two mockups.
   ========================================================================== */
.chg-build {
  width: 100%; max-width: 76rem; margin-inline: auto;
  padding: clamp(3.5rem, 9vh, 5.5rem) var(--gutter) clamp(2rem, 6vh, 3rem);

  --must:      #4D8615;
  --ordered:   #A6761D;
  --purchased: #3E6B8A;
}
.chg-build__head { max-width: 52rem; margin-inline: auto; text-align: center; container-type: inline-size; }
.chg-build .chg-label { margin-bottom: clamp(1rem, 3vh, 1.5rem); }
.chg-build__h {
  margin: 0; font-weight: 300 !important; font-family: OrticaLinear-Light;
  font-size: var(--t-hero); line-height: 1.2; letter-spacing: -.012em;
  /* One line at every width: full size wherever it fits, and on narrow
     screens only as small as the line needs (the sentence is ~17.6em wide). */
  font-size: min(var(--t-hero), 100cqi / 18);
  white-space: nowrap;
}
.chg-build__sub {
  /* Exactly as wide as the one-line heading above it: the heading's width
     is 17.64em at its own font size, which is computed the same way here. */
  margin: .9rem auto 0; max-width: calc(17.64 * min(var(--t-hero), 100cqi / 18));
  font-size: var(--t-copy); line-height: 1.68; color: var(--ink-soft);
  text-wrap: pretty;
}
.chg-build__honesty {
  /* As wide as its one sentence, so it sits on a single line with the rule
     above spanning exactly the same width; wraps only where it cannot fit. */
  width: fit-content; max-width: 100%; margin: clamp(2rem, 5vh, 3rem) auto 0;
  padding-top: 1.25rem; border-top: 1px solid var(--rule-soft);
  font-size: var(--t-cap); line-height: 1.66; color: var(--ink-muted);
  text-align: center; text-wrap: balance;
}

/* --- the arc: a spine that reports, not decorates ------------------------- */
.chg-arc {
  list-style: none; margin: clamp(2rem, 5vh, 3rem) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px;
  background: var(--rule-soft);
  border: 1px solid var(--rule-soft);
}
.chg-arc__step {
  display: flex; flex-direction: column; gap: .3rem;
  padding: .8rem .7rem;
  background: #F3F3F1;
  border-top: 2px solid transparent;
  transition: border-color var(--dur-m) var(--ease-out), background-color var(--dur-m) var(--ease-out);
}
.chg-arc__step[data-on="true"] { border-top-color: var(--green); background: #fff; }
.chg-arc__label { color: var(--ink-muted); font-size: .5625rem; }
.chg-arc__step[data-on="true"] .chg-arc__label { color: var(--ink); }
.chg-arc__v { font-size: .6875rem; line-height: 1.35; color: var(--ink-muted); }
.chg-arc__step[data-on="true"] .chg-arc__v { color: var(--green); }

/* --- whose view ----------------------------------------------------------- */
.chg-switch {
  display: flex; justify-content: center; gap: 0;
  margin: clamp(1.75rem, 4vh, 2.5rem) auto 0;
  width: fit-content;
  border: 1px solid var(--rule-soft);
}
.chg-switch__b {
  display: flex; flex-direction: column; gap: .15rem;
  padding: .7rem 1.25rem;
  text-align: left;
  transition: background-color var(--dur-s) var(--ease-out);
}
.chg-switch__b + .chg-switch__b { border-left: 1px solid var(--rule-soft); }
.chg-switch__b[aria-pressed="true"] { background: var(--ink); color: var(--on-dark); }
.chg-switch__who { font-size: .9375rem; }
.chg-switch__dev { font-size: .6875rem; color: var(--ink-muted); }
.chg-switch__b[aria-pressed="true"] .chg-switch__dev { color: rgba(255, 255, 255, .6); }

.chg-surfaces { margin-top: clamp(1.75rem, 4vh, 2.5rem); }
.chg-surface { display: flex; justify-content: center; }
.chg-surface[data-surface="builder"] { position: relative; }
.chg-surface[hidden] { display: none; }
.chg-phone--owner { max-width: 22rem; }

/* --- shared tokens: priority and status ---------------------------------- */
.chg-flag, .chg-state {
  display: inline-block;
  padding: .12rem .38rem;
  font-size: .5625rem; letter-spacing: .04em; text-transform: uppercase;
  border-radius: 2px; white-space: nowrap;
}
.chg-flag--must   { background: rgba(77, 134, 21, .14); color: var(--must); font-weight: 500; }
.chg-flag--prefer { background: rgba(0, 0, 0, .06); color: var(--ink-soft); }
.chg-flag--open   { background: transparent; color: var(--ink-muted); box-shadow: inset 0 0 0 1px var(--rule-soft); }

.chg-state--decide    { color: var(--ink-muted); box-shadow: inset 0 0 0 1px var(--rule-soft); }
.chg-state--selected  { background: rgba(0, 0, 0, .07); color: var(--ink); }
.chg-state--ordered   { background: rgba(166, 118, 29, .15); color: var(--ordered); }
.chg-state--purchased { background: rgba(62, 107, 138, .15); color: var(--purchased); }
.chg-state--installed { background: var(--must); color: #fff; }

/* --- the buyer's categories ----------------------------------------------- */
.chg-cats { list-style: none; margin: .9rem 0 0; padding: 0; display: grid; gap: .3rem; }
.chg-cat {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  gap: .5rem .6rem; width: 100%;
  padding: .6rem .7rem;
  border: 1px solid var(--rule-soft); border-radius: .5rem;
  text-align: left;
  transition: border-color var(--dur-s) var(--ease-out), background-color var(--dur-s) var(--ease-out);
}
.chg-cat:hover { border-color: var(--green); background: var(--green-soft); }
.chg-cat__name { font-size: .8125rem; }
.chg-cat__n { font-size: .75rem; font-weight: 500; color: var(--green); }
.chg-cat__n i { font-style: normal; font-weight: 400; font-size: .625rem; color: var(--ink-muted); }
.chg-cat__bar {
  grid-column: 1 / -1;
  height: 2px; border-radius: 2px; background: rgba(0, 0, 0, .08);
}
.chg-cat__bar i { display: block; height: 100%; width: calc(var(--v) * 100%); background: var(--must); border-radius: inherit; }

/* --- the buyer's items ----------------------------------------------------- */
.chg-items { list-style: none; margin: .9rem 0 0; padding: 0; display: grid; gap: .4rem; }
.chg-item {
  display: grid; gap: .3rem; width: 100%;
  padding: .65rem .7rem;
  border: 1px solid var(--rule-soft); border-radius: .5rem;
  text-align: left;
  transition: border-color var(--dur-s) var(--ease-out);
}
.chg-item:hover { border-color: var(--green); }
.chg-item__top { display: flex; align-items: center; gap: .45rem; }
.chg-item__sw {
  width: .85rem; height: .85rem; flex: none;
  border-radius: 50%; background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18);
}
.chg-item__title { font-size: .8125rem; line-height: 1.3; }
.chg-item__meta { display: flex; flex-wrap: wrap; gap: .3rem; }
.chg-item__sub { font-size: .625rem; color: var(--ink-muted); }

.chg-add {
  width: 100%; margin-top: .7rem;
  padding: .55rem;
  border: 1px dashed var(--rule); border-radius: .5rem;
  font-size: .75rem; color: var(--ink-muted);
  transition: border-color var(--dur-s) var(--ease-out), color var(--dur-s) var(--ease-out);
}
.chg-add:hover { border-color: var(--green); color: var(--green); }

/* --- item detail: link, images, note --------------------------------------- */
.chg-link, .chg-shots {
  margin: .7rem 0 0;
  font-size: .6875rem; color: var(--focus);
  word-break: break-all;
}
.chg-shots { color: var(--ink-muted); }
.chg-note {
  margin: 0; padding: .6rem .7rem;
  background: rgba(0, 0, 0, .035);
  border-left: 2px solid var(--rule);
  font-size: .75rem; line-height: 1.55; color: var(--ink-soft);
}

/* --- editable details ------------------------------------------------------ */
.chg-fields { display: grid; gap: .55rem; }
.chg-fields label { display: grid; gap: .2rem; }
.chg-fields span {
  font-size: .5625rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-muted);
}
.chg-fields input,
.chg-fields textarea {
  width: 100%;
  padding: .45rem .55rem;
  border: 1px solid var(--rule-soft); border-radius: .4rem;
  background: #fff;
  font: inherit; font-size: .75rem; line-height: 1.5; color: var(--ink);
  resize: vertical;
}
.chg-fields input:focus-visible,
.chg-fields textarea:focus-visible { border-color: var(--green); }
.chg-fields input::placeholder,
.chg-fields textarea::placeholder { color: var(--ink-quiet); }

.chg-shotgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(4.25rem, 1fr));
  gap: .35rem; margin-bottom: .5rem;
}
.chg-shot { position: relative; margin: 0; aspect-ratio: 1; }
.chg-shot img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: .35rem; border: 1px solid var(--rule-soft);
}
.chg-shot button {
  position: absolute; top: -.3rem; right: -.3rem;
  width: 1.15rem; height: 1.15rem;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--ink); color: var(--on-dark);
  font-size: .75rem; line-height: 1;
}
.chg-upload {
  display: block; width: 100%; margin-top: .3rem;
  padding: .5rem;
  border: 1px dashed var(--rule); border-radius: .5rem;
  font-size: .6875rem; color: var(--ink-muted); text-align: center;
  cursor: pointer;
  transition: border-color var(--dur-s) var(--ease-out), color var(--dur-s) var(--ease-out);
}
.chg-upload:hover { border-color: var(--green); color: var(--green); }

/* --- priority chips -------------------------------------------------------- */
.chg-prios { display: flex; flex-wrap: wrap; gap: .3rem; }
.chg-prio {
  padding: .35rem .6rem;
  border: 1px solid var(--rule-soft); border-radius: 1rem;
  font-size: .6875rem;
  transition: border-color var(--dur-s) var(--ease-out), background-color var(--dur-s) var(--ease-out);
}
.chg-prio:hover { border-color: var(--ink-quiet); }
.chg-prio.is-on { border-color: var(--green); background: var(--green-soft); color: var(--green); font-weight: 500; }

/* --- the status track ------------------------------------------------------ */
.chg-track { display: grid; grid-template-columns: repeat(5, 1fr); gap: .15rem; }
.chg-track__s {
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  padding: .3rem .1rem;
}
.chg-track__s i {
  display: block; width: 100%; height: 3px; border-radius: 2px;
  background: rgba(0, 0, 0, .1);
  transition: background-color var(--dur-m) var(--ease-out);
}
.chg-track__s span {
  font-size: .5rem; line-height: 1.2; text-align: center; color: var(--ink-muted);
  transition: color var(--dur-m) var(--ease-out);
}
.chg-track__s.is-past i { background: var(--must); }
.chg-track__s.is-now span { color: var(--ink); font-weight: 500; }
.chg-track__s:hover i { background: var(--ink-quiet); }
.chg-track__s.is-past:hover i { background: var(--must); }

/* --- the thread ------------------------------------------------------------ */
.chg-thread { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.chg-thread__m {
  padding: .5rem .6rem;
  border-radius: .45rem;
  background: rgba(0, 0, 0, .035);
}
.chg-thread__m--builder { background: var(--green-soft); }
.chg-thread__who { font-size: .625rem; font-weight: 500; }
.chg-thread__m--builder .chg-thread__who { color: var(--green); }
.chg-thread__when { font-size: .5625rem; color: var(--ink-muted); margin-left: .4rem; }
.chg-thread__t { margin: .2rem 0 0; font-size: .6875rem; line-height: 1.5; color: var(--ink-soft); }
.chg-thread__empty { font-size: .6875rem; color: var(--ink-muted); }

.chg-say { display: flex; gap: .3rem; margin-top: .6rem; }
.chg-say input {
  flex: 1; min-width: 0;
  padding: .45rem .55rem;
  border: 1px solid var(--rule-soft); border-radius: .4rem;
  font: inherit; font-size: .6875rem; color: var(--ink);
  background: #fff;
}
.chg-say input:focus-visible { border-color: var(--green); }
.chg-say button {
  padding: .45rem .7rem;
  background: var(--ink); color: var(--on-dark);
  border-radius: .4rem; font-size: .6875rem;
  transition: opacity var(--dur-s) var(--ease-out);
}
.chg-say button:hover { opacity: .85; }

.chg-cta--ghost {
  width: auto; margin-top: 1.25rem;
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--rule);
}

/* --- the builder's desk ---------------------------------------------------- */
.chg-desk {
  width: 100%; max-width: 72rem;
  border-radius: .7rem; overflow: hidden;
  background: #FBFBFA;
  box-shadow: 0 0 0 1px var(--rule-soft), 0 1.5rem 3rem rgba(0, 0, 0, .13);
}
.chg-desk__chrome {
  display: flex; align-items: center; gap: .4rem;
  padding: .6rem .8rem;
  background: #EDEDEA;
  border-bottom: 1px solid var(--rule-soft);
}
.chg-desk__chrome > span {
  width: .6rem; height: .6rem; border-radius: 50%;
  background: rgba(0, 0, 0, .15);
}
.chg-desk__url {
  margin: 0 auto; padding: .15rem .7rem;
  background: #fff; border-radius: 1rem;
  font-size: .625rem; color: var(--ink-muted);
}
/* The drawer shares the window rather than covering it: an overlay hid the
   last two columns and the counts in the bar, which is exactly the state the
   builder opened the item to check. */
.chg-desk__screen {
  position: relative; min-height: 30rem;
  display: grid; grid-template-columns: minmax(0, 1fr); align-content: start;
}
.chg-desk__screen:has(.chg-drawer) { grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); }

.chg-desk__empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 30rem; padding: 2rem var(--gutter); text-align: center;
}
.chg-desk__emptyh {
  margin: 0; font-family: OrticaLinear-Light; font-weight: 300;
  font-size: 1.35rem; letter-spacing: -.012em;
}
.chg-desk__emptyb {
  margin: .6rem 0 0; max-width: 26rem;
  font-size: .8125rem; line-height: 1.6; color: var(--ink-muted);
}

.chg-desk__bar {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--rule-soft);
}
.chg-desk__proj { margin: 0; font-size: .9375rem; font-weight: 500; }
.chg-desk__meta { margin: .1rem 0 0; font-size: .6875rem; color: var(--ink-muted); }
.chg-desk__stats { display: flex; gap: 1.1rem; margin-left: auto; }
.chg-desk__stats span { font-size: .6875rem; color: var(--ink-muted); }
.chg-desk__stats b { font-size: .9375rem; font-weight: 500; color: var(--ink); margin-right: .2rem; }
.chg-desk__filter { display: flex; gap: .25rem; }
.chg-desk__filter button {
  padding: .3rem .6rem;
  border: 1px solid var(--rule-soft); border-radius: 1rem;
  font-size: .625rem;
}
.chg-desk__filter button[aria-pressed="true"] {
  border-color: var(--green); background: var(--green-soft); color: var(--green);
}

/* --- the board ------------------------------------------------------------- */
.chg-board {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px; background: var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  min-width: 0;
}
/* Squeezed beside the drawer, the columns keep a workable width and the board
   scrolls — five statuses crushed to nothing would be worse than a scrollbar. */
.chg-desk__screen:has(.chg-drawer) .chg-board {
  grid-template-columns: none;
  grid-auto-flow: column; grid-auto-columns: minmax(10.5rem, 1fr);
  overflow-x: auto; overscroll-behavior-x: contain;
}
.chg-col { background: #FBFBFA; padding: .7rem .6rem 1rem; min-height: 20rem; }
.chg-col__h {
  margin: 0 0 .6rem;
  display: flex; align-items: center; justify-content: space-between; gap: .3rem;
  font-size: .5625rem; color: var(--ink-muted);
}
.chg-col__h i {
  font-style: normal; padding: .05rem .3rem;
  background: rgba(0, 0, 0, .06); border-radius: 2px; color: var(--ink-soft);
}
.chg-col__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.chg-col__none { font-size: .6875rem; color: var(--ink-quiet); text-align: center; padding: .5rem 0; }

.chg-card {
  display: grid; gap: .3rem; width: 100%;
  padding: .55rem .6rem;
  background: #fff;
  border: 1px solid var(--rule-soft); border-radius: .45rem;
  text-align: left;
  transition: border-color var(--dur-s) var(--ease-out), box-shadow var(--dur-s) var(--ease-out);
}
.chg-card:hover { border-color: var(--green); }
.chg-card.is-sel { border-color: var(--green); box-shadow: 0 0 0 2px var(--green-soft); }
.chg-card__cat { font-size: .5rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-muted); }
.chg-card__t { font-size: .6875rem; line-height: 1.35; }
.chg-card__foot { display: flex; align-items: center; justify-content: space-between; gap: .3rem; }
.chg-card__c {
  font-size: .5625rem; color: var(--ink-muted);
  padding: .05rem .3rem; background: rgba(0, 0, 0, .05); border-radius: 2px;
}

/* --- the drawer ------------------------------------------------------------ */
.chg-drawer {
  position: relative;
  max-height: 34rem;
  padding: 1rem 1.1rem 1.5rem;
  overflow-y: auto; overscroll-behavior: contain;
  background: #fff;
  border-left: 1px solid var(--rule-soft);
  animation: chg-drawer-in var(--dur-m) var(--ease-out) both;
}
@keyframes chg-drawer-in {
  from { opacity: 0; transform: translate3d(1.5rem, 0, 0); }
  to   { opacity: 1; transform: none; }
}
.chg-drawer__x {
  position: absolute; top: .6rem; right: .7rem;
  width: 1.6rem; height: 1.6rem;
  display: grid; place-items: center;
  border-radius: 50%; font-size: 1.1rem; color: var(--ink-muted);
}
.chg-drawer__x:hover { background: rgba(0, 0, 0, .06); }
.chg-drawer__cat { margin: 0; color: var(--ink-muted); }
.chg-drawer__h {
  margin: .35rem 0 0; padding-right: 1.5rem;
  font-family: OrticaLinear-Light; font-weight: 300;
  font-size: 1.15rem; line-height: 1.25; letter-spacing: -.012em;
}
.chg-drawer__brand { margin: .2rem 0 0; font-size: .75rem; color: var(--ink-soft); }
.chg-drawer .chg-scr__eyebrow { margin: 1.1rem 0 .5rem; color: var(--ink-muted); font-size: .5625rem; }

/* ==========================================================================
   07 — design notes
   ========================================================================== */
.chg-thinking {
  width: 100%; max-width: var(--col); margin-inline: auto;
  padding: clamp(4rem, 10vh, 6rem) var(--gutter) clamp(2rem, 6vh, 4rem);
}
.chg-thinking .chg-label { margin-bottom: clamp(1.5rem, 4vh, 2.25rem); }
.chg-thinking__points {
  display: grid; gap: clamp(2rem, 5vh, 3rem);
  max-width: 52rem; margin: 0 auto;
}
.chg-thinking__title {
  margin: 0; font-weight: 300; font-family: OrticaLinear-Light;
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  line-height: 1.2; letter-spacing: -.012em;
  color: var(--ink);
}
.chg-thinking__body {
  margin: .6rem 0 0;
  font-size: var(--t-copy); line-height: 1.65; color: var(--ink-soft);
}

/* ==========================================================================
   07 — the close
   ========================================================================== */
.chg-close {
  width: 100%; max-width: 46rem; margin-inline: auto;
  padding: clamp(2.5rem, 7vh, 4rem) var(--gutter) 0;
  border-top: 1px solid var(--rule-soft);
  text-align: center;
}
.chg-close .chg-label { margin-bottom: clamp(1.25rem, 3.5vh, 2rem); }
.chg-close__h {
  margin: 0; font-weight: 300 !important; font-family: OrticaLinear-Light;
  font-size: var(--t-stmt); line-height: 1.2; letter-spacing: -.012em;
}
.chg-close__body {
  margin: clamp(1rem, 2.6vh, 1.4rem) auto 0; max-width: 40rem;
  font-size: var(--t-copy); line-height: 1.72; color: var(--ink-soft);
}
/* The impact figure, set exactly as the LifeWorx metric is. */
.chg-metric__value {
  margin: 0; font-weight: 300; font-family: OrticaLinear-Light;
  font-size: clamp(2.75rem, 11vw, 8.5rem);
  line-height: .82; letter-spacing: -.05em;
}
.chg-metric__label { margin: clamp(1.25rem, 4vh, 2.25rem) 0 0; color: var(--ink-soft); }
.chg-metric__note {
  margin: clamp(.7rem, 2vh, 1rem) auto 0; max-width: 30rem;
  font-size: var(--t-cap); line-height: 1.6; color: var(--ink-muted);
}
@media (max-width: 46rem) {
  .chg-metric__value { font-size: clamp(3.75rem, 27vw, 7.5rem); }
  /* The longer role line wraps under the link rather than running off a phone. */
  .chg-id dd { flex-wrap: wrap; row-gap: .45rem; }
}
/* The role block is centred as Ceramic Pro's is: ROLE, the title, then the
   link beneath it, as one block in the middle of the column. */
@media (max-width: 1179px) {
  .chg-id dd { flex-direction: column; align-items: flex-start; flex-wrap: nowrap; gap: .45rem; }
}
.chg-close__list {
  list-style: none; margin: clamp(1.75rem, 5vh, 2.5rem) 0 0; padding: 0;
  display: grid; gap: .7rem; text-align: left;
}
.chg-close__list li {
  position: relative; padding-left: 1.35rem;
  font-size: var(--t-copy); line-height: 1.65; color: var(--ink-soft);
}
.chg-close__list li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 5px; height: 5px; border-radius: 50%;
  background: #a25b57;
}

/* ==========================================================================
   Testimonials — the LifeWorx closing band, in cream and chestnut.
   #F8F3EB against #a25b57 is 4.6:1, so the chestnut clears AA at every size
   used here; the title keeps full opacity for the same reason.
   ========================================================================== */
.chg-testimonials {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-top: clamp(3rem, 8vh, 5rem);
  background-color: #F8F3EB;
  padding: clamp(2rem, 3.5vh, 3rem) var(--gutter);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
}
.chg-testimonials__scroll { position: relative; width: 100%; overflow: hidden; }
.chg-testimonials__track {
  position: relative;
  display: flex;
  gap: clamp(8rem, 15vw, 16rem);
  will-change: transform;
  width: max-content;
}
.chg-testimonial {
  flex: 0 0 auto;
  width: clamp(42rem, 78vw, 62rem);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 0 clamp(1.5rem, 2.5vw, 2.5rem);
  text-align: center;
}
.chg-testimonial__quote {
  margin: 0;
  font-family: OrticaLinear-Light; font-weight: 300;
  font-size: clamp(1.0625rem, 1.2vw, 1.375rem);
  line-height: 1.55; letter-spacing: -.01em;
  color: #a25b57;
  text-wrap: pretty; max-width: 100%;
}
.chg-testimonial__attribution {
  margin: clamp(1rem, 2vh, 1.5rem) 0 0;
  font-family: var(--font); font-weight: 500; font-size: .8rem; line-height: 1.3;
  color: #a25b57;
  letter-spacing: .06em; text-transform: uppercase;
}
.chg-testimonial__name { display: inline; font-weight: 700; }
.chg-testimonial__name::after { content: " · "; margin: 0 .3em; }
.chg-testimonial__title { display: inline; font-size: .75rem; letter-spacing: .04em; font-weight: 400; }

.chg-foot {
  width: 100%; max-width: var(--m); margin-inline: auto;
  padding: clamp(2rem, 5vh, 3rem) var(--gutter) 0;
  text-align: center;
}

/* ==========================================================================
   Narrower screens
   ========================================================================== */
@media (max-width: 62rem) {
  .chg-lab__grid { grid-template-columns: 1fr; }
  .chg-notes { order: 2; }
  .chg-stage { order: 1; }
  .chg-notes__honesty { margin-top: 1.25rem; }

  .chg-arc { grid-template-columns: repeat(4, 1fr); }

  /* A board is a board: it scrolls sideways rather than collapsing into a
     list, because the columns are the status and losing them loses the point. */
  .chg-board,
  .chg-desk__screen:has(.chg-drawer) .chg-board {
    grid-auto-flow: column; grid-auto-columns: 13rem;
    grid-template-columns: none;
    overflow-x: auto; overscroll-behavior-x: contain;
  }
  /* Too narrow to sit beside the board, so it sits under it. */
  .chg-desk__screen:has(.chg-drawer) { grid-template-columns: minmax(0, 1fr); }
  .chg-drawer {
    max-height: none;
    border-left: 0; border-top: 1px solid var(--rule-soft);
  }
}

@media (max-width: 46rem) {
  .chg-open { padding-block: clamp(1rem, 4vh, 2rem) clamp(2rem, 7vh, 3rem); }
  .chg-open__logo { height: clamp(32px, 10vw, 48px); }

  .chg-split { grid-template-columns: 1fr; }
  .chg-split__half--real { border-right: 0; border-bottom: 1px solid var(--rule-soft); }

  .chg-work__grid { grid-template-columns: 1fr; }
  /* supporting images, a little smaller, each centred over its caption */
  .chg-work__img { width: 80%; margin-inline: auto; }
  .chg-work__grid .chg-work__cap { text-align: center; }

  .chg-duals { grid-template-columns: 1fr; padding-bottom: clamp(2rem, 6vh, 3rem); }
  .chg-dual { padding: clamp(1.25rem, 3vh, 1.75rem) 0; }
  .chg-dual:first-child { border-right: 0; border-bottom: 1px solid var(--rule-soft); }

  .chg-arc { grid-template-columns: repeat(2, 1fr); }
  .chg-switch { width: 100%; }
  .chg-switch__b { flex: 1; }
  .chg-desk__stats { margin-left: 0; width: 100%; }
  .chg-drawer { width: 100%; }

  /* The rail's rotated labels collide below this width, so it keeps the
     shape and drops the names — the phone above already names them. */
  .chg-plot__rail { height: 5.5rem; }
  .chg-dot { height: calc(1rem + var(--s) * 4.5rem); }
  .chg-dot span { display: none; }
  .chg-plot__scale { margin-top: 1rem; }
}

/* --- optional focus view ---------------------------------------------------
   A small circular control beside each product surface. It enlarges the live
   surface in place over a dimmed backdrop; nothing about the surface itself
   changes. Hidden where the product already fills a small screen. */
.chg-expand {
  display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem; padding: 0;
  border-radius: 50%; border: 1px solid var(--rule);
  background: #FBFBFA; color: var(--ink-soft);
  cursor: pointer;
  transition: color var(--dur-s) var(--ease-out), border-color var(--dur-s) var(--ease-out),
              background var(--dur-s) var(--ease-out), transform var(--dur-s) var(--ease-out),
              opacity var(--dur-m) var(--ease-out);
}
.chg-expand svg {
  width: 1.05rem; height: 1.05rem;
  fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
}
.chg-expand:hover { color: var(--ink); border-color: var(--ink-quiet); transform: scale(1.06); }
.chg-lab .chg-expand { background: transparent; border-color: rgba(255, 255, 255, .28); color: rgba(255, 255, 255, .78); }
.chg-lab .chg-expand:hover { color: #fff; border-color: rgba(255, 255, 255, .6); }

.chg-phone { position: relative; }
.chg-phone > .chg-expand { position: absolute; top: 1.25rem; left: calc(100% + 1.25rem); }
.chg-surface > .chg-expand { position: absolute; top: -3.5rem; right: max(0px, calc(50% - 36rem)); }

.chg [data-expanded] { position: relative; z-index: 60; }
.chg-phone[data-expanded] > .chg-expand { opacity: 0; pointer-events: none; }
/* Tablets: when the phone sits near the screen's edge, the enlarge control
   moves above its corner instead of past the edge of the page. */
@media (max-width: 1179px) and (min-width: 46.01rem) {
  .chg-phone > .chg-expand { top: -3.5rem; left: auto; right: 0; }
}

.chg-focus {
  position: fixed; left: 0; right: 0; top: var(--focus-top, 0px); height: 100vh; z-index: 55;
  background: rgba(18, 23, 28, .74);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-l) var(--ease-mid);
}
.chg-focus[data-on="true"] { opacity: 1; pointer-events: auto; }

.chg-expand--close {
  position: fixed; top: calc(var(--focus-top, 0px) + var(--header-h) + .75rem); right: var(--gutter); z-index: 70;
  background: rgba(18, 23, 28, .88); border-color: rgba(255, 255, 255, .3); color: rgba(255, 255, 255, .9);
  opacity: 0;
}
.chg-expand--close:hover { color: #fff; border-color: rgba(255, 255, 255, .65); background: rgba(18, 23, 28, .96); }
.chg-expand--close[data-on="true"] { opacity: 1; }
.chg-expand--close[hidden] { display: none; }

/* Desktop and tablets: the control is the round icon alone. */
.chg-expand__txt { display: none; }

@media (max-width: 46rem) {
  /* Phones: a labelled "Full screen" control beneath each surface. */
  .chg-expand {
    display: inline-flex; gap: .5rem; width: auto; height: auto; min-height: 44px;
    padding: .55rem 1rem; border-radius: 999px;
  }
  .chg-expand__txt { display: inline; font-size: .875rem; font-weight: 500; letter-spacing: 0; }
  .chg-phone > .chg-expand {
    position: absolute; top: calc(100% + .9rem); left: 0; right: 0;
    width: max-content; margin-inline: auto;
  }
  .chg-phone { margin-bottom: 4.25rem; }
  .chg-surface { flex-direction: column; align-items: center; }
  .chg-surface > .chg-expand { position: static; order: 2; margin-top: 1rem; }
  .chg-expand--close { width: 2.75rem; height: 2.75rem; padding: 0; min-height: 0; }
  /* One testimonial fits the screen, so each is read whole as it drifts by. */
  .chg-testimonials__track { gap: 3rem; }
  .chg-testimonial { width: calc(100vw - 2 * var(--gutter)); padding-inline: .25rem; }
  .chg-testimonial__quote { font-size: 1.0625rem; }
}
/* Touch: the prototype's round steppers keep their size, but a finger gets a
   44px target around each one. */
@media (hover: none) and (pointer: coarse) {
  .chg-step__ctrl button { position: relative; }
  .chg-step__ctrl button::after { content: ""; position: absolute; inset: -9px; }
  /* the home-size dots: same dot and stem, a wider column to tap */
  .chg-dot { width: 2.4rem; }
  .chg-live { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .chg[data-ready="true"],
  .chg [data-reveal][data-in="true"] { transition-duration: 1ms; }
  .chg-scr, .chg-bar__fill, .chg-drawer { animation: none; }
  .chg-dot { transition: none; }
}

/* ==========================================================================
   Full screen on phones
   The surface fills the screen: the homeowner's app without its phone frame,
   the builder's desk without its margins. Only ever set on a phone.
   ========================================================================== */
.chg-phone[data-full],
.chg-desk[data-full] {
  position: fixed; left: 0; top: var(--full-top, 0px); z-index: 65;
  width: 100%; max-width: none; height: 100%; margin: 0;
  transform: none;
}
.chg-phone[data-full] > .chg-expand { display: none; }
.chg-phone[data-full] .chg-phone__frame { aspect-ratio: auto; height: 100%; padding: 0; border-radius: 0; box-shadow: none; }
.chg-phone[data-full] .chg-phone__island { display: none; }
.chg-phone[data-full] .chg-phone__screen { border-radius: 0; }
.chg-phone[data-full] .chg-app__bar {
  padding-top: calc(.9rem + env(safe-area-inset-top));
  padding-right: 3.6rem;                          /* room for the close control */
}
.chg-phone[data-full] .chg-app__body { padding-bottom: calc(1.4rem + env(safe-area-inset-bottom)); }
.chg-desk[data-full] {
  display: flex; flex-direction: column;
  border-radius: 0; box-shadow: none;
}
.chg-desk[data-full] .chg-desk__chrome { padding-top: calc(.6rem + env(safe-area-inset-top)); padding-right: 3.6rem; }
.chg-desk[data-full] .chg-desk__screen {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: env(safe-area-inset-bottom);
}
.chg[data-app-full] .chg-expand--close {
  display: grid; right: .5rem; z-index: 70;
  top: calc(var(--focus-top, 0px) + .45rem + env(safe-area-inset-top));
}
