/* ==========================================================================
   AI Chatbots & Copilots — page visuals
   conversation operating a calendar (hero), chat-thread intro, without/with rows,
   copilot types, scripted walkthrough, nested production layers
   ========================================================================== */
.d-glow--cp {
  inset: -4% 6% 42%;
  background:
    radial-gradient(40% 58% at 30% 45%, rgb(107 63 212 / 0.5), transparent 70%),
    radial-gradient(40% 55% at 72% 55%, rgb(58 126 246 / 0.45), transparent 72%),
    radial-gradient(26% 40% at 55% 15%, rgb(214 51 132 / 0.25), transparent 70%);
}

/* ==========================================================================
   Hero — the copilot changes a real system
   ========================================================================== */
.cx { --px: 0; --py: 0; position: relative; max-width: 76rem; margin-inline: auto; border: 1px solid rgb(255 255 255 / 0.12); border-radius: clamp(1rem, 1.6vw, 1.75rem); background: #07070a; color: var(--white); overflow: hidden; container-type: inline-size; }
.cx__bar { display: flex; align-items: center; gap: 1rem; padding: 0.9rem 1.25rem; border-bottom: 1px solid rgb(255 255 255 / 0.08); font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgb(255 255 255 / 0.5); }
.cx__run { flex: 1; }
.cx__live { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--green); }
.cx__live i { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; }
.cx__canvas { display: grid; grid-template-columns: 42% 6% 52%; aspect-ratio: 16 / 9.2; font-size: 1cqi; }

.cx__chat { display: flex; flex-direction: column; gap: 1.05em; min-height: 0; padding: 2.2em 2em; border-right: 1px solid rgb(255 255 255 / 0.08); overflow: hidden; }
.cx__user { align-self: flex-end; max-width: 88%; padding: 0.8em 1.1em; border-radius: 1.1em 1.1em 0.3em 1.1em; background: var(--blue); font-size: 1.12em; line-height: 1.35; }
.cx__k { display: block; margin-bottom: 0.55em; font-size: 0.72em; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: rgb(255 255 255 / 0.5); }
.cx__think { padding: 0.85em 1.1em; border-left: 2px solid rgb(155 124 240 / 0.7); border-radius: 0 0.8em 0.8em 0; background: rgb(155 124 240 / 0.08); }
.cx__think li { display: flex; align-items: center; gap: 0.6em; padding-block: 0.18em; font-size: 0.92em; color: rgb(255 255 255 / 0.8); }
.cx__think li i { flex: none; width: 0.5em; height: 0.5em; border-radius: 50%; background: #9b7cf0; }
.cx__tool { position: relative; display: grid; gap: 0.3em; padding: 0.85em 1.1em; border: 1px dashed rgb(91 150 255 / 0.55); border-radius: 0.8em; background: rgb(58 126 246 / 0.07); }
.cx__tool code { font: 500 0.92em/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; color: #cfe0ff; }
.cx__state { position: absolute; right: 1.1em; top: 0.85em; display: grid; place-items: center; }
.cx__spin { grid-area: 1 / 1; width: 1.1em; height: 1.1em; border: 2px solid rgb(255 255 255 / 0.25); border-top-color: var(--blue-bright); border-radius: 50%; opacity: 0; }
.cx__ok { grid-area: 1 / 1; padding: 0.2em 0.55em; border-radius: 99em; background: rgb(116 214 90 / 0.12); font-size: 0.72em; font-style: normal; font-weight: 600; color: var(--green); }
.cx__ai { display: grid; gap: 0.7em; max-width: 94%; padding: 0.85em 1.1em; border-radius: 1.1em 1.1em 1.1em 0.3em; background: rgb(255 255 255 / 0.07); font-size: 1.04em; line-height: 1.45; }
.cx__chips { display: flex; gap: 0.5em; }
.cx__chips span { padding: 0.4em 0.8em; border: 1px solid rgb(255 255 255 / 0.2); border-radius: 99em; font-size: 0.8em; }
.cx__chips span:first-child { border-color: var(--white); background: var(--white); color: var(--black); }
.cx__input { margin-top: auto; display: flex; align-items: center; padding: 0.8em 1em; border-radius: 0.9em; background: rgb(255 255 255 / 0.05); font-size: 0.9em; color: rgb(255 255 255 / 0.4); }
.cx__input b { width: 1px; height: 1.1em; margin-left: 0.3em; background: var(--white); }

/* the "action beam" between the tool call and the system */
.cx__beam { --beam-y: 32%; position: relative; } /* level with the tool card */
.cx__beam::before { content: ""; position: absolute; left: 0; right: 0; top: var(--beam-y); height: 1px; background: repeating-linear-gradient(90deg, rgb(91 150 255 / 0.6) 0 6px, transparent 6px 12px); }
.cx__beam i { position: absolute; left: 0; right: 0; top: calc(var(--beam-y) - 3px); height: 7px; overflow: hidden; }
.cx__beam i::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; border-radius: 4px; background: linear-gradient(90deg, transparent, var(--blue-bright)); transform: translateX(-110%); }

.cx__sys { position: relative; display: grid; grid-template-rows: auto auto minmax(0, 1fr); min-height: 0; padding: 2.2em 2em 2em; translate: calc(var(--px) * 10px) calc(var(--py) * 6px); }
.cx__sys-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.2em; }
.cx__sys-head b { font-size: 1.3em; font-weight: 600; }
.cx__sys-head span { font-size: 0.8em; color: rgb(255 255 255 / 0.45); }
.cx__days { display: grid; grid-template-columns: 3.6em repeat(5, minmax(0, 1fr)); padding-bottom: 0.6em; }
.cx__days span { font-size: 0.8em; color: rgb(255 255 255 / 0.5); }
.cx__days span:first-child { grid-column: 2; }
.cx__days .is-hot { color: var(--blue-bright); font-weight: 600; }
.cx__grid { display: grid; grid-template-columns: 3.6em minmax(0, 1fr); min-height: 0; }
.cx__hours { display: grid; grid-template-rows: repeat(5, minmax(0, 1fr)); }
.cx__hours span { font-size: 0.72em; color: rgb(255 255 255 / 0.35); }
.cx__cols {
  position: relative;
  border-left: 1px solid rgb(255 255 255 / 0.08);
  background-image: linear-gradient(90deg, rgb(255 255 255 / 0.06) 1px, transparent 1px), linear-gradient(rgb(255 255 255 / 0.06) 1px, transparent 1px);
  background-size: 20% 100%, 100% 20%;
}
.cx__ev {
  position: absolute; left: calc(var(--col) * 20%); top: calc(var(--row) * 20%);
  width: 20%; height: calc(var(--len) * 20%);
  padding: 0.45em 0.55em;
  border: 0.3em solid transparent; border-radius: 0.8em;
  background: rgb(255 255 255 / 0.08) padding-box;
  font-size: 0.74em; line-height: 1.2; color: rgb(255 255 255 / 0.75);
  overflow: hidden;
}
.cx__ev--move { --col: 3; --row: 1.5; --len: 1; background-color: var(--blue); color: var(--white); font-weight: 600; }
.cx__toast { position: absolute; right: 2em; bottom: 2em; display: flex; align-items: center; gap: 0.6em; padding: 0.7em 1em; border-radius: 0.8em; background: var(--white); color: var(--black); font-size: 0.85em; font-weight: 500; box-shadow: 0 1em 2em -1em rgb(0 0 0 / 0.6); }
.cx__toast i { flex: none; width: 1.2em; height: 1.2em; border-radius: 50%; background: var(--green); }

@media (prefers-reduced-motion: no-preference) {
  /* the request plays out once after load; the static (reduced-motion) state is the finished one */
  .js :is(.cx__user, .cx__think, .cx__tool, .cx__ai, .cx__toast) { opacity: 0; transform: translate3d(0, 0.8em, 0); }
  .is-loaded :is(.cx__user, .cx__think, .cx__tool, .cx__ai, .cx__toast) { opacity: 1; transform: none; transition: opacity 0.5s var(--ease-soft), transform 0.8s var(--ease-out); }
  .is-loaded .cx__user { transition-delay: 1.2s; }
  .is-loaded .cx__think { transition-delay: 1.7s; }
  .js .cx__think li { opacity: 0; }
  .is-loaded .cx__think li { opacity: 1; transition: opacity 0.4s; transition-delay: calc(1.95s + var(--k) * 0.3s); }
  .is-loaded .cx__tool { transition-delay: 2.9s; }
  .js .cx__spin { opacity: 1; animation: cx-spin 0.8s linear infinite; }
  .js .cx__ok { opacity: 0; }
  .is-loaded .cx__spin { opacity: 0; transition: opacity 0.3s 4.5s; }
  .is-loaded .cx__ok { opacity: 1; transition: opacity 0.3s 4.55s; }
  .js .cx__days .is-hot { color: rgb(255 255 255 / 0.5); font-weight: 400; }
  .is-loaded .cx__days .is-hot { color: var(--blue-bright); font-weight: 600; transition: color 0.4s 4.4s; }
  .js .cx__ev--move { transform: translate(-200%, -50%); }
  .is-loaded .cx__ev--move { transform: none; transition: transform 1.1s var(--ease-in-out) 3.4s; }
  .is-loaded .cx__beam i::before { animation: cx-beam 0.9s var(--ease-in-out) 3.05s 2; }
  .is-loaded .cx__toast { transition-delay: 4.6s; }
  .is-loaded .cx__ai { transition-delay: 4.95s; }
  .cx__input b { animation: cx-caret 1s steps(1) infinite; }
  .cx__live i { animation: cx-blink 1.6s ease-in-out infinite; }
  .d-hero.is-paused .cx *, .d-hero.is-paused .cx *::before { animation-play-state: paused; }

  @keyframes cx-spin { to { transform: rotate(360deg); } }
  @keyframes cx-beam { to { transform: translateX(240%); } }
  @keyframes cx-caret { 50% { opacity: 0; } }
  @keyframes cx-blink { 50% { opacity: 0.25; } }
}

/* ==========================================================================
   Intro — the six capabilities as lines from a conversation
   ========================================================================== */
.cp-intro__title { font-size: clamp(3rem, 0.9rem + 7.2vw, 10rem); font-weight: 700; line-height: 0.95; letter-spacing: -0.055em; }
.cp-intro__title .mask { display: block; width: fit-content; margin-inline: auto; padding: 0.1em 0.12em 0.26em; margin-block: -0.1em -0.26em; }
.cp-bubble { position: relative; display: inline-block; padding: 0 0.28em 0.04em; color: var(--blue); }
.cp-bubble i { position: absolute; inset: 0.04em 0 -0.02em; border: 0.045em solid var(--blue); border-radius: 0.42em; }
.cp-bubble i::after { content: ""; position: absolute; left: 0.55em; bottom: -0.16em; width: 0.26em; height: 0.26em; border-right: 0.045em solid var(--blue); border-bottom: 0.045em solid var(--blue); background: var(--off-white); rotate: 45deg; }
@media (prefers-reduced-motion: no-preference) {
  .js .cp-bubble i { opacity: 0; transform: scale(0.9); }
  .js .cp-intro__title.is-in .cp-bubble i { opacity: 1; transform: none; transition: opacity 0.6s var(--ease-soft) 0.9s, transform 0.9s var(--ease-out) 0.9s; }
}

.thread { display: flex; flex-direction: column; gap: 1.1rem; max-width: 56rem; margin: clamp(3.5rem, 6vw, 6rem) auto 0; text-align: left; }
.thread__item { display: grid; justify-items: start; gap: 0.45rem; max-width: min(100%, 30rem); }
.thread__item--r { align-self: flex-end; justify-items: end; }
.thread__k { font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); }
.thread__b { padding: 0.95rem 1.25rem; border: 1px solid rgb(0 0 0 / 0.08); border-radius: 1.25rem 1.25rem 1.25rem 0.35rem; background: var(--white); font-size: clamp(1.05rem, 0.9rem + 0.45vw, 1.35rem); line-height: 1.4; color: var(--black); }
.thread__item--r .thread__b { border-color: var(--black); border-radius: 1.25rem 1.25rem 0.35rem 1.25rem; background: var(--black); color: var(--white); }

/* ==========================================================================
   Capabilities — without / with
   ========================================================================== */
.cmp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.cmp__ask { grid-column: 1 / -1; justify-self: end; max-width: 80%; padding: 0.6rem 0.9rem; border-radius: 0.9rem 0.9rem 0.25rem 0.9rem; background: var(--black); font-size: 0.95rem; color: var(--white); }
.cmp__col { display: grid; align-content: start; gap: 0.45rem; }
.cmp__k { font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #8a8a8a; }
.cmp__b { padding: 0.7rem 0.9rem; border-radius: 0.9rem 0.9rem 0.9rem 0.25rem; background: rgb(0 0 0 / 0.05); font-size: 0.95rem; line-height: 1.4; color: #6d6d6d; }
.cmp__col--with .cmp__k { color: var(--blue); }
.cmp__col--with .cmp__b { background: rgb(58 126 246 / 0.1); box-shadow: inset 0 0 0 1px rgb(58 126 246 / 0.35); color: var(--black); }

/* ==========================================================================
   Copilot types — large words + a live widget preview
   ========================================================================== */
.types { background: var(--black); color: var(--white); padding-block: clamp(5rem, 9vw, 10rem); }
.types__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: start; gap: 3rem clamp(2rem, 5vw, 6rem); margin-top: clamp(3rem, 5.5vw, 6rem); }
.types__list { border-top: 1px solid rgb(255 255 255 / 0.2); }
.type { width: 100%; display: grid; grid-template-columns: 3rem auto minmax(0, 1fr); align-items: baseline; column-gap: 1rem; padding-block: clamp(0.6rem, 1.2vw, 1rem); border-bottom: 1px solid rgb(255 255 255 / 0.1); text-align: left; color: rgb(255 255 255 / 0.3); transition: color 0.4s; }
.type__n { font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.08em; transition: color 0.4s; }
.type__word { font-size: clamp(2.4rem, 0.9rem + 4.4vw, 6.5rem); font-weight: 700; line-height: 1; letter-spacing: -0.055em; transition: transform 0.7s var(--ease-out); }
.type__kind { font-size: clamp(0.95rem, 0.8rem + 0.4vw, 1.3rem); font-weight: 500; opacity: 0; transform: translateX(-0.5rem); transition: opacity 0.4s, transform 0.6s var(--ease-out); }
.type:hover { color: rgb(255 255 255 / 0.7); }
.type[aria-selected="true"] { color: var(--white); }
.type[aria-selected="true"] .type__n, .type[aria-selected="true"] .type__kind { color: var(--blue-bright); }
.type[aria-selected="true"] .type__word { transform: translateX(0.75rem); }
.type[aria-selected="true"] .type__kind { opacity: 1; transform: none; }
.type:focus-visible { outline-offset: -2px; }

.types__previews { position: sticky; top: calc(var(--header-h) + 2rem); }
.wg { display: grid; gap: 0.9rem; padding: 1.25rem; border: 1px solid rgb(255 255 255 / 0.14); border-radius: 1.4rem; background: #0b0b0f; }
.wg__head { display: flex; align-items: center; gap: 0.55rem; padding-bottom: 0.9rem; border-bottom: 1px solid rgb(255 255 255 / 0.08); font: 500 0.76rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: rgb(255 255 255 / 0.55); }
.wg__dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--green); }
.wg__user { justify-self: end; max-width: 85%; padding: 0.65rem 0.95rem; border-radius: 1rem 1rem 0.3rem 1rem; background: var(--blue); font-size: 0.95rem; }
.wg__ai { display: grid; gap: 0.7rem; max-width: 92%; padding: 0.8rem 0.95rem; border-radius: 1rem 1rem 1rem 0.3rem; background: rgb(255 255 255 / 0.07); font-size: 0.95rem; line-height: 1.45; }
.wg__card { display: grid; gap: 0.25rem; padding: 0.75rem 0.85rem; border-radius: 0.7rem; background: var(--white); color: var(--black); }
.wg__card span { font-size: 0.8rem; color: #5e5e5e; }
.wg__bar { display: block; height: 4px; margin-top: 0.35rem; border-radius: 99em; background: rgb(0 0 0 / 0.08); overflow: hidden; }
.wg__bar em { display: block; height: 100%; background: var(--green); transform: scaleX(var(--p)); transform-origin: 0 50%; }
.wg__list { display: grid; gap: 0.35rem; }
.wg__list li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.wg__list li::before { content: ""; flex: none; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--blue-bright); }
.wg__list--risk li::before { background: #f5a524; }
.wg__row { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; font-size: 0.8rem; color: rgb(255 255 255 / 0.55); }
.wg__btn { padding: 0.4rem 0.75rem; border-radius: 99em; background: var(--white); font-weight: 600; color: var(--black); white-space: nowrap; }
.wg__code { width: fit-content; padding: 0.45rem 0.6rem; border-radius: 0.45rem; background: rgb(255 255 255 / 0.08); font: 500 0.8rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; color: #8fd694; }
.wg__note { padding-top: 0.9rem; border-top: 1px solid rgb(255 255 255 / 0.08); font-size: 0.92rem; line-height: 1.5; color: rgb(255 255 255 / 0.62); }

/* ==========================================================================
   Interaction — scripted walkthrough
   ========================================================================== */
.demo { background: var(--off-white); color: var(--black); padding-block: clamp(5rem, 9vw, 10rem); }
.app { margin-top: clamp(3rem, 5.5vw, 6rem); border: 1px solid rgb(0 0 0 / 0.1); border-radius: clamp(1rem, 1.5vw, 1.5rem); background: #0b0b0f; color: var(--white); overflow: hidden; }
.app__bar { display: flex; align-items: center; gap: 1rem; min-height: 3.1rem; padding: 0.6rem 1.2rem; border-bottom: 1px solid rgb(255 255 255 / 0.08); font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgb(255 255 255 / 0.5); }
.app__title { flex: 1; }
.app__reset { padding: 0.45rem 0.85rem; border: 1px solid rgb(255 255 255 / 0.25); border-radius: 99em; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--white); transition: background-color 0.3s, color 0.3s; }
.app__reset:is(:hover, :focus-visible) { background: var(--white); color: var(--black); }
.app__body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 1fr); height: clamp(32rem, 64vh, 40rem); }
.app__chat { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; border-right: 1px solid rgb(255 255 255 / 0.08); }
.app__thread { display: flex; flex-direction: column; gap: 0.9rem; padding: 1.5rem; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.app__empty { margin: auto; display: grid; justify-items: center; gap: 1.25rem; text-align: center; }
.app__hello { font-size: clamp(1.4rem, 1rem + 1vw, 2rem); font-weight: 600; letter-spacing: -0.03em; }
.app__chip { padding: 0.8rem 1.2rem; border: 1px solid rgb(91 150 255 / 0.55); border-radius: 99em; background: rgb(58 126 246 / 0.12); font-weight: 600; color: var(--white); transition: background-color 0.3s, border-color 0.3s; }
.app__chip:is(:hover, :focus-visible) { border-color: var(--blue); background: var(--blue); }
.app__static { display: grid; gap: 0.6rem; margin-top: 1.5rem; color: rgb(255 255 255 / 0.75); }
.app__composer { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.25rem; border-top: 1px solid rgb(255 255 255 / 0.08); }
.app__field { flex: 1; min-width: 0; padding: 0.8rem 1rem; border-radius: 0.8rem; background: rgb(255 255 255 / 0.06); font-size: 0.95rem; color: rgb(255 255 255 / 0.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app__send { flex: none; display: grid; place-items: center; width: 2.9rem; aspect-ratio: 1; border-radius: 50%; background: var(--blue); color: var(--white); transition: background-color 0.3s; }
.app__send svg { width: 1.1rem; height: 0.55rem; }
.app__send:disabled { background: rgb(255 255 255 / 0.1); color: rgb(255 255 255 / 0.35); cursor: default; }
.app__side { padding: 1.5rem; overflow-y: auto; background: #09090c; }
.app__k { margin-bottom: 0.75rem; font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: rgb(255 255 255 / 0.45); }
.app__ctx + .app__k { margin-top: 1.75rem; }
.app__ctx li { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); padding-block: 0.45rem; border-top: 1px solid rgb(255 255 255 / 0.07); font-size: 0.88rem; }
.app__ctx span { font-size: 0.78rem; color: rgb(255 255 255 / 0.45); }
.app__log { display: grid; gap: 0.6rem; }
.app__log-empty { font-size: 0.85rem; color: rgb(255 255 255 / 0.4); }

.m, .lg { opacity: 0; transform: translate3d(0, 0.6rem, 0); transition: opacity 0.35s var(--ease-soft), transform 0.5s var(--ease-out); }
.m.is-in, .lg.is-in { opacity: 1; transform: none; }
.m { display: grid; gap: 0.6rem; max-width: 84%; }
.m--user { align-self: flex-end; padding: 0.7rem 1rem; border-radius: 1rem 1rem 0.3rem 1rem; background: var(--blue); }
.m--ai { align-self: flex-start; padding: 0.8rem 1rem; border-radius: 1rem 1rem 1rem 0.3rem; background: rgb(255 255 255 / 0.07); }
.m--status { align-self: flex-start; display: flex; align-items: center; gap: 0.6rem; font-size: 0.92rem; color: rgb(255 255 255 / 0.6); }
.m__spin { width: 1rem; height: 1rem; border: 2px solid rgb(255 255 255 / 0.2); border-top-color: var(--blue-bright); border-radius: 50%; }
.m__table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.m__table th { padding: 0.35rem 0.5rem; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-align: left; text-transform: uppercase; color: rgb(255 255 255 / 0.45); }
.m__table td { padding: 0.5rem; border-top: 1px solid rgb(255 255 255 / 0.08); font-variant-numeric: tabular-nums; white-space: nowrap; }
.st { padding: 0.2rem 0.5rem; border-radius: 99em; font-size: 0.72rem; font-weight: 600; }
.st--ship { background: rgb(58 126 246 / 0.2); color: var(--blue-bright); }
.st--proc { background: rgb(245 165 36 / 0.16); color: #f5b547; }
.st--done { background: rgb(116 214 90 / 0.14); color: var(--green); }
.m__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.m__btn { padding: 0.55rem 0.95rem; border: 1px solid rgb(255 255 255 / 0.25); border-radius: 99em; font-size: 0.88rem; font-weight: 600; color: var(--white); transition: border-color 0.3s, opacity 0.3s; }
.m__btn:is(:hover, :focus-visible):not(:disabled) { border-color: var(--white); }
.m__btn--primary { border-color: var(--white); background: var(--white); color: var(--black); }
.m__btn:disabled { opacity: 0.35; cursor: default; }
.m__draft { display: grid; gap: 0.35rem; padding: 0.85rem 0.95rem; border-radius: 0.7rem; background: var(--white); color: var(--black); }
.m__meta { font-size: 0.8rem; color: #5e5e5e; }
.m__meta span { display: inline-block; width: 4rem; color: #9a9a9a; }
.m__body { margin-top: 0.35rem; padding-top: 0.5rem; border-top: 1px solid rgb(0 0 0 / 0.08); font-size: 0.9rem; line-height: 1.5; color: #1a1a1a; }
.m__badge { width: fit-content; padding: 0.3rem 0.65rem; border-radius: 99em; background: rgb(155 124 240 / 0.18); font-size: 0.74rem; font-weight: 600; color: #cdbbff; }

.lg { display: grid; gap: 0.25rem; padding: 0.75rem 0.85rem; border: 1px dashed rgb(91 150 255 / 0.45); border-radius: 0.7rem; background: rgb(58 126 246 / 0.06); }
.lg code { font: 600 0.82rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; color: #cfe0ff; }
.lg span { font: 500 0.74rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; color: rgb(255 255 255 / 0.5); }
.lg em { width: fit-content; padding: 0.2rem 0.5rem; border-radius: 99em; font-size: 0.72rem; font-style: normal; font-weight: 600; }
.lg__run { background: rgb(58 126 246 / 0.14); color: var(--blue-bright); }
.lg__done { display: none; background: rgb(116 214 90 / 0.12); color: var(--green); }
.lg.is-done { border-style: solid; border-color: rgb(255 255 255 / 0.12); }
.lg.is-done .lg__run { display: none; }
.lg.is-done .lg__done { display: inline-block; }
.lg--human { border-color: rgb(155 124 240 / 0.55); background: rgb(155 124 240 / 0.08); }
.lg--human.is-done .lg__done { background: rgb(155 124 240 / 0.15); color: #cdbbff; }

@media (prefers-reduced-motion: no-preference) {
  .m__spin { animation: cx-spin 0.8s linear infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .m, .lg { transition: none; }
}

/* ==========================================================================
   Production AI — nested layers
   ========================================================================== */
.prod { background: var(--black); color: var(--white); padding-block: clamp(5rem, 9vw, 10rem); }
.prod__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); align-items: center; gap: 3rem clamp(2rem, 5vw, 6rem); margin-top: clamp(3rem, 5.5vw, 6rem); }
.nest__layer {
  position: relative;
  padding: clamp(3rem, 4.2vw, 3.75rem) clamp(0.9rem, 2.2vw, 2.1rem) clamp(0.9rem, 2.2vw, 2.1rem);
  border: 1px solid rgb(255 255 255 / 0.14); border-radius: clamp(1.1rem, 2vw, 1.75rem);
  transition: border-color 0.4s, background-color 0.4s, box-shadow 0.4s;
}
.nest__layer--0 { padding-bottom: clamp(1.5rem, 3vw, 2.5rem); background: rgb(255 255 255 / 0.03); }
.nest__tab { position: absolute; left: clamp(0.9rem, 2.2vw, 2.1rem); top: clamp(0.95rem, 1.4vw, 1.25rem); display: inline-flex; align-items: baseline; gap: 0.55rem; font-size: clamp(0.88rem, 0.78rem + 0.3vw, 1.1rem); font-weight: 600; color: rgb(255 255 255 / 0.55); transition: color 0.3s; }
.nest__tab b { font-size: var(--fs-micro); letter-spacing: 0.1em; color: rgb(255 255 255 / 0.35); transition: color 0.3s; }
.nest__tab:hover { color: var(--white); }
.nest__layer:has(> .nest__tab[aria-selected="true"]) { border-color: var(--blue-bright); background-color: rgb(58 126 246 / 0.07); box-shadow: 0 0 0 4px rgb(58 126 246 / 0.12); }
.nest__layer:has(> .nest__tab[aria-selected="true"]) > .nest__tab { color: var(--white); }
.nest__layer:has(> .nest__tab[aria-selected="true"]) > .nest__tab b { color: var(--blue-bright); }
.nest__chat { display: grid; gap: 0.5rem; }
.nest__msg { justify-self: end; max-width: 90%; padding: 0.55rem 0.85rem; border-radius: 0.9rem 0.9rem 0.25rem 0.9rem; background: var(--blue); font-size: 0.9rem; }
.nest__msg--ai { justify-self: start; border-radius: 0.9rem 0.9rem 0.9rem 0.25rem; background: rgb(255 255 255 / 0.1); }
.prod__count { font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.1em; color: var(--blue-bright); }
.prod__panel h3 { margin-top: 0.6rem; font-size: clamp(1.8rem, 1.1rem + 1.8vw, 3rem); font-weight: 600; letter-spacing: -0.04em; }
.prod__panel p { margin-top: 0.75rem; font-size: clamp(1rem, 0.9rem + 0.3vw, 1.2rem); line-height: 1.5; color: rgb(255 255 255 / 0.72); }
.prod__panel ul { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1.25rem; }
.prod__panel li { padding: 0.4rem 0.75rem; border: 1px solid rgb(255 255 255 / 0.16); border-radius: 99em; font-size: 0.82rem; color: rgb(255 255 255 / 0.75); }
@media (prefers-reduced-motion: no-preference) {
  /* opacity only: nested transforms would compound */
  .js .nest .nest__layer { opacity: 0; }
  .js .nest.is-in .nest__layer { opacity: 1; transition: opacity 0.7s var(--ease-soft), border-color 0.4s, background-color 0.4s, box-shadow 0.4s; transition-delay: calc(var(--i) * 140ms), 0s, 0s, 0s; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 64em) {
  .cx__canvas { grid-template-columns: minmax(0, 1fr); aspect-ratio: auto; font-size: 1.9cqi; }
  .cx__chat { border-right: 0; border-bottom: 1px solid rgb(255 255 255 / 0.08); }
  .cx__beam { display: none; }
  .cx__sys { height: 46cqi; translate: none; }

  .cmp { grid-template-columns: 1fr; }
  .types__grid, .prod__grid { grid-template-columns: 1fr; }
  .types__previews { top: calc(var(--header-h) - 0.25rem); z-index: 2; order: -1; }
  .wg { gap: 0.6rem; padding: 1rem; }
  .wg__note { display: none; }
  .app__body { grid-template-columns: 1fr; height: auto; }
  .app__chat { height: 30rem; border-right: 0; border-bottom: 1px solid rgb(255 255 255 / 0.08); }
}

@media (max-width: 48em) {
  .cx__canvas { font-size: 3.1cqi; }
  .cx__sys { height: 72cqi; padding: 1.6em 1.2em; }
  .cx__chat { padding: 1.6em 1.2em; }
  .cx__toast { right: 1.2em; bottom: 1.2em; }

  .cp-intro__title .mask { margin-inline: 0; }
  .thread__item { max-width: 88%; }

  .type { grid-template-columns: 2.25rem minmax(0, 1fr); }
  .type__kind { grid-column: 2; }
  .app__thread { padding: 1rem; }
  .m { max-width: 94%; }
  .m__table th:nth-child(2), .m__table td:nth-child(2) { display: none; }
}
